xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_int_format();
int test_int_C(void) {
  if (!test_int_format()) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<test_int_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <test_int_format@plt>
cmp    $0x0,%eax
jne    1134 <test_int_C+0x24>
movl   $0x0,-0x4(%rbp)
jmp    113b <test_int_C+0x2b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_int_C() {
%1 = alloca i32
%2 = call i32 (...) @test_int_format()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 0, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_int_C() {
%1 = tail call i32 (...) @test_int_format()
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 9 * 100 + 3); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10903
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10903
}
unsigned int optimizer_workaround1u(unsigned int value) { return value; }


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

x86 assembly (clang, -O2):
<optimizer_workaround1u>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @optimizer_workaround1u(i32 returned %0) {
ret i32 %0
}
int valueFromDemux(int value) { return value; }


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

x86 assembly (clang, -O2):
<valueFromDemux>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @valueFromDemux(i32 returned %0) {
ret i32 %0
}
main() {
  int ent1[] = {
      [0 ... 5] = 5,
      [3] = 1,
      [4] = 2,
  };
  if (ent1[0] != 5 || ent1[1] != 5 || ent1[2] != 5 || ent1[3] != 1 ||
      ent1[4] != 2 || ent1[5] != 5)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x5,-0x20(%rbp)
jne    117c <main+0x6c>
cmpl   $0x5,-0x1c(%rbp)
jne    117c <main+0x6c>
cmpl   $0x5,-0x18(%rbp)
jne    117c <main+0x6c>
cmpl   $0x1,-0x14(%rbp)
jne    117c <main+0x6c>
cmpl   $0x2,-0x10(%rbp)
jne    117c <main+0x6c>
cmpl   $0x5,-0xc(%rbp)
je     1181 <main+0x71>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.ent1 = [6 x i32] [i32 5, i32 5, i32 5, i32 1, i32 2, i32 5]
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
store i32 0, i32* %1
%3 = bitcast [6 x i32]* %2 to i8*
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 5
br i1 %6, label %27, label %7
7: ; preds = %0
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 5
br i1 %10, label %27, label %11
11: ; preds = %7
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 5
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%17 = load i32, i32* %16
%18 = icmp ne i32 %17, 1
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
%21 = load i32, i32* %20
%22 = icmp ne i32 %21, 2
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
%25 = load i32, i32* %24
%26 = icmp ne i32 %25, 5
br i1 %26, label %27, label %28
27: ; preds = %23, %19, %15, %11, %7, %0
unreachable
28: ; preds = %23
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fn7(int x) { return ~(unsigned)x | x; }


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

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

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

LLVM IR (-O2):
define i32 @fn7(i32 %0) {
ret i32 -1
}
/* Type definitions */
struct nlattr {
  int dummy;
};

/* Variables and functions */
const char *nla_read_str(const struct nlattr *nla) {
  return (const char *)(nla + 1);
}


x86 assembly (clang, -O0):
<nla_read_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_read_str>:
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i8* @nla_read_str(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %3, i64 1
%5 = bitcast %struct.nlattr* %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i8* @nla_read_str(%struct.nlattr* readnone %0) {
%2 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %0, i64 1
%3 = bitcast %struct.nlattr* %2 to i8*
ret i8* %3
}
/* Type definitions */
typedef int value;

/* Variables and functions */
int bnode_is_red(size_t value) { return ((((value)&1)) ^ (0)); }


x86 assembly (clang, -O0):
<bnode_is_red>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
xor    $0x0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bnode_is_red>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bnode_is_red(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = xor i64 %4, 0
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @bnode_is_red(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
ret i32 %3
}
int test_imm_2Duint16_mem(unsigned short *val) {
  return ((*val) & (-0x2D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_2Duint16_mem>:
movzwl (%rdi),%eax
test   $0xffd3,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Duint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -45
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
scalar_t__ realloc(int *, int);
void common_realloc_leak() {
  int *p, *q;
  p = (int *)malloc(sizeof(int));
  q = (int *)realloc(p, sizeof(int) * 42);
  if (q != NULL)
    free(q);
}


x86 assembly (clang, -O0):
<common_realloc_leak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa8,%esi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116c <common_realloc_leak+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<common_realloc_leak>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    $0xa8,%esi
call   1050 <realloc@plt>
test   %rax,%rax
je     1156 <common_realloc_leak+0x26>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @common_realloc_leak() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = call i64 @realloc(i32* %5, i32 168)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %2
%8 = load i32*, i32** %2
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32*, i32** %2
%12 = call i32 @free(i32* %11)
br label %13
13: ; preds = %10, %0
ret void
}

LLVM IR (-O2):
define void @common_realloc_leak() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i64 @realloc(i32* %2, i32 168)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = inttoptr i64 %3 to i32*
%7 = tail call i32 @free(i32* %6)
br label %8
8: ; preds = %5, %0
ret void
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
int get_time_xorred(void) {
  struct timeval t;
  gettimeofday(&t, 0);
  return t.tv_usec ^ t.tv_sec;
}


x86 assembly (clang, -O0):
<get_time_xorred>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_xorred>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0x4(%rsp),%eax
xor    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_time_xorred() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = xor i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_time_xorred() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = xor i32 %7, %5
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_def_word(void) { output_with_tab("fdb "); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"fdb \00"
define void @gen_def_word() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
int w_crt_io_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @w_crt_io_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @w_crt_io_init() {
ret i32 0
}
void Msp430TimerCapComP__8__Compare__default__fired(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__8__Compare__default__fired() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xf2() {
  Assert_real((isgraph(242) == 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_isgraph.c",
              1215, ("isgraph should be 0 for 0xf2"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xf2>:
push   %rax
mov    $0xf2,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4bf,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xf2\00"
define void @t_isgraph_0xf2() {
%1 = call i64 @isgraph(i32 242)
%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 1215, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xf2\00"
define void @t_isgraph_0xf2() {
%1 = tail call i64 @isgraph(i32 242)
%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 1215, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_37(int /*<<< orphan*/);
int gen_37() { handle_37(0); }


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

x86 assembly (clang, -O2):
<gen_37>:
xor    %edi,%edi
jmp    1030 <handle_37@plt>

LLVM IR (-O0):
define i32 @gen_37() {
%1 = alloca i32
%2 = call i32 @handle_37(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_37() {
%1 = tail call i32 @handle_37(i32 0)
ret i32 undef
}
/* Variables and functions */
char const *filecoding(char const *);
const char *detect_enc(const char *filepath) { return filecoding(filepath); }


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

x86 assembly (clang, -O2):
<detect_enc>:
jmp    1030 <filecoding@plt>

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

LLVM IR (-O2):
define i8* @detect_enc(i8* %0) {
%2 = tail call i8* @filecoding(i8* %0)
ret i8* %2
}
/* Variables and functions */
unsigned char *SnapshotV3_WriteDataToChunk(unsigned char *, unsigned char *,
                                           int);
unsigned char *SnapshotV3_WriteByte(unsigned char *buffer,
                                    unsigned char ByteData) {
  return SnapshotV3_WriteDataToChunk(buffer, &ByteData, 1);
}


x86 assembly (clang, -O0):
<SnapshotV3_WriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <SnapshotV3_WriteDataToChunk@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SnapshotV3_WriteByte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <SnapshotV3_WriteDataToChunk@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @SnapshotV3_WriteByte(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = call i8* @SnapshotV3_WriteDataToChunk(i8* %5, i8* %4, i32 1)
ret i8* %6
}

LLVM IR (-O2):
define i8* @SnapshotV3_WriteByte(i8* %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i8* @SnapshotV3_WriteDataToChunk(i8* %0, i8* %3, i32 1)
ret i8* %4
}
unsigned char GetBit(unsigned char port, unsigned char number) {
  return (port & (0x01 << number));
}


x86 assembly (clang, -O0):
<GetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @GetBit(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = trunc i32 %4 to i8
%6 = and i8 %5, %0
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ nzfree(char **);
int strlen(char *);
int replace_dynstr(char **dynptr, char *newval) {
  if (!dynptr)
    return (0);
  nzfree(dynptr);
  *dynptr = newval;
  return (strlen(newval));
}


x86 assembly (clang, -O0):
<replace_dynstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <replace_dynstr+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1167 <replace_dynstr+0x47>
mov    -0x10(%rbp),%rdi
call   1040 <nzfree@plt>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace_dynstr>:
test   %rdi,%rdi
je     1146 <replace_dynstr+0x26>
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <nzfree@plt>
mov    %r14,(%rbx)
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strlen@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @replace_dynstr(i8** %0, i8* %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @nzfree(i8** %0)
store i8* %1, i8** %0
%6 = tail call i32 @strlen(i8* %1)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ 0, %2 ]
ret i32 %8
}
void gtk_menu_item_toggle_size_request() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_item_toggle_size_request() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int myFunction6() { printf("hello world\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @myFunction6() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ ASRT_Double(double, double, double);
int /*<<< orphan*/ ASRT_Mark(char *, int, char *);
int test_DoubleFail() {
  do {
    ASRT_Mark("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/"
              "src/asrt_tests.c",
              84,
              "123.45"
              " == "
              "123.55");
    if (ASRT_Double(123.45, 123.55, 0.01)) {
      return 1;
    };
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_DoubleFail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee9(%rip),%rdi
mov    $0x54,%esi
lea    0xf6d(%rip),%rdx
call   1040 <ASRT_Mark@plt>
movsd  0xeb8(%rip),%xmm0
movsd  0xeb8(%rip),%xmm1
movsd  0xeb8(%rip),%xmm2
call   1030 <ASRT_Double@plt>
cmp    $0x0,%rax
je     1173 <test_DoubleFail+0x53>
movl   $0x1,-0x4(%rbp)
jmp    117f <test_DoubleFail+0x5f>
jmp    1178 <test_DoubleFail+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_DoubleFail>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0xf79(%rip),%rdx
mov    $0x54,%esi
call   1040 <ASRT_Mark@plt>
movsd  0xebf(%rip),%xmm0
movsd  0xebf(%rip),%xmm1
movsd  0xebf(%rip),%xmm2
call   1030 <ASRT_Double@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [17 x i8] c"123.45 == 123.55\00"
define i32 @test_DoubleFail() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 84, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = call i64 @ASRT_Double(double 1.234500e+02, double 1.235500e+02, double 1.000000e-02)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
store i32 1, i32* %1
br label %9
7: ; preds = %2
br label %8
8: ; preds = %7
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [17 x i8] c"123.45 == 123.55\00"
define i32 @test_DoubleFail() {
%1 = tail call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 84, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @ASRT_Double(double 1.234500e+02, double 1.235500e+02, double 1.000000e-02)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *char_calloc(int n) {
  char *v;
  if ((v = (char *)calloc(n, sizeof(char))) == NULL) {
    fprintf(stderr, "FATAL ERROR: Out of memory\n");
    exit(1);
  }
  return v;
}


x86 assembly (clang, -O0):
<char_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1175 <char_calloc+0x45>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_calloc>:
push   %rax
mov    $0x1,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <char_calloc+0x12>
pop    %rcx
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define i8* @char_calloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 1)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define i8* @char_calloc(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void print_help() {
  fprintf(
      stdout,
      "fastq-qual [OPTION]... [FILE]...\n"
      "Output a tab-delimnated table such that row i, column j, given \n"
      "the number of times that quality score i occured in read position j\n\n."
      "Options:\n"
      "  -h, --help              print this message\n"
      "  -V, --version           output version information and exit\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [284 x i8] c"fastq-qual [OPTION]... [FILE]...\0AOutput a tab-delimnated table such that row i, column j, given \0Athe number of times that quality score i occured in read position j\0A\0A.Options:\0A -h, --help print this message\0A -V, --version output version information and exit\0A\00"
define void @print_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [284 x i8] c"fastq-qual [OPTION]... [FILE]...\0AOutput a tab-delimnated table such that row i, column j, given \0Athe number of times that quality score i occured in read position j\0A\0A.Options:\0A -h, --help print this message\0A -V, --version output version information and exit\0A\00"
define void @print_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str, i64 0, i64 0))
ret void
}
int bang(int x) { return (~((x >> 31) | (((~x + 1) >> 31))) & 1); }


x86 assembly (clang, -O0):
<bang>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
add    $0x1,%ecx
sar    $0x1f,%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bang>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @bang(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = load i32, i32* %2
%6 = xor i32 %5, -1
%7 = add nsw i32 %6, 1
%8 = ashr i32 %7, 31
%9 = or i32 %4, %8
%10 = xor i32 %9, -1
%11 = and i32 %10, 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @bang(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
two4(a, b) { nop(); }


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

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

LLVM IR (-O0):
define i32 @two4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @nop()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @two4(i32 %0, i32 %1) {
%3 = tail call i32 (...) @nop()
ret i32 undef
}
/* Variables and functions */
int __parse_common(void *, int *, int *, char *);
int parse_common_lock_depth(void *data) {
  static int ld_offset;
  static int ld_size;
  int ret;
  ret = __parse_common(data, &ld_size, &ld_offset, "common_lock_depth");
  if (ret < 0)
    return -1;
  return ret;
}


x86 assembly (clang, -O0):
<parse_common_lock_depth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0x2f09(%rip),%rsi
lea    0x2efe(%rip),%rdx
lea    0xecb(%rip),%rcx
call   1030 <__parse_common@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1153 <parse_common_lock_depth+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <parse_common_lock_depth+0x49>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_common_lock_depth>:
push   %rax
lea    0x2f18(%rip),%rsi
lea    0x2f0d(%rip),%rdx
lea    0xeda(%rip),%rcx
call   1030 <__parse_common@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@parse_common_lock_depth.ld_offset = internal global i32 0
@parse_common_lock_depth.ld_size = internal global i32 0
@.str = [18 x i8] c"common_lock_depth\00"
define i32 @parse_common_lock_depth(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @__parse_common(i8* %5, i32* @parse_common_lock_depth.ld_size, i32* @parse_common_lock_depth.ld_offset, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@parse_common_lock_depth.ld_offset = internal global i32 0
@parse_common_lock_depth.ld_size = internal global i32 0
@.str = [18 x i8] c"common_lock_depth\00"
define i32 @parse_common_lock_depth(i8* %0) {
%2 = tail call i32 @__parse_common(i8* %0, i32* @parse_common_lock_depth.ld_size, i32* @parse_common_lock_depth.ld_offset, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = icmp sgt i32 %2, -1
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x66() {
  Assert_real((isdigit(102) == 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_isdigit.c",
              515, ("isdigit should be 0 for f"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x66>:
push   %rax
mov    $0x66,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x203,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for f\00"
define void @t_isdigit_0x66() {
%1 = call i64 @isdigit(i32 102)
%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 515, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for f\00"
define void @t_isdigit_0x66() {
%1 = tail call i64 @isdigit(i32 102)
%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 515, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int convert(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  for (; convert(num) != 1; num++)
    ;
  printf("%X", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <convert@plt>
cmp    $0x1,%eax
je     1173 <main+0x43>
jmp    1165 <main+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <main+0x1f>
mov    -0x8(%rbp),%esi
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
cs nopw 0x0(%rax,%rax,1)
call   1030 <convert@plt>
cmp    $0x1,%eax
je     1167 <main+0x37>
mov    0x4(%rsp),%edi
add    $0x1,%edi
mov    %edi,0x4(%rsp)
jmp    1150 <main+0x20>
mov    0x4(%rsp),%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%X\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @convert(i32 %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %12, label %7
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
%10 = call i32 @convert(i32 %9)
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %7
12: ; preds = %7, %0
%13 = load i32, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}
int pizza_price(int pizza) {
  pizza ^= 32;
  switch (pizza) {
  case 3:
    return 3;
  case 11:
    return 4;
  case 13:
    return 5;
  case 29:
    return 6;
  default:
    return 200;
  }
}


x86 assembly (clang, -O0):
<pizza_price>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%al
xor    $0x20,%al
mov    %al,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffffd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x1a,%eax
ja     1168 <pizza_price+0x68>
mov    -0x10(%rbp),%rax
lea    0xed1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3,-0x4(%rbp)
jmp    116f <pizza_price+0x6f>
movl   $0x4,-0x4(%rbp)
jmp    116f <pizza_price+0x6f>
movl   $0x5,-0x4(%rbp)
jmp    116f <pizza_price+0x6f>
movl   $0x6,-0x4(%rbp)
jmp    116f <pizza_price+0x6f>
movl   $0xc8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pizza_price>:
mov    %edi,%eax
xor    $0x20,%eax
lea    -0x3(%rax),%ecx
cmp    $0x1a,%ecx
ja     1123 <pizza_price+0x23>
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x4,%eax
ret
mov    $0xc8,%eax
ret
mov    $0x5,%eax
ret
mov    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @pizza_price(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = xor i32 %4, 32
store i32 %5, i32* %3
%6 = load i32, i32* %3
switch i32 %6, label %11 [
i32 3, label %7
i32 11, label %8
i32 13, label %9
i32 29, label %10
]
7: ; preds = %1
store i32 3, i32* %2
br label %12
8: ; preds = %1
store i32 4, i32* %2
br label %12
9: ; preds = %1
store i32 5, i32* %2
br label %12
10: ; preds = %1
store i32 6, i32* %2
br label %12
11: ; preds = %1
store i32 200, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @pizza_price(i32 %0) {
%2 = xor i32 %0, 32
switch i32 %2, label %6 [
i32 3, label %7
i32 11, label %3
i32 13, label %4
i32 29, label %5
]
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3
%8 = phi i32 [ 200, %6 ], [ 6, %5 ], [ 5, %4 ], [ 4, %3 ], [ %2, %1 ]
ret i32 %8
}
int v3(int n) {
  if (n == 1)
    return 1;
  if (n % 2 == 1)
    return v3(n - 1) + n;
  return 2 * v3(n / 2) + (n / 2) * (n / 2);
}


x86 assembly (clang, -O0):
<v3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <v3+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1198 <v3+0x88>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    115b <v3+0x4b>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <v3@plt>
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1198 <v3+0x88>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <v3@plt>
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v3>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x1,%edi
je     1157 <v3+0x47>
xor    %ebp,%ebp
nop
mov    %edi,%ebx
shr    $0x1f,%ebx
add    %edi,%ebx
mov    %ebx,%eax
and    $0xfffffffe,%eax
mov    %edi,%ecx
sub    %eax,%ecx
cmp    $0x1,%ecx
jne    1146 <v3+0x36>
add    %edi,%ebp
lea    -0x1(%rdi),%eax
mov    %eax,%edi
cmp    $0x1,%eax
jne    1120 <v3+0x10>
add    $0x1,%ebp
jmp    1157 <v3+0x47>
sar    %ebx
mov    %ebx,%edi
call   1030 <v3@plt>
imul   %ebx,%ebx
add    %ebp,%ebx
lea    (%rbx,%rax,2),%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @v3(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %13, label %3
3: ; preds = %1, %9
%4 = phi i32 [ %10, %9 ], [ %0, %1 ]
%5 = phi i32 [ %11, %9 ], [ 0, %1 ]
%6 = srem i32 %4, 2
%7 = sdiv i32 %4, 2
%8 = icmp eq i32 %6, 1
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = add nsw i32 %4, -1
%11 = add nsw i32 %4, %5
%12 = icmp eq i32 %10, 1
br i1 %12, label %21, label %3
13: ; preds = %1, %21, %15
%14 = phi i32 [ %20, %15 ], [ 1, %1 ], [ %22, %21 ]
ret i32 %14
15: ; preds = %3
%16 = tail call i32 @v3(i32 %7)
%17 = shl nsw i32 %16, 1
%18 = mul nsw i32 %7, %7
%19 = add i32 %18, %5
%20 = add i32 %19, %17
br label %13
21: ; preds = %9
%22 = add i32 %11, 1
br label %13
}
/* Variables and functions */
double pow(double, int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double a = 2;
  a = pow(a, 2);
  printf("%.lf\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.lf\0A\00"
define i32 @main() {
%1 = tail call double @pow(double 2.000000e+00, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
int test_imm_83int16_mem(short *val) {
  return ((*val) & (0x83 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_83int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 131
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, char *, char *, char *, char *,
                          char *, char *);
void mac_str(char *mac, char *buf) {
  sscanf(mac, "%x:%x:%x:%x:%x:%x", buf, buf + 1, buf + 2, buf + 3, buf + 4,
         buf + 5);
}


x86 assembly (clang, -O0):
<mac_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%r8
add    $0x2,%r8
mov    -0x10(%rbp),%r9
add    $0x3,%r9
mov    -0x10(%rbp),%r10
add    $0x4,%r10
mov    -0x10(%rbp),%rax
add    $0x5,%rax
lea    0xea9(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <sscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_str>:
push   %rax
mov    %rsi,%rdx
lea    0x1(%rsi),%rcx
lea    0x2(%rsi),%r8
lea    0x3(%rsi),%r9
lea    0x4(%rsi),%r10
lea    0x5(%rsi),%rax
lea    0xed1(%rip),%rsi
push   %rax
push   %r10
call   1030 <sscanf@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%x:%x:%x:%x:%x:%x\00"
define void @mac_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 3
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 4
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 5
%17 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %8, i8* %10, i8* %12, i8* %14, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%x:%x:%x:%x:%x:%x\00"
define void @mac_str(i8* nocapture %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = getelementptr inbounds i8, i8* %1, i64 2
%5 = getelementptr inbounds i8, i8* %1, i64 3
%6 = getelementptr inbounds i8, i8* %1, i64 4
%7 = getelementptr inbounds i8, i8* %1, i64 5
%8 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7)
ret void
}
void mbed_trace_exclude_filters_set(char *filters) {}


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

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

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

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