xunge/DecIR huggingface dataset:
int f(int i) { return ((i++) * (i++)); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
imul   %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0x1(%rdi),%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = mul nsw i32 %3, %5
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
ret i32 %3
}
void gdk_window_shape_combine_region() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_shape_combine_region() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("calling init()\n");
  init();
  printf("exiting program\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <init@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"calling init()\0A\00"
@.str.1 = [17 x i8] c"exiting program\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @init()
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"calling init()\00"
@str.2 = [16 x i8] c"exiting program\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @init()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void sigaction_sfpe(int signal, siginfo_t *si, void *arg) {
  printf("inside SIGFPE handler\nexit now.");
  exit(1);
}


x86 assembly (clang, -O0):
<sigaction_sfpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [32 x i8] c"inside SIGFPE handler\0Aexit now.\00"
define void @sigaction_sfpe(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"inside SIGFPE handler\0Aexit now.\00"
define void @sigaction_sfpe(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *malloc(int);
int main(int argc, char **argv) {
  void *p = malloc(16);
  ((char *)p)[15] = 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,0xf(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i8* @malloc(i32 16)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 15
store i8 0, i8* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int strxspn(char const *, char const *, int);
char *strpbrk(const char *s, const char *accept) {
  const char *ss = s + strxspn(s, accept, 1);
  return *ss ? (char *)ss : NULL;
}


x86 assembly (clang, -O0):
<strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <strxspn@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1167 <strpbrk+0x57>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1172 <strpbrk+0x62>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1172 <strpbrk+0x62>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpbrk>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edx
call   1030 <strxspn@plt>
movslq %eax,%rcx
lea    (%rbx,%rcx,1),%rdx
xor    %eax,%eax
cmpb   $0x0,(%rbx,%rcx,1)
cmovne %rdx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strpbrk(i8* %0, i8* %1) {
%3 = tail call i32 @strxspn(i8* %0, i8* %1, i32 1)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i8* null, i8* %5
ret i8* %8
}
int test_imm_32int64_midword_reg(long long val) {
  return ((val >> 16) & (0x32 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_32int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x32,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_32int64_midword_reg>:
test   $0x320000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_32int64_midword_reg(i64 %0) {
%2 = and i64 %0, 3276800
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int fibo1(int);
int main() {
  int x = 10;
  int result = fibo1(x);
  if (result == 55) {
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <fibo1@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x37,-0xc(%rbp)
jne    1152 <main+0x32>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <fibo1@plt>
cmp    $0x37,%eax
jne    1137 <main+0x17>
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibo1(i32 10)
%2 = icmp eq i32 %1, 55
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
char *gsm_node2str(int node) {
  switch (node) {
  case 1:
    return "Network";
  case 2:
    return "CPE";
  default:
    return "Invalid value";
  }
}


x86 assembly (clang, -O0):
<gsm_node2str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     112c <gsm_node2str+0x2c>
jmp    111b <gsm_node2str+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     113c <gsm_node2str+0x3c>
jmp    114c <gsm_node2str+0x4c>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <gsm_node2str+0x57>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <gsm_node2str+0x57>
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsm_node2str>:
cmp    $0x2,%edi
lea    0xefe(%rip),%rax
lea    0xefb(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Network\00"
@.str.1 = [4 x i8] c"CPE\00"
@.str.2 = [14 x i8] c"Invalid value\00"
define i8* @gsm_node2str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 1, label %5
i32 2, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"Network\00"
@.str.1 = [4 x i8] c"CPE\00"
@.str.2 = [14 x i8] c"Invalid value\00"
define i8* @gsm_node2str(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ handle_aux_carry_flag_sub(int const, int const);
int /*<<< orphan*/ handle_carry_flag_sub(int const, int const);
int /*<<< orphan*/ handle_parity_flag(int const);
int /*<<< orphan*/ handle_sign_flag(int const);
int /*<<< orphan*/ handle_zero_flag(int const);
void handle_flags_sub(const int final_value, const int value1,
                      const int value2) {
  handle_zero_flag(final_value);
  handle_sign_flag(final_value);
  handle_carry_flag_sub(value1, value2);
  handle_aux_carry_flag_sub(value1, value2);
  handle_parity_flag(final_value);
}


x86 assembly (clang, -O0):
<handle_flags_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <handle_zero_flag@plt>
mov    -0x4(%rbp),%edi
call   1070 <handle_sign_flag@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <handle_carry_flag_sub@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <handle_aux_carry_flag_sub@plt>
mov    -0x4(%rbp),%edi
call   1060 <handle_parity_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_flags_sub>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1050 <handle_zero_flag@plt>
mov    %ebx,%edi
call   1070 <handle_sign_flag@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <handle_carry_flag_sub@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <handle_aux_carry_flag_sub@plt>
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <handle_parity_flag@plt>

LLVM IR (-O0):
define void @handle_flags_sub(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @handle_zero_flag(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @handle_sign_flag(i32 %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @handle_carry_flag_sub(i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @handle_aux_carry_flag_sub(i32 %14, i32 %15)
%17 = load i32, i32* %4
%18 = call i32 @handle_parity_flag(i32 %17)
ret void
}

LLVM IR (-O2):
define void @handle_flags_sub(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @handle_zero_flag(i32 %0)
%5 = tail call i32 @handle_sign_flag(i32 %0)
%6 = tail call i32 @handle_carry_flag_sub(i32 %1, i32 %2)
%7 = tail call i32 @handle_aux_carry_flag_sub(i32 %1, i32 %2)
%8 = tail call i32 @handle_parity_flag(i32 %0)
ret void
}
/* Variables and functions */
double log(double);
double Ln(double a, double b) { return log(a); }


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

x86 assembly (clang, -O2):
<Ln>:
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @Ln(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @log(double %5)
ret double %6
}

LLVM IR (-O2):
define double @Ln(double %0, double %1) {
%3 = tail call double @log(double %0)
ret double %3
}
int null_code_decode(void *code_desc, char **data, char **parity,
                     int *missing_idxs, int blocksize, int decode_parity) {
  return 0;
}


x86 assembly (clang, -O0):
<null_code_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @null_code_decode(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2, i32* nocapture readnone %3, i32 %4, i32 %5) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ run_xor(int, int);
void test_xor() {
  run_xor(0, 1);
  run_xor(100, 34);
}


x86 assembly (clang, -O0):
<test_xor>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <run_xor@plt>
mov    $0x64,%edi
mov    $0x22,%esi
call   1030 <run_xor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_xor>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <run_xor@plt>
mov    $0x64,%edi
mov    $0x22,%esi
pop    %rax
jmp    1030 <run_xor@plt>

LLVM IR (-O0):
define void @test_xor() {
%1 = call i32 @run_xor(i32 0, i32 1)
%2 = call i32 @run_xor(i32 100, i32 34)
ret void
}

LLVM IR (-O2):
define void @test_xor() {
%1 = tail call i32 @run_xor(i32 0, i32 1)
%2 = tail call i32 @run_xor(i32 100, i32 34)
ret void
}
/* Variables and functions */
int FD_CLOEXEC;
int /*<<< orphan*/ F_GETFD;
int /*<<< orphan*/ F_SETFD;
int fcntl(int, int /*<<< orphan*/, ...);
void fd_set_cloexec(int fd) {
  int flags;
  flags = fcntl(fd, F_GETFD);
  flags |= FD_CLOEXEC;
  fcntl(fd, F_SETFD, flags);
}


x86 assembly (clang, -O0):
<fd_set_cloexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_set_cloexec>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
or     (%rcx),%eax
mov    0x2ead(%rip),%rcx
mov    (%rcx),%esi
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFD = global i32 0
@FD_CLOEXEC = global i32 0
@F_SETFD = global i32 0
define void @fd_set_cloexec(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFD
%6 = call i32 (i32, i32, ...) @fcntl(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @FD_CLOEXEC
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* @F_SETFD
%12 = load i32, i32* %3
%13 = call i32 (i32, i32, ...) @fcntl(i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@F_GETFD = global i32 0
@FD_CLOEXEC = global i32 0
@F_SETFD = global i32 0
define void @fd_set_cloexec(i32 %0) {
%2 = load i32, i32* @F_GETFD
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = load i32, i32* @FD_CLOEXEC
%5 = or i32 %4, %3
%6 = load i32, i32* @F_SETFD
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %5)
ret void
}
/* Variables and functions */
long double modf(double, double *);
long double modfl(long double x, long double *y) {
  return modf((double)x, (double *)y);
}


x86 assembly (clang, -O0):
<modfl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1030 <modf@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modfl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <modf@plt>

LLVM IR (-O0):
define x86_fp80 @modfl(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80*, x86_fp80** %4
%8 = bitcast x86_fp80* %7 to double*
%9 = call x86_fp80 @modf(double %6, double* %8)
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @modfl(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = bitcast x86_fp80* %1 to double*
%5 = tail call x86_fp80 @modf(double %3, double* %4)
ret x86_fp80 %5
}
__attribute__((visibility("default"))) void empty_1arg(void) {}


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

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

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

LLVM IR (-O2):
define void @empty_1arg() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_seed();
int /*<<< orphan*/ fbuffered(int /*<<< orphan*/, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ startPacAttack();
int /*<<< orphan*/ stdout;
int main() {
  check_seed();
  fbuffered(stdout, 1);
  startPacAttack();
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <check_seed@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1050 <fbuffered@plt>
mov    $0x0,%al
call   1030 <startPacAttack@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <check_seed@plt>
mov    0x2e91(%rip),%rbx
mov    (%rbx),%edi
mov    $0x1,%esi
call   1050 <fbuffered@plt>
xor    %eax,%eax
call   1030 <startPacAttack@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @check_seed()
%3 = load i32, i32* @stdout
%4 = call i32 @fbuffered(i32 %3, i32 1)
%5 = call i32 (...) @startPacAttack()
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @check_seed()
%2 = load i32, i32* @stdout
%3 = tail call i32 @fbuffered(i32 %2, i32 1)
%4 = tail call i32 (...) @startPacAttack()
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ restore_malloc_hooks();
void __bound_exit(void) { restore_malloc_hooks(); }


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

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

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

LLVM IR (-O2):
define void @__bound_exit() {
%1 = tail call i32 (...) @restore_malloc_hooks()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copyptrs(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  copyptrs(0, 0, 0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <copyptrs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <copyptrs@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @copyptrs(i32 0, i32 0, i32 0, i32 0)
ret i32 0
}
void MUTEX_LOCK_WL_SCAN_SET_INIT(void) {}


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

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

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

LLVM IR (-O2):
define void @MUTEX_LOCK_WL_SCAN_SET_INIT() {
ret void
}
void _M2_UnixArgs_finish(int argc, char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_UnixArgs_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cginocache_msie() {
  printf("Cache-Control: private\n");
  printf("Pragma: private\n");
}


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

x86 assembly (clang, -O2):
<cginocache_msie>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Cache-Control: private\0A\00"
@.str.1 = [17 x i8] c"Pragma: private\0A\00"
define void @cginocache_msie() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"Cache-Control: private\00"
@str.2 = [16 x i8] c"Pragma: private\00"
define void @cginocache_msie() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t fnv_64a_buf(void *buf, size_t len, uint64_t hval) {
  unsigned char *bp = (unsigned char *)buf;
  unsigned char *be = bp + len;
  while (bp < be) {
    hval ^= (uint64_t)*bp++;
    hval += (hval << 1) + (hval << 4) + (hval << 5) + (hval << 7) +
            (hval << 8) + (hval << 40);
  }
  return hval;
}


x86 assembly (clang, -O0):
<fnv_64a_buf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1188 <fnv_64a_buf+0x88>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movzbl (%rax),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    -0x14(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x7,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <fnv_64a_buf+0x23>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnv_64a_buf>:
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @fnv_64a_buf(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i64, i64* %5
%12 = getelementptr inbounds i8, i8* %10, i64 %11
store i8* %12, i8** %8
br label %13
13: ; preds = %17, %3
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = icmp ult i8* %14, %15
br i1 %16, label %17, label %43
17: ; preds = %13
%18 = load i8*, i8** %7
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %7
%20 = load i8, i8* %18
%21 = zext i8 %20 to i32
%22 = load i32, i32* %6
%23 = xor i32 %22, %21
store i32 %23, i32* %6
%24 = load i32, i32* %6
%25 = shl i32 %24, 1
%26 = load i32, i32* %6
%27 = shl i32 %26, 4
%28 = add nsw i32 %25, %27
%29 = load i32, i32* %6
%30 = shl i32 %29, 5
%31 = add nsw i32 %28, %30
%32 = load i32, i32* %6
%33 = shl i32 %32, 7
%34 = add nsw i32 %31, %33
%35 = load i32, i32* %6
%36 = shl i32 %35, 8
%37 = add nsw i32 %34, %36
%38 = load i32, i32* %6
%39 = shl i32 %38, 40
%40 = add nsw i32 %37, %39
%41 = load i32, i32* %6
%42 = add nsw i32 %41, %40
store i32 %42, i32* %6
br label %13
43: ; preds = %13
%44 = load i32, i32* %6
ret i32 %44
}

LLVM IR (-O2):
define i32 @fnv_64a_buf(i8* readnone %0, i64 %1, i32 returned %2) {
ret i32 %2
}
void AtomicAssertOnCompileInt(void) {
  enum {
    AssertOnCompileMisused =
        8 * sizeof(int) == 32 && 8 * sizeof(int) == 32 && 8 * sizeof(int) == 32
            ? 1
            : -1
  };
  __attribute__((
      unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused];
}


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

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

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

LLVM IR (-O2):
define void @AtomicAssertOnCompileInt() {
ret void
}
int execute_ptrace() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_ptrace() {
ret i32 0
}
/* Variables and functions */
double fabs(double);
double ECfabs(double x) { return (fabs(x)); }


x86 assembly (clang, -O0):
<ECfabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECfabs>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ECfabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fabs.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @ECfabs(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x4d() {
  Assert_real((isodigit(77) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              390, ("isodigit should be 0 for M"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x4d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4d,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x186,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x4d>:
push   %rax
mov    $0x4d,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x186,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for M\00"
define void @t_isodigit_0x4d() {
%1 = call i64 @isodigit(i32 77)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 390, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for M\00"
define void @t_isodigit_0x4d() {
%1 = tail call i64 @isodigit(i32 77)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 390, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isrune(c)
int c;
{ return (__istype(c, 0xFFFFFF00L)); }


x86 assembly (clang, -O0):
<isrune>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xffffff00,%esi
mov    $0x0,%al
call   1030 <__istype@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isrune>:
mov    $0xffffff00,%esi
xor    %eax,%eax
jmp    1030 <__istype@plt>

LLVM IR (-O0):
define i32 @isrune(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i64, ...) bitcast (i32 (...)* @__istype to i32 (i32, i64, ...)*)(i32 %3, i64 4294967040)
ret i32 %4
}

LLVM IR (-O2):
define i32 @isrune(i32 %0) {
%2 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @__istype to i32 (i32, i64, ...)*)(i32 %0, i64 4294967040)
ret i32 %2
}
int send_ids_info(int fd) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @send_ids_info(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ mat3f_rotateEuler_new(float *, float, float, float,
                                         char const *);
int /*<<< orphan*/ mat4f_from_mat3f(float *, float *);
void mat4f_rotateEuler_new(float result[16], float a1_degrees, float a2_degrees,
                           float a3_degrees, const char order[3]) {
  float tmpMat[9];
  mat3f_rotateEuler_new(tmpMat, a1_degrees, a2_degrees, a3_degrees, order);
  mat4f_from_mat3f(result, tmpMat);
}


x86 assembly (clang, -O0):
<mat4f_rotateEuler_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
lea    -0x50(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
mov    -0x20(%rbp),%rsi
call   1030 <mat3f_rotateEuler_new@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <mat4f_from_mat3f@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4f_rotateEuler_new>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <mat3f_rotateEuler_new@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <mat4f_from_mat3f@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mat4f_rotateEuler_new(float* %0, float %1, float %2, float %3, i8* %4) {
%6 = alloca float*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca i8*
%11 = alloca [9 x float]
store float* %0, float** %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store i8* %4, i8** %10
%12 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 0
%13 = load float, float* %7
%14 = load float, float* %8
%15 = load float, float* %9
%16 = load i8*, i8** %10
%17 = call i32 @mat3f_rotateEuler_new(float* %12, float %13, float %14, float %15, i8* %16)
%18 = load float*, float** %6
%19 = getelementptr inbounds [9 x float], [9 x float]* %11, i64 0, i64 0
%20 = call i32 @mat4f_from_mat3f(float* %18, float* %19)
ret void
}

LLVM IR (-O2):
define void @mat4f_rotateEuler_new(float* %0, float %1, float %2, float %3, i8* %4) {
%6 = alloca [9 x float]
%7 = bitcast [9 x float]* %6 to i8*
%8 = getelementptr inbounds [9 x float], [9 x float]* %6, i64 0, i64 0
%9 = call i32 @mat3f_rotateEuler_new(float* %8, float %1, float %2, float %3, i8* %4)
%10 = call i32 @mat4f_from_mat3f(float* %0, float* %8)
ret void
}
unsigned xrop3_140_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D | stk3;
  stk1 = S & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_140_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_140_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_140_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_140_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *malloc(int);
int /*<<< orphan*/ putchar(char);
int main(int argc, const char *argv[]) {
  char *p;
  int i;
  int n = argc * (argc + 1);
  if (n <= 0 || n > 4096)
    n = 4096;
  p = malloc(n);
  if (!p) {
    exit(1);
  }
  for (i = 0; i <= n; i++) {
    putchar(p[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    116c <main+0x3c>
cmpl   $0x1000,-0x20(%rbp)
jle    1173 <main+0x43>
movl   $0x1000,-0x20(%rbp)
mov    -0x20(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1194 <main+0x64>
mov    $0x1,%edi
call   1050 <exit@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     11c6 <main+0x96>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    119b <main+0x6b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
%12 = mul nsw i32 %9, %11
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp sle i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %2
%16 = load i32, i32* %8
%17 = icmp sgt i32 %16, 4096
br i1 %17, label %18, label %19
18: ; preds = %15, %2
store i32 4096, i32* %8
br label %19
19: ; preds = %18, %15
%20 = load i32, i32* %8
%21 = call i8* @malloc(i32 %20)
store i8* %21, i8** %6
%22 = load i8*, i8** %6
%23 = icmp ne i8* %22, null
br i1 %23, label %26, label %24
24: ; preds = %19
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %19
store i32 0, i32* %7
br label %27
27: ; preds = %38, %26
%28 = load i32, i32* %7
%29 = load i32, i32* %8
%30 = icmp sle i32 %28, %29
br i1 %30, label %31, label %41
31: ; preds = %27
%32 = load i8*, i8** %6
%33 = load i32, i32* %7
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
%36 = load i8, i8* %35
%37 = call i32 @putchar(i8 signext %36)
br label %38
38: ; preds = %31
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %27
41: ; preds = %27
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ CreateWin39(unsigned long, unsigned long, unsigned long,
                               unsigned long, unsigned long);
void createwin(unsigned long w, unsigned long h, unsigned long cfg,
               unsigned long cbg, unsigned long style) {
  CreateWin39(w, h, cfg, cbg, style);
}


x86 assembly (clang, -O0):
<createwin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <CreateWin39@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createwin>:
jmp    1030 <CreateWin39@plt>

LLVM IR (-O0):
define void @createwin(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i64, i64* %10
%16 = call i32 @CreateWin39(i64 %11, i64 %12, i64 %13, i64 %14, i64 %15)
ret void
}

LLVM IR (-O2):
define void @createwin(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i32 @CreateWin39(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4)
ret void
}
int test_imm_C4uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xC4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C4uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xc4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C4uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12845056
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintMessage1() { printf("This is the message 1!\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"This is the message 1!\0A\00"
define void @PrintMessage1() {
%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"This is the message 1!\00"
define void @PrintMessage1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct data {
  int dummy;
};
struct channel {
  int dummy;
};

/* Variables and functions */
void on_data(struct channel *ch, struct data *app_data, size_t len,
             const void *data) {}


x86 assembly (clang, -O0):
<on_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.channel = type { i32 }
%struct.data = type { i32 }
define void @on_data(%struct.channel* nocapture %0, %struct.data* nocapture %1, i64 %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ while_upto20_bad(unsigned int);
void call_while_upto20_unsigned_good(unsigned x) { while_upto20_bad(x); }


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

x86 assembly (clang, -O2):
<call_while_upto20_unsigned_good>:
jmp    1030 <while_upto20_bad@plt>

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

LLVM IR (-O2):
define void @call_while_upto20_unsigned_good(i32 %0) {
%2 = tail call i32 @while_upto20_bad(i32 %0)
ret void
}
void g_io_channel_get_flags() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_get_flags() {
ret void
}
/* Variables and functions */
int geraNumeroMax(int);
int geraNumeroRandom();
int primalidade(int);
int geraPrimo() {
  int primo;
  primo = geraNumeroRandom();
  while (primalidade(primo) != 1) {
    primo = geraNumeroMax(50);
  }
  return primo;
}


x86 assembly (clang, -O0):
<geraPrimo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <geraNumeroRandom@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <primalidade@plt>
cmp    $0x1,%eax
je     1165 <geraPrimo+0x35>
mov    $0x32,%edi
call   1040 <geraNumeroMax@plt>
mov    %eax,-0x4(%rbp)
jmp    1142 <geraPrimo+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraPrimo>:
push   %rbx
xor    %eax,%eax
call   1030 <geraNumeroRandom@plt>
nopl   0x0(%rax,%rax,1)
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <primalidade@plt>
cmp    $0x1,%eax
je     115a <geraPrimo+0x2a>
mov    $0x32,%edi
call   1040 <geraNumeroMax@plt>
jmp    1140 <geraPrimo+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @geraPrimo() {
%1 = tail call i32 (...) @geraNumeroRandom()
%2 = tail call i32 @primalidade(i32 %1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %0, %4
%5 = tail call i32 @geraNumeroMax(i32 50)
%6 = tail call i32 @primalidade(i32 %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %4
8: ; preds = %4, %0
%9 = phi i32 [ %1, %0 ], [ %5, %4 ]
ret i32 %9
}