#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 */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISLNK(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int getline(char **, size_t *, int /*<<< orphan*/);
int lstat(char *, struct stat *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int readlink(char *, char *, int);
char *realloc(char *, int);
int /*<<< orphan*/ stdin;
char *strtok(char *, char *);
scalar_t__ symlink(char *, char *);
int main(int argc, char *argv[]) {
  char *old_path;
  char *new_path;
  struct stat statbuf;
  int num;
  char *buffer = NULL;
  char *line_buffer = NULL;
  size_t line_buffer_size = 0;
  int size = 1;
  if ((buffer = (char *)malloc(size + 1)) == NULL) {
    perror("checklink: malloc failed");
    return 1;
  }
  while (getline(&line_buffer, &line_buffer_size, stdin) != -1) {
    old_path = strtok(line_buffer, "\t ");
    new_path = strtok(NULL, "\t\n ");
    if (!old_path || !new_path)
      break;
    if (symlink(old_path, new_path) != 0) {
      perror("checklink : symlink failed ");
      return 1;
    }
    if (lstat(new_path, &statbuf) == -1) {
      perror("checklink: lstat failed");
      return 1;
    }
    if (!(S_ISLNK(statbuf.st_mode))) {
      printf("checklink : file %s is not a symbol link\n", new_path);
      return 1;
    }
    while (1) {
      memset(buffer, 0, size + 1);
      num = readlink(new_path, buffer, size);
      if (num < 1 || num > size) {
        perror("checklink: readlink failed");
        free(buffer);
        return 1;
      }
      if (buffer[num] != 0) {
        printf("checklink : readlink corrupts memory\n");
        free(buffer);
        return 1;
      }
      if (num < size)
        break;
      size *= 2;
      if ((buffer = realloc(buffer, size + 1)) == NULL) {
        perror("checklink: realloc failed");
        return 1;
      }
    }
  }
  free(buffer);
  free(line_buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
add    $0x1,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1226 <main+0x66>
lea    0xdeb(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
jmp    122b <main+0x6b>
mov    0x2db6(%rip),%rax
mov    (%rax),%edx
lea    -0x40(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   10e0 <getline@plt>
cmp    $0xffffffff,%eax
je     140a <main+0x24a>
mov    -0x40(%rbp),%rdi
lea    0xdc4(%rip),%rsi
call   10d0 <strtok@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdb3(%rip),%rsi
call   10d0 <strtok@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1288 <main+0xc8>
cmpq   $0x0,-0x20(%rbp)
jne    128d <main+0xcd>
jmp    140a <main+0x24a>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <symlink@plt>
cmp    $0x0,%rax
je     12bc <main+0xfc>
lea    0xd75(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
mov    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1090 <lstat@plt>
cmp    $0xffffffff,%eax
jne    12ea <main+0x12a>
lea    0xd63(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
mov    -0x28(%rbp),%edi
call   1040 <S_ISLNK@plt>
cmp    $0x0,%eax
jne    1319 <main+0x159>
mov    -0x20(%rbp),%rsi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
jmp    131e <main+0x15e>
mov    -0x38(%rbp),%rdi
mov    -0x4c(%rbp),%edx
add    $0x1,%edx
xor    %esi,%esi
call   1080 <memset@plt>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x4c(%rbp),%edx
call   1050 <readlink@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jl     1358 <main+0x198>
mov    -0x2c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jle    1379 <main+0x1b9>
lea    0xd1f(%rip),%rdi
call   10c0 <perror@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     13b1 <main+0x1f1>
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
mov    -0x2c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    13c2 <main+0x202>
jmp    1405 <main+0x245>
mov    -0x4c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x4c(%rbp),%esi
add    $0x1,%esi
call   10b0 <realloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    1400 <main+0x240>
lea    0xcd0(%rip),%rdi
call   10c0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1423 <main+0x263>
jmp    131e <main+0x15e>
jmp    122b <main+0x6b>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0x0,(%rsp)
movq   $0x0,0x10(%rsp)
mov    $0x2,%edi
call   10b0 <malloc@plt>
test   %rax,%rax
je     1373 <main+0x1a3>
mov    %rax,%rbx
mov    0x2ddc(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
call   10f0 <getline@plt>
cmp    $0xffffffff,%eax
je     1336 <main+0x166>
mov    $0x1,%r13d
lea    0xde8(%rip),%r12
lea    0xde4(%rip),%rbp
mov    (%rsp),%rdi
mov    %r12,%rsi
call   10e0 <strtok@plt>
mov    %rax,%r14
xor    %edi,%edi
mov    %rbp,%rsi
call   10e0 <strtok@plt>
test   %r14,%r14
je     1336 <main+0x166>
mov    %rax,%r15
test   %rax,%rax
je     1336 <main+0x166>
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <symlink@plt>
test   %rax,%rax
jne    13ab <main+0x1db>
mov    %r15,%rdi
lea    0x8(%rsp),%rsi
call   10a0 <lstat@plt>
cmp    $0xffffffff,%eax
je     13b4 <main+0x1e4>
mov    0x8(%rsp),%edi
call   1040 <S_ISLNK@plt>
test   %eax,%eax
je     137c <main+0x1ac>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%r13),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1090 <memset@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
call   1060 <readlink@plt>
test   %eax,%eax
jle    138f <main+0x1bf>
cmp    %r13d,%eax
jg     138f <main+0x1bf>
mov    %eax,%ecx
cmpb   $0x0,(%rbx,%rcx,1)
jne    134b <main+0x17b>
cmp    %r13d,%eax
jl     1310 <main+0x140>
mov    %r13d,%ebp
add    %r13d,%ebp
lea    0x1(%r13,%r13,1),%esi
mov    %rbx,%rdi
call   10c0 <realloc@plt>
mov    %rax,%rbx
mov    %ebp,%r13d
test   %rax,%rax
jne    12b0 <main+0xe0>
jmp    139d <main+0x1cd>
nopl   (%rax)
mov    0x2cd1(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
call   10f0 <getline@plt>
cmp    $0xffffffff,%eax
lea    0xcec(%rip),%rbp
jne    1238 <main+0x68>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    1364 <main+0x194>
lea    0xd61(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc86(%rip),%rdi
jmp    13a4 <main+0x1d4>
lea    0xcd1(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    135f <main+0x18f>
lea    0xce8(%rip),%rdi
call   10d0 <perror@plt>
jmp    1357 <main+0x187>
lea    0xcf5(%rip),%rdi
call   10d0 <perror@plt>
jmp    135f <main+0x18f>
lea    0xc6e(%rip),%rdi
jmp    13a4 <main+0x1d4>
lea    0xc81(%rip),%rdi
jmp    13a4 <main+0x1d4>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [25 x i8] c"checklink: malloc failed\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"\09 \00"
@.str.2 = [4 x i8] c"\09\0A \00"
@.str.3 = [28 x i8] c"checklink : symlink failed \00"
@.str.4 = [24 x i8] c"checklink: lstat failed\00"
@.str.5 = [42 x i8] c"checklink : file %s is not a symbol link\0A\00"
@.str.6 = [27 x i8] c"checklink: readlink failed\00"
@.str.7 = [38 x i8] c"checklink : readlink corrupts memory\0A\00"
@.str.8 = [26 x i8] c"checklink: realloc failed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca %struct.stat
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %10
store i8* null, i8** %11
store i64 0, i64* %12
store i32 1, i32* %13
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
%16 = call i64 @malloc(i32 %15)
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %10
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %111
21: ; preds = %2
br label %22
22: ; preds = %105, %21
%23 = load i32, i32* @stdin
%24 = call i32 @getline(i8** %11, i64* %12, i32 %23)
%25 = icmp ne i32 %24, -1
br i1 %25, label %26, label %106
26: ; preds = %22
%27 = load i8*, i8** %11
%28 = call i8* @strtok(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i8* %28, i8** %6
%29 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %29, i8** %7
%30 = load i8*, i8** %6
%31 = icmp ne i8* %30, null
br i1 %31, label %32, label %35
32: ; preds = %26
%33 = load i8*, i8** %7
%34 = icmp ne i8* %33, null
br i1 %34, label %36, label %35
35: ; preds = %32, %26
br label %106
36: ; preds = %32
%37 = load i8*, i8** %6
%38 = load i8*, i8** %7
%39 = call i64 @symlink(i8* %37, i8* %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %36
%42 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %111
43: ; preds = %36
%44 = load i8*, i8** %7
%45 = call i32 @lstat(i8* %44, %struct.stat* %8)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %111
49: ; preds = %43
%50 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%51 = load i32, i32* %50
%52 = call i32 @S_ISLNK(i32 %51)
%53 = icmp ne i32 %52, 0
br i1 %53, label %57, label %54
54: ; preds = %49
%55 = load i8*, i8** %7
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i8* %55)
store i32 1, i32* %3
br label %111
57: ; preds = %49
br label %58
58: ; preds = %57, %104
%59 = load i8*, i8** %10
%60 = load i32, i32* %13
%61 = add nsw i32 %60, 1
%62 = call i32 @memset(i8* %59, i32 0, i32 %61)
%63 = load i8*, i8** %7
%64 = load i8*, i8** %10
%65 = load i32, i32* %13
%66 = call i32 @readlink(i8* %63, i8* %64, i32 %65)
store i32 %66, i32* %9
%67 = load i32, i32* %9
%68 = icmp slt i32 %67, 1
br i1 %68, label %73, label %69
69: ; preds = %58
%70 = load i32, i32* %9
%71 = load i32, i32* %13
%72 = icmp sgt i32 %70, %71
br i1 %72, label %73, label %77
73: ; preds = %69, %58
%74 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%75 = load i8*, i8** %10
%76 = call i32 @free(i8* %75)
store i32 1, i32* %3
br label %111
77: ; preds = %69
%78 = load i8*, i8** %10
%79 = load i32, i32* %9
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %89
85: ; preds = %77
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%87 = load i8*, i8** %10
%88 = call i32 @free(i8* %87)
store i32 1, i32* %3
br label %111
89: ; preds = %77
%90 = load i32, i32* %9
%91 = load i32, i32* %13
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %94
93: ; preds = %89
br label %105
94: ; preds = %89
%95 = load i32, i32* %13
%96 = mul nsw i32 %95, 2
store i32 %96, i32* %13
%97 = load i8*, i8** %10
%98 = load i32, i32* %13
%99 = add nsw i32 %98, 1
%100 = call i8* @realloc(i8* %97, i32 %99)
store i8* %100, i8** %10
%101 = icmp eq i8* %100, null
br i1 %101, label %102, label %104
102: ; preds = %94
%103 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %3
br label %111
104: ; preds = %94
br label %58
105: ; preds = %93
br label %22
106: ; preds = %35, %22
%107 = load i8*, i8** %10
%108 = call i32 @free(i8* %107)
%109 = load i8*, i8** %11
%110 = call i32 @free(i8* %109)
store i32 0, i32* %3
br label %111
111: ; preds = %106, %102, %85, %73, %54, %47, %41, %19
%112 = load i32, i32* %3
ret i32 %112
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [25 x i8] c"checklink: malloc failed\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"\09 \00"
@.str.2 = [4 x i8] c"\09\0A \00"
@.str.3 = [28 x i8] c"checklink : symlink failed \00"
@.str.4 = [24 x i8] c"checklink: lstat failed\00"
@.str.5 = [42 x i8] c"checklink : file %s is not a symbol link\0A\00"
@.str.6 = [27 x i8] c"checklink: readlink failed\00"
@.str.8 = [26 x i8] c"checklink: realloc failed\00"
@str = [37 x i8] c"checklink : readlink corrupts memory\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.stat
%4 = alloca i8*
%5 = alloca i64
%6 = bitcast %struct.stat* %3 to i8*
%7 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%8 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%9 = tail call i64 @malloc(i32 2)
%10 = inttoptr i64 %9 to i8*
%11 = icmp eq i64 %9, 0
br i1 %11, label %18, label %12
12: ; preds = %2
%13 = load i32, i32* @stdin
%14 = call i32 @getline(i8** %4, i64* %5, i32 %13)
%15 = icmp eq i32 %14, -1
br i1 %15, label %78, label %16
16: ; preds = %12
%17 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
br label %24
18: ; preds = %2
%19 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %83
20: ; preds = %69
%21 = load i32, i32* @stdin
%22 = call i32 @getline(i8** %4, i64* %5, i32 %21)
%23 = icmp eq i32 %22, -1
br i1 %23, label %78, label %24
24: ; preds = %16, %20
%25 = phi i32 [ 1, %16 ], [ %51, %20 ]
%26 = phi i8* [ %10, %16 ], [ %50, %20 ]
%27 = load i8*, i8** %4
%28 = call i8* @strtok(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%29 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%30 = icmp ne i8* %28, null
%31 = icmp ne i8* %29, null
%32 = select i1 %30, i1 %31, i1 false
br i1 %32, label %33, label %78
33: ; preds = %24
%34 = call i64 @symlink(i8* %28, i8* %29)
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %83
38: ; preds = %33
%39 = call i32 @lstat(i8* %29, %struct.stat* %3)
%40 = icmp eq i32 %39, -1
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %83
43: ; preds = %38
%44 = load i32, i32* %17
%45 = call i32 @S_ISLNK(i32 %44)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i8* %29)
br label %83
49: ; preds = %43, %71
%50 = phi i8* [ %74, %71 ], [ %26, %43 ]
%51 = phi i32 [ %72, %71 ], [ %25, %43 ]
%52 = add nsw i32 %51, 1
%53 = call i32 @memset(i8* %50, i32 0, i32 %52)
%54 = call i32 @readlink(i8* %29, i8* %50, i32 %51)
%55 = icmp slt i32 %54, 1
%56 = icmp sgt i32 %54, %51
%57 = select i1 %55, i1 true, i1 %56
br i1 %57, label %58, label %61
58: ; preds = %49
%59 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%60 = call i32 @free(i8* %50)
br label %83
61: ; preds = %49
%62 = zext i32 %54 to i64
%63 = getelementptr inbounds i8, i8* %50, i64 %62
%64 = load i8, i8* %63
%65 = icmp eq i8 %64, 0
br i1 %65, label %69, label %66
66: ; preds = %61
%67 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%68 = call i32 @free(i8* %50)
br label %83
69: ; preds = %61
%70 = icmp slt i32 %54, %51
br i1 %70, label %20, label %71
71: ; preds = %69
%72 = shl nsw i32 %51, 1
%73 = or i32 %72, 1
%74 = call i8* @realloc(i8* %50, i32 %73)
%75 = icmp eq i8* %74, null
br i1 %75, label %76, label %49
76: ; preds = %71
%77 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
br label %83
78: ; preds = %20, %24, %12
%79 = phi i8* [ %10, %12 ], [ %26, %24 ], [ %50, %20 ]
%80 = call i32 @free(i8* %79)
%81 = load i8*, i8** %4
%82 = call i32 @free(i8* %81)
br label %83
83: ; preds = %78, %76, %66, %58, %47, %41, %36, %18
%84 = phi i32 [ 1, %18 ], [ 1, %36 ], [ 1, %41 ], [ 1, %58 ], [ 1, %66 ], [ 1, %76 ], [ 1, %47 ], [ 0, %78 ]
ret i32 %84
}