xunge/DecIR huggingface dataset:
unsigned short SPI_put(unsigned short data) {
  while (!((*((volatile unsigned char *)0xE006800C)) & 0x2))
    ;
  (*((volatile unsigned short *)0xE0068008)) = data;
  while ((*((volatile unsigned char *)0xE006800C)) & 0x10)
    ;
  return 0x80;
}


x86 assembly (clang, -O0):
<SPI_put>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0xe006800c,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112d <SPI_put+0x2d>
jmp    1132 <SPI_put+0x32>
jmp    110b <SPI_put+0xb>
mov    -0x2(%rbp),%cx
mov    $0xe0068008,%eax
mov    %cx,(%rax)
mov    $0xe006800c,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1159 <SPI_put+0x59>
jmp    113e <SPI_put+0x3e>
mov    $0x80,%ax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPI_put>:
mov    $0xe006800c,%eax
cs nopw 0x0(%rax,%rax,1)
nop
testb  $0x2,(%rax)
je     1110 <SPI_put+0x10>
mov    %di,-0x4(%rax)
nopl   0x0(%rax)
testb  $0x10,(%rax)
jne    1120 <SPI_put+0x20>
mov    $0x80,%ax
ret

LLVM IR (-O0):
define zeroext i16 @SPI_put(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
br label %3
3: ; preds = %9, %1
%4 = load volatile i8, i8* inttoptr (i64 3758522380 to i8*)
%5 = zext i8 %4 to i32
%6 = and i32 %5, 2
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %10
9: ; preds = %3
br label %3
10: ; preds = %3
%11 = load i16, i16* %2
store volatile i16 %11, i16* inttoptr (i64 3758522376 to i16*)
br label %12
12: ; preds = %17, %10
%13 = load volatile i8, i8* inttoptr (i64 3758522380 to i8*)
%14 = zext i8 %13 to i32
%15 = and i32 %14, 16
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12
br label %12
18: ; preds = %12
ret i16 128
}

LLVM IR (-O2):
define zeroext i16 @SPI_put(i16 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i8, i8* inttoptr (i64 3758522380 to i8*)
%4 = and i8 %3, 2
%5 = icmp eq i8 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
store volatile i16 %0, i16* inttoptr (i64 3758522376 to i16*)
br label %7
7: ; preds = %7, %6
%8 = load volatile i8, i8* inttoptr (i64 3758522380 to i8*)
%9 = and i8 %8, 16
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %7
11: ; preds = %7
ret i16 128
}
/* Variables and functions */
int /*<<< orphan*/ p(int);
main() { p(3); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @p(i32 3)
ret i32 0
}
/* Variables and functions */
char **AN_split_string_c(char const *, char const, char const *, char const *,
                         int /*<<< orphan*/ *);
char **AN_split_string(const char *str, const char separator,
                       const char *quotes, const char *whitespace) {
  return AN_split_string_c(str, separator, quotes, whitespace, NULL);
}


x86 assembly (clang, -O0):
<AN_split_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %esi,%esi
mov    %esi,%r8d
movsbl %al,%esi
call   1030 <AN_split_string_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AN_split_string>:
xor    %r8d,%r8d
jmp    1030 <AN_split_string_c@plt>

LLVM IR (-O0):
define i8** @AN_split_string(i8* %0, i8 signext %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8, i8* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i8** @AN_split_string_c(i8* %9, i8 signext %10, i8* %11, i8* %12, i32* null)
ret i8** %13
}

LLVM IR (-O2):
define i8** @AN_split_string(i8* %0, i8 signext %1, i8* %2, i8* %3) {
%5 = tail call i8** @AN_split_string_c(i8* %0, i8 signext %1, i8* %2, i8* %3, i32* null)
ret i8** %5
}
/* Variables and functions */
long double ceilld(long double);
long double floorld(long double);
long double roundld(long double num) {
  return (num - floorld(num) > 0.5) ? ceilld(num) : floorld(num);
}


