xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void set_bit(uint32_t *number, int position, int bit_value) {
  if (bit_value == 1) {
    *number |= (bit_value << position);
  } else {
    *number &= (~(1 << position));
  }
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    112f <set_bit+0x2f>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
jmp    1146 <set_bit+0x46>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    $0x1,%edx
jne    1113 <set_bit+0x13>
or     (%rdi),%eax
mov    %eax,(%rdi)
ret
not    %eax
and    (%rdi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @set_bit(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = shl i32 %10, %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = or i32 %14, %12
store i32 %15, i32* %13
br label %23
16: ; preds = %3
%17 = load i32, i32* %5
%18 = shl i32 1, %17
%19 = xor i32 %18, -1
%20 = load i32*, i32** %4
%21 = load i32, i32* %20
%22 = and i32 %21, %19
store i32 %22, i32* %20
br label %23
23: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @set_bit(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 1
%5 = shl nuw i32 1, %1
br i1 %4, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %0
%8 = or i32 %7, %5
br label %13
9: ; preds = %3
%10 = xor i32 %5, -1
%11 = load i32, i32* %0
%12 = and i32 %11, %10
br label %13
13: ; preds = %9, %6
%14 = phi i32 [ %12, %9 ], [ %8, %6 ]
store i32 %14, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clrscr() { printf("\e[2J\e[0;0H"); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[0;0H\00"
define void @clrscr() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
double powi(double base, int times) {
  double tmp = base, ret = 1.0;
  for (int t = times; t > 0; t /= 2) {
    if (t % 2 == 1)
      ret *= tmp;
    tmp = tmp * tmp;
  }
  return ret;
}


x86 assembly (clang, -O0):
<powi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    1178 <powi+0x78>
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1156 <powi+0x56>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
jmp    1129 <powi+0x29>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<powi>:
test   %edi,%edi
jle    1143 <powi+0x43>
movsd  0xef4(%rip),%xmm2
movapd %xmm2,%xmm1
jmp    1133 <powi+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm0
mov    %edi,%eax
shr    %eax
cmp    $0x2,%edi
mov    %eax,%edi
jb     114b <powi+0x4b>
movapd %xmm2,%xmm3
test   $0x1,%dil
je     1120 <powi+0x20>
movapd %xmm0,%xmm3
jmp    1120 <powi+0x20>
movsd  0xeb5(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @powi(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%8 = load double, double* %3
store double %8, double* %5
store double 1.000000e+00, double* %6
%9 = load i32, i32* %4
store i32 %9, i32* %7
br label %10
10: ; preds = %25, %2
%11 = load i32, i32* %7
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %28
13: ; preds = %10
%14 = load i32, i32* %7
%15 = srem i32 %14, 2
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load double, double* %5
%19 = load double, double* %6
%20 = fmul double %19, %18
store double %20, double* %6
br label %21
21: ; preds = %17, %13
%22 = load double, double* %5
%23 = load double, double* %5
%24 = fmul double %22, %23
store double %24, double* %5
br label %25
25: ; preds = %21
%26 = load i32, i32* %7
%27 = sdiv i32 %26, 2
store i32 %27, i32* %7
br label %10
28: ; preds = %10
%29 = load double, double* %6
ret double %29
}

LLVM IR (-O2):
define double @powi(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %2
%5 = phi double [ 1.000000e+00, %2 ], [ %13, %6 ]
ret double %5
6: ; preds = %2, %6
%7 = phi i32 [ %15, %6 ], [ %1, %2 ]
%8 = phi double [ %13, %6 ], [ 1.000000e+00, %2 ]
%9 = phi double [ %14, %6 ], [ %0, %2 ]
%10 = and i32 %7, 1
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, double 1.000000e+00, double %9
%13 = fmul double %8, %12
%14 = fmul double %9, %9
%15 = lshr i32 %7, 1
%16 = icmp ult i32 %7, 2
br i1 %16, label %4, label %6
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void finalizer_scrub64(void *ptr) {
  uint64_t *sz_ptr = (uint64_t *)ptr;
  sz_ptr[0] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[1] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[2] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[3] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[4] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[5] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[6] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[7] = 0xa5a5a5a5a5a5a5a5ULL;
}


x86 assembly (clang, -O0):
<finalizer_scrub64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x8(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0xc(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x10(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x14(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x18(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalizer_scrub64>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @finalizer_scrub64(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ shmdt(void *);
int shmem_detach(void **ptr, int id) {
  shmdt(*ptr);
  shmctl(id, IPC_RMID, NULL);
}


x86 assembly (clang, -O0):
<shmem_detach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <shmdt@plt>
mov    -0x14(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <shmctl@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmem_detach>:
push   %rbx
mov    %esi,%ebx
mov    (%rdi),%rdi
call   1030 <shmdt@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
pop    %rbx
jmp    1040 <shmctl@plt>

LLVM IR (-O0):
@IPC_RMID = global i32 0
define i32 @shmem_detach(i8** %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
%6 = load i8**, i8*** %4
%7 = load i8*, i8** %6
%8 = call i32 @shmdt(i8* %7)
%9 = load i32, i32* %5
%10 = load i32, i32* @IPC_RMID
%11 = call i32 @shmctl(i32 %9, i32 %10, i32* null)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @shmem_detach(i8** nocapture %0, i32 %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @shmdt(i8* %3)
%5 = load i32, i32* @IPC_RMID
%6 = tail call i32 @shmctl(i32 %1, i32 %5, i32* null)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430InterruptP__Port15__disable();
void Msp430InterruptC__2__HplInterrupt__disable(void) {
  HplMsp430InterruptP__Port15__disable();
}


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

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

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

LLVM IR (-O2):
define void @Msp430InterruptC__2__HplInterrupt__disable() {
%1 = tail call i32 (...) @HplMsp430InterruptP__Port15__disable()
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ printf(char *, scalar_t__);
int main() {
  while (1) {
    pid_t p = fork();
    if (p > 0) {
      printf("Process %d created.\n", p);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1155 <main+0x35>
mov    -0x10(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
jle    1130 <main+0x10>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [21 x i8] c"Process %d created.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
br label %3
3: ; preds = %0, %10
%4 = call i64 (...) @fork()
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i64, i64* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %10
10: ; preds = %7, %3
br label %3
}

LLVM IR (-O2):
@.str = [21 x i8] c"Process %d created.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %6, %0
%2 = tail call i64 (...) @fork()
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i64 %2)
br label %6
6: ; preds = %4, %1
br label %1
}
/* Variables and functions */
int gcd(int, int);
int lcm(int u, int v) { return u / gcd(u, v) * v; }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
imul   -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
imul   %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @lcm(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* %3
%7 = load i32, i32* %4
%8 = call i32 @gcd(i32 %6, i32 %7)
%9 = sdiv i32 %5, %8
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
%3 = tail call i32 @gcd(i32 %0, i32 %1)
%4 = sdiv i32 %0, %3
%5 = mul nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int ralt_handler(char **save) {
  write_instr(0x00);
  write_imm(0xE6);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<ralt_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0xe6,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ralt_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0xe6,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ralt_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 230)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @ralt_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 230)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int N, int *a) {
  for (int i = 0; i < N; i++)
    printf("%d ", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1157 <printArray+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printArray(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %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* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %1, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
void J400ToARGBRow_Any_NEON() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @J400ToARGBRow_Any_NEON() {
ret void
}
/* Variables and functions */
scalar_t__ tty_write(void const *, size_t);
__attribute__((visibility("default"))) unsigned int __attribute__((regparm(5)))
acx1_write(void const *data, size_t len) {
  return tty_write(data, len) ? 3 : 0;
}


x86 assembly (clang, -O0):
<acx1_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <tty_write@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x3,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acx1_write>:
push   %rax
call   1030 <tty_write@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    (%rcx,%rcx,2),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @acx1_write(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i64 @tty_write(i8* %5, i64 %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 3, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @acx1_write(i8* %0, i64 %1) {
%3 = tail call i64 @tty_write(i8* %0, i64 %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 0, i32 3
ret i32 %5
}
void RTSocketSelectOne(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSocketSelectOne() {
ret void
}
/* Variables and functions */
scalar_t__ print_bus_fetch_(char *, char *, char *, int);
int /*<<< orphan*/ printf(char *);
void opcode_read() {
  char *func_name = "opcode";
  if (print_bus_fetch_(func_name, "", "m68k->opcode", 1) < 0)
    return;
  printf("\tm68k_opcode_table[m68k->opcode](m68k);\n}\n\n");
}


x86 assembly (clang, -O0):
<opcode_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xefa(%rip),%rsi
lea    0xebb(%rip),%rdx
mov    $0x1,%ecx
call   1030 <print_bus_fetch_@plt>
cmp    $0x0,%rax
jge    115e <opcode_read+0x3e>
jmp    116a <opcode_read+0x4a>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opcode_read>:
push   %rax
lea    0xede(%rip),%rdi
lea    0xf08(%rip),%rsi
lea    0xeca(%rip),%rdx
mov    $0x1,%ecx
call   1030 <print_bus_fetch_@plt>
test   %rax,%rax
js     1152 <opcode_read+0x32>
lea    0xec1(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"opcode\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [13 x i8] c"m68k->opcode\00"
@.str.3 = [44 x i8] c"\09m68k_opcode_table[m68k->opcode](m68k);\0A}\0A\0A\00"
define void @opcode_read() {
%1 = alloca i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @print_bus_fetch_(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"opcode\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [13 x i8] c"m68k->opcode\00"
@str = [43 x i8] c"\09m68k_opcode_table[m68k->opcode](m68k);\0A}\0A\00"
define void @opcode_read() {
%1 = tail call i64 @print_bus_fetch_(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 1)
%2 = icmp slt i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int errno;
int kill(int /*<<< orphan*/, int);
int pthread_kill(pthread_t thread, int sig) {
  if (kill(thread, sig) == -1)
    return errno;
  else
    return 0;
}


x86 assembly (clang, -O0):
<pthread_kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <kill@plt>
cmp    $0xffffffff,%eax
jne    1143 <pthread_kill+0x33>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <pthread_kill+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_kill>:
push   %rax
call   1030 <kill@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
jne    1128 <pthread_kill+0x18>
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @pthread_kill(i32 %0, i32 %1) {
%3 = tail call i32 @kill(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
%5 = load i32, i32* @errno
%6 = select i1 %4, i32 %5, i32 0
ret i32 %6
}
void __attribute__((no)) bar(int **p) {
  float *q = (float *)p;
  *q = 0.0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @bar(i32** %0) {
%2 = alloca i32**
%3 = alloca float*
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = bitcast i32** %4 to float*
store float* %5, float** %3
%6 = load float*, float** %3
store float 0.000000e+00, float* %6
ret void
}

LLVM IR (-O2):
define void @bar(i32** nocapture writeonly %0) {
%2 = bitcast i32** %0 to float*
store float 0.000000e+00, float* %2
ret void
}
long BRK(endds)
long *endds;
{ return ((long)brk((char *)(*endds))); }


x86 assembly (clang, -O0):
<BRK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <brk@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BRK>:
push   %rax
mov    (%rdi),%rdi
xor    %eax,%eax
call   1030 <brk@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @BRK(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to i8*
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %5)
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @BRK(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %3)
%5 = sext i32 %4 to i64
ret i64 %5
}
int Operand_uimm6_decode(unsigned int *valp) {
  unsigned uimm6_0, imm6_0;
  imm6_0 = *valp & 0x3f;
  uimm6_0 = 0x4 + (((0) << 6) | imm6_0);
  *valp = uimm6_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_uimm6_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x3f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     $0x0,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_uimm6_decode>:
mov    (%rdi),%eax
and    $0x3f,%eax
add    $0x4,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_uimm6_decode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = and i32 %6, 63
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = or i32 0, %8
%10 = add i32 4, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32*, i32** %2
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_uimm6_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 63
%4 = add nuw nsw i32 %3, 4
store i32 %4, i32* %0
ret i32 0
}
void sigalarm(int sig) { return; }


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

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

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

LLVM IR (-O2):
define void @sigalarm(i32 %0) {
ret void
}
void ClassInitialize() {}


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

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

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

LLVM IR (-O2):
define void @ClassInitialize() {
ret void
}
int GdErrorNull(const char *format, ...) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @GdErrorNull(i8* nocapture readnone %0, ...) {
ret i32 -1
}
void test2() { printf(1, "hi"); }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"hi\00"
define void @test2() {
%1 = call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"hi\00"
define void @test2() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float __nv_fmaf_rz(float, float, float);
float __fmaf_rz(float __a, float __b, float __c) {
  return __nv_fmaf_rz(__a, __b, __c);
}


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

x86 assembly (clang, -O2):
<__fmaf_rz>:
jmp    1030 <__nv_fmaf_rz@plt>

LLVM IR (-O0):
define float @__fmaf_rz(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @__nv_fmaf_rz(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @__fmaf_rz(float %0, float %1, float %2) {
%4 = tail call float @__nv_fmaf_rz(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int strcasecmp(char *, char *);
int qsort_strcasecmp_(const void *pString1, const void *pString2) {
  return strcasecmp(*((char **)pString1), *((char **)pString2));
}


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

x86 assembly (clang, -O2):
<qsort_strcasecmp_>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @qsort_strcasecmp_(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcasecmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_strcasecmp_(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcasecmp(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ PrintPythagoreanTriple(int);
int atoi(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int N = 0;
  printf("Pythagorean Triple Search by Sandeep Koranne\n");
  if (argc > 1)
    N = atoi(argv[1]);
  PrintPythagoreanTriple(N);
  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)
movl   $0x0,-0x14(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1173 <main+0x43>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <PrintPythagoreanTriple@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
cmp    $0x2,%ebp
jl     1156 <main+0x26>
mov    0x8(%rbx),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <PrintPythagoreanTriple@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [46 x i8] c"Pythagorean Triple Search by Sandeep Koranne\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %6
br label %15
15: ; preds = %10, %2
%16 = load i32, i32* %6
%17 = call i32 @PrintPythagoreanTriple(i32 %16)
ret i32 0
}

LLVM IR (-O2):
@str = [45 x i8] c"Pythagorean Triple Search by Sandeep Koranne\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ %8, %5 ], [ 0, %2 ]
%11 = tail call i32 @PrintPythagoreanTriple(i32 %10)
ret i32 0
}
unsigned long long
unsignedlonglong_ignoring_signedlonglong(unsigned long long x,
                                         signed long long y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlonglong_ignoring_signedlonglong(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglong_ignoring_signedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void error(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int yyerror(s)
char *s;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @yyerror(i8* nocapture readnone %0) {
ret i32 0
}
void wx11bg() {}


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

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

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

LLVM IR (-O2):
define void @wx11bg() {
ret void
}
void test_7(int code) {
  _Bool temp = testit();
  _Bool rotate = (code == 22);
  if (!rotate || temp == 0)
    oof();
}


x86 assembly (clang, -O0):
<test_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <testit@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x5(%rbp)
cmpl   $0x16,-0x4(%rbp)
sete   %al
and    $0x1,%al
mov    %al,-0x6(%rbp)
testb  $0x1,-0x6(%rbp)
je     1164 <test_7+0x44>
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    116b <test_7+0x4b>
mov    $0x0,%al
call   1040 <oof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_7>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <testit@plt>
cmp    $0x16,%ebx
jne    1135 <test_7+0x15>
test   %eax,%eax
je     1135 <test_7+0x15>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1040 <oof@plt>

LLVM IR (-O0):
define void @test_7(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 %0, i32* %2
%5 = call i32 (...) @testit()
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i8
store i8 %7, i8* %3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 22
%10 = zext i1 %9 to i8
store i8 %10, i8* %4
%11 = load i8, i8* %4
%12 = trunc i8 %11 to i1
br i1 %12, label %13, label %18
13: ; preds = %1
%14 = load i8, i8* %3
%15 = trunc i8 %14 to i1
%16 = zext i1 %15 to i32
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %13, %1
%19 = call i32 (...) @oof()
br label %20
20: ; preds = %18, %13
ret void
}

LLVM IR (-O2):
define void @test_7(i32 %0) {
%2 = tail call i32 (...) @testit()
%3 = icmp ne i32 %0, 22
%4 = icmp eq i32 %2, 0
%5 = select i1 %3, i1 true, i1 %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @oof()
br label %8
8: ; preds = %1, %6
ret void
}
/* Variables and functions */
float norm1(float *, int);
float norm2(float *, int);
void norms(float x[], float *ptr_norm1, float *ptr_norm2, int n) {
  *ptr_norm1 = norm1(x, n);
  *ptr_norm2 = norm2(x, n);
}


x86 assembly (clang, -O0):
<norms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <norm1@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <norm2@plt>
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norms>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %ecx,%esi
call   1040 <norm1@plt>
movss  %xmm0,(%r15)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <norm2@plt>
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @norms(float* %0, float* %1, float* %2, i32 %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store i32 %3, i32* %8
%9 = load float*, float** %5
%10 = load i32, i32* %8
%11 = call float @norm1(float* %9, i32 %10)
%12 = load float*, float** %6
store float %11, float* %12
%13 = load float*, float** %5
%14 = load i32, i32* %8
%15 = call float @norm2(float* %13, i32 %14)
%16 = load float*, float** %7
store float %15, float* %16
ret void
}

LLVM IR (-O2):
define void @norms(float* %0, float* nocapture writeonly %1, float* nocapture writeonly %2, i32 %3) {
%5 = tail call float @norm1(float* %0, i32 %3)
store float %5, float* %1
%6 = tail call float @norm2(float* %0, i32 %3)
store float %6, float* %2
ret void
}
int dbg_check_filesystem(struct ubifs_info *c) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define i32 @dbg_check_filesystem(%struct.ubifs_info* nocapture readnone %0) {
ret i32 0
}
int main(int argc, char **argv) {
  int *p;
  int result;
  *p = 2;
  if (argc)
    *p = 2;
  result = *p;
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
cmpl   $0x0,-0x8(%rbp)
je     1130 <main+0x30>
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32*, i32** %6
store i32 2, i32* %8
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32*, i32** %6
store i32 2, i32* %12
br label %13
13: ; preds = %11, %2
%14 = load i32*, i32** %6
%15 = load i32, i32* %14
store i32 %15, i32* %7
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadByte(int /*<<< orphan*/, int);
uint8_t wiznetGetSocketInterruptMask(uint8_t socket) {
  return wiznetRegReadByte(socket, (0x0000 + 0x002C));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketInterruptMask>:
mov    $0x2c,%esi
jmp    1030 <wiznetRegReadByte@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketInterruptMask(i32 %0) {
%2 = tail call i32 @wiznetRegReadByte(i32 %0, i32 44)
ret i32 %2
}
/* Variables and functions */
char *strcat(char *, char const *);
char *r_strcat(char *dest, const char *src) { return strcat(dest, src); }


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

x86 assembly (clang, -O2):
<r_strcat>:
jmp    1030 <strcat@plt>

LLVM IR (-O0):
define i8* @r_strcat(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 = load i8*, i8** %4
%7 = call i8* @strcat(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @r_strcat(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcat(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ __cpuid(int *, int);
int CPUSupportsSSE2() {
  int info[4];
  __cpuid(info, 1);
  return (info[3] & (1 << 26));
}


x86 assembly (clang, -O0):
<CPUSupportsSSE2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <__cpuid@plt>
mov    -0x4(%rbp),%eax
and    $0x4000000,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CPUSupportsSSE2>:
sub    $0x18,%rsp
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <__cpuid@plt>
mov    $0x4000000,%eax
and    0xc(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @CPUSupportsSSE2() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%3 = call i32 @__cpuid(i32* %2, i32 1)
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%5 = load i32, i32* %4
%6 = and i32 %5, 67108864
ret i32 %6
}

LLVM IR (-O2):
define i32 @CPUSupportsSSE2() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @__cpuid(i32* %3, i32 1)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%6 = load i32, i32* %5
%7 = and i32 %6, 67108864
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_30_recursive(double *, int);
void helper_double_30(double *buf) { helper_double_30_recursive(buf, 30); }


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

x86 assembly (clang, -O2):
<helper_double_30>:
mov    $0x1e,%esi
jmp    1030 <helper_double_30_recursive@plt>

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

LLVM IR (-O2):
define void @helper_double_30(double* %0) {
%2 = tail call i32 @helper_double_30_recursive(double* %0, i32 30)
ret void
}
int execute_set_mempolicy() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_set_mempolicy() {
ret i32 0
}
int execute_lgetxattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_lgetxattr() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ be64toh(int /*<<< orphan*/);
int64_t decode64(const void *ptr) { return (int64_t)be64toh(*(int64_t *)ptr); }


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

x86 assembly (clang, -O2):
<decode64>:
mov    (%rdi),%edi
jmp    1030 <be64toh@plt>

LLVM IR (-O0):
define i32 @decode64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @be64toh(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @decode64(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @be64toh(i32 %3)
ret i32 %4
}
/* Variables and functions */
int pre(int);
int suc(int);
int sum(int, int);
int sigma(int a) {
  if (a == 0) {
    return 0;
  }
  if (a < 0) {
    return sum(sigma(suc(a)), a);
  } else {
    return sum(sigma(pre(a)), a);
  }
}


x86 assembly (clang, -O0):
<sigma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1161 <sigma+0x21>
movl   $0x0,-0x4(%rbp)
jmp    11a8 <sigma+0x68>
cmpl   $0x0,-0x8(%rbp)
jge    118c <sigma+0x4c>
mov    -0x8(%rbp),%edi
call   1040 <suc@plt>
mov    %eax,%edi
call   1030 <sigma@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1050 <sum@plt>
mov    %eax,-0x4(%rbp)
jmp    11a8 <sigma+0x68>
mov    -0x8(%rbp),%edi
call   1060 <pre@plt>
mov    %eax,%edi
call   1030 <sigma@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1050 <sum@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma>:
test   %edi,%edi
je     1150 <sigma+0x10>
push   %rbx
mov    %edi,%ebx
js     1153 <sigma+0x13>
call   1060 <pre@plt>
jmp    1158 <sigma+0x18>
xor    %eax,%eax
ret
call   1040 <suc@plt>
mov    %eax,%edi
call   1030 <sigma@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1050 <sum@plt>

LLVM IR (-O0):
define i32 @sigma(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %22
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %3
%12 = call i32 @suc(i32 %11)
%13 = call i32 @sigma(i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @sum(i32 %13, i32 %14)
store i32 %15, i32* %2
br label %22
16: ; preds = %7
%17 = load i32, i32* %3
%18 = call i32 @pre(i32 %17)
%19 = call i32 @sigma(i32 %18)
%20 = load i32, i32* %3
%21 = call i32 @sum(i32 %19, i32 %20)
store i32 %21, i32* %2
br label %22
22: ; preds = %16, %10, %6
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @sigma(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 0
br i1 %4, label %11, label %13
5: ; preds = %11, %13
%6 = phi i32 [ %14, %13 ], [ %12, %11 ]
%7 = tail call i32 @sigma(i32 %6)
%8 = tail call i32 @sum(i32 %7, i32 %0)
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ 0, %1 ], [ %8, %5 ]
ret i32 %10
11: ; preds = %3
%12 = tail call i32 @suc(i32 %0)
br label %5
13: ; preds = %3
%14 = tail call i32 @pre(i32 %0)
br label %5
}