xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ audio_ic_set_lineout_vol();
int /*<<< orphan*/ menu_numeric_toggle(void *, int, int /*<<< orphan*/, int);
void audio_lovl_toggle(void *priv, int delta) {
  menu_numeric_toggle(priv, delta, 0, 6);
  audio_ic_set_lineout_vol();
}


x86 assembly (clang, -O0):
<audio_lovl_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
mov    $0x6,%ecx
call   1040 <menu_numeric_toggle@plt>
mov    $0x0,%al
call   1030 <audio_ic_set_lineout_vol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audio_lovl_toggle>:
push   %rax
xor    %edx,%edx
mov    $0x6,%ecx
call   1040 <menu_numeric_toggle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <audio_ic_set_lineout_vol@plt>

LLVM IR (-O0):
define void @audio_lovl_toggle(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 @menu_numeric_toggle(i8* %5, i32 %6, i32 0, i32 6)
%8 = call i32 (...) @audio_ic_set_lineout_vol()
ret void
}

LLVM IR (-O2):
define void @audio_lovl_toggle(i8* %0, i32 %1) {
%3 = tail call i32 @menu_numeric_toggle(i8* %0, i32 %1, i32 0, i32 6)
%4 = tail call i32 (...) @audio_ic_set_lineout_vol()
ret void
}
void glmTransposeMatrix2f(float m[4]) {
  float temp;
  temp = m[1];
  m[1] = m[2];
  m[2] = temp;
}


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

x86 assembly (clang, -O2):
<glmTransposeMatrix2f>:
rolq   $0x20,0x4(%rdi)
ret

LLVM IR (-O0):
define void @glmTransposeMatrix2f(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
%4 = load float*, float** %2
%5 = getelementptr inbounds float, float* %4, i64 1
%6 = load float, float* %5
store float %6, float* %3
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
%9 = load float, float* %8
%10 = load float*, float** %2
%11 = getelementptr inbounds float, float* %10, i64 1
store float %9, float* %11
%12 = load float, float* %3
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 2
store float %12, float* %14
ret void
}

LLVM IR (-O2):
define void @glmTransposeMatrix2f(float* nocapture %0) {
%2 = getelementptr inbounds float, float* %0, i64 1
%3 = load float, float* %2
%4 = getelementptr inbounds float, float* %0, i64 2
%5 = load float, float* %4
store float %5, float* %2
store float %3, float* %4
ret void
}
/* Type definitions */
struct utsname {
  char *machine;
};

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ uname(struct utsname *);
void ipm_get_mach_name(char *machn, int len) {
  char buf[200];
  struct utsname mach_info;
  uname(&mach_info);
  sprintf(buf, "%s", mach_info.machine);
  strncpy(machn, buf, len);
}


