xunge/DecIR huggingface dataset:
/* Type definitions */
struct section_list {
  int dummy;
};
struct section {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_prepend(struct genlist *, struct section *);
void section_list_prepend(struct section_list *tthis, struct section *pfoo) {
  genlist_prepend((struct genlist *)tthis, pfoo);
}


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

x86 assembly (clang, -O2):
<section_list_prepend>:
jmp    1030 <genlist_prepend@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.section = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_prepend(%struct.section_list* %0, %struct.section* %1) {
%3 = alloca %struct.section_list*
%4 = alloca %struct.section*
store %struct.section_list* %0, %struct.section_list** %3
store %struct.section* %1, %struct.section** %4
%5 = load %struct.section_list*, %struct.section_list** %3
%6 = bitcast %struct.section_list* %5 to %struct.genlist*
%7 = load %struct.section*, %struct.section** %4
%8 = call i32 @genlist_prepend(%struct.genlist* %6, %struct.section* %7)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.section = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_prepend(%struct.section_list* %0, %struct.section* %1) {
%3 = bitcast %struct.section_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_prepend(%struct.genlist* %3, %struct.section* %1)
ret void
}
int last_func(void) {
  printf("----- DONE!!! ----- %s\n", __FUNCTION__);
  printf(
      "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
  return 1;
}


x86 assembly (clang, -O0):
<last_func>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_func>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"----- DONE!!! ----- %s\0A\00"
@__FUNCTION__.last_func = [10 x i8] c"last_func\00"
@.str.1 = [70 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\0A\00"
define i32 @last_func() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.last_func, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [24 x i8] c"----- DONE!!! ----- %s\0A\00"
@__FUNCTION__.last_func = [10 x i8] c"last_func\00"
@str = [69 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\00"
define i32 @last_func() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.last_func, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int getopt_internal(int, char *const *, char const *, int /*<<< orphan*/ *,
                    int /*<<< orphan*/ *, int);
int getopt(int nargc, char *const *nargv, const char *options) {
  return (getopt_internal(nargc, nargv, options, NULL, NULL, 0x01));
}


x86 assembly (clang, -O0):
<getopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    $0x1,%r9d
mov    %r8,%rcx
call   1030 <getopt_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt>:
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
jmp    1030 <getopt_internal@plt>

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

LLVM IR (-O2):
define i32 @getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @getopt_internal(i32 %0, i8** %1, i8* %2, i32* null, i32* null, i32 1)
ret i32 %4
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ doubletimeval(double, struct timeval *);
int /*<<< orphan*/ timevaldouble(struct timeval *);
double variance(int /*<<< orphan*/, double, int);
void variancetime(struct timeval *SumTime, double SumSquareTime, int NumTimes,
                  struct timeval *VarianceTime) {
  double result;
  result = variance(timevaldouble(SumTime), SumSquareTime, NumTimes);
  doubletimeval(result, VarianceTime);
}


x86 assembly (clang, -O0):
<variancetime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <timevaldouble@plt>
mov    %eax,%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%esi
call   1050 <variance@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rdi
call   1040 <doubletimeval@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<variancetime>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
movsd  %xmm0,(%rsp)
call   1030 <timevaldouble@plt>
mov    %eax,%edi
movsd  (%rsp),%xmm0
mov    %ebp,%esi
call   1050 <variance@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <doubletimeval@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @variancetime(%struct.timeval* %0, double %1, i32 %2, %struct.timeval* %3) {
%5 = alloca %struct.timeval*
%6 = alloca double
%7 = alloca i32
%8 = alloca %struct.timeval*
%9 = alloca double
store %struct.timeval* %0, %struct.timeval** %5
store double %1, double* %6
store i32 %2, i32* %7
store %struct.timeval* %3, %struct.timeval** %8
%10 = load %struct.timeval*, %struct.timeval** %5
%11 = call i32 @timevaldouble(%struct.timeval* %10)
%12 = load double, double* %6
%13 = load i32, i32* %7
%14 = call double @variance(i32 %11, double %12, i32 %13)
store double %14, double* %9
%15 = load double, double* %9
%16 = load %struct.timeval*, %struct.timeval** %8
%17 = call i32 @doubletimeval(double %15, %struct.timeval* %16)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @variancetime(%struct.timeval* %0, double %1, i32 %2, %struct.timeval* %3) {
%5 = tail call i32 @timevaldouble(%struct.timeval* %0)
%6 = tail call double @variance(i32 %5, double %1, i32 %2)
%7 = tail call i32 @doubletimeval(double %6, %struct.timeval* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_clearsilver_comment_entities();
int /*<<< orphan*/ test_clearsilver_comments();
void all_clearsilver_tests() {
  test_clearsilver_comments();
  test_clearsilver_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_clearsilver_tests() {
%1 = call i32 (...) @test_clearsilver_comments()
%2 = call i32 (...) @test_clearsilver_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_clearsilver_tests() {
%1 = tail call i32 (...) @test_clearsilver_comments()
%2 = tail call i32 (...) @test_clearsilver_comment_entities()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_rsqrt_ss(int /*<<< orphan*/);
__m128 test_mm_rsqrt_ss(__m128 x) { return _mm_rsqrt_ss(x); }


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

x86 assembly (clang, -O2):
<test_mm_rsqrt_ss>:
jmp    1030 <_mm_rsqrt_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_rsqrt_ss(i32 %0) {
%2 = tail call i32 @_mm_rsqrt_ss(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ S_IRWXU;
int /*<<< orphan*/ __PHYSFS_setError(int /*<<< orphan*/);
scalar_t__ errno;
int mkdir(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(scalar_t__);
int __PHYSFS_platformMkDir(const char *path) {
  int rc;
  errno = 0;
  rc = mkdir(path, S_IRWXU);
  if (rc == -1) {
    __PHYSFS_setError(strerror(errno));
    return 0;
  };
  return (1);
}


x86 assembly (clang, -O0):
<__PHYSFS_platformMkDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2e95(%rip),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1030 <mkdir@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    118b <__PHYSFS_platformMkDir+0x5b>
mov    0x2e68(%rip),%rax
mov    (%rax),%rdi
call   1050 <strerror@plt>
mov    %eax,%edi
call   1040 <__PHYSFS_setError@plt>
movl   $0x0,-0x4(%rbp)
jmp    1192 <__PHYSFS_platformMkDir+0x62>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__PHYSFS_platformMkDir>:
push   %rbx
mov    0x2ea0(%rip),%rbx
movq   $0x0,(%rbx)
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
call   1030 <mkdir@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0xffffffff,%ecx
je     115b <__PHYSFS_platformMkDir+0x2b>
pop    %rbx
ret
mov    (%rbx),%rdi
call   1050 <strerror@plt>
mov    %eax,%edi
call   1040 <__PHYSFS_setError@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@S_IRWXU = global i32 0
define i32 @__PHYSFS_platformMkDir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i64 0, i64* @errno
%5 = load i8*, i8** %3
%6 = load i32, i32* @S_IRWXU
%7 = call i32 @mkdir(i8* %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i64, i64* @errno
%12 = call i32 @strerror(i64 %11)
%13 = call i32 @__PHYSFS_setError(i32 %12)
store i32 0, i32* %2
br label %15
14: ; preds = %1
store i32 1, i32* %2
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@errno = global i64 0
@S_IRWXU = global i32 0
define i32 @__PHYSFS_platformMkDir(i8* nocapture %0) {
store i64 0, i64* @errno
%2 = load i32, i32* @S_IRWXU
%3 = tail call i32 @mkdir(i8* %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* @errno
%7 = tail call i32 @strerror(i64 %6)
%8 = tail call i32 @__PHYSFS_setError(i32 %7)
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %10
}
void movi_msl16(int *__restrict a) {
  int i;
  for (i = 0; i < 16; i++)
    a[i] = 0xabffff;
}


x86 assembly (clang, -O0):
<movi_msl16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1136 <movi_msl16+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0xabffff,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <movi_msl16+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<movi_msl16>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x30(%rdi)
ret

LLVM IR (-O0):
define void @movi_msl16(i32* noalias %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 16
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 11272191, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @movi_msl16(i32* noalias nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 11272191, i32 11272191, i32 11272191, i32 11272191>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 11272191, i32 11272191, i32 11272191, i32 11272191>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %0, i64 8
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 11272191, i32 11272191, i32 11272191, i32 11272191>, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %0, i64 12
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 11272191, i32 11272191, i32 11272191, i32 11272191>, <4 x i32>* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ hd44780_extif_data_get();
int /*<<< orphan*/ hd44780_extif_pin_e(int);
int /*<<< orphan*/ hd44780_extif_pin_rw(int);
int /*<<< orphan*/ hd44780_extif_wait_1us(int);
int /*<<< orphan*/ hd44780_ll_select_register(int /*<<< orphan*/);
uint8_t hd44780_ll_register_read(uint8_t is_data_reg) {
  uint8_t data = 0;
  hd44780_ll_select_register(is_data_reg);
  hd44780_extif_pin_rw(1);
  hd44780_extif_wait_1us(1);
  hd44780_extif_pin_e(1);
  hd44780_extif_wait_1us(1);
  data = hd44780_extif_data_get();
  hd44780_extif_pin_e(0);
  return (data);
}


x86 assembly (clang, -O0):
<hd44780_ll_register_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <hd44780_ll_select_register@plt>
mov    $0x1,%edi
call   1070 <hd44780_extif_pin_rw@plt>
mov    $0x1,%edi
call   1060 <hd44780_extif_wait_1us@plt>
mov    $0x1,%edi
call   1050 <hd44780_extif_pin_e@plt>
mov    $0x1,%edi
call   1060 <hd44780_extif_wait_1us@plt>
mov    $0x0,%al
call   1040 <hd44780_extif_data_get@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1050 <hd44780_extif_pin_e@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd44780_ll_register_read>:
push   %rbx
call   1030 <hd44780_ll_select_register@plt>
mov    $0x1,%edi
call   1070 <hd44780_extif_pin_rw@plt>
mov    $0x1,%edi
call   1060 <hd44780_extif_wait_1us@plt>
mov    $0x1,%edi
call   1050 <hd44780_extif_pin_e@plt>
mov    $0x1,%edi
call   1060 <hd44780_extif_wait_1us@plt>
xor    %eax,%eax
call   1040 <hd44780_extif_data_get@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1050 <hd44780_extif_pin_e@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hd44780_ll_register_read(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @hd44780_ll_select_register(i32 %4)
%6 = call i32 @hd44780_extif_pin_rw(i32 1)
%7 = call i32 @hd44780_extif_wait_1us(i32 1)
%8 = call i32 @hd44780_extif_pin_e(i32 1)
%9 = call i32 @hd44780_extif_wait_1us(i32 1)
%10 = call i32 (...) @hd44780_extif_data_get()
store i32 %10, i32* %3
%11 = call i32 @hd44780_extif_pin_e(i32 0)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @hd44780_ll_register_read(i32 %0) {
%2 = tail call i32 @hd44780_ll_select_register(i32 %0)
%3 = tail call i32 @hd44780_extif_pin_rw(i32 1)
%4 = tail call i32 @hd44780_extif_wait_1us(i32 1)
%5 = tail call i32 @hd44780_extif_pin_e(i32 1)
%6 = tail call i32 @hd44780_extif_wait_1us(i32 1)
%7 = tail call i32 (...) @hd44780_extif_data_get()
%8 = tail call i32 @hd44780_extif_pin_e(i32 0)
ret i32 %7
}
void get_position(int *startLine, int *endLine) {}


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

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

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

LLVM IR (-O2):
define void @get_position(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char);
unsigned int uart_puts(char *str) {
  unsigned int nb_char = 0;
  while (*str) {
    uart_putc(*str);
    ++str;
    ++nb_char;
  }
  return nb_char;
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <uart_puts+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <uart_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <uart_puts+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_puts>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1138 <uart_puts+0x28>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <uart_putc@plt>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart_puts+0x10>
jmp    113a <uart_puts+0x2a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @uart_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = tail call i32 @uart_putc(i8 signext %5)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = add i32 %6, 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ E_md4hash(unsigned char *, unsigned char *);
int /*<<< orphan*/ SMBOWFencrypt(unsigned char *, unsigned char *,
                                 unsigned char *);
int /*<<< orphan*/ memset(unsigned char *, char, int);
void spa_smb_nt_encrypt(unsigned char *passwd, unsigned char *c8,
                        unsigned char *p24) {
  unsigned char p21[21];
  memset(p21, '\0', 21);
  E_md4hash(passwd, p21);
  SMBOWFencrypt(p21, c8, p24);
}


x86 assembly (clang, -O0):
<spa_smb_nt_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x15,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <E_md4hash@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <SMBOWFencrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spa_smb_nt_encrypt>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x15,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <E_md4hash@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <SMBOWFencrypt@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @spa_smb_nt_encrypt(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [21 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%9 = call i32 @memset(i8* %8, i8 signext 0, i32 21)
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%12 = call i32 @E_md4hash(i8* %10, i8* %11)
%13 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = call i32 @SMBOWFencrypt(i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
define void @spa_smb_nt_encrypt(i8* %0, i8* %1, i8* %2) {
%4 = alloca [21 x i8]
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i8 signext 0, i32 21)
%7 = call i32 @E_md4hash(i8* %0, i8* %5)
%8 = call i32 @SMBOWFencrypt(i8* %5, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ permute(char *, char *, int /*<<< orphan*/, int);
int strlen(char *);
void main() {
  char str[] = "ABC";
  int len = strlen(str);
  char str2[len + 1];
  str2[len] = '\0';
  permute(str, str2, 0, len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x434241,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
movslq -0x8(%rbp),%rax
movb   $0x0,(%rsi,%rax,1)
lea    -0x4(%rbp),%rdi
mov    -0x8(%rbp),%ecx
xor    %edx,%edx
call   1030 <permute@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x434241,-0x14(%rbp)
lea    -0x14(%rbp),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rsp,%rbx
lea    0x1(%rax),%ecx
mov    %rsp,%rsi
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rsi
mov    %rsi,%rsp
movslq %eax,%rcx
movb   $0x0,(%rcx,%rsi,1)
mov    %r14,%rdi
xor    %edx,%edx
call   1030 <permute@plt>
mov    %rbx,%rsp
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.str = [4 x i8] c"ABC\00"
define void @main() {
%1 = alloca [4 x i8]
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = bitcast [4 x i8]* %1 to i8*
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = alloca i8, i64 %10
store i64 %10, i64* %4
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%17 = load i32, i32* %2
%18 = call i32 @permute(i8* %16, i8* %12, i32 0, i32 %17)
%19 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4407873, i32* %1
%3 = call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, 1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
%7 = alloca i8, i64 %5
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8 0, i8* %9
%10 = call i32 @permute(i8* %2, i8* %7, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, long long *, int);
double __attribute__((no)) f2(void) {
  long long t = 0x000fedcba9876543LL;
  double d;
  memcpy(&d, &t, sizeof(long long));
  return d;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movabs $0xfedcba9876543,%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
sub    $0x18,%rsp
movabs $0xfedcba9876543,%rax
mov    %rax,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @f2() {
%1 = alloca i64
%2 = alloca double
store i64 4483583629026627, i64* %1
%3 = call i32 @memcpy(double* %2, i64* %1, i32 8)
%4 = load double, double* %2
ret double %4
}

LLVM IR (-O2):
define double @f2() {
%1 = alloca i64
%2 = alloca double
%3 = bitcast i64* %1 to i8*
store i64 4483583629026627, i64* %1
%4 = bitcast double* %2 to i8*
%5 = call i32 @memcpy(double* %2, i64* %1, i32 8)
%6 = load double, double* %2
ret double %6
}
/* Type definitions */
struct game_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ move_left(struct game_t *);
int /*<<< orphan*/ rotate_clockwise(struct game_t *);
void move_right(struct game_t *game) {
  rotate_clockwise(game);
  rotate_clockwise(game);
  move_left(game);
  rotate_clockwise(game);
  rotate_clockwise(game);
}


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

x86 assembly (clang, -O2):
<move_right>:
push   %rbx
mov    %rdi,%rbx
call   1040 <rotate_clockwise@plt>
mov    %rbx,%rdi
call   1040 <rotate_clockwise@plt>
mov    %rbx,%rdi
call   1030 <move_left@plt>
mov    %rbx,%rdi
call   1040 <rotate_clockwise@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <rotate_clockwise@plt>

LLVM IR (-O0):
%struct.game_t = type { i32 }
define void @move_right(%struct.game_t* %0) {
%2 = alloca %struct.game_t*
store %struct.game_t* %0, %struct.game_t** %2
%3 = load %struct.game_t*, %struct.game_t** %2
%4 = call i32 @rotate_clockwise(%struct.game_t* %3)
%5 = load %struct.game_t*, %struct.game_t** %2
%6 = call i32 @rotate_clockwise(%struct.game_t* %5)
%7 = load %struct.game_t*, %struct.game_t** %2
%8 = call i32 @move_left(%struct.game_t* %7)
%9 = load %struct.game_t*, %struct.game_t** %2
%10 = call i32 @rotate_clockwise(%struct.game_t* %9)
%11 = load %struct.game_t*, %struct.game_t** %2
%12 = call i32 @rotate_clockwise(%struct.game_t* %11)
ret void
}

LLVM IR (-O2):
%struct.game_t = type { i32 }
define void @move_right(%struct.game_t* %0) {
%2 = tail call i32 @rotate_clockwise(%struct.game_t* %0)
%3 = tail call i32 @rotate_clockwise(%struct.game_t* %0)
%4 = tail call i32 @move_left(%struct.game_t* %0)
%5 = tail call i32 @rotate_clockwise(%struct.game_t* %0)
%6 = tail call i32 @rotate_clockwise(%struct.game_t* %0)
ret void
}
/* Variables and functions */
bool is_path_separator(char c) { return (c == '/'); }


x86 assembly (clang, -O0):
<is_path_separator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_path_separator>:
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_path_separator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 47
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_path_separator(i8 signext %0) {
%2 = icmp eq i8 %0, 47
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ io_outb(unsigned short, unsigned char);
void io_outb_index(unsigned short iport, unsigned char index,
                   unsigned short dport, unsigned char byte) {
  io_outb(iport, index);
  io_outb(dport, byte);
}


x86 assembly (clang, -O0):
<io_outb_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dx,%cx
mov    %sil,%dl
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %dl,-0x3(%rbp)
mov    %cx,-0x6(%rbp)
mov    %al,-0x7(%rbp)
mov    -0x2(%rbp),%ax
movzwl %ax,%edi
movzbl -0x3(%rbp),%esi
call   1030 <io_outb@plt>
mov    -0x6(%rbp),%ax
movzwl %ax,%edi
movzbl -0x7(%rbp),%esi
call   1030 <io_outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_outb_index>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
call   1030 <io_outb@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <io_outb@plt>

LLVM IR (-O0):
define void @io_outb_index(i16 zeroext %0, i8 zeroext %1, i16 zeroext %2, i8 zeroext %3) {
%5 = alloca i16
%6 = alloca i8
%7 = alloca i16
%8 = alloca i8
store i16 %0, i16* %5
store i8 %1, i8* %6
store i16 %2, i16* %7
store i8 %3, i8* %8
%9 = load i16, i16* %5
%10 = load i8, i8* %6
%11 = call i32 @io_outb(i16 zeroext %9, i8 zeroext %10)
%12 = load i16, i16* %7
%13 = load i8, i8* %8
%14 = call i32 @io_outb(i16 zeroext %12, i8 zeroext %13)
ret void
}

LLVM IR (-O2):
define void @io_outb_index(i16 zeroext %0, i8 zeroext %1, i16 zeroext %2, i8 zeroext %3) {
%5 = tail call i32 @io_outb(i16 zeroext %0, i8 zeroext %1)
%6 = tail call i32 @io_outb(i16 zeroext %2, i8 zeroext %3)
ret void
}
long math_round(long double value) {
  long intpart;
  intpart = (long)value;
  value = value - intpart;
  if (value >= 0.5)
    intpart++;
  return intpart;
}


x86 assembly (clang, -O0):
<math_round>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x2c(%rbp)
fldcw  -0x2c(%rbp)
fistpll -0x28(%rbp)
fldcw  -0x2a(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
fildll -0x20(%rbp)
fsubrp %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeb6(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1167 <math_round+0x67>
jmp    115b <math_round+0x5b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_round>:
fldt   0x8(%rsp)
fnstcw -0x14(%rsp)
movzwl -0x14(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x12(%rsp)
fldcw  -0x12(%rsp)
fld    %st(0)
fistpll -0x10(%rsp)
fldcw  -0x14(%rsp)
mov    -0x10(%rsp),%rax
mov    %rax,-0x8(%rsp)
fildll -0x8(%rsp)
fsubrp %st,%st(1)
flds   0xec5(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @math_round(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i64
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fptosi x86_fp80 %4 to i64
store i64 %5, i64* %3
%6 = load x86_fp80, x86_fp80* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to x86_fp80
%9 = fsub x86_fp80 %6, %8
store x86_fp80 %9, x86_fp80* %2
%10 = load x86_fp80, x86_fp80* %2
%11 = fcmp oge x86_fp80 %10, 0xK3FFE8000000000000000
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @math_round(x86_fp80 %0) {
%2 = fptosi x86_fp80 %0 to i64
%3 = sitofp i64 %2 to x86_fp80
%4 = fsub x86_fp80 %0, %3
%5 = fcmp oge x86_fp80 %4, 0xK3FFE8000000000000000
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void function_parent(void) {
  void function_child(void);
  printf("p[");
  function_child();
  printf("] ");
}


x86 assembly (clang, -O0):
<function_parent>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
call   1040 <function_child@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_parent>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
call   1040 <function_child@plt>
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"p[\00"
@.str.1 = [3 x i8] c"] \00"
define void @function_parent() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
tail call void @function_child()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FRqDone(int /*<<< orphan*/);
void FRqCancel() { FRqDone(0); }


x86 assembly (clang, -O0):
<FRqCancel>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <FRqDone@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @FRqCancel() {
%1 = call i32 @FRqDone(i32 0)
ret void
}

LLVM IR (-O2):
define void @FRqCancel() {
%1 = tail call i32 @FRqDone(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ X509_SIG;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, void **,
                                      int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_PKCS8;
scalar_t__ d2i_X509_SIG;
X509_SIG *PEM_read_bio_PKCS8(BIO *bp, X509_SIG **x, pem_password_cb *cb,
                             void *u) {
  return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_SIG, PEM_STRING_PKCS8, bp,
                           (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_bio_PKCS8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read_bio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_PKCS8>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%rdi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read_bio@plt>

LLVM IR (-O0):
@d2i_X509_SIG = global i64 0
@PEM_STRING_PKCS8 = global i32 0
define i32* @PEM_read_bio_PKCS8(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_X509_SIG
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_PKCS8
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read_bio(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_X509_SIG = global i64 0
@PEM_STRING_PKCS8 = global i32 0
define i32* @PEM_read_bio_PKCS8(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_X509_SIG
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PKCS8
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read_bio(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
float MaxFloat(float x, float y) { return (x > y) ? x : y; }


x86 assembly (clang, -O0):
<MaxFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <MaxFloat+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <MaxFloat+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MaxFloat>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @MaxFloat(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 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @MaxFloat(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ mat4f_scale_new(float *, float const, float const,
                                   float const);
void mat4f_scaleVec_new(float result[16], const float xyz[3]) {
  mat4f_scale_new(result, xyz[0], xyz[1], xyz[2]);
}


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

x86 assembly (clang, -O2):
<mat4f_scaleVec_new>:
movss  (%rsi),%xmm0
movss  0x4(%rsi),%xmm1
movss  0x8(%rsi),%xmm2
jmp    1030 <mat4f_scale_new@plt>

LLVM IR (-O0):
define void @mat4f_scaleVec_new(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 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %4
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 2
%14 = load float, float* %13
%15 = call i32 @mat4f_scale_new(float* %5, float %8, float %11, float %14)
ret void
}

LLVM IR (-O2):
define void @mat4f_scaleVec_new(float* %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 2
%7 = load float, float* %6
%8 = tail call i32 @mat4f_scale_new(float* %0, float %3, float %5, float %7)
ret void
}
/* Variables and functions */
int pigpio_command(int, int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int notify_open(int pi) { return pigpio_command(pi, 18, 0, 0, 1); }


x86 assembly (clang, -O0):
<notify_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notify_open>:
mov    $0x12,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @notify_open(i32 %0) {
%2 = tail call i32 @pigpio_command(i32 %0, i32 18, i32 0, i32 0, i32 1)
ret i32 %2
}
int tf_bi(signed char x, int c) { return c / 3; }


x86 assembly (clang, -O0):
<tf_bi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf_bi>:
movslq %esi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @tf_bi(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 3
ret i32 %6
}

LLVM IR (-O2):
define i32 @tf_bi(i8 signext %0, i32 %1) {
%3 = sdiv i32 %1, 3
ret i32 %3
}
int horizontal(char *tetri[]) {
  int i;
  int j;
  int tmp;
  int res;
  res = 0;
  i = -1;
  while (++i < 4) {
    tmp = 0;
    j = -1;
    while (++j < 4 && !tmp)
      tmp = tetri[j][i] != '.';
  }
  return (res);
}


x86 assembly (clang, -O0):
<horizontal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x4,%eax
jge    1195 <horizontal+0x95>
movl   $0x0,-0x14(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x4,%ecx
mov    %al,-0x19(%rbp)
jge    1159 <horizontal+0x59>
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1169 <horizontal+0x69>
jmp    1190 <horizontal+0x90>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <horizontal+0x36>
jmp    1116 <horizontal+0x16>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @horizontal(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %6
store i32 -1, i32* %3
br label %7
7: ; preds = %35, %1
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %36
11: ; preds = %7
store i32 0, i32* %5
store i32 -1, i32* %4
br label %12
12: ; preds = %22, %11
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
%15 = icmp slt i32 %14, 4
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
br label %20
20: ; preds = %16, %12
%21 = phi i1 [ false, %12 ], [ %19, %16 ]
br i1 %21, label %22, label %35
22: ; preds = %20
%23 = load i8**, i8*** %2
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 46
%34 = zext i1 %33 to i32
store i32 %34, i32* %5
br label %12
35: ; preds = %20
br label %7
36: ; preds = %7
%37 = load i32, i32* %6
ret i32 %37
}

LLVM IR (-O2):
define i32 @horizontal(i8** nocapture %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int uniquePaths(int, int);
int main(int argc, char *argv[]) {
  if (!(uniquePaths(3, 3) == 6)) {
    printf("assert fail: %s\n", "3 3 = 1");
    exit(-1);
  };
  printf("everything is fine!\n");
  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)
mov    $0x3,%esi
mov    %esi,%edi
call   1040 <uniquePaths@plt>
cmp    $0x6,%eax
je     117a <main+0x4a>
lea    0xe9e(%rip),%rdi
lea    0xea8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x3,%esi
call   1050 <uniquePaths@plt>
cmp    $0x6,%eax
jne    1165 <main+0x25>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe94(%rip),%rdi
lea    0xe9e(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"assert fail: %s\0A\00"
@.str.1 = [8 x i8] c"3 3 = 1\00"
@.str.2 = [21 x i8] c"everything is fine!\0A\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 @uniquePaths(i32 3, i32 3)
%7 = icmp eq i32 %6, 6
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"assert fail: %s\0A\00"
@.str.1 = [8 x i8] c"3 3 = 1\00"
@str = [20 x i8] c"everything is fine!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @uniquePaths(i32 3, i32 3)
%4 = icmp eq i32 %3, 6
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
double __attribute__((no)) double_max2(double a, double b) {
  return ((a) >= (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<double_max2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     112d <double_max2+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <double_max2+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_max2>:
movapd %xmm1,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @double_max2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oge double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @double_max2(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void ar_mbox_send(int my_cid, int dst_bid, int dst_cid, unsigned int msg) {}


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

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

LLVM IR (-O0):
define void @ar_mbox_send(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @ar_mbox_send(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
__attribute__((weak)) void *e_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<e_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define weak i8* @e_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int set_memory_nx(unsigned long addr, int numpages) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_memory_nx(i64 %0, i32 %1) {
ret i32 0
}