x86 assembly (clang, -O0):
<roundld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fstpt  -0x1c(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <floorld@plt>
fldt   -0x1c(%rbp)
fsubp  %st,%st(1)
flds   0xeb5(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    1171 <roundld+0x51>
jmp    115c <roundld+0x3c>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <ceilld@plt>
fstpt  -0x28(%rbp)
jmp    1181 <roundld+0x61>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <floorld@plt>
fstpt  -0x28(%rbp)
fldt   -0x28(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundld>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
call   1030 <floorld@plt>
fldt   0x1c(%rsp)
fsub   %st,%st(1)
flds   0xebe(%rip)
fxch   %st(2)
fucomip %st(2),%st
fstp   %st(1)
jbe    1157 <roundld+0x37>
fstpt  (%rsp)
call   1040 <ceilld@plt>
add    $0x28,%rsp
ret
fstpt  (%rsp)
call   1030 <floorld@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @roundld(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 @floorld(x86_fp80 %4)
%6 = fsub x86_fp80 %3, %5
%7 = fcmp ogt x86_fp80 %6, 0xK3FFE8000000000000000
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load x86_fp80, x86_fp80* %2
%10 = call x86_fp80 @ceilld(x86_fp80 %9)
br label %14
11: ; preds = %1
%12 = load x86_fp80, x86_fp80* %2
%13 = call x86_fp80 @floorld(x86_fp80 %12)
br label %14
14: ; preds = %11, %8
%15 = phi x86_fp80 [ %10, %8 ], [ %13, %11 ]
ret x86_fp80 %15
}

LLVM IR (-O2):
define x86_fp80 @roundld(x86_fp80 %0) {
%2 = tail call x86_fp80 @floorld(x86_fp80 %0)
%3 = fsub x86_fp80 %0, %2
%4 = fcmp ogt x86_fp80 %3, 0xK3FFE8000000000000000
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call x86_fp80 @ceilld(x86_fp80 %0)
br label %9
7: ; preds = %1
%8 = tail call x86_fp80 @floorld(x86_fp80 %0)
br label %9
9: ; preds = %7, %5
%10 = phi x86_fp80 [ %6, %5 ], [ %8, %7 ]
ret x86_fp80 %10
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
void bitmap64_clear(int64_t *bitmap, int n) { *bitmap &= ~((int64_t)1 << n); }


x86 assembly (clang, -O0):
<bitmap64_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap64_clear>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @bitmap64_clear(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = xor i32 %6, -1
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = and i32 %9, %7
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @bitmap64_clear(i32* nocapture %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = load i32, i32* %0
%6 = and i32 %5, %4
store i32 %6, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_est_date_end() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_est_date_end>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_est_date_end>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_est_date_end() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_est_date_end() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int STC3115_ReadByte(int);
int STC3115_AlarmGet(void) {
  int res;
  res = STC3115_ReadByte(0x01);
  if (res == -1)
    return (res);
  res = res >> 5;
  return (res);
}


x86 assembly (clang, -O0):
<STC3115_AlarmGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <STC3115_ReadByte@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    113a <STC3115_AlarmGet+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <STC3115_AlarmGet+0x39>
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC3115_AlarmGet>:
push   %rax
mov    $0x1,%edi
call   1030 <STC3115_ReadByte@plt>
sar    $0x5,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @STC3115_AlarmGet() {
%1 = tail call i32 @STC3115_ReadByte(i32 1)
%2 = ashr i32 %1, 5
ret i32 %2
}
float *vec3_divide(float *result, float *a, float *b) {
  result[0] = a[0] / b[0];
  result[1] = a[1] / b[1];
  result[2] = a[2] / b[2];
  return result;
}


x86 assembly (clang, -O0):
<vec3_divide>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
divss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
divss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
divss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_divide>:
mov    %rdi,%rax
movss  (%rsi),%xmm0
divss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
divss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
divss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define float* @vec3_divide(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fdiv float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fdiv float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fdiv float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
%34 = load float*, float** %4
ret float* %34
}

LLVM IR (-O2):
define float* @vec3_divide(float* returned writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fdiv float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fdiv float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fdiv float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret float* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_movepi64_pi64(int /*<<< orphan*/);
__m64 test_mm_movepi64_pi64(__m128i A) { return _mm_movepi64_pi64(A); }


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

x86 assembly (clang, -O2):
<test_mm_movepi64_pi64>:
jmp    1030 <_mm_movepi64_pi64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_movepi64_pi64(i32 %0) {
%2 = tail call i32 @_mm_movepi64_pi64(i32 %0)
ret i32 %2
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_io_get_gpio_in_addr(void *port) {
  return cfg_processor_get_hex_int_attr(port, "in");
}


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

x86 assembly (clang, -O2):
<cfg_io_get_gpio_in_addr>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"in\00"
define i32 @cfg_io_get_gpio_in_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int libtasTestFunc3();
int libtasTestCallingFunc3() { return libtasTestFunc3(); }


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

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

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

LLVM IR (-O2):
define i32 @libtasTestCallingFunc3() {
%1 = tail call i32 (...) @libtasTestFunc3()
ret i32 %1
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t const);
char *strncpy_term(char *dst, const char *src, const size_t len) {
  char *res = strncpy(dst, src, len);
  if (res && len > 0)
    dst[len - 1] = '\0';
  return res;
}


x86 assembly (clang, -O0):
<strncpy_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115f <strncpy_term+0x4f>
cmpq   $0x0,-0x18(%rbp)
jbe    115f <strncpy_term+0x4f>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_term>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strncpy@plt>
test   %rbx,%rbx
je     112f <strncpy_term+0x1f>
test   %r14,%r14
je     112f <strncpy_term+0x1f>
movb   $0x0,-0x1(%r14,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strncpy_term(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i8* @strncpy(i8* %8, i8* %9, i64 %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %22
14: ; preds = %3
%15 = load i64, i64* %6
%16 = icmp ugt i64 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i8*, i8** %4
%19 = load i64, i64* %6
%20 = sub i64 %19, 1
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
br label %22
22: ; preds = %17, %14, %3
%23 = load i8*, i8** %7
ret i8* %23
}

LLVM IR (-O2):
define i8* @strncpy_term(i8* returned %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %2)
%5 = icmp ne i8* %0, null
%6 = icmp ne i64 %2, 0
%7 = and i1 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = add i64 %2, -1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %8, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void Panic(char *file, int line) {
  (void)fprintf(stderr, "\nPANIC [%s line %d] ", file, line);
  (void)perror("Unusual error");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<Panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xeb3(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<Panic>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xec3(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"\0APANIC [%s line %d] \00"
@.str.1 = [14 x i8] c"Unusual error\00"
@EXIT_FAILURE = global i32 0
define void @Panic(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"\0APANIC [%s line %d] \00"
@.str.1 = [14 x i8] c"Unusual error\00"
@EXIT_FAILURE = global i32 0
define void @Panic(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void usage(FILE *stream) {
  fputs("usage: "
        "prime"
        " [-h|--help]\n       "
        "prime"
        " [-s|--short] [--] <num>...\n       "
        "prime"
        " [-s|--short] -r|--range [<start>] <stop>\n",
        stream);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x77,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [120 x i8] c"usage: prime [-h|--help]\0A prime [-s|--short] [--] <num>...\0A prime [-s|--short] -r|--range [<start>] <stop>\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [120 x i8] c"usage: prime [-h|--help]\0A prime [-s|--short] [--] <num>...\0A prime [-s|--short] -r|--range [<start>] <stop>\0A\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0), i64 119, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *);
scalar_t__ malloc(int);
scalar_t__ nondet();
int main() {
  int *r;
  int y;
  r = (int *)malloc(4);
  *r = 0;
  while (nondet()) {
    *r = *r + 1;
  }
  foo(r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     117c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1157 <main+0x27>
mov    -0x10(%rbp),%rdi
call   1050 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
je     1161 <main+0x31>
addl   $0x1,(%rbx)
jmp    1150 <main+0x20>
mov    %rbx,%rdi
call   1050 <foo@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 0, i32* %6
br label %7
7: ; preds = %10, %0
%8 = call i64 (...) @nondet()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
%14 = load i32*, i32** %2
store i32 %13, i32* %14
br label %7
15: ; preds = %7
%16 = load i32*, i32** %2
%17 = call i32 @foo(i32* %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 0, i32* %2
%3 = tail call i64 (...) @nondet()
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = tail call i64 (...) @nondet()
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
%11 = tail call i32 @foo(i32* %2)
ret i32 0
}
int test_imm_CFuint8_reg(unsigned char val) {
  return ((val) & (-0xCF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CFuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff31,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_CFuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 49
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "Compilation of %s was skipped due to unsupported libc.\n",
          argv[0]);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"Compilation of %s was skipped due to unsupported libc.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @EXIT_FAILURE
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"Compilation of %s was skipped due to unsupported libc.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}
/* Variables and functions */
float dotProduct(float const *, float const *);
float vectorNorm(float const *);
float angleBetweenVectors(const float *v1, const float *v2) {
  return dotProduct(v1, v2) / (vectorNorm(v1) * vectorNorm(v2));
}


x86 assembly (clang, -O0):
<angleBetweenVectors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <dotProduct@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <vectorNorm@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <vectorNorm@plt>
movss  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
mulss  %xmm2,%xmm1
divss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<angleBetweenVectors>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <dotProduct@plt>
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
call   1040 <vectorNorm@plt>
movss  %xmm0,(%rsp)
mov    %r14,%rdi
call   1040 <vectorNorm@plt>
mulss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float @angleBetweenVectors(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call float @dotProduct(float* %5, float* %6)
%8 = load float*, float** %3
%9 = call float @vectorNorm(float* %8)
%10 = load float*, float** %4
%11 = call float @vectorNorm(float* %10)
%12 = fmul float %9, %11
%13 = fdiv float %7, %12
ret float %13
}

LLVM IR (-O2):
define float @angleBetweenVectors(float* %0, float* %1) {
%3 = tail call float @dotProduct(float* %0, float* %1)
%4 = tail call float @vectorNorm(float* %0)
%5 = tail call float @vectorNorm(float* %1)
%6 = fmul float %4, %5
%7 = fdiv float %3, %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bar();
int main(void) {
  int res;
  res = bar();
  if (res != 45)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <bar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x2d,-0x8(%rbp)
je     114a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
cmp    $0x2d,%eax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = icmp eq i32 %1, 45
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
int enclave_execve() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @enclave_execve() {
ret i32 0
}
void XSetWMSizeHints() {}


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

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

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

LLVM IR (-O2):
define void @XSetWMSizeHints() {
ret void
}
/* Variables and functions */
int cos(double);
double haversin(double x) { return (1 - cos(x)) / 2; }


x86 assembly (clang, -O0):
<haversin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<haversin>:
push   %rax
call   1030 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @haversin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @cos(double %3)
%5 = sub nsw i32 1, %4
%6 = sdiv i32 %5, 2
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @haversin(double %0) {
%2 = tail call i32 @cos(double %0)
%3 = sub nsw i32 1, %2
%4 = sdiv i32 %3, 2
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage: hosts --add|--delete [--zone interface] hostname address\n");
  exit(EINVAL);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [65 x i8] c"Usage: hosts --add|--delete [--zone interface] hostname address\0A\00"
@EINVAL = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EINVAL
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [65 x i8] c"Usage: hosts --add|--delete [--zone interface] hostname address\0A\00"
@EINVAL = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EINVAL
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int get_dreg(uint32_t insn) { return (insn & 0x003e0000) >> 17; }


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

x86 assembly (clang, -O2):
<get_dreg>:
mov    %edi,%eax
shr    $0x11,%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @get_dreg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 4063232
%5 = ashr i32 %4, 17
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_dreg(i32 %0) {
%2 = lshr i32 %0, 17
%3 = and i32 %2, 31
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xexpose_send_event(void *_p) {
  return (int)((XEvent *)_p)->xexpose.send_event;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xexpose_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xexpose_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xexpose_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_aupdate_write_end() {
  printf("NOT IMPLEMENTED:"
         "pa_aupdate_write_end"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_aupdate_write_end\00"
define i32 @pa_aupdate_write_end() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vasprintf(char **, char const *, int /*<<< orphan*/);
int mx_vasprintf_forever(char **strp, const char *fmt, va_list ap) {
  int len;
  do {
    len = vasprintf(strp, fmt, ap);
  } while (len < 0);
  return len;
}


x86 assembly (clang, -O0):
<mx_vasprintf_forever>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <vasprintf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1123 <mx_vasprintf_forever+0x13>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mx_vasprintf_forever>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
nopl   (%rax)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <vasprintf@plt>
test   %eax,%eax
js     1120 <mx_vasprintf_forever+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mx_vasprintf_forever(i8** %0, i8* %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @vasprintf(i8** %0, i8* %1, i32 %2)
%6 = icmp slt i32 %5, 0
br i1 %6, label %4, label %7
7: ; preds = %4
ret i32 %5
}
void INT_Excep_DMAC_DMTEND2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_DMAC_DMTEND2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ source;
typedef int /*<<< orphan*/ dest;

/* Variables and functions */
int /*<<< orphan*/ logger(int, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, int, char *);
int /*<<< orphan*/ system(char *);
int convert_img(char *source, char *dest, int quality) {
  char cmd[sizeof(source) + sizeof(dest) + 211];
  sprintf(cmd, "convert ./www/%s -quality %d ./cache/%s", source, quality,
          dest);
  logger(200, "RUNNING", cmd);
  system(cmd);
  return 1;
}


x86 assembly (clang, -O0):
<convert_img>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x100(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xea1(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x100(%rbp),%rdx
mov    $0xc8,%edi
lea    0xeb1(%rip),%rsi
call   1040 <logger@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_img>:
push   %rbx
sub    $0xf0,%rsp
mov    %edx,%ecx
mov    %rsi,%r8
mov    %rdi,%rdx
lea    0xeb9(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
lea    0xecf(%rip),%rsi
mov    $0xc8,%edi
mov    %rbx,%rdx
call   1040 <logger@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    $0x1,%eax
add    $0xf0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"convert ./www/%s -quality %d ./cache/%s\00"
@.str.1 = [8 x i8] c"RUNNING\00"
define i32 @convert_img(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [227 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [227 x i8], [227 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = load i32, i32* %6
%11 = load i8*, i8** %5
%12 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10, i8* %11)
%13 = getelementptr inbounds [227 x i8], [227 x i8]* %7, i64 0, i64 0
%14 = call i32 @logger(i32 200, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [227 x i8], [227 x i8]* %7, i64 0, i64 0
%16 = call i32 @system(i8* %15)
ret i32 1
}

LLVM IR (-O2):
@.str = [40 x i8] c"convert ./www/%s -quality %d ./cache/%s\00"
@.str.1 = [8 x i8] c"RUNNING\00"
define i32 @convert_img(i8* %0, i8* %1, i32 %2) {
%4 = alloca [227 x i8]
%5 = getelementptr inbounds [227 x i8], [227 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2, i8* %1)
%7 = call i32 @logger(i32 200, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%8 = call i32 @system(i8* %5)
ret i32 1
}
/* Variables and functions */
int _nodelist_common_string_get_token_common(char *, char *, int *,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/ *);
int nodelist_common_string_get_tokens_quantity(char *string,
                                               char *separators_list,
                                               int *p_token_nb) {
  int fstatus = -1;
  fstatus = _nodelist_common_string_get_token_common(string, separators_list,
                                                     p_token_nb, 0, NULL);
  return fstatus;
}


x86 assembly (clang, -O0):
<nodelist_common_string_get_tokens_quantity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <_nodelist_common_string_get_token_common@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nodelist_common_string_get_tokens_quantity>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <_nodelist_common_string_get_token_common@plt>

LLVM IR (-O0):
define i32 @nodelist_common_string_get_tokens_quantity(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
store i32 -1, i32* %7
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = call i32 @_nodelist_common_string_get_token_common(i8* %8, i8* %9, i32* %10, i32 0, i32* null)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @nodelist_common_string_get_tokens_quantity(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32 @_nodelist_common_string_get_token_common(i8* %0, i8* %1, i32* %2, i32 0, i32* null)
ret i32 %4
}
/* Variables and functions */
unsigned int hasard(unsigned int const, unsigned int const);
unsigned int tirerPorteeAleatoireNouveauEnnemi(const unsigned int niveauIA) {
  static const unsigned int basePorteeEnnemi[3][2] = {{1, 1}, {2, 5}, {5, 7}};
  return hasard(basePorteeEnnemi[niveauIA][0], basePorteeEnnemi[niveauIA][1]);
}


x86 assembly (clang, -O0):
<tirerPorteeAleatoireNouveauEnnemi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xed9(%rip),%rax
mov    (%rax,%rcx,8),%edi
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xeca(%rip),%rax
mov    0x4(%rax,%rcx,8),%esi
call   1030 <hasard@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tirerPorteeAleatoireNouveauEnnemi>:
mov    %edi,%eax
lea    0xee7(%rip),%rcx
mov    (%rcx,%rax,8),%edi
mov    0x4(%rcx,%rax,8),%esi
jmp    1030 <hasard@plt>

LLVM IR (-O0):
@tirerPorteeAleatoireNouveauEnnemi.basePorteeEnnemi = internal constant [3 x [2 x i32]] [[2 x i32] [i32 1, i32 1], [2 x i32] [i32 2, i32 5], [2 x i32] [i32 5, i32 7]]
define i32 @tirerPorteeAleatoireNouveauEnnemi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerPorteeAleatoireNouveauEnnemi.basePorteeEnnemi, i64 0, i64 %4
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* %6
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerPorteeAleatoireNouveauEnnemi.basePorteeEnnemi, i64 0, i64 %9
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%12 = load i32, i32* %11
%13 = call i32 @hasard(i32 %7, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@tirerPorteeAleatoireNouveauEnnemi.basePorteeEnnemi = internal unnamed_addr constant [3 x [2 x i32]] [[2 x i32] [i32 1, i32 1], [2 x i32] [i32 2, i32 5], [2 x i32] [i32 5, i32 7]]
define i32 @tirerPorteeAleatoireNouveauEnnemi(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerPorteeAleatoireNouveauEnnemi.basePorteeEnnemi, i64 0, i64 %2, i64 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerPorteeAleatoireNouveauEnnemi.basePorteeEnnemi, i64 0, i64 %2, i64 1
%6 = load i32, i32* %5
%7 = tail call i32 @hasard(i32 %4, i32 %6)
ret i32 %7
}
void SIO1writeCtrl16(unsigned short val) {}


x86 assembly (clang, -O0):
<SIO1writeCtrl16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SIO1writeCtrl16(i16 zeroext %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
__attribute__((always_, const)) uint16_t ByteToBE16(uint8_t a, uint8_t b) {
  return ((uint16_t)a << 0) | ((uint16_t)b << 8);
}


x86 assembly (clang, -O0):
<ByteToBE16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x0,%eax
mov    -0x10(%rbp),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ByteToBE16>:
mov    %rsi,%rax
shl    $0x8,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ByteToBE16(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %4, 8
%6 = or i32 %5, %3
ret i32 %6
}
void RTThreadIsMain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadIsMain() {
ret void
}
void SetTests(void) {}


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

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

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

LLVM IR (-O2):
define void @SetTests() {
ret void
}
int sync_wait(int fd, int timeout) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sync_wait(i32 %0, i32 %1) {
ret i32 0
}
void X509_get_ext_count(void) {}


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

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

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

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