xunge/DecIR huggingface dataset:
void gll_coordinates_order3_square(double *out_6407435751412178427) {
  out_6407435751412178427[0] = -1.0;
  out_6407435751412178427[1] = -0.447213595499958;
  out_6407435751412178427[2] = 0.447213595499958;
  out_6407435751412178427[3] = 1.0;
}


x86 assembly (clang, -O0):
<gll_coordinates_order3_square>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xf04(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gll_coordinates_order3_square(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
store double -1.000000e+00, double* %4
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 1
store double 0xBFDC9F25C5BFEDDA, double* %6
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 2
store double 0x3FDC9F25C5BFEDDA, double* %8
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 3
store double 1.000000e+00, double* %10
ret void
}

LLVM IR (-O2):
define void @gll_coordinates_order3_square(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to <2 x double>*
store <2 x double> <double -1.000000e+00, double 0xBFDC9F25C5BFEDDA>, <2 x double>* %2
%3 = getelementptr inbounds double, double* %0, i64 2
%4 = bitcast double* %3 to <2 x double>*
store <2 x double> <double 0x3FDC9F25C5BFEDDA, double 1.000000e+00>, <2 x double>* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sink(void *);
__attribute__((noipa)) void *return_array_plus_cst(void) {
  int a[32];
  void *p = a + 2;
  sink(p);
  return p;
}


x86 assembly (clang, -O0):
<return_array_plus_cst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x80(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
call   1030 <sink@plt>
mov    -0x88(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_array_plus_cst>:
push   %rbx
sub    $0x80,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <sink@plt>
mov    %rbx,%rax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @return_array_plus_cst() {
%1 = alloca [32 x i32]
%2 = alloca i8*
%3 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = bitcast i32* %4 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @sink(i8* %6)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @return_array_plus_cst() {
%1 = alloca [32 x i32]
%2 = bitcast [32 x i32]* %1 to i8*
%3 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @sink(i8* %4)
ret i8* %4
}
/* Variables and functions */
int get_len_offset(int);
unsigned int proctal_x86_64_dr_len(unsigned long long dr7, int r) {
  int offset = get_len_offset(r);
  if (offset == -1) {
    return 0;
  }
  unsigned int mask = 0x3u << offset;
  return (dr7 & mask) >> offset;
}


x86 assembly (clang, -O0):
<proctal_x86_64_dr_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <get_len_offset@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1140 <proctal_x86_64_dr_len+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1160 <proctal_x86_64_dr_len+0x50>
mov    -0x18(%rbp),%ecx
mov    $0x3,%eax
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
and    %rcx,%rax
mov    -0x18(%rbp),%ecx
shr    %cl,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctal_x86_64_dr_len>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <get_len_offset@plt>
mov    %eax,%ecx
mov    $0x3,%eax
shl    %cl,%eax
and    %eax,%ebx
shr    %cl,%rbx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
cmove  %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @proctal_x86_64_dr_len(i64 %0, i32 %1) {
%3 = tail call i32 @get_len_offset(i32 %1)
%4 = icmp eq i32 %3, -1
%5 = shl i32 3, %3
%6 = zext i32 %5 to i64
%7 = and i64 %6, %0
%8 = zext i32 %3 to i64
%9 = lshr i64 %7, %8
%10 = trunc i64 %9 to i32
%11 = select i1 %4, i32 0, i32 %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\nusage: font2txt <root_name>\n");
  printf("\n\ninput file  <root_name>.h");
  printf("\noutput file <root_name>.txt");
  printf("\n");
  return;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf01(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rdi
call   1050 <printf@plt>
lea    0xecc(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"\0Ausage: font2txt <root_name>\0A\00"
@.str.1 = [28 x i8] c"\0A\0Ainput file <root_name>.h\00"
@.str.2 = [29 x i8] c"\0Aoutput file <root_name>.txt\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"\0A\0Ainput file <root_name>.h\00"
@.str.2 = [29 x i8] c"\0Aoutput file <root_name>.txt\00"
@str = [29 x i8] c"\0Ausage: font2txt <root_name>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrfx_usbd_errata_type_52840_eng_b();
bool nrfx_usbd_errata_154(void) {
  return (1 && (!nrfx_usbd_errata_type_52840_eng_b()));
}


x86 assembly (clang, -O0):
<nrfx_usbd_errata_154>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840_eng_b@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrfx_usbd_errata_154>:
push   %rax
xor    %eax,%eax
call   1030 <nrfx_usbd_errata_type_52840_eng_b@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_154() {
%1 = call i32 (...) @nrfx_usbd_errata_type_52840_eng_b()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_154() {
%1 = tail call i32 (...) @nrfx_usbd_errata_type_52840_eng_b()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ initialize();
int /*<<< orphan*/ report_and_exit();
int /*<<< orphan*/ test_add_source_membership();
int /*<<< orphan*/ test_drop_source_membership();
int main() {
  initialize();
  test_add_source_membership();
  test_drop_source_membership();
  report_and_exit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <initialize@plt>
mov    $0x0,%al
call   1030 <test_add_source_membership@plt>
mov    $0x0,%al
call   1060 <test_drop_source_membership@plt>
mov    $0x0,%al
call   1040 <report_and_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <initialize@plt>
xor    %eax,%eax
call   1030 <test_add_source_membership@plt>
xor    %eax,%eax
call   1060 <test_drop_source_membership@plt>
xor    %eax,%eax
call   1040 <report_and_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initialize()
%3 = call i32 (...) @test_add_source_membership()
%4 = call i32 (...) @test_drop_source_membership()
%5 = call i32 (...) @report_and_exit()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialize()
%2 = tail call i32 (...) @test_add_source_membership()
%3 = tail call i32 (...) @test_drop_source_membership()
%4 = tail call i32 (...) @report_and_exit()
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int clear_standard_tracker(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(509, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<clear_standard_tracker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1fd,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_standard_tracker>:
mov    $0x1fd,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @clear_standard_tracker() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 509, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_standard_tracker() {
%1 = tail call i32 @_ada_use_c2phc(i32 509, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int test_goto1(int f) {
  if (f)
    goto lab1;
  return 1;
lab1:
  return 2;
}


x86 assembly (clang, -O0):
<test_goto1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1116 <test_goto1+0x16>
jmp    1122 <test_goto1+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <test_goto1+0x29>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_goto1>:
cmp    $0x1,%edi
mov    $0x2,%eax
sbb    $0x0,%eax
ret

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

LLVM IR (-O2):
define i32 @test_goto1(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1, i32 2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, size_t const);
void *realloc(void *, size_t const);
void *xrealloc(void *ptr, const size_t size) {
  void *tmp = realloc(ptr, size);
  if (tmp == NULL) {
    err(102, "Realloc call failed - attempted %zu bytes", size);
  }
  return tmp;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <xrealloc+0x41>
mov    -0x10(%rbp),%rdx
mov    $0x66,%edi
lea    0xea4(%rip),%rsi
call   1030 <err@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <xrealloc+0x28>
lea    0xec5(%rip),%rsi
mov    $0x66,%edi
mov    %r14,%rdx
call   1030 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Realloc call failed - attempted %zu bytes\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @err(i32 102, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [42 x i8] c"Realloc call failed - attempted %zu bytes\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i32 102, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void slp_store_task_history(unsigned int cpu, struct task_struct *task) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
define void @slp_store_task_history(i32 %0, %struct.task_struct* %1) {
%3 = alloca i32
%4 = alloca %struct.task_struct*
store i32 %0, i32* %3
store %struct.task_struct* %1, %struct.task_struct** %4
ret void
}

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @slp_store_task_history(i32 %0, %struct.task_struct* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_Fs();
int /*<<< orphan*/ init_cutoff();
void init_forces() {
  init_cutoff();
  init_Fs();
}


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

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

LLVM IR (-O0):
define void @init_forces() {
%1 = call i32 (...) @init_cutoff()
%2 = call i32 (...) @init_Fs()
ret void
}

LLVM IR (-O2):
define void @init_forces() {
%1 = tail call i32 (...) @init_cutoff()
%2 = tail call i32 (...) @init_Fs()
ret void
}
/* Variables and functions */
int platform_bits();
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
void platform_name(char *output) {
  char *name;
  name = "x86";
  sprintf(output, "%s_%d", name, platform_bits());
}


x86 assembly (clang, -O0):
<platform_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <platform_bits@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
lea    0xea5(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_name>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <platform_bits@plt>
lea    0xed2(%rip),%rsi
lea    0xec7(%rip),%rdx
mov    %rbx,%rdi
mov    %eax,%ecx
pop    %rbx
jmp    1040 <sprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"x86\00"
@.str.1 = [6 x i8] c"%s_%d\00"
define void @platform_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = call i32 (...) @platform_bits()
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"x86\00"
@.str.1 = [6 x i8] c"%s_%d\00"
define void @platform_name(i8* nocapture writeonly %0) {
%2 = tail call i32 (...) @platform_bits()
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
float ps2_cosf(float);
float ps2_sinf(float x) {
  return ps2_cosf(x - 1.5707963267948966192313216916398f);
}


x86 assembly (clang, -O0):
<ps2_sinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
subss  %xmm1,%xmm0
call   1030 <ps2_cosf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2_sinf>:
addss  0xee8(%rip),%xmm0
jmp    1030 <ps2_cosf@plt>

LLVM IR (-O0):
define float @ps2_sinf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 0x3FF921FB60000000
%5 = call float @ps2_cosf(float %4)
ret float %5
}

LLVM IR (-O2):
define float @ps2_sinf(float %0) {
%2 = fadd float %0, 0xBFF921FB60000000
%3 = tail call float @ps2_cosf(float %2)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ creerNouveauDossierInventaire();
int /*<<< orphan*/ initialiserArmeInventaire();
int /*<<< orphan*/ initialiserArmureInventaire();
int /*<<< orphan*/ initialiserCleInventaire();
int /*<<< orphan*/ initialiserPotionInventaire();
int /*<<< orphan*/ initialiserTekInventaire();
int /*<<< orphan*/ initialiserTresorInventaire();
void initialiserInventaire(void) {
  creerNouveauDossierInventaire();
  initialiserCleInventaire();
  initialiserTekInventaire();
  initialiserArmureInventaire();
  initialiserArmeInventaire();
  initialiserTresorInventaire();
  initialiserPotionInventaire();
}


x86 assembly (clang, -O0):
<initialiserInventaire>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <creerNouveauDossierInventaire@plt>
mov    $0x0,%al
call   1080 <initialiserCleInventaire@plt>
mov    $0x0,%al
call   1050 <initialiserTekInventaire@plt>
mov    $0x0,%al
call   1070 <initialiserArmureInventaire@plt>
mov    $0x0,%al
call   1090 <initialiserArmeInventaire@plt>
mov    $0x0,%al
call   1040 <initialiserTresorInventaire@plt>
mov    $0x0,%al
call   1060 <initialiserPotionInventaire@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialiserInventaire>:
push   %rax
xor    %eax,%eax
call   1030 <creerNouveauDossierInventaire@plt>
xor    %eax,%eax
call   1080 <initialiserCleInventaire@plt>
xor    %eax,%eax
call   1050 <initialiserTekInventaire@plt>
xor    %eax,%eax
call   1070 <initialiserArmureInventaire@plt>
xor    %eax,%eax
call   1090 <initialiserArmeInventaire@plt>
xor    %eax,%eax
call   1040 <initialiserTresorInventaire@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <initialiserPotionInventaire@plt>

LLVM IR (-O0):
define void @initialiserInventaire() {
%1 = call i32 (...) @creerNouveauDossierInventaire()
%2 = call i32 (...) @initialiserCleInventaire()
%3 = call i32 (...) @initialiserTekInventaire()
%4 = call i32 (...) @initialiserArmureInventaire()
%5 = call i32 (...) @initialiserArmeInventaire()
%6 = call i32 (...) @initialiserTresorInventaire()
%7 = call i32 (...) @initialiserPotionInventaire()
ret void
}

LLVM IR (-O2):
define void @initialiserInventaire() {
%1 = tail call i32 (...) @creerNouveauDossierInventaire()
%2 = tail call i32 (...) @initialiserCleInventaire()
%3 = tail call i32 (...) @initialiserTekInventaire()
%4 = tail call i32 (...) @initialiserArmureInventaire()
%5 = tail call i32 (...) @initialiserArmeInventaire()
%6 = tail call i32 (...) @initialiserTresorInventaire()
%7 = tail call i32 (...) @initialiserPotionInventaire()
ret void
}
int show2(void pfunc(char *), char *msg) {
  (*pfunc)(msg);
  return 1;
}


x86 assembly (clang, -O0):
<show2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show2>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
call   *%rax
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @show2(void (i8*)* nocapture %0, i8* %1) {
tail call void %0(i8* %1)
ret i32 1
}
/* Type definitions */
struct Time {
  int dummy;
};

/* Variables and functions */
struct Time *Time_0(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
struct Time *init_curTime() {
  return Time_0(0, 0, 0);
}


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

x86 assembly (clang, -O2):
<init_curTime>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <Time_0@plt>

LLVM IR (-O0):
%struct.Time = type { i32 }
define %struct.Time* @init_curTime() {
%1 = call %struct.Time* @Time_0(i32 0, i32 0, i32 0)
ret %struct.Time* %1
}

LLVM IR (-O2):
%struct.Time = type { i32 }
define %struct.Time* @init_curTime() {
%1 = tail call %struct.Time* @Time_0(i32 0, i32 0, i32 0)
ret %struct.Time* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float);
int calc_throw(float v_0, float t, float g) {
  float v = v_0 + g * t;
  float s = v * t;
  printf("v: %f\ns: %f\ng: %f\n", v, s, g);
  return 0;
}


x86 assembly (clang, -O0):
<calc_throw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_throw>:
push   %rax
movaps %xmm2,%xmm3
mulss  %xmm1,%xmm3
addss  %xmm3,%xmm0
mulss  %xmm0,%xmm1
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"v: %f\0As: %f\0Ag: %f\0A\00"
define i32 @calc_throw(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %6
%11 = load float, float* %5
%12 = call float @llvm.fmuladd.f32(float %10, float %11, float %9)
store float %12, float* %7
%13 = load float, float* %7
%14 = load float, float* %5
%15 = fmul float %13, %14
store float %15, float* %8
%16 = load float, float* %7
%17 = load float, float* %8
%18 = load float, float* %6
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %16, float %17, float %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"v: %f\0As: %f\0Ag: %f\0A\00"
define i32 @calc_throw(float %0, float %1, float %2) {
%4 = tail call float @llvm.fmuladd.f32(float %2, float %1, float %0)
%5 = fmul float %4, %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %4, float %5, float %2)
ret i32 0
}
int perc_of(int1, int2)
int int1, int2;
{
  if (!int2)
    return 0;
  return (int)((((double)int1 / (double)int2) * 100) + .5);
}


x86 assembly (clang, -O0):
<perc_of>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1120 <perc_of+0x20>
movl   $0x0,-0x4(%rbp)
jmp    114d <perc_of+0x4d>
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<perc_of>:
test   %esi,%esi
je     1125 <perc_of+0x25>
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @perc_of(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* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 0, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
%14 = fdiv double %11, %13
%15 = call double @llvm.fmuladd.f64(double %14, double 1.000000e+02, double 5.000000e-01)
%16 = fptosi double %15 to i32
store i32 %16, i32* %3
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @perc_of(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = sitofp i32 %0 to double
%6 = sitofp i32 %1 to double
%7 = fdiv double %5, %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double 1.000000e+02, double 5.000000e-01)
%9 = fptosi double %8 to i32
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 0, %2 ]
ret i32 %11
}
int fesetround(int round) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fesetround(i32 %0) {
ret i32 0
}
int SecKeychainOpen() { return -4; }


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

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

LLVM IR (-O0):
define i32 @SecKeychainOpen() {
ret i32 -4
}

LLVM IR (-O2):
define i32 @SecKeychainOpen() {
ret i32 -4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void version() {
  fprintf(stderr, "icmptunnel is version %s (built %s).\n", "0.1-beta",
          "Mar 18 2022");
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xeeb(%rip),%rdx
lea    0xeed(%rip),%rcx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xeee(%rip),%rdx
lea    0xef0(%rip),%rcx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"icmptunnel is version %s (built %s).\0A\00"
@.str.1 = [9 x i8] c"0.1-beta\00"
@.str.2 = [12 x i8] c"Mar 18 2022\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"icmptunnel is version %s (built %s).\0A\00"
@.str.1 = [9 x i8] c"0.1-beta\00"
@.str.2 = [12 x i8] c"Mar 18 2022\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int SIGPIPE;
int /*<<< orphan*/ logwarn(char *);
void signal_handler(int signum) {
  if (signum == SIGPIPE) {
    logwarn("OmlNetOutStream: caught SIGPIPE\n");
  }
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
jne    1139 <signal_handler+0x29>
lea    0xecc(%rip),%rdi
call   1030 <logwarn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
mov    0x2ec9(%rip),%rax
cmp    %edi,(%rax)
jne    1127 <signal_handler+0x17>
lea    0xede(%rip),%rdi
jmp    1030 <logwarn@plt>
ret

LLVM IR (-O0):
@SIGPIPE = global i32 0
@.str = [33 x i8] c"OmlNetOutStream: caught SIGPIPE\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGPIPE
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @logwarn(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@.str = [33 x i8] c"OmlNetOutStream: caught SIGPIPE\0A\00"
define void @signal_handler(i32 %0) {
%2 = load i32, i32* @SIGPIPE
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @logwarn(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
int pinconf_check_ops(struct pinctrl_dev *pctldev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pinctrl_dev = type opaque
define i32 @pinconf_check_ops(%struct.pinctrl_dev* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SerialOutputByte(char);
void console_putc(char c) { SerialOutputByte(c); }


x86 assembly (clang, -O0):
<console_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <SerialOutputByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_putc>:
jmp    1030 <SerialOutputByte@plt>

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

LLVM IR (-O2):
define void @console_putc(i8 signext %0) {
%2 = tail call i32 @SerialOutputByte(i8 signext %0)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double time_to_double(struct timeval);
double NOW(void) {
  struct timeval now;
  if (gettimeofday(&now, NULL))
    return 0.0;
  return time_to_double(now);
}


x86 assembly (clang, -O0):
<NOW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     114c <NOW+0x2c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1159 <NOW+0x39>
mov    -0x10(%rbp),%edi
call   1040 <time_to_double@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NOW>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
je     1135 <NOW+0x15>
xorps  %xmm0,%xmm0
pop    %rax
ret
mov    (%rsp),%edi
pop    %rax
jmp    1040 <time_to_double@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define double @NOW() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store double 0.000000e+00, double* %1
br label %10
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call double @time_to_double(i32 %8)
store double %9, double* %1
br label %10
10: ; preds = %6, %5
%11 = load double, double* %1
ret double %11
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define double @NOW() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call double @time_to_double(i32 %7)
br label %9
9: ; preds = %0, %5
%10 = phi double [ %8, %5 ], [ 0.000000e+00, %0 ]
ret double %10
}
int getBEword(char buf[2]) {
  unsigned char *b = (unsigned char *)buf;
  return (b[0] << 8) | (b[1] << 0);
}


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

x86 assembly (clang, -O2):
<getBEword>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @getBEword(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 0
%15 = or i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @getBEword(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ zonetime(int /*<<< orphan*/ *, int);
void uninitvar_zonetime(void) {
  time_t *tp;
  int zone;
  (void)zonetime(tp, zone);
}


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

x86 assembly (clang, -O2):
<uninitvar_zonetime>:
jmp    1030 <zonetime@plt>

LLVM IR (-O0):
define void @uninitvar_zonetime() {
%1 = alloca i32*
%2 = alloca i32
%3 = load i32*, i32** %1
%4 = load i32, i32* %2
%5 = call i32 @zonetime(i32* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_zonetime() {
%1 = tail call i32 @zonetime(i32* undef, i32 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ float_t;

/* Variables and functions */
float __ratn2d(float, int /*<<< orphan*/);
float r_atn2d(float *x, float_t *y) { return (__ratn2d(*x, *y)); }


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

x86 assembly (clang, -O2):
<r_atn2d>:
movss  (%rdi),%xmm0
mov    (%rsi),%edi
jmp    1030 <__ratn2d@plt>

LLVM IR (-O0):
define float @r_atn2d(float* %0, i32* %1) {
%3 = alloca float*
%4 = alloca i32*
store float* %0, float** %3
store i32* %1, i32** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call float @__ratn2d(float %6, i32 %8)
ret float %9
}

LLVM IR (-O2):
define float @r_atn2d(float* nocapture %0, i32* nocapture %1) {
%3 = load float, float* %0
%4 = load i32, i32* %1
%5 = tail call float @__ratn2d(float %3, i32 %4)
ret float %5
}
/* Variables and functions */
char *get_max_2(char *);
__attribute__((noclone, no, noipa)) void *test_max_2(void) {
  char c;
  char *p = get_max_2(&c);
  void *q = p > &c ? p : &c;
  return q;
}


x86 assembly (clang, -O0):
<test_max_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x1(%rbp),%rdi
call   1030 <get_max_2@plt>
mov    %rax,-0x10(%rbp)
lea    -0x1(%rbp),%rax
cmp    %rax,-0x10(%rbp)
jbe    1140 <test_max_2+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    114d <test_max_2+0x3d>
lea    -0x1(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    114d <test_max_2+0x3d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_max_2>:
push   %rbx
sub    $0x10,%rsp
lea    0xf(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <get_max_2@plt>
cmp    %rbx,%rax
cmovbe %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @test_max_2() {
%1 = alloca i8
%2 = alloca i8*
%3 = alloca i8*
%4 = call i8* @get_max_2(i8* %1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ugt i8* %5, %1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i8*, i8** %2
br label %10
9: ; preds = %0
br label %10
10: ; preds = %9, %7
%11 = phi i8* [ %8, %7 ], [ %1, %9 ]
store i8* %11, i8** %3
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @test_max_2() {
%1 = alloca i8
%2 = call i8* @get_max_2(i8* %1)
%3 = icmp ugt i8* %2, %1
%4 = select i1 %3, i8* %2, i8* %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ BitVectorC__0__BitVector__clearAll();
void TrickleTimerImplP__0__Pending__clearAll(void) {
  BitVectorC__0__BitVector__clearAll();
}


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

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

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

LLVM IR (-O2):
define void @TrickleTimerImplP__0__Pending__clearAll() {
%1 = tail call i32 (...) @BitVectorC__0__BitVector__clearAll()
ret void
}
int func1(void) {
  int i;
  {
    i = 6;
    return (i);
  }
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func1() {
%1 = alloca i32
store i32 6, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @func1() {
ret i32 6
}
void TM01_intr(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @USBSuspendIRQ_Interrupt() {
ret void
}
int url_isdynamic(const char *fullpath) {
  const char *p;
  p = fullpath;
  while (*p) {
    if (*p == '?') {
      return 1;
    }
    p++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<url_isdynamic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <url_isdynamic+0x4a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3f,%eax
jne    1139 <url_isdynamic+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1151 <url_isdynamic+0x51>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <url_isdynamic+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<url_isdynamic>:
movzbl (%rdi),%eax
test   %al,%al
je     1111 <url_isdynamic+0x11>
cmp    $0x3f,%al
je     1114 <url_isdynamic+0x14>
add    $0x1,%rdi
jmp    1100 <url_isdynamic>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @url_isdynamic(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 63, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("In C, lowercase letters are significant.\n");
  printf("main is where program execution begins.\n");
  printf(
      "Opening and closing braces enclose program statements in a routine.\n");
  printf("All program statements must be terminated by a semicolon.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"In C, lowercase letters are significant.\0A\00"
@.str.1 = [41 x i8] c"main is where program execution begins.\0A\00"
@.str.2 = [69 x i8] c"Opening and closing braces enclose program statements in a routine.\0A\00"
@.str.3 = [59 x i8] c"All program statements must be terminated by a semicolon.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [41 x i8] c"In C, lowercase letters are significant.\00"
@str.4 = [40 x i8] c"main is where program execution begins.\00"
@str.5 = [68 x i8] c"Opening and closing braces enclose program statements in a routine.\00"
@str.6 = [58 x i8] c"All program statements must be terminated by a semicolon.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void magic_float(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 140)) {
    add_status(target, 22);
  }
}


x86 assembly (clang, -O0):
<magic_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8c,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <magic_float+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x16,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magic_float>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x8c,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <magic_float+0x41>
mov    %r14,%rdi
mov    $0x16,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @magic_float(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 140)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 22)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @magic_float(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 140)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 22)
br label %8
8: ; preds = %6, %2
ret void
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 7 * 100 + 1); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10701
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10701
}