xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *);
void *pthread_function(void *ptr) {
  execl("/bin/ls", "ls", "-l", (char *)0);
  printf("No");
  return 0;
}


x86 assembly (clang, -O0):
<pthread_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xecb(%rip),%rsi
lea    0xec7(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <execl@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_function>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
lea    0xed2(%rip),%rdx
xor    %ecx,%ecx
call   1040 <execl@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"No\00"
define i8* @pthread_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* null)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [3 x i8] c"-l\00"
@.str.3 = [3 x i8] c"No\00"
define noalias i8* @pthread_function(i8* nocapture readnone %0) {
%2 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* null)
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
ret i8* null
}
int __attribute__((no)) special_add(int x, int y) {
  if (y == 666)
    return x + y + 123;
  else
    return x + y;
}


x86 assembly (clang, -O0):
<special_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x29a,-0xc(%rbp)
jne    1128 <special_add+0x28>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x7b,%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <special_add+0x31>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<special_add>:
cmp    $0x29a,%esi
mov    $0x315,%eax
cmovne %esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @special_add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 666
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
%12 = add nsw i32 %11, 123
store i32 %12, i32* %3
br label %17
13: ; preds = %2
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @special_add(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 666
%4 = select i1 %3, i32 789, i32 %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
void gdGdcExecServer(void) {}


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

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

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

LLVM IR (-O2):
define void @gdGdcExecServer() {
ret void
}
/* Type definitions */
struct config {
  int dummy;
};

/* Variables and functions */
struct config *emulab_init(void) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.config = type { i32 }
define %struct.config* @emulab_init() {
ret %struct.config* null
}

LLVM IR (-O2):
%struct.config = type { i32 }
define noalias %struct.config* @emulab_init() {
ret %struct.config* null
}
/* Variables and functions */
int /*<<< orphan*/ absolutey();
int /*<<< orphan*/ adc8(int /*<<< orphan*/);
int /*<<< orphan*/ readmem65816(int /*<<< orphan*/);
void adcAbsy8(void) { adc8(readmem65816(absolutey())); }


x86 assembly (clang, -O0):
<adcAbsy8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <absolutey@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
call   1040 <adc8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adcAbsy8>:
push   %rax
xor    %eax,%eax
call   1030 <absolutey@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <adc8@plt>

LLVM IR (-O0):
define void @adcAbsy8() {
%1 = call i32 (...) @absolutey()
%2 = call i32 @readmem65816(i32 %1)
%3 = call i32 @adc8(i32 %2)
ret void
}

LLVM IR (-O2):
define void @adcAbsy8() {
%1 = tail call i32 (...) @absolutey()
%2 = tail call i32 @readmem65816(i32 %1)
%3 = tail call i32 @adc8(i32 %2)
ret void
}
void INT_Excep_RIIC0_ICTEI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC0_ICTEI0() {
ret void
}
/* Variables and functions */
int *paging_findpte(int);
int paging_mapvirt2phys(int virtaddr, int physframe) {
  int *pte = paging_findpte(virtaddr);
  int flags = (int)pte & 0x00000FFF;
  int physaddr = physframe * 4096;
  pte = physaddr;
  pte = (int)pte | flags;
  return 1;
}


x86 assembly (clang, -O0):
<paging_mapvirt2phys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <paging_findpte@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xfff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xc,%eax
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     -0x14(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paging_mapvirt2phys>:
push   %rax
call   1030 <paging_findpte@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @paging_mapvirt2phys(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = call i32* @paging_findpte(i32 %8)
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = ptrtoint i32* %10 to i32
%12 = and i32 %11, 4095
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 4096
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store i32* %17, i32** %5
%18 = load i32*, i32** %5
%19 = ptrtoint i32* %18 to i32
%20 = load i32, i32* %6
%21 = or i32 %19, %20
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
store i32* %23, i32** %5
ret i32 1
}

LLVM IR (-O2):
define i32 @paging_mapvirt2phys(i32 %0, i32 %1) {
%3 = tail call i32* @paging_findpte(i32 %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ motor(int, int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ off(int);
int /*<<< orphan*/ printf(char *);
void haveSomeFun() {
  printf("You do the Hoooooookey Pokey!\n");
  motor(3, 100);
  msleep(2500);
  off(3);
}


x86 assembly (clang, -O0):
<haveSomeFun>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1060 <printf@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x9c4,%edi
call   1050 <msleep@plt>
mov    $0x3,%edi
call   1040 <off@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<haveSomeFun>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x9c4,%edi
call   1060 <msleep@plt>
mov    $0x3,%edi
pop    %rax
jmp    1050 <off@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"You do the Hoooooookey Pokey!\0A\00"
define void @haveSomeFun() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @motor(i32 3, i32 100)
%3 = call i32 @msleep(i32 2500)
%4 = call i32 @off(i32 3)
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"You do the Hoooooookey Pokey!\00"
define void @haveSomeFun() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @motor(i32 3, i32 100)
%3 = tail call i32 @msleep(i32 2500)
%4 = tail call i32 @off(i32 3)
ret void
}
/* Variables and functions */
int rfork(int);
int fork(void) { return rfork((1 << 8) | (1 << 10) | (1 << 0)); }


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

x86 assembly (clang, -O2):
<fork>:
mov    $0x501,%edi
jmp    1030 <rfork@plt>

LLVM IR (-O0):
define i32 @fork() {
%1 = call i32 @rfork(i32 1281)
ret i32 %1
}

LLVM IR (-O2):
define i32 @fork() {
%1 = tail call i32 @rfork(i32 1281)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x03() {
  Assert_real((isascii(3)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              20, ("isascii should be 1 for 0x03"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x03>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x14,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x03\00"
define void @t_isascii_0x03() {
%1 = call i32 @isascii(i32 3)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 20, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x03\00"
define void @t_isascii_0x03() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct _perf_cpu {
  int dummy;
};

/* Variables and functions */
int pf_profiling_start(struct _perf_cpu *, int /*<<< orphan*/);
int pf_profiling_allstart(struct _perf_cpu *cpu) {
  return (pf_profiling_start(cpu, 0));
}


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

x86 assembly (clang, -O2):
<pf_profiling_allstart>:
xor    %esi,%esi
jmp    1030 <pf_profiling_start@plt>

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

LLVM IR (-O2):
%struct._perf_cpu = type { i32 }
define i32 @pf_profiling_allstart(%struct._perf_cpu* %0) {
%2 = tail call i32 @pf_profiling_start(%struct._perf_cpu* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
size_t bytes_per_sample(char typechar) {
  switch (typechar) {
  case 'S':
  case 'U':
  case 'f':
    return 4;
  case 'd':
    return 8;
  }
  assert(1 == 0);
  return 0;
}


x86 assembly (clang, -O0):
<bytes_per_sample>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
add    $0xffffffad,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x13,%eax
ja     1162 <bytes_per_sample+0x52>
mov    -0x18(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x4,-0x8(%rbp)
jmp    1171 <bytes_per_sample+0x61>
movq   $0x8,-0x8(%rbp)
jmp    1171 <bytes_per_sample+0x61>
xor    %edi,%edi
call   1030 <assert@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_per_sample>:
push   %rbx
add    $0xffffffad,%edi
cmp    $0x13,%edi
ja     1135 <bytes_per_sample+0x25>
mov    $0x4,%ebx
lea    0xedb(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x8,%ebx
jmp    113e <bytes_per_sample+0x2e>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @bytes_per_sample(i8 signext %0) {
%2 = alloca i64
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 83, label %6
i32 85, label %6
i32 102, label %6
i32 100, label %7
]
6: ; preds = %1, %1, %1
store i64 4, i64* %2
br label %10
7: ; preds = %1
store i64 8, i64* %2
br label %10
8: ; preds = %1
%9 = call i32 @assert(i32 0)
store i64 0, i64* %2
br label %10
10: ; preds = %8, %7, %6
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
define i64 @bytes_per_sample(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 83, label %6
i32 85, label %6
i32 102, label %6
i32 100, label %3
]
3: ; preds = %1
br label %6
4: ; preds = %1
%5 = tail call i32 @assert(i32 0)
br label %6
6: ; preds = %1, %1, %1, %4, %3
%7 = phi i64 [ 0, %4 ], [ 8, %3 ], [ 4, %1 ], [ 4, %1 ], [ 4, %1 ]
ret i64 %7
}
void Mark_Pixel(int X, int Y, unsigned char R, unsigned char G, unsigned char B,
                unsigned char *Frame, int Width) {
  int I;
  I = 3 * (Y * Width + X);
  Frame[I] = R;
  Frame[I + 1] = G;
  Frame[I + 2] = B;
}


x86 assembly (clang, -O0):
<Mark_Pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %r8b,%al
mov    0x10(%rbp),%r8d
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %cl,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    %r9,-0x18(%rbp)
mov    -0x8(%rbp),%eax
imul   0x10(%rbp),%eax
add    -0x4(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x9(%rbp),%dl
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xa(%rbp),%dl
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xb(%rbp),%dl
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mark_Pixel>:
imul   0x8(%rsp),%esi
add    %edi,%esi
movslq %esi,%rax
lea    (%rax,%rax,2),%rax
mov    %dl,(%r9,%rax,1)
mov    %cl,0x1(%r9,%rax,1)
mov    %r8b,0x2(%r9,%rax,1)
ret

LLVM IR (-O0):
define void @Mark_Pixel(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %4, i8* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
%11 = alloca i8
%12 = alloca i8
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i8 %2, i8* %10
store i8 %3, i8* %11
store i8 %4, i8* %12
store i8* %5, i8** %13
store i32 %6, i32* %14
%16 = load i32, i32* %9
%17 = load i32, i32* %14
%18 = mul nsw i32 %16, %17
%19 = load i32, i32* %8
%20 = add nsw i32 %18, %19
%21 = mul nsw i32 3, %20
store i32 %21, i32* %15
%22 = load i8, i8* %10
%23 = load i8*, i8** %13
%24 = load i32, i32* %15
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
store i8 %22, i8* %26
%27 = load i8, i8* %11
%28 = load i8*, i8** %13
%29 = load i32, i32* %15
%30 = add nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %28, i64 %31
store i8 %27, i8* %32
%33 = load i8, i8* %12
%34 = load i8*, i8** %13
%35 = load i32, i32* %15
%36 = add nsw i32 %35, 2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %34, i64 %37
store i8 %33, i8* %38
ret void
}

LLVM IR (-O2):
define void @Mark_Pixel(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %4, i8* nocapture writeonly %5, i32 %6) {
%8 = mul nsw i32 %6, %1
%9 = add nsw i32 %8, %0
%10 = mul nsw i32 %9, 3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %5, i64 %11
store i8 %2, i8* %12
%13 = add nsw i32 %10, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %5, i64 %14
store i8 %3, i8* %15
%16 = add nsw i32 %10, 2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %5, i64 %17
store i8 %4, i8* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trio_fpclassify_and_signbit(double, int *);
__attribute__((visibility("default"))) int trio_signbit(double number) {
  int is_negative;
  (void)trio_fpclassify_and_signbit(number, &is_negative);
  return is_negative;
}


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

x86 assembly (clang, -O2):
<trio_signbit>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <trio_fpclassify_and_signbit@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @trio_signbit(double %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @trio_fpclassify_and_signbit(double %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sig_daem_stop_handle(int signal) {
  printf("Preparing to exit the process.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<sig_daem_stop_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_daem_stop_handle>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Preparing to exit the process.\0A\00"
define void @sig_daem_stop_handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [31 x i8] c"Preparing to exit the process.\00"
define void @sig_daem_stop_handle(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void test_40_2(int *mem) { __atomic_xor_fetch(mem, -1, 4); }


x86 assembly (clang, -O0):
<test_40_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
xor    %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test_40_2+0x4b>
jmp    1122 <test_40_2+0x22>
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_40_2>:
lock xorl $0xffffffff,(%rdi)
ret

LLVM IR (-O0):
define void @test_40_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 -1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw xor i32* %5, i32 %6 acq_rel
%8 = xor i32 %7, %6
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_40_2(i32* nocapture %0) {
%2 = atomicrmw xor i32* %0, i32 -1 acq_rel
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_pointer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_destroy(struct wl_proxy *);
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int);
void wl_pointer_release(struct wl_pointer *wl_pointer) {
  wl_proxy_marshal((struct wl_proxy *)wl_pointer, 1);
  wl_proxy_destroy((struct wl_proxy *)wl_pointer);
}


x86 assembly (clang, -O0):
<wl_pointer_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <wl_proxy_marshal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wl_proxy_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_pointer_release>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <wl_proxy_marshal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wl_proxy_destroy@plt>

LLVM IR (-O0):
%struct.wl_pointer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_pointer_release(%struct.wl_pointer* %0) {
%2 = alloca %struct.wl_pointer*
store %struct.wl_pointer* %0, %struct.wl_pointer** %2
%3 = load %struct.wl_pointer*, %struct.wl_pointer** %2
%4 = bitcast %struct.wl_pointer* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 1)
%6 = load %struct.wl_pointer*, %struct.wl_pointer** %2
%7 = bitcast %struct.wl_pointer* %6 to %struct.wl_proxy*
%8 = call i32 @wl_proxy_destroy(%struct.wl_proxy* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_pointer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_pointer_release(%struct.wl_pointer* %0) {
%2 = bitcast %struct.wl_pointer* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %2, i32 1)
%4 = tail call i32 @wl_proxy_destroy(%struct.wl_proxy* %2)
ret void
}
int sum(int n) {
  if (n > 0)
    return n + sum(n - 1);
  else
    return 0;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1145 <sum+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <sum@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    114c <sum+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
test   %edi,%edi
jle    1119 <sum+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sum(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ inv_host_serif_get_instance();
int inv_host_serif_register_interrupt_callback(int /*<<< orphan*/,
                                               void (*)(void *, int), void *);
int inv_host_serif_register_interrupt_callback_i(
    void (*interrupt_cb)(void *context, int int_num), void *context) {
  return inv_host_serif_register_interrupt_callback(
      inv_host_serif_get_instance(), interrupt_cb, context);
}


x86 assembly (clang, -O0):
<inv_host_serif_register_interrupt_callback_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <inv_host_serif_get_instance@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <inv_host_serif_register_interrupt_callback@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_host_serif_register_interrupt_callback_i>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <inv_host_serif_get_instance@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <inv_host_serif_register_interrupt_callback@plt>

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

LLVM IR (-O2):
define i32 @inv_host_serif_register_interrupt_callback_i(void (i8*, i32)* %0, i8* %1) {
%3 = tail call i32 (...) @inv_host_serif_get_instance()
%4 = tail call i32 @inv_host_serif_register_interrupt_callback(i32 %3, void (i8*, i32)* %0, i8* %1)
ret i32 %4
}
unsigned short ptr_low(void *p) {
  unsigned long x = (unsigned long)p;
  return x & 0xffff;
}


x86 assembly (clang, -O0):
<ptr_low>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffff,%rax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_low>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define zeroext i16 @ptr_low(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = and i64 %6, 65535
%8 = trunc i64 %7 to i16
ret i16 %8
}

LLVM IR (-O2):
define zeroext i16 @ptr_low(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i16
ret i16 %3
}
void dget_locked(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<dget_locked>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dget_locked>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.dget_locked = [12 x i8] c"dget_locked\00"
define void @dget_locked() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.dget_locked, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.dget_locked = [12 x i8] c"dget_locked\00"
define void @dget_locked() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.dget_locked, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void HeapFreeMem(void *Mem) { free(Mem); }


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

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

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

LLVM IR (-O2):
define void @HeapFreeMem(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
char *logBool(int aValue) { return aValue ? "true" : "false"; }


x86 assembly (clang, -O0):
<logBool>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef4(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logBool>:
test   %edi,%edi
lea    0xefc(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @logBool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @logBool(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int dummy_init();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int scanner_init(void) {
  int err;
  err = dummy_init();
  if (err) {
    fprintf(stderr, "error: dummy_init() returned %d\n", err);
    return err;
  }
  return 0;
}


x86 assembly (clang, -O0):
<scanner_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <dummy_init@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115f <scanner_init+0x3f>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <scanner_init+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanner_init>:
push   %rbx
xor    %eax,%eax
call   1040 <dummy_init@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1145 <scanner_init+0x25>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"error: dummy_init() returned %d\0A\00"
define i32 @scanner_init() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @dummy_init()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = load i32, i32* %2
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
store i32 %10, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"error: dummy_init() returned %d\0A\00"
define i32 @scanner_init() {
%1 = tail call i32 (...) @dummy_init()
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %6
6: ; preds = %0, %3
ret i32 %1
}
/* Variables and functions */
char isxdigit(unsigned char c) {
  if ((c >= ((unsigned char)'0') && c <= ((unsigned char)'9')) ||
      (c >= ((unsigned char)'a') && c <= ((unsigned char)'f')) ||
      (c >= ((unsigned char)'A') && c <= ((unsigned char)'F')))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <isxdigit+0x24>
movzbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jle    1158 <isxdigit+0x58>
movzbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     113e <isxdigit+0x3e>
movzbl -0x2(%rbp),%eax
cmp    $0x66,%eax
jle    1158 <isxdigit+0x58>
movzbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1161 <isxdigit+0x61>
movzbl -0x2(%rbp),%eax
cmp    $0x46,%eax
jg     1161 <isxdigit+0x61>
movb   $0x1,-0x1(%rbp)
jmp    1165 <isxdigit+0x65>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %cl
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %al
or     %cl,%al
ret

LLVM IR (-O0):
define signext i8 @isxdigit(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %27, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = icmp sle i32 %17, 102
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = icmp sge i32 %21, 65
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = zext i8 %24 to i32
%26 = icmp sle i32 %25, 70
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
store i8 1, i8* %2
br label %29
28: ; preds = %23, %19
store i8 0, i8* %2
br label %29
29: ; preds = %28, %27
%30 = load i8, i8* %2
ret i8 %30
}

LLVM IR (-O2):
define signext i8 @isxdigit(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i8
ret i8 %8
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_IntUnregister(int);
void stub1(uint32_t);
void AESIntUnregister(void) {
  ((void (*)(uint32_t ui32Interrupt))(
      (uint32_t *)(((uint32_t *)0x10000180)[12]))[5])(39);
  NOROM_IntUnregister(39);
}


x86 assembly (clang, -O0):
<AESIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000180,%eax
mov    0x60(%rax),%rax
mov    $0x27,%edi
call   *0x28(%rax)
mov    $0x27,%edi
call   1030 <NOROM_IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESIntUnregister>:
push   %rax
mov    0x100001e0,%rax
10
mov    $0x27,%edi
call   *0x28(%rax)
mov    $0x27,%edi
pop    %rax
jmp    1030 <NOROM_IntUnregister@plt>

LLVM IR (-O0):
define void @AESIntUnregister() {
%1 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 268435840 to i64*), i64 12)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 5
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
%6 = call i32 @NOROM_IntUnregister(i32 39)
ret void
}

LLVM IR (-O2):
define void @AESIntUnregister() {
%1 = load i64, i64* inttoptr (i64 268435936 to i64*)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 5
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
tail call void %5(i64 39)
%6 = tail call i32 @NOROM_IntUnregister(i32 39)
ret void
}
/* Variables and functions */
double exp(double);
double q3(double indice) {
  double A = 102.6, B = -0.1101;
  if (indice > 30)
    return 2.0;
  indice = A * exp((B * indice));
  return indice;
}


x86 assembly (clang, -O0):
<q3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeeb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <q3+0x50>
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <q3+0x84>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q3>:
push   %rax
ucomisd 0xeef(%rip),%xmm0
jbe    1125 <q3+0x15>
movsd  0xedd(%rip),%xmm0
pop    %rax
ret
mulsd  0xee3(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @q3(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double 1.026000e+02, double* %4
store double -1.101000e-01, double* %5
%6 = load double, double* %3
%7 = fcmp ogt double %6, 3.000000e+01
br i1 %7, label %8, label %9
8: ; preds = %1
store double 2.000000e+00, double* %2
br label %17
9: ; preds = %1
%10 = load double, double* %4
%11 = load double, double* %5
%12 = load double, double* %3
%13 = fmul double %11, %12
%14 = call double @exp(double %13)
%15 = fmul double %10, %14
store double %15, double* %3
%16 = load double, double* %3
store double %16, double* %2
br label %17
17: ; preds = %9, %8
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @q3(double %0) {
%2 = fcmp ogt double %0, 3.000000e+01
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fmul double %0, -1.101000e-01
%5 = tail call double @exp(double %4)
%6 = fmul double %5, 1.026000e+02
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 2.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ ParamWrite(int, int);
void init_app_slowadt7410() {
  ParamWrite(0x0000, 0x007C);
  ParamWrite(0x0001, 0x0000);
  ParamWrite(0x0002, 0x0000);
  ParamWrite(0x0003, 0x000A);
  ParamWrite(0x0004, 0x001E);
  ParamWrite(0x0005, 0x0000);
  ParamWrite(0x0006, 0x5DC0);
}


x86 assembly (clang, -O0):
<init_app_slowadt7410>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x7c,%esi
call   1030 <ParamWrite@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x3,%edi
mov    $0xa,%esi
call   1030 <ParamWrite@plt>
mov    $0x4,%edi
mov    $0x1e,%esi
call   1030 <ParamWrite@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x6,%edi
mov    $0x5dc0,%esi
call   1030 <ParamWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_app_slowadt7410>:
push   %rax
xor    %edi,%edi
mov    $0x7c,%esi
call   1030 <ParamWrite@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x3,%edi
mov    $0xa,%esi
call   1030 <ParamWrite@plt>
mov    $0x4,%edi
mov    $0x1e,%esi
call   1030 <ParamWrite@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <ParamWrite@plt>
mov    $0x6,%edi
mov    $0x5dc0,%esi
pop    %rax
jmp    1030 <ParamWrite@plt>

LLVM IR (-O0):
define void @init_app_slowadt7410() {
%1 = call i32 @ParamWrite(i32 0, i32 124)
%2 = call i32 @ParamWrite(i32 1, i32 0)
%3 = call i32 @ParamWrite(i32 2, i32 0)
%4 = call i32 @ParamWrite(i32 3, i32 10)
%5 = call i32 @ParamWrite(i32 4, i32 30)
%6 = call i32 @ParamWrite(i32 5, i32 0)
%7 = call i32 @ParamWrite(i32 6, i32 24000)
ret void
}

LLVM IR (-O2):
define void @init_app_slowadt7410() {
%1 = tail call i32 @ParamWrite(i32 0, i32 124)
%2 = tail call i32 @ParamWrite(i32 1, i32 0)
%3 = tail call i32 @ParamWrite(i32 2, i32 0)
%4 = tail call i32 @ParamWrite(i32 3, i32 10)
%5 = tail call i32 @ParamWrite(i32 4, i32 30)
%6 = tail call i32 @ParamWrite(i32 5, i32 0)
%7 = tail call i32 @ParamWrite(i32 6, i32 24000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_114() {
  Assert_real((isqrt(114) == 10),
              "/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/stdlib/isqrt.c",
              575, ("Integer square root of 114 should be 10"));
}


x86 assembly (clang, -O0):
<t_sqrt_114>:
push   %rbp
mov    %rsp,%rbp
mov    $0x72,%edi
call   1030 <isqrt@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x23f,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_114>:
push   %rax
mov    $0x72,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x23f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 114 should be 10\00"
define void @t_sqrt_114() {
%1 = call i32 @isqrt(i32 114)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 575, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 114 should be 10\00"
define void @t_sqrt_114() {
%1 = tail call i32 @isqrt(i32 114)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 575, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int);
int startsWithString(const char *check, const char *string) {
  int cLen = strlen(check);
  int sLen = strlen(string);
  if (cLen >= sLen) {
    return (strncmp(check, string, sLen)) ? 0 : 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<startsWithString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jl     117d <startsWithString+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1030 <strncmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <startsWithString+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startsWithString>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
xor    %eax,%eax
cmp    %edx,%ebp
jl     1157 <startsWithString+0x37>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @startsWithString(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %6
%10 = load i8*, i8** %5
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %23
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = load i32, i32* %7
%19 = call i64 @strncmp(i8* %16, i8* %17, i32 %18)
%20 = icmp ne i64 %19, 0
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 0, i32 1
store i32 %22, i32* %3
br label %24
23: ; preds = %2
store i32 0, i32* %3
br label %24
24: ; preds = %23, %15
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @startsWithString(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp slt i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %4)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
void __eprintf(const char *string, const char *expression, int line,
               const char *filename) {
  fprintf(stderr, string, expression, line, filename);
  fflush(stderr);
  abort();
}


x86 assembly (clang, -O0):
<__eprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
call   1040 <fprintf@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__eprintf>:
push   %rbx
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2e9d(%rip),%rbx
mov    (%rbx),%edi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @__eprintf(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = call i32 @fprintf(i32 %9, i8* %10, i8* %11, i32 %12, i8* %13)
%15 = load i32, i32* @stderr
%16 = call i32 @fflush(i32 %15)
%17 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @__eprintf(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* %0, i8* %1, i32 %2, i8* %3)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
hci_event_authentication_complete_event_get_status(const uint8_t *event) {
  return event[2];
}


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

x86 assembly (clang, -O2):
<hci_event_authentication_complete_event_get_status>:
mov    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hci_event_authentication_complete_event_get_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hci_event_authentication_complete_event_get_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
void fsemu_recording_begin_frame(void) {}


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

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

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

LLVM IR (-O2):
define void @fsemu_recording_begin_frame() {
ret void
}
long PEOPS_SPUconfigure(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @PEOPS_SPUconfigure() {
ret i64 0
}

LLVM IR (-O2):
define i64 @PEOPS_SPUconfigure() {
ret i64 0
}
void call0b(short s, int i, long l, char c) {
  s = 6;
  i = 7;
  l = 8;
  c = 'j';
}


x86 assembly (clang, -O0):
<call0b>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movw   $0x6,-0x2(%rbp)
movl   $0x7,-0x8(%rbp)
movq   $0x8,-0x10(%rbp)
movb   $0x6a,-0x11(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call0b(i16 signext %0, i32 %1, i64 %2, i8 signext %3) {
%5 = alloca i16
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8
store i16 %0, i16* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i8 %3, i8* %8
store i16 6, i16* %5
store i32 7, i32* %6
store i64 8, i64* %7
store i8 106, i8* %8
ret void
}

LLVM IR (-O2):
define void @call0b(i16 signext %0, i32 %1, i64 %2, i8 signext %3) {
ret void
}