xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x1f() {
  Assert_real((islower(31) == 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_islower.c",
              160, ("islower should be 0 for 0x1f"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x1f>:
push   %rax
mov    $0x1f,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa0,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x1f\00"
define void @t_islower_0x1f() {
%1 = call i64 @islower(i32 31)
%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 160, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x1f\00"
define void @t_islower_0x1f() {
%1 = tail call i64 @islower(i32 31)
%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 160, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_write_reg(int, int);
void i2c_write_clock_scale(int scale) {
  i2c_write_reg(0, scale & 0xff);
  i2c_write_reg(1, scale >> 8);
}


x86 assembly (clang, -O0):
<i2c_write_clock_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
and    $0xff,%esi
xor    %edi,%edi
call   1030 <i2c_write_reg@plt>
mov    -0x4(%rbp),%esi
sar    $0x8,%esi
mov    $0x1,%edi
call   1030 <i2c_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write_clock_scale>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%esi
xor    %edi,%edi
call   1030 <i2c_write_reg@plt>
sar    $0x8,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <i2c_write_reg@plt>

LLVM IR (-O0):
define void @i2c_write_clock_scale(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = call i32 @i2c_write_reg(i32 0, i32 %4)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = call i32 @i2c_write_reg(i32 1, i32 %7)
ret void
}

LLVM IR (-O2):
define void @i2c_write_clock_scale(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @i2c_write_reg(i32 0, i32 %2)
%4 = ashr i32 %0, 8
%5 = tail call i32 @i2c_write_reg(i32 1, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_pi16(int /*<<< orphan*/, int);
__m64 test67(__m64 a) { return _mm_slli_pi16(a, 3); }


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

x86 assembly (clang, -O2):
<test67>:
mov    $0x3,%esi
jmp    1030 <_mm_slli_pi16@plt>

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

LLVM IR (-O2):
define i32 @test67(i32 %0) {
%2 = tail call i32 @_mm_slli_pi16(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
double tanh(double);
double tanh_lin_grad(double x) {
  double tx = tanh(x);
  return 1.0 - tx * tx + 1.0;
}


x86 assembly (clang, -O0):
<tanh_lin_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <tanh@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe9b(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanh_lin_grad>:
push   %rax
call   1030 <tanh@plt>
mulsd  %xmm0,%xmm0
movsd  0xede(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @tanh_lin_grad(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @tanh(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fneg double %6
%9 = call double @llvm.fmuladd.f64(double %8, double %7, double 1.000000e+00)
%10 = fadd double %9, 1.000000e+00
ret double %10
}

LLVM IR (-O2):
define double @tanh_lin_grad(double %0) {
%2 = tail call double @tanh(double %0)
%3 = fneg double %2
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 1.000000e+00)
%5 = fadd double %4, 1.000000e+00
ret double %5
}
/* Type definitions */
typedef double int32_t;

/* Variables and functions */
int32_t pzx_cycles(int32_t pc) {
  double d = pc;
  return (int32_t)(((d * 3.5) / 4.772728) + 0.5);
}


x86 assembly (clang, -O0):
<pzx_cycles>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xef5(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pzx_cycles>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @pzx_cycles(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %3
%6 = fmul double %5, 3.500000e+00
%7 = fdiv double %6, 0x401317460242D05F
%8 = fadd double %7, 5.000000e-01
ret double %8
}

LLVM IR (-O2):
define double @pzx_cycles(double %0) {
%2 = fmul double %0, 3.500000e+00
%3 = fdiv double %2, 0x401317460242D05F
%4 = fadd double %3, 5.000000e-01
ret double %4
}
unsigned int decimal_number_length(int n) {
  int digits;
  digits = n < 0;
  do {
    digits++;
  } while (n /= 10);
  return digits;
}


x86 assembly (clang, -O0):
<decimal_number_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jne    1116 <decimal_number_length+0x16>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimal_number_length>:
mov    %edi,%eax
shr    $0x1f,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <decimal_number_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @decimal_number_length(i32 %0) {
%2 = lshr i32 %0, 31
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %7, %3 ]
%5 = phi i32 [ %2, %1 ], [ %6, %3 ]
%6 = add nuw nsw i32 %5, 1
%7 = sdiv i32 %4, 10
%8 = add i32 %4, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
int /*<<< orphan*/ vconst(int /*<<< orphan*/);
void zcarryconv(void) {
  vconst(0);
  ol("rl\tl");
}


x86 assembly (clang, -O0):
<zcarryconv>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <vconst@plt>
lea    0xece(%rip),%rdi
call   1030 <ol@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zcarryconv>:
push   %rax
xor    %edi,%edi
call   1040 <vconst@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"rl\09l\00"
define void @zcarryconv() {
%1 = call i32 @vconst(i32 0)
%2 = call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"rl\09l\00"
define void @zcarryconv() {
%1 = tail call i32 @vconst(i32 0)
%2 = tail call i32 @ol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
int yytransparent(n)
int n;
{
  switch (n) {
  case 1:
    return 1;
    break;
  case 6:
    return 1;
    break;
  case 14:
    return 1;
    break;
  case 17:
    return 0;
    break;
  case 21:
    return 0;
    break;
  case 37:
    return 0;
    break;
  case 53:
    return 0;
    break;
  }
}


x86 assembly (clang, -O0):
<yytransparent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x34,%eax
ja     117f <yytransparent+0x7f>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    117f <yytransparent+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <yytransparent+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <yytransparent+0x7f>
movl   $0x0,-0x4(%rbp)
jmp    117f <yytransparent+0x7f>
movl   $0x0,-0x4(%rbp)
jmp    117f <yytransparent+0x7f>
movl   $0x0,-0x4(%rbp)
jmp    117f <yytransparent+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yytransparent>:
add    $0xffffffef,%edi
rol    $0x1e,%edi
mov    $0x1,%eax
cmp    $0x9,%edi
ja     111d <yytransparent+0x1d>
movslq %edi,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @yytransparent(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %12 [
i32 1, label %5
i32 6, label %6
i32 14, label %7
i32 17, label %8
i32 21, label %9
i32 37, label %10
i32 53, label %11
]
5: ; preds = %1
store i32 1, i32* %2
br label %12
6: ; preds = %1
store i32 1, i32* %2
br label %12
7: ; preds = %1
store i32 1, i32* %2
br label %12
8: ; preds = %1
store i32 0, i32* %2
br label %12
9: ; preds = %1
store i32 0, i32* %2
br label %12
10: ; preds = %1
store i32 0, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %5, %6, %7, %8, %9, %10, %11, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@switch.table.yytransparent = [10 x i32] [i32 0, i32 0, i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 0]
define i32 @yytransparent(i32 %0) {
%2 = add i32 %0, -17
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %2, i32 30)
%4 = icmp ult i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.yytransparent, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ 1, %1 ], [ %8, %5 ]
ret i32 %10
}
unsigned int SDBMHash(unsigned char *str) {
  unsigned int hash = 0;
  int c;
  while ((c = *str++)) {
    hash = c + (hash << 6) + (hash << 16) - hash;
  }
  return (hash & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<SDBMHash>:
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)
movzbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     114b <SDBMHash+0x4b>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <SDBMHash+0xf>
mov    -0xc(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDBMHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <SDBMHash+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
imul   $0x1003f,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <SDBMHash+0x10>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @SDBMHash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %5
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = shl i32 %13, 6
%15 = add i32 %12, %14
%16 = load i32, i32* %3
%17 = shl i32 %16, 16
%18 = add i32 %15, %17
%19 = load i32, i32* %3
%20 = sub i32 %18, %19
store i32 %20, i32* %3
br label %5
21: ; preds = %5
%22 = load i32, i32* %3
%23 = and i32 %22, 2147483647
ret i32 %23
}

LLVM IR (-O2):
define i32 @SDBMHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 65599
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
int test2(int i) {
  bar();
  foo();
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    $0x0,%al
call   1040 <foo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <foo@plt>

LLVM IR (-O0):
define i32 @test2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @bar()
%5 = call i32 (...) @foo()
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @test2(i32 %0) {
%2 = tail call i32 (...) @bar()
%3 = tail call i32 (...) @foo()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void child_handler(int sig) {
  (void)sig;
  printf("Handled SIGCHLD\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<child_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Handled SIGCHLD\0A\00"
@stdout = global i32 0
define void @child_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [16 x i8] c"Handled SIGCHLD\00"
define void @child_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AlarmToTimerC__0__Alarm__fired();
void TransformAlarmC__0__Alarm__fired(void) {
  AlarmToTimerC__0__Alarm__fired();
}


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

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

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

LLVM IR (-O2):
define void @TransformAlarmC__0__Alarm__fired() {
%1 = tail call i32 (...) @AlarmToTimerC__0__Alarm__fired()
ret void
}
void cdrtim(float *tim) {}


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

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

LLVM IR (-O0):
define void @cdrtim(float* %0) {
%2 = alloca float*
store float* %0, float** %2
ret void
}

LLVM IR (-O2):
define void @cdrtim(float* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void test_success(char *name) { printf("success: %s\n", name); }


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

x86 assembly (clang, -O2):
<test_success>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"success: %s\0A\00"
define void @test_success(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"success: %s\0A\00"
define void @test_success(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int identity(char);
void void_tand0(char x) { char y = (identity(x) & 0) ? 42 : 43; }


x86 assembly (clang, -O0):
<void_tand0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <identity@plt>
mov    %eax,%edx
and    $0x0,%edx
mov    $0x2b,%eax
mov    $0x2a,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x2(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<void_tand0>:
jmp    1030 <identity@plt>

LLVM IR (-O0):
define void @void_tand0(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @identity(i8 signext %4)
%6 = and i32 %5, 0
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 42, i32 43
%10 = trunc i32 %9 to i8
store i8 %10, i8* %3
ret void
}

LLVM IR (-O2):
define void @void_tand0(i8 signext %0) {
%2 = tail call i32 @identity(i8 signext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
scalar_t__ EEXIST;
scalar_t__ errno;
scalar_t__ mkdir(char const *, int /*<<< orphan*/);
int mkdir_or_exists(const char *path, mode_t mode) {
  return mkdir(path, mode) == 0 || errno == EEXIST;
}


x86 assembly (clang, -O0):
<mkdir_or_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <mkdir@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
je     1157 <mkdir_or_exists+0x47>
mov    0x2e94(%rip),%rax
mov    (%rax),%rax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_or_exists>:
push   %rax
call   1030 <mkdir@plt>
test   %rax,%rax
sete   %al
mov    0x2eb5(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2eb3(%rip),%rdx
cmp    (%rdx),%rcx
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@EEXIST = global i64 0
define i32 @mkdir_or_exists(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @mkdir(i8* %5, i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i64, i64* @errno
%11 = load i64, i64* @EEXIST
%12 = icmp eq i64 %10, %11
br label %13
13: ; preds = %9, %2
%14 = phi i1 [ true, %2 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@errno = global i64 0
@EEXIST = global i64 0
define i32 @mkdir_or_exists(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @mkdir(i8* %0, i32 %1)
%4 = icmp eq i64 %3, 0
%5 = load i64, i64* @errno
%6 = load i64, i64* @EEXIST
%7 = icmp eq i64 %5, %6
%8 = select i1 %4, i1 true, i1 %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef float int_least32_t;

/* Variables and functions */
float f5(float x, int_least32_t y) { return x * y; }


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @f5(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @f5(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
int do_020() { return 20; }


x86 assembly (clang, -O0):
<do_020>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_020() {
ret i32 20
}

LLVM IR (-O2):
define i32 @do_020() {
ret i32 20
}
int cpumask_next(int cpu, unsigned int mask) {
  for (cpu++; !((1 << cpu) & mask); cpu++)
    ;
  return cpu;
}


x86 assembly (clang, -O0):
<cpumask_next>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1135 <cpumask_next+0x35>
jmp    1148 <cpumask_next+0x48>
jmp    113a <cpumask_next+0x3a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1113 <cpumask_next+0x13>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpumask_next>:
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%eax
bt     %eax,%esi
jae    1110 <cpumask_next+0x10>
ret

LLVM IR (-O0):
define i32 @cpumask_next(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 = add nsw i32 %5, 1
store i32 %6, i32* %3
br label %7
7: ; preds = %15, %2
%8 = load i32, i32* %3
%9 = shl i32 1, %8
%10 = load i32, i32* %4
%11 = and i32 %9, %10
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %14, label %18
14: ; preds = %7
br label %15
15: ; preds = %14
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %7
18: ; preds = %7
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @cpumask_next(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = add nsw i32 %4, 1
%6 = shl nuw i32 1, %5
%7 = and i32 %6, %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3
ret i32 %5
}
/* Variables and functions */
int cptp_patch_header(void *, unsigned short, unsigned short, unsigned char,
                      int /*<<< orphan*/, unsigned char, int);
int cptp_patch_request_header(void *f, unsigned short des, unsigned short src,
                              unsigned char func, unsigned char seq,
                              int need_tsp) {
  return cptp_patch_header(f, des, src, func, 0, seq, need_tsp);
}


x86 assembly (clang, -O0):
<cptp_patch_request_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %si,-0xa(%rbp)
mov    %dx,-0xc(%rbp)
mov    %cl,-0xd(%rbp)
mov    %al,-0xe(%rbp)
mov    %r9d,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%si
mov    -0xc(%rbp),%dx
mov    -0xd(%rbp),%cl
mov    -0xe(%rbp),%r9b
mov    -0x14(%rbp),%eax
xor    %r8d,%r8d
movzwl %si,%esi
movzwl %dx,%edx
movzbl %cl,%ecx
movzbl %r9b,%r9d
mov    %eax,(%rsp)
call   1030 <cptp_patch_header@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cptp_patch_request_header>:
push   %rax
mov    %r8d,%eax
mov    %r9d,(%rsp)
xor    %r8d,%r8d
mov    %eax,%r9d
call   1030 <cptp_patch_header@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cptp_patch_request_header(i8* %0, i16 zeroext %1, i16 zeroext %2, i8 zeroext %3, i8 zeroext %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i16
%10 = alloca i8
%11 = alloca i8
%12 = alloca i32
store i8* %0, i8** %7
store i16 %1, i16* %8
store i16 %2, i16* %9
store i8 %3, i8* %10
store i8 %4, i8* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i16, i16* %8
%15 = load i16, i16* %9
%16 = load i8, i8* %10
%17 = load i8, i8* %11
%18 = load i32, i32* %12
%19 = call i32 @cptp_patch_header(i8* %13, i16 zeroext %14, i16 zeroext %15, i8 zeroext %16, i32 0, i8 zeroext %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @cptp_patch_request_header(i8* %0, i16 zeroext %1, i16 zeroext %2, i8 zeroext %3, i8 zeroext %4, i32 %5) {
%7 = tail call i32 @cptp_patch_header(i8* %0, i16 zeroext %1, i16 zeroext %2, i8 zeroext %3, i32 0, i8 zeroext %4, i32 %5)
ret i32 %7
}
int test_imm_8Euint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x8E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Euint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x8e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Euint64_midword_reg>:
test   $0x8e0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Euint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 142
%6 = icmp ne i64 %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_8Euint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9306112
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int self_init_in_cond(int *p) {
  int n = ((p && (0 || 1)) && (n = *p)) ? n : -1;
  return n;
}


x86 assembly (clang, -O0):
<self_init_in_cond>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <self_init_in_cond+0x30>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1130 <self_init_in_cond+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113d <self_init_in_cond+0x3d>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <self_init_in_cond+0x3d>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<self_init_in_cond>:
test   %rdi,%rdi
je     110f <self_init_in_cond+0xf>
mov    (%rdi),%ecx
cmp    $0x1,%ecx
sbb    %eax,%eax
or     %ecx,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @self_init_in_cond(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -1, i32 %4
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ -1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x6e() {
  Assert_real((isascii(110)),
              "/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_isascii.c",
              555, ("isascii should be 1 for n"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x6e>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x22b,%edx
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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for n\00"
define void @t_isascii_0x6e() {
%1 = call i32 @isascii(i32 110)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for n\00"
define void @t_isascii_0x6e() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_room() { return 1; }


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

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

LLVM IR (-O0):
define i32 @is_room() {
ret i32 1
}

LLVM IR (-O2):
define i32 @is_room() {
ret i32 1
}
const char *Map_Name(void) { return "Map"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"Map\00"
define i8* @Map_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"Map\00"
define i8* @Map_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("\n Hello world!"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"\0A Hello world!\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0A Hello world!\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool es_par(int numero) { return numero % 2 == 0; }


x86 assembly (clang, -O0):
<es_par>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<es_par>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @es_par(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @es_par(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
int print_local_name(unsigned long start_of_routine, int local_no) {
  start_of_routine;
  local_no;
  return 0;
}


x86 assembly (clang, -O0):
<print_local_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_local_name>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @print_local_name(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @print_local_name(i64 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USBUART_Dp_ClearInterrupt();
void USBUART_DP_ISR(void) { (void)USBUART_Dp_ClearInterrupt(); }


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

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

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

LLVM IR (-O2):
define void @USBUART_DP_ISR() {
%1 = tail call i32 (...) @USBUART_Dp_ClearInterrupt()
ret void
}
/* Variables and functions */
scalar_t__ access(char *, int /*<<< orphan*/);
int file_exists(char *filename) { return (access(filename, 0) == 0); }


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @access(i8* %3, i32 0)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i64 @access(i8* %0, i32 0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void a_or_l(volatile void *p, long v) {
  (void)__sync_fetch_and_or((volatile long *)p, v);
}


x86 assembly (clang, -O0):
<a_or_l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
lock or %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_or_l>:
lock or %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @a_or_l(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %4
%8 = atomicrmw or i64* %6, i64 %7 seq_cst
ret void
}

LLVM IR (-O2):
define void @a_or_l(i8* nocapture %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
%4 = atomicrmw or i64* %3, i64 %1 seq_cst
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ target;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ readlink(char *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
pid_t get_pid_from_proc_self() {
  char target[32];
  int pid;
  readlink("/proc/self", target, sizeof(target));
  sscanf(target, "%d", &pid);
  return (pid_t)pid;
}


x86 assembly (clang, -O0):
<get_pid_from_proc_self>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rsi
lea    0xecd(%rip),%rdi
mov    $0x20,%edx
call   1030 <readlink@plt>
lea    -0x20(%rbp),%rdi
lea    0xec3(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pid_from_proc_self>:
push   %rbx
sub    $0x30,%rsp
lea    0xed4(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x20,%edx
call   1030 <readlink@plt>
lea    0xec6(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <sscanf@plt>
mov    0xc(%rsp),%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"/proc/self\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_pid_from_proc_self() {
%1 = alloca [32 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%4 = call i32 @readlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3, i32 32)
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [11 x i8] c"/proc/self\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_pid_from_proc_self() {
%1 = alloca [32 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = call i32 @readlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3, i32 32)
%6 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
ret i32 %7
}
/* Variables and functions */
char *strpbrk(char *, char *);
long strtol(char *, char **, int);
int /*<<< orphan*/ valid_int(long);
void get_number_delete(int *number, char *line) {
  char *endptr;
  char *num = strpbrk(line, "0123456789");
  long int check = strtol(num, &endptr, 10);
  if (!valid_int(check))
    *number = -1;
  else
    *number = (int)check;
}


x86 assembly (clang, -O0):
<get_number_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <valid_int@plt>
cmp    $0x0,%eax
jne    118b <get_number_delete+0x5b>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
jmp    1197 <get_number_delete+0x67>
mov    -0x28(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_number_delete>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    %rax,%rdi
call   1040 <strpbrk@plt>
mov    %rsp,%rsi
mov    %rax,%rdi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <valid_int@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     %ebx,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define void @get_number_delete(i32* nocapture writeonly %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call i8* @strpbrk(i8* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @strtol(i8* %5, i8** %3, i32 10)
%7 = tail call i32 @valid_int(i64 %6)
%8 = icmp eq i32 %7, 0
%9 = trunc i64 %6 to i32
%10 = select i1 %8, i32 -1, i32 %9
store i32 %10, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void evm_porting_OsFree(void *addr) { free(addr); }


x86 assembly (clang, -O0):
<evm_porting_OsFree>:
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):
<evm_porting_OsFree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @evm_porting_OsFree(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 @evm_porting_OsFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ZeroArray4(float *a, int len) {
  int i = 0;
  while (i < len) {
    a[i] = 0.0;
    a[i + 1] = 0.0;
    a[i + 2] = 0.0;
    a[i + 3] = 0.0;
    i += 4;
  }
}


x86 assembly (clang, -O0):
<ZeroArray4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117b <ZeroArray4+0x7b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <ZeroArray4+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZeroArray4>:
test   %esi,%esi
jle    1130 <ZeroArray4+0x20>
push   %rax
mov    %esi,%edx
add    $0xffffffff,%edx
shr    $0x2,%edx
shl    $0x4,%rdx
add    $0x10,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @ZeroArray4(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %32
10: ; preds = %6
%11 = load float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
store float 0.000000e+00, float* %14
%15 = load float*, float** %3
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %15, i64 %18
store float 0.000000e+00, float* %19
%20 = load float*, float** %3
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %20, i64 %23
store float 0.000000e+00, float* %24
%25 = load float*, float** %3
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds float, float* %25, i64 %28
store float 0.000000e+00, float* %29
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 4
store i32 %31, i32* %5
br label %6
32: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @ZeroArray4(float* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = bitcast float* %0 to i8*
%6 = add nsw i32 %1, -1
%7 = lshr i32 %6, 2
%8 = zext i32 %7 to i64
%9 = shl nuw nsw i64 %8, 4
%10 = add nuw nsw i64 %9, 16
br label %11
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void kobayash15() { printf("kobayash15 likes pizza. \n"); }


x86 assembly (clang, -O0):
<kobayash15>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"kobayash15 likes pizza. \0A\00"
define void @kobayash15() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"kobayash15 likes pizza. \00"
define void @kobayash15() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
int readFromPin(int pinNumber) { return 0; }


x86 assembly (clang, -O0):
<readFromPin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFromPin>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @readFromPin(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MyParentTid();
int /*<<< orphan*/ Send(int /*<<< orphan*/, char *, int, void *,
                        int /*<<< orphan*/);
void test_recv_overflow_sender(void) {
  Send(MyParentTid(), "foobar baz", 11, ((void *)0), 0);
}


x86 assembly (clang, -O0):
<test_recv_overflow_sender>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <MyParentTid@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
mov    $0xb,%edx
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
call   1040 <Send@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_recv_overflow_sender>:
push   %rax
xor    %eax,%eax
call   1030 <MyParentTid@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
mov    $0xb,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
pop    %rax
jmp    1040 <Send@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"foobar baz\00"
define void @test_recv_overflow_sender() {
%1 = call i32 (...) @MyParentTid()
%2 = call i32 @Send(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 11, i8* null, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"foobar baz\00"
define void @test_recv_overflow_sender() {
%1 = tail call i32 (...) @MyParentTid()
%2 = tail call i32 @Send(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 11, i8* null, i32 0)
ret void
}
void protocol_basic_endclient(struct client *c) {}


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

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

LLVM IR (-O0):
%struct.client = type opaque
define void @protocol_basic_endclient(%struct.client* %0) {
%2 = alloca %struct.client*
store %struct.client* %0, %struct.client** %2
ret void
}

LLVM IR (-O2):
%struct.client = type opaque
define void @protocol_basic_endclient(%struct.client* nocapture %0) {
ret void
}