#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*/ ss;

/* Variables and functions */
float INT_MAX;
int sscanf(char *, char *, ...);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
int /*<<< orphan*/ suicidef(char *, char const *);
int string_to_unitized_int(const char *s, int byThousands) {
  char ss[20];
  int len = strlen(s);
  char *parseMe;
  int v;
  float vf;
  char extra;
  int mult;
  int isFloat;
  mult = 1;
  if (len >= (int)sizeof(ss))
    parseMe = (char *)s;
  else {
    parseMe = ss;
    strcpy(ss, s);
    if (len > 0) {
      switch (ss[len - 1]) {
      case 'K':
      case 'k':
        mult = (byThousands) ? 1000 : 1024;
        break;
      case 'M':
      case 'm':
        mult = (byThousands) ? 1000000 : 1024L * 1024L;
        break;
      case 'G':
      case 'g':
        mult = (byThousands) ? 1000000000 : 1024L * 1024L * 1024L;
        break;
      }
      if (mult != 1)
        ss[len - 1] = 0;
    }
  }
  isFloat = 0;
  if (sscanf(parseMe, "%d%c", &v, &extra) != 1) {
    if (sscanf(parseMe, "%f%c", &vf, &extra) != 1)
      goto bad;
    isFloat = 1;
  }
  if (isFloat) {
    if ((vf > 0) && (vf * mult > INT_MAX))
      goto overflow;
    if ((vf < 0) && (-vf * mult > INT_MAX))
      goto overflow;
    v = (vf * mult) + .5;
  } else if (mult != 1) {
    if ((v > 0) && (v > INT_MAX / mult))
      goto overflow;
    if ((v < 0) && (-v > INT_MAX / mult))
      goto overflow;
    v *= mult;
  }
  return v;
bad:
  suicidef("\"%s\" is not an integer", s);
  return 0;
overflow:
  suicidef("\"%s\" is out of range for an integer", s);
  return 0;
}


