xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void update() {
  printf("<><><><><><><><><><><><><>\n");
  system("sudo apt-get -qq update");
  system("sudo apt-get -qq upgrade");
  system("mkdir ~/Programs/");
}


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

x86 assembly (clang, -O2):
<update>:
push   %rax
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <system@plt>
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
lea    0xee5(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"<><><><><><><><><><><><><>\0A\00"
@.str.1 = [24 x i8] c"sudo apt-get -qq update\00"
@.str.2 = [25 x i8] c"sudo apt-get -qq upgrade\00"
@.str.3 = [18 x i8] c"mkdir ~/Programs/\00"
define void @update() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"sudo apt-get -qq update\00"
@.str.2 = [25 x i8] c"sudo apt-get -qq upgrade\00"
@.str.3 = [18 x i8] c"mkdir ~/Programs/\00"
@str = [27 x i8] c"<><><><><><><><><><><><><>\00"
define void @update() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
char const *bprintf(char *, int);
int pscanf(char *, char *, int *);
const char *entropy(void) {
  int num;
  return (pscanf("/proc/sys/kernel/random/entropy_avail", "%d", &num) == 1)
             ? bprintf("%d", num)
             : NULL;
}


x86 assembly (clang, -O0):
<entropy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xef0(%rip),%rsi
lea    -0x4(%rbp),%rdx
call   1040 <pscanf@plt>
cmp    $0x1,%eax
jne    1160 <entropy+0x40>
mov    -0x4(%rbp),%esi
lea    0xed4(%rip),%rdi
call   1030 <bprintf@plt>
mov    %rax,-0x10(%rbp)
jmp    116b <entropy+0x4b>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    116b <entropy+0x4b>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<entropy>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef7(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <pscanf@plt>
cmp    $0x1,%eax
jne    1150 <entropy+0x30>
mov    0x4(%rsp),%esi
lea    0xedd(%rip),%rdi
call   1030 <bprintf@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"/proc/sys/kernel/random/entropy_avail\00"
@.str.1 = [3 x i8] c"%d\00"
define i8* @entropy() {
%1 = alloca i32
%2 = call i32 @pscanf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* %1
%6 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %4
%9 = phi i8* [ %6, %4 ], [ null, %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [38 x i8] c"/proc/sys/kernel/random/entropy_avail\00"
@.str.1 = [3 x i8] c"%d\00"
define i8* @entropy() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @pscanf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i8* [ %7, %5 ], [ null, %0 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ CTIMER4_DriverIRQHandler();
__attribute__((weak)) void CTIMER4_IRQHandler(void) {
  CTIMER4_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @CTIMER4_IRQHandler() {
%1 = tail call i32 (...) @CTIMER4_DriverIRQHandler()
ret void
}
void lgtd_lifx_gateway_handle_tag_labels(
    struct lgtd_lifx_gateway *gw, const struct lgtd_lifx_packet_header *hdr,
    const struct lgtd_lifx_packet_tag_labels *pkt) {
  (void)gw;
  (void)hdr;
  (void)pkt;
}


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

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

LLVM IR (-O0):
%struct.lgtd_lifx_gateway = type opaque
%struct.lgtd_lifx_packet_header = type opaque
%struct.lgtd_lifx_packet_tag_labels = type opaque
define void @lgtd_lifx_gateway_handle_tag_labels(%struct.lgtd_lifx_gateway* %0, %struct.lgtd_lifx_packet_header* %1, %struct.lgtd_lifx_packet_tag_labels* %2) {
%4 = alloca %struct.lgtd_lifx_gateway*
%5 = alloca %struct.lgtd_lifx_packet_header*
%6 = alloca %struct.lgtd_lifx_packet_tag_labels*
store %struct.lgtd_lifx_gateway* %0, %struct.lgtd_lifx_gateway** %4
store %struct.lgtd_lifx_packet_header* %1, %struct.lgtd_lifx_packet_header** %5
store %struct.lgtd_lifx_packet_tag_labels* %2, %struct.lgtd_lifx_packet_tag_labels** %6
%7 = load %struct.lgtd_lifx_gateway*, %struct.lgtd_lifx_gateway** %4
%8 = load %struct.lgtd_lifx_packet_header*, %struct.lgtd_lifx_packet_header** %5
%9 = load %struct.lgtd_lifx_packet_tag_labels*, %struct.lgtd_lifx_packet_tag_labels** %6
ret void
}

LLVM IR (-O2):
%struct.lgtd_lifx_gateway = type opaque
%struct.lgtd_lifx_packet_header = type opaque
%struct.lgtd_lifx_packet_tag_labels = type opaque
define void @lgtd_lifx_gateway_handle_tag_labels(%struct.lgtd_lifx_gateway* nocapture %0, %struct.lgtd_lifx_packet_header* nocapture %1, %struct.lgtd_lifx_packet_tag_labels* nocapture %2) {
ret void
}
/* Type definitions */
struct buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buff_free_base(struct buff *);
int /*<<< orphan*/ free(struct buff *);
void buff_free(struct buff *buf) {
  if (buf == NULL) {
    return;
  }
  buff_free_base(buf);
  free(buf);
}


x86 assembly (clang, -O0):
<buff_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <buff_free+0x1c>
jmp    114e <buff_free+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <buff_free_base@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buff_free>:
test   %rdi,%rdi
je     1137 <buff_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <buff_free_base@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.buff = type { i32 }
define void @buff_free(%struct.buff* %0) {
%2 = alloca %struct.buff*
store %struct.buff* %0, %struct.buff** %2
%3 = load %struct.buff*, %struct.buff** %2
%4 = icmp eq %struct.buff* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.buff*, %struct.buff** %2
%8 = call i32 @buff_free_base(%struct.buff* %7)
%9 = load %struct.buff*, %struct.buff** %2
%10 = call i32 @free(%struct.buff* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.buff = type { i32 }
define void @buff_free(%struct.buff* %0) {
%2 = icmp eq %struct.buff* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @buff_free_base(%struct.buff* %0)
%5 = tail call i32 @free(%struct.buff* %0)
br label %6
6: ; preds = %1, %3
ret void
}
unsigned long b_system_config(unsigned long function, unsigned long var) {
  unsigned long tlong;
  asm volatile("call *0x001000B0" : "=a"(tlong) : "d"(function), "a"(var));
  return tlong;
}


x86 assembly (clang, -O0):
<b_system_config>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
call   *0x1000b0
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_system_config>:
mov    %rsi,%rax
mov    %rdi,%rdx
call   *0x1000b0
ret

LLVM IR (-O0):
define i64 @b_system_config(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 = call i64 asm sideeffect "call *0x001000B0", "={ax},{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i64 %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @b_system_config(i64 %0, i64 %1) {
%3 = tail call i64 asm sideeffect "call *0x001000B0", "={ax},{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  int courses = 1, groups, students = 176, average_pr_group;
  average_pr_group = students / groups;
  printf("Groups: %d\n", groups);
  printf("There are %d students pr. group in %d course(s)\n", average_pr_group,
         courses);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xb0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Groups: %d\0A\00"
@.str.1 = [49 x i8] c"There are %d students pr. group in %d course(s)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 176, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sdiv i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %2
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Groups: %d\0A\00"
@.str.1 = [49 x i8] c"There are %d students pr. group in %d course(s)\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 undef)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 poison, i32 1)
ret i32 0
}
/* Variables and functions */
int recv_helper(int, void *, int, int /*<<< orphan*/);
int sock_recv(int sock, void *buffer, int sz) {
  return recv_helper(sock, buffer, sz, 0);
}


x86 assembly (clang, -O0):
<sock_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <recv_helper@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sock_recv(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @recv_helper(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
float single_sum(float entry, float sum) { return sum + entry; }


x86 assembly (clang, -O0):
<single_sum>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<single_sum>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @single_sum(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ sysinfo();
int main(void) {
  sysinfo();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sysinfo()
ret i32 0
}
/* Variables and functions */
char *reverseWord(char *);
char *reverseWords(char *s) {
  char *tmp = s;
  while (*tmp) {
    tmp = reverseWord(tmp);
  }
  return s;
}


x86 assembly (clang, -O0):
<reverseWords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1143 <reverseWords+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <reverseWord@plt>
mov    %rax,-0x10(%rbp)
jmp    1124 <reverseWords+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseWords>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     112d <reverseWords+0x1d>
mov    %rbx,%rax
nopl   0x0(%rax)
mov    %rax,%rdi
call   1030 <reverseWord@plt>
cmpb   $0x0,(%rax)
jne    1120 <reverseWords+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @reverseWords(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
%6 = tail call i8* @reverseWord(i8* %5)
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret i8* %0
}
/* Type definitions */
struct connection_domain {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rnn_get_connection(int, struct connection_domain *, int *);
int /*<<< orphan*/ rnn_set_connection(int, struct connection_domain *, int *);
void normalize_connection(int size, struct connection_domain *connection) {
  int has_connection[size];
  rnn_get_connection(size, connection, has_connection);
  rnn_set_connection(size, connection, has_connection);
}


x86 assembly (clang, -O0):
<normalize_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x28(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <rnn_get_connection@plt>
mov    -0x28(%rbp),%rdx
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <rnn_set_connection@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalize_connection>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%r15d
mov    %edi,%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdx
call   1030 <rnn_get_connection@plt>
mov    %r15d,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <rnn_set_connection@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.connection_domain = type { i32 }
define void @normalize_connection(i32 %0, %struct.connection_domain* %1) {
%3 = alloca i32
%4 = alloca %struct.connection_domain*
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %3
store %struct.connection_domain* %1, %struct.connection_domain** %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %5
%10 = alloca i32, i64 %8
store i64 %8, i64* %6
%11 = load i32, i32* %3
%12 = load %struct.connection_domain*, %struct.connection_domain** %4
%13 = call i32 @rnn_get_connection(i32 %11, %struct.connection_domain* %12, i32* %10)
%14 = load i32, i32* %3
%15 = load %struct.connection_domain*, %struct.connection_domain** %4
%16 = call i32 @rnn_set_connection(i32 %14, %struct.connection_domain* %15, i32* %10)
%17 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
%struct.connection_domain = type { i32 }
define void @normalize_connection(i32 %0, %struct.connection_domain* %1) {
%3 = zext i32 %0 to i64
%4 = alloca i32, i64 %3
%5 = call i32 @rnn_get_connection(i32 %0, %struct.connection_domain* %1, i32* %4)
%6 = call i32 @rnn_set_connection(i32 %0, %struct.connection_domain* %1, i32* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
void readId(const char *filename, char *id, int size) {
  FILE *f = fopen(filename, "r");
  if (f == NULL || id == NULL) {
    return;
  }
  fgets(id, size, f);
  fclose(f);
}


x86 assembly (clang, -O0):
<readId>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     116d <readId+0x3d>
cmpq   $0x0,-0x10(%rbp)
jne    1172 <readId+0x42>
jmp    118b <readId+0x5b>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <fgets@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readId>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
lea    0xebf(%rip),%rsi
call   1050 <fopen@plt>
test   %rbx,%rbx
je     116d <readId+0x3d>
mov    %rax,%rbp
test   %rax,%rax
je     116d <readId+0x3d>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
call   1040 <fgets@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fclose@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define void @readId(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = icmp eq i32* %10, null
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %12, %3
br label %23
16: ; preds = %12
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = load i32*, i32** %7
%20 = call i32 @fgets(i8* %17, i32 %18, i32* %19)
%21 = load i32*, i32** %7
%22 = call i32 @fclose(i32* %21)
br label %23
23: ; preds = %16, %15
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define void @readId(i8* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
%6 = icmp eq i8* %1, null
%7 = or i1 %6, %5
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = tail call i32 @fgets(i8* %1, i32 %2, i32* %4)
%10 = tail call i32 @fclose(i32* %4)
br label %11
11: ; preds = %3, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ init();
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ play();
int /*<<< orphan*/ stdscr;
int main() {
  init();
  play();
  mvprintw(15, 32, "Press any key...");
  nodelay(stdscr, 0);
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <play@plt>
mov    $0xf,%edi
mov    $0x20,%esi
lea    0xe72(%rip),%rdx
call   1080 <mvprintw@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1050 <nodelay@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    $0x0,%al
call   1070 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init@plt>
xor    %eax,%eax
call   1030 <play@plt>
lea    0xe8a(%rip),%rdx
mov    $0xf,%edi
mov    $0x20,%esi
call   1080 <mvprintw@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1050 <nodelay@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
call   1070 <endwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Press any key...\00"
@stdscr = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @init()
%3 = call i32 (...) @play()
%4 = call i32 @mvprintw(i32 15, i32 32, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdscr
%6 = call i32 @nodelay(i32 %5, i32 0)
%7 = call i32 (...) @getch()
%8 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Press any key...\00"
@stdscr = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @play()
%3 = tail call i32 @mvprintw(i32 15, i32 32, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdscr
%5 = tail call i32 @nodelay(i32 %4, i32 0)
%6 = tail call i32 (...) @getch()
%7 = tail call i32 (...) @endwin()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned int);
void binary_to_ascii(unsigned int number) {
  unsigned int quotient;
  quotient = number / 10;
  if (quotient != 0)
    binary_to_ascii(quotient);
  putchar(number % 10 + '0');
}


x86 assembly (clang, -O0):
<binary_to_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114c <binary_to_ascii+0x2c>
mov    -0x8(%rbp),%edi
call   1040 <binary_to_ascii@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%edi
add    $0x30,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_to_ascii>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%r14d
cmp    $0xa,%edi
jb     1140 <binary_to_ascii+0x20>
mov    $0xcccccccd,%edi
imul   %r14,%rdi
shr    $0x23,%rdi
call   1040 <binary_to_ascii@plt>
mov    $0xcccccccd,%eax
imul   %r14,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
or     $0x30,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @binary_to_ascii(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = udiv i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %2
%12 = urem i32 %11, 10
%13 = add i32 %12, 48
%14 = call i32 @putchar(i32 %13)
ret void
}

LLVM IR (-O2):
define void @binary_to_ascii(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = udiv i32 %0, 10
tail call void @binary_to_ascii(i32 %4)
br label %5
5: ; preds = %3, %1
%6 = urem i32 %0, 10
%7 = or i32 %6, 48
%8 = tail call i32 @putchar(i32 %7)
ret void
}
/* Variables and functions */
scalar_t__ strstr(char *, char *);
int sports_or_workout(char *s) {
  return strstr(s, "sports") || strstr(s, "working out");
}


x86 assembly (clang, -O0):
<sports_or_workout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1158 <sports_or_workout+0x48>
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sports_or_workout>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <sports_or_workout+0x1f>
pop    %rbx
ret
lea    0xed1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"sports\00"
@.str.1 = [12 x i8] c"working out\00"
define i32 @sports_or_workout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strstr(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strstr(i8* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"sports\00"
@.str.1 = [12 x i8] c"working out\00"
define i32 @sports_or_workout(i8* %0) {
%2 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ DisableUSART1();
void dxl_hal_close() { DisableUSART1(); }


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

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

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

LLVM IR (-O2):
define void @dxl_hal_close() {
%1 = tail call i32 (...) @DisableUSART1()
ret void
}
int toggle_bit(int var, int pos) { return var ^ (1 << pos); }


x86 assembly (clang, -O0):
<toggle_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle_bit>:
mov    %edi,%eax
btc    %esi,%eax
ret

LLVM IR (-O0):
define i32 @toggle_bit(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 = shl i32 1, %6
%8 = xor i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @toggle_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ md4_update(void *, void const *, size_t);
void hash_method_loop_md4(void *context, const void *data, size_t size) {
  md4_update(context, data, size);
}


x86 assembly (clang, -O0):
<hash_method_loop_md4>:
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
call   1030 <md4_update@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_method_loop_md4>:
jmp    1030 <md4_update@plt>

LLVM IR (-O0):
define void @hash_method_loop_md4(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 = call i32 @md4_update(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @hash_method_loop_md4(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @md4_update(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("RIOT USB stack example application");
  puts("Started USB stack!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"RIOT USB stack example application\00"
@.str.1 = [19 x i8] c"Started USB stack!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"RIOT USB stack example application\00"
@.str.1 = [19 x i8] c"Started USB stack!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int close(int const);
int try_close_popen(int const);
int sys_close(const int fh) {
  const int rc = try_close_popen(fh);
  return rc > 0 ? close(fh) : rc;
}


x86 assembly (clang, -O0):
<sys_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <try_close_popen@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1150 <sys_close+0x30>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0xc(%rbp)
jmp    1156 <sys_close+0x36>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_close>:
push   %rbx
mov    %edi,%ebx
call   1040 <try_close_popen@plt>
test   %eax,%eax
jle    1134 <sys_close+0x14>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sys_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @try_close_popen(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @close(i32 %9)
br label %13
11: ; preds = %1
%12 = load i32, i32* %3
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @sys_close(i32 %0) {
%2 = tail call i32 @try_close_popen(i32 %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %2, %1 ]
ret i32 %7
}
/* Type definitions */
struct usl_list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __usl_list_splice(struct usl_list_head *,
                                     struct usl_list_head *);
int /*<<< orphan*/ usl_list_empty(struct usl_list_head *);
void usl_list_splice(struct usl_list_head *list, struct usl_list_head *head) {
  if (!usl_list_empty(list))
    __usl_list_splice(list, head);
}


x86 assembly (clang, -O0):
<usl_list_splice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <usl_list_empty@plt>
cmp    $0x0,%eax
jne    114f <usl_list_splice+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <__usl_list_splice@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usl_list_splice>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <usl_list_empty@plt>
test   %eax,%eax
je     113b <usl_list_splice+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <__usl_list_splice@plt>

LLVM IR (-O0):
%struct.usl_list_head = type { i32 }
define void @usl_list_splice(%struct.usl_list_head* %0, %struct.usl_list_head* %1) {
%3 = alloca %struct.usl_list_head*
%4 = alloca %struct.usl_list_head*
store %struct.usl_list_head* %0, %struct.usl_list_head** %3
store %struct.usl_list_head* %1, %struct.usl_list_head** %4
%5 = load %struct.usl_list_head*, %struct.usl_list_head** %3
%6 = call i32 @usl_list_empty(%struct.usl_list_head* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load %struct.usl_list_head*, %struct.usl_list_head** %3
%10 = load %struct.usl_list_head*, %struct.usl_list_head** %4
%11 = call i32 @__usl_list_splice(%struct.usl_list_head* %9, %struct.usl_list_head* %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.usl_list_head = type { i32 }
define void @usl_list_splice(%struct.usl_list_head* %0, %struct.usl_list_head* %1) {
%3 = tail call i32 @usl_list_empty(%struct.usl_list_head* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @__usl_list_splice(%struct.usl_list_head* %0, %struct.usl_list_head* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("%%\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%%\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
double median(int num, ...) { return 0; }


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

x86 assembly (clang, -O2):
<median>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @median(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @median(i32 %0, ...) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ varArgs(int, int, int, int, int, int);
int main(int argc, char const *argv[]) {
  varArgs(1, 2, 3, 4, 5, 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
call   1030 <varArgs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
call   1030 <varArgs@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @varArgs(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
ret i32 0
}
/* Variables and functions */
void test5a() {
  int abort();
  float *malloc();
  int *calloc();
}


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

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

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

LLVM IR (-O2):
define void @test5a() {
ret void
}
void localhost_Lifecycle_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @localhost_Lifecycle_targetInit__I() {
ret void
}
void ff_hevc_put_hevc_uni_epel_hv24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv24_8_sse4() {
ret void
}
void foo_2_2_1_1_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_1_1_1_1_1_2() {
ret void
}
void foo054() {}


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

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

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

LLVM IR (-O2):
define void @foo054() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void badPlanetMessage(char *planets) {
  printf("\nYou tried to enroll using the following #PLANETS specification\n"
         "  %s\n",
         planets);
  printf("This line contains one or more errors/warnings as described above.\n"
         "You are therefore not yet enrolled in the game.\n"
         "Please correct the mistake and retransmit the enroll request.\n");
}


x86 assembly (clang, -O0):
<badPlanetMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<badPlanetMessage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [70 x i8] c"\0AYou tried to enroll using the following #PLANETS specification\0A %s\0A\00"
@.str.1 = [178 x i8] c"This line contains one or more errors/warnings as described above.\0AYou are therefore not yet enrolled in the game.\0APlease correct the mistake and retransmit the enroll request.\0A\00"
define void @badPlanetMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"\0AYou tried to enroll using the following #PLANETS specification\0A %s\0A\00"
@str = [177 x i8] c"This line contains one or more errors/warnings as described above.\0AYou are therefore not yet enrolled in the game.\0APlease correct the mistake and retransmit the enroll request.\00"
define void @badPlanetMessage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([177 x i8], [177 x i8]* @str, i64 0, i64 0))
ret void
}
void init_3270(void) {}


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

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

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

LLVM IR (-O2):
define void @init_3270() {
ret void
}
/* Variables and functions */
int inb(int);
void waitdisk(void) {
  while ((inb(0x1F7) & 0xC0) != 0x40)
    ;
}


x86 assembly (clang, -O0):
<waitdisk>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <waitdisk+0x9>
mov    $0x1f7,%edi
call   1030 <inb@plt>
and    $0xc0,%eax
cmp    $0x40,%eax
je     1136 <waitdisk+0x26>
jmp    1119 <waitdisk+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitdisk>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1f7,%edi
call   1030 <inb@plt>
and    $0xc0,%eax
cmp    $0x40,%eax
jne    1120 <waitdisk+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @waitdisk() {
br label %1
1: ; preds = %5, %0
%2 = call i32 @inb(i32 503)
%3 = and i32 %2, 192
%4 = icmp ne i32 %3, 64
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @waitdisk() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @inb(i32 503)
%3 = and i32 %2, 192
%4 = icmp eq i32 %3, 64
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Type definitions */
struct stack {
  int dummy;
};
struct layer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct layer *);
struct layer *stack_RB_MINMAX(struct stack *, int);
int /*<<< orphan*/ stack_RB_REMOVE(struct stack *, struct layer *);
void stack_clear(struct stack *stack) {
  struct layer *layer;
  while ((layer = stack_RB_MINMAX(stack, -1))) {
    stack_RB_REMOVE(stack, layer);
    free(layer);
  }
}


x86 assembly (clang, -O0):
<stack_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1040 <stack_RB_MINMAX@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1173 <stack_clear+0x43>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <stack_RB_REMOVE@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    113c <stack_clear+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_clear>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffff,%esi
call   1040 <stack_RB_MINMAX@plt>
test   %rax,%rax
je     1178 <stack_clear+0x48>
mov    %rax,%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <stack_RB_REMOVE@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
mov    $0xffffffff,%esi
call   1040 <stack_RB_MINMAX@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <stack_clear+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stack = type { i32 }
%struct.layer = type { i32 }
define void @stack_clear(%struct.stack* %0) {
%2 = alloca %struct.stack*
%3 = alloca %struct.layer*
store %struct.stack* %0, %struct.stack** %2
br label %4
4: ; preds = %8, %1
%5 = load %struct.stack*, %struct.stack** %2
%6 = call %struct.layer* @stack_RB_MINMAX(%struct.stack* %5, i32 -1)
store %struct.layer* %6, %struct.layer** %3
%7 = icmp ne %struct.layer* %6, null
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load %struct.stack*, %struct.stack** %2
%10 = load %struct.layer*, %struct.layer** %3
%11 = call i32 @stack_RB_REMOVE(%struct.stack* %9, %struct.layer* %10)
%12 = load %struct.layer*, %struct.layer** %3
%13 = call i32 @free(%struct.layer* %12)
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.stack = type { i32 }
%struct.layer = type { i32 }
define void @stack_clear(%struct.stack* %0) {
%2 = tail call %struct.layer* @stack_RB_MINMAX(%struct.stack* %0, i32 -1)
%3 = icmp eq %struct.layer* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi %struct.layer* [ %8, %4 ], [ %2, %1 ]
%6 = tail call i32 @stack_RB_REMOVE(%struct.stack* %0, %struct.layer* %5)
%7 = tail call i32 @free(%struct.layer* %5)
%8 = tail call %struct.layer* @stack_RB_MINMAX(%struct.stack* %0, i32 -1)
%9 = icmp eq %struct.layer* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
/* Variables and functions */
float simplex_noise_3d(int /*<<< orphan*/);
int /*<<< orphan*/ vec3f(float, float, float);
float call_snoise3(float x, float y, float z) {
  return simplex_noise_3d(vec3f(x, y, z));
}


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

x86 assembly (clang, -O2):
<call_snoise3>:
push   %rax
call   1040 <vec3f@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <simplex_noise_3d@plt>

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

LLVM IR (-O2):
define float @call_snoise3(float %0, float %1, float %2) {
%4 = tail call i32 @vec3f(float %0, float %1, float %2)
%5 = tail call float @simplex_noise_3d(i32 %4)
ret float %5
}