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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(int *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
void *htob(int *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(int *);
int toupper(int);
int srec_read(char *filename, char *image) {
  int remaining, len;
  uint8_t srec[78];
  uint8_t *p;
  uint8_t rec_len, data_len;
  uint16_t addr;
  int *ptr;
  int i;
  FILE *file = fopen(filename, "r");
  len = 0;
  if (file == NULL) {
    printf("ERROR--> Could not open file: '%s'\n", filename);
    return -1;
  }
  fseek(file, 0, SEEK_END);
  remaining = ftell(file);
  fseek(file, 0, SEEK_SET);
  ptr = (int *)image;
  for (i = 0; i < 131072; i += 4)
    *ptr++ = 0xffffffff;
  while (remaining > 0) {
    fgets(srec, 78, file);
    rec_len = strlen(srec);
    remaining -= rec_len;
    for (i = 0; i < rec_len; i++)
      srec[i] = toupper(srec[i]);
    if (srec[0] != 'S') {
      printf("Invalid S-Record format!\n");
      fclose(file);
      return -1;
    }
    if (srec[1] == '1') {
      data_len = htob(srec + 2);
      data_len -= 3;
      len += data_len;
      data_len *= 2;
      addr = (uint16_t)htob(srec + 4) << 8;
      addr |= (uint16_t)htob(srec + 6);
      p = srec + 8;
      for (i = 0; i < data_len; i += 2)
        image[addr++] = htob(p + i);
    }
  }
  return len;
}


x86 assembly (clang, -O0):
<srec_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe52(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x190(%rbp)
movl   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x190(%rbp)
jne    11ed <srec_read+0x5d>
mov    -0x10(%rbp),%rsi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1456 <srec_read+0x2c6>
mov    -0x190(%rbp),%rdi
mov    0x2ded(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0x190(%rbp),%rdi
call   1090 <ftell@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x190(%rbp),%rdi
mov    0x2db7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x180(%rbp)
movl   $0x0,-0x184(%rbp)
cmpl   $0x20000,-0x184(%rbp)
jge    127e <srec_read+0xee>
mov    -0x180(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x180(%rbp)
movl   $0xffffffff,(%rax)
mov    -0x184(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x184(%rbp)
jmp    123f <srec_read+0xaf>
jmp    1283 <srec_read+0xf3>
cmpl   $0x0,-0x1c(%rbp)
jle    1450 <srec_read+0x2c0>
lea    -0x160(%rbp),%rdi
mov    -0x190(%rbp),%rdx
mov    $0x4e,%esi
call   1080 <fgets@plt>
lea    -0x160(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x16c(%rbp)
mov    -0x16c(%rbp),%ecx
mov    -0x1c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x184(%rbp)
mov    -0x184(%rbp),%eax
cmp    -0x16c(%rbp),%eax
jge    1318 <srec_read+0x188>
movslq -0x184(%rbp),%rax
mov    -0x160(%rbp,%rax,4),%edi
call   1030 <toupper@plt>
mov    %eax,%ecx
movslq -0x184(%rbp),%rax
mov    %ecx,-0x160(%rbp,%rax,4)
mov    -0x184(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x184(%rbp)
jmp    12cf <srec_read+0x13f>
cmpl   $0x53,-0x160(%rbp)
je     134b <srec_read+0x1bb>
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x190(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1456 <srec_read+0x2c6>
cmpl   $0x31,-0x15c(%rbp)
jne    144b <srec_read+0x2bb>
lea    -0x160(%rbp),%rdi
add    $0x8,%rdi
call   1040 <htob@plt>
mov    %eax,-0x170(%rbp)
mov    -0x170(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x170(%rbp)
mov    -0x170(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x170(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x170(%rbp)
lea    -0x160(%rbp),%rdi
add    $0x10,%rdi
call   1040 <htob@plt>
shl    $0x8,%eax
mov    %eax,-0x174(%rbp)
lea    -0x160(%rbp),%rdi
add    $0x18,%rdi
call   1040 <htob@plt>
or     -0x174(%rbp),%eax
mov    %eax,-0x174(%rbp)
lea    -0x160(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x168(%rbp)
movl   $0x0,-0x184(%rbp)
mov    -0x184(%rbp),%eax
cmp    -0x170(%rbp),%eax
jge    1446 <srec_read+0x2b6>
mov    -0x168(%rbp),%rdi
movslq -0x184(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <htob@plt>
mov    %al,%dl
mov    -0x18(%rbp),%rax
mov    -0x174(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x174(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x184(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x184(%rbp)
jmp    13e9 <srec_read+0x259>
jmp    144b <srec_read+0x2bb>
jmp    1283 <srec_read+0xf3>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srec_read>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
mov    %rsi,%rbp
mov    %rdi,%rbx
lea    0xe32(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1341 <srec_read+0x191>
mov    %rax,%r14
mov    0x2e02(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %r14,%rdi
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    %r14,%rdi
call   10b0 <ftell@plt>
mov    %eax,%r13d
mov    0x2dcd(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    $0x20000,%edx
mov    %rbp,0x18(%rsp)
mov    %rbp,%rdi
mov    $0xff,%esi
call   1090 <memset@plt>
test   %r13d,%r13d
jle    1372 <srec_read+0x1c2>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0x20(%rsp),%r12
mov    %r14,0x10(%rsp)
jmp    1261 <srec_read+0xb1>
nopw   0x0(%rax,%rax,1)
mov    %r14,%r12
mov    0x10(%rsp),%r14
test   %r13d,%r13d
jle    1372 <srec_read+0x1c2>
mov    %r12,%rdi
mov    $0x4e,%esi
mov    %r14,%rdx
call   10a0 <fgets@plt>
mov    %r12,%rdi
call   1070 <strlen@plt>
mov    %eax,%r15d
test   %eax,%eax
jle    12a6 <srec_read+0xf6>
mov    %r15d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x20(%rsp,%rbx,4),%edi
call   1030 <toupper@plt>
mov    %eax,0x20(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1290 <srec_read+0xe0>
cmpl   $0x53,0x20(%rsp)
jne    1354 <srec_read+0x1a4>
sub    %r15d,%r13d
cmpl   $0x31,0x24(%rsp)
jne    1258 <srec_read+0xa8>
mov    %r12,%r14
lea    0x28(%rsp),%rdi
call   1050 <htob@plt>
mov    %rax,%r12
mov    0x8(%rsp),%rax
add    %r12d,%eax
add    $0xfffffffd,%eax
mov    %rax,0x8(%rsp)
lea    0x30(%rsp),%rdi
call   1050 <htob@plt>
mov    %rax,%rbx
lea    0x38(%rsp),%rdi
call   1050 <htob@plt>
cmp    $0x4,%r12d
jl     1250 <srec_read+0xa0>
add    $0xfffffffd,%r12d
shl    $0x8,%ebx
or     %ebx,%eax
add    %r12d,%r12d
movslq %r12d,%r12
movslq %eax,%rbp
add    0x18(%rsp),%rbp
lea    0x40(%rsp),%rbx
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1050 <htob@plt>
mov    %al,0x0(%rbp)
add    $0x2,%r15
add    $0x1,%rbp
add    $0x8,%rbx
cmp    %r12,%r15
jl     1320 <srec_read+0x170>
jmp    1250 <srec_read+0xa0>
lea    0xcba(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    1368 <srec_read+0x1b8>
lea    0xccb(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    $0xffffffff,%eax
mov    %rax,0x8(%rsp)
mov    0x8(%rsp),%rax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [36 x i8] c"ERROR--> Could not open file: '%s'\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [26 x i8] c"Invalid S-Record format!\0A\00"
define i32 @srec_read(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca [78 x i32]
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
%16 = load i8*, i8** %4
%17 = call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %17, i32** %15
store i32 0, i32* %7
%18 = load i32*, i32** %15
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %23
20: ; preds = %2
%21 = load i8*, i8** %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %21)
store i32 -1, i32* %3
br label %132
23: ; preds = %2
%24 = load i32*, i32** %15
%25 = load i32, i32* @SEEK_END
%26 = call i32 @fseek(i32* %24, i32 0, i32 %25)
%27 = load i32*, i32** %15
%28 = call i32 @ftell(i32* %27)
store i32 %28, i32* %6
%29 = load i32*, i32** %15
%30 = load i32, i32* @SEEK_SET
%31 = call i32 @fseek(i32* %29, i32 0, i32 %30)
%32 = load i8*, i8** %5
%33 = bitcast i8* %32 to i32*
store i32* %33, i32** %13
store i32 0, i32* %14
br label %34
34: ; preds = %40, %23
%35 = load i32, i32* %14
%36 = icmp slt i32 %35, 131072
br i1 %36, label %37, label %43
37: ; preds = %34
%38 = load i32*, i32** %13
%39 = getelementptr inbounds i32, i32* %38, i32 1
store i32* %39, i32** %13
store i32 -1, i32* %38
br label %40
40: ; preds = %37
%41 = load i32, i32* %14
%42 = add nsw i32 %41, 4
store i32 %42, i32* %14
br label %34
43: ; preds = %34
br label %44
44: ; preds = %129, %43
%45 = load i32, i32* %6
%46 = icmp sgt i32 %45, 0
br i1 %46, label %47, label %130
47: ; preds = %44
%48 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%49 = load i32*, i32** %15
%50 = call i32 @fgets(i32* %48, i32 78, i32* %49)
%51 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%52 = call i32 @strlen(i32* %51)
store i32 %52, i32* %10
%53 = load i32, i32* %10
%54 = load i32, i32* %6
%55 = sub nsw i32 %54, %53
store i32 %55, i32* %6
store i32 0, i32* %14
br label %56
56: ; preds = %69, %47
%57 = load i32, i32* %14
%58 = load i32, i32* %10
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %72
60: ; preds = %56
%61 = load i32, i32* %14
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = call i32 @toupper(i32 %64)
%66 = load i32, i32* %14
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 %67
store i32 %65, i32* %68
br label %69
69: ; preds = %60
%70 = load i32, i32* %14
%71 = add nsw i32 %70, 1
store i32 %71, i32* %14
br label %56
72: ; preds = %56
%73 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%74 = load i32, i32* %73
%75 = icmp ne i32 %74, 83
br i1 %75, label %76, label %80
76: ; preds = %72
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%78 = load i32*, i32** %15
%79 = call i32 @fclose(i32* %78)
store i32 -1, i32* %3
br label %132
80: ; preds = %72
%81 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 1
%82 = load i32, i32* %81
%83 = icmp eq i32 %82, 49
br i1 %83, label %84, label %129
84: ; preds = %80
%85 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%86 = getelementptr inbounds i32, i32* %85, i64 2
%87 = call i8* @htob(i32* %86)
%88 = ptrtoint i8* %87 to i32
store i32 %88, i32* %11
%89 = load i32, i32* %11
%90 = sub nsw i32 %89, 3
store i32 %90, i32* %11
%91 = load i32, i32* %11
%92 = load i32, i32* %7
%93 = add nsw i32 %92, %91
store i32 %93, i32* %7
%94 = load i32, i32* %11
%95 = mul nsw i32 %94, 2
store i32 %95, i32* %11
%96 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%97 = getelementptr inbounds i32, i32* %96, i64 4
%98 = call i8* @htob(i32* %97)
%99 = ptrtoint i8* %98 to i32
%100 = shl i32 %99, 8
store i32 %100, i32* %12
%101 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%102 = getelementptr inbounds i32, i32* %101, i64 6
%103 = call i8* @htob(i32* %102)
%104 = ptrtoint i8* %103 to i32
%105 = load i32, i32* %12
%106 = or i32 %105, %104
store i32 %106, i32* %12
%107 = getelementptr inbounds [78 x i32], [78 x i32]* %8, i64 0, i64 0
%108 = getelementptr inbounds i32, i32* %107, i64 8
store i32* %108, i32** %9
store i32 0, i32* %14
br label %109
109: ; preds = %125, %84
%110 = load i32, i32* %14
%111 = load i32, i32* %11
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %128
113: ; preds = %109
%114 = load i32*, i32** %9
%115 = load i32, i32* %14
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i32, i32* %114, i64 %116
%118 = call i8* @htob(i32* %117)
%119 = ptrtoint i8* %118 to i8
%120 = load i8*, i8** %5
%121 = load i32, i32* %12
%122 = add nsw i32 %121, 1
store i32 %122, i32* %12
%123 = sext i32 %121 to i64
%124 = getelementptr inbounds i8, i8* %120, i64 %123
store i8 %119, i8* %124
br label %125
125: ; preds = %113
%126 = load i32, i32* %14
%127 = add nsw i32 %126, 2
store i32 %127, i32* %14
br label %109
128: ; preds = %109
br label %129
129: ; preds = %128, %80
br label %44
130: ; preds = %44
%131 = load i32, i32* %7
store i32 %131, i32* %3
br label %132
132: ; preds = %130, %76, %20
%133 = load i32, i32* %3
ret i32 %133
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [36 x i8] c"ERROR--> Could not open file: '%s'\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@str = [25 x i8] c"Invalid S-Record format!\00"
define i32 @srec_read(i8* %0, i8* nocapture writeonly %1) {
%3 = alloca [78 x i32]
%4 = bitcast [78 x i32]* %3 to i8*
%5 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %81
9: ; preds = %2
%10 = load i32, i32* @SEEK_END
%11 = tail call i32 @fseek(i32* %5, i32 0, i32 %10)
%12 = tail call i32 @ftell(i32* %5)
%13 = load i32, i32* @SEEK_SET
%14 = tail call i32 @fseek(i32* %5, i32 0, i32 %13)
%15 = icmp sgt i32 %12, 0
br i1 %15, label %16, label %81
16: ; preds = %9
%17 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 0
%18 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 1
%19 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 2
%20 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 4
%21 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 6
%22 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 8
br label %23
23: ; preds = %16, %78
%24 = phi i32 [ %12, %16 ], [ %28, %78 ]
%25 = phi i32 [ 0, %16 ], [ %79, %78 ]
%26 = call i32 @fgets(i32* %17, i32 78, i32* %5)
%27 = call i32 @strlen(i32* %17)
%28 = sub nsw i32 %24, %27
%29 = icmp sgt i32 %27, 0
br i1 %29, label %30, label %39
30: ; preds = %23
%31 = zext i32 %27 to i64
br label %32
32: ; preds = %30, %32
%33 = phi i64 [ 0, %30 ], [ %37, %32 ]
%34 = getelementptr inbounds [78 x i32], [78 x i32]* %3, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 @toupper(i32 %35)
store i32 %36, i32* %34
%37 = add nuw nsw i64 %33, 1
%38 = icmp eq i64 %37, %31
br i1 %38, label %39, label %32
39: ; preds = %32, %23
%40 = load i32, i32* %17
%41 = icmp eq i32 %40, 83
br i1 %41, label %45, label %42
42: ; preds = %39
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%44 = call i32 @fclose(i32* %5)
br label %81
45: ; preds = %39
%46 = load i32, i32* %18
%47 = icmp eq i32 %46, 49
br i1 %47, label %48, label %78
48: ; preds = %45
%49 = call i8* @htob(i32* %19)
%50 = ptrtoint i8* %49 to i64
%51 = trunc i64 %50 to i32
%52 = add nsw i32 %51, -3
%53 = add nsw i32 %52, %25
%54 = call i8* @htob(i32* %20)
%55 = call i8* @htob(i32* %21)
%56 = icmp sgt i32 %51, 3
br i1 %56, label %57, label %78
57: ; preds = %48
%58 = ptrtoint i8* %54 to i64
%59 = trunc i64 %58 to i32
%60 = shl i32 %59, 8
%61 = ptrtoint i8* %55 to i64
%62 = trunc i64 %61 to i32
%63 = or i32 %60, %62
%64 = shl nuw nsw i32 %52, 1
%65 = sext i32 %64 to i64
%66 = sext i32 %63 to i64
br label %67
67: ; preds = %57, %67
%68 = phi i64 [ %66, %57 ], [ %74, %67 ]
%69 = phi i64 [ 0, %57 ], [ %76, %67 ]
%70 = getelementptr inbounds i32, i32* %22, i64 %69
%71 = call i8* @htob(i32* %70)
%72 = ptrtoint i8* %71 to i64
%73 = trunc i64 %72 to i8
%74 = add nsw i64 %68, 1
%75 = getelementptr inbounds i8, i8* %1, i64 %68
store i8 %73, i8* %75
%76 = add nuw nsw i64 %69, 2
%77 = icmp slt i64 %76, %65
br i1 %77, label %67, label %78
78: ; preds = %67, %48, %45
%79 = phi i32 [ %25, %45 ], [ %53, %48 ], [ %53, %67 ]
%80 = icmp sgt i32 %28, 0
br i1 %80, label %23, label %81
81: ; preds = %78, %9, %42, %7
%82 = phi i32 [ -1, %7 ], [ -1, %42 ], [ 0, %9 ], [ %79, %78 ]
ret i32 %82
}