xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print_str_and_int(char *);
int main(void) {
  print_str_and_int("Hello");
  print_str_and_int("3");
  print_str_and_int("0");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <print_str_and_int@plt>
lea    0xed4(%rip),%rdi
call   1030 <print_str_and_int@plt>
lea    0xeca(%rip),%rdi
call   1030 <print_str_and_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [2 x i8] c"3\00"
@.str.2 = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print_str_and_int(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @print_str_and_int(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @print_str_and_int(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [2 x i8] c"3\00"
@.str.2 = [2 x i8] c"0\00"
define i32 @main() {
%1 = tail call i32 @print_str_and_int(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_str_and_int(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @print_str_and_int(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int check_cd(char *ip) {
  if ((strcmp(ip, "cd")) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_cd>:
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,%rax
jne    1142 <check_cd+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <check_cd+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"cd\00"
define i32 @check_cd(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int main(int argc, char **argv) {
  int A[10];
  A[0] = 1;
  0 [A] = 2;
  A[1] = 3;
  1 [A] = 4;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x40(%rbp)
movl   $0x2,-0x40(%rbp)
movl   $0x3,-0x3c(%rbp)
movl   $0x4,-0x3c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
store i32 1, i32* %7
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
store i32 2, i32* %8
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 1
store i32 3, i32* %9
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 1
store i32 4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int fibo(int);
int main() {
  int x = 15;
  int result = fibo(x);
  if (result != 610) {
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xf,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fibo@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x262,-0xc(%rbp)
je     1155 <main+0x35>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf,%edi
call   1040 <fibo@plt>
cmp    $0x262,%eax
je     1139 <main+0x19>
xor    %eax,%eax
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibo(i32 15)
%2 = icmp eq i32 %1, 610
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
int odd(int number) {
  if (number % 2 == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<odd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <odd+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <odd+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odd>:
mov    %edi,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @odd(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ kprintf(char *, unsigned int);
int partB(int);
int partA(int i) {
  int j = 99;
  kprintf("In a, local var j is at 0x%x\r\n", (unsigned int)&j);
  kprintf("In a, param i is at 0x%x\r\n", (unsigned int)&i);
  return partB(j);
}


x86 assembly (clang, -O0):
<partA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x63,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1040 <kprintf@plt>
lea    -0x4(%rbp),%rax
mov    %eax,%esi
lea    0xece(%rip),%rdi
call   1040 <kprintf@plt>
mov    -0x8(%rbp),%edi
call   1030 <partB@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<partA>:
push   %rax
mov    %edi,0x4(%rsp)
movl   $0x63,(%rsp)
mov    %rsp,%rsi
lea    0xeca(%rip),%rdi
call   1040 <kprintf@plt>
lea    0x4(%rsp),%rsi
lea    0xed8(%rip),%rdi
call   1040 <kprintf@plt>
mov    (%rsp),%edi
call   1030 <partB@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"In a, local var j is at 0x%x\0D\0A\00"
@.str.1 = [27 x i8] c"In a, param i is at 0x%x\0D\0A\00"
define i32 @partA(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 99, i32* %3
%4 = ptrtoint i32* %3 to i32
%5 = call i32 @kprintf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = ptrtoint i32* %2 to i32
%7 = call i32 @kprintf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @partB(i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [31 x i8] c"In a, local var j is at 0x%x\0D\0A\00"
@.str.1 = [27 x i8] c"In a, param i is at 0x%x\0D\0A\00"
define i32 @partA(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
store i32 99, i32* %3
%5 = ptrtoint i32* %3 to i64
%6 = trunc i64 %5 to i32
%7 = call i32 @kprintf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = ptrtoint i32* %2 to i64
%9 = trunc i64 %8 to i32
%10 = call i32 @kprintf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @partB(i32 %11)
ret i32 %12
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void Utf(int m, uint a) {
  if (a & m) {
    Utf(m >> 1, a >> 6);
    putchar(128 | a & 63);
  } else
    putchar((m << 1) & 255 | a);
}


x86 assembly (clang, -O0):
<Utf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
cmp    $0x0,%eax
je     1164 <Utf+0x44>
mov    -0x4(%rbp),%edi
sar    $0x1,%edi
mov    -0x8(%rbp),%esi
sar    $0x6,%esi
call   1040 <Utf@plt>
mov    -0x8(%rbp),%edi
and    $0x3f,%edi
or     $0x80,%edi
call   1030 <putchar@plt>
jmp    1178 <Utf+0x58>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
and    $0xff,%edi
or     -0x8(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Utf>:
push   %rbx
mov    %esi,%ebx
test   %edi,%esi
je     113e <Utf+0x1e>
sar    %edi
mov    %ebx,%esi
sar    $0x6,%esi
call   1040 <Utf@plt>
and    $0x3f,%ebx
or     $0x80,%ebx
jmp    1146 <Utf+0x26>
add    %edi,%edi
movzbl %dil,%eax
or     %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @Utf(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %13, %8
%6 = phi i32 [ %16, %13 ], [ %12, %8 ]
%7 = tail call i32 @putchar(i32 %6)
ret void
8: ; preds = %2
%9 = ashr i32 %0, 1
%10 = ashr i32 %1, 6
tail call void @Utf(i32 %9, i32 %10)
%11 = and i32 %1, 63
%12 = or i32 %11, 128
br label %5
13: ; preds = %2
%14 = shl i32 %0, 1
%15 = and i32 %14, 254
%16 = or i32 %15, %1
br label %5
}
char *langDbgDevSvi80Col() { return "SVI 80 Column"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"SVI 80 Column\00"
define i8* @langDbgDevSvi80Col() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"SVI 80 Column\00"
define i8* @langDbgDevSvi80Col() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
void gdk_window_type_hint_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_type_hint_get_type() {
ret void
}
void gtk_icon_info_get_display_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_info_get_display_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ floor(int);
int log(int);
scalar_t__ pow(int, int /*<<< orphan*/);
int findPowerFloor(int input) {
  return (int)pow(2, floor(log(input) / log(2)));
}


x86 assembly (clang, -O0):
<findPowerFloor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log@plt>
mov    %eax,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <floor@plt>
mov    %eax,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findPowerFloor>:
push   %rbx
call   1030 <log@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <floor@plt>
mov    $0x2,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <pow@plt>

LLVM IR (-O0):
define i32 @findPowerFloor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log(i32 %3)
%5 = call i32 @log(i32 2)
%6 = sdiv i32 %4, %5
%7 = call i32 @floor(i32 %6)
%8 = call i64 @pow(i32 2, i32 %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @findPowerFloor(i32 %0) {
%2 = tail call i32 @log(i32 %0)
%3 = tail call i32 @log(i32 2)
%4 = sdiv i32 %2, %3
%5 = tail call i32 @floor(i32 %4)
%6 = tail call i64 @pow(i32 2, i32 %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int naive_scanf(char *, int *);
int /*<<< orphan*/ solve(int);
int program_main() {
  int n;
  while (naive_scanf("%d", &n) == 1 && n)
    solve(n);
  return 0;
}


x86 assembly (clang, -O0):
<program_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <naive_scanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x5(%rbp)
jne    1152 <program_main+0x32>
cmpl   $0x0,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1162 <program_main+0x42>
jmp    116f <program_main+0x4f>
mov    -0x4(%rbp),%edi
call   1030 <solve@plt>
jmp    1128 <program_main+0x8>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<program_main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <naive_scanf@plt>
cmp    $0x1,%eax
jne    116d <program_main+0x4d>
mov    0x4(%rsp),%edi
test   %edi,%edi
je     116d <program_main+0x4d>
lea    0xeb7(%rip),%r14
lea    0x4(%rsp),%rbx
xchg   %ax,%ax
call   1030 <solve@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <naive_scanf@plt>
cmp    $0x1,%eax
jne    116d <program_main+0x4d>
mov    0x4(%rsp),%edi
test   %edi,%edi
jne    1150 <program_main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @program_main() {
%1 = alloca i32
br label %2
2: ; preds = %10, %0
%3 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 0
br label %8
8: ; preds = %5, %2
%9 = phi i1 [ false, %2 ], [ %7, %5 ]
br i1 %9, label %10, label %13
10: ; preds = %8
%11 = load i32, i32* %1
%12 = call i32 @solve(i32 %11)
br label %2
13: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @program_main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 0
%7 = select i1 %4, i1 %6, i1 false
br i1 %7, label %8, label %16
8: ; preds = %0, %8
%9 = phi i32 [ %13, %8 ], [ %5, %0 ]
%10 = call i32 @solve(i32 %9)
%11 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = icmp eq i32 %11, 1
%13 = load i32, i32* %1
%14 = icmp ne i32 %13, 0
%15 = select i1 %12, i1 %14, i1 false
br i1 %15, label %8, label %16
16: ; preds = %8, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: httpv <options> <url> \n"
         " Options: \n"
         " -p, --path <P> path of url \n"
         " -P, --port <P> port of host \n"
         " -t, --threads <N> Number of threads to use \n"
         " \n"
         " -f, --file <F> Load ip file \n"
         " -H, --header <H> Add header to request \n"
         " --latency Print latency statistics \n"
         " --timeout <T> Socket/request timeout \n"
         " -v, --version Print version details \n"
         " \n"
         " Numeric arguments may include a SI unit (1k, 1M, 1G)\n"
         " Time arguments may include a time unit (2s, 2m, 2h)\n");
}


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

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

LLVM IR (-O0):
@.str = [442 x i8] c"Usage: httpv <options> <url> \0A Options: \0A -p, --path <P> path of url \0A -P, --port <P> port of host \0A -t, --threads <N> Number of threads to use \0A \0A -f, --file <F> Load ip file \0A -H, --header <H> Add header to request \0A --latency Print latency statistics \0A --timeout <T> Socket/request timeout \0A -v, --version Print version details \0A \0A Numeric arguments may include a SI unit (1k, 1M, 1G)\0A Time arguments may include a time unit (2s, 2m, 2h)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([442 x i8], [442 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [441 x i8] c"Usage: httpv <options> <url> \0A Options: \0A -p, --path <P> path of url \0A -P, --port <P> port of host \0A -t, --threads <N> Number of threads to use \0A \0A -f, --file <F> Load ip file \0A -H, --header <H> Add header to request \0A --latency Print latency statistics \0A --timeout <T> Socket/request timeout \0A -v, --version Print version details \0A \0A Numeric arguments may include a SI unit (1k, 1M, 1G)\0A Time arguments may include a time unit (2s, 2m, 2h)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([441 x i8], [441 x i8]* @str, i64 0, i64 0))
ret void
}
double INtoMI(double IN) { return IN / 63360; }


x86 assembly (clang, -O0):
<INtoMI>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<INtoMI>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @INtoMI(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 6.336000e+04
ret double %4
}

LLVM IR (-O2):
define double @INtoMI(double %0) {
%2 = fdiv double %0, 6.336000e+04
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void handler(int signum) {
  printf("Request timed out\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Request timed out\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [18 x i8] c"Request timed out\00"
define void @handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char tolower(char);
void ST_tolower(char *s) {
  while (*s) {
    *s = tolower(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<ST_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <ST_tolower+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ST_tolower+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ST_tolower>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <ST_tolower+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ST_tolower+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ST_tolower(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @tolower(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ST_tolower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *oauth_serialize_url_sep(int, int, char **, char *, int /*<<< orphan*/);
char *oauth_serialize_url(int argc, int start, char **argv) {
  return oauth_serialize_url_sep(argc, start, argv, "&", 0);
}


x86 assembly (clang, -O0):
<oauth_serialize_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xecd(%rip),%rcx
xor    %r8d,%r8d
call   1030 <oauth_serialize_url_sep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oauth_serialize_url>:
lea    0xee9(%rip),%rcx
xor    %r8d,%r8d
jmp    1030 <oauth_serialize_url_sep@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"&\00"
define i8* @oauth_serialize_url(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i8**, i8*** %6
%10 = call i8* @oauth_serialize_url_sep(i32 %7, i32 %8, i8** %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0)
ret i8* %10
}

LLVM IR (-O2):
@.str = [2 x i8] c"&\00"
define i8* @oauth_serialize_url(i32 %0, i32 %1, i8** %2) {
%4 = tail call i8* @oauth_serialize_url_sep(i32 %0, i32 %1, i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0)
ret i8* %4
}
void kmain() {
  gdt_install();
  idt_install();
  isrs_install();
  irq_install();
  __asm__ __volatile__("sti");
  timer_install();
  kb_install();
  init_video();
  page_init();
  cls();
  kputs("hello world!");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <gdt_install@plt>
mov    $0x0,%al
call   1080 <idt_install@plt>
mov    $0x0,%al
call   1090 <isrs_install@plt>
mov    $0x0,%al
call   1050 <irq_install@plt>
sti
mov    $0x0,%al
call   1030 <timer_install@plt>
mov    $0x0,%al
call   1060 <kb_install@plt>
mov    $0x0,%al
call   1040 <init_video@plt>
mov    $0x0,%al
call   10a0 <page_init@plt>
mov    $0x0,%al
call   10b0 <cls@plt>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   10c0 <kputs@plt>
jmp    11f2 <kmain+0x52>

x86 assembly (clang, -O2):
<kmain>:
push   %rax
xor    %eax,%eax
call   1070 <gdt_install@plt>
xor    %eax,%eax
call   1080 <idt_install@plt>
xor    %eax,%eax
call   1090 <isrs_install@plt>
xor    %eax,%eax
call   1050 <irq_install@plt>
sti
xor    %eax,%eax
call   1030 <timer_install@plt>
xor    %eax,%eax
call   1060 <kb_install@plt>
xor    %eax,%eax
call   1040 <init_video@plt>
xor    %eax,%eax
call   10a0 <page_init@plt>
xor    %eax,%eax
call   10b0 <cls@plt>
lea    0xe18(%rip),%rdi
xor    %eax,%eax
call   10c0 <kputs@plt>
nop
jmp    11f0 <kmain+0x50>

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
define void @kmain() {
%1 = call i32 (...) @gdt_install()
%2 = call i32 (...) @idt_install()
%3 = call i32 (...) @isrs_install()
%4 = call i32 (...) @irq_install()
%5 = call i32 (...) @timer_install()
%6 = call i32 (...) @kb_install()
%7 = call i32 (...) @init_video()
%8 = call i32 (...) @page_init()
%9 = call i32 (...) @cls()
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @kputs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %11, %0
br label %11
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
define void @kmain() {
%1 = tail call i32 (...) @gdt_install()
%2 = tail call i32 (...) @idt_install()
%3 = tail call i32 (...) @isrs_install()
%4 = tail call i32 (...) @irq_install()
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
%5 = tail call i32 (...) @timer_install()
%6 = tail call i32 (...) @kb_install()
%7 = tail call i32 (...) @init_video()
%8 = tail call i32 (...) @page_init()
%9 = tail call i32 (...) @cls()
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kputs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %11, %0
br label %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
scalar_t__ putchar(int);
void cat(char *filename, FILE *strm, void *data) {
  int tmp;
  ((void)filename);
  ((void)data);
  while (1) {
    tmp = getc(strm);
    if (tmp == EOF) {
      return;
    }
    (void)putchar(tmp);
  }
}


x86 assembly (clang, -O0):
<cat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%eax
jne    1158 <cat+0x38>
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x1c(%rbp),%edi
call   1030 <putchar@plt>
jmp    1134 <cat+0x14>

x86 assembly (clang, -O2):
<cat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1040 <getc@plt>
mov    0x2eb2(%rip),%r14
cmp    (%r14),%eax
je     1154 <cat+0x34>
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    (%r14),%eax
jne    1140 <cat+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @cat(i8* %0, i32* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %6
br label %10
10: ; preds = %3, %17
%11 = load i32*, i32** %5
%12 = call i32 @getc(i32* %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %10
ret void
17: ; preds = %10
%18 = load i32, i32* %7
%19 = call i64 @putchar(i32 %18)
br label %10
}

LLVM IR (-O2):
@EOF = global i32 0
define void @cat(i8* nocapture readnone %0, i32* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @getc(i32* %1)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %8, %3
ret void
8: ; preds = %3, %8
%9 = phi i32 [ %11, %8 ], [ %4, %3 ]
%10 = tail call i64 @putchar(i32 %9)
%11 = tail call i32 @getc(i32* %1)
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %7, label %8
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ hash(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *word = (char *)malloc(200 * sizeof(char));
  scanf("%s", word);
  printf("%ld", hash(word));
  free(word);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc8,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1070 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <hash@plt>
mov    %eax,%esi
lea    0xe74(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xc8,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xe9b(%rip),%rdi
mov    %rax,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1040 <hash@plt>
lea    0xe87(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 200)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @hash(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 200)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @hash(i8* %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fb_hDateDecodeSerial(double, int *, int *, int *);
int fb_hGetDayOfYearEx(int, int, int);
int fb_hGetDayOfYear(double serial) {
  int year, month, day;
  fb_hDateDecodeSerial(serial, &year, &month, &day);
  return fb_hGetDayOfYearEx(year, month, day);
}


x86 assembly (clang, -O0):
<fb_hGetDayOfYear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <fb_hDateDecodeSerial@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <fb_hGetDayOfYearEx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_hGetDayOfYear>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <fb_hDateDecodeSerial@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <fb_hGetDayOfYearEx@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @fb_hGetDayOfYear(double %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = call i32 @fb_hDateDecodeSerial(double %0, i32* %2, i32* %3, i32* %4)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @fb_hGetDayOfYearEx(i32 %9, i32 %10, i32 %11)
ret i32 %12
}
/* Variables and functions */
char not_b(char *);
signed char intr_wrap_577(signed char p1) { return not_b(&p1); }


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

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

LLVM IR (-O0):
define signext i8 @intr_wrap_577(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call signext i8 @not_b(i8* %2)
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @intr_wrap_577(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call signext i8 @not_b(i8* %2)
ret i8 %3
}
unsigned short max(unsigned short a, unsigned short b) {
  return (a > b) ? a : b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jle    112e <max+0x2e>
movzwl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <max+0x35>
movzwl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %ax,%di
cmova  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @max(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
br label %16
13: ; preds = %2
%14 = load i16, i16* %4
%15 = zext i16 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @max(i16 zeroext %0, i16 zeroext %1) {
%3 = icmp ugt i16 %0, %1
%4 = select i1 %3, i16 %0, i16 %1
ret i16 %4
}
/* Variables and functions */
size_t unum_digits(unsigned long num, int base) {
  size_t len;
  if (base <= 0)
    return 0;
  for (len = 1; num >= base; num /= base, ++len)
    ;
  return len;
}


x86 assembly (clang, -O0):
<unum_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1122 <unum_digits+0x22>
movq   $0x0,-0x8(%rbp)
jmp    116a <unum_digits+0x6a>
movq   $0x1,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmp    %rcx,%rax
jb     1162 <unum_digits+0x62>
jmp    1140 <unum_digits+0x40>
movslq -0x14(%rbp),%rcx
mov    -0x10(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112a <unum_digits+0x2a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unum_digits>:
test   %esi,%esi
jle    113d <unum_digits+0x3d>
mov    %rdi,%rax
mov    %esi,%esi
mov    $0x1,%ecx
cmp    %rdi,%rsi
jbe    112e <unum_digits+0x2e>
mov    %rcx,%rax
ret
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
div    %rsi
add    $0x1,%rcx
cmp    %rsi,%rax
jb     1113 <unum_digits+0x13>
mov    %rax,%rdx
shr    $0x20,%rdx
jne    1120 <unum_digits+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <unum_digits+0x25>
xor    %ecx,%ecx
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @unum_digits(i64 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = icmp ugt i64 %5, %0
br i1 %6, label %13, label %7
7: ; preds = %4, %7
%8 = phi i64 [ %11, %7 ], [ 1, %4 ]
%9 = phi i64 [ %10, %7 ], [ %0, %4 ]
%10 = udiv i64 %9, %5
%11 = add i64 %8, 1
%12 = icmp ult i64 %10, %5
br i1 %12, label %13, label %7
13: ; preds = %7, %4, %2
%14 = phi i64 [ 0, %2 ], [ 1, %4 ], [ %11, %7 ]
ret i64 %14
}
int Cyc_Relations_consistent_relations(struct Cyc_List_List *rlns) {
  struct Cyc_Pratt_Graph *G = ({ Cyc_Pratt_empty_graph(); });
  return ({ Cyc_Relations_consist_relations(G, rlns); });
}


x86 assembly (clang, -O0):
<Cyc_Relations_consistent_relations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Cyc_Pratt_empty_graph@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <Cyc_Relations_consist_relations@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Relations_consistent_relations>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <Cyc_Pratt_empty_graph@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <Cyc_Relations_consist_relations@plt>

LLVM IR (-O0):
%struct.Cyc_List_List = type opaque
%struct.Cyc_Pratt_Graph = type opaque
define i32 @Cyc_Relations_consistent_relations(%struct.Cyc_List_List* %0) {
%2 = alloca %struct.Cyc_List_List*
%3 = alloca %struct.Cyc_Pratt_Graph*
%4 = alloca i32
%5 = alloca i32
store %struct.Cyc_List_List* %0, %struct.Cyc_List_List** %2
%6 = call i32 (...) @Cyc_Pratt_empty_graph()
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to %struct.Cyc_Pratt_Graph*
store %struct.Cyc_Pratt_Graph* %9, %struct.Cyc_Pratt_Graph** %3
%10 = load %struct.Cyc_Pratt_Graph*, %struct.Cyc_Pratt_Graph** %3
%11 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %2
%12 = call i32 (%struct.Cyc_Pratt_Graph*, %struct.Cyc_List_List*, ...) bitcast (i32 (...)* @Cyc_Relations_consist_relations to i32 (%struct.Cyc_Pratt_Graph*, %struct.Cyc_List_List*, ...)*)(%struct.Cyc_Pratt_Graph* %10, %struct.Cyc_List_List* %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
%struct.Cyc_List_List = type opaque
%struct.Cyc_Pratt_Graph = type opaque
define i32 @Cyc_Relations_consistent_relations(%struct.Cyc_List_List* %0) {
%2 = tail call i32 (...) @Cyc_Pratt_empty_graph()
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to %struct.Cyc_Pratt_Graph*
%5 = tail call i32 (%struct.Cyc_Pratt_Graph*, %struct.Cyc_List_List*, ...) bitcast (i32 (...)* @Cyc_Relations_consist_relations to i32 (%struct.Cyc_Pratt_Graph*, %struct.Cyc_List_List*, ...)*)(%struct.Cyc_Pratt_Graph* %4, %struct.Cyc_List_List* %0)
ret i32 %5
}
int do_313() { return 313; }


x86 assembly (clang, -O0):
<do_313>:
push   %rbp
mov    %rsp,%rbp
mov    $0x139,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_313() {
ret i32 313
}

LLVM IR (-O2):
define i32 @do_313() {
ret i32 313
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int LOG_PERROR;
int LOG_PID;
int /*<<< orphan*/ openlog(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void bfdLogInit(void) { openlog(NULL, LOG_PID | LOG_PERROR, LOG_DAEMON); }


x86 assembly (clang, -O0):
<bfdLogInit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    0x2ebc(%rip),%rax
or     (%rax),%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%edi
call   1030 <openlog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfdLogInit>:
mov    0x2eb9(%rip),%rax
mov    0x2ec2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
xor    %edi,%edi
jmp    1030 <openlog@plt>

LLVM IR (-O0):
@LOG_PID = global i32 0
@LOG_PERROR = global i32 0
@LOG_DAEMON = global i32 0
define void @bfdLogInit() {
%1 = load i32, i32* @LOG_PID
%2 = load i32, i32* @LOG_PERROR
%3 = or i32 %1, %2
%4 = load i32, i32* @LOG_DAEMON
%5 = call i32 @openlog(i32* null, i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@LOG_PID = global i32 0
@LOG_PERROR = global i32 0
@LOG_DAEMON = global i32 0
define void @bfdLogInit() {
%1 = load i32, i32* @LOG_PID
%2 = load i32, i32* @LOG_PERROR
%3 = or i32 %2, %1
%4 = load i32, i32* @LOG_DAEMON
%5 = tail call i32 @openlog(i32* null, i32 %3, i32 %4)
ret void
}
void XShmAttach() {}


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

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

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

LLVM IR (-O2):
define void @XShmAttach() {
ret void
}
void gennor() {}


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

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

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

LLVM IR (-O2):
define void @gennor() {
ret void
}
int f(void) {
  int j = 0;
  for (int i = 0; i < 10; i++) {
    j = j * 2;
  }
  return j;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1133 <f+0x33>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <f+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
int any(int c, const char *s) {
  while (*s)
    if (*s++ == c)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<any>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1144 <any+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    113f <any+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    114b <any+0x4b>
jmp    110b <any+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any>:
movsbl (%rsi),%eax
test   %eax,%eax
je     1115 <any+0x15>
add    $0x1,%rsi
cmp    %edi,%eax
jne    1100 <any>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @any(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ SHA1_Final(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA1_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ hashbn(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
void quickhashbn(unsigned char *md, const BIGNUM *bn) {
  SHA_CTX sha;
  SHA1_Init(&sha);
  hashbn(&sha, bn);
  SHA1_Final(md, &sha);
}


x86 assembly (clang, -O0):
<quickhashbn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <SHA1_Init@plt>
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdi
call   1030 <hashbn@plt>
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <SHA1_Final@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickhashbn>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xc(%rsp),%r15
mov    %r15,%rdi
call   1040 <SHA1_Init@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <hashbn@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <SHA1_Final@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @quickhashbn(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = call i32 @SHA1_Init(i32* %5)
%7 = load i32*, i32** %4
%8 = call i32 @hashbn(i32* %5, i32* %7)
%9 = load i8*, i8** %3
%10 = call i32 @SHA1_Final(i8* %9, i32* %5)
ret void
}

LLVM IR (-O2):
define void @quickhashbn(i8* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @SHA1_Init(i32* %3)
%6 = call i32 @hashbn(i32* %3, i32* %1)
%7 = call i32 @SHA1_Final(i8* %0, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
int /*<<< orphan*/ replace();
int main(int x) {
  f();
  if (x)
    replace();
  g();
  if (x)
    replace();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
cmpl   $0x0,-0x8(%rbp)
je     115a <main+0x2a>
mov    $0x0,%al
call   1050 <replace@plt>
mov    $0x0,%al
call   1040 <g@plt>
cmpl   $0x0,-0x8(%rbp)
je     1172 <main+0x42>
mov    $0x0,%al
call   1050 <replace@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
test   %ebx,%ebx
je     1155 <main+0x25>
call   1050 <replace@plt>
xor    %eax,%eax
call   1040 <g@plt>
xor    %eax,%eax
call   1050 <replace@plt>
jmp    115a <main+0x2a>
call   1040 <g@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call i32 (...) @f()
%3 = icmp eq i32 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 (...) @replace()
%6 = tail call i32 (...) @g()
%7 = tail call i32 (...) @replace()
br label %10
8: ; preds = %1
%9 = tail call i32 (...) @g()
br label %10
10: ; preds = %8, %4
ret i32 0
}