xunge/DecIR huggingface dataset:
/* Variables and functions */
double ceil(double);
double floor(double);
double ff_rint(double x) { return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); }


x86 assembly (clang, -O0):
<ff_rint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     115b <ff_rint+0x3b>
movsd  0xeb9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1176 <ff_rint+0x56>
movsd  -0x8(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_rint>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1137 <ff_rint+0x17>
addsd  0xed6(%rip),%xmm0
jmp    1030 <ceil@plt>
addsd  0xec1(%rip),%xmm0
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @ff_rint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
%8 = call double @llvm.floor.f64(double %7)
br label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fsub double %10, 5.000000e-01
%12 = call double @llvm.ceil.f64(double %11)
br label %13
13: ; preds = %9, %5
%14 = phi double [ %8, %5 ], [ %12, %9 ]
ret double %14
}

LLVM IR (-O2):
define double @ff_rint(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fadd double %0, 5.000000e-01
%5 = tail call double @llvm.floor.f64(double %4)
br label %9
6: ; preds = %1
%7 = fadd double %0, -5.000000e-01
%8 = tail call double @llvm.ceil.f64(double %7)
br label %9
9: ; preds = %6, %3
%10 = phi double [ %5, %3 ], [ %8, %6 ]
ret double %10
}
int test_imm_E4int8_mem(signed char *val) {
  return ((*val) & (0xE4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E4int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -28
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _mp_default_free(void *blk_ptr, size_t blk_size) { free(blk_ptr); }


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

x86 assembly (clang, -O2):
<_mp_default_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @_mp_default_free(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @_mp_default_free(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
char const *strdup(char const *);
const char *copy_key(const char *e) { return strdup(e); }


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

x86 assembly (clang, -O2):
<copy_key>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @copy_key(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
process_label(l) char *l;
{}


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

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

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

LLVM IR (-O2):
define i32 @process_label(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int this_function_is_not_defined();
int trigger_dynlink_failure(void) { return this_function_is_not_defined(); }


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

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

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

LLVM IR (-O2):
define i32 @trigger_dynlink_failure() {
%1 = tail call i32 (...) @this_function_is_not_defined()
ret i32 %1
}
/* Variables and functions */
scalar_t__ malloc(int);
unsigned int *initialize_table(int row_dimension, int column_dimension) {
  unsigned int *table =
      (unsigned int *)malloc(row_dimension * column_dimension * sizeof(int));
  return table;
}


x86 assembly (clang, -O0):
<initialize_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_table>:
imul   %esi,%edi
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @initialize_table(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %5
%14 = load i32*, i32** %5
ret i32* %14
}

LLVM IR (-O2):
define i32* @initialize_table(i32 %0, i32 %1) {
%3 = shl i32 %0, 2
%4 = mul i32 %3, %1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
int test2(int x, int y) {
  if (x | y) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1125 <test2+0x25>
movl   $0x1,-0x4(%rbp)
jmp    112c <test2+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
xor    %eax,%eax
or     %esi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @test2(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int hf_open_file_scan(int filedesc, char attrtype, int attrlength,
                      int attroffset, int op, char *value) {
  return -1;
}


x86 assembly (clang, -O0):
<hf_open_file_scan>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hf_open_file_scan(i32 %0, i8 signext %1, i32 %2, i32 %3, i32 %4, i8* nocapture readnone %5) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ DATA_buffer();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_buffer();
LIBRARY_buffer() {
  LibraryHeader("buffer", "Sat Feb  1 10:41:09 2014 ");
  DATA_buffer();
  STARTUP_buffer();
}


x86 assembly (clang, -O0):
<LIBRARY_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1050 <LibraryHeader@plt>
mov    $0x0,%al
call   1030 <DATA_buffer@plt>
mov    $0x0,%al
call   1040 <STARTUP_buffer@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_buffer>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1050 <LibraryHeader@plt>
xor    %eax,%eax
call   1030 <DATA_buffer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <STARTUP_buffer@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"buffer\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:09 2014 \00"
define i32 @LIBRARY_buffer() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_buffer()
%4 = call i32 (...) @STARTUP_buffer()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [7 x i8] c"buffer\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:09 2014 \00"
define i32 @LIBRARY_buffer() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_buffer()
%3 = tail call i32 (...) @STARTUP_buffer()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ cs;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
scalar_t__ sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int processor_bind(int cpu) {
  cpu_set_t cs;
  CPU_ZERO(&cs);
  CPU_SET(cpu, &cs);
  if (sched_setaffinity(0, sizeof(cs), &cs) < 0) {
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<processor_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0xc(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
cmp    $0x0,%rax
jge    1176 <processor_bind+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <processor_bind+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processor_bind>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
sar    $0x3f,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @processor_bind(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %2)
%7 = ashr i64 %6, 63
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_dir(const char *path) {
  if (!path) {
    return 0;
  }
  struct stat st;
  if (stat(path, &st) != 0) {
    return 0;
  }
  return S_ISDIR(st.st_mode);
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <is_dir+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1171 <is_dir+0x51>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     1166 <is_dir+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1171 <is_dir+0x51>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
test   %rdi,%rdi
je     113d <is_dir+0x1d>
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1140 <is_dir+0x20>
add    $0x8,%rsp
ret
xor    %eax,%eax
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @stat(i8* %9, %struct.stat* %4)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 0, i32* %2
br label %17
13: ; preds = %8
%14 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%15 = load i32, i32* %14
%16 = call i32 @S_ISDIR(i32 %15)
store i32 %16, i32* %2
br label %17
17: ; preds = %13, %12, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = icmp eq i8* %0, null
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = bitcast %struct.stat* %2 to i8*
%6 = call i64 @stat(i8* %0, %struct.stat* %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @S_ISDIR(i32 %10)
br label %12
12: ; preds = %4, %8
%13 = phi i32 [ %11, %8 ], [ 0, %4 ]
br label %14
14: ; preds = %1, %12
%15 = phi i32 [ %13, %12 ], [ 0, %1 ]
ret i32 %15
}
/* Variables and functions */
double lgamma(double);
double c_lgamma(double arg0) { return lgamma(arg0); }


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

x86 assembly (clang, -O2):
<c_lgamma>:
jmp    1030 <lgamma@plt>

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

LLVM IR (-O2):
define double @c_lgamma(double %0) {
%2 = tail call double @lgamma(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ TRANSFER_FUNCTION_STRINGS;

/* Variables and functions */
int /*<<< orphan*/ print_enum(char *, char const **, int);
void print_transfer_function() {
  static const char *TRANSFER_FUNCTION_STRINGS[] = {
      "TV Gamma",
      "Extended Gamut",
      "Linear",
      "D-Cinema Transfer Function",
  };
  print_enum("transfer_function", TRANSFER_FUNCTION_STRINGS,
             (sizeof(TRANSFER_FUNCTION_STRINGS) /
              sizeof((TRANSFER_FUNCTION_STRINGS)[0])));
}


x86 assembly (clang, -O0):
<print_transfer_function>:
push   %rbp
mov    %rsp,%rbp
lea    0xf1f(%rip),%rdi
lea    0x2f0e(%rip),%rsi
mov    $0x4,%edx
call   1030 <print_enum@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_transfer_function>:
lea    0xf23(%rip),%rdi
lea    0x2f12(%rip),%rsi
mov    $0x4,%edx
jmp    1030 <print_enum@plt>

LLVM IR (-O0):
@print_transfer_function.TRANSFER_FUNCTION_STRINGS = internal global [4 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i32 0, i32 0)]
@.str = [9 x i8] c"TV Gamma\00"
@.str.1 = [15 x i8] c"Extended Gamut\00"
@.str.2 = [7 x i8] c"Linear\00"
@.str.3 = [27 x i8] c"D-Cinema Transfer Function\00"
@.str.4 = [18 x i8] c"transfer_function\00"
define void @print_transfer_function() {
%1 = call i32 @print_enum(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @print_transfer_function.TRANSFER_FUNCTION_STRINGS, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@print_transfer_function.TRANSFER_FUNCTION_STRINGS = internal global [4 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i32 0, i32 0)]
@.str = [9 x i8] c"TV Gamma\00"
@.str.1 = [15 x i8] c"Extended Gamut\00"
@.str.2 = [7 x i8] c"Linear\00"
@.str.3 = [27 x i8] c"D-Cinema Transfer Function\00"
@.str.4 = [18 x i8] c"transfer_function\00"
define void @print_transfer_function() {
%1 = tail call i32 @print_enum(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @print_transfer_function.TRANSFER_FUNCTION_STRINGS, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void conshelp(void) {
  printf("Constants:\n\n    PI      3.14159265358979323846\n    E       "
         "2.71828182845904523536\n    GAMMA   0.57721566490153286060\n    DEG  "
         "   57.29577951308322087680\n    PHI     "
         "1.61803389974989484820\n\nValues:\n    0X...   Hex number\n    0x... "
         "  Hex number\n     0...   Octal Number\n    0o...   Octal number\n   "
         " 0c...   Octal number\n    0b...   Binary number\n    0y...   Binary "
         "number\n    ...     Decimal number\nSeparators (for readability):\n  "
         "  0xFFFF_AAAA\n    0o777_555\n    0b1100_1010\n    12_23_45_67\n    "
         "1,234,567\n\n");
}


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

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

LLVM IR (-O0):
@.str = [505 x i8] c"Constants:\0A\0A PI 3.14159265358979323846\0A E 2.71828182845904523536\0A GAMMA 0.57721566490153286060\0A DEG 57.29577951308322087680\0A PHI 1.61803389974989484820\0A\0AValues:\0A 0X... Hex number\0A 0x... Hex number\0A 0... Octal Number\0A 0o... Octal number\0A 0c... Octal number\0A 0b... Binary number\0A 0y... Binary number\0A ... Decimal number\0ASeparators (for readability):\0A 0xFFFF_AAAA\0A 0o777_555\0A 0b1100_1010\0A 12_23_45_67\0A 1,234,567\0A\0A\00"
define void @conshelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([505 x i8], [505 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [504 x i8] c"Constants:\0A\0A PI 3.14159265358979323846\0A E 2.71828182845904523536\0A GAMMA 0.57721566490153286060\0A DEG 57.29577951308322087680\0A PHI 1.61803389974989484820\0A\0AValues:\0A 0X... Hex number\0A 0x... Hex number\0A 0... Octal Number\0A 0o... Octal number\0A 0c... Octal number\0A 0b... Binary number\0A 0y... Binary number\0A ... Decimal number\0ASeparators (for readability):\0A 0xFFFF_AAAA\0A 0o777_555\0A 0b1100_1010\0A 12_23_45_67\0A 1,234,567\0A\00"
define void @conshelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([504 x i8], [504 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void talk(void) { say("A nice wooden table.", 1); }


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"A nice wooden table.\00"
define void @talk() {
%1 = call i32 @say(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"A nice wooden table.\00"
define void @talk() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
void foo06() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void close_timer(FILE *fd) { fclose(fd); }


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

x86 assembly (clang, -O2):
<close_timer>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @close_timer(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmp_die(char *);
void *realloc(void *, size_t);
void *gmp_default_realloc(void *old, size_t old_size, size_t new_size) {
  void *p;
  p = realloc(old, new_size);
  if (!p)
    gmp_die("gmp_default_realoc: Virtual memory exhausted.");
  return p;
}


x86 assembly (clang, -O0):
<gmp_default_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115c <gmp_default_realloc+0x3c>
lea    0xea9(%rip),%rdi
call   1040 <gmp_die@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmp_default_realloc>:
push   %rbx
mov    %rdx,%rsi
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113d <gmp_default_realloc+0x1d>
lea    0xec8(%rip),%rdi
call   1040 <gmp_die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"gmp_default_realoc: Virtual memory exhausted.\00"
define i8* @gmp_default_realloc(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = call i8* @realloc(i8* %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %3
%14 = call i32 @gmp_die(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i8*, i8** %7
ret i8* %16
}

LLVM IR (-O2):
@.str = [46 x i8] c"gmp_default_realoc: Virtual memory exhausted.\00"
define noalias i8* @gmp_default_realloc(i8* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @gmp_die(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
int palindrome(char *, int);
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
void main() {
  char str[] = "testatset";
  int len = strlen(str);
  printf("ret = %d\n", palindrome(str, len));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1050 <palindrome@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x6573746174736574,%rax
74 73 65
mov    %rax,(%rsp)
movw   $0x74,0x8(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <palindrome@plt>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.str = [10 x i8] c"testatset\00"
@.str = [10 x i8] c"ret = %d\0A\00"
define void @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @palindrome(i8* %2, i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
int none() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @none() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void say(char *str) { printf("%s\n", str); }


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

x86 assembly (clang, -O2):
<say>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @say(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
double llabs(scalar_t__);
int64_t BRLocalAmount(int64_t amount, double price) {
  int64_t localAmount = llabs(amount) * price / 100000000LL;
  if (localAmount == 0 && amount != 0)
    localAmount = 1;
  return (amount < 0) ? -localAmount : localAmount;
}


x86 assembly (clang, -O0):
<BRLocalAmount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llabs@plt>
mulsd  -0x10(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1162 <BRLocalAmount+0x52>
cmpq   $0x0,-0x8(%rbp)
je     1162 <BRLocalAmount+0x52>
movq   $0x1,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    117c <BRLocalAmount+0x6c>
xor    %eax,%eax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1184 <BRLocalAmount+0x74>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BRLocalAmount>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
call   1030 <llabs@plt>
mulsd  0x8(%rsp),%xmm0
divsd  0xecf(%rip),%xmm0
cvttsd2si %xmm0,%rax
test   %rax,%rax
mov    $0x1,%ecx
cmovne %rax,%rcx
test   %rbx,%rbx
cmove  %rax,%rcx
mov    %rcx,%rax
neg    %rax
test   %rbx,%rbx
cmovns %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @BRLocalAmount(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
%5 = alloca i64
store i64 %0, i64* %3
store double %1, double* %4
%6 = load i64, i64* %3
%7 = call double @llabs(i64 %6)
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = fdiv double %9, 1.000000e+08
%11 = fptosi double %10 to i64
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i64, i64* %3
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i64 1, i64* %5
br label %18
18: ; preds = %17, %14, %2
%19 = load i64, i64* %3
%20 = icmp slt i64 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i64, i64* %5
%23 = sub nsw i64 0, %22
br label %26
24: ; preds = %18
%25 = load i64, i64* %5
br label %26
26: ; preds = %24, %21
%27 = phi i64 [ %23, %21 ], [ %25, %24 ]
ret i64 %27
}

LLVM IR (-O2):
define i64 @BRLocalAmount(i64 %0, double %1) {
%3 = tail call double @llabs(i64 %0)
%4 = fmul double %3, %1
%5 = fdiv double %4, 1.000000e+08
%6 = fptosi double %5 to i64
%7 = icmp eq i64 %6, 0
%8 = icmp ne i64 %0, 0
%9 = and i1 %8, %7
%10 = select i1 %9, i64 1, i64 %6
%11 = icmp slt i64 %0, 0
%12 = sub nsw i64 0, %10
%13 = select i1 %11, i64 %12, i64 %10
ret i64 %13
}
void SysCtlUSBPLLDisable(void) {
  (*((volatile unsigned long *)(0x400FE070))) |= 0x00004000;
}


x86 assembly (clang, -O0):
<SysCtlUSBPLLDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe070,%eax
mov    (%rax),%rcx
or     $0x4000,%rcx
mov    $0x400fe070,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlUSBPLLDisable>:
orq    $0x4000,0x400fe070
ret

LLVM IR (-O0):
define void @SysCtlUSBPLLDisable() {
%1 = load volatile i64, i64* inttoptr (i64 1074782320 to i64*)
%2 = or i64 %1, 16384
store volatile i64 %2, i64* inttoptr (i64 1074782320 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlUSBPLLDisable() {
%1 = load volatile i64, i64* inttoptr (i64 1074782320 to i64*)
%2 = or i64 %1, 16384
store volatile i64 %2, i64* inttoptr (i64 1074782320 to i64*)
ret void
}
void main() {
  void enter(int *);
  void handle(int *);
  void print(int *);
  int a[5];
  enter(a);
  handle(a);
  print(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
call   1030 <enter@plt>
lea    -0x20(%rbp),%rdi
call   1040 <handle@plt>
lea    -0x20(%rbp),%rdi
call   1050 <print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <enter@plt>
mov    %rbx,%rdi
call   1040 <handle@plt>
mov    %rbx,%rdi
call   1050 <print@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca [5 x i32]
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
char *fb_hGetShortPath(char *src, char *dst, int maxlen) {
  strncpy(dst, src, maxlen);
  return dst;
}


x86 assembly (clang, -O0):
<fb_hGetShortPath>:
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    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_hGetShortPath>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @fb_hGetShortPath(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 i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
define i8* @fb_hGetShortPath(i8* %0, i8* returned %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %1, i8* %0, i32 %2)
ret i8* %1
}
void gtk_combo_box_get_wrap_width() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_get_wrap_width() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ pthread_cond_init(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
void std_pthread_cond_init(pthread_cond_t *cond,
                           const pthread_condattr_t *attr) {
  if (pthread_cond_init(cond, attr) != 0) {
    perror("pthread_cond_init");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_pthread_cond_init>:
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 <pthread_cond_init@plt>
cmp    $0x0,%rax
je     116d <std_pthread_cond_init+0x3d>
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_pthread_cond_init>:
push   %rax
call   1030 <pthread_cond_init@plt>
test   %rax,%rax
jne    113d <std_pthread_cond_init+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"pthread_cond_init\00"
define void @std_pthread_cond_init(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i64 @pthread_cond_init(i32* %5, i32* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"pthread_cond_init\00"
define void @std_pthread_cond_init(i32* %0, i32* %1) {
%3 = tail call i64 @pthread_cond_init(i32* %0, i32* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void fail(const char *message) {
  perror(message);
  exit(1);
}


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

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

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

LLVM IR (-O2):
define void @fail(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int getpid();
int bar(int c) { return c + getpid(); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @getpid()
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = add nsw i32 %2, %0
ret i32 %3
}
long int foo(long int s) { return 10; }


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

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

LLVM IR (-O0):
define i64 @foo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i64 10
}

LLVM IR (-O2):
define i64 @foo(i64 %0) {
ret i64 10
}
/* Variables and functions */
int ide_read_pio(char *, int);
int /*<<< orphan*/ ide_write_command_packet(char *, int /*<<< orphan*/);
int ide_do_packet_command_pio(char *cmd, char *buf, int length) {
  ide_write_command_packet(cmd, 0);
  length = ide_read_pio(buf, length);
  return length;
}


x86 assembly (clang, -O0):
<ide_do_packet_command_pio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <ide_write_command_packet@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <ide_read_pio@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ide_do_packet_command_pio>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
xor    %esi,%esi
call   1030 <ide_write_command_packet@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <ide_read_pio@plt>

LLVM IR (-O0):
define i32 @ide_do_packet_command_pio(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** %4
%8 = call i32 @ide_write_command_packet(i8* %7, i32 0)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @ide_read_pio(i8* %9, i32 %10)
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @ide_do_packet_command_pio(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @ide_write_command_packet(i8* %0, i32 0)
%5 = tail call i32 @ide_read_pio(i8* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int fun2() {
  printf("\nin fun2\n");
  return 3;
}


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"\0Ain fun2\00"
define i32 @fun2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
scalar_t__ memcheck_register_freed(char const *, int, void *);
void memcheck_debug_free(const char *file, int line, void *ptr) {
  if (memcheck_register_freed(file, line, ptr)) {
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<memcheck_debug_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <memcheck_register_freed@plt>
cmp    $0x0,%rax
je     1156 <memcheck_debug_free+0x36>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcheck_debug_free>:
push   %rbx
mov    %rdx,%rbx
call   1040 <memcheck_register_freed@plt>
test   %rax,%rax
je     1137 <memcheck_debug_free+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @memcheck_debug_free(i8* %0, i32 %1, i8* %2) {
%4 = tail call i64 @memcheck_register_freed(i8* %0, i32 %1, i8* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8* %2)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ three(int);
void four(int size) { three(size); }


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

x86 assembly (clang, -O2):
<four>:
jmp    1030 <three@plt>

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

LLVM IR (-O2):
define void @four(i32 %0) {
%2 = tail call i32 @three(i32 %0)
ret void
}
/* Variables and functions */
double pow(double, int);
double f1(double x) {
  double y = pow(x, 2);
  return y;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    $0x2,%edi
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define double @f1(double %0) {
%2 = tail call double @pow(double %0, i32 2)
ret double %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void BSP_PeriodicTask_Stop(void) {
  (*((volatile uint32_t *)0x4004F024)) = 0x00000001;
  (*((volatile uint32_t *)0xE000E18C)) = 1 << 8;
}


x86 assembly (clang, -O0):
<BSP_PeriodicTask_Stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4004f024,%eax
movl   $0x1,(%rax)
mov    $0xe000e18c,%eax
movl   $0x100,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_PeriodicTask_Stop>:
movl   $0x1,0x4004f024
mov    $0xe000e18c,%eax
movl   $0x100,(%rax)
ret

LLVM IR (-O0):
define void @BSP_PeriodicTask_Stop() {
store volatile i32 1, i32* inttoptr (i64 1074065444 to i32*)
store volatile i32 256, i32* inttoptr (i64 3758154124 to i32*)
ret void
}

LLVM IR (-O2):
define void @BSP_PeriodicTask_Stop() {
store volatile i32 1, i32* inttoptr (i64 1074065444 to i32*)
store volatile i32 256, i32* inttoptr (i64 3758154124 to i32*)
ret void
}
void os_net_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @os_net_shutdown() {
ret void
}
/* Variables and functions */
int write(int, char *, int);
int _put_char(int fd, char c) { return write(fd, &c, 1); }


x86 assembly (clang, -O0):
<_put_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_put_char>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_put_char(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg16(int, unsigned short);
int /*<<< orphan*/ VIM_HIF_SetReg8(int, int);
void VIM_LCDIF_RsHExW(unsigned short uVal) {
  VIM_HIF_SetReg16((0x0400 + 0x01e), uVal);
  VIM_HIF_SetReg8((0x0400 + 0x018), 0x2);
}


x86 assembly (clang, -O0):
<VIM_LCDIF_RsHExW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x41e,%edi
movzwl -0x2(%rbp),%esi
call   1040 <VIM_HIF_SetReg16@plt>
mov    $0x418,%edi
mov    $0x2,%esi
call   1030 <VIM_HIF_SetReg8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_LCDIF_RsHExW>:
push   %rax
mov    %edi,%esi
mov    $0x41e,%edi
call   1040 <VIM_HIF_SetReg16@plt>
mov    $0x418,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <VIM_HIF_SetReg8@plt>

LLVM IR (-O0):
define void @VIM_LCDIF_RsHExW(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @VIM_HIF_SetReg16(i32 1054, i16 zeroext %3)
%5 = call i32 @VIM_HIF_SetReg8(i32 1048, i32 2)
ret void
}

LLVM IR (-O2):
define void @VIM_LCDIF_RsHExW(i16 zeroext %0) {
%2 = tail call i32 @VIM_HIF_SetReg16(i32 1054, i16 zeroext %0)
%3 = tail call i32 @VIM_HIF_SetReg8(i32 1048, i32 2)
ret void
}
/* Variables and functions */
short barriereNatif16(short);
scalar_t__ systemeBigEndian();
short big16VersNatif(short big) {
  if (systemeBigEndian()) {
    return big;
  } else {
    return barriereNatif16(big);
  }
}


x86 assembly (clang, -O0):
<big16VersNatif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <systemeBigEndian@plt>
cmp    $0x0,%rax
je     114d <big16VersNatif+0x2d>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115a <big16VersNatif+0x3a>
movswl -0x4(%rbp),%edi
call   1040 <barriereNatif16@plt>
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big16VersNatif>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <systemeBigEndian@plt>
test   %rax,%rax
je     1133 <big16VersNatif+0x13>
mov    %ebx,%eax
pop    %rbx
ret
movswl %bx,%edi
pop    %rbx
jmp    1040 <barriereNatif16@plt>

LLVM IR (-O0):
define signext i16 @big16VersNatif(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = call i64 (...) @systemeBigEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i16, i16* %3
store i16 %7, i16* %2
br label %11
8: ; preds = %1
%9 = load i16, i16* %3
%10 = call signext i16 @barriereNatif16(i16 signext %9)
store i16 %10, i16* %2
br label %11
11: ; preds = %8, %6
%12 = load i16, i16* %2
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @big16VersNatif(i16 signext %0) {
%2 = tail call i64 (...) @systemeBigEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call signext i16 @barriereNatif16(i16 signext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i16 [ %5, %4 ], [ %0, %1 ]
ret i16 %7
}