xunge/DecIR huggingface dataset:
/* Variables and functions */
long _mululong(long, long);
long _mulslong(long a, long b) { return _mululong(a, b); }


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

x86 assembly (clang, -O2):
<_mulslong>:
jmp    1030 <_mululong@plt>

LLVM IR (-O0):
define i64 @_mulslong(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 = call i64 @_mululong(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @_mulslong(i64 %0, i64 %1) {
%3 = tail call i64 @_mululong(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void leer(int vector[], int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("Elemento [%d] = %d\n", i, vector[i]);
}


x86 assembly (clang, -O0):
<leer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <leer+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <leer+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leer>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <leer+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <leer+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Elemento [%d] = %d\0A\00"
define void @leer(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Elemento [%d] = %d\0A\00"
define void @leer(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
int f(unsigned x) {
  x += 123;
  int y = x;
  y -= 99;
  return y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7b,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x63,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add i32 %0, 24
ret i32 %2
}
void init_add_rel_pixel_color_pt_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_add_rel_pixel_color_pt_funcs_c() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
int main(int argc, char const **argv) {
  for (int i = 0; i < argc; i++) {
    printf("argv[%d]=%s\n", i, argv[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"argv[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@.str = [13 x i8] c"argv[%d]=%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
void le_to_u16(uint16_t *dst, uint8_t *src) {
  *dst = (((uint16_t)src[1]) << 8) | (uint16_t)src[0];
}


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

x86 assembly (clang, -O2):
<le_to_u16>:
mov    0x8(%rsi),%eax
shl    $0x8,%eax
or     (%rsi),%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @le_to_u16(i32* nocapture writeonly %0, i64* nocapture %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = shl i32 %5, 8
%7 = load i64, i64* %1
%8 = trunc i64 %7 to i32
%9 = or i32 %6, %8
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x3d() {
  Assert_real((ispunct(61)),
              "/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_ispunct.c",
              310, ("ispunct should be 1 for ="));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x3d>:
push   %rax
mov    $0x3d,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x136,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for =\00"
define void @t_ispunct_0x3d() {
%1 = call i32 @ispunct(i32 61)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 310, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for =\00"
define void @t_ispunct_0x3d() {
%1 = tail call i32 @ispunct(i32 61)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 310, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void *resetArray(double *array, int n_puntos) {
  int i;
  for (i = 0; i < n_puntos; i++) {
    array[i] = 0.0;
  }
}


x86 assembly (clang, -O0):
<resetArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    113c <resetArray+0x3c>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <resetArray+0x12>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetArray>:
test   %esi,%esi
jle    1126 <resetArray+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i8* @resetArray(double* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load double*, double** %4
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
store double 0.000000e+00, double* %15
br label %16
16: ; preds = %11
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %7
19: ; preds = %7
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define noalias i8* @resetArray(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret i8* undef
}
/* Variables and functions */
int double2satoshi(int /*<<< orphan*/, long long *);
int /*<<< orphan*/ strtod(char const *, int /*<<< orphan*/ *);
int btcstr2satoshi(const char *btcstr, long long *amount) {
  return double2satoshi(strtod(btcstr, NULL), amount);
}


x86 assembly (clang, -O0):
<btcstr2satoshi>:
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
call   1030 <strtod@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <double2satoshi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btcstr2satoshi>:
push   %rbx
mov    %rsi,%rbx
xor    %esi,%esi
call   1030 <strtod@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <double2satoshi@plt>

LLVM IR (-O0):
define i32 @btcstr2satoshi(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i8*, i8** %3
%6 = call i32 @strtod(i8* %5, i32* null)
%7 = load i64*, i64** %4
%8 = call i32 @double2satoshi(i32 %6, i64* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @btcstr2satoshi(i8* nocapture %0, i64* %1) {
%3 = tail call i32 @strtod(i8* nocapture %0, i32* null)
%4 = tail call i32 @double2satoshi(i32 %3, i64* %1)
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t encode_voltage_ncp5392p(uint32_t v) {
  if (v == 0)
    return 0xff;
  return (((0x59 - (v - 5000) / 125) & 0xff) << 1 | 1);
}


x86 assembly (clang, -O0):
<encode_voltage_ncp5392p>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <encode_voltage_ncp5392p+0x1d>
movl   $0xff,-0x4(%rbp)
jmp    1144 <encode_voltage_ncp5392p+0x44>
mov    -0x8(%rbp),%eax
sub    $0x1388,%eax
mov    $0x7d,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x59,%eax
sub    %ecx,%eax
and    $0xff,%eax
shl    $0x1,%eax
or     $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_voltage_ncp5392p>:
test   %edi,%edi
je     1131 <encode_voltage_ncp5392p+0x31>
add    $0xffffec78,%edi
movslq %edi,%rax
imul   $0xffffffffef9db22d,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x23,%rax
add    %ecx,%eax
add    %eax,%eax
add    $0xb2,%eax
and    $0x1fe,%eax
or     $0x1,%eax
ret
mov    $0xff,%eax
ret

LLVM IR (-O0):
define i32 @encode_voltage_ncp5392p(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 255, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 5000
%10 = sdiv i32 %9, 125
%11 = sub nsw i32 89, %10
%12 = and i32 %11, 255
%13 = shl i32 %12, 1
%14 = or i32 %13, 1
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @encode_voltage_ncp5392p(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -5000
%5 = sdiv i32 %4, -125
%6 = shl nsw i32 %5, 1
%7 = add i32 %6, 178
%8 = and i32 %7, 510
%9 = or i32 %8, 1
br label %10
10: ; preds = %1, %3
%11 = phi i32 [ %9, %3 ], [ 255, %1 ]
ret i32 %11
}
/* Type definitions */
struct network_status {
  int dummy;
};
struct item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort_crypto_lib(char *);
struct item *network_receive_attempt(struct network_status *);
struct item *network_receive(struct network_status *stat) {
  struct item *i = network_receive_attempt(stat);
  if (i == 0)
    abort_crypto_lib("Receiving message failed");
  return i;
}


x86 assembly (clang, -O0):
<network_receive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <network_receive_attempt@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <network_receive+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<network_receive>:
push   %rbx
call   1030 <network_receive_attempt@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <network_receive+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.item = type { i32 }
%struct.network_status = type { i32 }
@.str = [25 x i8] c"Receiving message failed\00"
define %struct.item* @network_receive(%struct.network_status* %0) {
%2 = alloca %struct.network_status*
%3 = alloca %struct.item*
store %struct.network_status* %0, %struct.network_status** %2
%4 = load %struct.network_status*, %struct.network_status** %2
%5 = call %struct.item* @network_receive_attempt(%struct.network_status* %4)
store %struct.item* %5, %struct.item** %3
%6 = load %struct.item*, %struct.item** %3
%7 = icmp eq %struct.item* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @abort_crypto_lib(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load %struct.item*, %struct.item** %3
ret %struct.item* %11
}

LLVM IR (-O2):
%struct.item = type { i32 }
%struct.network_status = type { i32 }
@.str = [25 x i8] c"Receiving message failed\00"
define %struct.item* @network_receive(%struct.network_status* %0) {
%2 = tail call %struct.item* @network_receive_attempt(%struct.network_status* %0)
%3 = icmp eq %struct.item* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @abort_crypto_lib(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret %struct.item* %2
}
/* Variables and functions */
int /*<<< orphan*/ eset(int);
int tcFputs(char *, int);
int Mfputs(int nargs, int *args) {
  if (nargs < 2) {
    eset(21);
    return -1;
  }
  char *str = (char *)args[0];
  int unit = args[1];
  return tcFputs(str, unit);
}


x86 assembly (clang, -O0):
<Mfputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114f <Mfputs+0x2f>
mov    $0x15,%edi
call   1030 <eset@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <Mfputs+0x53>
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <tcFputs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mfputs>:
push   %rax
cmp    $0x1,%edi
jg     1137 <Mfputs+0x17>
mov    $0x15,%edi
call   1030 <eset@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
movslq (%rsi),%rdi
mov    0x4(%rsi),%esi
pop    %rax
jmp    1040 <tcFputs@plt>

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

LLVM IR (-O2):
define i32 @Mfputs(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @eset(i32 21)
br label %13
6: ; preds = %2
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = getelementptr inbounds i32, i32* %1, i64 1
%11 = load i32, i32* %10
%12 = tail call i32 @tcFputs(i8* %9, i32 %11)
br label %13
13: ; preds = %6, %4
%14 = phi i32 [ -1, %4 ], [ %12, %6 ]
ret i32 %14
}
int fun418() { return 418; }


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

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

LLVM IR (-O0):
define i32 @fun418() {
ret i32 418
}

LLVM IR (-O2):
define i32 @fun418() {
ret i32 418
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hm_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<hm_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @hm_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void lxcfree_name(char *name) {
  if (name)
    free(name);
}


x86 assembly (clang, -O0):
<lxcfree_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <lxcfree_name+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lxcfree_name>:
test   %rdi,%rdi
je     111a <lxcfree_name+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @lxcfree_name(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
bool prime_check(int num) {
  int i;
  for (i = 2; i < num; i++) {
    if (num % i == 0 && i != num)
      return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<prime_check>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1155 <prime_check+0x55>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1142 <prime_check+0x42>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1142 <prime_check+0x42>
movl   $0x0,-0x4(%rbp)
jmp    115c <prime_check+0x5c>
jmp    1147 <prime_check+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <prime_check+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime_check>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <prime_check+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <prime_check+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <prime_check+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @prime_check(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %11
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int time_min(time_t t) { return (t / (1000 * 60)) % 60; }


x86 assembly (clang, -O0):
<time_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xea60,%ecx
cltd
idiv   %ecx
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_min>:
movslq %edi,%rax
imul   $0x45e7b273,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0xe,%eax
add    %ecx,%eax
cltq
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x3c,%ecx,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @time_min(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 60000
%5 = srem i32 %4, 60
ret i32 %5
}

LLVM IR (-O2):
define i32 @time_min(i32 %0) {
%2 = sdiv i32 %0, 60000
%3 = srem i32 %2, 60
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xab() {
  Assert_real((isxdigit(171) == 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_isxdigit.c",
              860, ("isxdigit should be 0 for 0xab"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xab\00"
define void @t_isxdigit_0xab() {
%1 = tail call i64 @isxdigit(i32 171)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 860, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double q2(double p) {
  double q2;
  q2 = 98.24034 - 34.7145 * (log10(p)) + 2.614267 * (pow(log10(p), 2)) +
       0.107821 * (pow(log10(p), 3));
  return q2;
}


x86 assembly (clang, -O0):
<q2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log10@plt>
movsd  0xee1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xedd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log10@plt>
movsd  0xeb2(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x20(%rbp),%xmm1
movsd  0xe98(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log10@plt>
movsd  0xe71(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe57(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q2>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
call   1040 <log10@plt>
mulsd  0xec9(%rip),%xmm0
addsd  0xec9(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <log10@plt>
mulsd  %xmm0,%xmm0
mulsd  0xeb4(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <log10@plt>
movsd  0xe9d(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xe98(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @q2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @log10(double %4)
%6 = call double @llvm.fmuladd.f64(double -3.471450e+01, double %5, double 0x40588F61BB05FAEC)
%7 = load double, double* %2
%8 = call double @log10(double %7)
%9 = call double @pow(double %8, double 2.000000e+00)
%10 = call double @llvm.fmuladd.f64(double 0x4004EA04D12018A4, double %9, double %6)
%11 = load double, double* %2
%12 = call double @log10(double %11)
%13 = call double @pow(double %12, double 3.000000e+00)
%14 = call double @llvm.fmuladd.f64(double 1.078210e-01, double %13, double %10)
store double %14, double* %3
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
define double @q2(double %0) {
%2 = tail call double @log10(double %0)
%3 = tail call double @llvm.fmuladd.f64(double %2, double -3.471450e+01, double 0x40588F61BB05FAEC)
%4 = tail call double @log10(double %0)
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x4004EA04D12018A4, double %3)
%7 = tail call double @log10(double %0)
%8 = tail call double @pow(double %7, double 3.000000e+00)
%9 = tail call double @llvm.fmuladd.f64(double %8, double 1.078210e-01, double %6)
ret double %9
}
/* Variables and functions */
size_t bellIndex(int row, int col) { return row * (row - 1) / 2 + col; }


x86 assembly (clang, -O0):
<bellIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<bellIndex>:
lea    -0x1(%rdi),%eax
imul   %edi,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
add    %esi,%ecx
movslq %ecx,%rax
ret

LLVM IR (-O0):
define i64 @bellIndex(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* %3
%7 = sub nsw i32 %6, 1
%8 = mul nsw i32 %5, %7
%9 = sdiv i32 %8, 2
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = sext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @bellIndex(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = mul nsw i32 %3, %0
%5 = sdiv i32 %4, 2
%6 = add nsw i32 %5, %1
%7 = sext i32 %6 to i64
ret i64 %7
}
int yyerror(char *s __attribute__((__unused__))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @yyerror(i8* nocapture readnone %0) {
ret i32 0
}
double centigradeToKelvin(double centigrade) { return centigrade + 273.15; }


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

x86 assembly (clang, -O2):
<centigradeToKelvin>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @centigradeToKelvin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 2.731500e+02
ret double %4
}

LLVM IR (-O2):
define double @centigradeToKelvin(double %0) {
%2 = fadd double %0, 2.731500e+02
ret double %2
}
/* Variables and functions */
double fabs(double);
bool moving_axis_math(double oX, double nX) { return (fabs(oX - nX) > 0.0001); }


x86 assembly (clang, -O0):
<moving_axis_math>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xef1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<moving_axis_math>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd 0xefa(%rip),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @moving_axis_math(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 = fsub double %5, %6
%8 = call double @llvm.fabs.f64(double %7)
%9 = fcmp ogt double %8, 1.000000e-04
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @moving_axis_math(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp ogt double %4, 1.000000e-04
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
void initrand(int value) { srand((unsigned)value); }


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

x86 assembly (clang, -O2):
<initrand>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @initrand(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Variables and functions */
float atanf(float);
float _atan(float n) { return atanf(n); }


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

x86 assembly (clang, -O2):
<_atan>:
jmp    1030 <atanf@plt>

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

LLVM IR (-O2):
define float @_atan(float %0) {
%2 = tail call float @atanf(float %0)
ret float %2
}
void RTTarFileSetSize(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTarFileSetSize() {
ret void
}
int setbits(int n) {
  int rc = 0;
  while (n--) {
    rc = (rc >> 1) | (1 << 7);
  }
  return rc;
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1135 <setbits+0x35>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
or     $0x80,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <setbits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
test   %edi,%edi
je     1115 <setbits+0x15>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    1118 <setbits+0x18>
xor    %eax,%eax
jmp    112d <setbits+0x2d>
xor    %eax,%eax
ret
and    $0xfffffff8,%edi
xor    %eax,%eax
nopl   (%rax)
sar    $0x8,%eax
or     $0xff,%eax
add    $0xfffffff8,%edi
jne    1120 <setbits+0x20>
test   %ecx,%ecx
je     114c <setbits+0x4c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
sar    %eax
or     $0x80,%eax
add    $0xffffffff,%ecx
jne    1140 <setbits+0x40>
ret

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

LLVM IR (-O2):
define i32 @setbits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %27, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %16, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 0, %7 ], [ %13, %9 ]
%11 = phi i32 [ 0, %7 ], [ %14, %9 ]
%12 = ashr i32 %10, 8
%13 = or i32 %12, 255
%14 = add i32 %11, 8
%15 = icmp eq i32 %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %3
%17 = phi i32 [ undef, %3 ], [ %13, %9 ]
%18 = phi i32 [ 0, %3 ], [ %13, %9 ]
%19 = icmp eq i32 %5, 0
br i1 %19, label %27, label %20
20: ; preds = %16, %20
%21 = phi i32 [ %24, %20 ], [ %18, %16 ]
%22 = phi i32 [ %25, %20 ], [ 0, %16 ]
%23 = ashr i32 %21, 1
%24 = or i32 %23, 128
%25 = add i32 %22, 1
%26 = icmp eq i32 %25, %5
br i1 %26, label %27, label %20
27: ; preds = %16, %20, %1
%28 = phi i32 [ 0, %1 ], [ %17, %16 ], [ %24, %20 ]
ret i32 %28
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int StateFinishHeader(FILE *fp, int offset) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @StateFinishHeader(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
int putc_unlocked(int, int /*<<< orphan*/ *);
int putc(int c, FILE *file) {
  flockfile(file);
  int result = putc_unlocked(c, file);
  funlockfile(file);
  return result;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <flockfile@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <putc_unlocked@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <funlockfile@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <flockfile@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <putc_unlocked@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <funlockfile@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @putc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = call i32 @flockfile(i32* %6)
%8 = load i32, i32* %3
%9 = load i32*, i32** %4
%10 = call i32 @putc_unlocked(i32 %8, i32* %9)
store i32 %10, i32* %5
%11 = load i32*, i32** %4
%12 = call i32 @funlockfile(i32* %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @putc(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @flockfile(i32* %1)
%4 = tail call i32 @putc_unlocked(i32 %0, i32* %1)
%5 = tail call i32 @funlockfile(i32* %1)
ret i32 %4
}
/* Type definitions */
struct statvfs {
  size_t f_blocks;
  size_t f_bsize;
};

/* Variables and functions */
int /*<<< orphan*/ statvfs(char const *, struct statvfs *);
size_t diskSpace(const char *prefix) {
  struct statvfs buf;
  statvfs(prefix, &buf);
  size_t t = buf.f_blocks;
  t = t * buf.f_bsize;
  return t;
}


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

x86 assembly (clang, -O2):
<diskSpace>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
call   1030 <statvfs@plt>
mov    0x10(%rsp),%rax
imul   0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.statvfs = type { i64, i64 }
define i64 @diskSpace(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.statvfs
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @statvfs(i8* %5, %struct.statvfs* %3)
%7 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %3, i32 0, i32 0
%8 = load i64, i64* %7
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %3, i32 0, i32 1
%11 = load i64, i64* %10
%12 = mul i64 %9, %11
store i64 %12, i64* %4
%13 = load i64, i64* %4
ret i64 %13
}

LLVM IR (-O2):
%struct.statvfs = type { i64, i64 }
define i64 @diskSpace(i8* nocapture %0) {
%2 = alloca %struct.statvfs
%3 = bitcast %struct.statvfs* %2 to i8*
%4 = call i32 @statvfs(i8* %0, %struct.statvfs* %2)
%5 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i64 0, i32 0
%6 = load i64, i64* %5
%7 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i64 0, i32 1
%8 = load i64, i64* %7
%9 = mul i64 %8, %6
ret i64 %9
}
void RGB24ToI420() {}


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

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

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

LLVM IR (-O2):
define void @RGB24ToI420() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ts_packet_set_pcr_ex(int /*<<< orphan*/ *, int, int);
void ts_packet_set_pcr(uint8_t *ts_packet, uint64_t pcr) {
  uint64_t pcr_base = pcr / 300;
  uint16_t pcr_ext = pcr % 300;
  ts_packet_set_pcr_ex(ts_packet, pcr_base, pcr_ext);
}


x86 assembly (clang, -O0):
<ts_packet_set_pcr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x12c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x12c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <ts_packet_set_pcr_ex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_packet_set_pcr>:
movslq %esi,%rdx
imul   $0x1b4e81b5,%rdx,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
imul   $0x12c,%esi,%eax
sub    %eax,%edx
jmp    1030 <ts_packet_set_pcr_ex@plt>

LLVM IR (-O0):
define void @ts_packet_set_pcr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 300
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = srem i32 %9, 300
store i32 %10, i32* %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @ts_packet_set_pcr_ex(i32* %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @ts_packet_set_pcr(i32* %0, i32 %1) {
%3 = sdiv i32 %1, 300
%4 = srem i32 %1, 300
%5 = tail call i32 @ts_packet_set_pcr_ex(i32* %0, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
unsigned long const ULONG_MAX;
int can_ulong_add(const unsigned long x, const unsigned long y) {
  return x <= (ULONG_MAX - y);
}


x86 assembly (clang, -O0):
<can_ulong_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ec1(%rip),%rcx
mov    (%rcx),%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_ulong_add>:
neg    %rsi
xor    %eax,%eax
cmp    %rdi,%rsi
setae  %al
ret

LLVM IR (-O0):
@ULONG_MAX = constant i64 0
define i32 @can_ulong_add(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* @ULONG_MAX
%7 = load i64, i64* %4
%8 = sub i64 %6, %7
%9 = icmp ule i64 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@ULONG_MAX = constant i64 0
define i32 @can_ulong_add(i64 %0, i64 %1) {
%3 = sub i64 0, %1
%4 = icmp uge i64 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
int is_frame_id_char(char ch) {
  return (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9');
}


x86 assembly (clang, -O0):
<is_frame_id_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <is_frame_id_char+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <is_frame_id_char+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <is_frame_id_char+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_frame_id_char>:
lea    -0x41(%rdi),%eax
cmp    $0x1a,%al
setb   %al
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_frame_id_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 48
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 57
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_frame_id_char(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -48
%5 = icmp ult i8 %4, 10
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
int __attribute__((no)) foo(int *__restrict p, int i) {
  int *__restrict q;
  int *__restrict r;
  int v, w;
  q = p + 1;
  r = q - i;
  v = *r;
  *p = 1;
  w = *r;
  return v + w;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movslq %esi,%rcx
shl    $0x2,%rcx
mov    %rdi,%rax
sub    %rcx,%rax
neg    %rcx
mov    0x4(%rax),%eax
movl   $0x1,(%rdi)
add    0x4(%rdi,%rcx,1),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32* noalias %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = sub i64 0, %13
%15 = getelementptr inbounds i32, i32* %11, i64 %14
store i32* %15, i32** %6
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %3
store i32 1, i32* %18
%19 = load i32*, i32** %6
%20 = load i32, i32* %19
store i32 %20, i32* %8
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = add nsw i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @foo(i32* noalias nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = sext i32 %1 to i64
%5 = sub nsw i64 0, %4
%6 = getelementptr inbounds i32, i32* %3, i64 %5
%7 = load i32, i32* %6
store i32 1, i32* %0
%8 = load i32, i32* %6
%9 = add nsw i32 %8, %7
ret i32 %9
}