x86 assembly (clang, -O0):
<ipm_get_mach_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0xe8(%rbp),%rdi
call   1040 <uname@plt>
lea    -0xe0(%rbp),%rdi
mov    -0xe8(%rbp),%rdx
lea    0xe9d(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipm_get_mach_name>:
push   %rbp
push   %r14
push   %rbx
sub    $0xe0,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
call   1050 <uname@plt>
mov    0x8(%rsp),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.utsname = type { i8* }
@.str = [3 x i8] c"%s\00"
define void @ipm_get_mach_name(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [200 x i8]
%6 = alloca %struct.utsname
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @uname(%struct.utsname* %6)
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds %struct.utsname, %struct.utsname* %6, i32 0, i32 0
%10 = load i8*, i8** %9
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %3
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%14 = load i32, i32* %4
%15 = call i32 @strncpy(i8* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.utsname = type { i8* }
define void @ipm_get_mach_name(i8* %0, i32 %1) {
%3 = alloca [200 x i8]
%4 = alloca %struct.utsname
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%6 = bitcast %struct.utsname* %4 to i8*
%7 = call i32 @uname(%struct.utsname* %4)
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %4, i64 0, i32 0
%9 = load i8*, i8** %8
%10 = call i8* @strcpy(i8* %5, i8* dereferenceable(1) %9)
%11 = call i32 @strncpy(i8* %0, i8* %5, i32 %1)
ret void
}
/* Variables and functions */
int *memset(int *, int /*<<< orphan*/, int);
int *memset_elements(int *elements) {
  elements = memset(elements, 0, 4096 * sizeof(int));
  return elements;
}


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

x86 assembly (clang, -O2):
<memset_elements>:
xor    %esi,%esi
mov    $0x4000,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define i32* @memset_elements(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32* @memset(i32* %3, i32 0, i32 16384)
store i32* %4, i32** %2
%5 = load i32*, i32** %2
ret i32* %5
}

LLVM IR (-O2):
define i32* @memset_elements(i32* %0) {
%2 = tail call i32* @memset(i32* %0, i32 0, i32 16384)
ret i32* %2
}
/* Variables and functions */
unsigned long atomic_add(unsigned long volatile *, long);
unsigned long atomic_sub(volatile unsigned long *ptr, long amount) {
  return atomic_add(ptr, -amount);
}


x86 assembly (clang, -O0):
<atomic_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
sub    -0x10(%rbp),%rsi
call   1030 <atomic_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_sub>:
neg    %rsi
jmp    1030 <atomic_add@plt>

LLVM IR (-O0):
define i64 @atomic_sub(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = sub nsw i64 0, %6
%8 = call i64 @atomic_add(i64* %5, i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @atomic_sub(i64* %0, i64 %1) {
%3 = sub nsw i64 0, %1
%4 = tail call i64 @atomic_add(i64* %0, i64 %3)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ bbb();
int main() {
  bbb();
  return 0;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @__no_operation() {
ret void
}
extern unsigned int hweight8(unsigned char w) {
  w = (w & 0x55) + ((w >> 1) & 0x55);
  w = (w & 0x33) + ((w >> 2) & 0x33);
  w = (w & 0x0F) + ((w >> 4) & 0x0F);
  return w;
}


x86 assembly (clang, -O0):
<hweight8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x55,%eax
movzbl -0x1(%rbp),%ecx
sar    $0x1,%ecx
and    $0x55,%ecx
add    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x33,%eax
movzbl -0x1(%rbp),%ecx
sar    $0x2,%ecx
and    $0x33,%ecx
add    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movzbl -0x1(%rbp),%ecx
sar    $0x4,%ecx
and    $0xf,%ecx
add    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hweight8>:
mov    %edi,%eax
and    $0x55,%al
shr    %dil
and    $0x55,%dil
add    %al,%dil
mov    %edi,%eax
and    $0x33,%al
shr    $0x2,%dil
and    $0x33,%dil
add    %al,%dil
mov    %edi,%eax
and    $0x7,%al
shr    $0x4,%dil
add    %al,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @hweight8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 85
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = ashr i32 %7, 1
%9 = and i32 %8, 85
%10 = add nsw i32 %5, %9
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = and i32 %13, 51
%15 = load i8, i8* %2
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 2
%18 = and i32 %17, 51
%19 = add nsw i32 %14, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %2
%21 = load i8, i8* %2
%22 = zext i8 %21 to i32
%23 = and i32 %22, 15
%24 = load i8, i8* %2
%25 = zext i8 %24 to i32
%26 = ashr i32 %25, 4
%27 = and i32 %26, 15
%28 = add nsw i32 %23, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %2
%30 = load i8, i8* %2
%31 = zext i8 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @hweight8(i8 zeroext %0) {
%2 = and i8 %0, 85
%3 = lshr i8 %0, 1
%4 = and i8 %3, 85
%5 = add nuw i8 %4, %2
%6 = and i8 %5, 51
%7 = lshr i8 %5, 2
%8 = and i8 %7, 51
%9 = add nuw nsw i8 %8, %6
%10 = and i8 %9, 7
%11 = lshr i8 %9, 4
%12 = add nuw nsw i8 %10, %11
%13 = zext i8 %12 to i32
ret i32 %13
}
void omap_change_voltscale_method(struct voltagedomain *voltdm,
                                  int voltscale_method) {}


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

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

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

LLVM IR (-O2):
%struct.voltagedomain = type opaque
define void @omap_change_voltscale_method(%struct.voltagedomain* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int fibonacci(int);
int main() { return fibonacci(11); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0xb,%edi
jmp    1030 <fibonacci@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibonacci(i32 11)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ MAP_SHARED;
char *mapfile_flag(char *, int, size_t *, int /*<<< orphan*/);
char *mapfile(char *file, int oflags, size_t *size) {
  return mapfile_flag(file, oflags, size, MAP_SHARED);
}


x86 assembly (clang, -O0):
<mapfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    0x2ebb(%rip),%rax
mov    (%rax),%ecx
call   1030 <mapfile_flag@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapfile>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <mapfile_flag@plt>

LLVM IR (-O0):
@MAP_SHARED = global i32 0
define i8* @mapfile(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i64*, i64** %6
%10 = load i32, i32* @MAP_SHARED
%11 = call i8* @mapfile_flag(i8* %7, i32 %8, i64* %9, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
@MAP_SHARED = global i32 0
define i8* @mapfile(i8* %0, i32 %1, i64* %2) {
%4 = load i32, i32* @MAP_SHARED
%5 = tail call i8* @mapfile_flag(i8* %0, i32 %1, i64* %2, i32 %4)
ret i8* %5
}
int isVar(char var) {
  if (var == 'x' || var == 'y' || var == 'z')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isVar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x78,%eax
je     1131 <isVar+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     1131 <isVar+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jne    113d <isVar+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <isVar+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isVar>:
add    $0x88,%dil
xor    %eax,%eax
cmp    $0x3,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isVar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 120
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 121
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 122
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @isVar(i8 signext %0) {
%2 = add i8 %0, -120
%3 = icmp ult i8 %2, 3
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_C3uint8_reg(unsigned char val) {
  return ((val) & (-0xC3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C3uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff3d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C3uint8_reg>:
test   $0x3d,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C3uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -195
%6 = icmp ne i32 %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_C3uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 61
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
char *long2str(char *, int /*<<< orphan*/);
int /*<<< orphan*/ tt_loadTable(int /*<<< orphan*/);
char *macttLoad(char *arg) {
  return long2str(arg, tt_loadTable(get_string(arg)));
}


x86 assembly (clang, -O0):
<macttLoad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_string@plt>
mov    %eax,%edi
call   1040 <tt_loadTable@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1050 <long2str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macttLoad>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_string@plt>
mov    %eax,%edi
call   1040 <tt_loadTable@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1050 <long2str@plt>

LLVM IR (-O0):
define i8* @macttLoad(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @get_string(i8* %4)
%6 = call i32 @tt_loadTable(i32 %5)
%7 = call i8* @long2str(i8* %3, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @macttLoad(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i32 @tt_loadTable(i32 %2)
%4 = tail call i8* @long2str(i8* %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
double rnorm1();
double myrnorm(double mean, double sd) { return (mean + rnorm1() * sd); }


x86 assembly (clang, -O0):
<myrnorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rnorm1@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrnorm>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <rnorm1@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @myrnorm(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 (...) @rnorm1()
%7 = load double, double* %4
%8 = call double @llvm.fmuladd.f64(double %6, double %7, double %5)
ret double %8
}

LLVM IR (-O2):
define double @myrnorm(double %0, double %1) {
%3 = tail call double (...) @rnorm1()
%4 = tail call double @llvm.fmuladd.f64(double %3, double %1, double %0)
ret double %4
}
char *langEnumControlsJoyMagicKeyDongle() { return "MagicKey Dongle"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"MagicKey Dongle\00"
define i8* @langEnumControlsJoyMagicKeyDongle() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"MagicKey Dongle\00"
define i8* @langEnumControlsJoyMagicKeyDongle() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
void mscan_hardreset(struct can_dev *chip) {}


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

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

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

LLVM IR (-O2):
%struct.can_dev = type opaque
define void @mscan_hardreset(%struct.can_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_board();
void cmd_bd(char *dummy) { print_board(); }


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

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

LLVM IR (-O0):
define void @cmd_bd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @print_board()
ret void
}

LLVM IR (-O2):
define void @cmd_bd(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @print_board()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sha1_init_ctx(void *);
void sha1_init(void *context) { sha1_init_ctx(context); }


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

x86 assembly (clang, -O2):
<sha1_init>:
jmp    1030 <sha1_init_ctx@plt>

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

LLVM IR (-O2):
define void @sha1_init(i8* %0) {
%2 = tail call i32 @sha1_init_ctx(i8* %0)
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double gt() {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return tv.tv_sec + tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @gt() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @gt() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
int gcd(int a, int b) {
  while (a != b) {
    if (a > b) {
      return gcd(a - b, b);
    } else {
      return gcd(a, b - a);
    }
  }
  return a;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1162 <gcd+0x52>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114c <gcd+0x3c>
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
jmp    1168 <gcd+0x58>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
jmp    1168 <gcd+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
cmp    %esi,%edi
jne    1107 <gcd+0x7>
mov    %edi,%eax
ret
mov    %esi,%eax
mov    %eax,%ecx
nopl   0x0(%rax,%rax,1)
sub    %edi,%ecx
jl     1120 <gcd+0x20>
mov    %ecx,%eax
cmp    %ecx,%edi
jne    1110 <gcd+0x10>
jmp    1104 <gcd+0x4>
nopl   0x0(%rax)
sub    %eax,%edi
cmp    %edi,%eax
jne    1109 <gcd+0x9>
jmp    1106 <gcd+0x6>

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %16, label %4
4: ; preds = %2, %10
%5 = phi i32 [ %8, %10 ], [ %1, %2 ]
%6 = phi i32 [ %11, %10 ], [ %0, %2 ]
br label %7
7: ; preds = %4, %13
%8 = phi i32 [ %5, %4 ], [ %14, %13 ]
%9 = icmp slt i32 %8, %6
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = sub nsw i32 %6, %8
%12 = icmp eq i32 %11, %8
br i1 %12, label %16, label %4
13: ; preds = %7
%14 = sub nsw i32 %8, %6
%15 = icmp eq i32 %6, %14
br i1 %15, label %16, label %7
16: ; preds = %10, %13, %2
%17 = phi i32 [ %0, %2 ], [ %6, %13 ], [ %8, %10 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void t2() {
  int a = 1;
  int b = 48 + 2;
  int c = a + b;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/decl.c",
          14, 102, c * 2);
  ;
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
lea    0xec4(%rip),%rdi
mov    $0xe,%esi
mov    $0x66,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
lea    0xee9(%rip),%rdi
mov    $0xe,%esi
mov    $0x66,%edx
mov    $0x66,%ecx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [127 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/decl.c\00"
define void @t2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 50, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = add nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 %7, 2
%9 = call i32 @fexpect(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0), i32 14, i32 102, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [127 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/decl.c\00"
define void @t2() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0), i32 14, i32 102, i32 102)
ret void
}
int min_int(const int n1, const int n2) {
  if (n1 < n2)
    return n1;
  return n2;
}


x86 assembly (clang, -O0):
<min_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <min_int+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min_int+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_int>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int strcmp(char const *, char const *);
int hcompar(const void *p1, const void *p2) {
  return strcmp(*(const char **)p1, *(const char **)p2);
}


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

x86 assembly (clang, -O2):
<hcompar>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @hcompar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void AliasHandleDummy(struct libalias *la, struct ip *ip,
                      struct alias_data *ah) {
  ;
}


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

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

LLVM IR (-O0):
%struct.libalias = type opaque
%struct.ip = type opaque
%struct.alias_data = type opaque
define void @AliasHandleDummy(%struct.libalias* %0, %struct.ip* %1, %struct.alias_data* %2) {
%4 = alloca %struct.libalias*
%5 = alloca %struct.ip*
%6 = alloca %struct.alias_data*
store %struct.libalias* %0, %struct.libalias** %4
store %struct.ip* %1, %struct.ip** %5
store %struct.alias_data* %2, %struct.alias_data** %6
ret void
}

LLVM IR (-O2):
%struct.libalias = type opaque
%struct.ip = type opaque
%struct.alias_data = type opaque
define void @AliasHandleDummy(%struct.libalias* nocapture %0, %struct.ip* nocapture %1, %struct.alias_data* nocapture %2) {
ret void
}
void CPUID() {}


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

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

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

LLVM IR (-O2):
define void @CPUID() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_unable_to_write_to_output() {
  fprintf(stderr, "Unable to write to output\n");
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Unable to write to output\0A\00"
define void @print_unable_to_write_to_output() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int hello(void) {
  puts("Hello world in a C function");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Hello world in a C function\00"
define i32 @hello() {
%1 = call i32 @puts(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Hello world in a C function\00"
define i32 @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void av_log_get_level() {}


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

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

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

LLVM IR (-O2):
define void @av_log_get_level() {
ret void
}
int dct_lock(int write) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dct_lock(i32 %0) {
ret i32 0
}
void SetRow_X86() {}


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

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

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

LLVM IR (-O2):
define void @SetRow_X86() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int x();
int main() {
  if (x() != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <x@plt>
cmp    $0x1,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <x@plt>
cmp    $0x1,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @x()
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @x()
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
__attribute__((always_)) unsigned int hw_bitSet(unsigned int n, int bit) {
  return (n | 1U << bit);
}


x86 assembly (clang, -O0):
<hw_bitSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @hw_bitSet(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 = shl i32 1, %6
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hw_bitSet(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
scalar_t__ round(double);
long pksec(long bandwith, int mtu) {
  double bw = (double)bandwith;
  return (long)round(bw / (double)8 / (double)mtu);
}


x86 assembly (clang, -O0):
<pksec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <round@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pksec>:
cvtsi2sd %rdi,%xmm0
mulsd  0xee3(%rip),%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
jmp    1030 <round@plt>

LLVM IR (-O0):
define i64 @pksec(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca double
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = sitofp i64 %6 to double
store double %7, double* %5
%8 = load double, double* %5
%9 = fdiv double %8, 8.000000e+00
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
%13 = call i64 @round(double %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @pksec(i64 %0, i32 %1) {
%3 = sitofp i64 %0 to double
%4 = fmul double %3, 1.250000e-01
%5 = sitofp i32 %1 to double
%6 = fdiv double %4, %5
%7 = tail call i64 @round(double %6)
ret i64 %7
}
double v_mu(double mu) { return mu; }


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

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

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

LLVM IR (-O2):
define double @v_mu(double returned %0) {
ret double %0
}
int fun952() { return 952; }


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

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

LLVM IR (-O0):
define i32 @fun952() {
ret i32 952
}

LLVM IR (-O2):
define i32 @fun952() {
ret i32 952
}
void decrypt_data(char *buffer, const char *key, int length) {
  if (key) {
  }
}


x86 assembly (clang, -O0):
<decrypt_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     111f <decrypt_data+0x1f>
jmp    111f <decrypt_data+0x1f>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @decrypt_data(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x71() {
  Assert_real((isascii(113)),
              "/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_isascii.c",
              570, ("isascii should be 1 for q"));
}


x86 assembly (clang, -O0):
<t_isascii_0x71>:
push   %rbp
mov    %rsp,%rbp
mov    $0x71,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x23a,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x71>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x23a,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for q\00"
define void @t_isascii_0x71() {
%1 = call i32 @isascii(i32 113)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([26 x i8], [26 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for q\00"
define void @t_isascii_0x71() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 570, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int baz(int);
int foo() { return baz(baz(0)); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <baz@plt>
mov    %eax,%edi
call   1030 <baz@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
call   1030 <baz@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <baz@plt>

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 @baz(i32 0)
%2 = call i32 @baz(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 @baz(i32 0)
%2 = tail call i32 @baz(i32 %1)
ret i32 %2
}
/* Variables and functions */
double fabs(double);
double fmod(double, double);
double octBy2WrappedCitiblock(double a, double b) {
  double diff1, diff2;
  diff1 = fabs(a - b);
  diff2 = fmod(diff1, 53.0);
  return (((diff2) < (53.0 - diff2)) ? (diff2) : (53.0 - diff2));
}


x86 assembly (clang, -O0):
<octBy2WrappedCitiblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xedd(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  0xea0(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    117e <octBy2WrappedCitiblock+0x6e>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1190 <octBy2WrappedCitiblock+0x80>
movsd  0xe7a(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<octBy2WrappedCitiblock>:
push   %rax
subsd  %xmm1,%xmm0
andpd  0xee3(%rip),%xmm0
movsd  0xeeb(%rip),%xmm1
call   1030 <fmod@plt>
movsd  0xede(%rip),%xmm1
subsd  %xmm0,%xmm1
minsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @octBy2WrappedCitiblock(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
store double %10, double* %5
%11 = load double, double* %5
%12 = call double @fmod(double %11, double 5.300000e+01)
store double %12, double* %6
%13 = load double, double* %6
%14 = load double, double* %6
%15 = fsub double 5.300000e+01, %14
%16 = fcmp olt double %13, %15
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = load double, double* %6
br label %22
19: ; preds = %2
%20 = load double, double* %6
%21 = fsub double 5.300000e+01, %20
br label %22
22: ; preds = %19, %17
%23 = phi double [ %18, %17 ], [ %21, %19 ]
ret double %23
}

LLVM IR (-O2):
define double @octBy2WrappedCitiblock(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = tail call double @fmod(double %4, double 5.300000e+01)
%6 = fsub double 5.300000e+01, %5
%7 = fcmp olt double %5, %6
%8 = select i1 %7, double %5, double %6
ret double %8
}
/* Variables and functions */
double _f(int /*<<< orphan*/, int, double const, double const *);
double _J_10(const double omega, const double vertices_omegas[4]) {
  return (1.0 + _f(0, 1, omega, vertices_omegas) +
          _f(0, 2, omega, vertices_omegas) + _f(0, 3, omega, vertices_omegas)) /
         4;
}


x86 assembly (clang, -O0):
<_J_10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  0xec7(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe67(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_J_10>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1030 <_f@plt>
addsd  0xecb(%rip),%xmm0
movsd  %xmm0,(%rsp)
xor    %edi,%edi
mov    $0x2,%esi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
xor    %edi,%edi
mov    $0x3,%esi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
addsd  (%rsp),%xmm0
mulsd  0xe8d(%rip),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @_J_10(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 = load double*, double** %4
%7 = call double @_f(i32 0, i32 1, double %5, double* %6)
%8 = fadd double 1.000000e+00, %7
%9 = load double, double* %3
%10 = load double*, double** %4
%11 = call double @_f(i32 0, i32 2, double %9, double* %10)
%12 = fadd double %8, %11
%13 = load double, double* %3
%14 = load double*, double** %4
%15 = call double @_f(i32 0, i32 3, double %13, double* %14)
%16 = fadd double %12, %15
%17 = fdiv double %16, 4.000000e+00
ret double %17
}

LLVM IR (-O2):
define double @_J_10(double %0, double* %1) {
%3 = tail call double @_f(i32 0, i32 1, double %0, double* %1)
%4 = fadd double %3, 1.000000e+00
%5 = tail call double @_f(i32 0, i32 2, double %0, double* %1)
%6 = fadd double %4, %5
%7 = tail call double @_f(i32 0, i32 3, double %0, double* %1)
%8 = fadd double %6, %7
%9 = fmul double %8, 2.500000e-01
ret double %9
}
void EnableVectorInt(char Vector) {
  (*((volatile unsigned long *)0xFFFFF010)) |= (1 << Vector);
}


x86 assembly (clang, -O0):
<EnableVectorInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    $0xfffff010,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0xfffff010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnableVectorInt>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    $0xfffff010,%ecx
or     %rax,(%rcx)
ret

LLVM IR (-O0):
define void @EnableVectorInt(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = shl i32 1, %4
%6 = sext i32 %5 to i64
%7 = load volatile i64, i64* inttoptr (i64 4294963216 to i64*)
%8 = or i64 %7, %6
store volatile i64 %8, i64* inttoptr (i64 4294963216 to i64*)
ret void
}

LLVM IR (-O2):
define void @EnableVectorInt(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = shl nuw i32 1, %2
%4 = sext i32 %3 to i64
%5 = load volatile i64, i64* inttoptr (i64 4294963216 to i64*)
%6 = or i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 4294963216 to i64*)
ret void
}
/* Variables and functions */
void *mfcreate(char *);
void *pc_openasm(char *filename) { return mfcreate(filename); }


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

x86 assembly (clang, -O2):
<pc_openasm>:
jmp    1030 <mfcreate@plt>

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

LLVM IR (-O2):
define i8* @pc_openasm(i8* %0) {
%2 = tail call i8* @mfcreate(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ compare_array(int *, int *, int /*<<< orphan*/);
void test_compare_empty_array() {
  int a[] = {};
  assert(compare_array(a, a, 0));
}


x86 assembly (clang, -O0):
<test_compare_empty_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x4(%rbp),%rsi
xor    %edx,%edx
call   1040 <compare_array@plt>
mov    %eax,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_compare_empty_array>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rdi,%rsi
xor    %edx,%edx
call   1040 <compare_array@plt>
mov    %eax,%edi
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_compare_empty_array() {
%1 = alloca [0 x i32]
%2 = bitcast [0 x i32]* %1 to i8*
%3 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%5 = call i32 @compare_array(i32* %3, i32* %4, i32 0)
%6 = call i32 @assert(i32 %5)
ret void
}

LLVM IR (-O2):
define void @test_compare_empty_array() {
%1 = alloca [0 x i32]
%2 = bitcast [0 x i32]* %1 to i8*
%3 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%4 = call i32 @compare_array(i32* %3, i32* %3, i32 0)
%5 = call i32 @assert(i32 %4)
ret void
}
char *hash_plugin_summary(void) {
  return ("keepass \tKeePass passphrase plugin");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"keepass \09KeePass passphrase plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [35 x i8] c"keepass \09KeePass passphrase plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0)
}