xunge/DecIR huggingface dataset:
float EaseQuadIn(float t, float b, float c, float d) {
  t /= d;
  return (c * t * t + b);
}


x86 assembly (clang, -O0):
<EaseQuadIn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseQuadIn>:
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @EaseQuadIn(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* %8
%10 = load float, float* %5
%11 = fdiv float %10, %9
store float %11, float* %5
%12 = load float, float* %7
%13 = load float, float* %5
%14 = fmul float %12, %13
%15 = load float, float* %5
%16 = load float, float* %6
%17 = call float @llvm.fmuladd.f32(float %14, float %15, float %16)
ret float %17
}

LLVM IR (-O2):
define float @EaseQuadIn(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fmul float %5, %2
%7 = tail call float @llvm.fmuladd.f32(float %6, float %5, float %1)
ret float %7
}
void GPIOPortP4_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortP4_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortP4_Handler+0x9>
jmp    1109 <GPIOPortP4_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortP4_Handler>:
jmp    1100 <GPIOPortP4_Handler>

LLVM IR (-O0):
define void @GPIOPortP4_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortP4_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void gtk_type_class() {}


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

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

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

LLVM IR (-O2):
define void @gtk_type_class() {
ret void
}
float radians_in_degrees(float radians) { return radians / 0.0174532925; }


x86 assembly (clang, -O0):
<radians_in_degrees>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<radians_in_degrees>:
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @radians_in_degrees(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 0x3F91DF46A1FAE711
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @radians_in_degrees(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double %2, 0x3F91DF46A1FAE711
%4 = fptrunc double %3 to float
ret float %4
}
/* Type definitions */
struct dbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct dbuf *);
int /*<<< orphan*/ dbuf_addmem(struct dbuf *, char *, int);
void dbuf_addch(struct dbuf *b, char c) {
  assert(b);
  dbuf_addmem(b, &c, 1);
}


x86 assembly (clang, -O0):
<dbuf_addch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <dbuf_addmem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbuf_addch>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %sil,0xf(%rsp)
call   1040 <assert@plt>
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
call   1030 <dbuf_addmem@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.dbuf = type { i32 }
define void @dbuf_addch(%struct.dbuf* %0, i8 signext %1) {
%3 = alloca %struct.dbuf*
%4 = alloca i8
store %struct.dbuf* %0, %struct.dbuf** %3
store i8 %1, i8* %4
%5 = load %struct.dbuf*, %struct.dbuf** %3
%6 = call i32 @assert(%struct.dbuf* %5)
%7 = load %struct.dbuf*, %struct.dbuf** %3
%8 = call i32 @dbuf_addmem(%struct.dbuf* %7, i8* %4, i32 1)
ret void
}

