xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int main() {
  (void)getenv("");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @getenv(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @getenv(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ apb_initResponse();
int /*<<< orphan*/ apb_sendResponse();
void apb_sendDefualtResponse() {
  apb_initResponse();
  apb_sendResponse();
}


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

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

LLVM IR (-O0):
define void @apb_sendDefualtResponse() {
%1 = call i32 (...) @apb_initResponse()
%2 = call i32 (...) @apb_sendResponse()
ret void
}

LLVM IR (-O2):
define void @apb_sendDefualtResponse() {
%1 = tail call i32 (...) @apb_initResponse()
%2 = tail call i32 (...) @apb_sendResponse()
ret void
}
unsigned short ip_compute_csum(unsigned char *buff, int len) {
  return ~from64to16(do_csum(buff, len));
}


x86 assembly (clang, -O0):
<ip_compute_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <do_csum@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1040 <from64to16@plt>
xor    $0xffffffff,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_compute_csum>:
push   %rax
xor    %eax,%eax
call   1030 <do_csum@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1040 <from64to16@plt>
not    %eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @ip_compute_csum(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, ...)*)(i8* %5, i32 %6)
%8 = call i32 (i32, ...) bitcast (i32 (...)* @from64to16 to i32 (i32, ...)*)(i32 %7)
%9 = xor i32 %8, -1
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @ip_compute_csum(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @from64to16 to i32 (i32, ...)*)(i32 %3)
%5 = trunc i32 %4 to i16
%6 = xor i16 %5, -1
ret i16 %6
}
int test_imm_E0uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xE0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_E0uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 224
%7 = icmp ne i64 %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_E0uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 962072674304
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ mvaddch(int, int, char);
void printHorizontalHallway(int x, int y) {
  move(y, 0);
  for (int i = 2; i < x + 1; i++) {
    mvaddch(y, i, '#');
  }
}


x86 assembly (clang, -O0):
<printHorizontalHallway>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <move@plt>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    116e <printHorizontalHallway+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x23,%edx
call   1030 <mvaddch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <printHorizontalHallway+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHorizontalHallway>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebx
mov    %esi,%edi
xor    %esi,%esi
call   1040 <move@plt>
cmp    $0x2,%ebx
jl     1161 <printHorizontalHallway+0x41>
neg    %ebx
mov    $0x2,%ebp
xchg   %ax,%ax
mov    %r14d,%edi
mov    %ebp,%esi
mov    $0x23,%edx
call   1030 <mvaddch@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1140 <printHorizontalHallway+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @printHorizontalHallway(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @move(i32 %6, i32 0)
store i32 2, i32* %5
br label %8
8: ; preds = %17, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %20
13: ; preds = %8
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @mvaddch(i32 %14, i32 %15, i8 signext 35)
br label %17
17: ; preds = %13
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %8
20: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @printHorizontalHallway(i32 %0, i32 %1) {
%3 = tail call i32 @move(i32 %1, i32 0)
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %6
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ 2, %2 ]
%8 = tail call i32 @mvaddch(i32 %1, i32 %7, i8 signext 35)
%9 = add nuw i32 %7, 1
%10 = icmp eq i32 %7, %0
br i1 %10, label %5, label %6
}
/* Variables and functions */
int /*<<< orphan*/ ts_eit_test();
int /*<<< orphan*/ ts_pat_test();
int /*<<< orphan*/ ts_sdt_test();
int /*<<< orphan*/ ts_tdt_test();
int /*<<< orphan*/ ts_tot_test();
int main(void) {
  ts_pat_test();
  ts_tdt_test();
  ts_tot_test();
  ts_sdt_test();
  ts_eit_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <ts_pat_test@plt>
mov    $0x0,%al
call   1050 <ts_tdt_test@plt>
mov    $0x0,%al
call   1040 <ts_tot_test@plt>
mov    $0x0,%al
call   1060 <ts_sdt_test@plt>
mov    $0x0,%al
call   1070 <ts_eit_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <ts_pat_test@plt>
xor    %eax,%eax
call   1050 <ts_tdt_test@plt>
xor    %eax,%eax
call   1040 <ts_tot_test@plt>
xor    %eax,%eax
call   1060 <ts_sdt_test@plt>
xor    %eax,%eax
call   1070 <ts_eit_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ts_pat_test()
%3 = call i32 (...) @ts_tdt_test()
%4 = call i32 (...) @ts_tot_test()
%5 = call i32 (...) @ts_sdt_test()
%6 = call i32 (...) @ts_eit_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ts_pat_test()
%2 = tail call i32 (...) @ts_tdt_test()
%3 = tail call i32 (...) @ts_tot_test()
%4 = tail call i32 (...) @ts_sdt_test()
%5 = tail call i32 (...) @ts_eit_test()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int is_sheep_op(uint8_t op) { return op & 0x80; }


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

x86 assembly (clang, -O2):
<is_sheep_op>:
mov    %edi,%eax
and    $0x80,%eax
ret

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

LLVM IR (-O2):
define i32 @is_sheep_op(i32 %0) {
%2 = and i32 %0, 128
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int utol(char);
main() {
  char ch = 'J';
  printf(" %c is converted into %c \n", ch, utol(ch));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x4a,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <utol@plt>
mov    %eax,%edx
mov    -0x2(%rbp),%al
lea    0xeb9(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4a,%edi
call   1040 <utol@plt>
lea    0xece(%rip),%rdi
mov    $0x4a,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c" %c is converted into %c \0A\00"
define i32 @main() {
%1 = alloca i8
store i8 74, i8* %1
%2 = load i8, i8* %1
%3 = load i8, i8* %1
%4 = call i32 @utol(i8 signext %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %2, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c" %c is converted into %c \0A\00"
define i32 @main() {
%1 = tail call i32 @utol(i8 signext 74)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext 74, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_dmb(int);
int /*<<< orphan*/ __builtin_arm_dsb(int);
int /*<<< orphan*/ __builtin_arm_isb(int);
void test3() {
  __builtin_arm_dsb(16);
  __builtin_arm_dmb(17);
  __builtin_arm_isb(18);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
call   1040 <__builtin_arm_dsb@plt>
mov    $0x11,%edi
call   1050 <__builtin_arm_dmb@plt>
mov    $0x12,%edi
call   1030 <__builtin_arm_isb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rax
mov    $0x10,%edi
call   1040 <__builtin_arm_dsb@plt>
mov    $0x11,%edi
call   1050 <__builtin_arm_dmb@plt>
mov    $0x12,%edi
pop    %rax
jmp    1030 <__builtin_arm_isb@plt>

LLVM IR (-O0):
define void @test3() {
%1 = call i32 @__builtin_arm_dsb(i32 16)
%2 = call i32 @__builtin_arm_dmb(i32 17)
%3 = call i32 @__builtin_arm_isb(i32 18)
ret void
}

LLVM IR (-O2):
define void @test3() {
%1 = tail call i32 @__builtin_arm_dsb(i32 16)
%2 = tail call i32 @__builtin_arm_dmb(i32 17)
%3 = tail call i32 @__builtin_arm_isb(i32 18)
ret void
}
void XMaxCmapsOfScreen() {}


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

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

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

LLVM IR (-O2):
define void @XMaxCmapsOfScreen() {
ret void
}
/* Type definitions */
struct bptFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freez(struct bptFile **);
void bptFileDetach(struct bptFile **pBpt) { freez(pBpt); }


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

x86 assembly (clang, -O2):
<bptFileDetach>:
jmp    1030 <freez@plt>

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

LLVM IR (-O2):
%struct.bptFile = type { i32 }
define void @bptFileDetach(%struct.bptFile** %0) {
%2 = tail call i32 @freez(%struct.bptFile** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _tap_ok(char *, int, int, char *);
int /*<<< orphan*/ tap_plan(int);
int main(void) {
  tap_plan(1);
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/01-sanity.c",
          9, 1, "compilation successful");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <tap_plan@plt>
lea    0xec0(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
lea    0xf4e(%rip),%rcx
call   1040 <_tap_ok@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <tap_plan@plt>
lea    0xece(%rip),%rdi
lea    0xf66(%rip),%rcx
mov    $0x9,%esi
mov    $0x1,%edx
call   1040 <_tap_ok@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/ext/globdir.c/t/01-sanity.c\00"
@.str.1 = [23 x i8] c"compilation successful\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tap_plan(i32 1)
%3 = call i32 @_tap_ok(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str, i64 0, i64 0), i32 9, i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/ext/globdir.c/t/01-sanity.c\00"
@.str.1 = [23 x i8] c"compilation successful\00"
define i32 @main() {
%1 = tail call i32 @tap_plan(i32 1)
%2 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str, i64 0, i64 0), i32 9, i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void __attribute__((stdcall)) AIL_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @AIL_shutdown() {
ret void
}
void msh_load_config() {}


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

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

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

LLVM IR (-O2):
define void @msh_load_config() {
ret void
}
/* Variables and functions */
unsigned short inw(unsigned short *);
unsigned short lcd_hpi_read_mailbox() {
  unsigned short value;
  value = inw((unsigned short *)((0x0001 << 1) + 0xfff24000));
  return (value);
}


x86 assembly (clang, -O0):
<lcd_hpi_read_mailbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xfff24002,%edi
call   1030 <inw@plt>
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_hpi_read_mailbox>:
mov    $0xfff24002,%edi
jmp    1030 <inw@plt>

LLVM IR (-O0):
define zeroext i16 @lcd_hpi_read_mailbox() {
%1 = alloca i16
%2 = call zeroext i16 @inw(i16* inttoptr (i64 4294066178 to i16*))
store i16 %2, i16* %1
%3 = load i16, i16* %1
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @lcd_hpi_read_mailbox() {
%1 = tail call zeroext i16 @inw(i16* inttoptr (i64 4294066178 to i16*))
ret i16 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
int peek(FILE *fin) {
  int c = getc(fin);
  ungetc(c, fin);
  return c;
}


x86 assembly (clang, -O0):
<peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <ungetc@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peek>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <getc@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1030 <ungetc@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @peek(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @getc(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @ungetc(i32 %6, i32* %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @peek(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = tail call i32 @ungetc(i32 %2, i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void xerbla_(char *c, int *info) {
  printf(" ** On entry to %s parameter number %02d had an illegal value\n", c,
         *info);
}


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

x86 assembly (clang, -O2):
<xerbla_>:
mov    %rdi,%rax
mov    (%rsi),%edx
lea    0xee4(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [63 x i8] c" ** On entry to %s parameter number %02d had an illegal value\0A\00"
define void @xerbla_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [63 x i8] c" ** On entry to %s parameter number %02d had an illegal value\0A\00"
define void @xerbla_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/, int);
int read(int, char *, int);
char readc(char *file) {
  int fd;
  char value;
  fd = open(file, O_RDONLY, 0666);
  if (fd < 0)
    return 0;
  if (read(fd, &value, 1) != 1)
    value = 0;
  close(fd);
  return value;
}


x86 assembly (clang, -O0):
<readc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
mov    $0x1b6,%edx
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1169 <readc+0x39>
movb   $0x0,-0x1(%rbp)
jmp    1195 <readc+0x65>
mov    -0x14(%rbp),%edi
lea    -0x15(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
je     1187 <readc+0x57>
movb   $0x0,-0x15(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
mov    -0x15(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readc>:
push   %rbp
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
mov    $0x1b6,%edx
call   1050 <open@plt>
xor    %ebx,%ebx
test   %eax,%eax
js     1171 <readc+0x41>
mov    %eax,%ebp
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
movzbl 0x7(%rsp),%eax
cmove  %eax,%ebx
mov    %ebp,%edi
call   1030 <close@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define signext i8 @readc(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* @O_RDONLY
%8 = call i32 @open(i8* %6, i32 %7, i32 438)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i8 0, i8* %2
br label %21
12: ; preds = %1
%13 = load i32, i32* %4
%14 = call i32 @read(i32 %13, i8* %5, i32 1)
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %12
store i8 0, i8* %5
br label %17
17: ; preds = %16, %12
%18 = load i32, i32* %4
%19 = call i32 @close(i32 %18)
%20 = load i8, i8* %5
store i8 %20, i8* %2
br label %21
21: ; preds = %17, %11
%22 = load i8, i8* %2
ret i8 %22
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define signext i8 @readc(i8* nocapture %0) {
%2 = alloca i8
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* %0, i32 %3, i32 438)
%5 = icmp slt i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = call i32 @read(i32 %4, i8* %2, i32 1)
%8 = icmp eq i32 %7, 1
%9 = load i8, i8* %2
%10 = select i1 %8, i8 %9, i8 0
%11 = tail call i32 @close(i32 %4)
br label %12
12: ; preds = %1, %6
%13 = phi i8 [ %10, %6 ], [ 0, %1 ]
ret i8 %13
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
char *speicher_reservieren_char_array_malloc(char *array, int laenge) {
  array = (char *)malloc(laenge * sizeof(char));
  if (array == NULL) {
    printf("\nKein freier Speicher vorhanden.\n");
  }
  return array;
}


x86 assembly (clang, -O0):
<speicher_reservieren_char_array_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1159 <speicher_reservieren_char_array_malloc+0x39>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speicher_reservieren_char_array_malloc>:
push   %rbx
mov    %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <speicher_reservieren_char_array_malloc+0x1c>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\0AKein freier Speicher vorhanden.\0A\00"
define i8* @speicher_reservieren_char_array_malloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@str = [33 x i8] c"\0AKein freier Speicher vorhanden.\00"
define i8* @speicher_reservieren_char_array_malloc(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i64 @malloc(i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = inttoptr i64 %3 to i8*
ret i8* %8
}
/* Type definitions */
struct buddy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int buddy_order_start(struct buddy *, unsigned int);
unsigned int buddy_index_to_node(struct buddy *b, unsigned int index,
                                 unsigned int order) {
  assert((index & ((1u << order) - 1)) == 0);
  return buddy_order_start(b, order) + (index >> order);
}


x86 assembly (clang, -O0):
<buddy_index_to_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <buddy_order_start@plt>
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buddy_index_to_node>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
mov    $0xffffffff,%eax
mov    %ebx,%ecx
shl    %cl,%eax
not    %eax
xor    %edi,%edi
test   %esi,%eax
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <buddy_order_start@plt>
mov    %ebx,%ecx
shr    %cl,%ebp
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.buddy = type { i32 }
define i32 @buddy_index_to_node(%struct.buddy* %0, i32 %1, i32 %2) {
%4 = alloca %struct.buddy*
%5 = alloca i32
%6 = alloca i32
store %struct.buddy* %0, %struct.buddy** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = shl i32 1, %8
%10 = sub i32 %9, 1
%11 = and i32 %7, %10
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load %struct.buddy*, %struct.buddy** %4
%16 = load i32, i32* %6
%17 = call i32 @buddy_order_start(%struct.buddy* %15, i32 %16)
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = lshr i32 %18, %19
%21 = add i32 %17, %20
ret i32 %21
}

LLVM IR (-O2):
%struct.buddy = type { i32 }
define i32 @buddy_index_to_node(%struct.buddy* %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = and i32 %5, %1
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @buddy_order_start(%struct.buddy* %0, i32 %2)
%11 = lshr i32 %1, %2
%12 = add i32 %10, %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("main\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bzero(unsigned char *, size_t);
void stun_init_buffer_str(unsigned char *buf, size_t *len) {
  *len = (20);
  bzero((buf), (*len));
}


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

x86 assembly (clang, -O2):
<stun_init_buffer_str>:
movq   $0x14,(%rsi)
mov    $0x14,%esi
jmp    1030 <bzero@plt>

LLVM IR (-O0):
define void @stun_init_buffer_str(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
store i64 20, i64* %5
%6 = load i8*, i8** %3
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = call i32 @bzero(i8* %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @stun_init_buffer_str(i8* nocapture writeonly %0, i64* nocapture writeonly %1) {
store i64 20, i64* %1
%3 = tail call i32 @bzero(i8* %0, i64 20)
ret void
}
int Fibonacci(int n) {
  if (n == 0) {
    return 0;
  } else if (n == 1) {
    return 1;
  } else {
    return (Fibonacci(n - 1) + Fibonacci(n - 2));
  }
}


x86 assembly (clang, -O0):
<Fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <Fibonacci+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <Fibonacci+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <Fibonacci+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <Fibonacci+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <Fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <Fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <Fibonacci+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <Fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <Fibonacci+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Fibonacci(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @Fibonacci(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
void BarTermRestore(struct termios *termOrig) {
  tcsetattr(fileno(stdin), TCSANOW, termOrig);
}


x86 assembly (clang, -O0):
<BarTermRestore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <fileno@plt>
mov    %eax,%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BarTermRestore>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <fileno@plt>
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <tcsetattr@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@stdin = global i32 0
@TCSANOW = global i32 0
define void @BarTermRestore(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load i32, i32* @stdin
%4 = call i32 @fileno(i32 %3)
%5 = load i32, i32* @TCSANOW
%6 = load %struct.termios*, %struct.termios** %2
%7 = call i32 @tcsetattr(i32 %4, i32 %5, %struct.termios* %6)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@stdin = global i32 0
@TCSANOW = global i32 0
define void @BarTermRestore(%struct.termios* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fileno(i32 %2)
%4 = load i32, i32* @TCSANOW
%5 = tail call i32 @tcsetattr(i32 %3, i32 %4, %struct.termios* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ csi_enable(unsigned int);
void bsp_csi_enable(unsigned int sel) { csi_enable(sel); }


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

x86 assembly (clang, -O2):
<bsp_csi_enable>:
jmp    1030 <csi_enable@plt>

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

LLVM IR (-O2):
define void @bsp_csi_enable(i32 %0) {
%2 = tail call i32 @csi_enable(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ nw_occluded_fill(int, int);
void nw_occluded_fill_test(void **state) {
  assert_int_equal(nw_occluded_fill(0x0000000008208000ul, 0x00FFFFFFFFFFFF00ul),
                   0x00070E1C38608000ul);
}


x86 assembly (clang, -O0):
<nw_occluded_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8208000,%edi
mov    $0xffffff00,%esi
call   1030 <nw_occluded_fill@plt>
mov    %eax,%edi
mov    $0x38608000,%esi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nw_occluded_fill_test>:
push   %rax
mov    $0x8208000,%edi
mov    $0xffffff00,%esi
call   1030 <nw_occluded_fill@plt>
mov    %eax,%edi
mov    $0x38608000,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @nw_occluded_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @nw_occluded_fill(i32 136347648, i32 -256)
%4 = call i32 @assert_int_equal(i32 %3, i32 945848320)
ret void
}

LLVM IR (-O2):
define void @nw_occluded_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @nw_occluded_fill(i32 136347648, i32 -256)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 945848320)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Parse(char const *, char *, int /*<<< orphan*/, int);
char *PlatformReadFile(char const *);
int /*<<< orphan*/ strlen(char *);
void PlatformScanFile(const char *FileName) {
  char *SourceStr = PlatformReadFile(FileName);
  Parse(FileName, SourceStr, strlen(SourceStr), 1);
}


x86 assembly (clang, -O0):
<PlatformScanFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <PlatformReadFile@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%ecx
call   1050 <Parse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlatformScanFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <PlatformReadFile@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    $0x1,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <Parse@plt>

LLVM IR (-O0):
define void @PlatformScanFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @PlatformReadFile(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @Parse(i8* %6, i8* %7, i32 %9, i32 1)
ret void
}

LLVM IR (-O2):
define void @PlatformScanFile(i8* %0) {
%2 = tail call i8* @PlatformReadFile(i8* %0)
%3 = tail call i32 @strlen(i8* %2)
%4 = tail call i32 @Parse(i8* %0, i8* %2, i32 %3, i32 1)
ret void
}
char *element_non_edit_multi_select_get_heading(char *element_name) {
  return element_name;
}


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

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

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

LLVM IR (-O2):
define i8* @element_non_edit_multi_select_get_heading(i8* readnone returned %0) {
ret i8* %0
}
int is_a_valid_move(char move) {
  if (move == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_a_valid_move>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    1123 <is_a_valid_move+0x23>
movl   $0x1,-0x4(%rbp)
jmp    112a <is_a_valid_move+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_a_valid_move(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_a_valid_move(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
char *langRomTypeAscii8Sram() { return "ASCII 8 (SRAM)"; }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"ASCII 8 (SRAM)\00"
define i8* @langRomTypeAscii8Sram() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"ASCII 8 (SRAM)\00"
define i8* @langRomTypeAscii8Sram() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
size_t backtrace(void **, int);
int /*<<< orphan*/ backtrace_symbols_fd(void **, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void handler(int sig) {
  void *array[10];
  size_t size;
  size = backtrace(array, 10);
  fprintf(stderr, "Error: signal %d:\n", sig);
  backtrace_symbols_fd(array, size, STDERR_FILENO);
  exit(1);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0xa,%esi
call   1040 <backtrace@plt>
mov    %rax,-0x68(%rbp)
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe90(%rip),%rsi
call   1050 <fprintf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    0x2e54(%rip),%rax
mov    (%rax),%edx
call   1030 <backtrace_symbols_fd@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rbp
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    %edi,%ebp
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xa,%esi
call   1040 <backtrace@plt>
mov    %rax,%rbx
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe93(%rip),%rsi
mov    %ebp,%edx
call   1050 <fprintf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <backtrace_symbols_fd@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Error: signal %d:\0A\00"
@STDERR_FILENO = global i32 0
define void @handler(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8*]
%4 = alloca i64
store i32 %0, i32* %2
%5 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 0
%6 = call i64 @backtrace(i8** %5, i32 10)
store i64 %6, i64* %4
%7 = load i32, i32* @stderr
%8 = load i32, i32* %2
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 0
%11 = load i64, i64* %4
%12 = load i32, i32* @STDERR_FILENO
%13 = call i32 @backtrace_symbols_fd(i8** %10, i64 %11, i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Error: signal %d:\0A\00"
@STDERR_FILENO = global i32 0
define void @handler(i32 %0) {
%2 = alloca [10 x i8*]
%3 = bitcast [10 x i8*]* %2 to i8*
%4 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 0
%5 = call i64 @backtrace(i8** %4, i32 10)
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = load i32, i32* @STDERR_FILENO
%9 = call i32 @backtrace_symbols_fd(i8** %4, i64 %5, i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
}
void gtk_ui_manager_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_ui_manager_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ couleur(unsigned int const);
int /*<<< orphan*/ printf(char *, char const *);
void coloration(const char *texte, const unsigned int typeCouleur) {
  couleur(typeCouleur);
  printf("%s", texte);
  couleur(0);
}


x86 assembly (clang, -O0):
<coloration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <couleur@plt>
mov    -0x8(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <couleur@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coloration>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <couleur@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rbx
jmp    1040 <couleur@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @coloration(i8* %0, i32 %1) {
%3 = tail call i32 @couleur(i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @couleur(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fw_update_users_in_data();
int /*<<< orphan*/ fw_update_users_out_data();
scalar_t__ get_total_client();
void fw_update_users_data() {
  if (get_total_client()) {
    fw_update_users_out_data();
    fw_update_users_in_data();
  }
}


x86 assembly (clang, -O0):
<fw_update_users_data>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_total_client@plt>
cmp    $0x0,%rax
je     1153 <fw_update_users_data+0x23>
mov    $0x0,%al
call   1040 <fw_update_users_out_data@plt>
mov    $0x0,%al
call   1050 <fw_update_users_in_data@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fw_update_users_data>:
push   %rax
xor    %eax,%eax
call   1030 <get_total_client@plt>
test   %rax,%rax
je     114c <fw_update_users_data+0x1c>
xor    %eax,%eax
call   1040 <fw_update_users_out_data@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <fw_update_users_in_data@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @fw_update_users_data() {
%1 = call i64 (...) @get_total_client()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @fw_update_users_out_data()
%5 = call i32 (...) @fw_update_users_in_data()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @fw_update_users_data() {
%1 = tail call i64 (...) @get_total_client()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @fw_update_users_out_data()
%5 = tail call i32 (...) @fw_update_users_in_data()
br label %6
6: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
int ZERO_EXTEND_L_W(int reg) {
  if (reg & 8)
    addbyte(0x41);
  addbyte(0x0f);
  addbyte(0xb7);
  addbyte(0xc0 | (reg & 7));
  return 0;
}


x86 assembly (clang, -O0):
<ZERO_EXTEND_L_W>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1134 <ZERO_EXTEND_L_W+0x24>
mov    $0x41,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xb7,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
and    $0x7,%edi
or     $0xc0,%edi
call   1030 <addbyte@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZERO_EXTEND_L_W>:
push   %rbx
mov    %edi,%ebx
test   $0x8,%bl
je     1122 <ZERO_EXTEND_L_W+0x12>
mov    $0x41,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xb7,%edi
call   1030 <addbyte@plt>
and    $0x7,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
call   1030 <addbyte@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ZERO_EXTEND_L_W(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 8
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @addbyte(i32 65)
br label %8
8: ; preds = %6, %1
%9 = call i32 @addbyte(i32 15)
%10 = call i32 @addbyte(i32 183)
%11 = load i32, i32* %2
%12 = and i32 %11, 7
%13 = or i32 192, %12
%14 = call i32 @addbyte(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @ZERO_EXTEND_L_W(i32 %0) {
%2 = and i32 %0, 8
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @addbyte(i32 65)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @addbyte(i32 15)
%8 = tail call i32 @addbyte(i32 183)
%9 = and i32 %0, 7
%10 = or i32 %9, 192
%11 = tail call i32 @addbyte(i32 %10)
ret i32 0
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
char to_udf_name(int8_t val) { return (val >= 0) ? (val | 0x60) : -1; }


x86 assembly (clang, -O0):
<to_udf_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111f <to_udf_name+0x1f>
mov    -0x4(%rbp),%eax
or     $0x60,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <to_udf_name+0x2c>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <to_udf_name+0x2c>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_udf_name>:
mov    %edi,%eax
or     $0x60,%al
test   %edi,%edi
movzbl %al,%ecx
mov    $0xff,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @to_udf_name(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = or i32 %6, 96
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ -1, %8 ]
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @to_udf_name(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = trunc i32 %0 to i8
%4 = or i8 %3, 96
%5 = select i1 %2, i8 %4, i8 -1
ret i8 %5
}
void g_date_order() {}


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

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

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

LLVM IR (-O2):
define void @g_date_order() {
ret void
}
int security_sb_copy_data(struct file_system_type *type, void *orig,
                          void *copy) {
  return 0;
}


x86 assembly (clang, -O0):
<security_sb_copy_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.file_system_type = type opaque
define i32 @security_sb_copy_data(%struct.file_system_type* %0, i8* %1, i8* %2) {
%4 = alloca %struct.file_system_type*
%5 = alloca i8*
%6 = alloca i8*
store %struct.file_system_type* %0, %struct.file_system_type** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.file_system_type = type opaque
define i32 @security_sb_copy_data(%struct.file_system_type* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}