xunge/DecIR huggingface dataset:
/* Variables and functions */
int debug_cmd_handler(char *);
int /*<<< orphan*/ gidebug_debugging_is_available();
int gidebug_perform_command(char *cmd) {
  if (!gidebug_debugging_is_available()) {
    return 1;
  }
  return debug_cmd_handler(cmd);
}


x86 assembly (clang, -O0):
<gidebug_perform_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <gidebug_debugging_is_available@plt>
cmp    $0x0,%eax
jne    1148 <gidebug_perform_command+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1154 <gidebug_perform_command+0x34>
mov    -0x10(%rbp),%rdi
call   1030 <debug_cmd_handler@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gidebug_perform_command>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <gidebug_debugging_is_available@plt>
test   %eax,%eax
je     1138 <gidebug_perform_command+0x18>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <debug_cmd_handler@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @gidebug_perform_command(i8* %0) {
%2 = tail call i32 (...) @gidebug_debugging_is_available()
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @debug_cmd_handler(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void ComparatorIntDisable(unsigned long ulBase, unsigned long ulComp) {
  DEBUG_ASSERT(ulBase == 0x4003C000);
  DEBUG_ASSERT(ulComp < 3);
  (*((volatile unsigned long *)(ulBase + 0x00000008))) &= ~(1 << ulComp);
}


x86 assembly (clang, -O0):
<ComparatorIntDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x4003c000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x3,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparatorIntDisable>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x4003c000,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x3,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    $0xfffffffe,%eax
mov    %ebx,%ecx
rol    %cl,%eax
cltq
and    %rax,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ComparatorIntDisable(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 = icmp eq i64 %5, 1073987584
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = icmp ult i64 %9, 3
%11 = zext i1 %10 to i32
%12 = call i32 @DEBUG_ASSERT(i32 %11)
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = shl i32 1, %14
%16 = xor i32 %15, -1
%17 = sext i32 %16 to i64
%18 = load i64, i64* %3
%19 = add i64 %18, 8
%20 = inttoptr i64 %19 to i64*
%21 = load volatile i64, i64* %20
%22 = and i64 %21, %17
store volatile i64 %22, i64* %20
ret void
}

LLVM IR (-O2):
define void @ComparatorIntDisable(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1073987584
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = icmp ult i64 %1, 3
%7 = zext i1 %6 to i32
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = trunc i64 %1 to i32
%10 = shl nuw i32 1, %9
%11 = xor i32 %10, -1
%12 = sext i32 %11 to i64
%13 = add i64 %0, 8
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = and i64 %15, %12
store volatile i64 %16, i64* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
long mbind(void *start, unsigned long len, int mode, unsigned long *nmask,
           unsigned long maxnode, unsigned flags) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<mbind>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ead(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbind>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i64 @mbind(i8* %0, i64 %1, i32 %2, i64* %3, i64 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i64*
%11 = alloca i64
%12 = alloca i32
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i64* %3, i64** %10
store i64 %4, i64* %11
store i32 %5, i32* %12
%13 = load i32, i32* @ENOSYS
store i32 %13, i32* @errno
ret i64 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i64 @mbind(i8* nocapture readnone %0, i64 %1, i32 %2, i64* nocapture readnone %3, i64 %4, i32 %5) {
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i64 -1
}
/* Variables and functions */
int fabs(float);
int colorf_defined(float rgb[3]) {
  int i;
  for (i = 0; i < 3; ++i) {
    if (fabs(rgb[i]) > (1e-5)) {
      break;
    }
  }
  return (i < 3);
}


x86 assembly (clang, -O0):
<colorf_defined>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    116d <colorf_defined+0x5d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xeb5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115a <colorf_defined+0x4a>
jmp    116d <colorf_defined+0x5d>
jmp    115f <colorf_defined+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <colorf_defined+0x13>
cmpl   $0x3,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colorf_defined>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movss  (%rdi),%xmm0
call   1030 <fabs@plt>
mov    $0x1,%ebp
test   %eax,%eax
jg     1148 <colorf_defined+0x38>
movss  0x4(%rbx),%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jg     1148 <colorf_defined+0x38>
movss  0x8(%rbx),%xmm0
call   1030 <fabs@plt>
xor    %ebp,%ebp
test   %eax,%eax
setg   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @colorf_defined(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load float*, float** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load float, float* %11
%13 = call i32 @fabs(float %12)
%14 = sitofp i32 %13 to double
%15 = fcmp ogt double %14, 1.000000e-05
br i1 %15, label %16, label %17
16: ; preds = %7
br label %21
17: ; preds = %7
br label %18
18: ; preds = %17
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %16, %4
%22 = load i32, i32* %3
%23 = icmp slt i32 %22, 3
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @colorf_defined(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @fabs(float %2)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %1
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = tail call i32 @fabs(float %7)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %16, label %10
10: ; preds = %5
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = tail call i32 @fabs(float %12)
%14 = icmp sgt i32 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %10, %5, %1
%17 = phi i32 [ 1, %1 ], [ 1, %5 ], [ %15, %10 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printTable() {
  printf("=============================================\n");
  printf("alpha   0.15    0.1     0.5     0.25    0.01 \n");
  printf("Dmax    0.775   0.819   0.895   0.995   1.035\n");
  printf("=============================================\n");
}


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

x86 assembly (clang, -O2):
<printTable>:
push   %rbx
lea    0xf44(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"=============================================\0A\00"
@.str.1 = [47 x i8] c"alpha 0.15 0.1 0.5 0.25 0.01 \0A\00"
@.str.2 = [47 x i8] c"Dmax 0.775 0.819 0.895 0.995 1.035\0A\00"
define void @printTable() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.3 = [46 x i8] c"alpha 0.15 0.1 0.5 0.25 0.01 \00"
@str.4 = [46 x i8] c"Dmax 0.775 0.819 0.895 0.995 1.035\00"
@str.5 = [46 x i8] c"=============================================\00"
define void @printTable() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.5, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.5, i64 0, i64 0))
ret void
}
int main() {
  printf("testing\n");
  __asm("int $3");
  printf("OK\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
int3
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
int3
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"testing\0A\00"
@.str.1 = [4 x i8] c"OK\0A\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"testing\00"
@str.2 = [3 x i8] c"OK\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
tail call void asm sideeffect "int $$3", "~{dirflag},~{fpsr},~{flags}"()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
const char *dbg_ntype(int type) { return ""; }


x86 assembly (clang, -O0):
<dbg_ntype>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @dbg_ntype(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @dbg_ntype(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
__attribute__((no, noclone)) unsigned __int128 t160_4sub(unsigned __int128 x) {
  unsigned __int128 y = (3);
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t160_4sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x3,-0x40(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
setb   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    116e <t160_4sub+0x5e>
jmp    1175 <t160_4sub+0x65>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t160_4sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
sub    $0x3,%rbx
sbb    $0x0,%r14
jae    112b <t160_4sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t160_4sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 3, i128* %6
%12 = load i128, i128* %5
%13 = load i128, i128* %6
%14 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t160_4sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %6, i128 3)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Type definitions */
typedef int /*<<< orphan*/ wctrans_t;

/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char *);
wctrans_t wctrans(const char *class) {
  if (!strcmp(class, "toupper"))
    return (wctrans_t)1;
  if (!strcmp(class, "tolower"))
    return (wctrans_t)2;
  return 0;
}


x86 assembly (clang, -O0):
<wctrans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <wctrans+0x31>
movl   $0x1,-0x4(%rbp)
jmp    116d <wctrans+0x5d>
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1166 <wctrans+0x56>
movl   $0x2,-0x4(%rbp)
jmp    116d <wctrans+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wctrans>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1140 <wctrans+0x30>
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"toupper\00"
@.str.1 = [8 x i8] c"tolower\00"
define i32 @wctrans(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strcmp(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i32 2, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"toupper\00"
@.str.1 = [8 x i8] c"tolower\00"
define i32 @wctrans(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 2, i32 0
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int iclamp_to(int value, int min, int max) {
  if (value < min)
    return min;
  if (value > max)
    return max;
  return value;
}


x86 assembly (clang, -O0):
<iclamp_to>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <iclamp_to+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <iclamp_to+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <iclamp_to+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <iclamp_to+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iclamp_to>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @iclamp_to(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
void XStoreColors() {}


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

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

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

LLVM IR (-O2):
define void @XStoreColors() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
void print_usage(const char *prog) {
  printf("Reads a pin on the MCP3004 part using spidev and ioctl.\n");
  printf("Usage: %s [OPTION OPTION_ARG]\n", prog);
  puts("  -d --device   device to use (default /dev/spidev0.0)\n"
       "  -p --pin      pin to read (default pin 0, 0-3 valid)\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"Reads a pin on the MCP3004 part using spidev and ioctl.\0A\00"
@.str.1 = [31 x i8] c"Usage: %s [OPTION OPTION_ARG]\0A\00"
@.str.2 = [111 x i8] c" -d --device device to use (default /dev/spidev0.0)\0A -p --pin pin to read (default pin 0, 0-3 valid)\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @puts(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"Usage: %s [OPTION OPTION_ARG]\0A\00"
@.str.2 = [111 x i8] c" -d --device device to use (default /dev/spidev0.0)\0A -p --pin pin to read (default pin 0, 0-3 valid)\0A\00"
@str = [56 x i8] c"Reads a pin on the MCP3004 part using spidev and ioctl.\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
void ref_div_int64_t(int64_t arg1, int64_t arg2, int64_t *result) {
  *result = arg1 / arg2;
}


x86 assembly (clang, -O0):
<ref_div_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_div_int64_t>:
mov    %rdx,%rcx
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
define void @ref_div_int64_t(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* %4
%8 = load i32, i32* %5
%9 = sdiv i32 %7, %8
%10 = load i32*, i32** %6
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @ref_div_int64_t(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = sdiv i32 %0, %1
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void vfree(void *p) { free(p); }


x86 assembly (clang, -O0):
<vfree>:
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):
<vfree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @vfree(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 @vfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *fwhite(char *ss) {
  char *x;
  int n;
  for (x = ss; *x != '\0'; ++x) {
    if (isspace(*x))
      return x;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<fwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116d <fwhite+0x5d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1157 <fwhite+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <fwhite+0x65>
jmp    115c <fwhite+0x4c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <fwhite+0x14>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwhite>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <fwhite+0x29>
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    113b <fwhite+0x2b>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <fwhite+0x10>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @fwhite(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
store i8* %6, i8** %4
br label %7
7: ; preds = %20, %1
%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 %12, label %23
12: ; preds = %7
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = call i64 @isspace(i8 signext %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i8*, i8** %4
store i8* %18, i8** %2
br label %24
19: ; preds = %12
br label %20
20: ; preds = %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %7
23: ; preds = %7
store i8* null, i8** %2
br label %24
24: ; preds = %23, %17
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
define i8* @fwhite(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ null, %1 ], [ null, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
void close_server(int sock, struct addrinfo *res) {
  close(sock);
  freeaddrinfo(res);
}


x86 assembly (clang, -O0):
<close_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    -0x10(%rbp),%rdi
call   1040 <freeaddrinfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_server>:
push   %rbx
mov    %rsi,%rbx
call   1030 <close@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <freeaddrinfo@plt>

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @close_server(i32 %0, %struct.addrinfo* %1) {
%3 = alloca i32
%4 = alloca %struct.addrinfo*
store i32 %0, i32* %3
store %struct.addrinfo* %1, %struct.addrinfo** %4
%5 = load i32, i32* %3
%6 = call i32 @close(i32 %5)
%7 = load %struct.addrinfo*, %struct.addrinfo** %4
%8 = call i32 @freeaddrinfo(%struct.addrinfo* %7)
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @close_server(i32 %0, %struct.addrinfo* %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @freeaddrinfo(%struct.addrinfo* %1)
ret void
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
float randrange(float min, float max) {
  return (max - min) * ((float)rand() / RAND_MAX) + min;
}


x86 assembly (clang, -O0):
<randrange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  -0xc(%rbp),%xmm0
cvtsi2ss %rax,%xmm2
mov    0x2e9f(%rip),%rax
divss  (%rax),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randrange>:
push   %rax
movss  %xmm0,0x4(%rsp)
subss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2eb2(%rip),%rax
divss  (%rax),%xmm0
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @randrange(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fsub float %5, %6
%8 = call i64 (...) @rand()
%9 = sitofp i64 %8 to float
%10 = load float, float* @RAND_MAX
%11 = fdiv float %9, %10
%12 = load float, float* %3
%13 = call float @llvm.fmuladd.f32(float %7, float %11, float %12)
ret float %13
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @randrange(float %0, float %1) {
%3 = fsub float %1, %0
%4 = tail call i64 (...) @rand()
%5 = sitofp i64 %4 to float
%6 = load float, float* @RAND_MAX
%7 = fdiv float %5, %6
%8 = tail call float @llvm.fmuladd.f32(float %3, float %7, float %0)
ret float %8
}
int hlc_capture_stack(void **stack, int size) {
  int count = 0;
  return count;
}


x86 assembly (clang, -O0):
<hlc_capture_stack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hlc_capture_stack(i8** nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ catcher();
int /*<<< orphan*/ catcher2();
int main(void) {
  catcher();
  catcher2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <catcher@plt>
mov    $0x0,%al
call   1040 <catcher2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <catcher@plt>
xor    %eax,%eax
call   1040 <catcher2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @catcher()
%3 = call i32 (...) @catcher2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @catcher()
%2 = tail call i32 (...) @catcher2()
ret i32 0
}
int sub1(int i) { return i - (5 - i); }


x86 assembly (clang, -O0):
<sub1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
sub    -0x4(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub1>:
lea    (%rdi,%rdi,1),%eax
add    $0xfffffffb,%eax
ret

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

LLVM IR (-O2):
define i32 @sub1(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, -5
ret i32 %3
}
void ReverseGPIOP$1$In$toggle(void) { HplMcs51GeneralIOC$P13$toggle(); }


x86 assembly (clang, -O0):
<ReverseGPIOP$1$In$toggle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMcs51GeneralIOC$P13$toggle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseGPIOP$1$In$toggle>:
xor    %eax,%eax
jmp    1030 <HplMcs51GeneralIOC$P13$toggle@plt>

LLVM IR (-O0):
define void @"ReverseGPIOP$1$In$toggle"() {
%1 = call i32 (...) @"HplMcs51GeneralIOC$P13$toggle"()
ret void
}

LLVM IR (-O2):
define void @"ReverseGPIOP$1$In$toggle"() {
%1 = tail call i32 (...) @"HplMcs51GeneralIOC$P13$toggle"()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t htonl(uint32_t val) {
  val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF);
  return (val << 16) | (val >> 16);
}


x86 assembly (clang, -O0):
<htonl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
and    $0xff00ff00,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00ff,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htonl>:
bswap  %edi
ror    $0x10,%edi
mov    %edi,%eax
shl    $0x10,%eax
sar    $0x10,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @htonl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = and i32 %4, -16711936
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 16711935
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = shl i32 %10, 16
%12 = load i32, i32* %2
%13 = ashr i32 %12, 16
%14 = or i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @htonl(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, -16711936
%4 = lshr i32 %0, 8
%5 = and i32 %4, 16711935
%6 = or i32 %3, %5
%7 = shl i32 %6, 16
%8 = ashr i32 %6, 16
%9 = or i32 %7, %8
ret i32 %9
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local2;
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 1UL) {
      local2 = 0UL;
      while (local2 < 1UL) {
        state[0UL] += state[0UL];
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - 746550669UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x1,-0x28(%rbp)
jae    1171 <RandomFunc+0x71>
movq   $0x0,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jae    1160 <RandomFunc+0x60>
mov    -0x18(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1138 <RandomFunc+0x38>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
sub    $0x2c7f758d,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%rax
add    %rax,%rax
add    $0xffffffffd24ca0fd,%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = add i64 %10, -10089659
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %7
br label %13
13: ; preds = %28, %2
%14 = load i64, i64* %7
%15 = icmp ult i64 %14, 1
br i1 %15, label %16, label %31
16: ; preds = %13
store i64 0, i64* %6
br label %17
17: ; preds = %20, %16
%18 = load i64, i64* %6
%19 = icmp ult i64 %18, 1
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%22 = load i64, i64* %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = add i64 %24, %22
store i64 %25, i64* %23
%26 = load i64, i64* %6
%27 = add i64 %26, 2
store i64 %27, i64* %6
br label %17
28: ; preds = %17
%29 = load i64, i64* %7
%30 = add i64 %29, 2
store i64 %30, i64* %7
br label %13
31: ; preds = %13
%32 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%33 = load i64, i64* %32
%34 = sub i64 %33, 746550669
%35 = load i64*, i64** %4
%36 = getelementptr inbounds i64, i64* %35, i64 0
store i64 %34, i64* %36
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = shl i64 %3, 1
%5 = add i64 %4, -766729987
store i64 %5, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clrScreen();
int /*<<< orphan*/ drawBar();
int /*<<< orphan*/ getTime(int *, int *, int *);
int /*<<< orphan*/ loadProgram();
int /*<<< orphan*/ makeInterrupt21();
void main() {
  int hr;
  int min;
  int sec;
  getTime(&hr, &min, &sec);
  clrScreen();
  drawBar();
  makeInterrupt21();
  loadProgram();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <getTime@plt>
mov    $0x0,%al
call   1060 <clrScreen@plt>
mov    $0x0,%al
call   1030 <drawBar@plt>
mov    $0x0,%al
call   1050 <makeInterrupt21@plt>
mov    $0x0,%al
call   1070 <loadProgram@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <getTime@plt>
xor    %eax,%eax
call   1060 <clrScreen@plt>
xor    %eax,%eax
call   1030 <drawBar@plt>
xor    %eax,%eax
call   1050 <makeInterrupt21@plt>
xor    %eax,%eax
call   1070 <loadProgram@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @getTime(i32* %1, i32* %2, i32* %3)
%5 = call i32 (...) @clrScreen()
%6 = call i32 (...) @drawBar()
%7 = call i32 (...) @makeInterrupt21()
%8 = call i32 (...) @loadProgram()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @getTime(i32* %1, i32* %2, i32* %3)
%8 = call i32 (...) @clrScreen()
%9 = call i32 (...) @drawBar()
%10 = call i32 (...) @makeInterrupt21()
%11 = call i32 (...) @loadProgram()
ret void
}
const char *ejdbversion() { return "1.1.23"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"1.1.23\00"
define i8* @ejdbversion() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
void streamInqHistoryString(int streamID, char *history) {
  (void)streamID;
  (void)history;
}


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

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

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

LLVM IR (-O2):
define void @streamInqHistoryString(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void endLine(void) {
  printf(
      " |----------------------------------------------------------------------"
      "-------------------------------------------------------------| \n");
}


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

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

LLVM IR (-O0):
@.str = [137 x i8] c" |-----------------------------------------------------------------------------------------------------------------------------------| \0A\00"
define void @endLine() {
%1 = call i32 @printf(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [136 x i8] c" |-----------------------------------------------------------------------------------------------------------------------------------| \00"
define void @endLine() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([136 x i8], [136 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char);
int dump_raw(char *buf, int len) {
  int i;
  for (i = 0; i < len; i++)
    printf("%c", buf[i]);
  exit(1);
}


x86 assembly (clang, -O0):
<dump_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1168 <dump_raw+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <dump_raw+0x16>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<dump_raw>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1156 <dump_raw+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <dump_raw+0x20>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @dump_raw(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_RemoteIOClient_RemoteInput_InputMouseMove(void *);
int /*<<< orphan*/ printf(char *, int, int);
void UpnpRemoteIOClient_RemoteInput_InputMouseMove(void *upnptoken, int X,
                                                   int Y) {
  printf("Invoke: UpnpRemoteIOClient_RemoteInput_InputMouseMove(%d,%d);\r\n", X,
         Y);
  UpnpResponse_RemoteIOClient_RemoteInput_InputMouseMove(upnptoken);
}


x86 assembly (clang, -O0):
<UpnpRemoteIOClient_RemoteInput_InputMouseMove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UpnpResponse_RemoteIOClient_RemoteInput_InputMouseMove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteInput_InputMouseMove>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_RemoteIOClient_RemoteInput_InputMouseMove@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"Invoke: UpnpRemoteIOClient_RemoteInput_InputMouseMove(%d,%d);\0D\0A\00"
define void @UpnpRemoteIOClient_RemoteInput_InputMouseMove(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i8*, i8** %4
%11 = call i32 @UpnpResponse_RemoteIOClient_RemoteInput_InputMouseMove(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"Invoke: UpnpRemoteIOClient_RemoteInput_InputMouseMove(%d,%d);\0D\0A\00"
define void @UpnpRemoteIOClient_RemoteInput_InputMouseMove(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%5 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteInput_InputMouseMove(i8* %0)
ret void
}
/* Type definitions */
struct dtree_dev_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dtree_procfs_dev_free(struct dtree_dev_t *);
void dtree_dev_free(struct dtree_dev_t *dev) { dtree_procfs_dev_free(dev); }


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

x86 assembly (clang, -O2):
<dtree_dev_free>:
jmp    1030 <dtree_procfs_dev_free@plt>

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

LLVM IR (-O2):
%struct.dtree_dev_t = type { i32 }
define void @dtree_dev_free(%struct.dtree_dev_t* %0) {
%2 = tail call i32 @dtree_procfs_dev_free(%struct.dtree_dev_t* %0)
ret void
}
void getAByte(char *buff, int *code) {
  int byte;
  *code = (*code << 8);
  byte = (int)*buff;
  byte &= 0xFF;
  *code |= byte;
}


x86 assembly (clang, -O0):
<getAByte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAByte>:
mov    (%rsi),%eax
shl    $0x8,%eax
mov    %eax,(%rsi)
movzbl (%rdi),%ecx
or     %eax,%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define void @getAByte(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = shl i32 %7, 8
%9 = load i32*, i32** %4
store i32 %8, i32* %9
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = and i32 %13, 255
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = or i32 %17, %15
store i32 %18, i32* %16
ret void
}

LLVM IR (-O2):
define void @getAByte(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 8
store i32 %4, i32* %1
%5 = load i8, i8* %0
%6 = zext i8 %5 to i32
%7 = or i32 %4, %6
store i32 %7, i32* %1
ret void
}