#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*/ fprintf(int /*<<< orphan*/, char *, ...);
void *sbrk(int);
int /*<<< orphan*/ stderr;
int main(void) {
  void *brk;
  uintptr_t brk_addr;
  int *aligned;
  size_t ix;
  int status;
  fprintf(stderr, "sbrk test\n");
  brk = sbrk(0);
  brk_addr = (uintptr_t)brk;
  fprintf(stderr, "break at 0x%04x\n", brk_addr);
  if (0 != (brk_addr & 0x3)) {
    intptr_t incr = (sizeof aligned) - (brk_addr & ((sizeof aligned) - 1));
    fprintf(stderr, "break not word aligned, asking for %d more bytes\n",
            (int)incr);
    brk = sbrk(incr);
    if (NULL == brk) {
      fprintf(stderr, "sbrk for alignment failed\n");
      return 1;
    }
  }
  brk = sbrk(512 * sizeof *aligned);
  brk_addr = (uintptr_t)brk;
  fprintf(stderr, "allocated memory at 0x%04x\n", brk_addr);
  aligned = (int *)brk;
  for (ix = 0; ix < 512; ++ix) {
    aligned[ix] = 0xdeadbeef;
  }
  if ((void *)-1 == sbrk(-512 * (intptr_t)sizeof *aligned)) {
    fprintf(stderr, "freeing memory failed\n");
    return 2;
  }
  brk = sbrk(512 * sizeof *aligned);
  brk_addr = (uintptr_t)brk;
  fprintf(stderr, "break at 0x%04x\n", brk_addr);
  aligned = (int *)brk;
  status = 0;
  for (ix = 0; ix < 512; ++ix) {
    if (0 != aligned[ix]) {
      fprintf(stderr, "new memory word at %zd contains 0x%04x\n", ix,
              aligned[ix]);
      status = 3;
    }
  }
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <sbrk@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rcx
and    $0x3,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     11fb <main+0xdb>
mov    -0x18(%rbp),%rcx
and    $0x7,%rcx
mov    $0x8,%eax
sub    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rax
mov    %eax,%edx
lea    0xe6b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x38(%rbp),%rax
mov    %eax,%edi
call   1030 <sbrk@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    11f6 <main+0xd6>
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
lea    0xe6b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    135c <main+0x23c>
jmp    11fb <main+0xdb>
mov    $0x800,%edi
call   1030 <sbrk@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe44(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x200,-0x28(%rbp)
jae    126a <main+0x14a>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movl   $0xdeadbeef,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    123c <main+0x11c>
mov    $0xfffff800,%edi
call   1030 <sbrk@plt>
mov    %rax,%rcx
mov    $0xffffffffffffffff,%rax
cmp    %rcx,%rax
jne    12aa <main+0x18a>
mov    0x2d52(%rip),%rax
mov    (%rax),%edi
lea    0xdee(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    135c <main+0x23c>
mov    $0x800,%edi
call   1030 <sbrk@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xd37(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x2c(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x200,-0x28(%rbp)
jae    1356 <main+0x236>
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
xor    %eax,%eax
cmp    (%rcx,%rdx,4),%eax
je     1340 <main+0x220>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x3,-0x2c(%rbp)
jmp    1345 <main+0x225>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    12f2 <main+0x1d2>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    0x2eb1(%rip),%r12
mov    (%r12),%edi
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <sbrk@plt>
mov    %rax,%rbx
mov    (%r12),%edi
lea    0xec5(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
test   $0x3,%bl
je     1193 <main+0x73>
mov    (%r12),%edi
and    $0x7,%ebx
mov    $0x8,%ebp
sub    %ebx,%ebp
lea    0xeb2(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %ebp,%edi
call   1030 <sbrk@plt>
test   %rax,%rax
je     12bc <main+0x19c>
mov    $0x800,%edi
call   1030 <sbrk@plt>
mov    %rax,%rbx
mov    (%r12),%edi
lea    0xece(%rip),%rsi
xor    %ebp,%ebp
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
movaps 0xe42(%rip),%xmm0
xchg   %ax,%ax
movups %xmm0,(%rbx,%rbp,4)
movups %xmm0,0x10(%rbx,%rbp,4)
movups %xmm0,0x20(%rbx,%rbp,4)
movups %xmm0,0x30(%rbx,%rbp,4)
movups %xmm0,0x40(%rbx,%rbp,4)
movups %xmm0,0x50(%rbx,%rbp,4)
movups %xmm0,0x60(%rbx,%rbp,4)
movups %xmm0,0x70(%rbx,%rbp,4)
movups %xmm0,0x80(%rbx,%rbp,4)
movups %xmm0,0x90(%rbx,%rbp,4)
movups %xmm0,0xa0(%rbx,%rbp,4)
movups %xmm0,0xb0(%rbx,%rbp,4)
movups %xmm0,0xc0(%rbx,%rbp,4)
movups %xmm0,0xd0(%rbx,%rbp,4)
movups %xmm0,0xe0(%rbx,%rbp,4)
movups %xmm0,0xf0(%rbx,%rbp,4)
add    $0x40,%rbp
cmp    $0x200,%rbp
jne    11c0 <main+0xa0>
mov    $0xfffff800,%edi
call   1030 <sbrk@plt>
cmp    $0xffffffffffffffff,%rax
je     12ad <main+0x18d>
mov    $0x800,%edi
call   1030 <sbrk@plt>
mov    %rax,%rbx
mov    (%r12),%edi
lea    0xdbf(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xe3f(%rip),%r14
xor    %r15d,%r15d
xor    %ebp,%ebp
jmp    128d <main+0x16d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbp
cmp    $0x200,%rbp
je     12d4 <main+0x1b4>
mov    (%rbx,%rbp,4),%ecx
test   %ecx,%ecx
je     1280 <main+0x160>
mov    (%r12),%edi
mov    %r14,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x3,%r15d
jmp    1280 <main+0x160>
mov    $0x2,%r15d
lea    0xddb(%rip),%rsi
jmp    12c9 <main+0x1a9>
mov    $0x1,%r15d
lea    0xd95(%rip),%rsi
mov    (%r12),%edi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %r15d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"sbrk test\0A\00"
@.str.1 = [17 x i8] c"break at 0x%04x\0A\00"
@.str.2 = [50 x i8] c"break not word aligned, asking for %d more bytes\0A\00"
@.str.3 = [27 x i8] c"sbrk for alignment failed\0A\00"
@.str.4 = [28 x i8] c"allocated memory at 0x%04x\0A\00"
@.str.5 = [23 x i8] c"freeing memory failed\0A\00"
@.str.6 = [40 x i8] c"new memory word at %zd contains 0x%04x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
store i32 0, i32* %1
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = call i8* @sbrk(i32 0)
store i8* %10, i8** %2
%11 = load i8*, i8** %2
%12 = ptrtoint i8* %11 to i64
store i64 %12, i64* %3
%13 = load i32, i32* @stderr
%14 = load i64, i64* %3
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %14)
%16 = load i64, i64* %3
%17 = and i64 %16, 3
%18 = icmp ne i64 0, %17
br i1 %18, label %19, label %36
19: ; preds = %0
%20 = load i64, i64* %3
%21 = and i64 %20, 7
%22 = sub i64 8, %21
store i64 %22, i64* %7
%23 = load i32, i32* @stderr
%24 = load i64, i64* %7
%25 = trunc i64 %24 to i32
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = load i64, i64* %7
%28 = trunc i64 %27 to i32
%29 = call i8* @sbrk(i32 %28)
store i8* %29, i8** %2
%30 = load i8*, i8** %2
%31 = icmp eq i8* null, %30
br i1 %31, label %32, label %35
32: ; preds = %19
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %93
35: ; preds = %19
br label %36
36: ; preds = %35, %0
%37 = call i8* @sbrk(i32 2048)
store i8* %37, i8** %2
%38 = load i8*, i8** %2
%39 = ptrtoint i8* %38 to i64
store i64 %39, i64* %3
%40 = load i32, i32* @stderr
%41 = load i64, i64* %3
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i64 %41)
%43 = load i8*, i8** %2
%44 = bitcast i8* %43 to i32*
store i32* %44, i32** %4
store i64 0, i64* %5
br label %45
45: ; preds = %52, %36
%46 = load i64, i64* %5
%47 = icmp ult i64 %46, 512
br i1 %47, label %48, label %55
48: ; preds = %45
%49 = load i32*, i32** %4
%50 = load i64, i64* %5
%51 = getelementptr inbounds i32, i32* %49, i64 %50
store i32 -559038737, i32* %51
br label %52
52: ; preds = %48
%53 = load i64, i64* %5
%54 = add i64 %53, 1
store i64 %54, i64* %5
br label %45
55: ; preds = %45
%56 = call i8* @sbrk(i32 -2048)
%57 = icmp eq i8* inttoptr (i64 -1 to i8*), %56
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load i32, i32* @stderr
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
store i32 2, i32* %1
br label %93
61: ; preds = %55
%62 = call i8* @sbrk(i32 2048)
store i8* %62, i8** %2
%63 = load i8*, i8** %2
%64 = ptrtoint i8* %63 to i64
store i64 %64, i64* %3
%65 = load i32, i32* @stderr
%66 = load i64, i64* %3
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %66)
%68 = load i8*, i8** %2
%69 = bitcast i8* %68 to i32*
store i32* %69, i32** %4
store i32 0, i32* %6
store i64 0, i64* %5
br label %70
70: ; preds = %88, %61
%71 = load i64, i64* %5
%72 = icmp ult i64 %71, 512
br i1 %72, label %73, label %91
73: ; preds = %70
%74 = load i32*, i32** %4
%75 = load i64, i64* %5
%76 = getelementptr inbounds i32, i32* %74, i64 %75
%77 = load i32, i32* %76
%78 = icmp ne i32 0, %77
br i1 %78, label %79, label %87
79: ; preds = %73
%80 = load i32, i32* @stderr
%81 = load i64, i64* %5
%82 = load i32*, i32** %4
%83 = load i64, i64* %5
%84 = getelementptr inbounds i32, i32* %82, i64 %83
%85 = load i32, i32* %84
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i64 %81, i32 %85)
store i32 3, i32* %6
br label %87
87: ; preds = %79, %73
br label %88
88: ; preds = %87
%89 = load i64, i64* %5
%90 = add i64 %89, 1
store i64 %90, i64* %5
br label %70
91: ; preds = %70
%92 = load i32, i32* %6
store i32 %92, i32* %1
br label %93
93: ; preds = %91, %58, %32
%94 = load i32, i32* %1
ret i32 %94
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"sbrk test\0A\00"
@.str.1 = [17 x i8] c"break at 0x%04x\0A\00"
@.str.2 = [50 x i8] c"break not word aligned, asking for %d more bytes\0A\00"
@.str.3 = [27 x i8] c"sbrk for alignment failed\0A\00"
@.str.4 = [28 x i8] c"allocated memory at 0x%04x\0A\00"
@.str.5 = [23 x i8] c"freeing memory failed\0A\00"
@.str.6 = [40 x i8] c"new memory word at %zd contains 0x%04x\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @sbrk(i32 0)
%4 = ptrtoint i8* %3 to i64
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %4)
%7 = and i64 %4, 3
%8 = icmp eq i64 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %0
%10 = load i32, i32* @stderr
%11 = trunc i64 %4 to i32
%12 = and i32 %11, 7
%13 = sub nuw nsw i32 8, %12
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = tail call i8* @sbrk(i32 %13)
%16 = icmp eq i8* %15, null
br i1 %16, label %88, label %17
17: ; preds = %9, %0
%18 = tail call i8* @sbrk(i32 2048)
%19 = ptrtoint i8* %18 to i64
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i64 %19)
%22 = bitcast i8* %18 to i32*
br label %23
23: ; preds = %23, %17
%24 = phi i64 [ 0, %17 ], [ %64, %23 ]
%25 = getelementptr inbounds i32, i32* %22, i64 %24
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %26
%27 = getelementptr inbounds i32, i32* %25, i64 4
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %28
%29 = or i64 %24, 8
%30 = getelementptr inbounds i32, i32* %22, i64 %29
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %31
%32 = getelementptr inbounds i32, i32* %30, i64 4
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %33
%34 = or i64 %24, 16
%35 = getelementptr inbounds i32, i32* %22, i64 %34
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %36
%37 = getelementptr inbounds i32, i32* %35, i64 4
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %38
%39 = or i64 %24, 24
%40 = getelementptr inbounds i32, i32* %22, i64 %39
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %41
%42 = getelementptr inbounds i32, i32* %40, i64 4
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %43
%44 = or i64 %24, 32
%45 = getelementptr inbounds i32, i32* %22, i64 %44
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %46
%47 = getelementptr inbounds i32, i32* %45, i64 4
%48 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %48
%49 = or i64 %24, 40
%50 = getelementptr inbounds i32, i32* %22, i64 %49
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %51
%52 = getelementptr inbounds i32, i32* %50, i64 4
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %53
%54 = or i64 %24, 48
%55 = getelementptr inbounds i32, i32* %22, i64 %54
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %56
%57 = getelementptr inbounds i32, i32* %55, i64 4
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %58
%59 = or i64 %24, 56
%60 = getelementptr inbounds i32, i32* %22, i64 %59
%61 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %61
%62 = getelementptr inbounds i32, i32* %60, i64 4
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> <i32 -559038737, i32 -559038737, i32 -559038737, i32 -559038737>, <4 x i32>* %63
%64 = add nuw nsw i64 %24, 64
%65 = icmp eq i64 %64, 512
br i1 %65, label %66, label %23
66: ; preds = %23
%67 = tail call i8* @sbrk(i32 -2048)
%68 = icmp eq i8* %67, inttoptr (i64 -1 to i8*)
br i1 %68, label %88, label %69
69: ; preds = %66
%70 = tail call i8* @sbrk(i32 2048)
%71 = ptrtoint i8* %70 to i64
%72 = load i32, i32* @stderr
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %71)
%74 = bitcast i8* %70 to i32*
br label %75
75: ; preds = %69, %84
%76 = phi i32 [ 0, %69 ], [ %85, %84 ]
%77 = phi i64 [ 0, %69 ], [ %86, %84 ]
%78 = getelementptr inbounds i32, i32* %74, i64 %77
%79 = load i32, i32* %78
%80 = icmp eq i32 %79, 0
br i1 %80, label %84, label %81
81: ; preds = %75
%82 = load i32, i32* @stderr
%83 = tail call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i64 %77, i32 %79)
br label %84
84: ; preds = %75, %81
%85 = phi i32 [ 3, %81 ], [ %76, %75 ]
%86 = add nuw nsw i64 %77, 1
%87 = icmp eq i64 %86, 512
br i1 %87, label %93, label %75
88: ; preds = %66, %9
%89 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), %9 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), %66 ]
%90 = phi i32 [ 1, %9 ], [ 2, %66 ]
%91 = load i32, i32* @stderr
%92 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* %89)
br label %93
93: ; preds = %84, %88
%94 = phi i32 [ %90, %88 ], [ %85, %84 ]
ret i32 %94
}