xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x1e() {
  Assert_real((isprint(30) == 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_isprint.c",
              155, ("isprint should be 0 for 0x1e"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x1e>:
push   %rax
mov    $0x1e,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x9b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x1e\00"
define void @t_isprint_0x1e() {
%1 = call i64 @isprint(i32 30)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 155, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x1e\00"
define void @t_isprint_0x1e() {
%1 = tail call i64 @isprint(i32 30)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 155, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ frame_set_pinword(void *, int /*<<< orphan*/);
int /*<<< orphan*/ mirror_2bytes(int);
void frame_set_cpuword(void *bits, int v) {
  frame_set_pinword(bits, mirror_2bytes(v));
}


x86 assembly (clang, -O0):
<frame_set_cpuword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <mirror_2bytes@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <frame_set_pinword@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frame_set_cpuword>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <mirror_2bytes@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <frame_set_pinword@plt>

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

LLVM IR (-O2):
define void @frame_set_cpuword(i8* %0, i32 %1) {
%3 = tail call i32 @mirror_2bytes(i32 %1)
%4 = tail call i32 @frame_set_pinword(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int FALSE;
bool PDC_get_ctrl_break(void) { return FALSE; }


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

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

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

LLVM IR (-O2):
@FALSE = global i32 0
define i32 @PDC_get_ctrl_break() {
%1 = load i32, i32* @FALSE
ret i32 %1
}
/* Variables and functions */
double sin(double);
double f(double x, void *data) { return sin(x); }


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @f(double %0, i8* nocapture readnone %1) {
%3 = tail call double @sin(double %0)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by(int /*<<< orphan*/);
void and_by(uint32_t x) {
  by(x);
  and();
}


x86 assembly (clang, -O0):
<and_by>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <by@plt>
mov    $0x0,%al
call   1040 <and@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @and_by(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by(i32 %3)
%5 = call i32 (...) @and()
ret void
}

LLVM IR (-O2):
define void @and_by(i32 %0) {
%2 = tail call i32 @by(i32 %0)
%3 = tail call i32 (...) @and()
ret void
}
/* Type definitions */
struct fontcolor {
  int dummy;
};
struct font {
  int dummy;
};
typedef int /*<<< orphan*/ Drawable;

/* Variables and functions */
int /*<<< orphan*/ ftdrawstring(int /*<<< orphan*/, struct font *,
                                struct fontcolor *, int, int, char const *);
void ftdrawstring_utf8(Drawable d, struct font *f, struct fontcolor *c, int x,
                       int y, const char *s) {
  ftdrawstring(d, f, c, x, y, s);
}


x86 assembly (clang, -O0):
<ftdrawstring_utf8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
call   1030 <ftdrawstring@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftdrawstring_utf8>:
jmp    1030 <ftdrawstring@plt>

LLVM IR (-O0):
%struct.font = type { i32 }
%struct.fontcolor = type { i32 }
define void @ftdrawstring_utf8(i32 %0, %struct.font* %1, %struct.fontcolor* %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca i32
%8 = alloca %struct.font*
%9 = alloca %struct.fontcolor*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
store i32 %0, i32* %7
store %struct.font* %1, %struct.font** %8
store %struct.fontcolor* %2, %struct.fontcolor** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%13 = load i32, i32* %7
%14 = load %struct.font*, %struct.font** %8
%15 = load %struct.fontcolor*, %struct.fontcolor** %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i8*, i8** %12
%19 = call i32 @ftdrawstring(i32 %13, %struct.font* %14, %struct.fontcolor* %15, i32 %16, i32 %17, i8* %18)
ret void
}

LLVM IR (-O2):
%struct.font = type { i32 }
%struct.fontcolor = type { i32 }
define void @ftdrawstring_utf8(i32 %0, %struct.font* %1, %struct.fontcolor* %2, i32 %3, i32 %4, i8* %5) {
%7 = tail call i32 @ftdrawstring(i32 %0, %struct.font* %1, %struct.fontcolor* %2, i32 %3, i32 %4, i8* %5)
ret void
}
/* Variables and functions */
int strlen(char *);
int verificaCidade(char *cidade) {
  int tamCidade = strlen(cidade);
  if (cidade == NULL || tamCidade == 0 || tamCidade >= 80)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<verificaCidade>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <verificaCidade+0x37>
cmpl   $0x0,-0x14(%rbp)
je     1147 <verificaCidade+0x37>
cmpl   $0x50,-0x14(%rbp)
jl     1153 <verificaCidade+0x43>
movl   $0x0,-0x4(%rbp)
jmp    115a <verificaCidade+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verificaCidade>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rbx,%rbx
setne  %cl
test   %eax,%eax
setne  %dl
and    %cl,%dl
cmp    $0x50,%eax
setl   %al
and    %dl,%al
movzbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @verificaCidade(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %4
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %15, label %9
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 80
br i1 %14, label %15, label %16
15: ; preds = %12, %9, %1
store i32 0, i32* %2
br label %17
16: ; preds = %12
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @verificaCidade(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp ne i8* %0, null
%4 = icmp ne i32 %2, 0
%5 = select i1 %3, i1 %4, i1 false
%6 = icmp slt i32 %2, 80
%7 = select i1 %5, i1 %6, i1 false
%8 = zext i1 %7 to i32
ret i32 %8
}
unsigned geom_imin3f(const float v[3]) {
  unsigned i = 0;
  if (v[1] < v[i]) {
    i = 1;
  }
  if (v[2] < v[i]) {
    i = 2;
  }
  return i;
}


x86 assembly (clang, -O0):
<geom_imin3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
ucomiss %xmm1,%xmm0
jbe    1134 <geom_imin3f+0x34>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
ucomiss %xmm1,%xmm0
jbe    1159 <geom_imin3f+0x59>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_imin3f>:
movss  (%rdi),%xmm0
xor    %ecx,%ecx
ucomiss 0x4(%rdi),%xmm0
seta   %cl
movss  (%rdi,%rcx,4),%xmm0
ucomiss 0x8(%rdi),%xmm0
mov    $0x2,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @geom_imin3f(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
%4 = load float*, float** %2
%5 = getelementptr inbounds float, float* %4, i64 1
%6 = load float, float* %5
%7 = load float*, float** %2
%8 = load i32, i32* %3
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds float, float* %7, i64 %9
%11 = load float, float* %10
%12 = fcmp olt float %6, %11
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 1, i32* %3
br label %14
14: ; preds = %13, %1
%15 = load float*, float** %2
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %2
%19 = load i32, i32* %3
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
%22 = load float, float* %21
%23 = fcmp olt float %17, %22
br i1 %23, label %24, label %25
24: ; preds = %14
store i32 2, i32* %3
br label %25
25: ; preds = %24, %14
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @geom_imin3f(float* nocapture %0) {
%2 = getelementptr inbounds float, float* %0, i64 1
%3 = load float, float* %2
%4 = load float, float* %0
%5 = fcmp olt float %3, %4
%6 = zext i1 %5 to i32
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = zext i1 %5 to i64
%10 = getelementptr inbounds float, float* %0, i64 %9
%11 = load float, float* %10
%12 = fcmp olt float %8, %11
%13 = select i1 %12, i32 2, i32 %6
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int);
void _xassert(const char *file, int lineno) {
  printf("Assertion failed: file %s, line %d.\n", file, lineno);
}


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

x86 assembly (clang, -O2):
<_xassert>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Assertion failed: file %s, line %d.\0A\00"
define void @_xassert(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Assertion failed: file %s, line %d.\0A\00"
define void @_xassert(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
int sign(int x) {
  if (x > 0)
    return 1;
  else if (x < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111d <sign+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    113f <sign+0x3f>
cmpl   $0x0,-0x8(%rbp)
jge    1133 <sign+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    113f <sign+0x3f>
jmp    1138 <sign+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
mov    %edi,%ecx
sar    $0x1f,%ecx
test   %edi,%edi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @sign(i32 %0) {
%2 = ashr i32 %0, 31
%3 = icmp slt i32 %0, 1
%4 = select i1 %3, i32 %2, i32 1
ret i32 %4
}
int cal2(double a) {
  double b = 3.2;
  double c = 2.2;
  if ((a + b) != c)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<cal2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xef7(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1143 <cal2+0x43>
jp     1143 <cal2+0x43>
jmp    114f <cal2+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1156 <cal2+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cal2>:
addsd  0xef8(%rip),%xmm0
cmpeqsd 0xef7(%rip),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cal2(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double 3.200000e+00, double* %4
store double 2.200000e+00, double* %5
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
%9 = load double, double* %5
%10 = fcmp une double %8, %9
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %13
12: ; preds = %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @cal2(double %0) {
%2 = fadd double %0, 3.200000e+00
%3 = fcmp oeq double %2, 2.200000e+00
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ sink(void *);
int /*<<< orphan*/ strcpy(void *, char *);
void malloc_int_strcpy(int n) {
  void *p = malloc(7 < n ? 7 : n);
  strcpy(p, "0123456");
  sink(p);
  strcpy(p, "012345");
  sink(p);
}


x86 assembly (clang, -O0):
<malloc_int_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x7,%eax
cmp    -0x4(%rbp),%eax
jge    1156 <malloc_int_strcpy+0x26>
mov    $0x7,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <malloc_int_strcpy+0x2c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1040 <sink@plt>
mov    -0x10(%rbp),%rdi
lea    0xe7c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1040 <sink@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_int_strcpy>:
push   %rbx
cmp    $0x7,%edi
mov    $0x7,%eax
cmovge %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xeb5(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <sink@plt>
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <sink@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"0123456\00"
@.str.1 = [7 x i8] c"012345\00"
define void @malloc_int_strcpy(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 7, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %9
9: ; preds = %7, %6
%10 = phi i32 [ 7, %6 ], [ %8, %7 ]
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %3
%15 = call i32 @sink(i8* %14)
%16 = load i8*, i8** %3
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%18 = load i8*, i8** %3
%19 = call i32 @sink(i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"0123456\00"
@.str.1 = [7 x i8] c"012345\00"
define void @malloc_int_strcpy(i32 %0) {
%2 = icmp slt i32 %0, 7
%3 = select i1 %2, i32 %0, i32 7
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @sink(i8* %4)
%7 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @sink(i8* %4)
ret void
}
void foo419(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo419(i32 %0) {
ret void
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quat_multiply(float *, float *, float *);
__attribute__((always_)) struct quat *
psquat_multiply(struct quat *result, struct quat *a, struct quat *b) {
  quat_multiply((float *)result, (float *)a, (float *)b);
  return result;
}


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

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

LLVM IR (-O0):
%struct.quat = type { i32 }
define %struct.quat* @psquat_multiply(%struct.quat* %0, %struct.quat* %1, %struct.quat* %2) {
%4 = alloca %struct.quat*
%5 = alloca %struct.quat*
%6 = alloca %struct.quat*
store %struct.quat* %0, %struct.quat** %4
store %struct.quat* %1, %struct.quat** %5
store %struct.quat* %2, %struct.quat** %6
%7 = load %struct.quat*, %struct.quat** %4
%8 = bitcast %struct.quat* %7 to float*
%9 = load %struct.quat*, %struct.quat** %5
%10 = bitcast %struct.quat* %9 to float*
%11 = load %struct.quat*, %struct.quat** %6
%12 = bitcast %struct.quat* %11 to float*
%13 = call i32 @quat_multiply(float* %8, float* %10, float* %12)
%14 = load %struct.quat*, %struct.quat** %4
ret %struct.quat* %14
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define %struct.quat* @psquat_multiply(%struct.quat* returned %0, %struct.quat* %1, %struct.quat* %2) {
%4 = bitcast %struct.quat* %0 to float*
%5 = bitcast %struct.quat* %1 to float*
%6 = bitcast %struct.quat* %2 to float*
%7 = tail call i32 @quat_multiply(float* %4, float* %5, float* %6)
ret %struct.quat* %0
}
/* Variables and functions */
int sms_decode();
int main() { return sms_decode(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sms_decode()
ret i32 %1
}
void foo121() {}


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

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

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

LLVM IR (-O2):
define void @foo121() {
ret void
}
/* Variables and functions */
int random();
int pickrandom(int *numbreak, int clausesize, int tofix) {
  return (random() % clausesize);
}


x86 assembly (clang, -O0):
<pickrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pickrandom>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pickrandom(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 = call i32 (...) @random()
%8 = load i32, i32* %5
%9 = srem i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @pickrandom(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @random()
%5 = srem i32 %4, %1
ret i32 %5
}
/* Variables and functions */
scalar_t__ getpid();
int getProcessId(void) { return (int)getpid(); }


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

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

LLVM IR (-O0):
define i32 @getProcessId() {
%1 = call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @getProcessId() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
ret i32 %2
}
void RTCircBufAcquireWriteBlock(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCircBufAcquireWriteBlock() {
ret void
}
/* Variables and functions */
size_t hp_right(size_t i) { return 2 * i + 2; }


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

x86 assembly (clang, -O2):
<hp_right>:
lea    (%rdi,%rdi,1),%rax
add    $0x2,%rax
ret

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

LLVM IR (-O2):
define i64 @hp_right(i64 %0) {
%2 = shl i64 %0, 1
%3 = add i64 %2, 2
ret i64 %3
}
/* Variables and functions */
int chdir(char const *);
int fs_chdir(const char *path) { return chdir(path); }


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

x86 assembly (clang, -O2):
<fs_chdir>:
jmp    1030 <chdir@plt>

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

LLVM IR (-O2):
define i32 @fs_chdir(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
ret i32 %2
}
/* Type definitions */
struct cbor_buf {
  int dummy;
};

/* Variables and functions */
int cbor_buf_append_byte(struct cbor_buf *, int);
bool cbor_add_null(struct cbor_buf *buf) {
  return cbor_buf_append_byte(buf, 0xf6);
}


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

x86 assembly (clang, -O2):
<cbor_add_null>:
mov    $0xf6,%esi
jmp    1030 <cbor_buf_append_byte@plt>

LLVM IR (-O0):
%struct.cbor_buf = type { i32 }
define i32 @cbor_add_null(%struct.cbor_buf* %0) {
%2 = alloca %struct.cbor_buf*
store %struct.cbor_buf* %0, %struct.cbor_buf** %2
%3 = load %struct.cbor_buf*, %struct.cbor_buf** %2
%4 = call i32 @cbor_buf_append_byte(%struct.cbor_buf* %3, i32 246)
ret i32 %4
}

LLVM IR (-O2):
%struct.cbor_buf = type { i32 }
define i32 @cbor_add_null(%struct.cbor_buf* %0) {
%2 = tail call i32 @cbor_buf_append_byte(%struct.cbor_buf* %0, i32 246)
ret i32 %2
}
void discard(x) int x __attribute__((__unused__));
{}


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

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

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

LLVM IR (-O2):
define void @discard(i32 %0) {
ret void
}
/* Type definitions */
struct cx {
  int dummy;
};
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ cx_install(struct cx *);
int read(int, char *, int);
void writer_can_read(int fd, short event, void *ptr) {
  char buffer[1024];
  struct cx *c = ptr;
  int r;
  (void)event;
  r = read(fd, buffer, sizeof(buffer));
  (void)r;
  cx_install(c);
}


x86 assembly (clang, -O0):
<writer_can_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1030 <read@plt>
mov    %eax,-0x41c(%rbp)
mov    -0x418(%rbp),%rdi
call   1040 <cx_install@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writer_can_read>:
push   %rbx
sub    $0x400,%rsp
mov    %rdx,%rbx
mov    %rsp,%rsi
mov    $0x400,%edx
call   1030 <read@plt>
mov    %rbx,%rdi
add    $0x400,%rsp
pop    %rbx
jmp    1040 <cx_install@plt>

LLVM IR (-O0):
%struct.cx = type { i32 }
define void @writer_can_read(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
%7 = alloca [1024 x i8]
%8 = alloca %struct.cx*
%9 = alloca i32
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to %struct.cx*
store %struct.cx* %11, %struct.cx** %8
%12 = load i16, i16* %5
%13 = load i32, i32* %4
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%15 = call i32 @read(i32 %13, i8* %14, i32 1024)
store i32 %15, i32* %9
%16 = load i32, i32* %9
%17 = load %struct.cx*, %struct.cx** %8
%18 = call i32 @cx_install(%struct.cx* %17)
ret void
}

LLVM IR (-O2):
%struct.cx = type { i32 }
define void @writer_can_read(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = bitcast i8* %2 to %struct.cx*
%7 = call i32 @read(i32 %0, i8* %5, i32 1024)
%8 = tail call i32 @cx_install(%struct.cx* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void pictdump_usage(FILE *fp) {
  fputs("usage: unrez pictdump [<options>] <file>\n", fp);
}


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

x86 assembly (clang, -O2):
<pictdump_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x29,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"usage: unrez pictdump [<options>] <file>\0A\00"
define void @pictdump_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"usage: unrez pictdump [<options>] <file>\0A\00"
define void @pictdump_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 41, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void crash_ferror() {
  FILE *f;
  f = fopen("this_file_doesnt_exist", "r");
  ferror(f);
  fclose(f);
}


x86 assembly (clang, -O0):
<crash_ferror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ferror@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash_ferror>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <ferror@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
define void @crash_ferror() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @ferror(i32* %3)
%5 = load i32*, i32** %1
%6 = call i32 @fclose(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
define void @crash_ferror() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @ferror(i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) __m512i add_512(__m512i a, __m512i b) {
  return _mm512_add_epi32(a, b);
}


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

x86 assembly (clang, -O2):
<add_512>:
jmp    1030 <_mm512_add_epi32@plt>

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

LLVM IR (-O2):
define i32 @add_512(i32 %0, i32 %1) {
%3 = tail call i32 @_mm512_add_epi32(i32 %0, i32 %1)
ret i32 %3
}
int Cyc_Absyn_is_var_type(void *t) {
  void *_tmp365 = t;
  switch (*((int *)_tmp365)) {
  case 2U:
  _LL1:
  _LL2:
    goto _LL4;
  case 1U:
  _LL3:
  _LL4:
    return 1;
  default:
  _LL5:
  _LL6:
    return 0;
  }
_LL0:;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_is_var_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x1,%eax
je     1147 <Cyc_Absyn_is_var_type+0x47>
jmp    1127 <Cyc_Absyn_is_var_type+0x27>
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
jne    115d <Cyc_Absyn_is_var_type+0x5d>
jmp    1138 <Cyc_Absyn_is_var_type+0x38>
jmp    113d <Cyc_Absyn_is_var_type+0x3d>
jmp    1142 <Cyc_Absyn_is_var_type+0x42>
jmp    1151 <Cyc_Absyn_is_var_type+0x51>
jmp    114c <Cyc_Absyn_is_var_type+0x4c>
jmp    1151 <Cyc_Absyn_is_var_type+0x51>
movl   $0x1,-0x4(%rbp)
jmp    116e <Cyc_Absyn_is_var_type+0x6e>
jmp    1162 <Cyc_Absyn_is_var_type+0x62>
jmp    1167 <Cyc_Absyn_is_var_type+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_is_var_type>:
mov    (%rdi),%ecx
add    $0xffffffff,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @Cyc_Absyn_is_var_type(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
switch i32 %8, label %15 [
i32 2, label %9
i32 1, label %12
]
9: ; preds = %1
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
br label %14
12: ; preds = %1
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13, %11
store i32 1, i32* %2
br label %19
15: ; preds = %1
br label %16
16: ; preds = %15
br label %17
17: ; preds = %16
store i32 0, i32* %2
br label %19
18: ; No predecessors!
br label %19
19: ; preds = %18, %17, %14
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @Cyc_Absyn_is_var_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = add i32 %3, -1
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}
void INT_Excep_PERIB_INTB159(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB159() {
ret void
}
float ascending_order(float a, float b) { return a - b; }


x86 assembly (clang, -O0):
<ascending_order>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascending_order>:
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ascending_order(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fsub float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @ascending_order(float %0, float %1) {
%3 = fsub float %0, %1
ret float %3
}
void x86_64_cmos_write(unsigned char addr, unsigned int value) {
  x86_64_outb(0x70, addr);
  asm volatile("jmp 1f; 1: jmp 1f;1:");
  x86_64_outb(0x71, value);
  asm volatile("jmp 1f; 1: jmp 1f;1:");
}


x86 assembly (clang, -O0):
<x86_64_cmos_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%esi
mov    $0x70,%edi
mov    $0x0,%al
call   1030 <x86_64_outb@plt>
jmp    1136 <x86_64_cmos_write+0x26>
jmp    113b <x86_64_cmos_write+0x2b>
mov    -0x8(%rbp),%esi
mov    $0x71,%edi
mov    $0x0,%al
call   1030 <x86_64_outb@plt>
jmp    114f <x86_64_cmos_write+0x3f>
jmp    1154 <x86_64_cmos_write+0x44>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x86_64_cmos_write>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
mov    $0x70,%edi
xor    %eax,%eax
call   1030 <x86_64_outb@plt>
jmp    1123 <x86_64_cmos_write+0x13>
jmp    1125 <x86_64_cmos_write+0x15>
mov    $0x71,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <x86_64_outb@plt>
jmp    1135 <x86_64_cmos_write+0x25>
jmp    1137 <x86_64_cmos_write+0x27>
pop    %rbx
ret

LLVM IR (-O0):
define void @x86_64_cmos_write(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x86_64_outb to i32 (i32, i32, ...)*)(i32 112, i32 %6)
%8 = load i32, i32* %4
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x86_64_outb to i32 (i32, i32, ...)*)(i32 113, i32 %8)
ret void
}

LLVM IR (-O2):
define void @x86_64_cmos_write(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x86_64_outb to i32 (i32, i32, ...)*)(i32 112, i32 %3)
tail call void asm sideeffect "jmp 1f; 1: jmp 1f;1:", "~{dirflag},~{fpsr},~{flags}"()
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x86_64_outb to i32 (i32, i32, ...)*)(i32 113, i32 %1)
tail call void asm sideeffect "jmp 1f; 1: jmp 1f;1:", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void gdk_fill_rule_get_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XFontStruct(void *_p) {
  if (_p == NULL)
    abort();
  free((XFontStruct *)_p);
}


x86 assembly (clang, -O0):
<free_XFontStruct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XFontStruct+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XFontStruct>:
test   %rdi,%rdi
je     112a <free_XFontStruct+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XFontStruct(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XFontStruct(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int /*<<< orphan*/ fegetenv(int /*<<< orphan*/ *);
int /*<<< orphan*/ fesetenv(int /*<<< orphan*/ *);
double rint(double);
double nearbyint(double x) {
  volatile double ret;
  fenv_t env;
  fegetenv(&env);
  ret = rint(x);
  fesetenv(&env);
  return (ret);
}


x86 assembly (clang, -O0):
<nearbyint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <fegetenv@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <rint@plt>
movsd  %xmm0,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <fesetenv@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearbyint>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x8(%rsp)
lea    0x1c(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <fegetenv@plt>
movsd  0x8(%rsp),%xmm0
call   1030 <rint@plt>
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   1040 <fesetenv@plt>
movsd  0x10(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @nearbyint(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %2
%5 = call i32 @fegetenv(i32* %4)
%6 = load double, double* %2
%7 = call double @llvm.rint.f64(double %6)
store volatile double %7, double* %3
%8 = call i32 @fesetenv(i32* %4)
%9 = load volatile double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @nearbyint(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = bitcast double* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @fegetenv(i32* %3)
%7 = call double @llvm.rint.f64(double %0)
store volatile double %7, double* %2
%8 = call i32 @fesetenv(i32* %3)
%9 = load volatile double, double* %2
ret double %9
}
/* Type definitions */
struct statvfs {
  long long f_bavail;
  scalar_t__ f_bsize;
};

/* Variables and functions */
int /*<<< orphan*/ errnoAbort(char *);
int statvfs(char *, struct statvfs *);
long long freeSpaceOnFileSystem(char *path) {
  struct statvfs fi;
  int err = statvfs(path, &fi);
  if (err < 0)
    errnoAbort("freeSpaceOnFileSystem could not statvfs");
  return (long long)fi.f_bsize * fi.f_bavail;
}


x86 assembly (clang, -O0):
<freeSpaceOnFileSystem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <statvfs@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1152 <freeSpaceOnFileSystem+0x32>
lea    0xeb3(%rip),%rdi
call   1030 <errnoAbort@plt>
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeSpaceOnFileSystem>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
call   1040 <statvfs@plt>
test   %eax,%eax
jns    113e <freeSpaceOnFileSystem+0x1e>
lea    0xec7(%rip),%rdi
call   1030 <errnoAbort@plt>
mov    0x8(%rsp),%rax
imul   0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.statvfs = type { i64, i64 }
@.str = [40 x i8] c"freeSpaceOnFileSystem could not statvfs\00"
define i64 @freeSpaceOnFileSystem(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.statvfs
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @statvfs(i8* %5, %struct.statvfs* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @errnoAbort(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %3, i32 0, i32 1
%13 = load i64, i64* %12
%14 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %3, i32 0, i32 0
%15 = load i64, i64* %14
%16 = mul nsw i64 %13, %15
ret i64 %16
}

LLVM IR (-O2):
%struct.statvfs = type { i64, i64 }
@.str = [40 x i8] c"freeSpaceOnFileSystem could not statvfs\00"
define i64 @freeSpaceOnFileSystem(i8* nocapture %0) {
%2 = alloca %struct.statvfs
%3 = bitcast %struct.statvfs* %2 to i8*
%4 = call i32 @statvfs(i8* %0, %struct.statvfs* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @errnoAbort(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i64 0, i32 0
%12 = load i64, i64* %11
%13 = mul nsw i64 %12, %10
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void fbreset(void) { fputs("\033[m", stdout); }


x86 assembly (clang, -O0):
<fbreset>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbreset>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[m\00"
@stdout = global i32 0
define void @fbreset() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[m\00"
@stdout = global i32 0
define void @fbreset() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_SIGNER_INFO;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_SIGNER_INFO_it;
PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void) {
  return (PKCS7_SIGNER_INFO *)ASN1_item_new(&PKCS7_SIGNER_INFO_it);
}


x86 assembly (clang, -O0):
<PKCS7_SIGNER_INFO_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_SIGNER_INFO_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS7_SIGNER_INFO_it = global i32 0
define i32* @PKCS7_SIGNER_INFO_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS7_SIGNER_INFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS7_SIGNER_INFO_it = global i32 0
define i32* @PKCS7_SIGNER_INFO_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_SIGNER_INFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printBar(void) {
  int i;
  for (i = 0; i < 8; i++)
    printf("=");
  printf("\n");
}


x86 assembly (clang, -O0):
<printBar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    1143 <printBar+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <printBar+0xf>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBar>:
push   %rax
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"=\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printBar() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 8
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @printBar() {
%1 = tail call i32 @putchar(i32 61)
%2 = tail call i32 @putchar(i32 61)
%3 = tail call i32 @putchar(i32 61)
%4 = tail call i32 @putchar(i32 61)
%5 = tail call i32 @putchar(i32 61)
%6 = tail call i32 @putchar(i32 61)
%7 = tail call i32 @putchar(i32 61)
%8 = tail call i32 @putchar(i32 61)
%9 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t read32le(const uint8_t *ptr) {
  return (uint32_t)ptr[0] | (((uint32_t)ptr[1]) << 8) |
         (((uint32_t)ptr[2]) << 16) | (((uint32_t)ptr[3]) << 24);
}


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

x86 assembly (clang, -O2):
<read32le>:
mov    0x8(%rdi),%ecx
mov    0x10(%rdi),%edx
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%edx
mov    0x18(%rdi),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @read32le(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64*, i64** %2
%8 = getelementptr inbounds i64, i64* %7, i64 1
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = load i64*, i64** %2
%14 = getelementptr inbounds i64, i64* %13, i64 2
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %12, %17
%19 = load i64*, i64** %2
%20 = getelementptr inbounds i64, i64* %19, i64 3
%21 = load i64, i64* %20
%22 = trunc i64 %21 to i32
%23 = shl i32 %22, 24
%24 = or i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @read32le(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i64, i64* %0, i64 2
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i64, i64* %0, i64 3
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}