#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*/ ReadLines(int /*<<< orphan*/, char **, int, int const);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int main(void) {
  char buffer1[128] = {0};
  char buffer2[128] = {0};
  char buffer3[128] = {0};
  const int BUFFER_COUNT = 3;
  char *buffers[] = {buffer1, buffer2, buffer3};
  ReadLines(stdin, buffers, 128, BUFFER_COUNT);
  for (int i = 0; i < BUFFER_COUNT; ++i) {
    puts(buffers[i]);
  }
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <memset@plt>
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <memset@plt>
lea    -0x190(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <memset@plt>
movl   $0x3,-0x194(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0x1b0(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x1a8(%rbp)
lea    -0x190(%rbp),%rax
mov    %rax,-0x1a0(%rbp)
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
lea    -0x1b0(%rbp),%rsi
mov    $0x80,%edx
mov    $0x3,%ecx
call   1030 <ReadLines@plt>
movl   $0x0,-0x1b4(%rbp)
cmpl   $0x3,-0x1b4(%rbp)
jge    121d <main+0xdd>
movslq -0x1b4(%rbp),%rax
mov    -0x1b0(%rbp,%rax,8),%rdi
ff
call   1040 <puts@plt>
mov    -0x1b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b4(%rbp)
jmp    11e8 <main+0xa8>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1a8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
lea    0x120(%rsp),%rax
mov    %rax,(%rsp)
lea    0xa0(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x80,%edx
mov    $0x3,%ecx
call   1030 <ReadLines@plt>
mov    (%rsp),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%rdi
call   1040 <puts@plt>
mov    0x10(%rsp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x1a8,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca [128 x i8]
%4 = alloca [128 x i8]
%5 = alloca i32
%6 = alloca [3 x i8*]
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [128 x i8]* %2 to i8*
%9 = bitcast [128 x i8]* %3 to i8*
%10 = bitcast [128 x i8]* %4 to i8*
store i32 3, i32* %5
%11 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
store i8* %12, i8** %11
%13 = getelementptr inbounds i8*, i8** %11, i64 1
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
store i8* %14, i8** %13
%15 = getelementptr inbounds i8*, i8** %13, i64 1
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
store i8* %16, i8** %15
%17 = load i32, i32* @stdin
%18 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
%19 = call i32 @ReadLines(i32 %17, i8** %18, i32 128, i32 3)
store i32 0, i32* %7
br label %20
20: ; preds = %29, %0
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 3
br i1 %22, label %23, label %32
23: ; preds = %20
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @puts(i8* %27)
br label %29
29: ; preds = %23
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %20
32: ; preds = %20
%33 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [128 x i8]
%2 = alloca [128 x i8]
%3 = alloca [128 x i8]
%4 = alloca [3 x i8*]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = bitcast [3 x i8*]* %4 to i8*
%9 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 0
store i8* %5, i8** %9
%10 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 1
store i8* %6, i8** %10
%11 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 2
store i8* %7, i8** %11
%12 = load i32, i32* @stdin
%13 = call i32 @ReadLines(i32 %12, i8** %9, i32 128, i32 3)
%14 = load i8*, i8** %9
%15 = call i32 @puts(i8* dereferenceable(1) %14)
%16 = load i8*, i8** %10
%17 = call i32 @puts(i8* dereferenceable(1) %16)
%18 = load i8*, i8** %11
%19 = call i32 @puts(i8* dereferenceable(1) %18)
%20 = call i32 (...) @getchar()
ret i32 0
}