xunge/DecIR huggingface dataset:
/* Variables and functions */
int createS_M();
int /*<<< orphan*/ detachS_M(void *);
int /*<<< orphan*/ detachsem();
int /*<<< orphan*/ opensem();
int /*<<< orphan*/ receive(void *);
void *shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main() {
  opensem();
  int shmid = createS_M();
  void *shmp_p = shmat(shmid, NULL, 0);
  receive(shmp_p);
  detachsem();
  detachS_M(shmp_p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <opensem@plt>
mov    $0x0,%al
call   1030 <createS_M@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1080 <shmat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <receive@plt>
mov    $0x0,%al
call   1070 <detachsem@plt>
mov    -0x10(%rbp),%rdi
call   1040 <detachS_M@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <opensem@plt>
xor    %eax,%eax
call   1030 <createS_M@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <shmat@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <receive@plt>
xor    %eax,%eax
call   1070 <detachsem@plt>
mov    %rbx,%rdi
call   1040 <detachS_M@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (...) @opensem()
%5 = call i32 (...) @createS_M()
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i8* @shmat(i32 %6, i32* null, i32 0)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @receive(i8* %8)
%10 = call i32 (...) @detachsem()
%11 = load i8*, i8** %3
%12 = call i32 @detachS_M(i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @opensem()
%2 = tail call i32 (...) @createS_M()
%3 = tail call i8* @shmat(i32 %2, i32* null, i32 0)
%4 = tail call i32 @receive(i8* %3)
%5 = tail call i32 (...) @detachsem()
%6 = tail call i32 @detachS_M(i8* %3)
ret i32 0
}
/* Type definitions */
struct DynArr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ popDynArr(struct DynArr *);
int /*<<< orphan*/ pushDynArr(struct DynArr *, int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(double);
double topDynArr(struct DynArr *);
void square_root(struct DynArr *stack) {
  double i = topDynArr(stack);
  popDynArr(stack);
  pushDynArr(stack, sqrt(i));
}


x86 assembly (clang, -O0):
<square_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <topDynArr@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <popDynArr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <pushDynArr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<square_root>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <topDynArr@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <popDynArr@plt>
movsd  0x8(%rsp),%xmm0
call   1050 <sqrt@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1060 <pushDynArr@plt>

LLVM IR (-O0):
%struct.DynArr = type { i32 }
define void @square_root(%struct.DynArr* %0) {
%2 = alloca %struct.DynArr*
%3 = alloca double
store %struct.DynArr* %0, %struct.DynArr** %2
%4 = load %struct.DynArr*, %struct.DynArr** %2
%5 = call double @topDynArr(%struct.DynArr* %4)
store double %5, double* %3
%6 = load %struct.DynArr*, %struct.DynArr** %2
%7 = call i32 @popDynArr(%struct.DynArr* %6)
%8 = load %struct.DynArr*, %struct.DynArr** %2
%9 = load double, double* %3
%10 = call i32 @sqrt(double %9)
%11 = call i32 @pushDynArr(%struct.DynArr* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.DynArr = type { i32 }
define void @square_root(%struct.DynArr* %0) {
%2 = tail call double @topDynArr(%struct.DynArr* %0)
%3 = tail call i32 @popDynArr(%struct.DynArr* %0)
%4 = tail call i32 @sqrt(double %2)
%5 = tail call i32 @pushDynArr(%struct.DynArr* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_unshare;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) { return syscall(__NR_unshare, 0); }


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_unshare = global i32 0
define i32 @main() {
%1 = load i32, i32* @__NR_unshare
%2 = tail call i32 @syscall(i32 %1, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_RADIO_GIO0_PIN() { clear_io_bit(-1, 5); }


x86 assembly (clang, -O0):
<TOSH_CLR_RADIO_GIO0_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
mov    $0x5,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_RADIO_GIO0_PIN>:
mov    $0xffffffff,%edi
mov    $0x5,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_RADIO_GIO0_PIN() {
%1 = call i32 @clear_io_bit(i32 -1, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_RADIO_GIO0_PIN() {
%1 = tail call i32 @clear_io_bit(i32 -1, i32 5)
ret void
}
void BN_CTX_end(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_CTX_end() {
ret void
}
/* Variables and functions */
float __nv_powf(float, float);
float powf(float __a, float __b) { return __nv_powf(__a, __b); }


x86 assembly (clang, -O0):
<powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__nv_powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powf>:
jmp    1030 <__nv_powf@plt>

LLVM IR (-O0):
define float @powf(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 @__nv_powf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
%3 = tail call float @__nv_powf(float %0, float %1)
ret float %3
}
int ck_cleol() { return (-1); }


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

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

LLVM IR (-O0):
define i32 @ck_cleol() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @ck_cleol() {
ret i32 -1
}
/* Variables and functions */
int missingNumber(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int arr[] = {0, 1, 3};
  int len = sizeof arr / sizeof arr[0];
  printf("%d\n", missingNumber(arr, len));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x3,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <missingNumber@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
call   1040 <missingNumber@plt>
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [3 x i32] [i32 0, i32 1, i32 3]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [3 x i32]* %2 to i8*
store i32 3, i32* %3
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @missingNumber(i32* %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [3 x i32] [i32 0, i32 1, i32 3]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @missingNumber(i32* %3, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("POSIX timing not implemented on this machine.");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [46 x i8] c"POSIX timing not implemented on this machine.\00"
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 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"POSIX timing not implemented on this machine.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
char *create_sheet(int *size) {
  char *sheet;
  sheet = (char *)malloc(*size);
}


x86 assembly (clang, -O0):
<create_sheet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @create_sheet(i32* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %4
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
define noalias i8* @create_sheet(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i64 @malloc(i32 %2)
ret i8* undef
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int rotate_r(int, int);
uint64_t S1(uint64_t h4) {
  return rotate_r(h4, 14) ^ rotate_r(h4, 18) ^ rotate_r(h4, 41);
}


x86 assembly (clang, -O0):
<S1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xe,%esi
call   1030 <rotate_r@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x29,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S1>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0xe,%esi
call   1030 <rotate_r@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x29,%esi
call   1030 <rotate_r@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @S1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotate_r(i32 %3, i32 14)
%5 = load i32, i32* %2
%6 = call i32 @rotate_r(i32 %5, i32 18)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @rotate_r(i32 %8, i32 41)
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @S1(i32 %0) {
%2 = tail call i32 @rotate_r(i32 %0, i32 14)
%3 = tail call i32 @rotate_r(i32 %0, i32 18)
%4 = xor i32 %3, %2
%5 = tail call i32 @rotate_r(i32 %0, i32 41)
%6 = xor i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printnum(void *number) { (void)printf(" %10.3g", *(double *)number); }


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

x86 assembly (clang, -O2):
<printnum>:
movsd  (%rdi),%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c" %10.3g\00"
define void @printnum(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to double*
%5 = load double, double* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %5)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c" %10.3g\00"
define void @printnum(i8* nocapture %0) {
%2 = bitcast i8* %0 to double*
%3 = load double, double* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_window_t;
typedef int /*<<< orphan*/ xcb_get_property_cookie_t;
typedef int /*<<< orphan*/ xcb_connection_t;
typedef int /*<<< orphan*/ xcb_atom_t;

/* Variables and functions */
int /*<<< orphan*/ UINT_MAX;
int /*<<< orphan*/ XCB_GET_PROPERTY_TYPE_ANY;
int /*<<< orphan*/ xcb_get_property(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
xcb_get_property_cookie_t xcb_icccm_get_text_property(xcb_connection_t *c,
                                                      xcb_window_t window,
                                                      xcb_atom_t property) {
  return xcb_get_property(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0,
                          UINT_MAX);
}


x86 assembly (clang, -O0):
<xcb_icccm_get_text_property>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    0x2eb5(%rip),%rax
mov    (%rax),%r8d
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %eax,(%rsp)
call   1030 <xcb_get_property@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcb_icccm_get_text_property>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    0x2ecc(%rip),%rax
mov    (%rax),%r8d
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
xor    %esi,%esi
xor    %r9d,%r9d
call   1030 <xcb_get_property@plt>
pop    %rcx
ret

LLVM IR (-O0):
@XCB_GET_PROPERTY_TYPE_ANY = global i32 0
@UINT_MAX = global i32 0
define i32 @xcb_icccm_get_text_property(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* %5
%9 = load i32, i32* %6
%10 = load i32, i32* @XCB_GET_PROPERTY_TYPE_ANY
%11 = load i32, i32* @UINT_MAX
%12 = call i32 @xcb_get_property(i32* %7, i32 0, i32 %8, i32 %9, i32 %10, i32 0, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@XCB_GET_PROPERTY_TYPE_ANY = global i32 0
@UINT_MAX = global i32 0
define i32 @xcb_icccm_get_text_property(i32* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @XCB_GET_PROPERTY_TYPE_ANY
%5 = load i32, i32* @UINT_MAX
%6 = tail call i32 @xcb_get_property(i32* %0, i32 0, i32 %1, i32 %2, i32 %4, i32 0, i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int /*<<< orphan*/ AES_encrypt(unsigned char const *, unsigned char *,
                               int /*<<< orphan*/ *);
int /*<<< orphan*/ AES_set_encrypt_key(unsigned char const *, int,
                                       int /*<<< orphan*/ *);
void aes_openssl(unsigned char out[16], const unsigned char k[16],
                 const unsigned char n[16]) {
  AES_KEY expanded;
  AES_set_encrypt_key(k, 128, &expanded);
  AES_encrypt(n, out, &expanded);
}


x86 assembly (clang, -O0):
<aes_openssl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x80,%esi
lea    -0x1c(%rbp),%rdx
call   1030 <AES_set_encrypt_key@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <AES_encrypt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_openssl>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
lea    0xc(%rsp),%r15
mov    %rsi,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   1030 <AES_set_encrypt_key@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <AES_encrypt@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @aes_openssl(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @AES_set_encrypt_key(i8* %1, i32 128, i32* %4)
%7 = call i32 @AES_encrypt(i8* %2, i8* %0, i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void dump_error(char *ss) {
  printf("\n Unrecoverable error\n %s \n  Exiting now \n", ss);
  exit(1);
}


x86 assembly (clang, -O0):
<dump_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<dump_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0A Unrecoverable error\0A %s \0A Exiting now \0A\00"
define void @dump_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [43 x i8] c"\0A Unrecoverable error\0A %s \0A Exiting now \0A\00"
define void @dump_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t TimerDMAEventGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x0000006C))));
}


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

x86 assembly (clang, -O2):
<TimerDMAEventGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x6c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @TimerDMAEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 108
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @TimerDMAEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 108
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int get_bind_path_router(char *bind_path) {
  strcpy(bind_path, "UDS_ROUTER");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"UDS_ROUTER\00"
define i32 @get_bind_path_router(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_message(void) {
  fprintf(
      stderr,
      "usage: lua [options].  Available options are:\n"
      "  -        execute stdin as a file\n"
      "  -c       close Lua when exiting\n"
      "  -e stat  execute string `stat'\n"
      "  -f name  execute file `name' with remaining arguments in table `arg'\n"
      "  -i       enter interactive mode with prompt\n"
      "  -q       enter interactive mode without prompt\n"
      "  -sNUM    set stack size to NUM (must be the first option)\n"
      "  -v       print version information\n"
      "  a=b      set global `a' to string `b'\n"
      "  name     execute file `name'\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [483 x i8] c"usage: lua [options]. Available options are:\0A - execute stdin as a file\0A -c close Lua when exiting\0A -e stat execute string `stat'\0A -f name execute file `name' with remaining arguments in table `arg'\0A -i enter interactive mode with prompt\0A -q enter interactive mode without prompt\0A -sNUM set stack size to NUM (must be the first option)\0A -v print version information\0A a=b set global `a' to string `b'\0A name execute file `name'\0A\00"
define void @print_message() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([483 x i8], [483 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [483 x i8] c"usage: lua [options]. Available options are:\0A - execute stdin as a file\0A -c close Lua when exiting\0A -e stat execute string `stat'\0A -f name execute file `name' with remaining arguments in table `arg'\0A -i enter interactive mode with prompt\0A -q enter interactive mode without prompt\0A -sNUM set stack size to NUM (must be the first option)\0A -v print version information\0A a=b set global `a' to string `b'\0A name execute file `name'\0A\00"
define void @print_message() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([483 x i8], [483 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0 && y > 0) {
    x = x - 1;
    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)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    1173 <main+0x63>
mov    -0x8(%rbp),%eax
sub    $0x1,%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 = %14, %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %19
14: ; preds = %12
%15 = load i32, i32* %2
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %2
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %12
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 puts(char *);
int main(void) { return puts("Hello"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fread(char *, int, int, int /*<<< orphan*/ *);
int stbi__stdio_read(void *user, char *data, int size) {
  return (int)fread(data, 1, size, (FILE *)user);
}


x86 assembly (clang, -O0):
<stbi__stdio_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbi__stdio_read>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i32 @stbi__stdio_read(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i64 @fread(i8* %7, i32 1, i32 %8, i32* %10)
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @stbi__stdio_read(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i64 @fread(i8* %1, i32 1, i32 %2, i32* %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ warp_pointer(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc < 3)
    return 1;
  warp_pointer(atoi(argv[1]), atoi(argv[2]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    117a <main+0x5a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <warp_pointer@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x3,%edi
jl     1155 <main+0x35>
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <warp_pointer@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %19
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = call i32 @warp_pointer(i32 %13, i32 %17)
store i32 0, i32* %3
br label %19
19: ; preds = %9, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @warp_pointer(i32 %7, i32 %10)
br label %12
12: ; preds = %2, %4
%13 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %13
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2SOutPointerNextGet(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(0x40021000 + 0x00000028))));
}


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

x86 assembly (clang, -O2):
<I2SOutPointerNextGet>:
mov    %rdi,-0x8(%rsp)
mov    0x40021028,%rax
40
ret

LLVM IR (-O0):
define i64 @I2SOutPointerNextGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073877032 to i64*)
ret i64 %3
}

LLVM IR (-O2):
define i64 @I2SOutPointerNextGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073877032 to i64*)
ret i64 %3
}
void ls_cost_nm10_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_cost_nm10_incref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vec2f(float, float);
float vec2f_distance(int /*<<< orphan*/, int /*<<< orphan*/);
float call_distance2(float x1, float y1, float x2, float y2) {
  return vec2f_distance(vec2f(x1, y1), vec2f(x2, y2));
}


x86 assembly (clang, -O0):
<call_distance2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <vec2f@plt>
mov    %eax,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <vec2f@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <vec2f_distance@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_distance2>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm3,0xc(%rsp)
movss  %xmm2,0x8(%rsp)
call   1030 <vec2f@plt>
mov    %eax,%ebx
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1030 <vec2f@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <vec2f_distance@plt>

LLVM IR (-O0):
define float @call_distance2(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = call i32 @vec2f(float %9, float %10)
%12 = load float, float* %7
%13 = load float, float* %8
%14 = call i32 @vec2f(float %12, float %13)
%15 = call float @vec2f_distance(i32 %11, i32 %14)
ret float %15
}

LLVM IR (-O2):
define float @call_distance2(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @vec2f(float %0, float %1)
%6 = tail call i32 @vec2f(float %2, float %3)
%7 = tail call float @vec2f_distance(i32 %5, i32 %6)
ret float %7
}
/* Variables and functions */
int strcmp(char *, char *);
int stringcmp(const void *a, const void *b) {
  char **x = (char **)a;
  char **y = (char **)b;
  return strcmp(*x, *y);
}


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

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

LLVM IR (-O0):
define i32 @stringcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @stringcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __NR_close;
int ppc_syscall(int /*<<< orphan*/, int, int /*<<< orphan*/,
                int /*<<< orphan*/);
int ppc_close(int fd) { return ppc_syscall(__NR_close, fd, 0, 0); }


x86 assembly (clang, -O0):
<ppc_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <ppc_syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ppc_close>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <ppc_syscall@plt>

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

LLVM IR (-O2):
@__NR_close = global i32 0
define i32 @ppc_close(i32 %0) {
%2 = load i32, i32* @__NR_close
%3 = tail call i32 @ppc_syscall(i32 %2, i32 %0, i32 0, i32 0)
ret i32 %3
}
void test_five(int x, int y, int z) {
#pragma omp parallel for collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_five(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %10
10: ; preds = %33, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %36
14: ; preds = %10
store i32 0, i32* %8
br label %15
15: ; preds = %29, %14
%16 = load i32, i32* %8
%17 = load i32, i32* %5
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %32
19: ; preds = %15
store i32 0, i32* %9
br label %20
20: ; preds = %25, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %6
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
br label %25
25: ; preds = %24
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
store i32 %27, i32* %9
br label %20
28: ; preds = %20
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %15
32: ; preds = %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %10
36: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
int main(void) {
  int a;
  int *b = &a;
  b = (int *)a;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void md_input_action(int x, int y, double val1, double val2, double val3,
                     double val4) {}


x86 assembly (clang, -O0):
<md_input_action>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @md_input_action(i32 %0, i32 %1, double %2, double %3, double %4, double %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
ret void
}

LLVM IR (-O2):
define void @md_input_action(i32 %0, i32 %1, double %2, double %3, double %4, double %5) {
ret void
}
double feetToInches(double feet) { return feet * 12.0; }


x86 assembly (clang, -O0):
<feetToInches>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<feetToInches>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @feetToInches(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.200000e+01
ret double %4
}

LLVM IR (-O2):
define double @feetToInches(double %0) {
%2 = fmul double %0, 1.200000e+01
ret double %2
}
void watchdog_device_init(int timeoutMs) {}


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

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

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

LLVM IR (-O2):
define void @watchdog_device_init(i32 %0) {
ret void
}
unsigned long ft_strlen(char *str) {
  unsigned long len;
  len = 0;
  while (str[len])
    len++;
  return (len);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <ft_strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ft_strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <ft_strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @ft_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ bsp_coresight_suspend();
void bsp_utrace_suspend(void) {
  bsp_coresight_suspend();
  return;
}


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

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

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

LLVM IR (-O2):
define void @bsp_utrace_suspend() {
%1 = tail call i32 (...) @bsp_coresight_suspend()
ret void
}
int ext2_delete_from_directory(struct ext2context *context, char *filename,
                               int *rerrno) {}


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

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

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

LLVM IR (-O2):
%struct.ext2context = type opaque
define i32 @ext2_delete_from_directory(%struct.ext2context* nocapture readnone %0, i8* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 undef
}
/* Variables and functions */
int blastzToWublastScore(int);
double blastzScoreToWuBits(int bzScore, int isProt) {
  int wuScore = blastzToWublastScore(bzScore);
  if (isProt)
    return wuScore * 0.3545;
  else
    return wuScore * 0.1553;
}


x86 assembly (clang, -O0):
<blastzScoreToWuBits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <blastzToWublastScore@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     114e <blastzScoreToWuBits+0x3e>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <blastzScoreToWuBits+0x54>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blastzScoreToWuBits>:
push   %rbx
xor    %ebx,%ebx
test   %esi,%esi
sete   %bl
call   1030 <blastzToWublastScore@plt>
cvtsi2sd %eax,%xmm0
lea    0xed8(%rip),%rax
mulsd  (%rax,%rbx,8),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @blastzScoreToWuBits(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = call i32 @blastzToWublastScore(i32 %7)
store i32 %8, i32* %6
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %6
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 3.545000e-01
store double %14, double* %3
br label %19
15: ; preds = %2
%16 = load i32, i32* %6
%17 = sitofp i32 %16 to double
%18 = fmul double %17, 1.553000e-01
store double %18, double* %3
br label %19
19: ; preds = %15, %11
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
define double @blastzScoreToWuBits(i32 %0, i32 %1) {
%3 = tail call i32 @blastzToWublastScore(i32 %0)
%4 = icmp eq i32 %1, 0
%5 = sitofp i32 %3 to double
%6 = select i1 %4, double 1.553000e-01, double 3.545000e-01
%7 = fmul double %6, %5
ret double %7
}
int test_imm_4Bint32_mem(int *val) {
  return ((*val) & (0x4B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Bint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 75
%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_4Bint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 75
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ alloc_failed();
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *result = malloc(size);
  if (result == NULL && size > 0)
    alloc_failed();
  return result;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <xmalloc+0x36>
cmpq   $0x0,-0x8(%rbp)
jbe    1156 <xmalloc+0x36>
mov    $0x0,%al
call   1040 <alloc_failed@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1140 <xmalloc+0x20>
test   %r14,%r14
jne    1140 <xmalloc+0x20>
xor    %eax,%eax
call   1040 <alloc_failed@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ugt i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @alloc_failed()
br label %13
13: ; preds = %11, %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @alloc_failed()
br label %8
8: ; preds = %6, %1
ret i8* %2
}