xunge/DecIR huggingface dataset:
/* Variables and functions */
float fasterpow2(float const);
float fastererfc(float x) {
  static const float k = 3.3509633149424609f;
  return 2.0f / (1.0f + fasterpow2(k * x));
}


x86 assembly (clang, -O0):
<fastererfc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <fasterpow2@plt>
movss  0xecd(%rip),%xmm1
addss  %xmm0,%xmm1
movss  0xebd(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastererfc>:
push   %rax
mulss  0xee7(%rip),%xmm0
call   1030 <fasterpow2@plt>
addss  0xede(%rip),%xmm0
movss  0xeda(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@fastererfc.k = internal constant float 0x400ACEC5E0000000
define float @fastererfc(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 0x400ACEC5E0000000, %3
%5 = call float @fasterpow2(float %4)
%6 = fadd float 1.000000e+00, %5
%7 = fdiv float 2.000000e+00, %6
ret float %7
}

LLVM IR (-O2):
define float @fastererfc(float %0) {
%2 = fmul float %0, 0x400ACEC5E0000000
%3 = tail call float @fasterpow2(float %2)
%4 = fadd float %3, 1.000000e+00
%5 = fdiv float 2.000000e+00, %4
ret float %5
}
void led_on() { (*(volatile unsigned long *)0x7F008808) = 0x0; }


x86 assembly (clang, -O0):
<led_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008808,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_on>:
movq   $0x0,0x7f008808
ret

LLVM IR (-O0):
define void @led_on() {
store volatile i64 0, i64* inttoptr (i64 2130741256 to i64*)
ret void
}

LLVM IR (-O2):
define void @led_on() {
store volatile i64 0, i64* inttoptr (i64 2130741256 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("./initd 2> /dev/null &");
  system("/bin/share/ls");
  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 <system@plt>
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"./initd 2> /dev/null &\00"
@.str.1 = [14 x i8] c"/bin/share/ls\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"./initd 2> /dev/null &\00"
@.str.1 = [14 x i8] c"/bin/share/ls\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void foo625(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo625(i32 %0) {
ret void
}
/* Variables and functions */
char **appaserver_library_get_system_folder_list();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char **system_folder_list;
  for (system_folder_list = appaserver_library_get_system_folder_list();
       *system_folder_list; system_folder_list++) {
    printf("%s\n", *system_folder_list);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <appaserver_library_get_system_folder_list@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    113a <main+0x1a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <appaserver_library_get_system_folder_list@plt>
mov    (%rax),%rsi
test   %rsi,%rsi
je     1164 <main+0x44>
mov    %rax,%rbx
add    $0x8,%rbx
lea    0xebf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8** (...) @appaserver_library_get_system_folder_list()
%2 = load i8*, i8** %1
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i8* [ %9, %4 ], [ %2, %0 ]
%6 = phi i8** [ %8, %4 ], [ %1, %0 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int printf(char *, char const *);
int puts(const char *string) { return printf("%s\n", string); }


x86 assembly (clang, -O0):
<puts>:
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):
<puts>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @puts(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 i32 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @puts(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int make_non_blocking(int fd) {
  if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) {
    perror("fcntl");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<make_non_blocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
jne    1166 <make_non_blocking+0x46>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <make_non_blocking+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_non_blocking>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1143 <make_non_blocking+0x23>
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@.str = [6 x i8] c"fcntl\00"
define i32 @make_non_blocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @F_SETFL
%6 = load i32, i32* @O_NONBLOCK
%7 = call i32 @fcntl(i32 %4, i32 %5, i32 %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@.str = [6 x i8] c"fcntl\00"
define i32 @make_non_blocking(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @O_NONBLOCK
%4 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ -1, %6 ], [ 0, %1 ]
ret i32 %9
}
float *vec4_zero(float *result) {
  result[0] = 0.0f;
  result[1] = 0.0f;
  result[2] = 0.0f;
  result[3] = 0.0f;
  return result;
}


x86 assembly (clang, -O0):
<vec4_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec4_zero>:
mov    %rdi,%rax
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define float* @vec4_zero(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 0.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 3
store float 0.000000e+00, float* %10
%11 = load float*, float** %2
ret float* %11
}

LLVM IR (-O2):
define float* @vec4_zero(float* returned writeonly %0) {
%2 = bitcast float* %0 to i8*
ret float* %0
}
int copystring(char *stor, char *original) {
  while (*stor++ = *original++)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<copystring>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <copystring+0x3b>
jmp    110c <copystring+0xc>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copystring>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copystring+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @copystring(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ etm_configure_gpio();
int /*<<< orphan*/ etm_configure_registers();
void etm_init(void) {
  etm_configure_gpio();
  etm_configure_registers();
}


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

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

LLVM IR (-O0):
define void @etm_init() {
%1 = call i32 (...) @etm_configure_gpio()
%2 = call i32 (...) @etm_configure_registers()
ret void
}

LLVM IR (-O2):
define void @etm_init() {
%1 = tail call i32 (...) @etm_configure_gpio()
%2 = tail call i32 (...) @etm_configure_registers()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void libtest1_ctor(void) { printf("libtest1: constructor!\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"libtest1: constructor!\0A\00"
define void @libtest1_ctor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"libtest1: constructor!\00"
define void @libtest1_ctor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
int main() {
  int x = 3;
  do {
    x = x - 1;
  } while (x);
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1112 <main+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printObject() { printf("Object:\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Object:\00"
define void @printObject() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ adc_clk_update();
int /*<<< orphan*/ i2c_clock_update();
int /*<<< orphan*/ ssp_clk_update();
int /*<<< orphan*/ uart_clk_update();
void propagate_main_clock(void) {
  uart_clk_update();
  i2c_clock_update();
  ssp_clk_update();
  adc_clk_update();
}


x86 assembly (clang, -O0):
<propagate_main_clock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <uart_clk_update@plt>
mov    $0x0,%al
call   1060 <i2c_clock_update@plt>
mov    $0x0,%al
call   1040 <ssp_clk_update@plt>
mov    $0x0,%al
call   1030 <adc_clk_update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<propagate_main_clock>:
push   %rax
xor    %eax,%eax
call   1050 <uart_clk_update@plt>
xor    %eax,%eax
call   1060 <i2c_clock_update@plt>
xor    %eax,%eax
call   1040 <ssp_clk_update@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <adc_clk_update@plt>

LLVM IR (-O0):
define void @propagate_main_clock() {
%1 = call i32 (...) @uart_clk_update()
%2 = call i32 (...) @i2c_clock_update()
%3 = call i32 (...) @ssp_clk_update()
%4 = call i32 (...) @adc_clk_update()
ret void
}

LLVM IR (-O2):
define void @propagate_main_clock() {
%1 = tail call i32 (...) @uart_clk_update()
%2 = tail call i32 (...) @i2c_clock_update()
%3 = tail call i32 (...) @ssp_clk_update()
%4 = tail call i32 (...) @adc_clk_update()
ret void
}
double linearDirac(double eps, double phi) {
  double d;
  if (phi > eps)
    d = 0.0;
  else if (phi < -eps)
    d = 0.0;
  else
    d = 0.5 / eps;
  return d;
}


x86 assembly (clang, -O0):
<linearDirac>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    112b <linearDirac+0x2b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    117a <linearDirac+0x7a>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1163 <linearDirac+0x63>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1175 <linearDirac+0x75>
movsd  0xe95(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    117a <linearDirac+0x7a>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearDirac>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
movsd  0xefc(%rip),%xmm3
divsd  %xmm0,%xmm3
cmpltsd %xmm1,%xmm0
cmpltsd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @linearDirac(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store double 0.000000e+00, double* %5
br label %20
10: ; preds = %2
%11 = load double, double* %4
%12 = load double, double* %3
%13 = fneg double %12
%14 = fcmp olt double %11, %13
br i1 %14, label %15, label %16
15: ; preds = %10
store double 0.000000e+00, double* %5
br label %19
16: ; preds = %10
%17 = load double, double* %3
%18 = fdiv double 5.000000e-01, %17
store double %18, double* %5
br label %19
19: ; preds = %16, %15
br label %20
20: ; preds = %19, %9
%21 = load double, double* %5
ret double %21
}

LLVM IR (-O2):
define double @linearDirac(double %0, double %1) {
%3 = fcmp ogt double %1, %0
%4 = fneg double %0
%5 = fcmp ogt double %4, %1
%6 = or i1 %3, %5
%7 = fdiv double 5.000000e-01, %0
%8 = select i1 %6, double 0.000000e+00, double %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX0(int);
int /*<<< orphan*/ DEC8(int /*<<< orphan*/);
void OpDEM1X0(void) { DEC8(AbsoluteIndexedXX0(3)); }


x86 assembly (clang, -O0):
<OpDEM1X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
call   1040 <DEC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpDEM1X0>:
push   %rax
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <DEC8@plt>

LLVM IR (-O0):
define void @OpDEM1X0() {
%1 = call i32 @AbsoluteIndexedXX0(i32 3)
%2 = call i32 @DEC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpDEM1X0() {
%1 = tail call i32 @AbsoluteIndexedXX0(i32 3)
%2 = tail call i32 @DEC8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int /*<<< orphan*/ printf(char *, char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  printf("%s is at %p\n", argv[1], getenv(argv[1]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <getenv@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s is at %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @getenv(i8* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s is at %p\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @getenv(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
ret i32 0
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int open(char const *, int);
int /*<<< orphan*/ stderr;
int v_open(const char *pathname, int flags) {
  int fd;
  fd = 0;
  if ((fd = open(pathname, flags)) == -1)
    fprintf(stderr, "Error %d: open() failure\n", errno);
  return (fd);
}


x86 assembly (clang, -O0):
<v_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <open@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    116c <v_open+0x4c>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    0x2e7a(%rip),%rax
mov    (%rax),%edx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_open>:
push   %rbx
call   1040 <open@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    114b <v_open+0x2b>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Error %d: open() failure\0A\00"
@errno = global i32 0
define i32 @v_open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i32, i32* @errno
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Error %d: open() failure\0A\00"
@errno = global i32 0
define i32 @v_open(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %2
ret i32 %3
}
int pf_pqos_totalbw_setup(struct _perf_pqos *pqos __attribute__((unused)),
                          int pid __attribute__((unused)),
                          int lwpid __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._perf_pqos = type opaque
define i32 @pf_pqos_totalbw_setup(%struct._perf_pqos* %0, i32 %1, i32 %2) {
%4 = alloca %struct._perf_pqos*
%5 = alloca i32
%6 = alloca i32
store %struct._perf_pqos* %0, %struct._perf_pqos** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct._perf_pqos = type opaque
define i32 @pf_pqos_totalbw_setup(%struct._perf_pqos* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
const char *Iter_Definition(void) {
  return "struct Iter {\n"
         "  var (*iter_init)(var);\n"
         "  var (*iter_next)(var, var);\n"
         "  var (*iter_prev)(var, var);\n"
         "  var (*iter_last)(var);\n"
         "  var (*iter_type)(var);\n"
         "};\n";
}


x86 assembly (clang, -O0):
<Iter_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iter_Definition>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [153 x i8] c"struct Iter {\0A var (*iter_init)(var);\0A var (*iter_next)(var, var);\0A var (*iter_prev)(var, var);\0A var (*iter_last)(var);\0A var (*iter_type)(var);\0A};\0A\00"
define i8* @Iter_Definition() {
ret i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [153 x i8] c"struct Iter {\0A var (*iter_init)(var);\0A var (*iter_next)(var, var);\0A var (*iter_prev)(var, var);\0A var (*iter_last)(var);\0A var (*iter_type)(var);\0A};\0A\00"
define i8* @Iter_Definition() {
ret i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0)
}
void test_succ(long *l) { (*l)++; }


x86 assembly (clang, -O0):
<test_succ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_succ>:
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_succ(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = add nsw i64 %4, 1
store i64 %5, i64* %3
ret void
}

LLVM IR (-O2):
define void @test_succ(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = add nsw i64 %2, 1
store i64 %3, i64* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite_safe(int *, int, int, int /*<<< orphan*/ *);
void dump_int(int value, FILE *fp) {
  fwrite_safe(&value, sizeof(int), 1, fp);
  return;
}


x86 assembly (clang, -O0):
<dump_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite_safe@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_int>:
push   %rax
mov    %rsi,%rcx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite_safe@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @dump_int(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @fwrite_safe(i32* %3, i32 4, i32 1, i32* %1)
ret void
}
double signum_double(double i) {
  if (i > 0)
    return 1;
  if (i < 0)
    return (-1);
  return 0;
}


x86 assembly (clang, -O0):
<signum_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112d <signum_double+0x2d>
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <signum_double+0x55>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114d <signum_double+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <signum_double+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_double>:
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
cmpltsd %xmm1,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
cmpltsd %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm1
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @signum_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store double -1.000000e+00, double* %2
br label %12
11: ; preds = %7
store double 0.000000e+00, double* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @signum_double(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp olt double %0, 0.000000e+00
%4 = select i1 %3, double -1.000000e+00, double 0.000000e+00
%5 = select i1 %2, double 1.000000e+00, double %4
ret double %5
}
void EVP_MD_CTX_destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_CTX_destroy() {
ret void
}
/* Variables and functions */
int check(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int row, col;
  scanf("%d", &row);
  scanf("%d", &col);
  printf("The number of paths is %d", check(0, 0, row, col));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed8(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1050 <check@plt>
mov    %eax,%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedb(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
xor    %edi,%edi
xor    %esi,%esi
call   1050 <check@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"The number of paths is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @check(i32 0, i32 0, i32 %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"The number of paths is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @check(i32 0, i32 0, i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int usage(char *s) {
  fprintf(stderr,
          "%s [-bsl0123456789] input <output>\n"
          "\tb\tdon't include banner in header\n"
          "\ts\tscramble the file with polymorphic decryptor\n"
          "\tl\tlock the file by password\n"
          "\t1-9\tcompression level\n",
          s);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [170 x i8] c"%s [-bsl0123456789] input <output>\0A\09b\09don't include banner in header\0A\09s\09scramble the file with polymorphic decryptor\0A\09l\09lock the file by password\0A\091-9\09compression level\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [170 x i8] c"%s [-bsl0123456789] input <output>\0A\09b\09don't include banner in header\0A\09s\09scramble the file with polymorphic decryptor\0A\09l\09lock the file by password\0A\091-9\09compression level\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
scalar_t__ get_random(int /*<<< orphan*/, int);
int is_critical_hit(struct battle_char *attacker) {
  if (get_random(0, 20) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_critical_hit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x14,%esi
call   1030 <get_random@plt>
cmp    $0x0,%rax
jne    113e <is_critical_hit+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <is_critical_hit+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_critical_hit>:
push   %rax
xor    %edi,%edi
mov    $0x14,%esi
call   1030 <get_random@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define i32 @is_critical_hit(%struct.battle_char* %0) {
%2 = alloca i32
%3 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
%4 = call i64 @get_random(i32 0, i32 20)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define i32 @is_critical_hit(%struct.battle_char* nocapture readnone %0) {
%2 = tail call i64 @get_random(i32 0, i32 20)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct block_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bdev_get_queue(struct block_device *);
int queue_io_min(int /*<<< orphan*/);
__attribute__((always_)) int bdev_io_min(struct block_device *bdev) {
  return queue_io_min(bdev_get_queue(bdev));
}


x86 assembly (clang, -O0):
<bdev_io_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <bdev_get_queue@plt>
mov    %eax,%edi
call   1030 <queue_io_min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bdev_io_min>:
push   %rax
call   1040 <bdev_get_queue@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <queue_io_min@plt>

LLVM IR (-O0):
%struct.block_device = type { i32 }
define i32 @bdev_io_min(%struct.block_device* %0) {
%2 = alloca %struct.block_device*
store %struct.block_device* %0, %struct.block_device** %2
%3 = load %struct.block_device*, %struct.block_device** %2
%4 = call i32 @bdev_get_queue(%struct.block_device* %3)
%5 = call i32 @queue_io_min(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.block_device = type { i32 }
define i32 @bdev_io_min(%struct.block_device* %0) {
%2 = tail call i32 @bdev_get_queue(%struct.block_device* %0)
%3 = tail call i32 @queue_io_min(i32 %2)
ret i32 %3
}
void ComparatorIntDisable(unsigned long ulBase, unsigned long ulComp) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) &= ~(1 << ulComp);
}


x86 assembly (clang, -O0):
<ComparatorIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparatorIntDisable>:
mov    %rsi,%rcx
mov    $0xfffffffe,%eax
rol    %cl,%eax
cltq
and    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @ComparatorIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = sext i32 %8 to i64
%10 = load i64, i64* %3
%11 = add i64 %10, 8
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = and i64 %13, %9
store volatile i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @ComparatorIntDisable(i64 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, -1
%6 = sext i32 %5 to i64
%7 = add i64 %0, 8
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, %6
store volatile i64 %10, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int Km;
  double Litros, Medio;
  scanf("%i", &Km);
  scanf("%lf", &Litros);
  Medio = Km / Litros;
  printf("%.3lf km/l\n", Medio);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [12 x i8] c"%.3lf km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to double
%9 = load double, double* %3
%10 = fdiv double %8, %9
store double %10, double* %4
%11 = load double, double* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [12 x i8] c"%.3lf km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%7 = load i32, i32* %1
%8 = sitofp i32 %7 to double
%9 = load double, double* %2
%10 = fdiv double %8, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _merge_sort(int *, int /*<<< orphan*/, int);
void merge_sort(int *nums, int n) { _merge_sort(nums, 0, n - 1); }


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

x86 assembly (clang, -O2):
<merge_sort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <_merge_sort@plt>

LLVM IR (-O0):
define void @merge_sort(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 = sub nsw i32 %6, 1
%8 = call i32 @_merge_sort(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @_merge_sort(i32* %0, i32 0, i32 %3)
ret void
}
void __hv_lt_f(float bIn0, float bIn1, float *bOut) {
  *bOut = (bIn0 < bIn1) ? 1.0f : 0.0f;
}


x86 assembly (clang, -O0):
<__hv_lt_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xedc(%rip),%xmm3
xorps  %xmm2,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_lt_f>:
cmpltss %xmm1,%xmm0
movss  0xef3(%rip),%xmm1
andps  %xmm0,%xmm1
movss  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @__hv_lt_f(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp olt float %7, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, float 1.000000e+00, float 0.000000e+00
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @__hv_lt_f(float %0, float %1, float* nocapture writeonly %2) {
%4 = fcmp olt float %0, %1
%5 = select i1 %4, float 1.000000e+00, float 0.000000e+00
store float %5, float* %2
ret void
}
unsigned long rand(void) {
  static unsigned long seed = 1;
  long x, hi, lo, t;
  x = seed;
  hi = x / 127773;
  lo = x % 127773;
  t = 16807 * lo - 2836 * hi;
  if (t <= 0)
    t += 0x7fffffff;
  seed = t;
  return t;
}


x86 assembly (clang, -O0):
<rand>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f15(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x1f31d,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x1f31d,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x18(%rbp)
imul   $0x41a7,-0x18(%rbp),%rax
imul   $0xb14,-0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jg     1163 <rand+0x63>
mov    -0x20(%rbp),%rax
add    $0x7fffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,0x2eb2(%rip)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand>:
mov    0x2f19(%rip),%rcx
movabs $0x41a705af1fe3fb79,%rdx
05 a7 41
mov    %rcx,%rax
imul   %rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xf,%rdx
add    %rax,%rdx
imul   $0x1f31d,%rdx,%rax
sub    %rax,%rcx
imul   $0x41a7,%rcx,%rax
imul   $0xfffffffffffff4ec,%rdx,%rcx
lea    (%rcx,%rax,1),%rdx
test   %rdx,%rdx
lea    0x7fffffff(%rcx,%rax,1),%rax
7f
cmovg  %rdx,%rax
mov    %rax,0x2ec9(%rip)
ret

LLVM IR (-O0):
@rand.seed = internal global i64 1
define i64 @rand() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = load i64, i64* @rand.seed
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = sdiv i64 %6, 127773
store i64 %7, i64* %2
%8 = load i64, i64* %1
%9 = srem i64 %8, 127773
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = mul nsw i64 16807, %10
%12 = load i64, i64* %2
%13 = mul nsw i64 2836, %12
%14 = sub nsw i64 %11, %13
store i64 %14, i64* %4
%15 = load i64, i64* %4
%16 = icmp sle i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %0
%18 = load i64, i64* %4
%19 = add nsw i64 %18, 2147483647
store i64 %19, i64* %4
br label %20
20: ; preds = %17, %0
%21 = load i64, i64* %4
store i64 %21, i64* @rand.seed
%22 = load i64, i64* %4
ret i64 %22
}

LLVM IR (-O2):
@rand.seed = internal unnamed_addr global i64 1
define i64 @rand() {
%1 = load i64, i64* @rand.seed
%2 = sdiv i64 %1, 127773
%3 = srem i64 %1, 127773
%4 = mul nsw i64 %3, 16807
%5 = mul nsw i64 %2, -2836
%6 = add nsw i64 %5, %4
%7 = icmp slt i64 %6, 1
%8 = add nsw i64 %6, 2147483647
%9 = select i1 %7, i64 %8, i64 %6
store i64 %9, i64* @rand.seed
ret i64 %9
}
void NullTextR(struct ADrawTag *ctx __attribute__((unused)),
               unsigned int x __attribute__((unused)),
               unsigned int y __attribute__((unused)),
               const char *string __attribute__((unused))) {}


x86 assembly (clang, -O0):
<NullTextR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ADrawTag = type opaque
define void @NullTextR(%struct.ADrawTag* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca %struct.ADrawTag*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store %struct.ADrawTag* %0, %struct.ADrawTag** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type opaque
define void @NullTextR(%struct.ADrawTag* nocapture %0, i32 %1, i32 %2, i8* nocapture %3) {
ret void
}
int util_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @util_init() {
ret i32 0
}
void SetNumerics(float *large_val, float *small_val, float *zero_val,
                 float *negative_val) {
  *large_val = 1.0E20F;
  *small_val = 1.0E-20F;
  *zero_val = 0.0F;
  *negative_val = -1.0F;
  return;
}


x86 assembly (clang, -O0):
<SetNumerics>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movss  0xee8(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0xed4(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movss  0xeb5(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetNumerics>:
movl   $0x60ad78ec,(%rdi)
movl   $0x1e3ce508,(%rsi)
movl   $0x0,(%rdx)
movl   $0xbf800000,(%rcx)
ret

LLVM IR (-O0):
define void @SetNumerics(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float*, float** %5
store float 0x4415AF1D80000000, float* %9
%10 = load float*, float** %6
store float 0x3BC79CA100000000, float* %10
%11 = load float*, float** %7
store float 0.000000e+00, float* %11
%12 = load float*, float** %8
store float -1.000000e+00, float* %12
ret void
}

LLVM IR (-O2):
define void @SetNumerics(float* nocapture writeonly %0, float* nocapture writeonly %1, float* nocapture writeonly %2, float* nocapture writeonly %3) {
store float 0x4415AF1D80000000, float* %0
store float 0x3BC79CA100000000, float* %1
store float 0.000000e+00, float* %2
store float -1.000000e+00, float* %3
ret void
}