#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*/ printf(char *, ...);
int read(char *, int);
size_t strlen(char *);
int write(char *, size_t);
int main(void) {
  char *data = "Hello, world!";
  char result[1000];
  char *presult = result;
  int i = 0;
  int count = 0;
  size_t datalen = strlen(data);
  for (i = 0; i < 15; i++) {
    count = write(data, datalen);
    printf("%d write %d bytes\n", i, count);
  }
  printf("\n");
  for (i = 0; i < 15; i++) {
    count = read(presult, 10);
    presult += count;
    printf("%d read %d bytes\n", i, count);
  }
  *presult = 0;
  printf("\n");
  printf("%s\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x400(%rbp),%rax
mov    %rax,-0x408(%rbp)
movl   $0x0,-0x40c(%rbp)
movl   $0x0,-0x410(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x418(%rbp)
movl   $0x0,-0x40c(%rbp)
cmpl   $0xf,-0x40c(%rbp)
jge    11ea <main+0xaa>
mov    -0x10(%rbp),%rdi
mov    -0x418(%rbp),%rsi
call   1030 <write@plt>
mov    %eax,-0x410(%rbp)
mov    -0x40c(%rbp),%esi
mov    -0x410(%rbp),%edx
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x40c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40c(%rbp)
jmp    1199 <main+0x59>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x40c(%rbp)
cmpl   $0xf,-0x40c(%rbp)
jge    126e <main+0x12e>
mov    -0x408(%rbp),%rdi
mov    $0xa,%esi
call   1060 <read@plt>
mov    %eax,-0x410(%rbp)
mov    -0x410(%rbp),%ecx
mov    -0x408(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x408(%rbp)
mov    -0x40c(%rbp),%esi
mov    -0x410(%rbp),%edx
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x40c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40c(%rbp)
jmp    1202 <main+0xc2>
mov    -0x408(%rbp),%rax
movb   $0x0,(%rax)
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x400(%rbp),%rsi
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x3e8,%rsp
lea    0xe9b(%rip),%r14
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
lea    0xe95(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xd,%esi
mov    %r14,%rdi
call   1050 <write@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
lea    (%rsp,%rdx,1),%rbx
lea    0xcce(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%rdx
add    %rdx,%rbx
mov    %r15,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1070 <read@plt>
movslq %eax,%r12
mov    %r15,%rdi
mov    $0xe,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1060 <printf@plt>
movb   $0x0,(%r12,%rbx,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
@.str.1 = [19 x i8] c"%d write %d bytes\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [18 x i8] c"%d read %d bytes\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [1000 x i8]
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
store i8* %8, i8** %4
store i32 0, i32* %5
store i32 0, i32* %6
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %7
store i32 0, i32* %5
br label %11
11: ; preds = %21, %0
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 15
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i8*, i8** %2
%16 = load i64, i64* %7
%17 = call i32 @write(i8* %15, i64 %16)
store i32 %17, i32* %6
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %11
24: ; preds = %11
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %26
26: ; preds = %39, %24
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 15
br i1 %28, label %29, label %42
29: ; preds = %26
%30 = load i8*, i8** %4
%31 = call i32 @read(i8* %30, i32 10)
store i32 %31, i32* %6
%32 = load i32, i32* %6
%33 = load i8*, i8** %4
%34 = sext i32 %32 to i64
%35 = getelementptr inbounds i8, i8* %33, i64 %34
store i8* %35, i8** %4
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %36, i32 %37)
br label %39
39: ; preds = %29
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 1
store i32 %41, i32* %5
br label %26
42: ; preds = %26
%43 = load i8*, i8** %4
store i8 0, i8* %43
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%45 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %45)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
@.str.1 = [19 x i8] c"%d write %d bytes\0A\00"
@.str.3 = [18 x i8] c"%d read %d bytes\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %3)
%5 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %5)
%7 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %7)
%9 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %9)
%11 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %11)
%13 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %13)
%15 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %15)
%17 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 %17)
%19 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %19)
%21 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 9, i32 %21)
%23 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %23)
%25 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %25)
%27 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 %27)
%29 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 13, i32 %29)
%31 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %31)
%33 = tail call i32 @putchar(i32 10)
%34 = call i32 @read(i8* %2, i32 10)
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 %35
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %34)
%38 = call i32 @read(i8* %36, i32 10)
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8, i8* %36, i64 %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 %38)
%42 = call i32 @read(i8* %40, i32 10)
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %40, i64 %43
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 2, i32 %42)
%46 = call i32 @read(i8* %44, i32 10)
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %44, i64 %47
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 3, i32 %46)
%50 = call i32 @read(i8* %48, i32 10)
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %48, i64 %51
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 4, i32 %50)
%54 = call i32 @read(i8* %52, i32 10)
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %52, i64 %55
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 5, i32 %54)
%58 = call i32 @read(i8* %56, i32 10)
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %56, i64 %59
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 6, i32 %58)
%62 = call i32 @read(i8* %60, i32 10)
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %60, i64 %63
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 7, i32 %62)
%66 = call i32 @read(i8* %64, i32 10)
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8, i8* %64, i64 %67
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 8, i32 %66)
%70 = call i32 @read(i8* %68, i32 10)
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %68, i64 %71
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 9, i32 %70)
%74 = call i32 @read(i8* %72, i32 10)
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %72, i64 %75
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 10, i32 %74)
%78 = call i32 @read(i8* %76, i32 10)
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i8, i8* %76, i64 %79
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 11, i32 %78)
%82 = call i32 @read(i8* %80, i32 10)
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %80, i64 %83
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %82)
%86 = call i32 @read(i8* %84, i32 10)
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %84, i64 %87
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 13, i32 %86)
%90 = call i32 @read(i8* %88, i32 10)
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8, i8* %88, i64 %91
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 14, i32 %90)
store i8 0, i8* %92
%94 = call i32 @putchar(i32 10)
%95 = call i32 @puts(i8* %2)
ret i32 0
}