xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  fputs("Usage:\n"
        "\t-b to get output in binary numbers.\n"
        "\t-t to convert from binary to text.\n",
        stderr);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [81 x i8] c"Usage:\0A\09-b to get output in binary numbers.\0A\09-t to convert from binary to text.\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [81 x i8] c"Usage:\0A\09-b to get output in binary numbers.\0A\09-t to convert from binary to text.\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ssd_dialog_hide(char *, int);
void hide_our_dialogs(int exit_code) {
  ssd_dialog_hide(("address.search.tabcontrol"), exit_code);
  ssd_dialog_hide("Main Menu", exit_code);
  ssd_dialog_hide("Search", exit_code);
}


x86 assembly (clang, -O0):
<hide_our_dialogs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <ssd_dialog_hide@plt>
mov    -0x4(%rbp),%esi
lea    0xee6(%rip),%rdi
call   1030 <ssd_dialog_hide@plt>
mov    -0x4(%rbp),%esi
lea    0xee1(%rip),%rdi
call   1030 <ssd_dialog_hide@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hide_our_dialogs>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <ssd_dialog_hide@plt>
lea    0xef2(%rip),%rdi
mov    %ebx,%esi
call   1030 <ssd_dialog_hide@plt>
lea    0xeee(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <ssd_dialog_hide@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"address.search.tabcontrol\00"
@.str.1 = [10 x i8] c"Main Menu\00"
@.str.2 = [7 x i8] c"Search\00"
define void @hide_our_dialogs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ssd_dialog_hide(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @ssd_dialog_hide(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @ssd_dialog_hide(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"address.search.tabcontrol\00"
@.str.1 = [10 x i8] c"Main Menu\00"
@.str.2 = [7 x i8] c"Search\00"
define void @hide_our_dialogs(i32 %0) {
%2 = tail call i32 @ssd_dialog_hide(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @ssd_dialog_hide(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 @ssd_dialog_hide(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %0)
ret void
}
_Noreturn void myexit(int i) { exit(i + 1); }


x86 assembly (clang, -O0):
<myexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<myexit>:
push   %rax
add    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @myexit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
unreachable
}

LLVM IR (-O2):
define void @myexit(i32 %0) {
%2 = add nsw i32 %0, 1
tail call void @exit(i32 %2)
unreachable
}
void syscall_rollback(struct task_struct *task, struct pt_regs *regs) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
%struct.pt_regs = type opaque
define void @syscall_rollback(%struct.task_struct* %0, %struct.pt_regs* %1) {
%3 = alloca %struct.task_struct*
%4 = alloca %struct.pt_regs*
store %struct.task_struct* %0, %struct.task_struct** %3
store %struct.pt_regs* %1, %struct.pt_regs** %4
ret void
}

LLVM IR (-O2):
%struct.task_struct = type opaque
%struct.pt_regs = type opaque
define void @syscall_rollback(%struct.task_struct* nocapture %0, %struct.pt_regs* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void set_buffer_to_number(char *buffer, int *number_ptr) {
  sprintf(buffer, "%d", *number_ptr);
}


x86 assembly (clang, -O0):
<set_buffer_to_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_buffer_to_number>:
mov    (%rsi),%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @set_buffer_to_number(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @set_buffer_to_number(i8* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void termop_charset(struct ansiseq *s) {
  tnc_log_log(
      6, 4, -1,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/vt100.c",
      202, __func__, "unhandled");
  ansiseq_dump(s);
}


x86 assembly (clang, -O0):
<termop_charset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x6,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
lea    0xebe(%rip),%rcx
mov    $0xca,%r8d
lea    0xf37(%rip),%r9
lea    0xf3f(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <tnc_log_log@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <ansiseq_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<termop_charset>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xf66(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rcx
lea    0xf45(%rip),%r9
mov    $0x6,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
mov    $0xca,%r8d
xor    %eax,%eax
call   1030 <tnc_log_log@plt>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <ansiseq_dump@plt>

LLVM IR (-O0):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/vt100.c\00"
@__func__.termop_charset = [15 x i8] c"termop_charset\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_charset(%struct.ansiseq* %0) {
%2 = alloca %struct.ansiseq*
store %struct.ansiseq* %0, %struct.ansiseq** %2
%3 = call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 6, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 202, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.termop_charset, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = load %struct.ansiseq*, %struct.ansiseq** %2
%5 = call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %4)
ret void
}

LLVM IR (-O2):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/vt100.c\00"
@__func__.termop_charset = [15 x i8] c"termop_charset\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_charset(%struct.ansiseq* %0) {
%2 = tail call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 6, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 202, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.termop_charset, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int a = 1, b = 0, c;
  c = a | a;
  print("c 1");
  printid(c);
  c = a | b;
  print("c 1");
  printid(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <print@plt>
mov    -0x10(%rbp),%edi
call   1040 <printid@plt>
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xe96(%rip),%rdi
call   1030 <print@plt>
mov    -0x10(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print@plt>
mov    $0x1,%edi
call   1040 <printid@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    $0x1,%edi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"c 1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = or i32 %5, %6
store i32 %7, i32* %4
%8 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = call i32 @printid(i32 %9)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = or i32 %11, %12
store i32 %13, i32* %4
%14 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* %4
%16 = call i32 @printid(i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"c 1\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 1)
%3 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printid(i32 1)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int major;
  int minor;
  int micro;
};
typedef TYPE_1__ XML_Expat_Version;

/* Variables and functions */
TYPE_1__ XML_ExpatVersionInfo();
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  XML_Expat_Version v;
  v = XML_ExpatVersionInfo();
  printf("Using libexpat v%d.%d.%d\n", v.major, v.minor, v.micro);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1030 <XML_ExpatVersionInfo@plt>
mov    %edx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <XML_ExpatVersionInfo@plt>
mov    %edx,%ecx
mov    %rax,%rdx
shr    $0x20,%rdx
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32 }
@.str = [26 x i8] c"Using libexpat v%d.%d.%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.TYPE_3__
%3 = alloca %struct.TYPE_3__
%4 = alloca { i64, i32 }
store i32 0, i32* %1
%5 = call { i64, i32 } (...) @XML_ExpatVersionInfo()
store { i64, i32 } %5, { i64, i32 }* %4
%6 = bitcast %struct.TYPE_3__* %3 to i8*
%7 = bitcast { i64, i32 }* %4 to i8*
%8 = bitcast %struct.TYPE_3__* %2 to i8*
%9 = bitcast %struct.TYPE_3__* %3 to i8*
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 0
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 2
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13, i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Using libexpat v%d.%d.%d\0A\00"
define i32 @main() {
%1 = tail call { i64, i32 } (...) @XML_ExpatVersionInfo()
%2 = extractvalue { i64, i32 } %1, 0
%3 = extractvalue { i64, i32 } %1, 1
%4 = trunc i64 %2 to i32
%5 = lshr i64 %2, 32
%6 = trunc i64 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %3)
ret i32 0
}
/* Variables and functions */
int japi_getlayoutid(int);
int j_getlayoutid(int arg0) { return (japi_getlayoutid(arg0)); }


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

x86 assembly (clang, -O2):
<j_getlayoutid>:
jmp    1030 <japi_getlayoutid@plt>

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

LLVM IR (-O2):
define i32 @j_getlayoutid(i32 %0) {
%2 = tail call i32 @japi_getlayoutid(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_complete_get_status(const uint8_t *event) {
  return event[3];
}


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

x86 assembly (clang, -O2):
<hfp_subevent_complete_get_status>:
mov    0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hfp_subevent_complete_get_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hfp_subevent_complete_get_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int /*<<< orphan*/, char *, char *, char *, int);
void gmx_rx_wait(int nodeid) {
  fatal_error(0, "Routine %s called in %s, %d", "gmx_rx_wait",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/"
              "tests/test_07/network.c",
              135);
}


x86 assembly (clang, -O0):
<gmx_rx_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xedc(%rip),%rsi
lea    0xef1(%rip),%rdx
lea    0xef6(%rip),%rcx
mov    $0x87,%r8d
call   1030 <fatal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_rx_wait>:
lea    0xee9(%rip),%rsi
lea    0xefe(%rip),%rdx
lea    0xf03(%rip),%rcx
xor    %edi,%edi
mov    $0x87,%r8d
jmp    1030 <fatal_error@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [12 x i8] c"gmx_rx_wait\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_rx_wait(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 135)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [12 x i8] c"gmx_rx_wait\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_rx_wait(i32 %0) {
%2 = tail call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 135)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
#pragma xmp task on p0[0][0] nocomm
  { printf("Skipped\n"); }
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Skipped\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
__attribute__((always_)) void *ifunc_one(int (*f1)(void)) { return f1; }


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

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

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

LLVM IR (-O2):
define i8* @ifunc_one(i32 ()* readnone %0) {
%2 = bitcast i32 ()* %0 to i8*
ret i8* %2
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_move_current_quaddobl_to_next(int *cursor) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(456, cursor, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_move_current_quaddobl_to_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1c8,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_move_current_quaddobl_to_next>:
mov    %rdi,%rsi
mov    $0x1c8,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_move_current_quaddobl_to_next(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 456, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
void CFGMR3InsertNodeF(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3InsertNodeF() {
ret void
}
f(x) unsigned x;
{ return (unsigned)(((unsigned long long)x * 0xAAAAAAAB) >> 32) >> 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movabs $0xaaaaaaab,%rcx
imul   %rcx,%rax
shr    $0x20,%rax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%ecx
mov    $0xaaaaaaab,%eax
imul   %rcx,%rax
shr    $0x21,%rax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = mul i64 %4, 2863311531
%6 = lshr i64 %5, 32
%7 = trunc i64 %6 to i32
%8 = lshr i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = zext i32 %0 to i64
%3 = mul nuw i64 %2, 2863311531
%4 = lshr i64 %3, 33
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int write(int, unsigned char *, int);
int write_byte(int fd, int c) {
  unsigned char byte;
  byte = (unsigned char)c;
  return write(fd, &byte, 1);
}


x86 assembly (clang, -O0):
<write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_byte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @write_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = trunc i32 %6 to i8
store i8 %7, i8* %5
%8 = load i32, i32* %3
%9 = call i32 @write(i32 %8, i8* %5, i32 1)
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_byte(i32 %0, i32 %1) {
%3 = alloca i8
%4 = trunc i32 %1 to i8
store i8 %4, i8* %3
%5 = call i32 @write(i32 %0, i8* %3, i32 1)
ret i32 %5
}
void gtk_paint_resize_grip() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_resize_grip() {
ret void
}
void foo507() {}


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

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

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

LLVM IR (-O2):
define void @foo507() {
ret void
}
int x21_process_synack(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x21_process_synack(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
int atc_tasks_create() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @atc_tasks_create() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(char const);
void putc(const char c) { serial_putc(c); }


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

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <serial_putc@plt>

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

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

/* Variables and functions */
int UINT64_C(int);
int is_vmstate_obj(uint64_t oid) { return !!(oid & (UINT64_C(1) << 62)); }


x86 assembly (clang, -O0):
<is_vmstate_obj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%eax
mov    $0x3e,%ecx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vmstate_obj>:
mov    $0x1,%edi
jmp    1030 <UINT64_C@plt>

LLVM IR (-O0):
define i32 @is_vmstate_obj(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @UINT64_C(i32 1)
%5 = shl i32 %4, 62
%6 = and i32 %3, %5
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_vmstate_obj(i32 %0) {
%2 = tail call i32 @UINT64_C(i32 1)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ glBegin(unsigned int);
void Begin(unsigned int type) { glBegin(type); }


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

x86 assembly (clang, -O2):
<Begin>:
jmp    1030 <glBegin@plt>

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

LLVM IR (-O2):
define void @Begin(i32 %0) {
%2 = tail call i32 @glBegin(i32 %0)
ret void
}
/* Variables and functions */
size_t roundup(size_t num, size_t modulus) {
  size_t ret = num % modulus;
  if (ret)
    num += modulus - ret;
  return num;
}


x86 assembly (clang, -O0):
<roundup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1137 <roundup+0x37>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup>:
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1116 <roundup+0x16>
mov    %rdi,%rax
xor    %edx,%edx
div    %rsi
jmp    111c <roundup+0x1c>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
sub    %rdx,%rsi
test   %rdx,%rdx
cmove  %rdx,%rsi
add    %rdi,%rsi
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @roundup(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 = urem i64 %6, %7
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i64, i64* %4
%13 = load i64, i64* %5
%14 = sub i64 %12, %13
%15 = load i64, i64* %3
%16 = add i64 %15, %14
store i64 %16, i64* %3
br label %17
17: ; preds = %11, %2
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @roundup(i64 %0, i64 %1) {
%3 = urem i64 %0, %1
%4 = icmp eq i64 %3, 0
%5 = sub i64 %1, %3
%6 = select i1 %4, i64 0, i64 %5
%7 = add i64 %6, %0
ret i64 %7
}
unsigned long bit_rotate_left(unsigned long value, unsigned long shift) {
  return (value << shift) | (value >> (sizeof(value) * 8 - shift));
}


x86 assembly (clang, -O0):
<bit_rotate_left>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
mov    -0x8(%rbp),%rdx
mov    $0x40,%ecx
sub    -0x10(%rbp),%rcx
shr    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_rotate_left>:
mov    %rsi,%rcx
mov    %rdi,%rax
rol    %cl,%rax
ret

LLVM IR (-O0):
define i64 @bit_rotate_left(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = shl i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = sub i64 64, %9
%11 = lshr i64 %8, %10
%12 = or i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @bit_rotate_left(i64 %0, i64 %1) {
%3 = shl i64 %0, %1
%4 = sub i64 64, %1
%5 = lshr i64 %0, %4
%6 = or i64 %5, %3
ret i64 %6
}
int dns_poll(int fd, short events, int timeout) { return 0; }


x86 assembly (clang, -O0):
<dns_poll>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @dns_poll(i32 %0, i16 signext %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ z_streamp;

/* Variables and functions */
int deflateInit2(int /*<<< orphan*/, int, int, int, int, int);
__attribute__((__visibility__("default"))) int
kz_deflateInit2(z_streamp strm, int level, int method, int windowBits,
                int memLevel, int strategy) {
  return deflateInit2(strm, level, method, windowBits, memLevel, strategy);
}


x86 assembly (clang, -O0):
<kz_deflateInit2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <deflateInit2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kz_deflateInit2>:
jmp    1030 <deflateInit2@plt>

LLVM IR (-O0):
define i32 @kz_deflateInit2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @deflateInit2(i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @kz_deflateInit2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @deflateInit2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret i32 %7
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ srand48(int);
void seedrand() {
  struct timeval t;
  gettimeofday(&t, NULL);
  srand(t.tv_usec * t.tv_sec);
  srand48(t.tv_usec * t.tv_sec);
}


x86 assembly (clang, -O0):
<seedrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%edi
imul   -0x4(%rbp),%edi
call   1040 <srand@plt>
mov    -0x8(%rbp),%edi
imul   -0x4(%rbp),%edi
call   1050 <srand48@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seedrand>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0xc(%rsp),%ebx
imul   0x8(%rsp),%ebx
mov    %ebx,%edi
call   1040 <srand@plt>
mov    %ebx,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1050 <srand48@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @seedrand() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = mul nsw i32 %4, %6
%8 = call i32 @srand(i32 %7)
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%12 = load i32, i32* %11
%13 = mul nsw i32 %10, %12
%14 = call i32 @srand48(i32 %13)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @seedrand() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, %5
%9 = tail call i32 @srand(i32 %8)
%10 = tail call i32 @srand48(i32 %8)
ret void
}
/* Variables and functions */
int db_put_raw(void *, char const *, scalar_t__, void const *, int,
               int /*<<< orphan*/);
scalar_t__ strlen(char const *);
int db_put(void *dbh, const char *keystr, const void *val, int len) {
  return db_put_raw(dbh, keystr, strlen(keystr) + 1, val, len, 0);
}


x86 assembly (clang, -O0):
<db_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
xor    %r9d,%r9d
call   1030 <db_put_raw@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_put>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rcx
mov    %r14d,%r8d
xor    %r9d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <db_put_raw@plt>

LLVM IR (-O0):
define i32 @db_put(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %6
%12 = call i64 @strlen(i8* %11)
%13 = add nsw i64 %12, 1
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @db_put_raw(i8* %9, i8* %10, i64 %13, i8* %14, i32 %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
define i32 @db_put(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = add nsw i64 %5, 1
%7 = tail call i32 @db_put_raw(i8* %0, i8* %1, i64 %6, i8* %2, i32 %3, i32 0)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int print_uint64(int /*<<< orphan*/, char *);
int print_int64(int64_t n, char *p) {
  int sign;
  if ((sign = n < 0)) {
    *p++ = '-';
    n = -n;
  }
  return print_uint64((uint64_t)n, p) + sign;
}


x86 assembly (clang, -O0):
<print_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1140 <print_int64+0x30>
jmp    115c <print_int64+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <print_uint64@plt>
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int64>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
js     111e <print_int64+0xe>
mov    %rbx,%rdi
jmp    112b <print_int64+0x1b>
movb   $0x2d,(%rsi)
add    $0x1,%rsi
mov    %rbx,%rdi
neg    %rdi
shr    $0x3f,%rbx
call   1030 <print_uint64@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @print_int64(i64 %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
%6 = sub nsw i64 0, %0
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %5, %4 ], [ %1, %2 ]
%9 = phi i64 [ %6, %4 ], [ %0, %2 ]
%10 = lshr i64 %0, 63
%11 = trunc i64 %10 to i32
%12 = trunc i64 %9 to i32
%13 = tail call i32 @print_uint64(i32 %12, i8* %8)
%14 = add nsw i32 %13, %11
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_hex(uint8_t *data, uint32_t len) {
  for (uint32_t i = 0; i < len; i++) {
    printf("%02hhx", *(data + i));
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_hex>:
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
jge    1160 <print_hex+0x50>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print_hex+0x18>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%02hhx\00"
define void @print_hex(i32* nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %2
%5 = tail call i32 @putchar(i32 10)
ret void
6: ; preds = %2, %6
%7 = phi i64 [ %11, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %4, label %6
}
/* Variables and functions */
char *righttrim(char *, char);
char *rtrimsp(char *str) { return righttrim(str, ' '); }


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

x86 assembly (clang, -O2):
<rtrimsp>:
mov    $0x20,%esi
jmp    1030 <righttrim@plt>

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

LLVM IR (-O2):
define i8* @rtrimsp(i8* %0) {
%2 = tail call i8* @righttrim(i8* %0, i8 signext 32)
ret i8* %2
}
int main() {
  int x = 6;
  {
    int x = 7;
    return x;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 7
}
/* Variables and functions */
int g_time3();
int xcommon_get_local_time(void) { return g_time3(); }


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

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

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

LLVM IR (-O2):
define i32 @xcommon_get_local_time() {
%1 = tail call i32 (...) @g_time3()
ret i32 %1
}
extern unsigned int __inlc_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "l"
                       " %"
                       ""
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "id"(port));
  __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:");
  return _v;
}


x86 assembly (clang, -O0):
<__inlc_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
jmp    1118 <__inlc_p+0x18>
jmp    111d <__inlc_p+0x1d>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inlc_p>:
mov    %edi,%edx
in     (%dx),%eax
jmp    1105 <__inlc_p+0x5>
jmp    1107 <__inlc_p+0x7>
ret

LLVM IR (-O0):
define i32 @__inlc_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @__inlc_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
tail call void asm sideeffect "jmp 1f\0A1:\09jmp 1f\0A1:", "~{dirflag},~{fpsr},~{flags}"()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SwapIntegerElements(int *, int, int);
void ReverseIntegerArray(int array[], int n) {
  int i;
  for (i = 0; i < n / 2; i++) {
    SwapIntegerElements(array, i, n - i - 1);
  }
}


x86 assembly (clang, -O0):
<ReverseIntegerArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    1167 <ReverseIntegerArray+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
sub    -0x10(%rbp),%edx
sub    $0x1,%edx
call   1030 <SwapIntegerElements@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ReverseIntegerArray+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseIntegerArray>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     1157 <ReverseIntegerArray+0x47>
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%r15d
shr    $0x1f,%r15d
add    %esi,%r15d
sar    %r15d
add    $0xffffffff,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <SwapIntegerElements@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    %ebp,%r15d
jne    1140 <ReverseIntegerArray+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ReverseIntegerArray(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 = %19, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = sdiv i32 %8, 2
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %22
11: ; preds = %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = sub nsw i32 %14, %15
%17 = sub nsw i32 %16, 1
%18 = call i32 @SwapIntegerElements(i32* %12, i32 %13, i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @ReverseIntegerArray(i32* %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i32 [ %10, %5 ], [ 0, %2 ]
%7 = xor i32 %6, -1
%8 = add i32 %7, %1
%9 = tail call i32 @SwapIntegerElements(i32* %0, i32 %6, i32 %8)
%10 = add nuw nsw i32 %6, 1
%11 = icmp eq i32 %10, %3
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qprintf(char *, char *, int);
void *q_create_named_semaphore(char *name, int val) {
  qprintf("*** create_named_semaphore('%s', %d)\n", name, val);
  return 0;
}


x86 assembly (clang, -O0):
<q_create_named_semaphore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <qprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_create_named_semaphore>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
call   1030 <qprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"*** create_named_semaphore('%s', %d)\0A\00"
define i8* @q_create_named_semaphore(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @qprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret i8* null
}

LLVM IR (-O2):
@.str = [38 x i8] c"*** create_named_semaphore('%s', %d)\0A\00"
define noalias i8* @q_create_named_semaphore(i8* %0, i32 %1) {
%3 = tail call i32 @qprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i8* null
}
void write_cr0(unsigned long val) {
  asm volatile("mov %0, %%cr0" : : "r"(val) : "memory");
}


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

x86 assembly (clang, -O2):
<write_cr0>:
mov    %rdi,%cr0
ret

LLVM IR (-O0):
define void @write_cr0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @write_cr0(i64 %0) {
tail call void asm sideeffect "mov $0, %cr0", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
int xmms_sockets_initialize() { return 1; }


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

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

LLVM IR (-O0):
define i32 @xmms_sockets_initialize() {
ret i32 1
}

LLVM IR (-O2):
define i32 @xmms_sockets_initialize() {
ret i32 1
}