xunge/DecIR huggingface dataset:
unsigned xrop3_169_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_169_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_169_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
xor    $0xffffff00,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_169_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_169_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -256
ret i32 %8
}
/* Variables and functions */
int malloc(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @malloc(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int funcB(int a, int b) {
  printf("Hello from funcB 2\n");
  return a * b;
}


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

x86 assembly (clang, -O2):
<funcB>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
imul   %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@str = [19 x i8] c"Hello from funcB 2\00"
define i32 @funcB(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = mul nsw i32 %1, %0
ret i32 %4
}
/* Variables and functions */
scalar_t__ close(int);
int mwsp_disconnect(int fd) {
  if (close(fd) < 0) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<mwsp_disconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
jge    1139 <mwsp_disconnect+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    1140 <mwsp_disconnect+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mwsp_disconnect>:
push   %rax
call   1030 <close@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mwsp_disconnect(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @close(i32 %4)
%6 = icmp slt i64 %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 @mwsp_disconnect(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = ashr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned long gfx_pci_config_read(int);
unsigned char gfx_vga_get_pci_command(void) {
  unsigned long value;
  value = gfx_pci_config_read(0x80009404);
  return ((unsigned char)value);
}


x86 assembly (clang, -O0):
<gfx_vga_get_pci_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80009404,%edi
call   1030 <gfx_pci_config_read@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_vga_get_pci_command>:
push   %rax
mov    $0x80009404,%edi
call   1030 <gfx_pci_config_read@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @gfx_vga_get_pci_command() {
%1 = alloca i64
%2 = call i64 @gfx_pci_config_read(i32 -2147445756)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = trunc i64 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @gfx_vga_get_pci_command() {
%1 = tail call i64 @gfx_pci_config_read(i32 -2147445756)
%2 = trunc i64 %1 to i8
ret i8 %2
}
adrreg0reg1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((p0[10000000]) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzwl 0x1312d00(%rax),%eax
movzwl -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1142 <adrreg0reg1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <adrreg0reg1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0reg1>:
movzwl 0x1312d00(%r8),%ecx
01
movzwl %si,%edx
xor    %eax,%eax
cmp    %ecx,%edx
setae  %al
ret

LLVM IR (-O0):
define i32 @adrreg0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %12
%17 = getelementptr inbounds i16, i16* %16, i64 10000000
%18 = load i16, i16* %17
%19 = zext i16 %18 to i32
%20 = load i16, i16* %9
%21 = zext i16 %20 to i32
%22 = icmp sle i32 %19, %21
br i1 %22, label %23, label %24
23: ; preds = %6
store i32 1, i32* %7
br label %25
24: ; preds = %6
store i32 0, i32* %7
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @adrreg0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = getelementptr inbounds i16, i16* %4, i64 10000000
%8 = load i16, i16* %7
%9 = zext i16 %8 to i32
%10 = and i32 %1, 65535
%11 = icmp uge i32 %10, %9
%12 = zext i1 %11 to i32
ret i32 %12
}
int cairo_code_draw_redDial_get_height() { return 50; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_redDial_get_height() {
ret i32 50
}

LLVM IR (-O2):
define i32 @cairo_code_draw_redDial_get_height() {
ret i32 50
}
void bar_float(float *x) { *x = __real foo_float(5); }


x86 assembly (clang, -O0):
<bar_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5,%edi
mov    $0x0,%al
call   1030 <foo_float@plt>
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_float>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <foo_float@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @bar_float(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @foo_float to i32 (i32, ...)*)(i32 5)
%4 = sitofp i32 %3 to float
%5 = load float*, float** %2
store float %4, float* %5
ret void
}

LLVM IR (-O2):
define void @bar_float(float* nocapture writeonly %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo_float to i32 (i32, ...)*)(i32 5)
%3 = sitofp i32 %2 to float
store float %3, float* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpuSetAX(int);
void int11(void) { cpuSetAX(0x0021); }


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

x86 assembly (clang, -O2):
<int11>:
mov    $0x21,%edi
jmp    1030 <cpuSetAX@plt>

LLVM IR (-O0):
define void @int11() {
%1 = call i32 @cpuSetAX(i32 33)
ret void
}

LLVM IR (-O2):
define void @int11() {
%1 = tail call i32 @cpuSetAX(i32 33)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello_string();
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main() {
  puts(hello_string());
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hello_string()
%2 = tail call i32 @puts(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int proc1(int, int);
int main() { printf("%i\n", proc1(11, 4)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @proc1(i32 11, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int nrf_drv_usbd_errata_type_52840_proto1();
bool nrf_drv_usbd_errata_104(void) {
  return nrf_drv_usbd_errata_type_52840_proto1();
}


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

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

LLVM IR (-O0):
define i32 @nrf_drv_usbd_errata_104() {
%1 = call i32 (...) @nrf_drv_usbd_errata_type_52840_proto1()
ret i32 %1
}

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_104() {
%1 = tail call i32 (...) @nrf_drv_usbd_errata_type_52840_proto1()
ret i32 %1
}
/* Type definitions */
typedef int time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __compute_tm(struct tm *, long, long);
void __tm_conv(struct tm *tmbuf, time_t *pt) {
  long days;
  long rem;
  days = *pt / 86400;
  rem = *pt % 86400;
  __compute_tm(tmbuf, days, rem);
}


x86 assembly (clang, -O0):
<__tm_conv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x15180,%ecx
cltd
idiv   %ecx
cltq
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x15180,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <__compute_tm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__tm_conv>:
movslq (%rsi),%rax
imul   $0xffffffffc22e4507,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x10,%ecx
add    %edx,%ecx
movslq %ecx,%rsi
imul   $0x15180,%esi,%ecx
sub    %ecx,%eax
movslq %eax,%rdx
jmp    1030 <__compute_tm@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @__tm_conv(%struct.tm* %0, i32* %1) {
%3 = alloca %struct.tm*
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store %struct.tm* %0, %struct.tm** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 86400
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = srem i32 %12, 86400
%14 = sext i32 %13 to i64
store i64 %14, i64* %6
%15 = load %struct.tm*, %struct.tm** %3
%16 = load i64, i64* %5
%17 = load i64, i64* %6
%18 = call i32 @__compute_tm(%struct.tm* %15, i64 %16, i64 %17)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @__tm_conv(%struct.tm* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sdiv i32 %3, 86400
%5 = sext i32 %4 to i64
%6 = srem i32 %3, 86400
%7 = sext i32 %6 to i64
%8 = tail call i32 @__compute_tm(%struct.tm* %0, i64 %5, i64 %7)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t f40_59(uint32_t x, uint32_t y, uint32_t z) {
  return (x & z) | ((x | z) & y);
}


x86 assembly (clang, -O0):
<f40_59>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
or     -0xc(%rbp),%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f40_59>:
mov    %edx,%eax
and    %edi,%eax
or     %edi,%edx
and    %esi,%edx
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @f40_59(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %0
%5 = or i32 %2, %0
%6 = and i32 %5, %1
%7 = or i32 %6, %4
ret i32 %7
}
/* Type definitions */
typedef char uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rotate(char *);
void enc_dec(uint32_t key, char *string) {
  while (*string) {
    *string ^= key;
    rotate(&key);
    string++;
  }
}


x86 assembly (clang, -O0):
<enc_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <enc_dec+0x48>
movsbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
lea    -0x1(%rbp),%rdi
call   1030 <rotate@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1122 <enc_dec+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enc_dec>:
push   %r14
push   %rbx
push   %rax
mov    %dil,0x7(%rsp)
mov    (%rsi),%al
test   %al,%al
je     116a <enc_dec+0x5a>
mov    %rsi,%rbx
xor    %dil,%al
mov    %al,(%rsi)
lea    0x7(%rsp),%rdi
call   1030 <rotate@plt>
mov    0x1(%rbx),%al
test   %al,%al
je     116a <enc_dec+0x5a>
add    $0x2,%rbx
lea    0x7(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    0x7(%rsp),%al
mov    %al,-0x1(%rbx)
mov    %r14,%rdi
call   1030 <rotate@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1150 <enc_dec+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @enc_dec(i8 signext %0, i8* nocapture %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %21, label %6
6: ; preds = %2
%7 = xor i8 %4, %0
store i8 %7, i8* %1
%8 = call i32 @rotate(i8* %3)
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %21, label %12
12: ; preds = %6, %12
%13 = phi i8 [ %19, %12 ], [ %10, %6 ]
%14 = phi i8* [ %18, %12 ], [ %9, %6 ]
%15 = load i8, i8* %3
%16 = xor i8 %15, %13
store i8 %16, i8* %14
%17 = call i32 @rotate(i8* %3)
%18 = getelementptr inbounds i8, i8* %14, i64 1
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 0
br i1 %20, label %21, label %12
21: ; preds = %12, %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ pause();
int /*<<< orphan*/ stderr;
void errPointer(int err) {
  fprintf(stderr, "Can't allocate memory.\nError %d\n", err);
  pause();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<errPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <pause@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<errPointer>:
push   %rax
mov    %edi,%edx
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <pause@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Can't allocate memory.\0AError %d\0A\00"
@EXIT_FAILURE = global i32 0
define void @errPointer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @pause()
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Can't allocate memory.\0AError %d\0A\00"
@EXIT_FAILURE = global i32 0
define void @errPointer(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @pause()
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
int getstackcounter() { return *(int *)0x082F5940; }


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

x86 assembly (clang, -O2):
<getstackcounter>:
mov    0x82f5940,%eax
ret

LLVM IR (-O0):
define i32 @getstackcounter() {
%1 = load i32, i32* inttoptr (i64 137320768 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getstackcounter() {
%1 = load i32, i32* inttoptr (i64 137320768 to i32*)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned short, unsigned short,
                          unsigned short);
void debugOp(unsigned short A, unsigned short B, unsigned short C) {
  printf("debugOp(%#1x, %#1x, %#1x);\n", A, B, C);
  return;
}


x86 assembly (clang, -O0):
<debugOp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x4(%rbp),%ax
lea    0xec4(%rip),%rdi
movzwl %cx,%esi
movzwl %ax,%edx
movzwl -0x6(%rbp),%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugOp>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"debugOp(%x, %x, %x);\0A\00"
define void @debugOp(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = load i16, i16* %5
%9 = load i16, i16* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i16 zeroext %7, i16 zeroext %8, i16 zeroext %9)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"debugOp(%x, %x, %x);\0A\00"
define void @debugOp(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i16 zeroext %0, i16 zeroext %1, i16 zeroext %2)
ret void
}
int test_imm_4Dint16_mem(short *val) {
  return ((*val) & (0x4D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Dint16_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, 77
%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_4Dint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 77
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void PANIC(char *msg) {
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<PANIC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<PANIC>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @PANIC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @PANIC(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ glmNot3(int *, int *);
void glmNot3_(bool x[3]) { glmNot3(x, x); }


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

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

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

LLVM IR (-O2):
define void @glmNot3_(i32* %0) {
%2 = tail call i32 @glmNot3(i32* %0, i32* %0)
ret void
}
/* Variables and functions */
int optncr(int);
int optncrf(int *n) {
  int optn;
  optn = optncr(*n);
  return optn;
}


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

x86 assembly (clang, -O2):
<optncrf>:
mov    (%rdi),%edi
jmp    1030 <optncr@plt>

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

LLVM IR (-O2):
define i32 @optncrf(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @optncr(i32 %2)
ret i32 %3
}
int set_direct_map_default_noflush(struct page *page) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define i32 @set_direct_map_default_noflush(%struct.page* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void macscp4_1_from_macscp2() {
  puts("macscp4_1_"
       "from_macscp2");
}


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

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

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

LLVM IR (-O2):
@.str = [23 x i8] c"macscp4_1_from_macscp2\00"
define void @macscp4_1_from_macscp2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
char *strcpy(char *dest __attribute__((unused)),
             const char *src __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @strcpy(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
struct tree {
  int dummy;
};
struct node {
  int dummy;
};

/* Variables and functions */
struct node *tree_RB_REMOVE(struct tree *, struct node *);
__attribute__((unused)) struct node *tree_remove_node(struct tree *t,
                                                      struct node *e) {
  return tree_RB_REMOVE(t, e);
}


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

x86 assembly (clang, -O2):
<tree_remove_node>:
jmp    1030 <tree_RB_REMOVE@plt>

LLVM IR (-O0):
%struct.tree = type { i32 }
%struct.node = type { i32 }
define %struct.node* @tree_remove_node(%struct.tree* %0, %struct.node* %1) {
%3 = alloca %struct.tree*
%4 = alloca %struct.node*
store %struct.tree* %0, %struct.tree** %3
store %struct.node* %1, %struct.node** %4
%5 = load %struct.tree*, %struct.tree** %3
%6 = load %struct.node*, %struct.node** %4
%7 = call %struct.node* @tree_RB_REMOVE(%struct.tree* %5, %struct.node* %6)
ret %struct.node* %7
}

LLVM IR (-O2):
%struct.tree = type { i32 }
%struct.node = type { i32 }
define %struct.node* @tree_remove_node(%struct.tree* %0, %struct.node* %1) {
%3 = tail call %struct.node* @tree_RB_REMOVE(%struct.tree* %0, %struct.node* %1)
ret %struct.node* %3
}
/* Variables and functions */
int /*<<< orphan*/ dump_out_mmx(void *, unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, char *);
void dump_out_mmx_msg(const void *msg, void *buf, unsigned int size,
                      unsigned int index) {
  printf("%s : ", (char *)msg);
  dump_out_mmx(buf, size, index);
}


x86 assembly (clang, -O0):
<dump_out_mmx_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <dump_out_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_out_mmx_msg>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <dump_out_mmx@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s : \00"
define void @dump_out_mmx_msg(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @dump_out_mmx(i8* %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void odd_handler(void *arg) { printf("Goodbye from Odd!\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Goodbye from Odd!\0A\00"
define void @odd_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Goodbye from Odd!\00"
define void @odd_handler(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0) {
    x = x + y;
    y = y - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1154 <main+0x44>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ checkSum();
int /*<<< orphan*/ getData();
int /*<<< orphan*/ initDHT11();
void readDHT11() {
  initDHT11();
  getData();
  checkSum();
}


x86 assembly (clang, -O0):
<readDHT11>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initDHT11@plt>
mov    $0x0,%al
call   1040 <getData@plt>
mov    $0x0,%al
call   1030 <checkSum@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<readDHT11>:
push   %rax
xor    %eax,%eax
call   1050 <initDHT11@plt>
xor    %eax,%eax
call   1040 <getData@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <checkSum@plt>

LLVM IR (-O0):
define void @readDHT11() {
%1 = call i32 (...) @initDHT11()
%2 = call i32 (...) @getData()
%3 = call i32 (...) @checkSum()
ret void
}

LLVM IR (-O2):
define void @readDHT11() {
%1 = tail call i32 (...) @initDHT11()
%2 = tail call i32 (...) @getData()
%3 = tail call i32 (...) @checkSum()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void validate(int number) {
  if (number <= 0) {
    exit(1);
  }
}


x86 assembly (clang, -O0):
<validate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112f <validate+0x1f>
mov    $0x1,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate>:
test   %edi,%edi
jle    1115 <validate+0x5>
ret
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @validate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @validate(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int _sl4_hash_comp_str(const void *key1, const void *key2) {
  return strcmp((const char *)key1, (const char *)key2);
}


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

x86 assembly (clang, -O2):
<_sl4_hash_comp_str>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @_sl4_hash_comp_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 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @_sl4_hash_comp_str(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) { fprintf(stderr, "usage: %s [-c]\n", name); }


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"usage: %s [-c]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void __clk_free_clk(struct clk *clk) {}


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

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

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

LLVM IR (-O2):
%struct.clk = type opaque
define void @__clk_free_clk(%struct.clk* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ dump_stack();
int /*<<< orphan*/ psignal(int, char *);
int /*<<< orphan*/ raise(int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
void sighandler_dump_stack(int sig) {
  psignal(sig, "handler");
  dump_stack();
  signal(sig, SIG_DFL);
  raise(sig);
}


x86 assembly (clang, -O0):
<sighandler_dump_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xeab(%rip),%rsi
call   1060 <psignal@plt>
mov    $0x0,%al
call   1040 <dump_stack@plt>
mov    -0x4(%rbp),%edi
mov    0x2e75(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler_dump_stack>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rsi
call   1060 <psignal@plt>
xor    %eax,%eax
call   1040 <dump_stack@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1050 <signal@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"handler\00"
@SIG_DFL = global i32 0
define void @sighandler_dump_stack(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @psignal(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @dump_stack()
%6 = load i32, i32* %2
%7 = load i32, i32* @SIG_DFL
%8 = call i32 @signal(i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @raise(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"handler\00"
@SIG_DFL = global i32 0
define void @sighandler_dump_stack(i32 %0) {
%2 = tail call i32 @psignal(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @dump_stack()
%4 = load i32, i32* @SIG_DFL
%5 = tail call i32 @signal(i32 %0, i32 %4)
%6 = tail call i32 @raise(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alloter_init();
int /*<<< orphan*/ metatable_init();
void init() {
  metatable_init();
  alloter_init();
}


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

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

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @metatable_init()
%2 = call i32 (...) @alloter_init()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @metatable_init()
%2 = tail call i32 (...) @alloter_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ errorMessage(char *, int /*<<< orphan*/);
scalar_t__ read(int, char *, int);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
unsigned char i2cRead(int fileDescriptor) {
  char buffer;
  if (read(fileDescriptor, &buffer, 1) < 0) {
    errorMessage("read failed: %s", strerror(errno));
  }
  return buffer;
}


x86 assembly (clang, -O0):
<i2cRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x0,%rax
jge    1172 <i2cRead+0x42>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1040 <errorMessage@plt>
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2cRead>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %rax,%rax
jns    1161 <i2cRead+0x31>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1040 <errorMessage@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"read failed: %s\00"
@errno = global i32 0
define zeroext i8 @i2cRead(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @read(i32 %4, i8* %3, i32 1)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @errno
%9 = call i32 @strerror(i32 %8)
%10 = call i32 @errorMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
ret i8 %12
}

LLVM IR (-O2):
@.str = [16 x i8] c"read failed: %s\00"
@errno = global i32 0
define zeroext i8 @i2cRead(i32 %0) {
%2 = alloca i8
%3 = call i64 @read(i32 %0, i8* %2, i32 1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @errorMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %1
%10 = load i8, i8* %2
ret i8 %10
}
int corner_before(int clipedge) {
  if ((clipedge & 0xc) == 8)
    return (2);
  else if ((clipedge & 0x6) == 4)
    return (1);
  else if ((clipedge & 0x3) == 2)
    return (0);
  return (3);
}


x86 assembly (clang, -O0):
<corner_before>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xc,%eax
cmp    $0x8,%eax
jne    1122 <corner_before+0x22>
movl   $0x2,-0x4(%rbp)
jmp    1169 <corner_before+0x69>
mov    -0x8(%rbp),%eax
and    $0x6,%eax
cmp    $0x4,%eax
jne    113d <corner_before+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1169 <corner_before+0x69>
mov    -0x8(%rbp),%eax
and    $0x3,%eax
cmp    $0x2,%eax
jne    1158 <corner_before+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1169 <corner_before+0x69>
jmp    115d <corner_before+0x5d>
jmp    1162 <corner_before+0x62>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_before>:
mov    %edi,%ecx
and    $0xc,%ecx
mov    $0x2,%eax
cmp    $0x8,%ecx
je     112c <corner_before+0x2c>
mov    %edi,%ecx
and    $0x6,%ecx
mov    $0x1,%eax
cmp    $0x4,%ecx
je     112c <corner_before+0x2c>
and    $0x3,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setne  %al
lea    (%rax,%rax,2),%eax
ret

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

LLVM IR (-O2):
define i32 @corner_before(i32 %0) {
%2 = and i32 %0, 12
%3 = icmp eq i32 %2, 8
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = and i32 %0, 6
%6 = icmp eq i32 %5, 4
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = and i32 %0, 3
%9 = icmp eq i32 %8, 2
%10 = select i1 %9, i32 0, i32 3
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 2, %1 ], [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) { printf("Usage: PIFcontroller -i <0x0000> -f [tty]\n"); }


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: PIFcontroller -i <0x0000> -f [tty]\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"Usage: PIFcontroller -i <0x0000> -f [tty]\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_free_id(void *, char *, int /*<<< orphan*/);
void debug_free(void *p) { debug_free_id(p, "<UNKNOWN>", 0); }


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

x86 assembly (clang, -O2):
<debug_free>:
lea    0xee9(%rip),%rsi
xor    %edx,%edx
jmp    1030 <debug_free_id@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"<UNKNOWN>\00"
define void @debug_free(i8* %0) {
%2 = tail call i32 @debug_free_id(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int Bank_GetAcctByName(char const *);
int Bank_int_AddUser(char const *);
int Bank_CreateAcct(const char *Name) {
  int ret;
  ret = Bank_GetAcctByName(Name);
  if (ret != -1)
    return -1;
  return Bank_int_AddUser(Name);
}


x86 assembly (clang, -O0):
<Bank_CreateAcct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <Bank_GetAcctByName@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     114e <Bank_CreateAcct+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <Bank_CreateAcct+0x3a>
mov    -0x10(%rbp),%rdi
call   1030 <Bank_int_AddUser@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bank_CreateAcct>:
push   %rbx
mov    %rdi,%rbx
call   1040 <Bank_GetAcctByName@plt>
cmp    $0xffffffff,%eax
je     1135 <Bank_CreateAcct+0x15>
mov    $0xffffffff,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <Bank_int_AddUser@plt>

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

LLVM IR (-O2):
define i32 @Bank_CreateAcct(i8* %0) {
%2 = tail call i32 @Bank_GetAcctByName(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Bank_int_AddUser(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}