#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ answer(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ readQA(char *);
int /*<<< orphan*/ strcmp(char *, char *);
main() {
  readQA("QA.txt");
  char question[512];
  printf("±z¦n¡A§Ú­Ì¨Ó²á²á¤Ñ§a¡I\n");
  do {
    printf(">> ");
    gets(question);
    answer(question);
  } while (!strcmp(question, "¦A¨£") == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
call   1070 <readQA@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
lea    -0x210(%rbp),%rdi
call   1060 <gets@plt>
lea    -0x210(%rbp),%rdi
call   1050 <answer@plt>
lea    -0x210(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     117a <main+0x2a>
mov    -0x4(%rbp),%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
lea    0xe9d(%rip),%rdi
call   1070 <readQA@plt>
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8c(%rip),%r14
mov    %rsp,%rbx
movabs $0xa3c2a8c241a6c2,%r15
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    %rbx,%rdi
call   1050 <answer@plt>
cmp    %r15,(%rsp)
jne    1190 <main+0x40>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"QA.txt\00"
@.str.1 = [41 x i8] c"\C2\B1z\C2\A6n\C2\A1A\C2\A7\C3\9A\C2\AD\C3\8C\C2\A8\C3\93\C2\B2\C3\A1\C2\B2\C3\A1\C2\A4\C3\91\C2\A7a\C2\A1I\0A\00"
@.str.2 = [4 x i8] c">> \00"
@.str.3 = [8 x i8] c"\C2\A6A\C2\A8\C2\A3\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [512 x i8]
store i32 0, i32* %1
%3 = call i32 @readQA(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %11, %0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%8 = call i32 @gets(i8* %7)
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%10 = call i32 @answer(i8* %9)
br label %11
11: ; preds = %5
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = icmp eq i32 %16, 0
br i1 %17, label %5, label %18
18: ; preds = %11
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [7 x i8] c"QA.txt\00"
@.str.2 = [4 x i8] c">> \00"
@str = [40 x i8] c"\C2\B1z\C2\A6n\C2\A1A\C2\A7\C3\9A\C2\AD\C3\8C\C2\A8\C3\93\C2\B2\C3\A1\C2\B2\C3\A1\C2\A4\C3\91\C2\A7a\C2\A1I\00"
define i32 @main() {
%1 = alloca [512 x i8]
%2 = tail call i32 @readQA(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%5 = bitcast [512 x i8]* %1 to i64*
br label %6
6: ; preds = %6, %0
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @gets(i8* %3)
%9 = call i32 @answer(i8* %3)
%10 = load i64, i64* %5
%11 = icmp eq i64 %10, 46094451273213634
br i1 %11, label %12, label %6
12: ; preds = %6
ret i32 0
}