LLVM IR (-O2):
%struct.dbuf = type { i32 }
define void @dbuf_addch(%struct.dbuf* %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = tail call i32 @assert(%struct.dbuf* %0)
%5 = call i32 @dbuf_addmem(%struct.dbuf* %0, i8* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello, world\c\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello, worldc\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ test(int);
int main() {
  int B;
  printf("Bonjour, es-tu Camille ? (1 si ou, 0 si non)? ");
  scanf("%d", &B);
  printf("\n Gentil utilisateur\n");
  test(B);
  printf("Coucou\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <test@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%edi
call   1060 <test@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Bonjour, es-tu Camille ? (1 si ou, 0 si non)? \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0A Gentil utilisateur\0A\00"
@.str.3 = [8 x i8] c"Coucou\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 @test(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"Bonjour, es-tu Camille ? (1 si ou, 0 si non)? \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [21 x i8] c"\0A Gentil utilisateur\00"
@str.4 = [7 x i8] c"Coucou\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* %1
%7 = call i32 @test(i32 %6)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
int XAllocColor() {}


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

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

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

LLVM IR (-O2):
define i32 @XAllocColor() {
ret i32 undef
}
int do_779() { return 779; }


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

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

LLVM IR (-O0):
define i32 @do_779() {
ret i32 779
}

LLVM IR (-O2):
define i32 @do_779() {
ret i32 779
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t instruction_operation_extract_operation_code(uint16_t instruction) {
  return (instruction >> 0x0C) & 0x0F;
}


x86 assembly (clang, -O0):
<instruction_operation_extract_operation_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xc,%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_operation_extract_operation_code>:
mov    %edi,%eax
shr    $0xc,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @instruction_operation_extract_operation_code(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 12
%5 = and i32 %4, 15
ret i32 %5
}

LLVM IR (-O2):
define i32 @instruction_operation_extract_operation_code(i32 %0) {
%2 = lshr i32 %0, 12
%3 = and i32 %2, 15
ret i32 %3
}
int in_exception_text(unsigned long ptr) {
  extern char __exception_text_start[];
  extern char __exception_text_end[];
  return ptr >= (unsigned long)&__exception_text_start &&
         ptr < (unsigned long)&__exception_text_end;
}


x86 assembly (clang, -O0):
<in_exception_text>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ed7(%rip),%rcx
cmp    %rcx,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jb     112f <in_exception_text+0x2f>
mov    0x2eab(%rip),%rax
cmp    %rax,-0x8(%rbp)
setb   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_exception_text>:
cmp    0x2ee1(%rip),%rdi
setae  %al
cmp    0x2ebf(%rip),%rdi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
@__exception_text_start = external global [0 x i8]
@__exception_text_end = external global [0 x i8]
define i32 @in_exception_text(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp uge i64 %3, ptrtoint ([0 x i8]* @__exception_text_start to i64)
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp ult i64 %6, ptrtoint ([0 x i8]* @__exception_text_end to i64)
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@__exception_text_start = external global [0 x i8]
@__exception_text_end = external global [0 x i8]
define i32 @in_exception_text(i64 %0) {
%2 = icmp uge i64 %0, ptrtoint ([0 x i8]* @__exception_text_start to i64)
%3 = icmp ult i64 %0, ptrtoint ([0 x i8]* @__exception_text_end to i64)
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ addMultipleToArray(void **, size_t *, void const *, size_t,
                                      int);
void addToArray(void **array, size_t *used, const void *value, size_t size) {
  addMultipleToArray(array, used, value, size, 1);
}


x86 assembly (clang, -O0):
<addToArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <addMultipleToArray@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addToArray>:
mov    $0x1,%r8d
jmp    1030 <addMultipleToArray@plt>

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

LLVM IR (-O2):
define void @addToArray(i8** %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i32 @addMultipleToArray(i8** %0, i64* %1, i8* %2, i64 %3, i32 1)
ret void
}
/* Type definitions */
struct _ses_impl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _sei_free_buf(struct _ses_impl *);
void _sei_dtor(void *ptr) {
  struct _ses_impl *sei = (struct _ses_impl *)ptr;
  _sei_free_buf(sei);
}


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

x86 assembly (clang, -O2):
<_sei_dtor>:
jmp    1030 <_sei_free_buf@plt>

LLVM IR (-O0):
%struct._ses_impl = type { i32 }
define void @_sei_dtor(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct._ses_impl*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct._ses_impl*
store %struct._ses_impl* %5, %struct._ses_impl** %3
%6 = load %struct._ses_impl*, %struct._ses_impl** %3
%7 = call i32 @_sei_free_buf(%struct._ses_impl* %6)
ret void
}

LLVM IR (-O2):
%struct._ses_impl = type { i32 }
define void @_sei_dtor(i8* %0) {
%2 = bitcast i8* %0 to %struct._ses_impl*
%3 = tail call i32 @_sei_free_buf(%struct._ses_impl* %2)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
float *CriaVetFloat(int tamanho) {
  float *ptr;
  ptr = (float *)malloc(sizeof(float) * tamanho);
  return ptr;
}


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

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

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

LLVM IR (-O2):
define float* @CriaVetFloat(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to float*
ret float* %4
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int pid_cmp(const void *a, const void *b) {
  pid_t *pid1 = (pid_t *)a;
  pid_t *pid2 = (pid_t *)b;
  if (*pid1 > *pid2) {
    return (1);
  }
  if (*pid1 < *pid2) {
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<pid_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jle    113c <pid_cmp+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <pid_cmp+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jge    115c <pid_cmp+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <pid_cmp+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pid_cmp>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @pid_cmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %7
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = load i64*, i64** %7
%15 = load i64, i64* %14
%16 = icmp sgt i64 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %26
18: ; preds = %2
%19 = load i64*, i64** %6
%20 = load i64, i64* %19
%21 = load i64*, i64** %7
%22 = load i64, i64* %21
%23 = icmp slt i64 %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 -1, i32* %3
br label %26
25: ; preds = %18
store i32 0, i32* %3
br label %26
26: ; preds = %25, %24, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @pid_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = icmp slt i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
unsigned long getpagesize();
void *page_adr(void *adr) {
  unsigned long iptr = (unsigned long)adr;
  return (void *)(iptr - iptr % getpagesize());
}


x86 assembly (clang, -O0):
<page_adr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    -0x18(%rbp),%rax
sub    %rdx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_adr>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpagesize@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1131 <page_adr+0x21>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
jmp    1137 <page_adr+0x27>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
sub    %rdx,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @page_adr(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = load i64, i64* %3
%8 = call i64 (...) @getpagesize()
%9 = urem i64 %7, %8
%10 = sub i64 %6, %9
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @page_adr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i64 (...) @getpagesize()
%4 = urem i64 %2, %3
%5 = sub i64 %2, %4
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ _get_rtc_data(int);
int bcd_to_normal(int /*<<< orphan*/);
int get_time_data(int option) {
  if (option < 0 || option > 10) {
    return -1;
  }
  return bcd_to_normal(_get_rtc_data(option));
}


x86 assembly (clang, -O0):
<get_time_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     113f <get_time_data+0x1f>
cmpl   $0xa,-0x8(%rbp)
jle    114b <get_time_data+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <get_time_data+0x3d>
mov    -0x8(%rbp),%edi
call   1040 <_get_rtc_data@plt>
mov    %eax,%edi
call   1030 <bcd_to_normal@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_data>:
cmp    $0xa,%edi
jbe    112b <get_time_data+0xb>
mov    $0xffffffff,%eax
ret
push   %rax
call   1040 <_get_rtc_data@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <bcd_to_normal@plt>

LLVM IR (-O0):
define i32 @get_time_data(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 -1, i32* %2
br label %14
10: ; preds = %6
%11 = load i32, i32* %3
%12 = call i32 @_get_rtc_data(i32 %11)
%13 = call i32 @bcd_to_normal(i32 %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_time_data(i32 %0) {
%2 = icmp ugt i32 %0, 10
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @_get_rtc_data(i32 %0)
%5 = tail call i32 @bcd_to_normal(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ -1, %1 ]
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned int state;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmotion_state(void *_p, unsigned _v) {
  ((XEvent *)_p)->xmotion.state = (unsigned)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xmotion_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xmotion_state>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xmotion_state(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xmotion_state(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ __uid_t;
struct TYPE_2__ {
  char *pw_gecos;
};

/* Variables and functions */
TYPE_1__ *getpwuid(int /*<<< orphan*/);
char *get_pw_gecos(__uid_t uid) { return getpwuid(uid)->pw_gecos; }


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

x86 assembly (clang, -O2):
<get_pw_gecos>:
push   %rax
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define i8* @get_pw_gecos(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.TYPE_2__* @getpwuid(i32 %3)
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i8* }
define i8* @get_pw_gecos(i32 %0) {
%2 = tail call %struct.TYPE_2__* @getpwuid(i32 %0)
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i64 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void option_requires_argument(const char *zOpt) {
  fprintf(stderr, "Option requires an argument: %s\n", zOpt);
  exit(-3);
}


x86 assembly (clang, -O0):
<option_requires_argument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffd,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<option_requires_argument>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffd,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Option requires an argument: %s\0A\00"
define void @option_requires_argument(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 ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Option requires an argument: %s\0A\00"
define void @option_requires_argument(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -3)
unreachable
}
void umocktypes_free_long(long *value) { (void)value; }


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

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

LLVM IR (-O0):
define void @umocktypes_free_long(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
ret void
}

LLVM IR (-O2):
define void @umocktypes_free_long(i64* nocapture %0) {
ret void
}
int seek(int fd, int offset, int mode) {
  int ret = 0;
  asm("movl $19,%%eax  \n\t"
      "movl %1,%%ebx \n\t"
      "movl %2,%%ecx  \n\t"
      "movl %3,%%edx \n\t"
      "int $0x80  \n\t"
      "movl %%eax,%0 \n\t"
      : "=m"(ret)
      : "m"(fd), "m"(offset), "m"(mode));
  return ret;
}


x86 assembly (clang, -O0):
<seek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x13,%eax
mov    -0x4(%rbp),%ebx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
int    $0x80
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seek>:
mov    %edi,-0x4(%rsp)
mov    %esi,-0x8(%rsp)
mov    %edx,-0xc(%rsp)
movl   $0x0,-0x10(%rsp)
mov    $0x13,%eax
mov    -0x4(%rsp),%ebx
mov    -0x8(%rsp),%ecx
mov    -0xc(%rsp),%edx
int    $0x80
mov    %eax,-0x10(%rsp)
mov    -0x10(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @seek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%9 = load i32, i32* %7
ret i32 %9
}
/* Variables and functions */
unsigned long long __tzmsk_u64(unsigned long long);
unsigned long long func_tzmsk64(unsigned long long X) { return __tzmsk_u64(X); }


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

x86 assembly (clang, -O2):
<func_tzmsk64>:
jmp    1030 <__tzmsk_u64@plt>

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

LLVM IR (-O2):
define i64 @func_tzmsk64(i64 %0) {
%2 = tail call i64 @__tzmsk_u64(i64 %0)
ret i64 %2
}
dtaction(argc, argv) int argc;
char *argv[];
{ main(argc, argv); }


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

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

LLVM IR (-O0):
define i32 @dtaction(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @main to i32 (i32, i8**, ...)*)(i32 %6, i8** %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @dtaction(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @main to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
ret i32 undef
}
/* Variables and functions */
int SEEK_SET;
int scalanative_libc_seek_set() { return SEEK_SET; }


x86 assembly (clang, -O0):
<scalanative_libc_seek_set>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_libc_seek_set>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @scalanative_libc_seek_set() {
%1 = load i32, i32* @SEEK_SET
ret i32 %1
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @scalanative_libc_seek_set() {
%1 = load i32, i32* @SEEK_SET
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, " usage: binread FILE_NAME\n"); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c" usage: binread FILE_NAME\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c" usage: binread FILE_NAME\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ bubble_sort(int *, int);
int /*<<< orphan*/ println(int *, int);
int main() {
  int arr[] = {122, 25, 42, 543, 87, 31, 901, 20, 399};
  int len = sizeof(arr) / sizeof(*arr);
  println(arr, len);
  bubble_sort(arr, len);
  println(arr, len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movl   $0x9,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <println@plt>
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1050 <bubble_sort@plt>
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <println@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef5(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <println@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1040 <bubble_sort@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <println@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [9 x i32] [i32 122, i32 25, i32 42, i32 543, i32 87, i32 31, i32 901, i32 20, i32 399]
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [9 x i32]* %2 to i8*
store i32 9, i32* %3
%5 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @println(i32* %5, i32 %6)
%8 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @bubble_sort(i32* %8, i32 %9)
%11 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%12 = load i32, i32* %3
%13 = call i32 @println(i32* %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [9 x i32] [i32 122, i32 25, i32 42, i32 543, i32 87, i32 31, i32 901, i32 20, i32 399]
define i32 @main() {
%1 = alloca [9 x i32]
%2 = bitcast [9 x i32]* %1 to i8*
%3 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
%4 = call i32 @println(i32* %3, i32 9)
%5 = call i32 @bubble_sort(i32* %3, i32 9)
%6 = call i32 @println(i32* %3, i32 9)
ret i32 0
}
/* Variables and functions */
scalar_t__ curr_g();
scalar_t__ curr_p();
char ring_empty(void) {
  if (curr_p() == curr_g())
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<ring_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <curr_p@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <curr_g@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
jne    1153 <ring_empty+0x33>
movb   $0x1,-0x1(%rbp)
jmp    1157 <ring_empty+0x37>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_empty>:
push   %rbx
xor    %eax,%eax
call   1040 <curr_p@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <curr_g@plt>
cmp    %rax,%rbx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @ring_empty() {
%1 = alloca i8
%2 = call i64 (...) @curr_p()
%3 = call i64 (...) @curr_g()
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %6
5: ; preds = %0
store i8 1, i8* %1
br label %7
6: ; preds = %0
store i8 0, i8* %1
br label %7
7: ; preds = %6, %5
%8 = load i8, i8* %1
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @ring_empty() {
%1 = tail call i64 (...) @curr_p()
%2 = tail call i64 (...) @curr_g()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i8
ret i8 %4
}
double pair_tailcorr_cut_chargetransferslater1s1s(void *pair_data,
                                                  long center_index,
                                                  long other_index,
                                                  double rcut) {
  double t1 = 0;
  return t1;
}


x86 assembly (clang, -O0):
<pair_tailcorr_cut_chargetransferslater1s1s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pair_tailcorr_cut_chargetransferslater1s1s>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pair_tailcorr_cut_chargetransferslater1s1s(i8* %0, i64 %1, i64 %2, double %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca double
%9 = alloca double
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store double %3, double* %8
store double 0.000000e+00, double* %9
%10 = load double, double* %9
ret double %10
}

LLVM IR (-O2):
define double @pair_tailcorr_cut_chargetransferslater1s1s(i8* nocapture readnone %0, i64 %1, i64 %2, double %3) {
ret double 0.000000e+00
}
int mClampI(int value, int min, int max) {
  if (value > max)
    return max;
  if (value < min)
    return min;
  return value;
}


x86 assembly (clang, -O0):
<mClampI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1124 <mClampI+0x24>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <mClampI+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <mClampI+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <mClampI+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mClampI>:
mov    %esi,%eax
cmp    %esi,%edi
cmovge %edi,%eax
cmp    %edx,%edi
cmovg  %edx,%eax
ret

LLVM IR (-O0):
define i32 @mClampI(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %7
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* %7
store i32 %12, i32* %4
br label %21
13: ; preds = %3
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i32, i32* %6
store i32 %18, i32* %4
br label %21
19: ; preds = %13
%20 = load i32, i32* %5
store i32 %20, i32* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @mClampI(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %2
%5 = icmp slt i32 %0, %1
%6 = select i1 %5, i32 %1, i32 %0
%7 = select i1 %4, i32 %2, i32 %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
size_t regerror(int errcode, const regex_t *__restrict__ preg,
                char *__restrict__ errbuf, size_t errbuf_size) {
  (void)preg;
  (void)errcode;
  strncpy(errbuf, "invalid regular expression (sorry)", errbuf_size);
  return strlen(errbuf);
}


x86 assembly (clang, -O0):
<regerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xeba(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regerror>:
push   %rbx
mov    %rdx,%rbx
lea    0xed5(%rip),%rsi
mov    %rdx,%rdi
mov    %rcx,%rdx
call   1030 <strncpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strlen@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"invalid regular expression (sorry)\00"
define i64 @regerror(i32 %0, i32* noalias %1, i8* noalias %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32*, i32** %6
%10 = load i32, i32* %5
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @strncpy(i8* %11, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %12)
%14 = load i8*, i8** %7
%15 = call i64 @strlen(i8* %14)
ret i64 %15
}

LLVM IR (-O2):
@.str = [35 x i8] c"invalid regular expression (sorry)\00"
define i64 @regerror(i32 %0, i32* noalias nocapture readnone %1, i8* noalias %2, i64 %3) {
%5 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %3)
%6 = tail call i64 @strlen(i8* dereferenceable(1) %2)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printPartitionHelper(int *, int /*<<< orphan*/, int, int);
void printPartition(int number) {
  int *summandList = (int *)malloc(number * sizeof(int));
  printPartitionHelper(summandList, 0, number, number);
  free(summandList);
}


x86 assembly (clang, -O0):
<printPartition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
xor    %esi,%esi
call   1050 <printPartitionHelper@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printPartition>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
call   1050 <printPartitionHelper@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @printPartition(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @printPartitionHelper(i32* %4, i32 0, i32 %0, i32 %0)
%6 = tail call i32 @free(i32* %4)
ret void
}
void inf_loop() {
  int i = 0;
  char a[10];
  while (1) {
    if (i >= 10)
      i = 0;
    a[i] = 'a';
    i++;
  }
}


x86 assembly (clang, -O0):
<inf_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     111c <inf_loop+0x1c>
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movb   $0x61,-0xe(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <inf_loop+0xb>

x86 assembly (clang, -O2):
<inf_loop>:
jmp    1100 <inf_loop>

LLVM IR (-O0):
define void @inf_loop() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %0, %7
%4 = load i32, i32* %1
%5 = icmp sge i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %3
store i32 0, i32* %1
br label %7
7: ; preds = %6, %3
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %9
store i8 97, i8* %10
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %3
}

LLVM IR (-O2):
define void @inf_loop() {
br label %1
1: ; preds = %1, %0
br label %1
}
void hash_xor_init() {}


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

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

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

LLVM IR (-O2):
define void @hash_xor_init() {
ret void
}
/* Type definitions */
struct peer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ connect_peer(struct peer *);
void on_connection_timeout(int fd, short ev, void *arg) {
  connect_peer((struct peer *)arg);
}


x86 assembly (clang, -O0):
<on_connection_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <connect_peer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_connection_timeout>:
mov    %rdx,%rdi
jmp    1030 <connect_peer@plt>

LLVM IR (-O0):
%struct.peer = type { i32 }
define void @on_connection_timeout(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = bitcast i8* %7 to %struct.peer*
%9 = call i32 @connect_peer(%struct.peer* %8)
ret void
}

LLVM IR (-O2):
%struct.peer = type { i32 }
define void @on_connection_timeout(i32 %0, i16 signext %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.peer*
%5 = tail call i32 @connect_peer(%struct.peer* %4)
ret void
}
void swap_values(long unsigned *v1, long unsigned *v2) {
  int aux;
  aux = *v1;
  *v1 = *v2;
  *v2 = aux;
}


x86 assembly (clang, -O0):
<swap_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
movslq -0x14(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_values>:
movslq (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap_values(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
store i64 %4, i64* %0
%5 = shl i64 %3, 32
%6 = ashr exact i64 %5, 32
store i64 %6, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
mnem_ret() { ol("RET"); }


x86 assembly (clang, -O0):
<mnem_ret>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"RET\00"
define i32 @mnem_ret() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ round(double);
int /*<<< orphan*/ roundf(float);
int /*<<< orphan*/ roundl(long double);
void uninitvar_round(void) {
  float f;
  (void)roundf(f);
  double d;
  (void)round(d);
  long double ld;
  (void)roundl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1050 <roundf@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <round@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <roundl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_round>:
sub    $0x18,%rsp
call   1050 <roundf@plt>
call   1030 <round@plt>
call   1040 <roundl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_round() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @roundf(float %4)
%6 = load double, double* %2
%7 = call i32 @round(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @roundl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_round() {
%1 = tail call i32 @roundf(float undef)
%2 = tail call i32 @round(double undef)
%3 = tail call i32 @roundl(x86_fp80 undef)
ret void
}
int _absI(int a) { return a < 0 ? -a : a; }


x86 assembly (clang, -O0):
<_absI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <_absI+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <_absI+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_absI>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @_absI(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void escape_error() {
  printf("Shellcode is incorrectly escaped!\n");
  exit(1);
}


x86 assembly (clang, -O0):
<escape_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [35 x i8] c"Shellcode is incorrectly escaped!\0A\00"
define void @escape_error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [34 x i8] c"Shellcode is incorrectly escaped!\00"
define void @escape_error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}