#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*/ line;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int getpid();
char *memchr(char *, char, int);
int /*<<< orphan*/ memmove(char *, char *, int);
int open(char *, int /*<<< orphan*/);
int read(int, char *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
scalar_t__ strchr(char *, char);
int /*<<< orphan*/ strlen(char *);
char *strtok(char *, char *);
int write(int, char *, int /*<<< orphan*/);
void dump_modules() {
  int fd, n, i, buf_start;
  char buf[1024], line[30];
  char *pos, *eof_line, *tokens[6];
  sprintf(buf, "/proc/%d/maps", getpid());
  fd = open(buf, O_RDONLY);
  if (fd == -1) {
    return;
  }
  buf_start = 0;
  while (1) {
    n = read(fd, buf + buf_start, sizeof(buf) - buf_start);
    if (n <= 0) {
      break;
    }
    pos = buf;
    while (1) {
      eof_line = memchr(pos, '\n', buf + sizeof(buf) - pos);
      if (eof_line == 0) {
        break;
      }
      *eof_line = '\0';
      for (i = 0; i < 6; i++) {
        tokens[i] = strtok(!i ? pos : 0, " ");
        if (!tokens[i]) {
          break;
        }
        if (i == 1) {
          if (strchr(tokens[i], 'x') == 0) {
            break;
          }
        }
      }
      if (i == 6) {
        snprintf(line, sizeof(line) - 1, "\n%s %s ", tokens[0], tokens[2]);
        if (write(2, line, strlen(line)) == -1 ||
            write(2, tokens[5], strlen(tokens[5])) == -1) {
          break;
        }
      }
      pos = eof_line + 1;
    }
    buf_start = 0;
    if (pos < (buf + sizeof(buf) - 1)) {
      buf_start = buf + sizeof(buf) - pos;
      memmove(buf, pos, buf_start);
    }
  }
  close(fd);
}


x86 assembly (clang, -O0):
<dump_modules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
lea    -0x410(%rbp),%rax
mov    %rax,-0x478(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x478(%rbp),%rdi
mov    %eax,%edx
lea    0xe10(%rip),%rsi
call   10e0 <sprintf@plt>
lea    -0x410(%rbp),%rdi
mov    0x2de5(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    121c <dump_modules+0x5c>
jmp    1495 <dump_modules+0x2d5>
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
movslq -0x10(%rbp),%rax
add    %rax,%rsi
movslq -0x10(%rbp),%rcx
mov    $0x400,%eax
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <read@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1259 <dump_modules+0x99>
jmp    148d <dump_modules+0x2cd>
lea    -0x410(%rbp),%rax
mov    %rax,-0x438(%rbp)
mov    -0x438(%rbp),%rdi
lea    -0x410(%rbp),%rax
add    $0x400,%rax
mov    -0x438(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
mov    $0xa,%esi
call   1090 <memchr@plt>
mov    %rax,-0x440(%rbp)
cmpq   $0x0,-0x440(%rbp)
jne    12ab <dump_modules+0xeb>
jmp    142f <dump_modules+0x26f>
mov    -0x440(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1372 <dump_modules+0x1b2>
cmpl   $0x0,-0xc(%rbp)
jne    12e3 <dump_modules+0x123>
mov    -0x438(%rbp),%rax
mov    %rax,-0x480(%rbp)
jmp    12f1 <dump_modules+0x131>
xor    %eax,%eax
mov    %rax,-0x480(%rbp)
jmp    12f1 <dump_modules+0x131>
mov    -0x480(%rbp),%rdi
lea    0xd15(%rip),%rsi
call   10d0 <strtok@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
mov    %rcx,-0x470(%rbp,%rax,8)
ff
movslq -0xc(%rbp),%rax
cmpq   $0x0,-0x470(%rbp,%rax,8)
jne    132b <dump_modules+0x16b>
jmp    1372 <dump_modules+0x1b2>
cmpl   $0x1,-0xc(%rbp)
jne    135f <dump_modules+0x19f>
movslq -0xc(%rbp),%rax
mov    -0x470(%rbp,%rax,8),%rdi
ff
mov    $0x78,%esi
call   1060 <strchr@plt>
cmp    $0x0,%rax
jne    135a <dump_modules+0x19a>
jmp    1372 <dump_modules+0x1b2>
jmp    135f <dump_modules+0x19f>
jmp    1364 <dump_modules+0x1a4>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12bc <dump_modules+0xfc>
cmpl   $0x6,-0xc(%rbp)
jne    1418 <dump_modules+0x258>
lea    -0x430(%rbp),%rdi
mov    -0x470(%rbp),%rcx
mov    -0x460(%rbp),%r8
mov    $0x1d,%esi
lea    0xc71(%rip),%rdx
call   1070 <snprintf@plt>
lea    -0x430(%rbp),%rax
mov    %rax,-0x488(%rbp)
lea    -0x430(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x488(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     140e <dump_modules+0x24e>
mov    -0x448(%rbp),%rax
mov    %rax,-0x490(%rbp)
mov    -0x448(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x490(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    1413 <dump_modules+0x253>
jmp    142f <dump_modules+0x26f>
jmp    1418 <dump_modules+0x258>
mov    -0x440(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x438(%rbp)
jmp    1267 <dump_modules+0xa7>
movl   $0x0,-0x10(%rbp)
mov    -0x438(%rbp),%rax
lea    -0x410(%rbp),%rcx
add    $0x400,%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jae    1488 <dump_modules+0x2c8>
lea    -0x410(%rbp),%rax
add    $0x400,%rax
mov    -0x438(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x438(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   10b0 <memmove@plt>
jmp    1223 <dump_modules+0x63>
mov    -0x4(%rbp),%edi
call   1080 <close@plt>
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_modules>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x438,%rsp
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xe21(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %eax,%edx
call   10e0 <sprintf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10c0 <open@plt>
cmp    $0xffffffff,%eax
je     13ea <dump_modules+0x22a>
mov    %eax,%r14d
lea    0x30(%rsp),%r15
mov    %eax,%edi
mov    %r15,%rsi
mov    $0x400,%edx
call   10a0 <read@plt>
test   %eax,%eax
jle    13e2 <dump_modules+0x222>
lea    0xde6(%rip),%rbp
mov    %r14d,0x4(%rsp)
jmp    1277 <dump_modules+0xb7>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x400,%ebx
mov    %r15,%r13
mov    %r15,%rdi
mov    %r13,%rsi
mov    %ebx,%edx
call   10b0 <memmove@plt>
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x30,%rsi
mov    $0x400,%edx
sub    %eax,%edx
mov    %r14d,%edi
call   10a0 <read@plt>
test   %eax,%eax
jle    13e2 <dump_modules+0x222>
mov    %r15,%rdi
mov    $0xa,%esi
mov    $0x400,%edx
call   1090 <memchr@plt>
test   %rax,%rax
je     1240 <dump_modules+0x80>
mov    %rax,%r12
mov    $0x400,%ebx
mov    %r15,%r13
jmp    12cd <dump_modules+0x10d>
nopl   0x0(%rax,%rax,1)
mov    %r12,%r13
add    $0x1,%r13
lea    0x430(%rsp),%rbx
sub    %r13,%rbx
mov    %r13,%rdi
mov    $0xa,%esi
mov    %ebx,%edx
call   1090 <memchr@plt>
mov    %rax,%r12
test   %rax,%rax
je     13c0 <dump_modules+0x200>
movb   $0x0,(%r12)
mov    %r13,%rdi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
mov    %rax,%r14
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
mov    %rax,%rdi
mov    $0x78,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
mov    %rax,%r15
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
xor    %edi,%edi
mov    %rbp,%rsi
call   10d0 <strtok@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     12a0 <dump_modules+0xe0>
lea    0x10(%rsp),%rdi
mov    $0x1d,%esi
lea    0xca7(%rip),%rdx
mov    %r14,%rcx
mov    %r15,%r8
call   1070 <snprintf@plt>
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    $0x2,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     13c0 <dump_modules+0x200>
mov    0x8(%rsp),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    $0x2,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    12a0 <dump_modules+0xe0>
nopl   0x0(%rax,%rax,1)
lea    0x42f(%rsp),%rax
cmp    %rax,%r13
mov    0x4(%rsp),%r14d
lea    0x30(%rsp),%r15
jb     1248 <dump_modules+0x88>
xor    %ebx,%ebx
jmp    1255 <dump_modules+0x95>
mov    %r14d,%edi
call   1080 <close@plt>
add    $0x438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/%d/maps\00"
@O_RDONLY = global i32 0
@.str.1 = [2 x i8] c" \00"
@.str.2 = [8 x i8] c"\0A%s %s \00"
define void @dump_modules() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1024 x i8]
%6 = alloca [30 x i8]
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [6 x i8*]
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i32 (...) @getpid()
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%14 = load i32, i32* @O_RDONLY
%15 = call i32 @open(i8* %13, i32 %14)
store i32 %15, i32* %1
%16 = load i32, i32* %1
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %19
18: ; preds = %0
br label %138
19: ; preds = %0
store i32 0, i32* %4
br label %20
20: ; preds = %19, %134
%21 = load i32, i32* %1
%22 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = sub i64 1024, %27
%29 = trunc i64 %28 to i32
%30 = call i32 @read(i32 %21, i8* %25, i32 %29)
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = icmp sle i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %20
br label %135
34: ; preds = %20
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
store i8* %35, i8** %7
br label %36
36: ; preds = %34, %113
%37 = load i8*, i8** %7
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%39 = getelementptr inbounds i8, i8* %38, i64 1024
%40 = load i8*, i8** %7
%41 = ptrtoint i8* %39 to i64
%42 = ptrtoint i8* %40 to i64
%43 = sub i64 %41, %42
%44 = trunc i64 %43 to i32
%45 = call i8* @memchr(i8* %37, i8 signext 10, i32 %44)
store i8* %45, i8** %8
%46 = load i8*, i8** %8
%47 = icmp eq i8* %46, null
br i1 %47, label %48, label %49
48: ; preds = %36
br label %116
49: ; preds = %36
%50 = load i8*, i8** %8
store i8 0, i8* %50
store i32 0, i32* %3
br label %51
51: ; preds = %85, %49
%52 = load i32, i32* %3
%53 = icmp slt i32 %52, 6
br i1 %53, label %54, label %88
54: ; preds = %51
%55 = load i32, i32* %3
%56 = icmp ne i32 %55, 0
br i1 %56, label %59, label %57
57: ; preds = %54
%58 = load i8*, i8** %7
br label %60
59: ; preds = %54
br label %60
60: ; preds = %59, %57
%61 = phi i8* [ %58, %57 ], [ null, %59 ]
%62 = call i8* @strtok(i8* %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%63 = load i32, i32* %3
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %64
store i8* %62, i8** %65
%66 = load i32, i32* %3
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %67
%69 = load i8*, i8** %68
%70 = icmp ne i8* %69, null
br i1 %70, label %72, label %71
71: ; preds = %60
br label %88
72: ; preds = %60
%73 = load i32, i32* %3
%74 = icmp eq i32 %73, 1
br i1 %74, label %75, label %84
75: ; preds = %72
%76 = load i32, i32* %3
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 %77
%79 = load i8*, i8** %78
%80 = call i64 @strchr(i8* %79, i8 signext 120)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %83
82: ; preds = %75
br label %88
83: ; preds = %75
br label %84
84: ; preds = %83, %72
br label %85
85: ; preds = %84
%86 = load i32, i32* %3
%87 = add nsw i32 %86, 1
store i32 %87, i32* %3
br label %51
88: ; preds = %82, %71, %51
%89 = load i32, i32* %3
%90 = icmp eq i32 %89, 6
br i1 %90, label %91, label %113
91: ; preds = %88
%92 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%93 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 0
%94 = load i8*, i8** %93
%95 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 2
%96 = load i8*, i8** %95
%97 = call i32 @snprintf(i8* %92, i32 29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %94, i8* %96)
%98 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%99 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%100 = call i32 @strlen(i8* %99)
%101 = call i32 @write(i32 2, i8* %98, i32 %100)
%102 = icmp eq i32 %101, -1
br i1 %102, label %111, label %103
103: ; preds = %91
%104 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 5
%105 = load i8*, i8** %104
%106 = getelementptr inbounds [6 x i8*], [6 x i8*]* %9, i64 0, i64 5
%107 = load i8*, i8** %106
%108 = call i32 @strlen(i8* %107)
%109 = call i32 @write(i32 2, i8* %105, i32 %108)
%110 = icmp eq i32 %109, -1
br i1 %110, label %111, label %112
111: ; preds = %103, %91
br label %116
112: ; preds = %103
br label %113
113: ; preds = %112, %88
%114 = load i8*, i8** %8
%115 = getelementptr inbounds i8, i8* %114, i64 1
store i8* %115, i8** %7
br label %36
116: ; preds = %111, %48
store i32 0, i32* %4
%117 = load i8*, i8** %7
%118 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%119 = getelementptr inbounds i8, i8* %118, i64 1024
%120 = getelementptr inbounds i8, i8* %119, i64 -1
%121 = icmp ult i8* %117, %120
br i1 %121, label %122, label %134
122: ; preds = %116
%123 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%124 = getelementptr inbounds i8, i8* %123, i64 1024
%125 = load i8*, i8** %7
%126 = ptrtoint i8* %124 to i64
%127 = ptrtoint i8* %125 to i64
%128 = sub i64 %126, %127
%129 = trunc i64 %128 to i32
store i32 %129, i32* %4
%130 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%131 = load i8*, i8** %7
%132 = load i32, i32* %4
%133 = call i32 @memmove(i8* %130, i8* %131, i32 %132)
br label %134
134: ; preds = %122, %116
br label %20
135: ; preds = %33
%136 = load i32, i32* %1
%137 = call i32 @close(i32 %136)
br label %138
138: ; preds = %135, %18
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/%d/maps\00"
@O_RDONLY = global i32 0
@.str.1 = [2 x i8] c" \00"
@.str.2 = [8 x i8] c"\0A%s %s \00"
define void @dump_modules() {
%1 = alloca [1024 x i8]
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (...) @getpid()
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @O_RDONLY
%8 = call i32 @open(i8* %3, i32 %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %80, label %10
10: ; preds = %0
%11 = call i32 @read(i32 %8, i8* %3, i32 1024)
%12 = icmp slt i32 %11, 1
br i1 %12, label %78, label %13
13: ; preds = %10
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 1024
%15 = ptrtoint i8* %14 to i64
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 1023
br label %17
17: ; preds = %13, %69
%18 = call i8* @memchr(i8* %3, i8 signext 10, i32 1024)
%19 = icmp eq i8* %18, null
br i1 %19, label %64, label %20
20: ; preds = %17, %53
%21 = phi i8* [ %58, %53 ], [ %18, %17 ]
%22 = phi i64 [ %56, %53 ], [ 1024, %17 ]
%23 = phi i8* [ %54, %53 ], [ %3, %17 ]
store i8 0, i8* %21
%24 = call i8* @strtok(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i8* %24, null
br i1 %25, label %53, label %26
26: ; preds = %20
%27 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%28 = icmp eq i8* %27, null
br i1 %28, label %53, label %29
29: ; preds = %26
%30 = call i64 @strchr(i8* %27, i8 signext 120)
%31 = icmp eq i64 %30, 0
br i1 %31, label %53, label %32
32: ; preds = %29
%33 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%34 = icmp eq i8* %33, null
br i1 %34, label %53, label %35
35: ; preds = %32
%36 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i8* %36, null
br i1 %37, label %53, label %38
38: ; preds = %35
%39 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp eq i8* %39, null
br i1 %40, label %53, label %41
41: ; preds = %38
%42 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%43 = icmp eq i8* %42, null
br i1 %43, label %53, label %44
44: ; preds = %41
%45 = call i32 @snprintf(i8* %4, i32 29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %24, i8* %33)
%46 = call i32 @strlen(i8* %4)
%47 = call i32 @write(i32 2, i8* %4, i32 %46)
%48 = icmp eq i32 %47, -1
br i1 %48, label %60, label %49
49: ; preds = %44
%50 = call i32 @strlen(i8* %42)
%51 = call i32 @write(i32 2, i8* %42, i32 %50)
%52 = icmp eq i32 %51, -1
br i1 %52, label %60, label %53
53: ; preds = %20, %26, %29, %32, %35, %38, %41, %49
%54 = getelementptr inbounds i8, i8* %21, i64 1
%55 = ptrtoint i8* %54 to i64
%56 = sub i64 %15, %55
%57 = trunc i64 %56 to i32
%58 = call i8* @memchr(i8* %54, i8 signext 10, i32 %57)
%59 = icmp eq i8* %58, null
br i1 %59, label %60, label %20
60: ; preds = %53, %49, %44
%61 = phi i64 [ %56, %53 ], [ %22, %49 ], [ %22, %44 ]
%62 = phi i8* [ %54, %53 ], [ %23, %49 ], [ %23, %44 ]
%63 = icmp ult i8* %62, %16
br i1 %63, label %64, label %69
64: ; preds = %17, %60
%65 = phi i8* [ %62, %60 ], [ %3, %17 ]
%66 = phi i64 [ %61, %60 ], [ 1024, %17 ]
%67 = trunc i64 %66 to i32
%68 = call i32 @memmove(i8* %3, i8* %65, i32 %67)
br label %69
69: ; preds = %60, %64
%70 = phi i64 [ %66, %64 ], [ 0, %60 ]
%71 = shl i64 %70, 32
%72 = ashr exact i64 %71, 32
%73 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 %72
%74 = trunc i64 %70 to i32
%75 = sub i32 1024, %74
%76 = call i32 @read(i32 %8, i8* %73, i32 %75)
%77 = icmp slt i32 %76, 1
br i1 %77, label %78, label %17
78: ; preds = %69, %10
%79 = call i32 @close(i32 %8)
br label %80
80: ; preds = %0, %78
ret void
}