xunge/DecIR huggingface dataset:
int test_imm_27int32_reg(int val) { return ((val) & (0x27 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_27int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x27,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_27int32_reg>:
test   $0x27,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_27int32_reg(i32 %0) {
%2 = and i32 %0, 39
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct tcb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tprintf(char *, unsigned long, unsigned long);
void tprint_timeval(struct tcb *tcp, const struct timeval *tv) {
  tprintf("{%lu, %lu}", (unsigned long)tv->tv_sec, (unsigned long)tv->tv_usec);
}


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

x86 assembly (clang, -O2):
<tprint_timeval>:
mov    (%rsi),%rdx
mov    0x8(%rsi),%rsi
lea    0xee2(%rip),%rdi
jmp    1030 <tprintf@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
%struct.timeval = type { i64, i64 }
@.str = [11 x i8] c"{%lu, %lu}\00"
define void @tprint_timeval(%struct.tcb* %0, %struct.timeval* %1) {
%3 = alloca %struct.tcb*
%4 = alloca %struct.timeval*
store %struct.tcb* %0, %struct.tcb** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = load %struct.timeval*, %struct.timeval** %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = call i32 @tprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
%struct.timeval = type { i64, i64 }
@.str = [11 x i8] c"{%lu, %lu}\00"
define void @tprint_timeval(%struct.tcb* nocapture readnone %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = tail call i32 @tprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %4, i64 %6)
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_05(uint64_t x) {
  __asm__("rolq $5, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_05>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x5,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_05>:
mov    %rdi,%rax
rol    $0x5,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_05(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$5, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_05(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$5, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
int test_imm_65int64_lowword_mem(long long *val) {
  return ((*val) & (0x65 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_65int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 101
%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_65int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 101
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int btobcd(i) { return (((i / 10) << 4) | (i % 10)); }


x86 assembly (clang, -O0):
<btobcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
or     %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btobcd>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @btobcd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = shl i32 %4, 4
%6 = load i32, i32* %2
%7 = srem i32 %6, 10
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @btobcd(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = shl i32 %2, 4
%4 = srem i32 %0, 10
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ scf();
void opcode_37() { scf(); }


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

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

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

LLVM IR (-O2):
define void @opcode_37() {
%1 = tail call i32 (...) @scf()
ret void
}
/* Type definitions */
struct termp {
  int dummy;
};

/* Variables and functions */
size_t term_len(struct termp const *, size_t);
size_t term_tbl_len(size_t sz, void *arg) {
  return term_len((const struct termp *)arg, sz);
}


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

x86 assembly (clang, -O2):
<term_tbl_len>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <term_len@plt>

LLVM IR (-O0):
%struct.termp = type { i32 }
define i64 @term_tbl_len(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to %struct.termp*
%7 = load i64, i64* %3
%8 = call i64 @term_len(%struct.termp* %6, i64 %7)
ret i64 %8
}

LLVM IR (-O2):
%struct.termp = type { i32 }
define i64 @term_tbl_len(i64 %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.termp*
%4 = tail call i64 @term_len(%struct.termp* %3, i64 %0)
ret i64 %4
}
void f() {
  int i = 42;
  int j = 63;
  asm("" : "=m"(i), "+r"(j) : "m"(i));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2a,-0x4(%rbp)
movl   $0x3f,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movl   $0x2a,-0x4(%rsp)
mov    $0x3f,%eax
ret

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
store i32 42, i32* %1
store i32 63, i32* %2
%3 = load i32, i32* %2
%4 = call i32 asm "", "=*m,=r,*m,1,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %1, i32* elementtype(i32) %1, i32 %3)
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%3 = call i32 asm "", "=*m,=r,*m,1,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %1, i32* elementtype(i32) %1, i32 63)
ret void
}
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bitmap_free_bits_table(int);
int main() {
  bitmap_free_bits_table((3 * 3) + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <bitmap_free_bits_table@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <bitmap_free_bits_table@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @bitmap_free_bits_table(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bitmap_free_bits_table(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
int main() {
  foo(1, 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ int8_t;

/* Variables and functions */
int print_uint8(int /*<<< orphan*/, char *);
int print_int8(int8_t n, char *p) {
  int sign;
  if ((sign = n < 0)) {
    *p++ = '-';
    n = -n;
  }
  return print_uint8((uint8_t)n, p) + sign;
}


x86 assembly (clang, -O0):
<print_int8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1140 <print_int8+0x30>
jmp    115c <print_int8+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <print_uint8@plt>
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int8>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
js     111e <print_int8+0xe>
mov    %rbx,%rdi
jmp    112b <print_int8+0x1b>
movb   $0x2d,(%rsi)
add    $0x1,%rsi
mov    %rbx,%rdi
neg    %rdi
shr    $0x3f,%rbx
call   1030 <print_uint8@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @print_int8(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %5
br i1 %7, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 45, i8* %10
%12 = load i64, i64* %3
%13 = sub nsw i64 0, %12
store i64 %13, i64* %3
br label %14
14: ; preds = %9, %2
%15 = load i64, i64* %3
%16 = trunc i64 %15 to i32
%17 = load i8*, i8** %4
%18 = call i32 @print_uint8(i32 %16, i8* %17)
%19 = load i32, i32* %5
%20 = add nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @print_int8(i64 %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
%6 = sub nsw i64 0, %0
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %5, %4 ], [ %1, %2 ]
%9 = phi i64 [ %6, %4 ], [ %0, %2 ]
%10 = lshr i64 %0, 63
%11 = trunc i64 %10 to i32
%12 = trunc i64 %9 to i32
%13 = tail call i32 @print_uint8(i32 %12, i8* %8)
%14 = add nsw i32 %13, %11
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void turn_off(int fpointer) { write(fpointer, "0", 1); }


x86 assembly (clang, -O0):
<turn_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_off>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define void @turn_off(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
char *memcpy(char *, char const *, size_t);
char *strncpy(char *dest, const char *src, size_t n) {
  return memcpy(dest, src, n);
}


x86 assembly (clang, -O0):
<strncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @strncpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i8* @memcpy(i8* %7, i8* %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strncpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
/* Variables and functions */
char *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char buf[256];
  printf("%s\n", getcwd(buf, 256));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    %rax,%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
mov    %rsp,%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
lea    0xec5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i8* @getcwd(i8* %2, i32 256)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i8* @getcwd(i8* %2, i32 256)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
int fahr_to_celc(int fahr) {
  int celc;
  celc = (5 * (fahr - 32)) / 9;
  return celc;
}


x86 assembly (clang, -O0):
<fahr_to_celc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr_to_celc>:
lea    (%rdi,%rdi,4),%eax
add    $0xffffff60,%eax
cltq
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fahr_to_celc(i32 %0) {
%2 = mul i32 %0, 5
%3 = add i32 %2, -160
%4 = sdiv i32 %3, 9
ret i32 %4
}
void gnc_libc_missing_noop(void) { return; }


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

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

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

LLVM IR (-O2):
define void @gnc_libc_missing_noop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_229() {
  Assert_real((isqrt(229) == 15),
              "/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/stdlib/isqrt.c",
              1150, ("Integer square root of 229 should be 15"));
}


x86 assembly (clang, -O0):
<t_sqrt_229>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe5,%edi
call   1030 <isqrt@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x47e,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_229>:
push   %rax
mov    $0xe5,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x47e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 229 should be 15\00"
define void @t_sqrt_229() {
%1 = call i32 @isqrt(i32 229)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1150, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 229 should be 15\00"
define void @t_sqrt_229() {
%1 = tail call i32 @isqrt(i32 229)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1150, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_uninit_read(int *);
void do_uninit_read_with_intermediate_frames(int depth, int *val_p) {
  if (depth > 1)
    do_uninit_read_with_intermediate_frames(depth - 1, val_p);
  else
    do_uninit_read(val_p);
}


x86 assembly (clang, -O0):
<do_uninit_read_with_intermediate_frames>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    114d <do_uninit_read_with_intermediate_frames+0x2d>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <do_uninit_read_with_intermediate_frames@plt>
jmp    1156 <do_uninit_read_with_intermediate_frames+0x36>
mov    -0x10(%rbp),%rdi
call   1040 <do_uninit_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_uninit_read_with_intermediate_frames>:
mov    %rsi,%rdi
jmp    1030 <do_uninit_read@plt>

LLVM IR (-O0):
define void @do_uninit_read_with_intermediate_frames(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 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = load i32*, i32** %4
br label %14
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = call i32 @do_uninit_read(i32* %12)
br label %14
14: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
define void @do_uninit_read_with_intermediate_frames(i32 %0, i32* %1) {
%3 = tail call i32 @do_uninit_read(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ phred33ToPhred(char);
char phredToPhred64(int /*<<< orphan*/);
void phred33ToPhred64(char *p33, int l) {
  int i;
  for (i = 0; i < l; i++) {
    p33[i] = phredToPhred64(phred33ToPhred(p33[i]));
  }
}


x86 assembly (clang, -O0):
<phred33ToPhred64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1175 <phred33ToPhred64+0x55>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <phred33ToPhred@plt>
mov    %eax,%edi
call   1030 <phredToPhred64@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <phred33ToPhred64+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phred33ToPhred64>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    115e <phred33ToPhred64+0x3e>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <phred33ToPhred@plt>
mov    %eax,%edi
call   1030 <phredToPhred64@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <phred33ToPhred64+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @phred33ToPhred64(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %22, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %25
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @phred33ToPhred(i8 signext %15)
%17 = call signext i8 @phredToPhred64(i32 %16)
%18 = load i8*, i8** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 %17, i8* %21
br label %22
22: ; preds = %10
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %6
25: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @phred33ToPhred64(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @phred33ToPhred(i8 signext %9)
%11 = tail call signext i8 @phredToPhred64(i32 %10)
store i8 %11, i8* %8
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
unsigned short int f45(unsigned short int x, unsigned int y) {
  return (x >> y) | (x << (8 * sizeof(unsigned short) - y));
}


x86 assembly (clang, -O0):
<f45>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %ecx,%esi
mov    $0x10,%ecx
sub    %rsi,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f45>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%ax
ret

LLVM IR (-O0):
define zeroext i16 @f45(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = sub i64 16, %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %10, %14
%16 = or i32 %8, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f45(i16 zeroext %0, i32 %1) {
%3 = trunc i32 %1 to i16
%4 = tail call i16 @llvm.fshr.i16(i16 %0, i16 %0, i16 %3)
ret i16 %4
}
/* Variables and functions */
scalar_t__ powf(float, int);
float sqrt(scalar_t__);
float outCirc(float t, float b, float c, float d) {
  return (c * sqrt(1 - powf(t / d - 1, 2)) + b);
}


x86 assembly (clang, -O0):
<outCirc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  0xea8(%rip),%xmm1
subss  %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
mov    $0x1,%edi
sub    %rax,%rdi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outCirc>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
addss  0xec8(%rip),%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
mov    $0x1,%edi
sub    %rax,%rdi
call   1040 <sqrt@plt>
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @outCirc(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = load float, float* %5
%11 = load float, float* %8
%12 = fdiv float %10, %11
%13 = fsub float %12, 1.000000e+00
%14 = call i64 @powf(float %13, i32 2)
%15 = sub nsw i64 1, %14
%16 = call float @sqrt(i64 %15)
%17 = load float, float* %6
%18 = call float @llvm.fmuladd.f32(float %9, float %16, float %17)
ret float %18
}

LLVM IR (-O2):
define float @outCirc(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fadd float %5, -1.000000e+00
%7 = tail call i64 @powf(float %6, i32 2)
%8 = sub nsw i64 1, %7
%9 = tail call float @sqrt(i64 %8)
%10 = tail call float @llvm.fmuladd.f32(float %2, float %9, float %1)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_short_uwait_private(unsigned char);
void TOSH_short_uwait(unsigned char u_sec) {
  if (u_sec > 1)
    TOSH_short_uwait_private(u_sec);
}


x86 assembly (clang, -O0):
<TOSH_short_uwait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1,%eax
jle    1134 <TOSH_short_uwait+0x24>
movzbl -0x1(%rbp),%edi
call   1030 <TOSH_short_uwait_private@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_short_uwait>:
cmp    $0x2,%dil
jb     111f <TOSH_short_uwait+0xf>
movzbl %dil,%edi
jmp    1030 <TOSH_short_uwait_private@plt>
ret

LLVM IR (-O0):
define void @TOSH_short_uwait(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32 @TOSH_short_uwait_private(i8 zeroext %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @TOSH_short_uwait(i8 zeroext %0) {
%2 = icmp ugt i8 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @TOSH_short_uwait_private(i8 zeroext %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fault_init_random();
void fault_init() { fault_init_random(); }


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

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

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

LLVM IR (-O2):
define void @fault_init() {
%1 = tail call i32 (...) @fault_init_random()
ret void
}
/* Variables and functions */
int f(int);
int g(int, int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello\n");
  return (f(1) + g(2, 4));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    $0x2,%edi
mov    $0x4,%esi
call   1050 <g@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <f@plt>
mov    %eax,%ebx
mov    $0x2,%edi
mov    $0x4,%esi
call   1050 <g@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Hello\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @f(i32 1)
%4 = call i32 @g(i32 2, i32 4)
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @f(i32 1)
%3 = tail call i32 @g(i32 2, i32 4)
%4 = add nsw i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ glk_exit();
int /*<<< orphan*/ trm_chr(char);
int /*<<< orphan*/ trm_str(char *);
void error(char *msg) {
  trm_str(msg);
  trm_chr('\n');
  glk_exit();
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <trm_str@plt>
mov    $0xa,%edi
call   1050 <trm_chr@plt>
mov    $0x0,%al
call   1030 <glk_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1040 <trm_str@plt>
mov    $0xa,%edi
call   1050 <trm_chr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glk_exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @trm_str(i8* %3)
%5 = call i32 @trm_chr(i8 signext 10)
%6 = call i32 (...) @glk_exit()
ret void
}

LLVM IR (-O2):
define void @error(i8* %0) {
%2 = tail call i32 @trm_str(i8* %0)
%3 = tail call i32 @trm_chr(i8 signext 10)
%4 = tail call i32 (...) @glk_exit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int is_increasing(int);
void is_increasing_test(void) {
  assert(is_increasing(124468));
  assert(!is_increasing(124768));
}


x86 assembly (clang, -O0):
<is_increasing_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e634,%edi
call   1040 <is_increasing@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x1e760,%edi
call   1040 <is_increasing@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_increasing_test>:
push   %rax
mov    $0x1e634,%edi
call   1040 <is_increasing@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x1e760,%edi
call   1040 <is_increasing@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @is_increasing_test() {
%1 = call i32 @is_increasing(i32 124468)
%2 = call i32 @assert(i32 %1)
%3 = call i32 @is_increasing(i32 124768)
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret void
}

LLVM IR (-O2):
define void @is_increasing_test() {
%1 = tail call i32 @is_increasing(i32 124468)
%2 = tail call i32 @assert(i32 %1)
%3 = tail call i32 @is_increasing(i32 124768)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
void cfree(p, num, size) char *p;
unsigned num, size;
{ free(p); }


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

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

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

LLVM IR (-O2):
define void @cfree(i8* nocapture %0, i32 %1, i32 %2) {
tail call void @free(i8* %0)
ret void
}
void gtk_accelerator_set_default_mod_mask() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accelerator_set_default_mod_mask() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int cuenta = 1;
  while (cuenta <= 5) {
    printf("%i\n", cuenta);
    cuenta++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 5
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ callee();
int main() { callee(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @callee()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @callee()
ret i32 0
}
/* Variables and functions */
int checkpass(const char *s, const char *t) {
  size_t i;
  for (i = 0; s[i]; i++) {
    if (s[i] != t[i])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<checkpass>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1168 <checkpass+0x68>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1152 <checkpass+0x52>
movl   $0x0,-0x4(%rbp)
jmp    116f <checkpass+0x6f>
jmp    1157 <checkpass+0x57>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1114 <checkpass+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkpass>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <checkpass+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    (%rsi,%rdx,1),%cl
jne    1123 <checkpass+0x23>
movzbl 0x1(%rdi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <checkpass+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @checkpass(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %0, i64 %15
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %5
%10 = phi i8 [ %7, %5 ], [ %3, %2 ]
%11 = phi i64 [ %15, %5 ], [ 0, %2 ]
%12 = getelementptr inbounds i8, i8* %1, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %10, %13
%15 = add i64 %11, 1
br i1 %14, label %5, label %16
16: ; preds = %9, %5, %2
%17 = phi i32 [ 1, %2 ], [ 1, %5 ], [ 0, %9 ]
ret i32 %17
}
int toupper(int c) { return c >= 0x61 && c <= 0x7A ? c & ~0x40 : c; }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <toupper+0x29>
cmpl   $0x7a,-0x4(%rbp)
jg     1129 <toupper+0x29>
mov    -0x4(%rbp),%eax
and    $0xffffffbf,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <toupper+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
mov    %edi,%eax
and    $0xffffffbf,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = and i32 %0, -65
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
void gtk_accel_group_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_group_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ frmni(char *);
void notImplementedRTF() { frmni("RTF"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"RTF\00"
define void @notImplementedRTF() {
%1 = call i32 @frmni(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"RTF\00"
define void @notImplementedRTF() {
%1 = tail call i32 @frmni(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t min_size(size_t, size_t);
size_t size_less_null(size_t);
size_t size_minus(size_t, int);
size_t index_bounds(size_t size, int is_final_byte_out_of_bounds,
                    size_t index) {
  size_t max_index;
  if (!is_final_byte_out_of_bounds)
    max_index = size_minus(size, 1);
  else
    max_index = size_minus(size_less_null(size), 1);
  return min_size(max_index, index);
}


x86 assembly (clang, -O0):
<index_bounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1164 <index_bounds+0x34>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <size_minus@plt>
mov    %rax,-0x20(%rbp)
jmp    117e <index_bounds+0x4e>
mov    -0x8(%rbp),%rdi
call   1030 <size_less_null@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1040 <size_minus@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <min_size@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_bounds>:
push   %rbx
mov    %rdx,%rbx
test   %esi,%esi
je     1140 <index_bounds+0x10>
call   1030 <size_less_null@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1040 <size_minus@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1050 <min_size@plt>

LLVM IR (-O0):
define i64 @index_bounds(i64 %0, i32 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i64, i64* %4
%12 = call i64 @size_minus(i64 %11, i32 1)
store i64 %12, i64* %7
br label %17
13: ; preds = %3
%14 = load i64, i64* %4
%15 = call i64 @size_less_null(i64 %14)
%16 = call i64 @size_minus(i64 %15, i32 1)
store i64 %16, i64* %7
br label %17
17: ; preds = %13, %10
%18 = load i64, i64* %7
%19 = load i64, i64* %6
%20 = call i64 @min_size(i64 %18, i64 %19)
ret i64 %20
}

LLVM IR (-O2):
define i64 @index_bounds(i64 %0, i32 %1, i64 %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i64 @size_less_null(i64 %0)
br label %7
7: ; preds = %3, %5
%8 = phi i64 [ %6, %5 ], [ %0, %3 ]
%9 = tail call i64 @size_minus(i64 %8, i32 1)
%10 = tail call i64 @min_size(i64 %9, i64 %2)
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char *, double *);
double asciiToDouble(const char *str) {
  double result;
  sscanf(str, "%lf", &result);
  return result;
}


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

x86 assembly (clang, -O2):
<asciiToDouble>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @asciiToDouble(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @asciiToDouble(i8* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
ret double %5
}
/* Variables and functions */
int putc(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int putchar(int i) { return putc(i, stdout); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @putc(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @putc(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int isdigit(int c) { return ((c >= '0') && (c <= '9')); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void ARGBToUVRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToUVRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_serial0();
void retarget_init() { init_serial0(); }


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

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

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

LLVM IR (-O2):
define void @retarget_init() {
%1 = tail call i32 (...) @init_serial0()
ret void
}
int main(int argc, char **argv) {
  int k = 2;
  int m = 2 * k;
  if (m > 3) {
    m = 3;
  } else {
    m = 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jle    1138 <main+0x38>
movl   $0x3,-0x18(%rbp)
jmp    113f <main+0x3f>
movl   $0x2,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}