x86 assembly (clang, -O0):
<string_to_unitized_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x50(%rbp)
cmpl   $0x14,-0x34(%rbp)
jl     1179 <string_to_unitized_int+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    127a <string_to_unitized_int+0x13a>
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
cmpl   $0x0,-0x34(%rbp)
jle    1275 <string_to_unitized_int+0x135>
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
cltq
movsbl -0x30(%rbp,%rax,1),%eax
mov    %eax,-0x58(%rbp)
sub    $0x47,%eax
je     1242 <string_to_unitized_int+0x102>
jmp    11b6 <string_to_unitized_int+0x76>
mov    -0x58(%rbp),%eax
sub    $0x4b,%eax
je     120b <string_to_unitized_int+0xcb>
jmp    11c7 <string_to_unitized_int+0x87>
mov    -0x58(%rbp),%eax
sub    $0x4d,%eax
je     1226 <string_to_unitized_int+0xe6>
jmp    11d8 <string_to_unitized_int+0x98>
mov    -0x58(%rbp),%eax
sub    $0x67,%eax
je     1242 <string_to_unitized_int+0x102>
jmp    11e9 <string_to_unitized_int+0xa9>
mov    -0x58(%rbp),%eax
sub    $0x6b,%eax
je     120b <string_to_unitized_int+0xcb>
jmp    11fa <string_to_unitized_int+0xba>
mov    -0x58(%rbp),%eax
sub    $0x6d,%eax
je     1226 <string_to_unitized_int+0xe6>
jmp    1259 <string_to_unitized_int+0x119>
mov    -0x14(%rbp),%edx
mov    $0x400,%eax
mov    $0x3e8,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x50(%rbp)
jmp    1259 <string_to_unitized_int+0x119>
mov    -0x14(%rbp),%edx
mov    $0x100000,%eax
mov    $0xf4240,%ecx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %eax,-0x50(%rbp)
jmp    1259 <string_to_unitized_int+0x119>
mov    -0x14(%rbp),%edx
mov    $0x40000000,%eax
mov    $0x3b9aca00,%ecx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %eax,-0x50(%rbp)
cmpl   $0x1,-0x50(%rbp)
je     1270 <string_to_unitized_int+0x130>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
jmp    1275 <string_to_unitized_int+0x135>
jmp    127a <string_to_unitized_int+0x13a>
movl   $0x0,-0x54(%rbp)
mov    -0x40(%rbp),%rdi
lea    0xd7c(%rip),%rsi
lea    -0x44(%rbp),%rdx
lea    -0x49(%rbp),%rcx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     12d3 <string_to_unitized_int+0x193>
mov    -0x40(%rbp),%rdi
lea    0xd5e(%rip),%rsi
lea    -0x48(%rbp),%rdx
lea    -0x49(%rbp),%rcx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     12cc <string_to_unitized_int+0x18c>
jmp    1402 <string_to_unitized_int+0x2c2>
movl   $0x1,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
je     1378 <string_to_unitized_int+0x238>
movss  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1311 <string_to_unitized_int+0x1d1>
movss  -0x48(%rbp),%xmm0
cvtsi2ssl -0x50(%rbp),%xmm1
mulss  %xmm1,%xmm0
mov    0x2ce5(%rip),%rax
ucomiss (%rax),%xmm0
jbe    1311 <string_to_unitized_int+0x1d1>
jmp    141e <string_to_unitized_int+0x2de>
xorps  %xmm0,%xmm0
ucomiss -0x48(%rbp),%xmm0
jbe    134e <string_to_unitized_int+0x20e>
movss  -0x48(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
cvtsi2ssl -0x50(%rbp),%xmm1
mulss  %xmm1,%xmm0
mov    0x2ca8(%rip),%rax
ucomiss (%rax),%xmm0
jbe    134e <string_to_unitized_int+0x20e>
jmp    141e <string_to_unitized_int+0x2de>
movss  -0x48(%rbp),%xmm0
cvtsi2ssl -0x50(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc98(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x44(%rbp)
jmp    13f7 <string_to_unitized_int+0x2b7>
cmpl   $0x1,-0x50(%rbp)
je     13f2 <string_to_unitized_int+0x2b2>
cmpl   $0x0,-0x44(%rbp)
jle    13b3 <string_to_unitized_int+0x273>
cvtsi2ssl -0x44(%rbp),%xmm0
mov    0x2c50(%rip),%rax
movss  (%rax),%xmm1
cvtsi2ssl -0x50(%rbp),%xmm2
divss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jbe    13b3 <string_to_unitized_int+0x273>
jmp    141e <string_to_unitized_int+0x2de>
cmpl   $0x0,-0x44(%rbp)
jge    13e8 <string_to_unitized_int+0x2a8>
xor    %eax,%eax
sub    -0x44(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    0x2c1b(%rip),%rax
movss  (%rax),%xmm1
cvtsi2ssl -0x50(%rbp),%xmm2
divss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jbe    13e8 <string_to_unitized_int+0x2a8>
jmp    141e <string_to_unitized_int+0x2de>
mov    -0x50(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    13f7 <string_to_unitized_int+0x2b7>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1435 <string_to_unitized_int+0x2f5>
mov    -0x10(%rbp),%rsi
lea    0xc05(%rip),%rdi
call   1050 <suicidef@plt>
movl   $0x0,-0x4(%rbp)
jmp    1435 <string_to_unitized_int+0x2f5>
mov    -0x10(%rbp),%rsi
lea    0xc00(%rip),%rdi
call   1050 <suicidef@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_to_unitized_int>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %esi,%r15d
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    $0x1,%r12d
cmp    $0x13,%eax
jle    116a <string_to_unitized_int+0x2a>
mov    %r14,%rbx
jmp    11f7 <string_to_unitized_int+0xb7>
mov    %eax,%ebp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
test   %ebp,%ebp
jle    11f7 <string_to_unitized_int+0xb7>
add    $0xffffffff,%ebp
movsbl 0x10(%rsp,%rbp,1),%eax
add    $0xffffffb9,%eax
cmp    $0x26,%eax
ja     11f7 <string_to_unitized_int+0xb7>
movabs $0x100000001,%rcx
bt     %rax,%rcx
jb     11d0 <string_to_unitized_int+0x90>
movabs $0x1000000010,%rcx
bt     %rax,%rcx
jb     11e0 <string_to_unitized_int+0xa0>
movabs $0x4000000040,%rcx
bt     %rax,%rcx
jae    11f7 <string_to_unitized_int+0xb7>
test   %r15d,%r15d
mov    $0x100000,%eax
mov    $0xf4240,%r12d
jmp    11ee <string_to_unitized_int+0xae>
test   %r15d,%r15d
mov    $0x40000000,%eax
mov    $0x3b9aca00,%r12d
jmp    11ee <string_to_unitized_int+0xae>
test   %r15d,%r15d
mov    $0x400,%eax
mov    $0x3e8,%r12d
cmove  %eax,%r12d
movb   $0x0,0x10(%rsp,%rbp,1)
lea    0xe1a(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x7(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    124f <string_to_unitized_int+0x10f>
mov    0xc(%rsp),%ebp
cmp    $0x1,%r12d
je     1303 <string_to_unitized_int+0x1c3>
test   %ebp,%ebp
jle    12df <string_to_unitized_int+0x19f>
cvtsi2ss %ebp,%xmm0
mov    0x2db0(%rip),%rax
cvtsi2ss %r12d,%xmm1
movss  (%rax),%xmm2
divss  %xmm1,%xmm2
ucomiss %xmm2,%xmm0
ja     12bb <string_to_unitized_int+0x17b>
jmp    12e1 <string_to_unitized_int+0x1a1>
lea    0xdc7(%rip),%rsi
xor    %ebp,%ebp
lea    0x8(%rsp),%rdx
lea    0x7(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    12ce <string_to_unitized_int+0x18e>
movss  0x8(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1294 <string_to_unitized_int+0x154>
cvtsi2ss %r12d,%xmm2
mulss  %xmm0,%xmm2
mov    0x2d59(%rip),%rax
ucomiss (%rax),%xmm2
ja     12bb <string_to_unitized_int+0x17b>
ucomiss %xmm0,%xmm1
jbe    12e7 <string_to_unitized_int+0x1a7>
movaps 0xd60(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm1,%xmm1
cvtsi2ss %r12d,%xmm1
mulss  %xmm1,%xmm2
mov    0x2d32(%rip),%rax
ucomiss (%rax),%xmm2
jbe    12ef <string_to_unitized_int+0x1af>
lea    0xd77(%rip),%rdi
mov    %r14,%rsi
call   1050 <suicidef@plt>
xor    %ebp,%ebp
jmp    1303 <string_to_unitized_int+0x1c3>
lea    0xd4d(%rip),%rdi
mov    %r14,%rsi
call   1050 <suicidef@plt>
jmp    1303 <string_to_unitized_int+0x1c3>
js     1312 <string_to_unitized_int+0x1d2>
imul   %r12d,%ebp
jmp    1303 <string_to_unitized_int+0x1c3>
xorps  %xmm1,%xmm1
cvtsi2ss %r12d,%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xd11(%rip),%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%eax
neg    %eax
cvtsi2ss %eax,%xmm0
jmp    1231 <string_to_unitized_int+0xf1>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%c\00"
@.str.1 = [5 x i8] c"%f%c\00"
@INT_MAX = global float 0.000000e+00
@.str.2 = [23 x i8] c"\22%s\22 is not an integer\00"
@.str.3 = [36 x i8] c"\22%s\22 is out of range for an integer\00"
define i32 @string_to_unitized_int(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca [20 x i8]
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca float
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%14 = load i8*, i8** %4
%15 = call i32 @strlen(i8* %14)
store i32 %15, i32* %7
store i32 1, i32* %12
%16 = load i32, i32* %7
%17 = icmp sge i32 %16, 20
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = load i8*, i8** %4
store i8* %19, i8** %8
br label %61
20: ; preds = %2
%21 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
store i8* %21, i8** %8
%22 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%23 = load i8*, i8** %4
%24 = call i32 @strcpy(i8* %22, i8* %23)
%25 = load i32, i32* %7
%26 = icmp sgt i32 %25, 0
br i1 %26, label %27, label %60
27: ; preds = %20
%28 = load i32, i32* %7
%29 = sub nsw i32 %28, 1
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
switch i32 %33, label %51 [
i32 75, label %34
i32 107, label %34
i32 77, label %39
i32 109, label %39
i32 71, label %45
i32 103, label %45
]
34: ; preds = %27, %27
%35 = load i32, i32* %5
%36 = icmp ne i32 %35, 0
%37 = zext i1 %36 to i64
%38 = select i1 %36, i32 1000, i32 1024
store i32 %38, i32* %12
br label %51
39: ; preds = %27, %27
%40 = load i32, i32* %5
%41 = icmp ne i32 %40, 0
%42 = zext i1 %41 to i64
%43 = select i1 %41, i64 1000000, i64 1048576
%44 = trunc i64 %43 to i32
store i32 %44, i32* %12
br label %51
45: ; preds = %27, %27
%46 = load i32, i32* %5
%47 = icmp ne i32 %46, 0
%48 = zext i1 %47 to i64
%49 = select i1 %47, i64 1000000000, i64 1073741824
%50 = trunc i64 %49 to i32
store i32 %50, i32* %12
br label %51
51: ; preds = %27, %45, %39, %34
%52 = load i32, i32* %12
%53 = icmp ne i32 %52, 1
br i1 %53, label %54, label %59
54: ; preds = %51
%55 = load i32, i32* %7
%56 = sub nsw i32 %55, 1
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %57
store i8 0, i8* %58
br label %59
59: ; preds = %54, %51
br label %60
60: ; preds = %59, %20
br label %61
61: ; preds = %60, %18
store i32 0, i32* %13
%62 = load i8*, i8** %8
%63 = call i32 (i8*, i8*, ...) @sscanf(i8* %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %9, i8* %11)
%64 = icmp ne i32 %63, 1
br i1 %64, label %65, label %71
65: ; preds = %61
%66 = load i8*, i8** %8
%67 = call i32 (i8*, i8*, ...) @sscanf(i8* %66, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %10, i8* %11)
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %70
69: ; preds = %65
br label %140
70: ; preds = %65
store i32 1, i32* %13
br label %71
71: ; preds = %70, %61
%72 = load i32, i32* %13
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %105
74: ; preds = %71
%75 = load float, float* %10
%76 = fcmp ogt float %75, 0.000000e+00
br i1 %76, label %77, label %85
77: ; preds = %74
%78 = load float, float* %10
%79 = load i32, i32* %12
%80 = sitofp i32 %79 to float
%81 = fmul float %78, %80
%82 = load float, float* @INT_MAX
%83 = fcmp ogt float %81, %82
br i1 %83, label %84, label %85
84: ; preds = %77
br label %143
85: ; preds = %77, %74
%86 = load float, float* %10
%87 = fcmp olt float %86, 0.000000e+00
br i1 %87, label %88, label %97
88: ; preds = %85
%89 = load float, float* %10
%90 = fneg float %89
%91 = load i32, i32* %12
%92 = sitofp i32 %91 to float
%93 = fmul float %90, %92
%94 = load float, float* @INT_MAX
%95 = fcmp ogt float %93, %94
br i1 %95, label %96, label %97
96: ; preds = %88
br label %143
97: ; preds = %88, %85
%98 = load float, float* %10
%99 = load i32, i32* %12
%100 = sitofp i32 %99 to float
%101 = fmul float %98, %100
%102 = fpext float %101 to double
%103 = fadd double %102, 5.000000e-01
%104 = fptosi double %103 to i32
store i32 %104, i32* %9
br label %138
105: ; preds = %71
%106 = load i32, i32* %12
%107 = icmp ne i32 %106, 1
br i1 %107, label %108, label %137
108: ; preds = %105
%109 = load i32, i32* %9
%110 = icmp sgt i32 %109, 0
br i1 %110, label %111, label %120
111: ; preds = %108
%112 = load i32, i32* %9
%113 = sitofp i32 %112 to float
%114 = load float, float* @INT_MAX
%115 = load i32, i32* %12
%116 = sitofp i32 %115 to float
%117 = fdiv float %114, %116
%118 = fcmp ogt float %113, %117
br i1 %118, label %119, label %120
119: ; preds = %111
br label %143
120: ; preds = %111, %108
%121 = load i32, i32* %9
%122 = icmp slt i32 %121, 0
br i1 %122, label %123, label %133
123: ; preds = %120
%124 = load i32, i32* %9
%125 = sub nsw i32 0, %124
%126 = sitofp i32 %125 to float
%127 = load float, float* @INT_MAX
%128 = load i32, i32* %12
%129 = sitofp i32 %128 to float
%130 = fdiv float %127, %129
%131 = fcmp ogt float %126, %130
br i1 %131, label %132, label %133
132: ; preds = %123
br label %143
133: ; preds = %123, %120
%134 = load i32, i32* %12
%135 = load i32, i32* %9
%136 = mul nsw i32 %135, %134
store i32 %136, i32* %9
br label %137
137: ; preds = %133, %105
br label %138
138: ; preds = %137, %97
%139 = load i32, i32* %9
store i32 %139, i32* %3
br label %146
140: ; preds = %69
%141 = load i8*, i8** %4
%142 = call i32 @suicidef(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %141)
store i32 0, i32* %3
br label %146
143: ; preds = %132, %119, %96, %84
%144 = load i8*, i8** %4
%145 = call i32 @suicidef(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* %144)
store i32 0, i32* %3
br label %146
146: ; preds = %143, %140, %138
%147 = load i32, i32* %3
ret i32 %147
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%c\00"
@.str.1 = [5 x i8] c"%f%c\00"
@INT_MAX = global float 0.000000e+00
@.str.2 = [23 x i8] c"\22%s\22 is not an integer\00"
@.str.3 = [36 x i8] c"\22%s\22 is out of range for an integer\00"
define i32 @string_to_unitized_int(i8* %0, i32 %1) {
%3 = alloca [20 x i8]
%4 = alloca i32
%5 = alloca float
%6 = alloca i8
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = tail call i32 @strlen(i8* %0)
%9 = bitcast i32* %4 to i8*
%10 = bitcast float* %5 to i8*
%11 = icmp sgt i32 %8, 19
br i1 %11, label %32, label %12
12: ; preds = %2
%13 = call i32 @strcpy(i8* %7, i8* %0)
%14 = icmp sgt i32 %8, 0
br i1 %14, label %15, label %32
15: ; preds = %12
%16 = add nsw i32 %8, -1
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
switch i32 %20, label %32 [
i32 75, label %21
i32 107, label %21
i32 77, label %24
i32 109, label %24
i32 71, label %27
i32 103, label %27
]
21: ; preds = %15, %15
%22 = icmp eq i32 %1, 0
%23 = select i1 %22, i32 1024, i32 1000
br label %30
24: ; preds = %15, %15
%25 = icmp eq i32 %1, 0
%26 = select i1 %25, i32 1048576, i32 1000000
br label %30
27: ; preds = %15, %15
%28 = icmp eq i32 %1, 0
%29 = select i1 %28, i32 1073741824, i32 1000000000
br label %30
30: ; preds = %27, %24, %21
%31 = phi i32 [ %23, %21 ], [ %26, %24 ], [ %29, %27 ]
store i8 0, i8* %18
br label %32
32: ; preds = %15, %2, %12, %30
%33 = phi i8* [ %7, %30 ], [ %7, %12 ], [ %0, %2 ], [ %7, %15 ]
%34 = phi i32 [ %31, %30 ], [ 1, %12 ], [ 1, %2 ], [ 1, %15 ]
%35 = call i32 (i8*, i8*, ...) @sscanf(i8* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %4, i8* %6)
%36 = icmp eq i32 %35, 1
br i1 %36, label %64, label %37
37: ; preds = %32
%38 = call i32 (i8*, i8*, ...) @sscanf(i8* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %5, i8* %6)
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %86
40: ; preds = %37
%41 = load float, float* %5
%42 = fcmp ogt float %41, 0.000000e+00
br i1 %42, label %43, label %48
43: ; preds = %40
%44 = sitofp i32 %34 to float
%45 = fmul float %41, %44
%46 = load float, float* @INT_MAX
%47 = fcmp ogt float %45, %46
br i1 %47, label %88, label %48
48: ; preds = %43, %40
%49 = fcmp olt float %41, 0.000000e+00
br i1 %49, label %52, label %50
50: ; preds = %48
%51 = sitofp i32 %34 to float
br label %58
52: ; preds = %48
%53 = fneg float %41
%54 = sitofp i32 %34 to float
%55 = fmul float %54, %53
%56 = load float, float* @INT_MAX
%57 = fcmp ogt float %55, %56
br i1 %57, label %88, label %58
58: ; preds = %50, %52
%59 = phi float [ %51, %50 ], [ %54, %52 ]
%60 = fmul float %41, %59
%61 = fpext float %60 to double
%62 = fadd double %61, 5.000000e-01
%63 = fptosi double %62 to i32
br label %90
64: ; preds = %32
%65 = icmp eq i32 %34, 1
%66 = load i32, i32* %4
br i1 %65, label %90, label %67
67: ; preds = %64
%68 = icmp sgt i32 %66, 0
br i1 %68, label %69, label %75
69: ; preds = %67
%70 = sitofp i32 %66 to float
%71 = load float, float* @INT_MAX
%72 = sitofp i32 %34 to float
%73 = fdiv float %71, %72
%74 = fcmp olt float %73, %70
br i1 %74, label %88, label %84
75: ; preds = %67
%76 = icmp slt i32 %66, 0
br i1 %76, label %77, label %84
77: ; preds = %75
%78 = sub nsw i32 0, %66
%79 = sitofp i32 %78 to float
%80 = load float, float* @INT_MAX
%81 = sitofp i32 %34 to float
%82 = fdiv float %80, %81
%83 = fcmp olt float %82, %79
br i1 %83, label %88, label %84
84: ; preds = %69, %77, %75
%85 = mul nsw i32 %66, %34
br label %90
86: ; preds = %37
%87 = call i32 @suicidef(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %90
88: ; preds = %77, %69, %52, %43
%89 = call i32 @suicidef(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* %0)
br label %90
90: ; preds = %64, %58, %84, %88, %86
%91 = phi i32 [ 0, %86 ], [ 0, %88 ], [ %85, %84 ], [ %63, %58 ], [ %66, %64 ]
ret i32 %91
}