#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 atoi(int /*<<< orphan*/);
int detect_cpu();
int /*<<< orphan*/ detect_packages();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int getopt(int, char **, char *);
int /*<<< orphan*/ optarg;
scalar_t__ opterr;
int /*<<< orphan*/ printf(char *, ...);
int rapl_msr(int, int);
int rapl_perf(int);
int rapl_sysfs(int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int c;
  int force_msr = 0, force_perf_event = 0, force_sysfs = 0;
  int core = 0;
  int result = -1;
  int cpu_model;
  printf("\n");
  printf("RAPL read -- use -s for sysfs, -p for perf_event, -m for msr\n\n");
  opterr = 0;
  while ((c = getopt(argc, argv, "c:hmps")) != -1) {
    switch (c) {
    case 'c':
      core = atoi(optarg);
      break;
    case 'h':
      printf("Usage: %s [-c core] [-h] [-m]\n\n", argv[0]);
      printf("\t-c core : specifies which core to measure\n");
      printf("\t-h      : displays this help\n");
      printf("\t-m      : forces use of MSR mode\n");
      printf("\t-p      : forces use of perf_event mode\n");
      printf("\t-s      : forces use of sysfs mode\n");
      exit(0);
    case 'm':
      force_msr = 1;
      break;
    case 'p':
      force_perf_event = 1;
      break;
    case 's':
      force_sysfs = 1;
      break;
    default:
      fprintf(stderr, "Unknown option %c\n", c);
      exit(-1);
    }
  }
  (void)force_sysfs;
  cpu_model = detect_cpu();
  detect_packages();
  if ((!force_msr) && (!force_perf_event)) {
    result = rapl_sysfs(core);
  }
  if (result < 0) {
    if ((force_perf_event) && (!force_msr)) {
      result = rapl_perf(core);
    }
  }
  if (result < 0) {
    result = rapl_msr(core, cpu_model);
  }
  if (result < 0) {
    printf("Unable to read RAPL counters.\n");
    printf("* Verify you have an Intel Sandybridge or newer processor\n");
    printf("* You may need to run as root or have "
           "/proc/sys/kernel/perf_event_paranoid set properly\n");
    printf("* If using raw msr access, make sure msr module is installed\n");
    printf("\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0xffffffff,-0x28(%rbp)
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dd4(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe72(%rip),%rdx
call   10a0 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     130e <main+0x16e>
mov    -0x14(%rbp),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x10,%eax
ja     12e7 <main+0x147>
mov    -0x38(%rbp),%rax
lea    0xdbe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
call   10b0 <atoi@plt>
mov    %eax,-0x24(%rbp)
jmp    1309 <main+0x169>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
movl   $0x1,-0x18(%rbp)
jmp    1309 <main+0x169>
movl   $0x1,-0x1c(%rbp)
jmp    1309 <main+0x169>
movl   $0x1,-0x20(%rbp)
jmp    1309 <main+0x169>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe6d(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
jmp    1203 <main+0x63>
mov    $0x0,%al
call   1050 <detect_cpu@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1030 <detect_packages@plt>
cmpl   $0x0,-0x18(%rbp)
jne    133e <main+0x19e>
cmpl   $0x0,-0x1c(%rbp)
jne    133e <main+0x19e>
mov    -0x24(%rbp),%edi
call   1060 <rapl_sysfs@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jge    136c <main+0x1cc>
cmpl   $0x0,-0x1c(%rbp)
je     1367 <main+0x1c7>
cmpl   $0x0,-0x18(%rbp)
jne    1367 <main+0x1c7>
mov    -0x24(%rbp),%edi
call   1080 <rapl_perf@plt>
mov    %eax,-0x28(%rbp)
jmp    136c <main+0x1cc>
cmpl   $0x0,-0x28(%rbp)
jge    1384 <main+0x1e4>
mov    -0x24(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1090 <rapl_msr@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jge    13e0 <main+0x240>
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcdb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13e7 <main+0x247>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe91(%rip),%rdi
call   1040 <puts@plt>
mov    0x2de3(%rip),%rax
movq   $0x0,(%rax)
xor    %r12d,%r12d
lea    0xe3a(%rip),%r15
lea    0xdfb(%rip),%r14
xor    %r13d,%r13d
movl   $0x0,0x4(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   10c0 <getopt@plt>
cmp    $0x73,%eax
je     1210 <main+0x50>
lea    -0x63(%rax),%ecx
cmp    $0xd,%ecx
ja     1254 <main+0x94>
movslq (%r14,%rcx,4),%rcx
add    %r14,%rcx
jmp    *%rcx
mov    0x2dbe(%rip),%rax
mov    (%rax),%edi
call   10d0 <atoi@plt>
mov    %eax,0x4(%rsp)
jmp    1210 <main+0x50>
mov    $0x1,%r12b
jmp    1210 <main+0x50>
mov    $0x1,%r13d
jmp    1210 <main+0x50>
cmp    $0xffffffff,%eax
jne    1308 <main+0x148>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <detect_cpu@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <detect_packages@plt>
test   %r13d,%r13d
setne  %al
or     %r12b,%al
test   $0x1,%al
je     129b <main+0xdb>
test   %r13d,%r13d
sete   %al
or     %r12b,%al
test   $0x1,%al
mov    0x4(%rsp),%ebp
jne    12aa <main+0xea>
mov    %ebp,%edi
call   10a0 <rapl_perf@plt>
test   %eax,%eax
jns    12f7 <main+0x137>
jmp    12aa <main+0xea>
mov    0x4(%rsp),%ebp
mov    %ebp,%edi
call   1080 <rapl_sysfs@plt>
test   %eax,%eax
jns    12f7 <main+0x137>
mov    %ebp,%edi
mov    %r14d,%esi
call   10b0 <rapl_msr@plt>
test   %eax,%eax
jns    12f7 <main+0x137>
lea    0xdf1(%rip),%rdi
call   1040 <puts@plt>
lea    0xe03(%rip),%rdi
call   1040 <puts@plt>
lea    0xe31(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7d(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cc9(%rip),%rcx
mov    (%rcx),%edi
lea    0xd47(%rip),%rsi
mov    %eax,%edx
call   1090 <fprintf@plt>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
mov    (%rbx),%rsi
lea    0xd0c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe5c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7b(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8d(%rip),%rdi
call   1040 <puts@plt>
lea    0xea3(%rip),%rdi
call   1040 <puts@plt>
lea    0xec0(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [63 x i8] c"RAPL read -- use -s for sysfs, -p for perf_event, -m for msr\0A\0A\00"
@opterr = global i64 0
@.str.2 = [7 x i8] c"c:hmps\00"
@optarg = global i32 0
@.str.3 = [32 x i8] c"Usage: %s [-c core] [-h] [-m]\0A\0A\00"
@.str.4 = [44 x i8] c"\09-c core : specifies which core to measure\0A\00"
@.str.5 = [31 x i8] c"\09-h : displays this help\0A\00"
@.str.6 = [35 x i8] c"\09-m : forces use of MSR mode\0A\00"
@.str.7 = [42 x i8] c"\09-p : forces use of perf_event mode\0A\00"
@.str.8 = [37 x i8] c"\09-s : forces use of sysfs mode\0A\00"
@stderr = global i32 0
@.str.9 = [19 x i8] c"Unknown option %c\0A\00"
@.str.10 = [31 x i8] c"Unable to read RAPL counters.\0A\00"
@.str.11 = [59 x i8] c"* Verify you have an Intel Sandybridge or newer processor\0A\00"
@.str.12 = [89 x i8] c"* You may need to run as root or have /proc/sys/kernel/perf_event_paranoid set properly\0A\00"
@.str.13 = [62 x i8] c"* If using raw msr access, make sure msr module is installed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 -1, i32* %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
store i64 0, i64* @opterr
br label %15
15: ; preds = %44, %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i32 @getopt(i32 %16, i8** %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i32 %18, i32* %6
%19 = icmp ne i32 %18, -1
br i1 %19, label %20, label %45
20: ; preds = %15
%21 = load i32, i32* %6
switch i32 %21, label %39 [
i32 99, label %22
i32 104, label %25
i32 109, label %36
i32 112, label %37
i32 115, label %38
]
22: ; preds = %20
%23 = load i32, i32* @optarg
%24 = call i32 @atoi(i32 %23)
store i32 %24, i32* %10
br label %44
25: ; preds = %20
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 0
%28 = load i8*, i8** %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%35 = call i32 @exit(i32 0)
unreachable
36: ; preds = %20
store i32 1, i32* %7
br label %44
37: ; preds = %20
store i32 1, i32* %8
br label %44
38: ; preds = %20
store i32 1, i32* %9
br label %44
39: ; preds = %20
%40 = load i32, i32* @stderr
%41 = load i32, i32* %6
%42 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %41)
%43 = call i32 @exit(i32 -1)
unreachable
44: ; preds = %38, %37, %36, %22
br label %15
45: ; preds = %15
%46 = load i32, i32* %9
%47 = call i32 (...) @detect_cpu()
store i32 %47, i32* %12
%48 = call i32 (...) @detect_packages()
%49 = load i32, i32* %7
%50 = icmp ne i32 %49, 0
br i1 %50, label %57, label %51
51: ; preds = %45
%52 = load i32, i32* %8
%53 = icmp ne i32 %52, 0
br i1 %53, label %57, label %54
54: ; preds = %51
%55 = load i32, i32* %10
%56 = call i32 @rapl_sysfs(i32 %55)
store i32 %56, i32* %11
br label %57
57: ; preds = %54, %51, %45
%58 = load i32, i32* %11
%59 = icmp slt i32 %58, 0
br i1 %59, label %60, label %70
60: ; preds = %57
%61 = load i32, i32* %8
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %69
63: ; preds = %60
%64 = load i32, i32* %7
%65 = icmp ne i32 %64, 0
br i1 %65, label %69, label %66
66: ; preds = %63
%67 = load i32, i32* %10
%68 = call i32 @rapl_perf(i32 %67)
store i32 %68, i32* %11
br label %69
69: ; preds = %66, %63, %60
br label %70
70: ; preds = %69, %57
%71 = load i32, i32* %11
%72 = icmp slt i32 %71, 0
br i1 %72, label %73, label %77
73: ; preds = %70
%74 = load i32, i32* %10
%75 = load i32, i32* %12
%76 = call i32 @rapl_msr(i32 %74, i32 %75)
store i32 %76, i32* %11
br label %77
77: ; preds = %73, %70
%78 = load i32, i32* %11
%79 = icmp slt i32 %78, 0
br i1 %79, label %80, label %86
80: ; preds = %77
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0))
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.12, i64 0, i64 0))
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.13, i64 0, i64 0))
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %87
86: ; preds = %77
store i32 0, i32* %3
br label %87
87: ; preds = %86, %80
%88 = load i32, i32* %3
ret i32 %88
}

LLVM IR (-O2):
@opterr = global i64 0
@.str.2 = [7 x i8] c"c:hmps\00"
@optarg = global i32 0
@.str.3 = [32 x i8] c"Usage: %s [-c core] [-h] [-m]\0A\0A\00"
@stderr = global i32 0
@.str.9 = [19 x i8] c"Unknown option %c\0A\00"
@str = [62 x i8] c"RAPL read -- use -s for sysfs, -p for perf_event, -m for msr\0A\00"
@str.14 = [30 x i8] c"Unable to read RAPL counters.\00"
@str.15 = [58 x i8] c"* Verify you have an Intel Sandybridge or newer processor\00"
@str.16 = [88 x i8] c"* You may need to run as root or have /proc/sys/kernel/perf_event_paranoid set properly\00"
@str.17 = [61 x i8] c"* If using raw msr access, make sure msr module is installed\00"
@str.18 = [43 x i8] c"\09-c core : specifies which core to measure\00"
@str.19 = [30 x i8] c"\09-h : displays this help\00"
@str.20 = [34 x i8] c"\09-m : forces use of MSR mode\00"
@str.21 = [41 x i8] c"\09-p : forces use of perf_event mode\00"
@str.22 = [36 x i8] c"\09-s : forces use of sysfs mode\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
store i64 0, i64* @opterr
br label %5
5: ; preds = %14, %2
%6 = phi i1 [ false, %2 ], [ true, %14 ]
%7 = phi i32 [ 0, %2 ], [ %10, %14 ]
%8 = phi i32 [ 0, %2 ], [ %13, %14 ]
br label %9
9: ; preds = %14, %5
%10 = phi i32 [ %7, %5 ], [ 1, %14 ]
%11 = phi i32 [ %8, %5 ], [ %13, %14 ]
br label %12
12: ; preds = %9, %16
%13 = phi i32 [ %11, %9 ], [ %18, %16 ]
br label %14
14: ; preds = %14, %12
%15 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
switch i32 %15, label %28 [
i32 -1, label %32
i32 99, label %16
i32 104, label %19
i32 109, label %5
i32 112, label %9
i32 115, label %14
]
16: ; preds = %14
%17 = load i32, i32* @optarg
%18 = tail call i32 @atoi(i32 %17)
br label %12
19: ; preds = %14
%20 = load i8*, i8** %1
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.18, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.19, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.20, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.21, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.22, i64 0, i64 0))
%27 = tail call i32 @exit(i32 0)
unreachable
28: ; preds = %14
%29 = load i32, i32* @stderr
%30 = tail call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %15)
%31 = tail call i32 @exit(i32 -1)
unreachable
32: ; preds = %14
%33 = tail call i32 (...) @detect_cpu()
%34 = tail call i32 (...) @detect_packages()
%35 = icmp ne i32 %10, 0
%36 = select i1 %6, i1 true, i1 %35
br i1 %36, label %40, label %37
37: ; preds = %32
%38 = tail call i32 @rapl_sysfs(i32 %13)
%39 = icmp slt i32 %38, 0
br i1 %39, label %46, label %55
40: ; preds = %32
%41 = icmp eq i32 %10, 0
%42 = or i1 %41, %6
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = tail call i32 @rapl_perf(i32 %13)
%45 = icmp slt i32 %44, 0
br i1 %45, label %46, label %55
46: ; preds = %37, %40, %43
%47 = tail call i32 @rapl_msr(i32 %13, i32 %33)
%48 = icmp slt i32 %47, 0
br i1 %48, label %49, label %55
49: ; preds = %46
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.14, i64 0, i64 0))
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.15, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str.16, i64 0, i64 0))
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.17, i64 0, i64 0))
%54 = tail call i32 @putchar(i32 10)
br label %55
55: ; preds = %37, %43, %46, %49
%56 = phi i32 [ -1, %49 ], [ 0, %46 ], [ 0, %43 ], [ 0, %37 ]
ret i32 %56
}