xunge/DecIR huggingface dataset:
void gtk_check_menu_item_new_with_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_check_menu_item_new_with_label() {
ret void
}
void g_utf8_normalize() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_normalize() {
ret void
}
int call_i(int (*func)(int), int arg) { return func(arg); }


x86 assembly (clang, -O0):
<call_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_i>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @call_i(i32 (i32)* nocapture %0, i32 %1) {
%3 = tail call i32 %0(i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ use(char *);
void test_all_a() {
  char a[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  use(a);
}


x86 assembly (clang, -O0):
<test_all_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x3f,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1030 <use@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_all_a>:
sub    $0x48,%rsp
movups 0xf14(%rip),%xmm0
movups %xmm0,0x2f(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <use@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.test_all_a.a = [63 x i8] c"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\00"
define void @test_all_a() {
%1 = alloca [63 x i8]
%2 = bitcast [63 x i8]* %1 to i8*
%3 = getelementptr inbounds [63 x i8], [63 x i8]* %1, i64 0, i64 0
%4 = call i32 @use(i8* %3)
ret void
}

LLVM IR (-O2):
@__const.test_all_a.a = [63 x i8] c"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\00"
define void @test_all_a() {
%1 = alloca [63 x i8]
%2 = getelementptr inbounds [63 x i8], [63 x i8]* %1, i64 0, i64 0
%3 = call i32 @use(i8* %2)
ret void
}
void network_end() {}


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

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

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

LLVM IR (-O2):
define void @network_end() {
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *subString(int offset, int len, const char *input) {
  char *sub = malloc(sizeof(char) * len);
  strncpy(sub, input + offset, len);
  return sub;
}


x86 assembly (clang, -O0):
<subString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x4(%rbp),%rax
add    %rax,%rsi
mov    -0x8(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subString>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%r15d
mov    %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movslq %r15d,%rsi
add    %r14,%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @subString(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = load i8*, i8** %6
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i32, i32* %5
%19 = call i32 @strncpy(i8* %13, i8* %17, i32 %18)
%20 = load i8*, i8** %7
ret i8* %20
}

LLVM IR (-O2):
define i8* @subString(i32 %0, i32 %1, i8* %2) {
%4 = tail call i8* @malloc(i32 %1)
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds i8, i8* %2, i64 %5
%7 = tail call i32 @strncpy(i8* %4, i8* %6, i32 %1)
ret i8* %4
}
/* Type definitions */
struct BCState {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WriteHSCXCMDR(struct BCState *, int);
int /*<<< orphan*/ recv_empty_fifo_b(struct BCState *, int);
void hscx_empty_fifo(struct BCState *bcs, int count) {
  recv_empty_fifo_b(bcs, count);
  WriteHSCXCMDR(bcs, 0x80);
}


x86 assembly (clang, -O0):
<hscx_empty_fifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <recv_empty_fifo_b@plt>
mov    -0x8(%rbp),%rdi
mov    $0x80,%esi
call   1030 <WriteHSCXCMDR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hscx_empty_fifo>:
push   %rbx
mov    %rdi,%rbx
call   1040 <recv_empty_fifo_b@plt>
mov    %rbx,%rdi
mov    $0x80,%esi
pop    %rbx
jmp    1030 <WriteHSCXCMDR@plt>

LLVM IR (-O0):
%struct.BCState = type { i32 }
define void @hscx_empty_fifo(%struct.BCState* %0, i32 %1) {
%3 = alloca %struct.BCState*
%4 = alloca i32
store %struct.BCState* %0, %struct.BCState** %3
store i32 %1, i32* %4
%5 = load %struct.BCState*, %struct.BCState** %3
%6 = load i32, i32* %4
%7 = call i32 @recv_empty_fifo_b(%struct.BCState* %5, i32 %6)
%8 = load %struct.BCState*, %struct.BCState** %3
%9 = call i32 @WriteHSCXCMDR(%struct.BCState* %8, i32 128)
ret void
}

LLVM IR (-O2):
%struct.BCState = type { i32 }
define void @hscx_empty_fifo(%struct.BCState* %0, i32 %1) {
%3 = tail call i32 @recv_empty_fifo_b(%struct.BCState* %0, i32 %1)
%4 = tail call i32 @WriteHSCXCMDR(%struct.BCState* %0, i32 128)
ret void
}
/* Type definitions */
struct route {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __fprint_route_fmt(int /*<<< orphan*/ *, struct route const *, char const *,
                       int /*<<< orphan*/);
int fprint_route_fmt(FILE *output, const struct route *r, const char *fmt) {
  return __fprint_route_fmt(output, r, fmt, 0);
}


x86 assembly (clang, -O0):
<fprint_route_fmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <__fprint_route_fmt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_route_fmt>:
xor    %ecx,%ecx
jmp    1030 <__fprint_route_fmt@plt>

LLVM IR (-O0):
%struct.route = type { i32 }
define i32 @fprint_route_fmt(i32* %0, %struct.route* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca %struct.route*
%6 = alloca i8*
store i32* %0, i32** %4
store %struct.route* %1, %struct.route** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load %struct.route*, %struct.route** %5
%9 = load i8*, i8** %6
%10 = call i32 @__fprint_route_fmt(i32* %7, %struct.route* %8, i8* %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.route = type { i32 }
define i32 @fprint_route_fmt(i32* %0, %struct.route* %1, i8* %2) {
%4 = tail call i32 @__fprint_route_fmt(i32* %0, %struct.route* %1, i8* %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int isdigit(char);
int is_digit(char c) { return isdigit(c); }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
jmp    1030 <isdigit@plt>

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

LLVM IR (-O2):
define i32 @is_digit(i8 signext %0) {
%2 = tail call i32 @isdigit(i8 signext %0)
ret i32 %2
}
void foo039() {}


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

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

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

LLVM IR (-O2):
define void @foo039() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ClientScript_ExecText(char *);
int /*<<< orphan*/ ClientScript_GetCommand(char *);
scalar_t__ strlen(char *);
void ClientScript_Exec(void) {
  char cmd[512];
  ClientScript_GetCommand(cmd);
  if (strlen(cmd) > 0) {
    ClientScript_ExecText(cmd);
  }
}


x86 assembly (clang, -O0):
<ClientScript_Exec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
call   1050 <ClientScript_GetCommand@plt>
lea    -0x200(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jle    1169 <ClientScript_Exec+0x39>
lea    -0x200(%rbp),%rdi
call   1030 <ClientScript_ExecText@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClientScript_Exec>:
push   %rbx
sub    $0x200,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <ClientScript_GetCommand@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
jle    1158 <ClientScript_Exec+0x28>
mov    %rsp,%rdi
call   1030 <ClientScript_ExecText@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ClientScript_Exec() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @ClientScript_GetCommand(i8* %2)
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%5 = call i64 @strlen(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%9 = call i32 @ClientScript_ExecText(i8* %8)
br label %10
10: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
define void @ClientScript_Exec() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @ClientScript_GetCommand(i8* %2)
%4 = call i64 @strlen(i8* %2)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @ClientScript_ExecText(i8* %2)
br label %8
8: ; preds = %6, %0
ret void
}
int get_ptr_size(void *ptr) {
  int size = 0;
  char **q = (char **)&ptr;
  while ((int)((*q)[size]) != 0) {
    size++;
  }
  return size * sizeof(char);
}


x86 assembly (clang, -O0):
<get_ptr_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     113d <get_ptr_size+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <get_ptr_size+0x17>
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ptr_size>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <get_ptr_size+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_ptr_size(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
scalar_t__ isSerialInitDone();
int /*<<< orphan*/ serial_write_char(char);
int /*<<< orphan*/ vga_put(char);
int kputchar(int ic) {
  char c = (char)ic;
  vga_put(c);
  if (isSerialInitDone()) {
    serial_write_char(c);
  }
  return ic;
}


x86 assembly (clang, -O0):
<kputchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1050 <vga_put@plt>
mov    $0x0,%al
call   1030 <isSerialInitDone@plt>
cmp    $0x0,%rax
je     1164 <kputchar+0x34>
movsbl -0x5(%rbp),%edi
call   1040 <serial_write_char@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kputchar>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
movsbl %bl,%ebp
mov    %ebp,%edi
call   1050 <vga_put@plt>
xor    %eax,%eax
call   1030 <isSerialInitDone@plt>
test   %rax,%rax
je     1152 <kputchar+0x22>
mov    %ebp,%edi
call   1040 <serial_write_char@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @kputchar(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = call i32 @vga_put(i8 signext %6)
%8 = call i64 (...) @isSerialInitDone()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8, i8* %3
%12 = call i32 @serial_write_char(i8 signext %11)
br label %13
13: ; preds = %10, %1
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @kputchar(i32 returned %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @vga_put(i8 signext %2)
%4 = tail call i64 (...) @isSerialInitDone()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @serial_write_char(i8 signext %2)
br label %8
8: ; preds = %6, %1
ret i32 %0
}
void g_hash_table_find() {}


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

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

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

LLVM IR (-O2):
define void @g_hash_table_find() {
ret void
}
signed long long f4(signed long long v_foo) {
  signed long long v_shr = ((unsigned long long)v_foo) >> 22;
  signed long long v_and = v_shr & 12;
  return v_and;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x16,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xc,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %rdi,%rax
shr    $0x16,%rax
and    $0xc,%eax
ret

LLVM IR (-O0):
define i64 @f4(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 22
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = and i64 %7, 12
store i64 %8, i64* %4
%9 = load i64, i64* %4
ret i64 %9
}

LLVM IR (-O2):
define i64 @f4(i64 %0) {
%2 = lshr i64 %0, 22
%3 = and i64 %2, 12
ret i64 %3
}
/* Variables and functions */
void BotSaveGoalFuzzyLogic(int goalstate, char *filename) {}


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

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

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

LLVM IR (-O2):
define void @BotSaveGoalFuzzyLogic(i32 %0, i8* nocapture %1) {
ret void
}
int max_of_two(int j, int k) {
  if (j < k)
    j = k;
  return j;
}


x86 assembly (clang, -O0):
<max_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    111c <max_of_two+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @max_of_two(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void gtk_menu_shell_activate_item() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_shell_activate_item() {
ret void
}
int fun599() { return 599; }


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

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

LLVM IR (-O0):
define i32 @fun599() {
ret i32 599
}

LLVM IR (-O2):
define i32 @fun599() {
ret i32 599
}
int main() {
  int x;
  x = 1;
  x = x * 10;
  x = x / 2;
  x = x % 3;
  return x - 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 10
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 2
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = srem i32 %7, 3
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef size_t uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t, int const);
void dbg_coeff(const uint8_t *coefficients, uint32_t count) {
  for (uint32_t i = 0; i < count; ++i) {
    printf("%d: %d\n", i, coefficients[i]);
  }
}


x86 assembly (clang, -O0):
<dbg_coeff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1162 <dbg_coeff+0x52>
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <dbg_coeff+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_coeff>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1148 <dbg_coeff+0x38>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r12
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%edx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <dbg_coeff+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d: %d\0A\00"
define void @dbg_coeff(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %17, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i64, i64* %5
%12 = load i32*, i32** %3
%13 = load i64, i64* %5
%14 = getelementptr inbounds i32, i32* %12, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %11, i32 %15)
br label %17
17: ; preds = %10
%18 = load i64, i64* %5
%19 = add i64 %18, 1
store i64 %19, i64* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d: %d\0A\00"
define void @dbg_coeff(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %6, i32 %8)
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %4, label %5
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned long f6(unsigned long x,
                                              unsigned long y) {
  unsigned long r = x - y;
  if (r < y)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1141 <f6+0x31>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rbx
mov    %rdi,%rbx
sub    %rsi,%rbx
cmp    %rsi,%rbx
jae    1123 <f6+0x13>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @f6(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = icmp ult i64 %3, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int hello_num(int times) {
  int i = 0;
  for (i = 0; i < times; i++) {
    printf("hello.(%d)\n", i);
  }
  return i;
}


x86 assembly (clang, -O0):
<hello_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1152 <hello_num+0x42>
mov    -0x8(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <hello_num+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello_num>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1143 <hello_num+0x33>
mov    %edi,%ebx
xor    %ebp,%ebp
lea    0xedd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1130 <hello_num+0x20>
jmp    1145 <hello_num+0x35>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"hello.(%d)\0A\00"
define i32 @hello_num(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %0, %3 ]
ret i32 %9
}
double pathcon_nm10_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<pathcon_nm10_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <pathcon_nm10_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <pathcon_nm10_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <pathcon_nm10_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <pathcon_nm10_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm10_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm10_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @pathcon_nm10_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
void swapFunc(int *a, int *b) {
  int temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

x86 assembly (clang, -O2):
<swapFunc>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swapFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swapFunc(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void gtk_window_set_icon_list() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_icon_list() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int loopback_setup();
int /*<<< orphan*/ stderr;
char *strerror(int);
int main(int argc, char *argv[]) {
  int r;
  if ((r = loopback_setup()) < 0)
    fprintf(stderr, "loopback: %s\n", strerror(-r));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <loopback_setup@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1181 <main+0x51>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
xor    %edi,%edi
sub    -0x14(%rbp),%edi
call   1050 <strerror@plt>
mov    -0x18(%rbp),%edi
mov    %rax,%rdx
lea    0xe84(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <loopback_setup@plt>
test   %eax,%eax
jns    115f <main+0x2f>
mov    0x2e9d(%rip),%rcx
mov    (%rcx),%ebx
neg    %eax
mov    %eax,%edi
call   1050 <strerror@plt>
lea    0xeab(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"loopback: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @loopback_setup()
store i32 %7, i32* %6
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i32, i32* %6
%12 = sub nsw i32 0, %11
%13 = call i8* @strerror(i32 %12)
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %9, %2
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"loopback: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @loopback_setup()
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = sub nsw i32 0, %3
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ADC2_DriverIRQHandler();
__attribute__((weak)) void ADC2_IRQHandler(void) { ADC2_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @ADC2_IRQHandler() {
%1 = call i32 (...) @ADC2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ADC2_IRQHandler() {
%1 = tail call i32 (...) @ADC2_DriverIRQHandler()
ret void
}
void hieth_funsel_restore(void) {}


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

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

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

LLVM IR (-O2):
define void @hieth_funsel_restore() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_DivideVec4f_init(void) {
  _hmt_register_covercase("HMM_DivideVec4f", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_DivideVec4f_init>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"HMM_DivideVec4f\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_DivideVec4f_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"HMM_DivideVec4f\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_DivideVec4f_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int addPage();
unsigned int addPage_HelpScreen(void) { return addPage(); }


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

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

LLVM IR (-O0):
define i32 @addPage_HelpScreen() {
%1 = call i32 (...) @addPage()
ret i32 %1
}

LLVM IR (-O2):
define i32 @addPage_HelpScreen() {
%1 = tail call i32 (...) @addPage()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ update_process_idmap(char *, int, char *, int);
void update_process_uidmap(int pid, char *map, int map_len) {
  if ((map == NULL) || (map_len <= 0)) {
    return;
  }
  update_process_idmap("/proc/%d/uid_map", pid, map, map_len);
}


x86 assembly (clang, -O0):
<update_process_uidmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1137 <update_process_uidmap+0x27>
cmpl   $0x0,-0x14(%rbp)
jg     113c <update_process_uidmap+0x2c>
jmp    1152 <update_process_uidmap+0x42>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xeb3(%rip),%rdi
call   1030 <update_process_idmap@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_process_uidmap>:
mov    %edx,%ecx
mov    %rsi,%rdx
test   %rsi,%rsi
je     112c <update_process_uidmap+0x1c>
test   %ecx,%ecx
jle    112c <update_process_uidmap+0x1c>
mov    %edi,%esi
lea    0xed9(%rip),%rdi
jmp    1030 <update_process_idmap@plt>
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/proc/%d/uid_map\00"
define void @update_process_uidmap(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = icmp eq i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9, %3
br label %18
13: ; preds = %9
%14 = load i32, i32* %4
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = call i32 @update_process_idmap(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %15, i32 %16)
br label %18
18: ; preds = %13, %12
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"/proc/%d/uid_map\00"
define void @update_process_uidmap(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %1, null
%5 = icmp slt i32 %2, 1
%6 = or i1 %4, %5
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @update_process_idmap(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i32 %2)
br label %9
9: ; preds = %3, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ putchar(char);
void printn(char *str) {
  print(str);
  putchar('\n');
}


x86 assembly (clang, -O0):
<printn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printn>:
push   %rax
call   1040 <print@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @printn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print(i8* %3)
%5 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @printn(i8* %0) {
%2 = tail call i32 @print(i8* %0)
%3 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *rs_malloc(size_t);
void *rs_memdup(const void *ptr, size_t size) {
  void *ret;
  if (!ptr)
    return NULL;
  ret = rs_malloc(size);
  return memcpy(ret, ptr, size);
}


x86 assembly (clang, -O0):
<rs_memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <rs_memdup+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1172 <rs_memdup+0x52>
mov    -0x18(%rbp),%rdi
call   1040 <rs_malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    %rdi,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rs_memdup>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     114b <rs_memdup+0x2b>
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <rs_malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
jmp    114e <rs_memdup+0x2e>
xor    %r15d,%r15d
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @rs_memdup(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @rs_malloc(i64 %1)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %1, i1 false)
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *strlcpy(char *dest, const char *src, size_t size) {
  strncpy(dest, src, size - 1);
  *(dest + size - 1) = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<strlcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,-0x1(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdx
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strlcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = sub i64 %9, 1
%11 = call i32 @strncpy(i8* %7, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = getelementptr inbounds i8, i8* %14, i64 -1
store i8 0, i8* %15
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @strlcpy(i8* returned %0, i8* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %2
%7 = getelementptr inbounds i8, i8* %6, i64 -1
store i8 0, i8* %7
ret i8* %0
}
/* Variables and functions */
char *XWBMalloc(unsigned int, char const *, unsigned int const);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *XWBStrDup(const char *iOrig, const char *iFile,
                const unsigned int iLine) {
  char *result;
  result = XWBMalloc(((unsigned int)strlen(iOrig)) + 1u, iFile, iLine);
  strcpy(result, iOrig);
  return result;
}


x86 assembly (clang, -O0):
<XWBStrDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <XWBMalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XWBStrDup>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <XWBMalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @XWBStrDup(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = trunc i64 %9 to i32
%11 = add i32 %10, 1
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i8* @XWBMalloc(i32 %11, i8* %12, i32 %13)
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %7
ret i8* %18
}

LLVM IR (-O2):
define i8* @XWBStrDup(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = trunc i64 %4 to i32
%6 = add i32 %5, 1
%7 = tail call i8* @XWBMalloc(i32 %6, i8* %1, i32 %2)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
ret i8* %7
}
XCloseDisplay() {}


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

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

LLVM IR (-O0):
define i32 @XCloseDisplay() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XCloseDisplay() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ b();
void c() {
  a();
  b();
}


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

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

LLVM IR (-O0):
define void @c() {
%1 = call i32 (...) @a()
%2 = call i32 (...) @b()
ret void
}

LLVM IR (-O2):
define void @c() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @b()
ret void
}
void stop_error() {}


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

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

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

LLVM IR (-O2):
define void @stop_error() {
ret void
}
int res_9_dst_hmac_md5_init() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @res_9_dst_hmac_md5_init() {
ret i32 0
}
/* Variables and functions */
scalar_t__ WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int system_ok(int stat) {
  return stat != -1 && WIFEXITED(stat) && WEXITSTATUS(stat) == 0;
}


x86 assembly (clang, -O0):
<system_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1166 <system_ok+0x46>
mov    -0x4(%rbp),%edi
call   1040 <WIFEXITED@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1166 <system_ok+0x46>
mov    -0x4(%rbp),%edi
call   1030 <WEXITSTATUS@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_ok>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
cmp    $0xffffffff,%edi
je     1145 <system_ok+0x25>
mov    %edi,%ebp
call   1040 <WIFEXITED@plt>
test   %rax,%rax
je     1145 <system_ok+0x25>
mov    %ebp,%edi
call   1030 <WEXITSTATUS@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @system_ok(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, -1
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @WIFEXITED(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i32, i32* %2
%11 = call i64 @WEXITSTATUS(i32 %10)
%12 = icmp eq i64 %11, 0
br label %13
13: ; preds = %9, %5, %1
%14 = phi i1 [ false, %5 ], [ false, %1 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @system_ok(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @WIFEXITED(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @WEXITSTATUS(i32 %0)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %3 ], [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
unsigned int Mod(unsigned int dividend, unsigned divider) {
  int i = 0;
  while (dividend > divider) {
    dividend -= divider;
  }
  return dividend;
}


x86 assembly (clang, -O0):
<Mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    112d <Mod+0x2d>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <Mod+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mod>:
mov    %edi,%eax
add    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    %esi,%eax
cmp    %esi,%eax
ja     1110 <Mod+0x10>
ret

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

LLVM IR (-O2):
define i32 @Mod(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = icmp ugt i32 %4, %1
%6 = sub i32 %4, %1
br i1 %5, label %3, label %7
7: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ build_rsp();
void endpoint_setup(void) { build_rsp(); }


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

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

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

LLVM IR (-O2):
define void @endpoint_setup() {
%1 = tail call i32 (...) @build_rsp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ec_closenic();
void ec_close(void) { ec_closenic(); }


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

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

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

LLVM IR (-O2):
define void @ec_close() {
%1 = tail call i32 (...) @ec_closenic()
ret void
}