#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 */
typedef int /*<<< orphan*/ linebuf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ logline(int /*<<< orphan*/ *, char *, char *);
int read(int, char *, int);
int /*<<< orphan*/ sleep(int);
char *strchr(char *, char);
void copy(int in_fd, FILE *outfp) {
  static char linebuf[5 * 1024];
  int l, acc = 0;
  while ((l = read(in_fd, linebuf, sizeof(linebuf) - 2)) > 0) {
    char *b, *eol;
    int i;
    acc += l;
    for (i = 0; i < l; i++)
      if (linebuf[i] == '\0')
        linebuf[i] = ' ';
    if (linebuf[l - 1] == '\n')
      l--;
    linebuf[l] = '\n';
    linebuf[l + 1] = '\0';
    b = linebuf;
    while (eol = strchr(b, '\n')) {
      *eol = '\0';
      logline(outfp, "kernel", b);
      b = eol + 1;
    }
  }
  if (!acc)
    sleep(1);
  return;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2ef0(%rip),%rsi
mov    $0x13fe,%edx
call   1040 <read@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    126d <copy+0x12d>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11cc <copy+0x8c>
movslq -0x2c(%rbp),%rcx
lea    0x2eb3(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    11b9 <copy+0x79>
movslq -0x2c(%rbp),%rcx
lea    0x2e9b(%rip),%rax
movb   $0x20,(%rax,%rcx,1)
jmp    11be <copy+0x7e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1186 <copy+0x46>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2e74(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    11f2 <copy+0xb2>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
lea    0x2e53(%rip),%rax
movb   $0xa,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0x2e3f(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2e34(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1268 <copy+0x128>
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xdae(%rip),%rsi
call   1050 <logline@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1220 <copy+0xe0>
jmp    1156 <copy+0x16>
cmpl   $0x0,-0x18(%rbp)
jne    1281 <copy+0x141>
mov    $0x1,%edi
call   1060 <sleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r13
lea    0x2ef8(%rip),%rbp
mov    %edi,0xc(%rsp)
mov    %rbp,%rsi
mov    $0x13fe,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    142c <copy+0x2ec>
mov    %eax,%r15d
xor    %ebx,%ebx
lea    0xe83(%rip),%r12
pxor   %xmm3,%xmm3
jmp    11b8 <copy+0x78>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%rsp),%rbx
add    %r15d,%ebx
mov    0xc(%rsp),%edi
mov    %rbp,%rsi
mov    $0x13fe,%edx
call   1040 <read@plt>
mov    %eax,%r15d
test   %eax,%eax
pxor   %xmm3,%xmm3
jle    1419 <copy+0x2d9>
mov    %r15d,%eax
cmp    $0x10,%r15d
mov    %rbx,0x10(%rsp)
jae    11d0 <copy+0x90>
xor    %ecx,%ecx
jmp    140d <copy+0x2cd>
nopl   (%rax)
mov    %eax,%ecx
and    $0xfffffff0,%ecx
xor    %edx,%edx
jmp    11ed <copy+0xad>
nopl   0x0(%rax)
add    $0x10,%rdx
cmp    %rdx,%rcx
je     1380 <copy+0x240>
movq   (%rdx,%rbp,1),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%esi
test   $0x1,%sil
je     1208 <copy+0xc8>
movb   $0x20,(%rdx,%rbp,1)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%esi
shr    $0x10,%esi
test   $0x1,%sil
je     1223 <copy+0xe3>
movb   $0x20,0x1(%rdx,%rbp,1)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%esi
test   $0x1,%sil
je     123c <copy+0xfc>
movb   $0x20,0x2(%rdx,%rbp,1)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%esi
test   $0x1,%sil
je     1255 <copy+0x115>
movb   $0x20,0x3(%rdx,%rbp,1)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm3,%xmm1
pextrw $0x4,%xmm1,%esi
test   $0x1,%sil
je     126e <copy+0x12e>
movb   $0x20,0x4(%rdx,%rbp,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%esi
test   $0x1,%sil
je     1287 <copy+0x147>
movb   $0x20,0x5(%rdx,%rbp,1)
pextrw $0x3,%xmm0,%esi
test   $0x1,%sil
je     1297 <copy+0x157>
movb   $0x20,0x6(%rdx,%rbp,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%esi
test   $0x1,%sil
je     12ac <copy+0x16c>
movb   $0x20,0x7(%rdx,%rbp,1)
movq   0x8(%rdx,%rbp,1),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%esi
test   $0x1,%sil
je     12c9 <copy+0x189>
movb   $0x20,0x8(%rdx,%rbp,1)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%esi
shr    $0x10,%esi
test   $0x1,%sil
je     12e4 <copy+0x1a4>
movb   $0x20,0x9(%rdx,%rbp,1)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%esi
test   $0x1,%sil
je     12fd <copy+0x1bd>
movb   $0x20,0xa(%rdx,%rbp,1)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%esi
test   $0x1,%sil
je     1316 <copy+0x1d6>
movb   $0x20,0xb(%rdx,%rbp,1)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm3,%xmm1
pextrw $0x4,%xmm1,%esi
test   $0x1,%sil
je     132f <copy+0x1ef>
movb   $0x20,0xc(%rdx,%rbp,1)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%esi
test   $0x1,%sil
je     1348 <copy+0x208>
movb   $0x20,0xd(%rdx,%rbp,1)
pextrw $0x3,%xmm0,%esi
test   $0x1,%sil
je     1358 <copy+0x218>
movb   $0x20,0xe(%rdx,%rbp,1)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%esi
test   $0x1,%sil
je     11e0 <copy+0xa0>
movb   $0x20,0xf(%rdx,%rbp,1)
jmp    11e0 <copy+0xa0>
cs nopw 0x0(%rax,%rax,1)
cmp    %rax,%rcx
jne    140d <copy+0x2cd>
lea    -0x1(%rax),%ecx
cmpb   $0xa,(%rcx,%rbp,1)
cmove  %ecx,%eax
cltq
movw   $0xa,(%rax,%rbp,1)
mov    %rbp,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1190 <copy+0x50>
mov    %rax,%r14
mov    %rbp,%rbx
nopw   0x0(%rax,%rax,1)
movb   $0x0,(%r14)
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <logline@plt>
mov    %r14,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,%r14
test   %rax,%rax
jne    13c0 <copy+0x280>
jmp    1190 <copy+0x50>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rcx
cmp    %rcx,%rax
je     1389 <copy+0x249>
cmpb   $0x0,(%rcx,%rbp,1)
jne    1400 <copy+0x2c0>
movb   $0x20,(%rcx,%rbp,1)
jmp    1400 <copy+0x2c0>
test   %ebx,%ebx
je     142c <copy+0x2ec>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <sleep@plt>

LLVM IR (-O0):
@copy.linebuf = internal global [5120 x i8] zeroinitializer
@.str = [7 x i8] c"kernel\00"
define void @copy(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %6
br label %10
10: ; preds = %67, %2
%11 = load i32, i32* %3
%12 = call i32 @read(i32 %11, i8* getelementptr inbounds ([5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 0), i32 5118)
store i32 %12, i32* %5
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %68
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = add nsw i32 %16, %15
store i32 %17, i32* %6
store i32 0, i32* %9
br label %18
18: ; preds = %34, %14
%19 = load i32, i32* %9
%20 = load i32, i32* %5
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %37
22: ; preds = %18
%23 = load i32, i32* %9
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %22
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %31
store i8 32, i8* %32
br label %33
33: ; preds = %29, %22
br label %34
34: ; preds = %33
%35 = load i32, i32* %9
%36 = add nsw i32 %35, 1
store i32 %36, i32* %9
br label %18
37: ; preds = %18
%38 = load i32, i32* %5
%39 = sub nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 10
br i1 %44, label %45, label %48
45: ; preds = %37
%46 = load i32, i32* %5
%47 = add nsw i32 %46, -1
store i32 %47, i32* %5
br label %48
48: ; preds = %45, %37
%49 = load i32, i32* %5
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %50
store i8 10, i8* %51
%52 = load i32, i32* %5
%53 = add nsw i32 %52, 1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %54
store i8 0, i8* %55
store i8* getelementptr inbounds ([5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 0), i8** %7
br label %56
56: ; preds = %60, %48
%57 = load i8*, i8** %7
%58 = call i8* @strchr(i8* %57, i8 signext 10)
store i8* %58, i8** %8
%59 = icmp ne i8* %58, null
br i1 %59, label %60, label %67
60: ; preds = %56
%61 = load i8*, i8** %8
store i8 0, i8* %61
%62 = load i32*, i32** %4
%63 = load i8*, i8** %7
%64 = call i32 @logline(i32* %62, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %63)
%65 = load i8*, i8** %8
%66 = getelementptr inbounds i8, i8* %65, i64 1
store i8* %66, i8** %7
br label %56
67: ; preds = %56
br label %10
68: ; preds = %10
%69 = load i32, i32* %6
%70 = icmp ne i32 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %68
%72 = call i32 @sleep(i32 1)
br label %73
73: ; preds = %71, %68
ret void
}

LLVM IR (-O2):
@copy.linebuf = internal global [5120 x i8] zeroinitializer
@.str = [7 x i8] c"kernel\00"
define void @copy(i32 %0, i32* %1) {
%3 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 0), i32 5118)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %8, label %143
5: ; preds = %134, %120
%6 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 0), i32 5118)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %141
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ %3, %2 ]
%10 = phi i32 [ %11, %5 ], [ 0, %2 ]
%11 = add nsw i32 %9, %10
%12 = zext i32 %9 to i64
%13 = icmp ult i32 %9, 16
br i1 %13, label %109, label %14
14: ; preds = %8
%15 = and i64 %12, 4294967280
br label %16
16: ; preds = %104, %14
%17 = phi i64 [ 0, %14 ], [ %105, %104 ]
%18 = or i64 %17, 8
%19 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %17
%20 = bitcast i8* %19 to <8 x i8>*
%21 = load <8 x i8>, <8 x i8>* %20
%22 = getelementptr inbounds i8, i8* %19, i64 8
%23 = bitcast i8* %22 to <8 x i8>*
%24 = load <8 x i8>, <8 x i8>* %23
%25 = icmp eq <8 x i8> %21, zeroinitializer
%26 = icmp eq <8 x i8> %24, zeroinitializer
%27 = extractelement <8 x i1> %25, i64 0
br i1 %27, label %28, label %30
28: ; preds = %16
%29 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %17
store i8 32, i8* %29
br label %30
30: ; preds = %28, %16
%31 = extractelement <8 x i1> %25, i64 1
br i1 %31, label %32, label %35
32: ; preds = %30
%33 = or i64 %17, 1
%34 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %33
store i8 32, i8* %34
br label %35
35: ; preds = %32, %30
%36 = extractelement <8 x i1> %25, i64 2
br i1 %36, label %37, label %40
37: ; preds = %35
%38 = or i64 %17, 2
%39 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %38
store i8 32, i8* %39
br label %40
40: ; preds = %37, %35
%41 = extractelement <8 x i1> %25, i64 3
br i1 %41, label %42, label %45
42: ; preds = %40
%43 = or i64 %17, 3
%44 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %43
store i8 32, i8* %44
br label %45
45: ; preds = %42, %40
%46 = extractelement <8 x i1> %25, i64 4
br i1 %46, label %47, label %50
47: ; preds = %45
%48 = or i64 %17, 4
%49 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %48
store i8 32, i8* %49
br label %50
50: ; preds = %47, %45
%51 = extractelement <8 x i1> %25, i64 5
br i1 %51, label %52, label %55
52: ; preds = %50
%53 = or i64 %17, 5
%54 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %53
store i8 32, i8* %54
br label %55
55: ; preds = %52, %50
%56 = extractelement <8 x i1> %25, i64 6
br i1 %56, label %57, label %60
57: ; preds = %55
%58 = or i64 %17, 6
%59 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %58
store i8 32, i8* %59
br label %60
60: ; preds = %57, %55
%61 = extractelement <8 x i1> %25, i64 7
br i1 %61, label %62, label %65
62: ; preds = %60
%63 = or i64 %17, 7
%64 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %63
store i8 32, i8* %64
br label %65
65: ; preds = %62, %60
%66 = extractelement <8 x i1> %26, i64 0
br i1 %66, label %67, label %69
67: ; preds = %65
%68 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %18
store i8 32, i8* %68
br label %69
69: ; preds = %67, %65
%70 = extractelement <8 x i1> %26, i64 1
br i1 %70, label %71, label %74
71: ; preds = %69
%72 = or i64 %17, 9
%73 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %72
store i8 32, i8* %73
br label %74
74: ; preds = %71, %69
%75 = extractelement <8 x i1> %26, i64 2
br i1 %75, label %76, label %79
76: ; preds = %74
%77 = or i64 %17, 10
%78 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %77
store i8 32, i8* %78
br label %79
79: ; preds = %76, %74
%80 = extractelement <8 x i1> %26, i64 3
br i1 %80, label %81, label %84
81: ; preds = %79
%82 = or i64 %17, 11
%83 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %82
store i8 32, i8* %83
br label %84
84: ; preds = %81, %79
%85 = extractelement <8 x i1> %26, i64 4
br i1 %85, label %86, label %89
86: ; preds = %84
%87 = or i64 %17, 12
%88 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %87
store i8 32, i8* %88
br label %89
89: ; preds = %86, %84
%90 = extractelement <8 x i1> %26, i64 5
br i1 %90, label %91, label %94
91: ; preds = %89
%92 = or i64 %17, 13
%93 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %92
store i8 32, i8* %93
br label %94
94: ; preds = %91, %89
%95 = extractelement <8 x i1> %26, i64 6
br i1 %95, label %96, label %99
96: ; preds = %94
%97 = or i64 %17, 14
%98 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %97
store i8 32, i8* %98
br label %99
99: ; preds = %96, %94
%100 = extractelement <8 x i1> %26, i64 7
br i1 %100, label %101, label %104
101: ; preds = %99
%102 = or i64 %17, 15
%103 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %102
store i8 32, i8* %103
br label %104
104: ; preds = %101, %99
%105 = add nuw i64 %17, 16
%106 = icmp eq i64 %105, %15
br i1 %106, label %107, label %16
107: ; preds = %104
%108 = icmp eq i64 %15, %12
br i1 %108, label %120, label %109
109: ; preds = %8, %107
%110 = phi i64 [ 0, %8 ], [ %15, %107 ]
br label %111
111: ; preds = %109, %117
%112 = phi i64 [ %118, %117 ], [ %110, %109 ]
%113 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %112
%114 = load i8, i8* %113
%115 = icmp eq i8 %114, 0
br i1 %115, label %116, label %117
116: ; preds = %111
store i8 32, i8* %113
br label %117
117: ; preds = %111, %116
%118 = add nuw nsw i64 %112, 1
%119 = icmp eq i64 %118, %12
br i1 %119, label %120, label %111
120: ; preds = %117, %107
%121 = add nsw i32 %9, -1
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %122
%124 = load i8, i8* %123
%125 = icmp eq i8 %124, 10
%126 = select i1 %125, i32 %121, i32 %9
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %127
store i8 10, i8* %128
%129 = add nsw i32 %126, 1
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 %130
store i8 0, i8* %131
%132 = tail call i8* @strchr(i8* dereferenceable(1) getelementptr inbounds ([5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 0), i8 signext 10)
%133 = icmp eq i8* %132, null
br i1 %133, label %5, label %134
134: ; preds = %120, %134
%135 = phi i8* [ %139, %134 ], [ %132, %120 ]
%136 = phi i8* [ %138, %134 ], [ getelementptr inbounds ([5120 x i8], [5120 x i8]* @copy.linebuf, i64 0, i64 0), %120 ]
store i8 0, i8* %135
%137 = tail call i32 @logline(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %136)
%138 = getelementptr inbounds i8, i8* %135, i64 1
%139 = tail call i8* @strchr(i8* dereferenceable(1) %138, i8 signext 10)
%140 = icmp eq i8* %139, null
br i1 %140, label %5, label %134
141: ; preds = %5
%142 = icmp eq i32 %11, 0
br i1 %142, label %143, label %145
143: ; preds = %2, %141
%144 = tail call i32 @sleep(i32 1)
br label %145
145: ; preds = %143, %141
ret void
}