#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
size_t fread(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, const char *argv[]) {
  char c = '\0';
  size_t num = 1;
  fprintf(stdout, "[\"register\", \"s1\"]\n");
  fprintf(stdout, "[\"register\", \"s2\", \"k\"]\n");
  fflush(stdout);
  while (c != '\n' && num > 0) {
    num = fread(&c, 1, 1, stdin);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movq   $0x1,-0x20(%rbp)
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
lea    0xe8e(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xe8d(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
movsbl -0x11(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x21(%rbp)
je     11b7 <main+0x77>
cmpq   $0x0,-0x20(%rbp)
seta   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    11c7 <main+0x87>
jmp    11e9 <main+0xa9>
mov    0x2e1a(%rip),%rax
mov    (%rax),%ecx
lea    -0x11(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
mov    %rax,-0x20(%rbp)
jmp    119a <main+0x5a>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movb   $0x0,0x7(%rsp)
mov    0x2e88(%rip),%rbx
mov    (%rbx),%edi
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xead(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
mov    0x2e6e(%rip),%r14
lea    0x7(%rsp),%rbx
nop
mov    (%r14),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmpb   $0xa,0x7(%rsp)
je     11a1 <main+0x61>
test   %rax,%rax
jne    1180 <main+0x40>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [20 x i8] c"[\22register\22, \22s1\22]\0A\00"
@.str.1 = [25 x i8] c"[\22register\22, \22s2\22, \22k\22]\0A\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 0, i8* %6
store i64 1, i64* %7
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stdout
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
br label %14
14: ; preds = %23, %2
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 10
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i64, i64* %7
%20 = icmp ugt i64 %19, 0
br label %21
21: ; preds = %18, %14
%22 = phi i1 [ false, %14 ], [ %20, %18 ]
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = load i32, i32* @stdin
%25 = call i64 @fread(i8* %6, i32 1, i32 1, i32 %24)
store i64 %25, i64* %7
br label %14
26: ; preds = %21
%27 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"[\22register\22, \22s1\22]\0A\00"
@.str.1 = [25 x i8] c"[\22register\22, \22s2\22, \22k\22]\0A\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
store i8 0, i8* %3
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
br label %10
10: ; preds = %2, %10
%11 = load i32, i32* @stdin
%12 = call i64 @fread(i8* %3, i32 1, i32 1, i32 %11)
%13 = load i8, i8* %3
%14 = icmp ne i8 %13, 10
%15 = icmp ne i64 %12, 0
%16 = select i1 %14, i1 %15, i1 false
br i1 %16, label %10, label %17
17: ; preds = %10
%18 = call i32 @exit(i32 0)
unreachable
}