xunge/DecIR huggingface dataset:
/* Variables and functions */
int rand();
int randMinMax(int minimum, int maximum) {
  return (rand() % (maximum - minimum)) + minimum;
}


x86 assembly (clang, -O0):
<randMinMax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randMinMax>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randMinMax(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = srem i32 %5, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @randMinMax(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
void uninitvar_feof(void) {
  FILE *fp;
  feof(fp);
  (void)feof(fp);
}


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

x86 assembly (clang, -O2):
<uninitvar_feof>:
push   %rax
call   1030 <feof@plt>
pop    %rax
jmp    1030 <feof@plt>

LLVM IR (-O0):
define void @uninitvar_feof() {
%1 = alloca i32*
%2 = load i32*, i32** %1
%3 = call i32 @feof(i32* %2)
%4 = load i32*, i32** %1
%5 = call i32 @feof(i32* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_feof() {
%1 = tail call i32 @feof(i32* undef)
%2 = tail call i32 @feof(i32* undef)
ret void
}
int main() { return *(float *)0xff00f0f0f; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movabs $0xff00f0f0f,%rax
cvttss2si (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movabs $0xff00f0f0f,%rax
cvttss2si (%rax),%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load float, float* inttoptr (i64 68452028175 to float*)
%3 = fptosi float %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = load float, float* inttoptr (i64 68452028175 to float*)
%2 = fptosi float %1 to i32
ret i32 %2
}
double min(double x, double y) {
  if (x > y) {
    return y;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    112d <min+0x2d>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <min+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
const char *Help_Name(void) { return "Help"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"Help\00"
define i8* @Help_Name() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
void test(int *array, long long N) { array[N] = N[array] = 33; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
movl   $0x21,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movl   $0x21,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movl   $0x21,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @test(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 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 %5
store i32 33, i32* %7
%8 = load i32*, i32** %3
%9 = load i64, i64* %4
%10 = getelementptr inbounds i32, i32* %8, i64 %9
store i32 33, i32* %10
ret void
}

LLVM IR (-O2):
define void @test(i32* nocapture writeonly %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 %1
store i32 33, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ cblByteOrderSwap32(int /*<<< orphan*/);
uint32_t cblByteOrderSwap32BigToHost(uint32_t swap) {
  return cblByteOrderSwap32(swap);
}


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

x86 assembly (clang, -O2):
<cblByteOrderSwap32BigToHost>:
jmp    1030 <cblByteOrderSwap32@plt>

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

LLVM IR (-O2):
define i32 @cblByteOrderSwap32BigToHost(i32 %0) {
%2 = tail call i32 @cblByteOrderSwap32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void putLDCharUR(void) { printf("\x01B(0\x06A\x01B(B"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B(0j\1B(B\00"
define void @putLDCharUR() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B(0j\1B(B\00"
define void @putLDCharUR() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, const char *argv[]) {
  char string;
  printf("Pls enter any single word");
  scanf("%c", &string);
  printf("%.4c", string);
  return 0;
}


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)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x11(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x11(%rbp),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Pls enter any single word\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [5 x i8] c"%.4c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Pls enter any single word\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [5 x i8] c"%.4c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
int unpackblkno(unsigned char *buf) { return (buf[2] << 8) | (buf[3] & 0xff); }


x86 assembly (clang, -O0):
<unpackblkno>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpackblkno>:
movzwl 0x2(%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @unpackblkno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 3
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 255
%13 = or i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @unpackblkno(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = or i32 %5, %8
ret i32 %9
}
int fixed_point_add(int x, int y) { return x + y; }


x86 assembly (clang, -O0):
<fixed_point_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixed_point_add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @fixed_point_add(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fixed_point_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x15() {
  Assert_real((ispunct(21) == 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_ispunct.c",
              110, ("ispunct should be 0 for 0x15"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x15>:
push   %rax
mov    $0x15,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x6e,%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 = [29 x i8] c"ispunct should be 0 for 0x15\00"
define void @t_ispunct_0x15() {
%1 = call i64 @ispunct(i32 21)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x15\00"
define void @t_ispunct_0x15() {
%1 = tail call i64 @ispunct(i32 21)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ forget_locs_latest_prune(int);
void call_forget_locs_latest_prune_Bad() { forget_locs_latest_prune(10); }


x86 assembly (clang, -O0):
<call_forget_locs_latest_prune_Bad>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <forget_locs_latest_prune@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_forget_locs_latest_prune_Bad>:
mov    $0xa,%edi
jmp    1030 <forget_locs_latest_prune@plt>

LLVM IR (-O0):
define void @call_forget_locs_latest_prune_Bad() {
%1 = call i32 @forget_locs_latest_prune(i32 10)
ret void
}

LLVM IR (-O2):
define void @call_forget_locs_latest_prune_Bad() {
%1 = tail call i32 @forget_locs_latest_prune(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x2d() {
  Assert_real((isgraph(45)),
              "/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_isgraph.c",
              230, ("isgraph should be 1 for -"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x2d>:
push   %rax
mov    $0x2d,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xe6,%edx
pop    %rax
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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for -\00"
define void @t_isgraph_0x2d() {
%1 = call i32 @isgraph(i32 45)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for -\00"
define void @t_isgraph_0x2d() {
%1 = tail call i32 @isgraph(i32 45)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int box_get_jal(int i) { return ((i ^ 0xF00B) + 100); }


x86 assembly (clang, -O0):
<box_get_jal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xf00b,%eax
add    $0x64,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<box_get_jal>:
xor    $0xf00b,%edi
lea    0x64(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @box_get_jal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, 61451
%5 = add nsw i32 %4, 100
ret i32 %5
}

LLVM IR (-O2):
define i32 @box_get_jal(i32 %0) {
%2 = xor i32 %0, 61451
%3 = add nsw i32 %2, 100
ret i32 %3
}
int ilog(unsigned int v) {
  int ret = 0;
  while (v) {
    ret++;
    v >>= 1;
  }
  return (ret);
}


x86 assembly (clang, -O0):
<ilog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <ilog+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <ilog+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog>:
xor    %eax,%eax
test   %edi,%edi
je     111c <ilog+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <ilog+0x10>
ret

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

LLVM IR (-O2):
define i32 @ilog(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ call7d(long, float, unsigned char, double, unsigned short,
                          unsigned long, unsigned int, char, int, short);
void call7c(short s, long l, float f, unsigned char uc, double d,
            unsigned short us, unsigned long ul, unsigned int ui, char c,
            int i) {
  call7d(l, f, uc, d, us, ul, ui, c, i, s);
}


x86 assembly (clang, -O0):
<call7c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %cx,%ax
mov    %dl,%cl
mov    %di,%dx
mov    0x18(%rbp),%edi
mov    0x10(%rbp),%dil
mov    %dx,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %cl,-0x15(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %ax,-0x22(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
mov    -0x15(%rbp),%sil
movsd  -0x20(%rbp),%xmm1
mov    -0x22(%rbp),%dx
mov    -0x30(%rbp),%rcx
mov    -0x34(%rbp),%r8d
mov    0x10(%rbp),%r9b
mov    0x18(%rbp),%eax
movzbl %sil,%esi
movzwl %dx,%edx
movsbl %r9b,%r9d
mov    %eax,(%rsp)
movswl -0x2(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1030 <call7d@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call7c>:
push   %rax
mov    %r9d,%r10d
mov    %edi,%eax
movsbl 0x10(%rsp),%r9d
mov    0x18(%rsp),%r11d
mov    %rsi,%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8,%rcx
mov    %r10d,%r8d
push   %rax
push   %r11
call   1030 <call7d@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @call7c(i16 signext %0, i64 %1, float %2, i8 zeroext %3, double %4, i16 zeroext %5, i64 %6, i32 %7, i8 signext %8, i32 %9) {
%11 = alloca i16
%12 = alloca i64
%13 = alloca float
%14 = alloca i8
%15 = alloca double
%16 = alloca i16
%17 = alloca i64
%18 = alloca i32
%19 = alloca i8
%20 = alloca i32
store i16 %0, i16* %11
store i64 %1, i64* %12
store float %2, float* %13
store i8 %3, i8* %14
store double %4, double* %15
store i16 %5, i16* %16
store i64 %6, i64* %17
store i32 %7, i32* %18
store i8 %8, i8* %19
store i32 %9, i32* %20
%21 = load i64, i64* %12
%22 = load float, float* %13
%23 = load i8, i8* %14
%24 = load double, double* %15
%25 = load i16, i16* %16
%26 = load i64, i64* %17
%27 = load i32, i32* %18
%28 = load i8, i8* %19
%29 = load i32, i32* %20
%30 = load i16, i16* %11
%31 = call i32 @call7d(i64 %21, float %22, i8 zeroext %23, double %24, i16 zeroext %25, i64 %26, i32 %27, i8 signext %28, i32 %29, i16 signext %30)
ret void
}

LLVM IR (-O2):
define void @call7c(i16 signext %0, i64 %1, float %2, i8 zeroext %3, double %4, i16 zeroext %5, i64 %6, i32 %7, i8 signext %8, i32 %9) {
%11 = tail call i32 @call7d(i64 %1, float %2, i8 zeroext %3, double %4, i16 zeroext %5, i64 %6, i32 %7, i8 signext %8, i32 %9, i16 signext %0)
ret void
}
void free_inet4(struct in_addr *net) {}


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

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

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

LLVM IR (-O2):
%struct.in_addr = type opaque
define void @free_inet4(%struct.in_addr* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setMcuToDefaultSleep();
void idleTask(void) { setMcuToDefaultSleep(); }


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

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

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

LLVM IR (-O2):
define void @idleTask() {
%1 = tail call i32 (...) @setMcuToDefaultSleep()
ret void
}
f(x, d1, d2, d3) double d1, d2, d3;
{ return x; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0, double %1, double %2, double %3) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x69() {
  Assert_real((isupper(105) == 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_isupper.c",
              530, ("isupper should be 0 for i"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x69>:
push   %rax
mov    $0x69,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x212,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for i\00"
define void @t_isupper_0x69() {
%1 = call i64 @isupper(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 530, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for i\00"
define void @t_isupper_0x69() {
%1 = tail call i64 @isupper(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int getchar();
int /*<<< orphan*/ stderr;
void shellout_wait_ret(void) {
  fprintf(stderr, "enter to continue...");
  for (;;) {
    int c = getchar();
    if (c == EOF || c == '\n')
      break;
  }
}


x86 assembly (clang, -O0):
<shellout_wait_ret>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%eax
je     1163 <shellout_wait_ret+0x43>
cmpl   $0xa,-0x4(%rbp)
jne    1168 <shellout_wait_ret+0x48>
jmp    116d <shellout_wait_ret+0x4d>
jmp    113d <shellout_wait_ret+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shellout_wait_ret>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2eab(%rip),%rbx
nopl   (%rax)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1150 <shellout_wait_ret+0x30>
cmp    (%rbx),%eax
jne    1140 <shellout_wait_ret+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"enter to continue...\00"
@EOF = global i32 0
define void @shellout_wait_ret() {
%1 = alloca i32
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %13, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %6, %7
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 10
br i1 %11, label %12, label %13
12: ; preds = %9, %4
br label %14
13: ; preds = %9
br label %4
14: ; preds = %12
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"enter to continue...\00"
@EOF = global i32 0
define void @shellout_wait_ret() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @getchar()
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
%7 = icmp eq i32 %4, 10
%8 = or i1 %7, %6
br i1 %8, label %9, label %3
9: ; preds = %3
ret void
}
void kol_sleep(unsigned d) { asm("int $0x40" ::"a"(5), "b"(d)); }


x86 assembly (clang, -O0):
<kol_sleep>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ebx
mov    $0x5,%eax
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_sleep>:
push   %rbx
mov    %edi,%ebx
mov    $0x5,%eax
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_sleep(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 5, i32 %0)
ret void
}
void nseel_asm_max_fp_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_max_fp_end() {
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int recvfrom(int, char *, int, int, struct sockaddr *, int /*<<< orphan*/ *);
int INET_recvfrom(int socket, char *buffer, int length, int flags,
                  struct sockaddr_in *address, int *address_len) {
  return recvfrom(socket, buffer, length, flags, (struct sockaddr *)address,
                  (socklen_t *)address_len);
}


x86 assembly (clang, -O0):
<INET_recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1030 <recvfrom@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INET_recvfrom>:
jmp    1030 <recvfrom@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @INET_recvfrom(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr_in* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.sockaddr_in*
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store %struct.sockaddr_in* %4, %struct.sockaddr_in** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr_in*, %struct.sockaddr_in** %11
%18 = bitcast %struct.sockaddr_in* %17 to %struct.sockaddr*
%19 = load i32*, i32** %12
%20 = call i32 @recvfrom(i32 %13, i8* %14, i32 %15, i32 %16, %struct.sockaddr* %18, i32* %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @INET_recvfrom(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr_in* %4, i32* %5) {
%7 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%8 = tail call i32 @recvfrom(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr* %7, i32* %5)
ret i32 %8
}
void gtk_paned_get_position() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paned_get_position() {
ret void
}
int d(int a, int b) { return b - a; }


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @d(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
ret i32 %3
}
void gbphy_runtime_put_autosuspend(struct gbphy_device *gbphy_dev) {}


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

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

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

LLVM IR (-O2):
%struct.gbphy_device = type opaque
define void @gbphy_runtime_put_autosuspend(%struct.gbphy_device* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ arl_bypass();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void arl_wrapper_function(void) {
  if (arl_bypass())
    return;
  printf("Calling ARL Python function.\n");
  sleep(1);
}


x86 assembly (clang, -O0):
<arl_wrapper_function>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <arl_bypass@plt>
cmp    $0x0,%rax
je     114a <arl_wrapper_function+0x1a>
jmp    1160 <arl_wrapper_function+0x30>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arl_wrapper_function>:
push   %rax
xor    %eax,%eax
call   1040 <arl_bypass@plt>
test   %rax,%rax
je     113f <arl_wrapper_function+0xf>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
pop    %rax
jmp    1050 <sleep@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Calling ARL Python function.\0A\00"
define void @arl_wrapper_function() {
%1 = call i64 (...) @arl_bypass()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %7
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @sleep(i32 1)
br label %7
7: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"Calling ARL Python function.\00"
define void @arl_wrapper_function() {
%1 = tail call i64 (...) @arl_bypass()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
br label %6
6: ; preds = %0, %3
ret void
}
unsigned int hash(unsigned int a) {
  a = (a + 0x7ed55d16) + (a << 12);
  a = (a ^ 0xc761c23c) ^ (a >> 19);
  a = (a + 0x165667b1) + (a << 5);
  a = (a + 0xd3a2646c) ^ (a << 9);
  a = (a + 0xfd7046c5) + (a << 3);
  a = (a ^ 0xb55a4f09) ^ (a >> 16);
  return a;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7ed55d16,%eax
mov    -0x4(%rbp),%ecx
shl    $0xc,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xc761c23c,%eax
mov    -0x4(%rbp),%ecx
shr    $0x13,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x165667b1,%eax
mov    -0x4(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd3a2646c,%eax
mov    -0x4(%rbp),%ecx
shl    $0x9,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xfd7046c5,%eax
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xb55a4f09,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    %edi,%eax
shl    $0xc,%eax
add    %edi,%eax
add    $0x7ed55d16,%eax
mov    %eax,%ecx
shr    $0x13,%ecx
xor    %eax,%ecx
xor    $0xc761c23c,%ecx
mov    %ecx,%eax
shl    $0x5,%eax
lea    (%rcx,%rax,1),%edx
shl    $0x9,%edx
add    %ecx,%eax
add    $0xe9f8cc1d,%eax
add    $0xaccf6200,%edx
xor    %eax,%edx
lea    (%rdx,%rdx,8),%ecx
add    $0xfd7046c5,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
xor    %ecx,%eax
xor    $0xb55a4f09,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 2127912214
%5 = load i32, i32* %2
%6 = shl i32 %5, 12
%7 = add i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = xor i32 %8, -949894596
%10 = load i32, i32* %2
%11 = lshr i32 %10, 19
%12 = xor i32 %9, %11
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = add i32 %13, 374761393
%15 = load i32, i32* %2
%16 = shl i32 %15, 5
%17 = add i32 %14, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = add i32 %18, -744332180
%20 = load i32, i32* %2
%21 = shl i32 %20, 9
%22 = xor i32 %19, %21
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = add i32 %23, -42973499
%25 = load i32, i32* %2
%26 = shl i32 %25, 3
%27 = add i32 %24, %26
store i32 %27, i32* %2
%28 = load i32, i32* %2
%29 = xor i32 %28, -1252372727
%30 = load i32, i32* %2
%31 = lshr i32 %30, 16
%32 = xor i32 %29, %31
store i32 %32, i32* %2
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @hash(i32 %0) {
%2 = add i32 %0, 2127912214
%3 = shl i32 %0, 12
%4 = add i32 %2, %3
%5 = lshr i32 %4, 19
%6 = xor i32 %4, %5
%7 = xor i32 %6, -949894596
%8 = add i32 %7, 374761393
%9 = shl i32 %7, 5
%10 = add i32 %8, %9
%11 = add i32 %10, -744332180
%12 = shl i32 %10, 9
%13 = xor i32 %11, %12
%14 = add i32 %13, -42973499
%15 = shl i32 %13, 3
%16 = add i32 %14, %15
%17 = lshr i32 %16, 16
%18 = xor i32 %16, %17
%19 = xor i32 %18, -1252372727
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void short_func(void) {
  int i = 0;
  sleep(1);
  i = 1;
  i = 2;
}


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

x86 assembly (clang, -O2):
<short_func>:
mov    $0x1,%edi
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @short_func() {
%1 = tail call i32 @sleep(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_macro_0();
int /*<<< orphan*/ print_macro_1();
int /*<<< orphan*/ print_macro_2();
int main(void) {
  print_macro_0();
  print_macro_1();
  print_macro_2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_macro_0()
%2 = tail call i32 (...) @print_macro_1()
%3 = tail call i32 (...) @print_macro_2()
ret i32 0
}
/* Variables and functions */
int isfinite(double);
int chpl_macro_double_isfinite(double x) { return isfinite(x); }


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

x86 assembly (clang, -O2):
<chpl_macro_double_isfinite>:
jmp    1030 <isfinite@plt>

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

LLVM IR (-O2):
define i32 @chpl_macro_double_isfinite(double %0) {
%2 = tail call i32 @isfinite(double %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int mknod(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev) {
  return mknod(path, mode, *dev);
}


x86 assembly (clang, -O0):
<__xmknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
call   1030 <mknod@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xmknod>:
mov    %rsi,%rdi
mov    (%rcx),%eax
mov    %edx,%esi
mov    %eax,%edx
jmp    1030 <mknod@plt>

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

LLVM IR (-O2):
define i32 @__xmknod(i32 %0, i8* %1, i32 %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = tail call i32 @mknod(i8* %1, i32 %2, i32 %5)
ret i32 %6
}
int hash_key(char *str, int size) {
  unsigned int ret = 1;
  while (*str)
    ret = ((ret >> 1) + (ret * *str++));
  return (ret % size);
}


x86 assembly (clang, -O0):
<hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <hash_key+0x47>
mov    -0x10(%rbp),%eax
shr    $0x1,%eax
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rdx
mov    %rdx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x8(%rbp)
movsbl (%rdx),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <hash_key+0x12>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_key>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <hash_key+0x29>
add    $0x1,%rdi
mov    $0x1,%edx
nop
movsbl %cl,%eax
imul   %edx,%eax
shr    %edx
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_key+0x10>
jmp    112e <hash_key+0x2e>
mov    $0x1,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hash_key(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32, i32* %5
%12 = lshr i32 %11, 1
%13 = load i32, i32* %5
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %3
%16 = load i8, i8* %14
%17 = sext i8 %16 to i32
%18 = mul i32 %13, %17
%19 = add i32 %12, %18
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = urem i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @hash_key(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %14, %5 ], [ %3, %2 ]
%7 = phi i32 [ %13, %5 ], [ 1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = lshr i32 %7, 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = sext i8 %6 to i32
%12 = mul i32 %7, %11
%13 = add i32 %12, %9
%14 = load i8, i8* %10
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i32 [ 1, %2 ], [ %13, %5 ]
%18 = urem i32 %17, %1
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ gsitp(char *, int);
void g_off_t() { gsitp("off_t", sizeof(off_t)); }


x86 assembly (clang, -O0):
<g_off_t>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <gsitp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_off_t>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <gsitp@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"off_t\00"
define void @g_off_t() {
%1 = call i32 @gsitp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"off_t\00"
define void @g_off_t() {
%1 = tail call i32 @gsitp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
void DMA1_Stream7_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @DMA1_Stream7_IRQHandler() {
ret void
}
int save_free(void *ptr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @save_free(i8* nocapture readnone %0) {
ret i32 0
}
double test_modf(double x, double *y) { return __builtin_modf(x, y); }


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

x86 assembly (clang, -O2):
<test_modf>:
jmp    1030 <modf@plt>

LLVM IR (-O0):
define double @test_modf(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 @modf(double %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @test_modf(double %0, double* nocapture %1) {
%3 = tail call double @modf(double %0, double* %1)
ret double %3
}
void _mutex_setkind(unsigned int mid, unsigned int kind) {
  unsigned int cmd;
  cmd = (((0x13000000)) | ((4 & ((1 << 3) - 1)) << (8 + (6 + 2))) |
         ((0 & ((1 << 8) - 1)) << (6 + 2)) | ((mid & ((1 << 6) - 1)) << 2));
  ((*(volatile unsigned int *)(cmd)) = kind);
}


x86 assembly (clang, -O0):
<_mutex_setkind>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
shl    $0x2,%eax
or     $0x13040000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mutex_setkind>:
shl    $0x2,%edi
movzbl %dil,%eax
mov    %esi,0x13040000(%rax)
ret

LLVM IR (-O0):
define void @_mutex_setkind(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* %3
%7 = and i32 %6, 63
%8 = shl i32 %7, 2
%9 = or i32 319029248, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %10, i32* %13
ret void
}

LLVM IR (-O2):
define void @_mutex_setkind(i32 %0, i32 %1) {
%3 = shl i32 %0, 2
%4 = and i32 %3, 252
%5 = or i32 %4, 319029248
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
store volatile i32 %1, i32* %7
ret void
}
char char_color(int side) {
  return '*';
  switch (side) {
  case 0:
    return 'W';
  case 1:
    return 'R';
  case 2:
    return 'B';
  case 3:
    return 'O';
  case 4:
    return 'G';
  case 5:
    return 'Y';
  }
}


x86 assembly (clang, -O0):
<char_color>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x2a,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_color>:
mov    $0x2a,%al
ret

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

LLVM IR (-O2):
define signext i8 @char_color(i32 %0) {
ret i8 42
}
void gtk_window_get_gravity() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_gravity() {
ret void
}