xunge/DecIR huggingface dataset:
const char *bind_name(int flags) {
  if (flags & 64)
    return "WEAK";
  if (flags & 8)
    return "GLOB";
  if (flags & 32)
    return "COMM";
  return "LOCL";
}


x86 assembly (clang, -O0):
<bind_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1126 <bind_name+0x26>
lea    0xee3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <bind_name+0x6f>
mov    -0xc(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1145 <bind_name+0x45>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <bind_name+0x6f>
mov    -0xc(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1164 <bind_name+0x64>
lea    0xeaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <bind_name+0x6f>
lea    0xea4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_name>:
test   $0x40,%dil
jne    1123 <bind_name+0x23>
test   $0x8,%dil
jne    112b <bind_name+0x2b>
test   $0x20,%dil
lea    0xef8(%rip),%rcx
lea    0xeec(%rip),%rax
cmove  %rcx,%rax
ret
lea    0xed6(%rip),%rax
ret
lea    0xed3(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"WEAK\00"
@.str.1 = [5 x i8] c"GLOB\00"
@.str.2 = [5 x i8] c"COMM\00"
@.str.3 = [5 x i8] c"LOCL\00"
define i8* @bind_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 64
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, 8
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = and i32 %14, 32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %19
18: ; preds = %13
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [5 x i8] c"WEAK\00"
@.str.1 = [5 x i8] c"GLOB\00"
@.str.2 = [5 x i8] c"COMM\00"
@.str.3 = [5 x i8] c"LOCL\00"
define i8* @bind_name(i32 %0) {
%2 = and i32 %0, 64
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = and i32 %0, 8
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = and i32 %0, 32
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
br label %11
11: ; preds = %7, %4, %1
%12 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %4 ], [ %10, %7 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
void fun3(int a, int b) {
  printf("CFFI test3...");
  assert(a == 1 && b == 2);
  puts("OK");
}


x86 assembly (clang, -O0):
<fun3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1163 <fun3+0x33>
cmpl   $0x2,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun3>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    $0x1,%ebp
xor    $0x2,%ebx
xor    %edi,%edi
or     %ebp,%ebx
sete   %dil
call   1050 <assert@plt>
lea    0xeb1(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"CFFI test3...\00"
@.str.1 = [3 x i8] c"OK\00"
define void @fun3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 2
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ false, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"CFFI test3...\00"
@.str.1 = [3 x i8] c"OK\00"
define void @fun3(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %0, 1
%5 = icmp eq i32 %1, 2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int XStringListToTextProperty() {}


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

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

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

LLVM IR (-O2):
define i32 @XStringListToTextProperty() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x31() {
  Assert_real((isalpha(49) == 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_isalpha.c",
              250, ("isalpha should be 0 for 1"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x31>:
push   %rax
mov    $0x31,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xfa,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 1\00"
define void @t_isalpha_0x31() {
%1 = call i64 @isalpha(i32 49)
%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 250, 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 1\00"
define void @t_isalpha_0x31() {
%1 = tail call i64 @isalpha(i32 49)
%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 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool nrf52_errata_104(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_104() {
ret i32 0
}
/* Variables and functions */
int sqlite3OsSleep(int);
int sqlite3_sleep(int ms) { return sqlite3OsSleep(ms); }


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

x86 assembly (clang, -O2):
<sqlite3_sleep>:
jmp    1030 <sqlite3OsSleep@plt>

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

LLVM IR (-O2):
define i32 @sqlite3_sleep(i32 %0) {
%2 = tail call i32 @sqlite3OsSleep(i32 %0)
ret i32 %2
}
/* Variables and functions */
int read(int, unsigned char *, int);
int os_read(int fd, unsigned char *buf, int sz) {
  int len = 0;
  len = read(fd, buf, sz);
  return (len);
}


x86 assembly (clang, -O0):
<os_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_read>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @os_read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
void clear_bit(unsigned int nr, unsigned long *addr) {
  addr[nr / (8 * sizeof(long))] &= ~(1UL << (nr % (8 * sizeof(long))));
}


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x6,%rcx
and    (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
mov    %edi,%ecx
mov    %edi,%eax
shr    $0x3,%eax
mov    $0xfffffffffffffffe,%rdx
rol    %cl,%rdx
and    $0xfffffff8,%eax
and    %rdx,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = xor i64 %8, -1
%10 = load i64*, i64** %4
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = udiv i64 %12, 64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load i64, i64* %14
%16 = and i64 %15, %9
store i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @clear_bit(i32 %0, i64* nocapture %1) {
%3 = zext i32 %0 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = xor i64 %5, -1
%7 = lshr i64 %3, 6
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, %6
store i64 %10, i64* %8
ret void
}
/* Variables and functions */
char *capitalizar(char *);
int /*<<< orphan*/ printf(char *, char *);
void saludar(char nombre[]) {
  char *nombreCapitalizado = capitalizar(nombre);
  printf("Hola %s!\n", nombreCapitalizado);
}


x86 assembly (clang, -O0):
<saludar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <capitalizar@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saludar>:
push   %rax
call   1030 <capitalizar@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Hola %s!\0A\00"
define void @saludar(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @capitalizar(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Hola %s!\0A\00"
define void @saludar(i8* %0) {
%2 = tail call i8* @capitalizar(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
int MUSIC_Init(int SoundCard, int Address) { return 0; }


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

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

LLVM IR (-O0):
define i32 @MUSIC_Init(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 @MUSIC_Init(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void bl_next_nonstandard_pwm(void) {
  FILE *f;
  f = fopen("/sys/devices/platform/lf1000-dpc/"
            "backlight_next",
            "w");
  if (!f)
    return;
  fprintf(f, "%d", 1);
  fclose(f);
}


x86 assembly (clang, -O0):
<bl_next_nonstandard_pwm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xeea(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115f <bl_next_nonstandard_pwm+0x2f>
jmp    117d <bl_next_nonstandard_pwm+0x4d>
mov    -0x8(%rbp),%rdi
lea    0xec8(%rip),%rsi
mov    $0x1,%edx
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bl_next_nonstandard_pwm>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xef1(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1169 <bl_next_nonstandard_pwm+0x39>
mov    %rax,%rbx
lea    0xedf(%rip),%rsi
mov    %rax,%rdi
mov    $0x1,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"/sys/devices/platform/lf1000-dpc/backlight_next\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"%d\00"
define void @bl_next_nonstandard_pwm() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %6, label %5
5: ; preds = %0
br label %11
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 1)
%9 = load i32*, i32** %1
%10 = call i32 @fclose(i32* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"/sys/devices/platform/lf1000-dpc/backlight_next\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"%d\00"
define void @bl_next_nonstandard_pwm() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 1)
%5 = tail call i32 @fclose(i32* %1)
br label %6
6: ; preds = %0, %3
ret void
}
/* Variables and functions */
double pow(double, double);
double rgbs(double x) {
  if (x <= 0.04045) {
    return x / 12.92;
  } else {
    return pow((x + 0.055) / (1 + 0.055), 2.4);
  }
}


x86 assembly (clang, -O0):
<rgbs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     114b <rgbs+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1176 <rgbs+0x66>
movsd  0xec5(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgbs>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    113b <rgbs+0x2b>
addsd  0xeea(%rip),%xmm0
divsd  0xeea(%rip),%xmm0
movsd  0xeea(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rgbs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 4.045000e-02
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fdiv double %7, 1.292000e+01
store double %8, double* %2
br label %14
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double %10, 5.500000e-02
%12 = fdiv double %11, 1.055000e+00
%13 = call double @pow(double %12, double 2.400000e+00)
store double %13, double* %2
br label %14
14: ; preds = %9, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @rgbs(double %0) {
%2 = fcmp ugt double %0, 4.045000e-02
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv double %0, 1.292000e+01
br label %9
5: ; preds = %1
%6 = fadd double %0, 5.500000e-02
%7 = fdiv double %6, 1.055000e+00
%8 = tail call double @pow(double %7, double 2.400000e+00)
br label %9
9: ; preds = %5, %3
%10 = phi double [ %4, %3 ], [ %8, %5 ]
ret double %10
}
int pathcon_nm5_n_out(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathcon_nm5_n_out() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathcon_nm5_n_out() {
ret i32 2
}
/* Type definitions */
struct token {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
struct token *do_eat_token(struct compile_state *, int);
int /*<<< orphan*/ peek(struct compile_state *);
struct token *eat(struct compile_state *state, int tok) {
  peek(state);
  return do_eat_token(state, tok);
}


x86 assembly (clang, -O0):
<eat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <peek@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <do_eat_token@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <peek@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <do_eat_token@plt>

LLVM IR (-O0):
%struct.token = type { i32 }
%struct.compile_state = type { i32 }
define %struct.token* @eat(%struct.compile_state* %0, i32 %1) {
%3 = alloca %struct.compile_state*
%4 = alloca i32
store %struct.compile_state* %0, %struct.compile_state** %3
store i32 %1, i32* %4
%5 = load %struct.compile_state*, %struct.compile_state** %3
%6 = call i32 @peek(%struct.compile_state* %5)
%7 = load %struct.compile_state*, %struct.compile_state** %3
%8 = load i32, i32* %4
%9 = call %struct.token* @do_eat_token(%struct.compile_state* %7, i32 %8)
ret %struct.token* %9
}

LLVM IR (-O2):
%struct.token = type { i32 }
%struct.compile_state = type { i32 }
define %struct.token* @eat(%struct.compile_state* %0, i32 %1) {
%3 = tail call i32 @peek(%struct.compile_state* %0)
%4 = tail call %struct.token* @do_eat_token(%struct.compile_state* %0, i32 %1)
ret %struct.token* %4
}
int any_zero(unsigned x) { return !!~x; }


x86 assembly (clang, -O0):
<any_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any_zero>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @any_zero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @any_zero(i32 %0) {
%2 = icmp ne i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int hello();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
int main() {
  int a;
  a = hello();
  printf("a is %d", a);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <hello@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <hello@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"a is %d\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @hello()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"a is %d\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 (...) @hello()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int fun683() { return 683; }


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

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

LLVM IR (-O0):
define i32 @fun683() {
ret i32 683
}

LLVM IR (-O2):
define i32 @fun683() {
ret i32 683
}
__attribute__((__const__)) int gumbo_ascii_isdigit(int c) {
  return c >= 0x30 && c <= 0x39;
}


x86 assembly (clang, -O0):
<gumbo_ascii_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <gumbo_ascii_isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gumbo_ascii_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @gumbo_ascii_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @gumbo_ascii_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct pooled_fd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fdpool_clear(struct pooled_fd *);
void fdpool_init(struct pooled_fd *pfd) { fdpool_clear(pfd); }


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

x86 assembly (clang, -O2):
<fdpool_init>:
jmp    1030 <fdpool_clear@plt>

LLVM IR (-O0):
%struct.pooled_fd = type { i32 }
define void @fdpool_init(%struct.pooled_fd* %0) {
%2 = alloca %struct.pooled_fd*
store %struct.pooled_fd* %0, %struct.pooled_fd** %2
%3 = load %struct.pooled_fd*, %struct.pooled_fd** %2
%4 = call i32 @fdpool_clear(%struct.pooled_fd* %3)
ret void
}

LLVM IR (-O2):
%struct.pooled_fd = type { i32 }
define void @fdpool_init(%struct.pooled_fd* %0) {
%2 = tail call i32 @fdpool_clear(%struct.pooled_fd* %0)
ret void
}
/* Type definitions */
struct yffs {
  int dummy;
};

/* Variables and functions */
long yffs_find_file(struct yffs *, char const *);
int yffs_unlink_at(struct yffs *, long, int);
int yffs_unlink(struct yffs *fs, const char *fname, int recursive) {
  long pos = yffs_find_file(fs, fname);
  if (pos < 0)
    return -1;
  return yffs_unlink_at(fs, pos, recursive);
}


x86 assembly (clang, -O0):
<yffs_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <yffs_find_file@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jge    115b <yffs_unlink+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <yffs_unlink+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <yffs_unlink_at@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yffs_unlink>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <yffs_find_file@plt>
test   %rax,%rax
js     1145 <yffs_unlink+0x25>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <yffs_unlink_at@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.yffs = type { i32 }
define i32 @yffs_unlink(%struct.yffs* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.yffs*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
store %struct.yffs* %0, %struct.yffs** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load %struct.yffs*, %struct.yffs** %5
%10 = load i8*, i8** %6
%11 = call i64 @yffs_find_file(%struct.yffs* %9, i8* %10)
store i64 %11, i64* %8
%12 = load i64, i64* %8
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -1, i32* %4
br label %20
15: ; preds = %3
%16 = load %struct.yffs*, %struct.yffs** %5
%17 = load i64, i64* %8
%18 = load i32, i32* %7
%19 = call i32 @yffs_unlink_at(%struct.yffs* %16, i64 %17, i32 %18)
store i32 %19, i32* %4
br label %20
20: ; preds = %15, %14
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
%struct.yffs = type { i32 }
define i32 @yffs_unlink(%struct.yffs* %0, i8* %1, i32 %2) {
%4 = tail call i64 @yffs_find_file(%struct.yffs* %0, i8* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @yffs_unlink_at(%struct.yffs* %0, i64 %4, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int O_RDWR;
int O_WRONLY;
int libc_open(char const *, int);
int /*<<< orphan*/ watch_log(char *, char const *);
int open(const char *path, int flags, ...) {
  if ((flags & O_WRONLY) || (flags & O_RDWR)) {
    watch_log("open %s w\n", path);
  }
  return libc_open(path, flags);
}


x86 assembly (clang, -O0):
<open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e97(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
jne    1159 <open+0x39>
mov    -0xc(%rbp),%eax
mov    0x2e9a(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1169 <open+0x49>
mov    -0x8(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1030 <watch_log@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <libc_open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2ea0(%rip),%rax
test   %esi,(%rax)
jne    113f <open+0x1f>
mov    0x2ead(%rip),%rax
test   %ebx,(%rax)
je     114e <open+0x2e>
lea    0xeba(%rip),%rdi
mov    %r14,%rsi
call   1030 <watch_log@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <libc_open@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_RDWR = global i32 0
@.str = [11 x i8] c"open %s w\0A\00"
define i32 @open(i8* %0, i32 %1, ...) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* @O_WRONLY
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* @O_RDWR
%12 = and i32 %10, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %9, %2
%15 = load i8*, i8** %3
%16 = call i32 @watch_log(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %14, %9
%18 = load i8*, i8** %3
%19 = load i32, i32* %4
%20 = call i32 @libc_open(i8* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_RDWR = global i32 0
@.str = [11 x i8] c"open %s w\0A\00"
define i32 @open(i8* %0, i32 %1, ...) {
%3 = load i32, i32* @O_WRONLY
%4 = and i32 %3, %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load i32, i32* @O_RDWR
%8 = and i32 %7, %1
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %6, %2
%11 = tail call i32 @watch_log(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %12
12: ; preds = %10, %6
%13 = tail call i32 @libc_open(i8* %0, i32 %1)
ret i32 %13
}
int Init_Socket(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Init_Socket() {
ret i32 0
}
/* Variables and functions */
float DistributionGGX(float, float);
float Distribution(float roughness, float NdotH) {
  return DistributionGGX(roughness, NdotH);
}


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

x86 assembly (clang, -O2):
<Distribution>:
jmp    1030 <DistributionGGX@plt>

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

LLVM IR (-O2):
define float @Distribution(float %0, float %1) {
%3 = tail call float @DistributionGGX(float %0, float %1)
ret float %3
}
void ff_hevc_put_hevc_qpel_hv48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv48_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ monitor_put(char const);
void monitor_write(const char *c) {
  int i = 0;
  while (c[i]) {
    monitor_put(c[i++]);
  }
}


x86 assembly (clang, -O0):
<monitor_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <monitor_write+0x45>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <monitor_put@plt>
jmp    1123 <monitor_write+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monitor_write>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <monitor_write+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <monitor_put@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <monitor_write+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @monitor_write(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = add nuw i64 %5, 1
%8 = tail call i32 @monitor_put(i8 signext %6)
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ load_data();
void restore_db() { load_data(); }


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

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

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

LLVM IR (-O2):
define void @restore_db() {
%1 = tail call i32 (...) @load_data()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sys_exit(int /*<<< orphan*/);
int /*<<< orphan*/ sys_write(int, char const *, int);
void _start(void) {
  const char msg[] = "hello world\n";
  sys_write(1, msg, sizeof msg - 1);
  sys_exit(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xd(%rbp),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1040 <sys_write@plt>
xor    %edi,%edi
call   1030 <sys_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
sub    $0x18,%rsp
movabs $0xa646c726f7720,%rax
mov    %rax,0xd(%rsp)
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1040 <sys_write@plt>
xor    %edi,%edi
call   1030 <sys_exit@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const._start.msg = [13 x i8] c"hello world\0A\00"
define void @_start() {
%1 = alloca [13 x i8]
%2 = bitcast [13 x i8]* %1 to i8*
%3 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%4 = call i32 @sys_write(i32 1, i8* %3, i32 12)
%5 = call i32 @sys_exit(i32 0)
ret void
}

LLVM IR (-O2):
@__const._start.msg = [13 x i8] c"hello world\0A\00"
define void @_start() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @sys_write(i32 1, i8* %2, i32 12)
%4 = call i32 @sys_exit(i32 0)
ret void
}
/* Variables and functions */
bool nrf52_errata_102(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_102() {
ret i32 0
}
void libsym(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @ts_warn_break() {
ret i32 0
}
int find(int *a, int l, int n) {
  int i;
  for (i = 0; i < l; ++i) {
    if (a[i] == n)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <find+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1141 <find+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <find+0x5b>
jmp    1146 <find+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <find+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find>:
test   %esi,%esi
jle    111e <find+0x1e>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rdi,%rcx,4)
je     1121 <find+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <find+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @find(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %2
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pixel_avg_wxh(int /*<<< orphan*/ *, int,
                                 int /*<<< orphan*/ *, int, int, int);
void pixel_avg_8x8(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                   int i_stride_pix2) {
  pixel_avg_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 8, 8);
}


x86 assembly (clang, -O0):
<pixel_avg_8x8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x8,%r9d
mov    %r9d,%r8d
call   1030 <pixel_avg_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_avg_8x8>:
mov    $0x8,%r8d
mov    $0x8,%r9d
jmp    1030 <pixel_avg_wxh@plt>

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

LLVM IR (-O2):
define void @pixel_avg_8x8(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_avg_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 8, i32 8)
ret void
}
char *BakName(fname)
char *fname;
{
  static char buf[256];
  strcpy(buf, fname);
  strcat(buf, ".bak");
  return buf;
}


x86 assembly (clang, -O0):
<BakName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2efd(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1040 <strcat@plt>
lea    0x2eea(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BakName>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f15(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movl   $0x6b61622e,(%rax,%rbx,1)
movb   $0x0,0x4(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@BakName.buf = internal global [256 x i8] zeroinitializer
@.str = [5 x i8] c".bak\00"
define i8* @BakName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 0), i8* %3)
%5 = call i8* @strcat(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@BakName.buf = internal global [256 x i8] zeroinitializer
@.str = [5 x i8] c".bak\00"
define i8* @BakName(i8* nocapture %0) {
%2 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 0), i8* dereferenceable(1) %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 0))
%4 = getelementptr [256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 %3
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(5) %4, i8* align 1 dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5, i1 false)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @BakName.buf, i64 0, i64 0)
}
/* Variables and functions */
double cubic(double);
double square(double);
double power5(double x) { return cubic(x) * square(x); }


x86 assembly (clang, -O0):
<power5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cubic@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <square@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power5>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <cubic@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <square@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @power5(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @cubic(double %3)
%5 = load double, double* %2
%6 = call double @square(double %5)
%7 = fmul double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @power5(double %0) {
%2 = tail call double @cubic(double %0)
%3 = tail call double @square(double %0)
%4 = fmul double %2, %3
ret double %4
}
/* Variables and functions */
double pow(int, double);
double bias_HI(double z) { return 0.904 + 0.135 * pow(1 + z, 1.696); }


x86 assembly (clang, -O0):
<bias_HI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xeda(%rip),%xmm0
call   1030 <pow@plt>
movsd  0xebd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bias_HI>:
push   %rax
addsd  0xee7(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xee3(%rip),%xmm0
call   1030 <pow@plt>
mulsd  0xede(%rip),%xmm0
addsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @bias_HI(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 1.000000e+00, %3
%5 = fptosi double %4 to i32
%6 = call double @pow(i32 %5, double 1.696000e+00)
%7 = call double @llvm.fmuladd.f64(double 1.350000e-01, double %6, double 9.040000e-01)
ret double %7
}

LLVM IR (-O2):
define double @bias_HI(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = fptosi double %2 to i32
%4 = tail call double @pow(i32 %3, double 1.696000e+00)
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.350000e-01, double 9.040000e-01)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x3e() {
  Assert_real((isspace(62) == 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_isspace.c",
              315, ("isspace should be 0 for >"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x3e>:
push   %rax
mov    $0x3e,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x13b,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for >\00"
define void @t_isspace_0x3e() {
%1 = call i64 @isspace(i32 62)
%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 315, 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for >\00"
define void @t_isspace_0x3e() {
%1 = tail call i64 @isspace(i32 62)
%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 315, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void Write_Char(char c, int n) {
  char buf[4];
  buf[0] = c;
  for (; n > 0; n--)
    write(1, buf, 1);
}


x86 assembly (clang, -O0):
<Write_Char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114f <Write_Char+0x3f>
lea    -0xc(%rbp),%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <Write_Char+0x17>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write_Char>:
push   %r14
push   %rbx
push   %rax
mov    %dil,0x4(%rsp)
test   %esi,%esi
jle    114a <Write_Char+0x3a>
mov    %esi,%ebx
add    $0x1,%ebx
lea    0x4(%rsp),%r14
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <Write_Char+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Write_Char(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca [4 x i8]
store i8 %0, i8* %3
store i32 %1, i32* %4
%6 = load i8, i8* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8 %6, i8* %7
br label %8
8: ; preds = %14, %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%13 = call i32 @write(i32 1, i8* %12, i32 1)
br label %14
14: ; preds = %11
%15 = load i32, i32* %4
%16 = add nsw i32 %15, -1
store i32 %16, i32* %4
br label %8
17: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @Write_Char(i8 signext %0, i32 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %1, %2 ]
%8 = call i32 @write(i32 1, i8* %4, i32 1)
%9 = add nsw i32 %7, -1
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %11
11: ; preds = %6, %2
ret void
}