xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ isalpha(char);
int isAllAlpha(char *s) {
  char c;
  while ((c = *s++) != 0) {
    if (!isalpha(c))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isAllAlpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     115f <isAllAlpha+0x4f>
movsbl -0x11(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%eax
jne    115a <isAllAlpha+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isAllAlpha+0x56>
jmp    111c <isAllAlpha+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAllAlpha>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     113b <isAllAlpha+0x2b>
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <isalpha@plt>
test   %eax,%eax
jne    1120 <isAllAlpha+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isAllAlpha(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = tail call i32 @isalpha(i8 signext %4)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %2, %6
%11 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ g(int, int);
__attribute__((__noclone__)) int f(int a) {
  if (a > 0)
    g(a, 3);
  else
    g(a, 5);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1137 <f+0x27>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1030 <g@plt>
jmp    1144 <f+0x34>
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
test   %edi,%edi
setle  %al
lea    (%rax,%rax,1),%esi
add    $0x3,%esi
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 3, i32 5
%4 = tail call i32 @g(i32 %0, i32 %3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ cdfCloseFile(int);
void cdfClose(int fileID) { cdfCloseFile(fileID); }


x86 assembly (clang, -O0):
<cdfClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <cdfCloseFile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdfClose>:
jmp    1030 <cdfCloseFile@plt>

LLVM IR (-O0):
define void @cdfClose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cdfCloseFile(i32 %3)
ret void
}

LLVM IR (-O2):
define void @cdfClose(i32 %0) {
%2 = tail call i32 @cdfCloseFile(i32 %0)
ret void
}
void test() { int a, b, c; }


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

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

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
ret void
}

LLVM IR (-O2):
define void @test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned long *);
void bitmap_free(unsigned long *bitmap) { free(bitmap); }


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

x86 assembly (clang, -O2):
<bitmap_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @bitmap_free(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i32 @free(i64* %3)
ret void
}

LLVM IR (-O2):
define void @bitmap_free(i64* nocapture %0) {
%2 = tail call i32 @free(i64* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void dbgp_args_free(char **argv) { free(argv); }


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

x86 assembly (clang, -O2):
<dbgp_args_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @dbgp_args_free(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @free(i8** %3)
ret void
}

LLVM IR (-O2):
define void @dbgp_args_free(i8** nocapture %0) {
%2 = tail call i32 @free(i8** %0)
ret void
}
int test_imm_22int32_mem(int *val) {
  return ((*val) & (0x22 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_22int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x22,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_22int32_mem>:
testb  $0x22,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_22int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 34
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_22int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 34
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ candy();
void foo() { candy(); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <candy@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = call i32 (...) @candy()
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @candy()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_str(void *p) {
  free(p);
  p = NULL;
}


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

x86 assembly (clang, -O2):
<free_str>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_str(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
store i8* null, i8** %2
ret void
}

LLVM IR (-O2):
define void @free_str(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int dup(int);
int /*<<< orphan*/ dup2(int, int);
int substitute(int desc, int target) {
  int k = dup(target);
  close(target);
  dup2(desc, target);
  close(desc);
  return k;
}


x86 assembly (clang, -O0):
<substitute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <dup@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <close@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    -0x4(%rbp),%edi
call   1050 <close@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<substitute>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1040 <dup@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1050 <close@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <dup2@plt>
mov    %ebp,%edi
call   1050 <close@plt>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @substitute(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @dup(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = call i32 @close(i32 %8)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @dup2(i32 %10, i32 %11)
%13 = load i32, i32* %3
%14 = call i32 @close(i32 %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @substitute(i32 %0, i32 %1) {
%3 = tail call i32 @dup(i32 %1)
%4 = tail call i32 @close(i32 %1)
%5 = tail call i32 @dup2(i32 %0, i32 %1)
%6 = tail call i32 @close(i32 %0)
ret i32 %3
}
float convert_adc_voltage(float adc_volts) {
  float kv;
  kv = adc_volts * (1E9 / 94.34E3 / 1000.) + 1.43;
  if (kv < 0.0 && kv > -0.1) {
    kv = 0;
  }
  return kv;
}


x86 assembly (clang, -O0):
<convert_adc_voltage>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    116c <convert_adc_voltage+0x6c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116c <convert_adc_voltage+0x6c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_adc_voltage>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
ucomisd 0xee9(%rip),%xmm0
xorps  %xmm3,%xmm3
xorps  %xmm2,%xmm2
ja     1132 <convert_adc_voltage+0x32>
movaps %xmm1,%xmm2
movaps %xmm1,%xmm0
cmpltss %xmm3,%xmm0
andps  %xmm0,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @convert_adc_voltage(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 0x4025332DA47F6E1E, double 1.430000e+00)
%7 = fptrunc double %6 to float
store float %7, float* %3
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fcmp olt double %9, 0.000000e+00
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fcmp ogt double %13, -1.000000e-01
br i1 %14, label %15, label %16
15: ; preds = %11
store float 0.000000e+00, float* %3
br label %16
16: ; preds = %15, %11, %1
%17 = load float, float* %3
ret float %17
}

LLVM IR (-O2):
define float @convert_adc_voltage(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0x4025332DA47F6E1E, double 1.430000e+00)
%4 = fptrunc double %3 to float
%5 = fcmp olt float %4, 0.000000e+00
%6 = fpext float %4 to double
%7 = fcmp ogt double %6, -1.000000e-01
%8 = and i1 %5, %7
%9 = select i1 %8, float 0.000000e+00, float %4
ret float %9
}
/* Variables and functions */
int FE_DIVBYZERO;
int FE_INVALID;
int FE_OVERFLOW;
int /*<<< orphan*/ feenableexcept(int);
void __attribute__((constructor)) trapfpe(void) {
  feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
}


x86 assembly (clang, -O0):
<trapfpe>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
or     (%rax),%edi
mov    0x2ea3(%rip),%rax
or     (%rax),%edi
call   1030 <feenableexcept@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trapfpe>:
mov    0x2ed9(%rip),%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
mov    0x2ea7(%rip),%rax
or     (%rax),%edi
jmp    1030 <feenableexcept@plt>

LLVM IR (-O0):
@FE_INVALID = global i32 0
@FE_DIVBYZERO = global i32 0
@FE_OVERFLOW = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @trapfpe, i8* null }]
define void @trapfpe() {
%1 = load i32, i32* @FE_INVALID
%2 = load i32, i32* @FE_DIVBYZERO
%3 = or i32 %1, %2
%4 = load i32, i32* @FE_OVERFLOW
%5 = or i32 %3, %4
%6 = call i32 @feenableexcept(i32 %5)
ret void
}

LLVM IR (-O2):
@FE_INVALID = global i32 0
@FE_DIVBYZERO = global i32 0
@FE_OVERFLOW = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @trapfpe, i8* null }]
define void @trapfpe() {
%1 = load i32, i32* @FE_INVALID
%2 = load i32, i32* @FE_DIVBYZERO
%3 = or i32 %2, %1
%4 = load i32, i32* @FE_OVERFLOW
%5 = or i32 %3, %4
%6 = tail call i32 @feenableexcept(i32 %5)
ret void
}
int c1_direct(int x) { return x + 1; }


x86 assembly (clang, -O0):
<c1_direct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c1_direct>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @c1_direct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @c1_direct(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
void fa119(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    a:
      ({
        p024A:
          goto p024A;
          goto a;
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa119>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa119+0x4>

x86 assembly (clang, -O2):
<fa119>:
jmp    1100 <fa119>

LLVM IR (-O0):
define void @fa119() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %17
br label %19
19: ; preds = %19, %18
br label %19
20: ; preds = %20
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa119() {
br label %1
1: ; preds = %1, %0
br label %1
}
unsigned char getBit(int m, int n) { return ((m >> n) & 1); }


x86 assembly (clang, -O0):
<getBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBit>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i8 @getBit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %5, %6
%8 = and i32 %7, 1
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @getBit(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = trunc i32 %3 to i8
%5 = and i8 %4, 1
ret i8 %5
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int is_file_exists(const char *filename) {
  struct stat s;
  if (stat(filename, &s) != 0)
    return ((int)0);
  return ((int)1);
}


x86 assembly (clang, -O0):
<is_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <is_file_exists+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <is_file_exists+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ display(int);
void main() {
  int a, b, c;
  a = 1;
  b = 0;
  c = a / b;
  display(c);
  a = -1;
  c = a / b;
  display(c);
  a = 0;
  c = a / b;
  display(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <display@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <display@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <display@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <display@plt>
call   1030 <display@plt>
pop    %rax
jmp    1030 <display@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 0, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = sdiv i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @display(i32 %7)
store i32 -1, i32* %1
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = sdiv i32 %9, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 @display(i32 %12)
store i32 0, i32* %1
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = sdiv i32 %14, %15
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = call i32 @display(i32 %17)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @display(i32 poison)
%2 = tail call i32 @display(i32 poison)
%3 = tail call i32 @display(i32 poison)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "who"
        " [-mT]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Usage: who [-mT]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [18 x i8] c"Usage: who [-mT]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test7();
int /*<<< orphan*/ test8();
int main(int argc, char **argv) {
  test3();
  test7();
  test8();
  return 0;
}


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    $0x0,%al
call   1040 <test3@plt>
mov    $0x0,%al
call   1030 <test7@plt>
mov    $0x0,%al
call   1050 <test8@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test3@plt>
xor    %eax,%eax
call   1030 <test7@plt>
xor    %eax,%eax
call   1050 <test8@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = call i32 (...) @test3()
%7 = call i32 (...) @test7()
%8 = call i32 (...) @test8()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test3()
%4 = tail call i32 (...) @test7()
%5 = tail call i32 (...) @test8()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cmp(short, short);
void main() {
  cmp(1578, 2023);
  cmp(4267, 3034);
  cmp(392, 507);
  cmp(321, (short)21);
  cmp((short)32, 432);
  cmp((short)54, (short)54);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x62a,%edi
mov    $0x7e7,%esi
call   1030 <cmp@plt>
mov    $0x10ab,%edi
mov    $0xbda,%esi
call   1030 <cmp@plt>
mov    $0x188,%edi
mov    $0x1fb,%esi
call   1030 <cmp@plt>
mov    $0x141,%edi
mov    $0x15,%esi
call   1030 <cmp@plt>
mov    $0x20,%edi
mov    $0x1b0,%esi
call   1030 <cmp@plt>
mov    $0x36,%esi
mov    %esi,%edi
call   1030 <cmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x62a,%edi
mov    $0x7e7,%esi
call   1030 <cmp@plt>
mov    $0x10ab,%edi
mov    $0xbda,%esi
call   1030 <cmp@plt>
mov    $0x188,%edi
mov    $0x1fb,%esi
call   1030 <cmp@plt>
mov    $0x141,%edi
mov    $0x15,%esi
call   1030 <cmp@plt>
mov    $0x20,%edi
mov    $0x1b0,%esi
call   1030 <cmp@plt>
mov    $0x36,%edi
mov    $0x36,%esi
pop    %rax
jmp    1030 <cmp@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @cmp(i16 signext 1578, i16 signext 2023)
%2 = call i32 @cmp(i16 signext 4267, i16 signext 3034)
%3 = call i32 @cmp(i16 signext 392, i16 signext 507)
%4 = call i32 @cmp(i16 signext 321, i16 signext 21)
%5 = call i32 @cmp(i16 signext 32, i16 signext 432)
%6 = call i32 @cmp(i16 signext 54, i16 signext 54)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @cmp(i16 signext 1578, i16 signext 2023)
%2 = tail call i32 @cmp(i16 signext 4267, i16 signext 3034)
%3 = tail call i32 @cmp(i16 signext 392, i16 signext 507)
%4 = tail call i32 @cmp(i16 signext 321, i16 signext 21)
%5 = tail call i32 @cmp(i16 signext 32, i16 signext 432)
%6 = tail call i32 @cmp(i16 signext 54, i16 signext 54)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x85() {
  Assert_real((isprint(133) == 0),
              "/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_isprint.c",
              670, ("isprint should be 0 for 0x85"));
}


x86 assembly (clang, -O0):
<t_isprint_0x85>:
push   %rbp
mov    %rsp,%rbp
mov    $0x85,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x29e,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x85>:
push   %rax
mov    $0x85,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x29e,%edx
pop    %rax
jmp    1040 <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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x85\00"
define void @t_isprint_0x85() {
%1 = call i64 @isprint(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x85\00"
define void @t_isprint_0x85() {
%1 = tail call i64 @isprint(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void routineA(int a, int b) { printf("%d\n", a + b); }


x86 assembly (clang, -O0):
<routineA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<routineA>:
add    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @routineA(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
gen_greater_or_equal() {
  gen_pop();
  gen_call("ccge");
}


x86 assembly (clang, -O0):
<gen_greater_or_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xeca(%rip),%rdi
call   1040 <gen_call@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_greater_or_equal>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"ccge\00"
define i32 @gen_greater_or_equal() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_swi_init();
void nrf_802154_notification_init(void) { nrf_802154_swi_init(); }


x86 assembly (clang, -O0):
<nrf_802154_notification_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_802154_swi_init@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nrf_802154_notification_init() {
%1 = call i32 (...) @nrf_802154_swi_init()
ret void
}

LLVM IR (-O2):
define void @nrf_802154_notification_init() {
%1 = tail call i32 (...) @nrf_802154_swi_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MaxMin(int *, int, int, int /*<<< orphan*/);
int main() {
  int vetor[10] = {9, 2, 1, 8, 6, 3, 4, 5, 0, 7};
  MaxMin(vetor, vetor[0], vetor[0], 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    -0x30(%rbp),%edx
xor    %ecx,%ecx
call   1040 <MaxMin@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
xor    %ecx,%ecx
call   1030 <MaxMin@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.vetor = [10 x i32] [i32 9, i32 2, i32 1, i32 8, i32 6, i32 3, i32 4, i32 5, i32 0, i32 7]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %7
%9 = call i32 @MaxMin(i32* %4, i32 %6, i32 %8, i32 0)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vetor = [10 x i32] [i32 9, i32 2, i32 1, i32 8, i32 6, i32 3, i32 4, i32 5, i32 0, i32 7]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @MaxMin(i32* %3, i32 9, i32 9, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isspace(int);
int isnotspace(int c) { return !isspace(c); }


x86 assembly (clang, -O0):
<isnotspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnotspace>:
push   %rax
call   1030 <isspace@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isnotspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @isspace(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isnotspace(i32 %0) {
%2 = tail call i32 @isspace(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int gcd(int a, int b) {
  if (b > a) {
    int tmp = b;
    b = a;
    a = tmp;
  }
  if (b == 1) {
    return b;
  } else if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    113c <gcd+0x2c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1151 <gcd+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <gcd+0x70>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    116c <gcd+0x5c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <gcd+0x70>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %eax,%edx
mov    %edx,%ecx
cmovg  %eax,%ecx
cmp    $0x1,%ecx
je     112a <gcd+0x2a>
cmp    %eax,%edx
cmovg  %edx,%eax
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* %5
store i32 %11, i32* %6
%12 = load i32, i32* %4
store i32 %12, i32* %5
%13 = load i32, i32* %6
store i32 %13, i32* %4
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* %5
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* %5
store i32 %18, i32* %3
br label %32
19: ; preds = %14
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = srem i32 %20, %21
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = load i32, i32* %5
store i32 %25, i32* %3
br label %32
26: ; preds = %19
%27 = load i32, i32* %5
%28 = load i32, i32* %4
%29 = load i32, i32* %5
%30 = srem i32 %28, %29
%31 = call i32 @gcd(i32 %27, i32 %30)
store i32 %31, i32* %3
br label %32
32: ; preds = %26, %24, %17
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i32 [ %0, %2 ], [ %7, %9 ]
%5 = phi i32 [ %1, %2 ], [ %11, %9 ]
%6 = icmp sgt i32 %5, %4
%7 = select i1 %6, i32 %4, i32 %5
%8 = icmp eq i32 %7, 1
br i1 %8, label %13, label %9
9: ; preds = %3
%10 = select i1 %6, i32 %5, i32 %4
%11 = srem i32 %10, %7
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %3
13: ; preds = %9, %3
ret i32 %7
}
/* Variables and functions */
double expl(double);
double exp(double x) { return expl(x); }


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

x86 assembly (clang, -O2):
<exp>:
jmp    1030 <expl@plt>

LLVM IR (-O0):
define double @exp(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @expl(double %3)
ret double %4
}

LLVM IR (-O2):
define double @exp(double %0) {
%2 = tail call double @expl(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void check_alloc_unpack(void *ptr) {
  if (!ptr) {
    fprintf(stderr, "alloc error: OUT OF MEMORY\n");
  }
}


x86 assembly (clang, -O0):
<check_alloc_unpack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <check_alloc_unpack+0x2c>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_alloc_unpack>:
test   %rdi,%rdi
je     1116 <check_alloc_unpack+0x6>
ret
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"alloc error: OUT OF MEMORY\0A\00"
define void @check_alloc_unpack(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"alloc error: OUT OF MEMORY\0A\00"
define void @check_alloc_unpack(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %1
ret void
}
void _M2_Selective_finish() {}


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

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

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

LLVM IR (-O2):
define void @_M2_Selective_finish() {
ret void
}
/* Variables and functions */
int log10l(long double);
long double db20(long double x) {
  if (x < 1.e-20)
    return (-999.99);
  return (20. * log10l(x));
}


x86 assembly (clang, -O0):
<db20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldl   0xed9(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1144 <db20+0x34>
jmp    1136 <db20+0x26>
fldl   0xed4(%rip)
fstpt  -0x10(%rbp)
jmp    116c <db20+0x5c>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log10l@plt>
cvtsi2sd %eax,%xmm0
movsd  0xeab(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
fldl   -0x28(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db20>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fldl   0xee2(%rip)
fldl   0xee4(%rip)
fucomip %st(2),%st
ja     114c <db20+0x3c>
fstp   %st(0)
fstpt  (%rsp)
call   1030 <log10l@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xed2(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
fldl   0x10(%rsp)
fldz
fxch   %st(1)
fstp   %st(1)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @db20(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %3
%5 = fcmp olt x86_fp80 %4, 0xK3FBCBCE5086492111800
br i1 %5, label %6, label %7
6: ; preds = %1
store x86_fp80 0xKC008F9FF5C28F5C29000, x86_fp80* %2
br label %13
7: ; preds = %1
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @log10l(x86_fp80 %8)
%10 = sitofp i32 %9 to double
%11 = fmul double 2.000000e+01, %10
%12 = fpext double %11 to x86_fp80
store x86_fp80 %12, x86_fp80* %2
br label %13
13: ; preds = %7, %6
%14 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %14
}

LLVM IR (-O2):
define x86_fp80 @db20(x86_fp80 %0) {
%2 = fcmp olt x86_fp80 %0, 0xK3FBCBCE5086492111800
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @log10l(x86_fp80 %0)
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 2.000000e+01
%7 = fpext double %6 to x86_fp80
br label %8
8: ; preds = %1, %3
%9 = phi x86_fp80 [ %7, %3 ], [ 0xKC008F9FF5C28F5C29000, %1 ]
ret x86_fp80 %9
}
/* Variables and functions */
int /*<<< orphan*/ init_or_fini(int);
void iftable_fini(void) { init_or_fini(1); }


x86 assembly (clang, -O0):
<iftable_fini>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <init_or_fini@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iftable_fini>:
mov    $0x1,%edi
jmp    1030 <init_or_fini@plt>

LLVM IR (-O0):
define void @iftable_fini() {
%1 = call i32 @init_or_fini(i32 1)
ret void
}

LLVM IR (-O2):
define void @iftable_fini() {
%1 = tail call i32 @init_or_fini(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arr_access(int *, char *, int);
char *malloc(int);
void function_call() {
  int arr[10];
  arr[0] = 100;
  char *p = malloc(10);
  arr_access(arr, p, 20);
}


x86 assembly (clang, -O0):
<function_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x64,-0x30(%rbp)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    $0x14,%edx
call   1040 <arr_access@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_call>:
sub    $0x28,%rsp
movl   $0x64,(%rsp)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rsp,%rdi
mov    %rax,%rsi
mov    $0x14,%edx
call   1040 <arr_access@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @function_call() {
%1 = alloca [10 x i32]
%2 = alloca i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 100, i32* %3
%4 = call i8* @malloc(i32 10)
store i8* %4, i8** %2
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @arr_access(i32* %5, i8* %6, i32 20)
ret void
}

LLVM IR (-O2):
define void @function_call() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 100, i32* %3
%4 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%5 = call i32 @arr_access(i32* %3, i8* %4, i32 20)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void Usage(const char *progname) {
  fprintf(stderr, "Usage : %s [charset]\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Usage : %s [charset]\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Usage : %s [charset]\0A\00"
define void @Usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int hash_char2(int);
int hash_char2_int2(int);
int hash_int2(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int tsize = 31;
  printf("HASH VALUE: %d\n", hash_char2(tsize));
  printf("HASH VALUE: %d\n", hash_int2(tsize));
  printf("HASH VALUE: %d\n", hash_char2_int2(tsize));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1f,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <hash_char2@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash_int2@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <hash_char2_int2@plt>
mov    %eax,%esi
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1f,%edi
call   1060 <hash_char2@plt>
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1f,%edi
call   1030 <hash_int2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x1f,%edi
call   1050 <hash_char2_int2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"HASH VALUE: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 31, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @hash_char2(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @hash_int2(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @hash_char2_int2(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"HASH VALUE: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @hash_char2(i32 31)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @hash_int2(i32 31)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @hash_char2_int2(i32 31)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
int omp_test_lock(omp_lock_t *lock) {}


x86 assembly (clang, -O0):
<omp_test_lock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @omp_test_lock(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @omp_test_lock(i32* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xe2() {
  Assert_real((iscntrl(226) == 0),
              "/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_iscntrl.c",
              1135, ("iscntrl should be 0 for 0xe2"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xe2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe2,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x46f,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xe2>:
push   %rax
mov    $0xe2,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46f,%edx
pop    %rax
jmp    1040 <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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xe2\00"
define void @t_iscntrl_0xe2() {
%1 = call i64 @iscntrl(i32 226)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1135, i8* getelementptr inbounds ([29 x i8], [29 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xe2\00"
define void @t_iscntrl_0xe2() {
%1 = tail call i64 @iscntrl(i32 226)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int draw_robot(long x, long y, int th, int tu, int mode) {
  x = x;
  y = y;
  th = th;
  tu = tu;
  mode = mode;
  return (1);
}


x86 assembly (clang, -O0):
<draw_robot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_robot>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @draw_robot(i64 %0, i64 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i64, i64* %6
store i64 %11, i64* %6
%12 = load i64, i64* %7
store i64 %12, i64* %7
%13 = load i32, i32* %8
store i32 %13, i32* %8
%14 = load i32, i32* %9
store i32 %14, i32* %9
%15 = load i32, i32* %10
store i32 %15, i32* %10
ret i32 1
}

LLVM IR (-O2):
define i32 @draw_robot(i64 %0, i64 %1, i32 %2, i32 %3, i32 %4) {
ret i32 1
}
void mz_free(void *p) { (void)p, ((void)0); }


x86 assembly (clang, -O0):
<mz_free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mz_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @mz_free(i8* nocapture %0) {
ret void
}