xunge/DecIR huggingface dataset:
double gsl_pow_6(const double x) {
  double x2 = x * x;
  return x2 * x2 * x2;
}


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

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

LLVM IR (-O0):
define double @gsl_pow_6(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double %4, %5
store double %6, double* %3
%7 = load double, double* %3
%8 = load double, double* %3
%9 = fmul double %7, %8
%10 = load double, double* %3
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @gsl_pow_6(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %2
%4 = fmul double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ Term_user(int /*<<< orphan*/);
void do_cmd_port(void) { (void)Term_user(0); }


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

x86 assembly (clang, -O2):
<do_cmd_port>:
xor    %edi,%edi
jmp    1030 <Term_user@plt>

LLVM IR (-O0):
define void @do_cmd_port() {
%1 = call i32 @Term_user(i32 0)
ret void
}

LLVM IR (-O2):
define void @do_cmd_port() {
%1 = tail call i32 @Term_user(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRS_ISR();
int /*<<< orphan*/ RCC_ISR();
void RCC_CRS_ISR(void) {
  RCC_ISR();
  CRS_ISR();
}


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

x86 assembly (clang, -O2):
<RCC_CRS_ISR>:
push   %rax
xor    %eax,%eax
call   1030 <RCC_ISR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <CRS_ISR@plt>

LLVM IR (-O0):
define void @RCC_CRS_ISR() {
%1 = call i32 (...) @RCC_ISR()
%2 = call i32 (...) @CRS_ISR()
ret void
}

LLVM IR (-O2):
define void @RCC_CRS_ISR() {
%1 = tail call i32 (...) @RCC_ISR()
%2 = tail call i32 (...) @CRS_ISR()
ret void
}
long long foo2(long long x) { return __builtin_popcountll(x); }


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
mov    %rdi,%rax
shr    %rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rax,%rcx
sub    %rcx,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rdi,%rax
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rax,%rcx
movabs $0xf0f0f0f0f0f0f0f,%rdx
0f 0f 0f
and    %rcx,%rdx
movabs $0x101010101010101,%rax
01 01 01
imul   %rdx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i64 @foo2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctpop.i64(i64 %3)
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @foo2(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int O_NONBLOCK;
int fd_set_flags(int, int);
int fd_clear_nonblocking(int fd, int flags) {
  return fd_set_flags(fd, flags & (~O_NONBLOCK));
}


x86 assembly (clang, -O0):
<fd_clear_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    %eax,%esi
call   1030 <fd_set_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_clear_nonblocking>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %eax,%esi
jmp    1030 <fd_set_flags@plt>

LLVM IR (-O0):
@O_NONBLOCK = global i32 0
define i32 @fd_clear_nonblocking(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = load i32, i32* @O_NONBLOCK
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = call i32 @fd_set_flags(i32 %5, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@O_NONBLOCK = global i32 0
define i32 @fd_clear_nonblocking(i32 %0, i32 %1) {
%3 = load i32, i32* @O_NONBLOCK
%4 = xor i32 %3, -1
%5 = and i32 %4, %1
%6 = tail call i32 @fd_set_flags(i32 %0, i32 %5)
ret i32 %6
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
char *get_safe_text(void) {
  char *plain_text = malloc(sizeof(char));
  printf("input safe text: ");
  scanf("%s", plain_text);
  return plain_text;
}


x86 assembly (clang, -O0):
<get_safe_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_safe_text>:
push   %rbx
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"input safe text: \00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @get_safe_text() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 1)
store i8* %2, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@.str = [18 x i8] c"input safe text: \00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @get_safe_text() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ halLedToggle(int);
int /*<<< orphan*/ halMcuWaitMs(int);
void halAssertHandler(void) {
  while (1) {
    halLedToggle(1);
    halLedToggle(2);
    halLedToggle(3);
    halLedToggle(4);
    halMcuWaitMs(50);
  }
}


x86 assembly (clang, -O0):
<halAssertHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <halAssertHandler+0x9>
mov    $0x1,%edi
call   1030 <halLedToggle@plt>
mov    $0x2,%edi
call   1030 <halLedToggle@plt>
mov    $0x3,%edi
call   1030 <halLedToggle@plt>
mov    $0x4,%edi
call   1030 <halLedToggle@plt>
mov    $0x32,%edi
call   1040 <halMcuWaitMs@plt>
jmp    1129 <halAssertHandler+0x9>

x86 assembly (clang, -O2):
<halAssertHandler>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <halLedToggle@plt>
mov    $0x2,%edi
call   1030 <halLedToggle@plt>
mov    $0x3,%edi
call   1030 <halLedToggle@plt>
mov    $0x4,%edi
call   1030 <halLedToggle@plt>
mov    $0x32,%edi
call   1040 <halMcuWaitMs@plt>
jmp    1130 <halAssertHandler+0x10>

LLVM IR (-O0):
define void @halAssertHandler() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @halLedToggle(i32 1)
%3 = call i32 @halLedToggle(i32 2)
%4 = call i32 @halLedToggle(i32 3)
%5 = call i32 @halLedToggle(i32 4)
%6 = call i32 @halMcuWaitMs(i32 50)
br label %1
}

LLVM IR (-O2):
define void @halAssertHandler() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @halLedToggle(i32 1)
%3 = tail call i32 @halLedToggle(i32 2)
%4 = tail call i32 @halLedToggle(i32 3)
%5 = tail call i32 @halLedToggle(i32 4)
%6 = tail call i32 @halMcuWaitMs(i32 50)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ free(int *);
int *malloc(int);
void test_free() {
  int *n = malloc(sizeof(int));
  *n = 0;
  free(n);
  assert(n != 0);
}


x86 assembly (clang, -O0):
<test_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_free>:
push   %rax
mov    $0x4,%edi
call   1050 <malloc@plt>
movl   $0x0,(%rax)
mov    %rax,%rdi
call   1030 <free@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @test_free() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 4)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store i32 0, i32* %3
%4 = load i32*, i32** %1
%5 = call i32 @free(i32* %4)
%6 = load i32*, i32** %1
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}

LLVM IR (-O2):
define void @test_free() {
%1 = tail call i32* @malloc(i32 4)
store i32 0, i32* %1
%2 = tail call i32 @free(i32* %1)
%3 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int read(int, char *, int);
int read_line(int fd, char *str) {
  int n;
  do {
    n = read(fd, str, 1);
  } while (n > 0 && *str++ != '\0');
  return (n > 0);
}


x86 assembly (clang, -O0):
<read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jle    115d <read_line+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    111f <read_line+0xf>
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_line>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %eax,%eax
jle    113c <read_line+0x2c>
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <read_line+0x10>
xor    %ecx,%ecx
test   %eax,%eax
setg   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_line(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @read(i32 %7, i8* %8, i32 1)
store i32 %9, i32* %5
br label %10
10: ; preds = %6
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
%16 = load i8, i8* %14
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 0
br label %19
19: ; preds = %13, %10
%20 = phi i1 [ false, %10 ], [ %18, %13 ]
br i1 %20, label %6, label %21
21: ; preds = %19
%22 = load i32, i32* %5
%23 = icmp sgt i32 %22, 0
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @read_line(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = tail call i32 @read(i32 %0, i8* %4, i32 1)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %4
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = zext i1 %6 to i32
ret i32 %12
}
__attribute__((always_)) int is_valid_mem_addr(unsigned long addr) {
  if ((((addr) >= (0x88000000)) &&
       ((addr) < (0x88000000) + ((8 * (64 * 1024)))))) {
    return 1;
  } else if ((((addr) >= (0x80000000)) &&
              ((addr) < (0x80000000) + ((128 * 1024 * 1024))))) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_valid_mem_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    $0x88000000,%eax
cmp    %rax,-0x10(%rbp)
jb     1132 <is_valid_mem_addr+0x32>
mov    $0x88080000,%eax
cmp    %rax,-0x10(%rbp)
jae    1132 <is_valid_mem_addr+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1168 <is_valid_mem_addr+0x68>
mov    $0x80000000,%eax
cmp    %rax,-0x10(%rbp)
jb     115c <is_valid_mem_addr+0x5c>
mov    $0x88000000,%eax
cmp    %rax,-0x10(%rbp)
jae    115c <is_valid_mem_addr+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1168 <is_valid_mem_addr+0x68>
jmp    1161 <is_valid_mem_addr+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_mem_addr>:
mov    %rdi,%rax
and    $0xfffffffffff80000,%rax
mov    $0x80000000,%ecx
or     $0x8000000,%rcx
cmp    %rcx,%rax
sete   %al
shr    $0x1b,%rdi
cmp    $0x10,%rdi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_valid_mem_addr(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp uge i64 %4, 2281701376
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %3
%8 = icmp ult i64 %7, 2282225664
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %19
10: ; preds = %6, %1
%11 = load i64, i64* %3
%12 = icmp uge i64 %11, 2147483648
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i64, i64* %3
%15 = icmp ult i64 %14, 2281701376
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %2
br label %19
17: ; preds = %13, %10
br label %18
18: ; preds = %17
store i32 0, i32* %2
br label %19
19: ; preds = %18, %16, %9
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_valid_mem_addr(i64 %0) {
%2 = and i64 %0, -524288
%3 = icmp eq i64 %2, 2281701376
%4 = and i64 %0, -134217728
%5 = icmp eq i64 %4, 2147483648
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
char MCP4461_GetValue(int, int);
char getSolderStepper2Current(void) { return MCP4461_GetValue(0x5A, 0x01); }


x86 assembly (clang, -O0):
<getSolderStepper2Current>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5a,%edi
mov    $0x1,%esi
call   1030 <MCP4461_GetValue@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSolderStepper2Current>:
mov    $0x5a,%edi
mov    $0x1,%esi
jmp    1030 <MCP4461_GetValue@plt>

LLVM IR (-O0):
define signext i8 @getSolderStepper2Current() {
%1 = call signext i8 @MCP4461_GetValue(i32 90, i32 1)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @getSolderStepper2Current() {
%1 = tail call signext i8 @MCP4461_GetValue(i32 90, i32 1)
ret i8 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int find_element_page(const void *keyptr, const void *arptr) {
  const void *page = *(const void **)arptr;
  if (keyptr < page)
    return -1;
  else if (keyptr >= (const void *)(((uint8_t *)page) + 4096))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<find_element_page>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1131 <find_element_page+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <find_element_page+0x61>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
add    $0x4000,%rcx
cmp    %rcx,%rax
jb     1155 <find_element_page+0x55>
movl   $0x1,-0x4(%rbp)
jmp    1161 <find_element_page+0x61>
jmp    115a <find_element_page+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_element_page>:
mov    (%rsi),%rax
lea    0x4000(%rax),%rcx
xor    %edx,%edx
cmp    %rdi,%rcx
setbe  %dl
cmp    %rdi,%rax
mov    $0xffffffff,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @find_element_page(i8* readnone %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = icmp ugt i8* %4, %0
%6 = getelementptr inbounds i8, i8* %4, i64 16384
%7 = icmp ule i8* %6, %0
%8 = zext i1 %7 to i32
%9 = select i1 %5, i32 -1, i32 %8
ret i32 %9
}
char *langRomTypeMappedRam() { return "Mapped RAM"; }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Mapped RAM\00"
define i8* @langRomTypeMappedRam() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
int higit(int c) {
  return ('0' <= c && c <= '9') || ('A' <= c && c <= 'F') ||
         ('a' <= c && c <= 'f');
}


x86 assembly (clang, -O0):
<higit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x30,%eax
cmp    -0x4(%rbp),%eax
jg     1124 <higit+0x24>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1164 <higit+0x64>
mov    $0x41,%eax
cmp    -0x4(%rbp),%eax
jg     1141 <higit+0x41>
mov    $0x1,%al
cmpl   $0x46,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1164 <higit+0x64>
xor    %eax,%eax
mov    $0x61,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jg     115e <higit+0x5e>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<higit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @higit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int next_standard_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(506, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<next_standard_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1fa,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_standard_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1fa,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @next_standard_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 506, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void cw1200_debug_rx_burst(struct cw1200_common *priv) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.cw1200_common = type opaque
define void @cw1200_debug_rx_burst(%struct.cw1200_common* nocapture %0) {
ret void
}
void addInt(int array[], int length, int value) {
  int i;
  for (i = 0; i < length; i++) {
    if (!array[i]) {
      array[i] = value;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<addInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <addInt+0x59>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1146 <addInt+0x46>
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1159 <addInt+0x59>
jmp    114b <addInt+0x4b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <addInt+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addInt>:
test   %esi,%esi
jle    111f <addInt+0x1f>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,(%rdi,%rcx,4)
je     1120 <addInt+0x20>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <addInt+0x10>
ret
mov    %edx,(%rdi,%rcx,4)
ret

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

LLVM IR (-O2):
define void @addInt(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %15
%8 = phi i64 [ 0, %5 ], [ %16, %15 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = and i64 %8, 4294967295
%14 = getelementptr inbounds i32, i32* %0, i64 %13
store i32 %2, i32* %14
br label %18
15: ; preds = %7
%16 = add nuw nsw i64 %8, 1
%17 = icmp eq i64 %16, %6
br i1 %17, label %18, label %7
18: ; preds = %15, %3, %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
double test(double, double);
int main() {
  double retval;
  retval = test(1.0, 2.0);
  if (retval < 0.24 || retval > 0.26)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  0xec1(%rip),%xmm1
call   1050 <test@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9f(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1183 <main+0x53>
movsd  -0x10(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    118a <main+0x5a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
movsd  0xec7(%rip),%xmm1
call   1050 <test@plt>
movsd  0xec2(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1165 <main+0x35>
ucomisd 0xebc(%rip),%xmm0
ja     1165 <main+0x35>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @test(double 1.000000e+00, double 2.000000e+00)
store double %3, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 2.400000e-01
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load double, double* %2
%8 = fcmp ogt double %7, 2.600000e-01
br i1 %8, label %9, label %11
9: ; preds = %6, %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @test(double 1.000000e+00, double 2.000000e+00)
%2 = fcmp olt double %1, 2.400000e-01
%3 = fcmp ogt double %1, 2.600000e-01
%4 = or i1 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ livesprite(int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basLiveSprite() {
  int n;
  n = popNumber();
  pushNumber(livesprite(n));
}


x86 assembly (clang, -O0):
<basLiveSprite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <livesprite@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basLiveSprite>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <livesprite@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basLiveSprite() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @livesprite(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basLiveSprite() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @livesprite(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
void gtk_spin_button_set_adjustment() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_set_adjustment() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xb5() {
  Assert_real((isxdigit(181) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              910, ("isxdigit should be 0 for 0xb5"));
}


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

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

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

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

/* Variables and functions */
void cpu_to_be32wu(uint32_t *p, uint32_t v) {
  uint8_t *p1 = (uint8_t *)p;
  p1[0] = v >> 24;
  p1[1] = v >> 16;
  p1[2] = v >> 8;
  p1[3] = v & 0xff;
}


x86 assembly (clang, -O0):
<cpu_to_be32wu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_to_be32wu>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %sil,%edx
sar    $0x18,%esi
mov    %esi,(%rdi)
sar    $0x10,%eax
mov    %eax,0x4(%rdi)
sar    $0x8,%ecx
mov    %ecx,0x8(%rdi)
mov    %edx,0xc(%rdi)
ret

LLVM IR (-O0):
define void @cpu_to_be32wu(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = ashr i32 %7, 24
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %8, i32* %10
%11 = load i32, i32* %4
%12 = ashr i32 %11, 16
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32, i32* %4
%20 = and i32 %19, 255
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i64 3
store i32 %20, i32* %22
ret void
}

LLVM IR (-O2):
define void @cpu_to_be32wu(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
store i32 %3, i32* %0
%4 = ashr i32 %1, 16
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
%6 = ashr i32 %1, 8
%7 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %6, i32* %7
%8 = and i32 %1, 255
%9 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
float tf1(float a) { return a; }


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

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

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

LLVM IR (-O2):
define float @tf1(float returned %0) {
ret float %0
}
void DebugLogging(const char *cstr, ...) {}


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

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

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

LLVM IR (-O2):
define void @DebugLogging(i8* nocapture %0, ...) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
FILE *fopen(const char *path, const char *mode) {
  errno = -ENOENT;
  return NULL;
}


x86 assembly (clang, -O0):
<fopen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %ecx,%ecx
mov    0x2ebb(%rip),%rax
sub    (%rax),%ecx
mov    0x2ec2(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopen>:
mov    0x2ec9(%rip),%rax
xor    %ecx,%ecx
sub    (%rax),%ecx
mov    0x2ece(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOENT = global i32 0
@errno = global i32 0
define i32* @fopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOENT
%6 = sub nsw i32 0, %5
store i32 %6, i32* @errno
ret i32* null
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define noalias i32* @fopen(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOENT
%4 = sub nsw i32 0, %3
store i32 %4, i32* @errno
ret i32* null
}
/* Variables and functions */
scalar_t__ posix_memalign(void **, size_t, size_t);
void *malloc_align_std(size_t alignment, size_t size, void *baton) {
  void *ptr;
  (void)baton;
  if (posix_memalign(&ptr, alignment, size) != 0) {
    return NULL;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<malloc_align_std>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x28(%rbp),%rdi
call   1030 <posix_memalign@plt>
cmp    $0x0,%rax
je     114c <malloc_align_std+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    1154 <malloc_align_std+0x44>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_align_std>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <posix_memalign@plt>
test   %rax,%rax
jne    112a <malloc_align_std+0x1a>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @malloc_align_std(i64 %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i64 %0, i64* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
%9 = load i8*, i8** %7
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = call i64 @posix_memalign(i8** %8, i64 %10, i64 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i8* null, i8** %4
br label %17
15: ; preds = %3
%16 = load i8*, i8** %8
store i8* %16, i8** %4
br label %17
17: ; preds = %15, %14
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
define i8* @malloc_align_std(i64 %0, i64 %1, i8* nocapture readnone %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i64 @posix_memalign(i8** %4, i64 %0, i64 %1)
%7 = icmp eq i64 %6, 0
%8 = load i8*, i8** %4
%9 = select i1 %7, i8* %8, i8* null
ret i8* %9
}
void g_atomic_pointer_compare_and_exchange() {}


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

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

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

LLVM IR (-O2):
define void @g_atomic_pointer_compare_and_exchange() {
ret void
}
/* Variables and functions */
int ft_is_prime(int);
int ft_find_next_prime(int nb) {
  if (ft_is_prime(nb) != 1)
    nb++;
  return (nb);
}


x86 assembly (clang, -O0):
<ft_find_next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_is_prime@plt>
cmp    $0x1,%eax
je     1135 <ft_find_next_prime+0x25>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_find_next_prime>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_is_prime@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
add    %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_find_next_prime(i32 %0) {
%2 = tail call i32 @ft_is_prime(i32 %0)
%3 = icmp ne i32 %2, 1
%4 = zext i1 %3 to i32
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int socket_getline(char *);
int /*<<< orphan*/ ui_nntp_server_response(char *);
int nntp_get_response(char *response) {
  int bytes_read;
  bytes_read = socket_getline(response);
  if (bytes_read > 0)
    ui_nntp_server_response(response);
  return bytes_read;
}


x86 assembly (clang, -O0):
<nntp_get_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <socket_getline@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114b <nntp_get_response+0x2b>
mov    -0x8(%rbp),%rdi
call   1030 <ui_nntp_server_response@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nntp_get_response>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <socket_getline@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    1139 <nntp_get_response+0x19>
mov    %rbx,%rdi
call   1030 <ui_nntp_server_response@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @nntp_get_response(i8* %0) {
%2 = tail call i32 @socket_getline(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @ui_nntp_server_response(i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
void av_xtea_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_xtea_alloc() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ sig_action(int, int /*<<< orphan*/ *, void *, char *,
                              char *);
void sigill_action(int number, siginfo_t *info, void *data) {
  sig_action(number, info, data, "Illegal Instruction",
             "Your application crashed due an invalid instruction.");
}


x86 assembly (clang, -O0):
<sigill_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xecb(%rip),%rcx
lea    0xed8(%rip),%r8
call   1030 <sig_action@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigill_action>:
lea    0xee9(%rip),%rcx
lea    0xef6(%rip),%r8
jmp    1030 <sig_action@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Illegal Instruction\00"
@.str.1 = [53 x i8] c"Your application crashed due an invalid instruction.\00"
define void @sigill_action(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i8*, i8** %6
%10 = call i32 @sig_action(i32 %7, i32* %8, i8* %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Illegal Instruction\00"
@.str.1 = [53 x i8] c"Your application crashed due an invalid instruction.\00"
define void @sigill_action(i32 %0, i32* %1, i8* %2) {
%4 = tail call i32 @sig_action(i32 %0, i32* %1, i8* %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int int_mod(int left, int right) {
  int result;
  if (right == 0) {
    result = 0;
  } else {
    result = left % right;
  }
  return result;
}


x86 assembly (clang, -O0):
<int_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <int_mod+0x20>
movl   $0x0,-0xc(%rbp)
jmp    112a <int_mod+0x2a>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_mod>:
test   %esi,%esi
je     110c <int_mod+0xc>
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @int_mod(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = srem i32 %0, %1
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
void free_matrix(double **matrix, int n) {
  int i;
  for (i = 0; i < n; i++) {
    shFree(matrix[i]);
  }
  shFree(matrix);
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1153 <free_matrix+0x43>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <shFree@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_matrix+0x16>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <shFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1144 <free_matrix+0x34>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
xor    %eax,%eax
call   1030 <shFree@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_matrix+0x20>
mov    %r14,%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <shFree@plt>

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

LLVM IR (-O2):
define void @free_matrix(double** %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double*, double** %0, i64 %7
%9 = load double*, double** %8
%10 = tail call i32 (double*, ...) bitcast (i32 (...)* @shFree to i32 (double*, ...)*)(double* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 (double**, ...) bitcast (i32 (...)* @shFree to i32 (double**, ...)*)(double** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ removeNewline(char *, int);
int /*<<< orphan*/ stdin;
void getString(char *string) {
  fgets(string, 62, stdin);
  removeNewline(string, 62);
  fflush(stdin);
}


x86 assembly (clang, -O0):
<getString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
mov    $0x3e,%esi
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3e,%esi
call   1030 <removeNewline@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%r14
mov    (%r14),%edx
mov    $0x3e,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
mov    $0x3e,%esi
call   1030 <removeNewline@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@stdin = global i32 0
define void @getString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 62, i32 %4)
%6 = load i8*, i8** %2
%7 = call i32 @removeNewline(i8* %6, i32 62)
%8 = load i32, i32* @stdin
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @getString(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %0, i32 62, i32 %2)
%4 = tail call i32 @removeNewline(i8* %0, i32 62)
%5 = load i32, i32* @stdin
%6 = tail call i32 @fflush(i32 %5)
ret void
}
/* Variables and functions */
char btest_b(char *, char *);
signed char intr_wrap_502(signed char p1, signed char p2) {
  return btest_b(&p1, &p2);
}


x86 assembly (clang, -O0):
<intr_wrap_502>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <btest_b@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_502>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %sil,0x6(%rsp)
lea    0x7(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1030 <btest_b@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @intr_wrap_502(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @btest_b(i8* %3, i8* %4)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @intr_wrap_502(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @btest_b(i8* %3, i8* %4)
ret i8 %5
}