xunge/DecIR huggingface dataset:
int strcmp(const char *a, const char *b) {
  int delta;
  while (*a || *b) {
    delta = *a++ - *b++;
    if (delta != 0)
      return delta;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x1d(%rbp)
jne    1131 <strcmp+0x31>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1141 <strcmp+0x41>
jmp    1184 <strcmp+0x84>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     117f <strcmp+0x7f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118b <strcmp+0x8b>
jmp    110c <strcmp+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%r8d
mov    %eax,%edx
or     %r8b,%dl
je     112a <strcmp+0x2a>
add    $0x1,%rcx
sub    %r8d,%eax
je     1110 <strcmp+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %7
7: ; preds = %33, %2
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %7
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br label %17
17: ; preds = %12, %7
%18 = phi i1 [ true, %7 ], [ %16, %12 ]
br i1 %18, label %19, label %34
19: ; preds = %17
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %4
%22 = load i8, i8* %20
%23 = sext i8 %22 to i32
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %5
%26 = load i8, i8* %24
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %23, %27
store i32 %28, i32* %6
%29 = load i32, i32* %6
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %19
%32 = load i32, i32* %6
store i32 %32, i32* %3
br label %35
33: ; preds = %19
br label %7
34: ; preds = %17
store i32 0, i32* %3
br label %35
35: ; preds = %34, %31
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %11, %2
%4 = phi i8* [ %0, %2 ], [ %12, %11 ]
%5 = phi i8* [ %1, %2 ], [ %14, %11 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %18, label %11
11: ; preds = %3
%12 = getelementptr inbounds i8, i8* %4, i64 1
%13 = sext i8 %6 to i32
%14 = getelementptr inbounds i8, i8* %5, i64 1
%15 = sext i8 %8 to i32
%16 = sub nsw i32 %13, %15
%17 = icmp eq i32 %16, 0
br i1 %17, label %3, label %18
18: ; preds = %3, %11
%19 = phi i32 [ %16, %11 ], [ 0, %3 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ my_fatal(char const *, int, char *);
void free_me(void *my_alloc, const char *file, int line) {
  if (!my_alloc) {
    my_fatal(file, line, "Attempt to free unallocated memory.\n");
    exit(1);
  }
  free(my_alloc);
  return;
}


x86 assembly (clang, -O0):
<free_me>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    116b <free_me+0x3b>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xea4(%rip),%rdx
call   1040 <my_fatal@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_me>:
test   %rdi,%rdi
je     113a <free_me+0xa>
jmp    1030 <free@plt>
push   %rax
lea    0xebe(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
call   1040 <my_fatal@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Attempt to free unallocated memory.\0A\00"
define void @free_me(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %14, label %9
9: ; preds = %3
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @my_fatal(i8* %10, i32 %11, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = call i32 @free(i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Attempt to free unallocated memory.\0A\00"
define void @free_me(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i32 @my_fatal(i8* %1, i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %3
%9 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  int a = 998;
  char b = 't';
  float c = 99.8;
  double d = 99.8;
  printf("%d\n", a);
  printf("%c\n", b);
  printf("%f\n", c);
  printf("%f\n", d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x3e6,-0x4(%rbp)
movb   $0x74,-0x5(%rbp)
movl   $0x42c7999a,-0xc(%rbp)
movabs $0x4058f33333333333,%rax
f3 58 40
mov    %rax,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cvtsi2sd %eax,%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf08(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
movsd  0xed4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee8(%rip),%rbx
movsd  0xec8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xec0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = alloca double
store i32 998, i32* %1
store i8 116, i8* %2
store float 0x4058F33340000000, float* %3
store double 0x4058F33333333333, double* %4
%5 = load i32, i32* %1
%6 = sitofp i32 %5 to double
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load i8, i8* %2
%9 = sitofp i8 %8 to double
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %12)
%14 = load double, double* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 9.980000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double 1.160000e+02)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double 0x4058F33340000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double 0x4058F33333333333)
ret i32 0
}
void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu) {}


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

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

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

LLVM IR (-O2):
%struct.kvm_vcpu = type opaque
define void @kvm_pmu_vcpu_destroy(%struct.kvm_vcpu* nocapture %0) {
ret void
}
int initialise_occi_sql(char *databasename, char *username, char *password) {
  return (0);
}


x86 assembly (clang, -O0):
<initialise_occi_sql>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @initialise_occi_sql(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @initialise_occi_sql(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
typedef unsigned long uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ I2CSlaveEnable(scalar_t__);
void I2CSlaveInit(uint32_t ui32Base, uint8_t ui8SlaveAddr) {
  ;
  ;
  I2CSlaveEnable(ui32Base);
  (*((volatile unsigned long *)(ui32Base + 0x00000800))) = ui8SlaveAddr;
}


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

x86 assembly (clang, -O2):
<I2CSlaveInit>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <I2CSlaveEnable@plt>
mov    %r14,0x800(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @I2CSlaveInit(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @I2CSlaveEnable(i64 %5)
%7 = load i64, i64* %4
%8 = load i64, i64* %3
%9 = add nsw i64 %8, 2048
%10 = inttoptr i64 %9 to i64*
store volatile i64 %7, i64* %10
ret void
}

LLVM IR (-O2):
define void @I2CSlaveInit(i64 %0, i64 %1) {
%3 = tail call i32 @I2CSlaveEnable(i64 %0)
%4 = add nsw i64 %0, 2048
%5 = inttoptr i64 %4 to i64*
store volatile i64 %1, i64* %5
ret void
}
void romfs_write_superblock(struct superblock_type *sb) { return; }


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

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

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

LLVM IR (-O2):
%struct.superblock_type = type opaque
define void @romfs_write_superblock(%struct.superblock_type* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_tick(int);
void wait_uart_empty() {
  unsigned int count = 0;
  do {
    if (((*((volatile unsigned *)((0xc8100000 | (0x01 << 10) | (0x30 << 2)) +
                                  (3 << 2)))) &
         (1 << 22)) == 0) {
      delay_tick(4);
    } else {
      break;
    }
    count++;
  } while (count < 20000);
}


x86 assembly (clang, -O0):
<wait_uart_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc81004cc,%eax
mov    (%rax),%eax
and    $0x400000,%eax
cmp    $0x0,%eax
jne    1143 <wait_uart_empty+0x33>
mov    $0x4,%edi
call   1030 <delay_tick@plt>
jmp    1148 <wait_uart_empty+0x38>
jmp    115e <wait_uart_empty+0x4e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x4e20,-0x4(%rbp)
jb     111f <wait_uart_empty+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_uart_empty>:
push   %r14
push   %rbx
push   %rax
mov    $0x4e20,%ebx
mov    $0xc81004cc,%r14d
nop
testl  $0x400000,(%r14)
jne    1138 <wait_uart_empty+0x28>
mov    $0x4,%edi
call   1030 <delay_tick@plt>
add    $0xffffffff,%ebx
jne    1120 <wait_uart_empty+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @wait_uart_empty() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load volatile i32, i32* inttoptr (i64 3356493004 to i32*)
%4 = and i32 %3, 4194304
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = call i32 @delay_tick(i32 4)
br label %9
8: ; preds = %2
br label %15
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add i32 %10, 1
store i32 %11, i32* %1
br label %12
12: ; preds = %9
%13 = load i32, i32* %1
%14 = icmp ult i32 %13, 20000
br i1 %14, label %2, label %15
15: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
define void @wait_uart_empty() {
br label %1
1: ; preds = %6, %0
%2 = phi i32 [ 0, %0 ], [ %8, %6 ]
%3 = load volatile i32, i32* inttoptr (i64 3356493004 to i32*)
%4 = and i32 %3, 4194304
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i32 @delay_tick(i32 4)
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 20000
br i1 %9, label %10, label %1
10: ; preds = %1, %6
ret void
}
/* Variables and functions */
unsigned long _read_cr4();
int /*<<< orphan*/ _write_cr4(unsigned long);
int detect_cpu_smep();
int to_enable_smep(void) {
  unsigned long _cr4;
  _cr4 = _read_cr4();
  if (detect_cpu_smep() & !(_cr4 & 0x00100000)) {
    _cr4 = (_cr4 | 0x00100000);
    _write_cr4(_cr4);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<to_enable_smep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <_read_cr4@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <detect_cpu_smep@plt>
mov    -0x10(%rbp),%rcx
and    $0x100000,%rcx
cmp    $0x0,%rcx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1193 <to_enable_smep+0x63>
mov    -0x10(%rbp),%rax
or     $0x100000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_write_cr4@plt>
movl   $0x1,-0x4(%rbp)
jmp    119a <to_enable_smep+0x6a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_enable_smep>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <_read_cr4@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <detect_cpu_smep@plt>
mov    %ebx,%ecx
shr    $0x14,%ecx
not    %ecx
and    %eax,%ecx
test   $0x1,%cl
je     1168 <to_enable_smep+0x38>
or     $0x100000,%rbx
mov    %rbx,%rdi
call   1040 <_write_cr4@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @to_enable_smep() {
%1 = alloca i32
%2 = alloca i64
%3 = call i64 (...) @_read_cr4()
store i64 %3, i64* %2
%4 = call i32 (...) @detect_cpu_smep()
%5 = load i64, i64* %2
%6 = and i64 %5, 1048576
%7 = icmp ne i64 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = and i32 %4, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %0
%13 = load i64, i64* %2
%14 = or i64 %13, 1048576
store i64 %14, i64* %2
%15 = load i64, i64* %2
%16 = call i32 @_write_cr4(i64 %15)
store i32 1, i32* %1
br label %18
17: ; preds = %0
store i32 0, i32* %1
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @to_enable_smep() {
%1 = tail call i64 (...) @_read_cr4()
%2 = tail call i32 (...) @detect_cpu_smep()
%3 = trunc i64 %1 to i32
%4 = lshr i32 %3, 20
%5 = and i32 %4, 1
%6 = xor i32 %5, 1
%7 = and i32 %6, %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = or i64 %1, 1048576
%11 = tail call i32 @_write_cr4(i64 %10)
br label %12
12: ; preds = %0, %9
%13 = phi i32 [ 1, %9 ], [ 0, %0 ]
ret i32 %13
}
int foo(int x, int y, int a) {
  int i = x;
  int j = y;
  if (x > y) {
    i = a;
    j = i;
  }
  return i * j;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1131 <foo+0x31>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edx,%edi
cmovg  %edx,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %2, i32 %0
%6 = select i1 %4, i32 %2, i32 %1
%7 = mul nsw i32 %5, %6
ret i32 %7
}
extern double d1n1d2(double d1, int n1, double d2) { return d1 + n1 + d2; }


x86 assembly (clang, -O0):
<d1n1d2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d1n1d2>:
cvtsi2sd %edi,%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @d1n1d2(double %0, i32 %1, double %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca double
store double %0, double* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load i32, i32* %5
%9 = sitofp i32 %8 to double
%10 = fadd double %7, %9
%11 = load double, double* %6
%12 = fadd double %10, %11
ret double %12
}

LLVM IR (-O2):
define double @d1n1d2(double %0, i32 %1, double %2) {
%4 = sitofp i32 %1 to double
%5 = fadd double %4, %0
%6 = fadd double %5, %2
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x8d() {
  Assert_real((isdigit(141) == 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_isdigit.c",
              710, ("isdigit should be 0 for 0x8d"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x8d>:
push   %rax
mov    $0x8d,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2c6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x8d\00"
define void @t_isdigit_0x8d() {
%1 = call i64 @isdigit(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 710, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x8d\00"
define void @t_isdigit_0x8d() {
%1 = tail call i64 @isdigit(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags) {

  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x0000000C))) &= ~ulIntFlags;
}


x86 assembly (clang, -O0):
<TimerIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIntDisable>:
not    %rsi
and    %rsi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @TimerIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 12
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @TimerIntDisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
wait(p) int *p;
{
  long l = _xwait();
  if (l == -1)
    return -1;
  if (p)
    *p = (l >> 16);
  return l & 0xffff;
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_xwait@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
jne    1140 <wait+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <wait+0x58>
cmpq   $0x0,-0x10(%rbp)
je     115b <wait+0x4b>
mov    -0x18(%rbp),%rax
sar    $0x10,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
and    $0xffff,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_xwait@plt>
cmp    $0xffffffff,%eax
je     1131 <wait+0x21>
test   %rbx,%rbx
je     112c <wait+0x1c>
mov    %eax,%ecx
sar    $0x10,%ecx
mov    %ecx,(%rbx)
movzwl %ax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @wait(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
%5 = call i32 (...) @_xwait()
%6 = sext i32 %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %22
10: ; preds = %1
%11 = load i32*, i32** %3
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i64, i64* %4
%15 = ashr i64 %14, 16
%16 = trunc i64 %15 to i32
%17 = load i32*, i32** %3
store i32 %16, i32* %17
br label %18
18: ; preds = %13, %10
%19 = load i64, i64* %4
%20 = and i64 %19, 65535
%21 = trunc i64 %20 to i32
store i32 %21, i32* %2
br label %22
22: ; preds = %18, %9
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @wait(i32* writeonly %0) {
%2 = tail call i32 (...) @_xwait()
%3 = icmp eq i32 %2, -1
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = icmp eq i32* %0, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = ashr i32 %2, 16
store i32 %7, i32* %0
br label %8
8: ; preds = %6, %4
%9 = and i32 %2, 65535
br label %10
10: ; preds = %1, %8
%11 = phi i32 [ %9, %8 ], [ -1, %1 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32r4(uint32_t x) { return (x >> 4) | (x << 28); }


x86 assembly (clang, -O0):
<rot32r4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1c,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32r4>:
mov    %edi,%eax
sar    $0x4,%eax
shl    $0x1c,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32r4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = load i32, i32* %2
%6 = shl i32 %5, 28
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32r4(i32 %0) {
%2 = ashr i32 %0, 4
%3 = shl i32 %0, 28
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ crypto_hash_shake256(unsigned char *, unsigned char const *,
                                        unsigned int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
void FIPS202_SHAKE256(const unsigned char *input, unsigned int inputByteLen,
                      unsigned char *output, int outputByteLen) {
  unsigned char buffer[136];
  crypto_hash_shake256(buffer, input, inputByteLen);
  memcpy(output, buffer, outputByteLen);
}


x86 assembly (clang, -O0):
<FIPS202_SHAKE256>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0xb0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <crypto_hash_shake256@plt>
mov    -0x18(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <memcpy@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FIPS202_SHAKE256>:
push   %rbp
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <crypto_hash_shake256@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @FIPS202_SHAKE256(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [136 x i8]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = getelementptr inbounds [136 x i8], [136 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @crypto_hash_shake256(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %7
%15 = getelementptr inbounds [136 x i8], [136 x i8]* %9, i64 0, i64 0
%16 = load i32, i32* %8
%17 = call i32 @memcpy(i8* %14, i8* %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @FIPS202_SHAKE256(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca [136 x i8]
%6 = getelementptr inbounds [136 x i8], [136 x i8]* %5, i64 0, i64 0
%7 = call i32 @crypto_hash_shake256(i8* %6, i8* %0, i32 %1)
%8 = call i32 @memcpy(i8* %2, i8* %6, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double n1 = 5 + (3 * 8 / 2) - 3;
  double n2 = (0.02 * 2) + (2 * 2) - (2 / 2);
  double n3 = 2 * 4 * (5 + 9 / 2);
  printf("n1 = %f\n", n1);
  printf("n2 = %f\n", n2);
  printf("n3 = %f\n", n3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
movsd  0xed4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
movsd  0xec8(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"n1 = %f\0A\00"
@.str.1 = [9 x i8] c"n2 = %f\0A\00"
@.str.2 = [9 x i8] c"n3 = %f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double 1.400000e+01, double* %1
store double 3.040000e+00, double* %2
store double 7.200000e+01, double* %3
%4 = load double, double* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %4)
%6 = load double, double* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %6)
%8 = load double, double* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"n1 = %f\0A\00"
@.str.1 = [9 x i8] c"n2 = %f\0A\00"
@.str.2 = [9 x i8] c"n3 = %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 1.400000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double 3.040000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double 7.200000e+01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vmi_set_lazy_mode(int);
void arch_leave_lazy_cpu_mode(void) { vmi_set_lazy_mode(0x00); }


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

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

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

LLVM IR (-O2):
define void @arch_leave_lazy_cpu_mode() {
%1 = tail call i32 @vmi_set_lazy_mode(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void args_print_usage() {
  puts("Usage: sciviewer [OPTIONS] <image-path>");
  puts("");
  puts("Available options are:");
  puts("-w <number>          Set the width of the window");
  puts("-h <number>          Set the height of the window");
}


x86 assembly (clang, -O0):
<args_print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<args_print_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeea(%rip),%rdi
call   1040 <puts@plt>
lea    0xef5(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1a(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Usage: sciviewer [OPTIONS] <image-path>\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [23 x i8] c"Available options are:\00"
@.str.3 = [49 x i8] c"-w <number> Set the width of the window\00"
@.str.4 = [50 x i8] c"-h <number> Set the height of the window\00"
define void @args_print_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Usage: sciviewer [OPTIONS] <image-path>\00"
@.str.2 = [23 x i8] c"Available options are:\00"
@.str.3 = [49 x i8] c"-w <number> Set the width of the window\00"
@.str.4 = [50 x i8] c"-h <number> Set the height of the window\00"
define void @args_print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
ret void
}
void nseel_asm_sqrt_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_sqrt_end() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int isSUCC(const char *tok) { return strcmp(tok, "succ") == 0; }


x86 assembly (clang, -O0):
<isSUCC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSUCC>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"succ\00"
define i32 @isSUCC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"succ\00"
define i32 @isSUCC(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ lc75710_display_hal_cursor_visibility(int);
void display_enable_cursor(bool visible) {
  lc75710_display_hal_cursor_visibility(visible);
}


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

x86 assembly (clang, -O2):
<display_enable_cursor>:
jmp    1030 <lc75710_display_hal_cursor_visibility@plt>

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

LLVM IR (-O2):
define void @display_enable_cursor(i32 %0) {
%2 = tail call i32 @lc75710_display_hal_cursor_visibility(i32 %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
uint64_t umod64(uint64_t a, uint64_t b) {
  uint64_t r;
  if (b == 0) {
    fprintf(stderr, "Should not happen\n");
    exit(EXIT_FAILURE);
  }
  r = a % b;
  return r;
}


x86 assembly (clang, -O0):
<umod64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115b <umod64+0x3b>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umod64>:
test   %esi,%esi
je     112c <umod64+0xc>
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret
push   %rax
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @umod64(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 %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = srem i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @umod64(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = srem i32 %0, %1
ret i32 %10
}
int diff(char *x, char *y) { return (int)x - (int)y; }


x86 assembly (clang, -O0):
<diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff>:
mov    %rdi,%rax
sub    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @diff(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int data(int ano) {
  int atual;
  int anos;
  atual = 2016;
  anos = 0;
  anos = atual - ano;
  return anos;
}


x86 assembly (clang, -O0):
<data>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x7e0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<data>:
mov    $0x7e0,%eax
sub    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @data(i32 %0) {
%2 = sub nsw i32 2016, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int one = 2;
  int two = 3;
  int three = one + two;
  printf("the value stored in one is: %d\n", one);
  printf("the value stored in two is: %d\n", two);
  printf("the sum of values one and two is: %d\n", three);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"the value stored in one is: %d\0A\00"
@.str.1 = [32 x i8] c"the value stored in two is: %d\0A\00"
@.str.2 = [38 x i8] c"the sum of values one and two is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"the value stored in one is: %d\0A\00"
@.str.1 = [32 x i8] c"the value stored in two is: %d\0A\00"
@.str.2 = [38 x i8] c"the sum of values one and two is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
double _exp(double);
double exp(double x) { return _exp(x); }


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

x86 assembly (clang, -O2):
<exp>:
jmp    1030 <_exp@plt>

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

LLVM IR (-O2):
define double @exp(double %0) {
%2 = tail call double @_exp(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void ptxinfo_free(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @ptxinfo_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
float NAN;
int /*<<< orphan*/ __VERIFIER_assert(int);
int isnan(float);
float sin(float);
int main(int argc, char **argv) {
  float f = 0.0f;
  float result = sin(f);
  __VERIFIER_assert(result == 0.0f);
  f = NAN;
  __VERIFIER_assert(isnan(f));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <sin@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__VERIFIER_assert@plt>
mov    0x2e77(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1040 <isnan@plt>
mov    %eax,%edi
call   1050 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
mov    0x2ec6(%rip),%rax
movss  (%rax),%xmm0
call   1030 <isnan@plt>
mov    %eax,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@NAN = global float 0.000000e+00
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %6
%8 = load float, float* %6
%9 = call float @sin(float %8)
store float %9, float* %7
%10 = load float, float* %7
%11 = fcmp oeq float %10, 0.000000e+00
%12 = zext i1 %11 to i32
%13 = call i32 @__VERIFIER_assert(i32 %12)
%14 = load float, float* @NAN
store float %14, float* %6
%15 = load float, float* %6
%16 = call i32 @isnan(float %15)
%17 = call i32 @__VERIFIER_assert(i32 %16)
ret i32 0
}

LLVM IR (-O2):
@NAN = global float 0.000000e+00
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @__VERIFIER_assert(i32 1)
%4 = load float, float* @NAN
%5 = tail call i32 @isnan(float %4)
%6 = tail call i32 @__VERIFIER_assert(i32 %5)
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("index = %d\n", 9);
  printf("fib = %d\n", fib(9));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    $0x9,%edi
call   1040 <fib@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    $0x9,%edi
call   1040 <fib@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"index = %d\0A\00"
@.str.1 = [10 x i8] c"fib = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = call i32 @fib(i32 9)
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@.str = [12 x i8] c"index = %d\0A\00"
@.str.1 = [10 x i8] c"fib = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 9)
%2 = tail call i32 @fib(i32 9)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
int f(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 0
}
/* Variables and functions */
size_t getpagesize();
size_t numanuma__get_page_size(void) { return getpagesize(); }


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

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

LLVM IR (-O0):
define i64 @numanuma__get_page_size() {
%1 = call i64 (...) @getpagesize()
ret i64 %1
}

LLVM IR (-O2):
define i64 @numanuma__get_page_size() {
%1 = tail call i64 (...) @getpagesize()
ret i64 %1
}
void cprop_result10(int *data) { data[0] = 210 + data[1]; }


x86 assembly (clang, -O0):
<cprop_result10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0xd2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_result10>:
mov    $0xd2,%eax
add    0x4(%rdi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @cprop_result10(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = add nsw i32 210, %5
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @cprop_result10(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 210
store i32 %4, i32* %0
ret void
}