xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_SetContrast(void *);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned short);
void UPnPRenderingControl_SetContrast(void *upnptoken, unsigned int InstanceID,
                                      unsigned short DesiredContrast) {
  printf("Invoke: UPnPRenderingControl_SetContrast(%u,%u);\r\n", InstanceID,
         DesiredContrast);
  UPnPResponse_RenderingControl_SetContrast(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_SetContrast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec0(%rip),%rdi
movzwl -0xe(%rbp),%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UPnPResponse_RenderingControl_SetContrast@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_SetContrast>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_SetContrast@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"Invoke: UPnPRenderingControl_SetContrast(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetContrast(i8* %0, i32 %1, i16 zeroext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i16
store i8* %0, i8** %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i32, i32* %5
%8 = load i16, i16* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %7, i16 zeroext %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_RenderingControl_SetContrast(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"Invoke: UPnPRenderingControl_SetContrast(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetContrast(i8* %0, i32 %1, i16 zeroext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %2)
%5 = tail call i32 @UPnPResponse_RenderingControl_SetContrast(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errmsg(char *);
char *getarg();
int /*<<< orphan*/ inputf(char *, int /*<<< orphan*/);
readfile() {
  register char *name;
  if (name = getarg())
    inputf(name, 0);
  else
    errmsg("no file to read");
}


x86 assembly (clang, -O0):
<readfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getarg@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     115d <readfile+0x2d>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <inputf@plt>
jmp    1169 <readfile+0x39>
lea    0xe9c(%rip),%rdi
call   1050 <errmsg@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readfile>:
push   %rax
xor    %eax,%eax
call   1040 <getarg@plt>
test   %rax,%rax
je     1149 <readfile+0x19>
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <inputf@plt>
pop    %rcx
ret
lea    0xeb0(%rip),%rdi
call   1050 <errmsg@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"no file to read\00"
define i32 @readfile() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* (...) @getarg()
store i8* %3, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i8*, i8** %2
%7 = call i32 @inputf(i8* %6, i32 0)
br label %10
8: ; preds = %0
%9 = call i32 @errmsg(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [16 x i8] c"no file to read\00"
define i32 @readfile() {
%1 = tail call i8* (...) @getarg()
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @inputf(i8* %1, i32 0)
br label %7
5: ; preds = %0
%6 = tail call i32 @errmsg(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 undef
}
int addDigits(int num) {
  int r = num % 9;
  if (num != 0 && r == 0)
    r = 9;
  return r;
}


x86 assembly (clang, -O0):
<addDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1130 <addDigits+0x30>
cmpl   $0x0,-0x8(%rbp)
jne    1130 <addDigits+0x30>
movl   $0x9,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addDigits>:
movslq %edi,%rcx
imul   $0x38e38e39,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rax
add    %edx,%eax
lea    (%rax,%rax,8),%eax
mov    %ecx,%edx
sub    %eax,%edx
mov    $0x9,%eax
cmovne %edx,%eax
test   %ecx,%ecx
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @addDigits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 9
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 9, i32* %3
br label %12
12: ; preds = %11, %8, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @addDigits(i32 %0) {
%2 = srem i32 %0, 9
%3 = icmp ne i32 %0, 0
%4 = icmp eq i32 %2, 0
%5 = and i1 %3, %4
%6 = select i1 %5, i32 9, i32 %2
ret i32 %6
}
/* Variables and functions */
double get_native_time();
float platform_get_time(void) {
  static double initial = -1;
  if (initial < 0) {
    initial = get_native_time();
  }
  return (float)(get_native_time() - initial);
}


x86 assembly (clang, -O0):
<platform_get_time>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
ucomisd 0x2f09(%rip),%xmm0
jbe    1134 <platform_get_time+0x24>
mov    $0x0,%al
call   1030 <get_native_time@plt>
movsd  %xmm0,0x2ef4(%rip)
mov    $0x0,%al
call   1030 <get_native_time@plt>
subsd  0x2ee5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_get_time>:
push   %rax
xorpd  %xmm0,%xmm0
ucomisd 0x2f0b(%rip),%xmm0
jbe    112e <platform_get_time+0x1e>
xor    %eax,%eax
call   1030 <get_native_time@plt>
movsd  %xmm0,0x2efa(%rip)
xor    %eax,%eax
call   1030 <get_native_time@plt>
subsd  0x2eeb(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@platform_get_time.initial = internal global double -1.000000e+00
define float @platform_get_time() {
%1 = load double, double* @platform_get_time.initial
%2 = fcmp olt double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call double (...) @get_native_time()
store double %4, double* @platform_get_time.initial
br label %5
5: ; preds = %3, %0
%6 = call double (...) @get_native_time()
%7 = load double, double* @platform_get_time.initial
%8 = fsub double %6, %7
%9 = fptrunc double %8 to float
ret float %9
}

LLVM IR (-O2):
@platform_get_time.initial = internal unnamed_addr global double -1.000000e+00
define float @platform_get_time() {
%1 = load double, double* @platform_get_time.initial
%2 = fcmp olt double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call double (...) @get_native_time()
store double %4, double* @platform_get_time.initial
br label %5
5: ; preds = %3, %0
%6 = tail call double (...) @get_native_time()
%7 = load double, double* @platform_get_time.initial
%8 = fsub double %6, %7
%9 = fptrunc double %8 to float
ret float %9
}
int main() {
  int arg1 = -105;
  int sar = 0;
  __asm__("sarl $4, %%eax;" : "=a"(sar) : "a"(arg1));
  if (sar != -7) {
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffff97,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xfffffff9,-0xc(%rbp)
je     1145 <main+0x35>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffff97,%eax
sar    $0x4,%eax
cmp    $0xfffffff9,%eax
jne    1120 <main+0x10>
xor    %eax,%eax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -105, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 asm "sarl $$4, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, -7
br i1 %7, label %8, label %9
8: ; preds = %0
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "sarl $$4, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 -105)
%2 = icmp eq i32 %1, -7
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
ret i32 0
}
void f(int *ip, float *fp) {
  if (((ip) < (fp))) {
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    1122 <f+0x22>
jmp    1122 <f+0x22>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
ret

LLVM IR (-O0):
define void @f(i32* %0, float* %1) {
%3 = alloca i32*
%4 = alloca float*
store i32* %0, i32** %3
store float* %1, float** %4
%5 = load i32*, i32** %3
%6 = load float*, float** %4
%7 = bitcast float* %6 to i32*
%8 = icmp ult i32* %5, %7
br i1 %8, label %9, label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @f(i32* nocapture %0, float* nocapture %1) {
ret void
}
void ff_hevc_put_hevc_bi_qpel_v4_10_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_bi_qpel_v4_10_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_bi_qpel_v4_10_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_bi_qpel_v4_10_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v4_10_sse4() {
ret void
}
/* Variables and functions */
char *foo();
int main(int argc, char **argv) {
  const char *s = foo();
  (void)argc;
  (void)argv;
  return (*s == 'x' ? 0 : 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x78,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %ecx,%ecx
cmpb   $0x78,(%rax)
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* (...) @foo()
store i8* %7, i8** %6
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %6
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 120
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @foo()
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 120
%6 = zext i1 %5 to i32
ret i32 %6
}
double mjd2mhjd(mjd, ra, dec, sys)
double mjd;
double ra;
double dec;
int sys;
{
  double lt;
  double dj;
  dj = mjd2jd(mjd);
  lt = suntl(dj, ra, dec, sys);
  return (jd2mjd(dj + lt));
}


x86 assembly (clang, -O0):
<mjd2mhjd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1040 <mjd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%edi
mov    $0x3,%al
call   1050 <suntl@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
mov    $0x1,%al
call   1030 <jd2mjd@plt>
cvtsi2sd %eax,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mjd2mhjd>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
mov    $0x1,%al
call   1040 <mjd2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
mov    %ebx,%edi
mov    $0x3,%al
call   1050 <suntl@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <jd2mjd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @mjd2mhjd(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%11 = load double, double* %5
%12 = call i32 (double, ...) bitcast (i32 (...)* @mjd2jd to i32 (double, ...)*)(double %11)
%13 = sitofp i32 %12 to double
store double %13, double* %10
%14 = load double, double* %10
%15 = load double, double* %6
%16 = load double, double* %7
%17 = load i32, i32* %8
%18 = call i32 (double, double, double, i32, ...) bitcast (i32 (...)* @suntl to i32 (double, double, double, i32, ...)*)(double %14, double %15, double %16, i32 %17)
%19 = sitofp i32 %18 to double
store double %19, double* %9
%20 = load double, double* %10
%21 = load double, double* %9
%22 = fadd double %20, %21
%23 = call i32 (double, ...) bitcast (i32 (...)* @jd2mjd to i32 (double, ...)*)(double %22)
%24 = sitofp i32 %23 to double
ret double %24
}

LLVM IR (-O2):
define double @mjd2mhjd(double %0, double %1, double %2, i32 %3) {
%5 = tail call i32 (double, ...) bitcast (i32 (...)* @mjd2jd to i32 (double, ...)*)(double %0)
%6 = sitofp i32 %5 to double
%7 = tail call i32 (double, double, double, i32, ...) bitcast (i32 (...)* @suntl to i32 (double, double, double, i32, ...)*)(double %6, double %1, double %2, i32 %3)
%8 = sitofp i32 %7 to double
%9 = fadd double %6, %8
%10 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2mjd to i32 (double, ...)*)(double %9)
%11 = sitofp i32 %10 to double
ret double %11
}
__attribute__((no, noclone)) unsigned __int128 t173_2mul(unsigned __int128 y) {
  unsigned __int128 x = (1);
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t173_2mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    %rdx,-0x68(%rbp)
test   %rdx,%rdx
setne  %dl
test   %rax,%rax
setne  %dil
and    %dl,%dil
mul    %rcx
mov    -0x60(%rbp),%rdx
mov    %rax,%rsi
mov    -0x68(%rbp),%rax
seto   %r8b
or     %r8b,%dil
mul    %rdx
mov    %rax,%rdx
mov    -0x60(%rbp),%rax
seto   %r8b
or     %r8b,%dil
mov    %dil,-0x51(%rbp)
add    %rdx,%rsi
mul    %rcx
mov    %rax,%rcx
mov    -0x51(%rbp),%al
add    %rsi,%rdx
setb   %sil
or     %sil,%al
mov    %rcx,-0x50(%rbp)
mov    %rdx,-0x48(%rbp)
test   $0x1,%al
jne    11bd <t173_2mul+0xad>
jmp    11c4 <t173_2mul+0xb4>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t173_2mul>:
mov    %rsi,%rdx
mov    %rdi,%rax
ret

LLVM IR (-O0):
define { i64, i64 } @t173_2mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 1, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t173_2mul(i64 %0, i64 %1) {
%3 = insertvalue { i64, i64 } poison, i64 %0, 0
%4 = insertvalue { i64, i64 } %3, i64 %1, 1
ret { i64, i64 } %4
}
unsigned __SubStrings__Length(register const char *String) {
  register unsigned Inc = 0;
  for (; *String++ != '\0'; ++Inc)
    ;
  return Inc;
}


x86 assembly (clang, -O0):
<__SubStrings__Length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113d <__SubStrings__Length+0x3d>
jmp    112f <__SubStrings__Length+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <__SubStrings__Length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__SubStrings__Length>:
cmpb   $0x0,(%rdi)
je     111c <__SubStrings__Length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <__SubStrings__Length+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__SubStrings__Length(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %4
br label %11
11: ; preds = %10
%12 = load i32, i32* %3
%13 = add i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @__SubStrings__Length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int f5(int x, int y) {
  int s = (x < 0);
  int t = (y < 0);
  return s == t;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @f5(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 0
%12 = zext i1 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @f5(i32 %0, i32 %1) {
%3 = xor i32 %0, %1
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 31
ret i32 %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_safegraph(char *opt) {
  if (strcmp(opt, "-S") == 0)
    return 1;
  if (strcmp(opt, "--simple-graphic") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_safegraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_safegraph+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_safegraph+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_safegraph+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_safegraph+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_safegraph>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_safegraph+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-S\00"
@.str.1 = [17 x i8] c"--simple-graphic\00"
define i32 @opt_safegraph(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"-S\00"
@.str.1 = [17 x i8] c"--simple-graphic\00"
define i32 @opt_safegraph(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ getpid();
int kill(int /*<<< orphan*/, int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
int lisp_sigexit(int signum) {
  signal(signum, SIG_DFL);
  return kill(getpid(), signum);
}


x86 assembly (clang, -O0):
<lisp_sigexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1050 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lisp_sigexit>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1050 <kill@plt>

LLVM IR (-O0):
@SIG_DFL = global i32 0
define i32 @lisp_sigexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_DFL
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = call i32 (...) @getpid()
%7 = load i32, i32* %2
%8 = call i32 @kill(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SIG_DFL = global i32 0
define i32 @lisp_sigexit(i32 %0) {
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @signal(i32 %0, i32 %2)
%4 = tail call i32 (...) @getpid()
%5 = tail call i32 @kill(i32 %4, i32 %0)
ret i32 %5
}
void Init(void) { ; }


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
ret

LLVM IR (-O0):
define void @Init() {
ret void
}

LLVM IR (-O2):
define void @Init() {
ret void
}
const char *pl_get_type(void) {
  static const char *const type = "file";
  return type;
}


x86 assembly (clang, -O0):
<pl_get_type>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_get_type>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@pl_get_type.type = internal constant i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
@.str = [5 x i8] c"file\00"
define i8* @pl_get_type() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"file\00"
define i8* @pl_get_type() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int getchar();
int getKey(void) {
  int key;
  key = getchar();
  return key;
}


x86 assembly (clang, -O0):
<getKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getKey>:
xor    %eax,%eax
jmp    1030 <getchar@plt>

LLVM IR (-O0):
define i32 @getKey() {
%1 = alloca i32
%2 = call i32 (...) @getchar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @getKey() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
size_t hash(void *key) {
  size_t hash = 0;
  const char *k = (const char *)key;
  while (*k) {
    hash = hash * 37 + *k++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <hash+0x49>
imul   $0x25,-0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <hash+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112b <hash+0x2b>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,8),%rdx
lea    (%rax,%rdx,4),%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
store i64 0, i64* %3
%5 = load i8*, i8** %2
store i8* %5, i8** %4
br label %6
6: ; preds = %10, %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i64, i64* %3
%12 = mul i64 %11, 37
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i8, i8* %13
%16 = sext i8 %15 to i64
%17 = add i64 %12, %16
store i64 %17, i64* %3
br label %6
18: ; preds = %6
%19 = load i64, i64* %3
ret i64 %19
}

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = mul i64 %7, 37
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = sext i8 %5 to i64
%11 = add i64 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ my_sprintf(char *, ...);
void test14(char *c) {
  my_sprintf(c);
  my_sprintf(c, 1, 2, 3);
}


x86 assembly (clang, -O0):
<test14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <my_sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x0,%al
call   1030 <my_sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test14>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <my_sprintf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %eax,%eax
pop    %rbx
jmp    1030 <my_sprintf@plt>

LLVM IR (-O0):
define void @test14(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @my_sprintf(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @my_sprintf(i8* %5, i32 1, i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @test14(i8* %0) {
%2 = tail call i32 (i8*, ...) @my_sprintf(i8* %0)
%3 = tail call i32 (i8*, ...) @my_sprintf(i8* %0, i32 1, i32 2, i32 3)
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void portuguese_ISO_8859_1_close_env(struct SN_env *z) {
  SN_close_env(z);
}


x86 assembly (clang, -O0):
<portuguese_ISO_8859_1_close_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <SN_close_env@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<portuguese_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @portuguese_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @portuguese_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Variables and functions */
long euclid_gcd(long, long);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *, long *);
int main(int argc, char **argv) {
  long a = 0, b = 0;
  scanf("%ld %ld", &a, &b);
  long gcd = euclid_gcd(a, b);
  printf("%ld", gcd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <euclid_gcd@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xeb3(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1050 <euclid_gcd@plt>
lea    0xe92(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%ld %ld\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
store i64 0, i64* %7
%9 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %6, i64* %7)
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = call i64 @euclid_gcd(i64 %10, i64 %11)
store i64 %12, i64* %8
%13 = load i64, i64* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%ld %ld\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%6 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %3, i64* %4)
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i64 @euclid_gcd(i64 %8, i64 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %10)
ret i32 0
}
void WeaponAUG_SecondaryFire(void) {}


x86 assembly (clang, -O0):
<WeaponAUG_SecondaryFire>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WeaponAUG_SecondaryFire>:
ret

LLVM IR (-O0):
define void @WeaponAUG_SecondaryFire() {
ret void
}

LLVM IR (-O2):
define void @WeaponAUG_SecondaryFire() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char);
void main(int argc, char *argv[]) {
  while (argc > 0) {
    printf("%s%c", *argv, (argc > 0) ? ' ' : '\n');
    ++argv;
    --argc;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    116c <main+0x5c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x4(%rbp),%edx
mov    $0xa,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
lea    0xeb6(%rip),%rdi
movsbl %al,%edx
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    114c <main+0x3c>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%ebp
lea    0xed9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%rsi
mov    %r14,%rdi
mov    $0x20,%edx
call   1030 <printf@plt>
add    $0x8,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <main+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%c\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = load i8**, i8*** %4
%10 = load i8*, i8** %9
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 32, i32 10
%15 = trunc i32 %14 to i8
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10, i8 signext %15)
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i32 1
store i8** %18, i8*** %4
%19 = load i32, i32* %3
%20 = add nsw i32 %19, -1
store i32 %20, i32* %3
br label %5
21: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%c\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i8** [ %9, %4 ], [ %1, %2 ]
%6 = phi i32 [ %10, %4 ], [ %0, %2 ]
%7 = load i8*, i8** %5
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7, i8 signext 32)
%9 = getelementptr inbounds i8*, i8** %5, i64 1
%10 = add nsw i32 %6, -1
%11 = icmp ugt i32 %6, 1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
int __attribute__((no)) ox(int *i) { return *i + 4 * *i; }


x86 assembly (clang, -O0):
<ox>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ox>:
mov    (%rdi),%eax
lea    (%rax,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @ox(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = mul nsw i32 4, %6
%8 = add nsw i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ox(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul nsw i32 %2, 5
ret i32 %3
}
/* Variables and functions */
int crunch_UnicodeData(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  return crunch_UnicodeData(argv[0], stdin, stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
call   1030 <crunch_UnicodeData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    (%rsi),%rdi
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
jmp    1030 <crunch_UnicodeData@plt>

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i32, i32* @stdin
%10 = load i32, i32* @stdout
%11 = call i32 @crunch_UnicodeData(i8* %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i32, i32* @stdin
%5 = load i32, i32* @stdout
%6 = tail call i32 @crunch_UnicodeData(i8* %3, i32 %4, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
le() { call("ccle"); }


x86 assembly (clang, -O0):
<le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <call@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le>:
lea    0xee9(%rip),%rdi
jmp    1030 <call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ccle\00"
define i32 @le() {
%1 = alloca i32
%2 = call i32 @call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccle\00"
define i32 @le() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int cpuid_ebx(int op) {
  int eax, ecx = 0, edx;
  __asm__("pushq %%rbx\n\tcpuid\nmov %%ebx,%%ecx\n\tpopq %%rbx"
          : "=a"(eax), "+c"(ecx), "=d"(edx)
          : "a"(op));
  return ecx;
}


x86 assembly (clang, -O0):
<cpuid_ebx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
push   %rbx
cpuid
mov    %ebx,%ecx
pop    %rbx
mov    %eax,-0x8(%rbp)
mov    %ecx,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_ebx>:
mov    %edi,%eax
xor    %ecx,%ecx
push   %rbx
cpuid
mov    %ebx,%ecx
pop    %rbx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cpuid_ebx(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = call { i32, i32, i32 } asm "pushq %rbx\0A\09cpuid\0Amov %ebx,%ecx\0A\09popq %rbx", "={ax},={cx},={dx},{ax},1,~{dirflag},~{fpsr},~{flags}"(i32 %7, i32 %6)
%9 = extractvalue { i32, i32, i32 } %8, 0
%10 = extractvalue { i32, i32, i32 } %8, 1
%11 = extractvalue { i32, i32, i32 } %8, 2
store i32 %9, i32* %3
store i32 %10, i32* %4
store i32 %11, i32* %5
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @cpuid_ebx(i32 %0) {
%2 = tail call { i32, i32, i32 } asm "pushq %rbx\0A\09cpuid\0Amov %ebx,%ecx\0A\09popq %rbx", "={ax},={cx},={dx},{ax},1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 0)
%3 = extractvalue { i32, i32, i32 } %2, 1
ret i32 %3
}
char *langRomTypeDiskPatch() { return "Normal + Disk Patch"; }


x86 assembly (clang, -O0):
<langRomTypeDiskPatch>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeDiskPatch>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Normal + Disk Patch\00"
define i8* @langRomTypeDiskPatch() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [20 x i8] c"Normal + Disk Patch\00"
define i8* @langRomTypeDiskPatch() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void init() {
  freopen("ball.in", "r", stdin);
  freopen("ball.out", "w+", stdout);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edx
lea    0xedc(%rip),%rdi
lea    0xedd(%rip),%rsi
call   1030 <freopen@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
lea    0xeca(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1030 <freopen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
lea    0xedf(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <freopen@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    0xecd(%rip),%rdi
lea    0xecf(%rip),%rsi
pop    %rax
jmp    1030 <freopen@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"ball.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"ball.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
define void @init() {
%1 = load i32, i32* @stdin
%2 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"ball.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"ball.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
define void @init() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *itoa(int n, char *p) {
  sprintf(p, "%d", n);
  return (p);
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%edx
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0, i8* returned writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %1
}
void close_map_base() { ; }


x86 assembly (clang, -O0):
<close_map_base>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_map_base>:
ret

LLVM IR (-O0):
define void @close_map_base() {
ret void
}

LLVM IR (-O2):
define void @close_map_base() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mvaddstr(int, int, char *);
int /*<<< orphan*/ refresh();
void challenge_mode() {
  mvaddstr(1, 3, "Challenge 1");
  mvaddstr(2, 3, "Challenge 2");
  mvaddstr(3, 3, "Challenge 3");
  refresh();
}


x86 assembly (clang, -O0):
<challenge_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x3,%esi
lea    0xecb(%rip),%rdx
call   1040 <mvaddstr@plt>
mov    $0x2,%edi
mov    $0x3,%esi
lea    0xec1(%rip),%rdx
call   1040 <mvaddstr@plt>
mov    $0x3,%esi
lea    0xebc(%rip),%rdx
mov    %esi,%edi
call   1040 <mvaddstr@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<challenge_mode>:
push   %rax
lea    0xed8(%rip),%rdx
mov    $0x1,%edi
mov    $0x3,%esi
call   1040 <mvaddstr@plt>
lea    0xece(%rip),%rdx
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <mvaddstr@plt>
lea    0xec4(%rip),%rdx
mov    $0x3,%edi
mov    $0x3,%esi
call   1040 <mvaddstr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <refresh@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Challenge 1\00"
@.str.1 = [12 x i8] c"Challenge 2\00"
@.str.2 = [12 x i8] c"Challenge 3\00"
define void @challenge_mode() {
%1 = call i32 @mvaddstr(i32 1, i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mvaddstr(i32 2, i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @mvaddstr(i32 3, i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Challenge 1\00"
@.str.1 = [12 x i8] c"Challenge 2\00"
@.str.2 = [12 x i8] c"Challenge 3\00"
define void @challenge_mode() {
%1 = tail call i32 @mvaddstr(i32 1, i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @mvaddstr(i32 2, i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @mvaddstr(i32 3, i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @refresh()
ret void
}
cap(u) unsigned u;
{
  register unsigned *p = &u;
  if (*p >= 'a' && *p <= 'z')
    *p += 'A' - 'a';
}


x86 assembly (clang, -O0):
<cap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x61,(%rax)
jb     1134 <cap+0x34>
mov    -0x10(%rbp),%rax
cmpl   $0x7a,(%rax)
ja     1134 <cap+0x34>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffe0,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cap>:
ret

LLVM IR (-O0):
define i32 @cap(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %3, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = icmp uge i32 %6, 97
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = icmp ule i32 %10, 122
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add i32 %14, -32
store i32 %15, i32* %13
br label %16
16: ; preds = %12, %8, %1
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @cap(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x34() {
  Assert_real((isgraph(52)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              265, ("isgraph should be 1 for 4"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x34>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x109,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x34>:
push   %rax
mov    $0x34,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x109,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for 4\00"
define void @t_isgraph_0x34() {
%1 = call i32 @isgraph(i32 52)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for 4\00"
define void @t_isgraph_0x34() {
%1 = tail call i32 @isgraph(i32 52)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}