xunge/DecIR huggingface dataset:
/* Variables and functions */
int partition(int *, int, int);
void quicksort(int A[], int i, int k) {
  int h = 0;
  if (i >= k) {
    return;
  }
  h = partition(A, i, k);
  quicksort(A, i, h);
  quicksort(A, h + 1, k);
  return;
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     114a <quicksort+0x2a>
jmp    117d <quicksort+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1165 <quicksort+0x45>
mov    %edx,%r14d
mov    %esi,%ebx
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebp
mov    %r15,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <quicksort@plt>
add    $0x1,%ebp
mov    %ebp,%ebx
cmp    %r14d,%ebp
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %10
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
tail call void @quicksort(i32* %0, i32 %6, i32 %7)
%8 = add nsw i32 %7, 1
%9 = icmp slt i32 %8, %2
br i1 %9, label %5, label %10
10: ; preds = %5, %3
ret void
}
AR0AX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[10000000]) <= (((int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
jg     1140 <AR0AX1+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <AR0AX1+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AX1>:
mov    0x2625a00(%r8),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(,%rcx,4),%edx
setle  %al
ret

LLVM IR (-O0):
define i32 @AR0AX1(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*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %12
%15 = getelementptr inbounds i32, i32* %14, i64 10000000
%16 = load i32, i32* %15
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %18
%20 = load i32, i32* %19
%21 = icmp sle i32 %16, %20
br i1 %21, label %22, label %23
22: ; preds = %6
store i32 1, i32* %7
br label %24
23: ; preds = %6
store i32 0, i32* %7
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @AR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %9
%11 = load i32, i32* %10
%12 = icmp sle i32 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int ints_argextreme(int *, int, int);
int ints_argmin(int *ints, int size) { return ints_argextreme(ints, size, 1); }


x86 assembly (clang, -O0):
<ints_argmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1030 <ints_argextreme@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ints_argmin>:
mov    $0x1,%edx
jmp    1030 <ints_argextreme@plt>

LLVM IR (-O0):
define i32 @ints_argmin(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 = call i32 @ints_argextreme(i32* %5, i32 %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ints_argmin(i32* %0, i32 %1) {
%3 = tail call i32 @ints_argextreme(i32* %0, i32 %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void resign(void) {
  printf("Hamurabi, I can not do what you wish."
         " Get yourself another steward!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<resign>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [69 x i8] c"Hamurabi, I can not do what you wish. Get yourself another steward!\0A\00"
define void @resign() {
%1 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [68 x i8] c"Hamurabi, I can not do what you wish. Get yourself another steward!\00"
define void @resign() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(int);
int main() {
  int c;
  printf("Enter a value :");
  c = getchar();
  printf("\nYou entered: ");
  putchar(c);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter a value :\00"
@.str.1 = [15 x i8] c"\0AYou entered: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @putchar(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter a value :\00"
@.str.1 = [15 x i8] c"\0AYou entered: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ instruction_sop1(int);
int /*<<< orphan*/ randomizeOperand();
void add5scalarinstrs() {
  int i;
  for (i = 0; i < 5; i++) {
    randomizeOperand();
    instruction_sop1(3);
  }
}


x86 assembly (clang, -O0):
<add5scalarinstrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1158 <add5scalarinstrs+0x38>
mov    $0x0,%al
call   1040 <randomizeOperand@plt>
mov    $0x3,%edi
call   1030 <instruction_sop1@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <add5scalarinstrs+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add5scalarinstrs>:
push   %rax
xor    %eax,%eax
call   1040 <randomizeOperand@plt>
mov    $0x3,%edi
call   1030 <instruction_sop1@plt>
xor    %eax,%eax
call   1040 <randomizeOperand@plt>
mov    $0x3,%edi
call   1030 <instruction_sop1@plt>
xor    %eax,%eax
call   1040 <randomizeOperand@plt>
mov    $0x3,%edi
call   1030 <instruction_sop1@plt>
xor    %eax,%eax
call   1040 <randomizeOperand@plt>
mov    $0x3,%edi
call   1030 <instruction_sop1@plt>
xor    %eax,%eax
call   1040 <randomizeOperand@plt>
mov    $0x3,%edi
pop    %rax
jmp    1030 <instruction_sop1@plt>

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

LLVM IR (-O2):
define void @add5scalarinstrs() {
%1 = tail call i32 (...) @randomizeOperand()
%2 = tail call i32 @instruction_sop1(i32 3)
%3 = tail call i32 (...) @randomizeOperand()
%4 = tail call i32 @instruction_sop1(i32 3)
%5 = tail call i32 (...) @randomizeOperand()
%6 = tail call i32 @instruction_sop1(i32 3)
%7 = tail call i32 (...) @randomizeOperand()
%8 = tail call i32 @instruction_sop1(i32 3)
%9 = tail call i32 (...) @randomizeOperand()
%10 = tail call i32 @instruction_sop1(i32 3)
ret void
}
void av_frame_get_pkt_size() {}


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

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

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

LLVM IR (-O2):
define void @av_frame_get_pkt_size() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zwm_panel_toggle();
void toggle_panel(const char *arg) { zwm_panel_toggle(); }


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

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

LLVM IR (-O0):
define void @toggle_panel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @zwm_panel_toggle()
ret void
}

LLVM IR (-O2):
define void @toggle_panel(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @zwm_panel_toggle()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x6e() {
  Assert_real((isupper(110) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              555, ("isupper should be 0 for n"));
}


x86 assembly (clang, -O0):
<t_isupper_0x6e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6e,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x22b,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x6e>:
push   %rax
mov    $0x6e,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x22b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for n\00"
define void @t_isupper_0x6e() {
%1 = call i64 @isupper(i32 110)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for n\00"
define void @t_isupper_0x6e() {
%1 = tail call i64 @isupper(i32 110)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fc_host_get_statistic(char *, char const *);
uint64_t fc_stat_error_frames(const char *host) {
  return fc_host_get_statistic("error_frames", host);
}


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

x86 assembly (clang, -O2):
<fc_stat_error_frames>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <fc_host_get_statistic@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"error_frames\00"
define i32 @fc_stat_error_frames(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fc_host_get_statistic(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [13 x i8] c"error_frames\00"
define i32 @fc_stat_error_frames(i8* %0) {
%2 = tail call i32 @fc_host_get_statistic(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Type definitions */
struct in_addr {
  int /*<<< orphan*/ s_addr;
};
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ INADDR_NONE;
scalar_t__ inet_aton(char const *, struct in_addr *);
in_addr_t inet_addr(const char *cp) {
  struct in_addr addr;
  if (inet_aton(cp, &addr)) {
    return addr.s_addr;
  }
  return INADDR_NONE;
}


x86 assembly (clang, -O0):
<inet_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <inet_aton@plt>
cmp    $0x0,%rax
je     113e <inet_addr+0x2e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <inet_addr+0x3a>
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_addr>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <inet_aton@plt>
test   %rax,%rax
jne    112e <inet_addr+0x1e>
mov    0x2eba(%rip),%rbx
mov    (%rbx),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@INADDR_NONE = global i32 0
define i32 @inet_addr(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.in_addr
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @inet_aton(i8* %5, %struct.in_addr* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i32 0, i32 0
%10 = load i32, i32* %9
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* @INADDR_NONE
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@INADDR_NONE = global i32 0
define i32 @inet_addr(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = call i64 @inet_aton(i8* %0, %struct.in_addr* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @INADDR_NONE
%9 = select i1 %5, i32 %8, i32 %7
ret i32 %9
}
void f112(void) {
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({
      goto a;
      0;
    });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f112>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1104 <f112+0x4>

x86 assembly (clang, -O2):
<f112>:
jmp    1100 <f112>

LLVM IR (-O0):
define void @f112() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
br label %6
6: ; preds = %6, %0
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
store i32 0, i32* %3
%9 = load i32, i32* %3
br label %6
}

LLVM IR (-O2):
define void @f112() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
scalar_t__ test_body();
int test_main(void) {
  int i;
  for (i = 0; i < 10000; i++)
    if (test_body())
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jge    115c <test_main+0x4c>
mov    $0x0,%al
call   1030 <test_body@plt>
cmp    $0x0,%rax
je     1149 <test_main+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1163 <test_main+0x53>
jmp    114e <test_main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <test_main+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_main>:
push   %rbx
mov    $0x2710,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <test_body@plt>
test   %rax,%rax
jne    1135 <test_main+0x25>
add    $0xffffffff,%ebx
jne    1120 <test_main+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @test_main() {
br label %4
1: ; preds = %4
%2 = add nuw nsw i32 %5, 1
%3 = icmp eq i32 %2, 10000
br i1 %3, label %8, label %4
4: ; preds = %0, %1
%5 = phi i32 [ 0, %0 ], [ %2, %1 ]
%6 = tail call i64 (...) @test_body()
%7 = icmp eq i64 %6, 0
br i1 %7, label %1, label %8
8: ; preds = %1, %4
%9 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void main() {
  int a[5] = {1, 2, 3, 4, 5};
  int *ptr = (int *)(&a + 1);
  printf("*(a+1)=%d,*(ptr-1)=%d,*ptr=%d", *(a + 1), *(ptr - 1), *ptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%edx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
mov    $0x5,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@.str = [30 x i8] c"*(a+1)=%d,*(ptr-1)=%d,*ptr=%d\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca i32*
%3 = bitcast [5 x i32]* %1 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 1
%5 = bitcast [5 x i32]* %4 to i32*
store i32* %5, i32** %2
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 -1
%11 = load i32, i32* %10
%12 = load i32*, i32** %2
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"*(a+1)=%d,*(ptr-1)=%d,*ptr=%d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 2, i32 5, i32 poison)
ret void
}
int DRV_SET_PID(unsigned char u2diagValue) { return 0; }


x86 assembly (clang, -O0):
<DRV_SET_PID>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DRV_SET_PID(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @DRV_SET_PID(i8 zeroext %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
void c_pomp_set_lock_(omp_lock_t *s) { (void)0; }


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

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

LLVM IR (-O0):
define void @c_pomp_set_lock_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @c_pomp_set_lock_(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wrapper_free(int *);
int *wrapper_malloc(int);
int main() {
  int *ptr[4];
  int counter = 0;
  for (counter = 0; counter < 4; counter++) {
    ptr[counter] = wrapper_malloc(sizeof(int) * (counter + 1));
  }
  wrapper_free(ptr[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x4,-0x34(%rbp)
jge    1174 <main+0x54>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <wrapper_malloc@plt>
mov    %rax,%rcx
movslq -0x34(%rbp),%rax
mov    %rcx,-0x30(%rbp,%rax,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    113d <main+0x1d>
mov    -0x28(%rbp),%rdi
call   1040 <wrapper_free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1030 <wrapper_malloc@plt>
mov    $0x8,%edi
call   1030 <wrapper_malloc@plt>
mov    %rax,%rbx
mov    $0xc,%edi
call   1030 <wrapper_malloc@plt>
mov    $0x10,%edi
call   1030 <wrapper_malloc@plt>
mov    %rbx,%rdi
call   1040 <wrapper_free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @wrapper_malloc(i32 4)
%2 = tail call i32* @wrapper_malloc(i32 8)
%3 = tail call i32* @wrapper_malloc(i32 12)
%4 = tail call i32* @wrapper_malloc(i32 16)
%5 = tail call i32 @wrapper_free(i32* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Dec2Bin(char *, char *);
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *, char *);
int main(int argc, char *argv[]) {
  char s[16] = "";
  Dec2Bin(argv[1], s);
  printf("<%s>10 = <%s>2 \n", argv[1], s);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <Dec2Bin@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x20(%rbp),%rdx
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    0x8(%rsi),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <Dec2Bin@plt>
mov    0x8(%rbx),%rsi
lea    0xeb5(%rip),%rdi
mov    %r14,%rdx
call   1040 <printf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"<%s>10 = <%s>2 \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [16 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [16 x i8]* %6 to i8*
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%12 = call i32 @Dec2Bin(i8* %10, i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@.str = [17 x i8] c"<%s>10 = <%s>2 \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @Dec2Bin(i8* %6, i8* %4)
%8 = load i8*, i8** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %4)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
void test_2(int *out, int a, int b, int c) {
  out[1] = a * c;
  out[0] = a * b;
}


x86 assembly (clang, -O0):
<test_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2>:
imul   %esi,%ecx
mov    %ecx,0x4(%rdi)
imul   %esi,%edx
mov    %edx,(%rdi)
ret

LLVM IR (-O0):
define void @test_2(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %8
%11 = mul nsw i32 %9, %10
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = mul nsw i32 %14, %15
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i64 0
store i32 %16, i32* %18
ret void
}

LLVM IR (-O2):
define void @test_2(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %1
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = mul nsw i32 %2, %1
store i32 %7, i32* %0
ret void
}
void srand(unsigned int seed) {}


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

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

LLVM IR (-O0):
define void @srand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @srand(i32 %0) {
ret void
}
int bind2node(int core_id) { return 0; }


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

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

LLVM IR (-O0):
define i32 @bind2node(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @bind2node(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void device_title(const char *title) { printf("\e]2;%s\a", title); }


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

x86 assembly (clang, -O2):
<device_title>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\1B]2;%s\07\00"
define void @device_title(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B]2;%s\07\00"
define void @device_title(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void LCDIntUnregister(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x44050000);
  IntDisable(113);
  IntUnregister(113);
}


x86 assembly (clang, -O0):
<LCDIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x44050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    $0x71,%edi
call   1030 <IntDisable@plt>
mov    $0x71,%edi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDIntUnregister>:
push   %rax
xor    %eax,%eax
cmp    $0x44050000,%edi
sete   %al
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    $0x71,%edi
call   1030 <IntDisable@plt>
mov    $0x71,%edi
pop    %rax
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @LCDIntUnregister(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1141178368
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = call i32 @IntDisable(i32 113)
%8 = call i32 @IntUnregister(i32 113)
ret void
}

LLVM IR (-O2):
define void @LCDIntUnregister(i32 %0) {
%2 = icmp eq i32 %0, 1141178368
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = tail call i32 @IntDisable(i32 113)
%6 = tail call i32 @IntUnregister(i32 113)
ret void
}
void X509_PURPOSE_get0_name(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_PURPOSE_get0_name() {
ret void
}
/* Variables and functions */
int ata_checksum_verify(unsigned char const *);
bool ata_check_ata_smart_read_data_checksum(const unsigned char *buf) {
  return ata_checksum_verify(buf);
}


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

x86 assembly (clang, -O2):
<ata_check_ata_smart_read_data_checksum>:
jmp    1030 <ata_checksum_verify@plt>

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

LLVM IR (-O2):
define i32 @ata_check_ata_smart_read_data_checksum(i8* %0) {
%2 = tail call i32 @ata_checksum_verify(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ convert(char *, unsigned long);
int /*<<< orphan*/ printf(char *, char *);
void print_normal_entry(char *text, unsigned long total, unsigned long used,
                        unsigned long free) {
  printf("%-17s", text);
  convert("%8sK ", total);
  convert("%9sK ", used);
  convert("%9sK\n", free);
}


x86 assembly (clang, -O0):
<print_normal_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <convert@plt>
mov    -0x18(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <convert@plt>
mov    -0x20(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <convert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_normal_entry>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <convert@plt>
lea    0xeb9(%rip),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
lea    0xeb0(%rip),%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <convert@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%-17s\00"
@.str.1 = [6 x i8] c"%8sK \00"
@.str.2 = [6 x i8] c"%9sK \00"
@.str.3 = [6 x i8] c"%9sK\0A\00"
define void @print_normal_entry(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i64, i64* %6
%12 = call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %11)
%13 = load i64, i64* %7
%14 = call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %13)
%15 = load i64, i64* %8
%16 = call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 %15)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%-17s\00"
@.str.1 = [6 x i8] c"%8sK \00"
@.str.2 = [6 x i8] c"%9sK \00"
@.str.3 = [6 x i8] c"%9sK\0A\00"
define void @print_normal_entry(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %1)
%7 = tail call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %2)
%8 = tail call i32 @convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 %3)
ret void
}
__attribute__((weak)) void MCI0_IrqHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<MCI0_IrqHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <MCI0_IrqHandler+0x9>
jmp    1109 <MCI0_IrqHandler+0x9>

x86 assembly (clang, -O2):
<MCI0_IrqHandler>:
jmp    1100 <MCI0_IrqHandler>

LLVM IR (-O0):
define weak void @MCI0_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @MCI0_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ft_memdel(void **ap) {
  free(*ap);
  *ap = (void *)0;
}


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

x86 assembly (clang, -O2):
<ft_memdel>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_memdel(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = call i32 @free(i8* %4)
%6 = load i8**, i8*** %2
store i8* null, i8** %6
ret void
}

LLVM IR (-O2):
define void @ft_memdel(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t bswap64(uint64_t x) {
  return ((x & 0xFF) << 56) | ((x & 0xFF00) << 40) | ((x & 0xFF0000) << 24) |
         ((x & 0xFF000000) << 8) | ((x & 0xFF00000000) >> 8) |
         ((x & 0xFF0000000000) >> 24) | ((x & 0xFF000000000000) >> 40) |
         ((x & 0xFF00000000000000) >> 56);
}


x86 assembly (clang, -O0):
<bswap64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
and    $0xff00,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,%eax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
sar    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
sar    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
sar    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000000000,%rdx
and    %rdx,%rcx
shr    $0x38,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bswap64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 56
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 40
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = shl i32 %11, 24
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = shl i32 %15, 8
%17 = or i32 %13, %16
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = sext i32 %19 to i64
%21 = and i64 %20, 1095216660480
%22 = ashr i64 %21, 8
%23 = or i64 %18, %22
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = and i64 %25, 280375465082880
%27 = ashr i64 %26, 24
%28 = or i64 %23, %27
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = and i64 %30, 71776119061217280
%32 = ashr i64 %31, 40
%33 = or i64 %28, %32
%34 = load i32, i32* %2
%35 = sext i32 %34 to i64
%36 = and i64 %35, -72057594037927936
%37 = lshr i64 %36, 56
%38 = or i64 %33, %37
%39 = trunc i64 %38 to i32
ret i32 %39
}

LLVM IR (-O2):
define i32 @bswap64(i32 %0) {
ret i32 poison
}
int do_644() { return 644; }


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

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

LLVM IR (-O0):
define i32 @do_644() {
ret i32 644
}

LLVM IR (-O2):
define i32 @do_644() {
ret i32 644
}
int main() {
  int r;
  __asm("movl $0x87654321, %%edx; movb $0x12, %%dl; movb $0x34, %%dh"
        : "=d"(r));
  printf("%08X\n", r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x87654321,%edx
mov    $0x12,%dl
mov    $0x34,%dh
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x87654321,%edx
mov    $0x12,%dl
mov    $0x34,%dh
lea    0xedf(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%08X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 asm "movl $$0x87654321, %edx; movb $$0x12, %dl; movb $$0x34, %dh", "={dx},~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%08X\0A\00"
define i32 @main() {
%1 = tail call i32 asm "movl $$0x87654321, %edx; movb $$0x12, %dl; movb $$0x34, %dh", "={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int gf4_mul_2(unsigned char);
int gf4_mul_3(unsigned char);
unsigned char gf16_mul_8(unsigned char a) {
  unsigned char a0 = a & 3;
  unsigned char a1 = a >> 2;
  return (gf4_mul_2(a0 ^ a1) << 2) | gf4_mul_3(a1);
}


x86 assembly (clang, -O0):
<gf16_mul_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x3,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x2,%eax
mov    %al,-0x3(%rbp)
movzbl -0x2(%rbp),%eax
movzbl -0x3(%rbp),%ecx
xor    %ecx,%eax
movzbl %al,%edi
call   1030 <gf4_mul_2@plt>
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x3(%rbp),%edi
call   1040 <gf4_mul_3@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
or     %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf16_mul_8>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %ebx,%eax
and    $0x3,%al
shr    $0x2,%bl
xor    %bl,%al
movzbl %al,%edi
call   1030 <gf4_mul_2@plt>
mov    %eax,%ebp
shl    $0x2,%ebp
movzbl %bl,%edi
call   1040 <gf4_mul_3@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @gf16_mul_8(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = and i32 %6, 3
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = ashr i32 %10, 2
%12 = trunc i32 %11 to i8
store i8 %12, i8* %4
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = xor i32 %14, %16
%18 = trunc i32 %17 to i8
%19 = call i32 @gf4_mul_2(i8 zeroext %18)
%20 = shl i32 %19, 2
%21 = load i8, i8* %4
%22 = call i32 @gf4_mul_3(i8 zeroext %21)
%23 = or i32 %20, %22
%24 = trunc i32 %23 to i8
ret i8 %24
}

LLVM IR (-O2):
define zeroext i8 @gf16_mul_8(i8 zeroext %0) {
%2 = and i8 %0, 3
%3 = lshr i8 %0, 2
%4 = xor i8 %2, %3
%5 = tail call i32 @gf4_mul_2(i8 zeroext %4)
%6 = shl i32 %5, 2
%7 = tail call i32 @gf4_mul_3(i8 zeroext %3)
%8 = or i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Variables and functions */
int f(int /*<<< orphan*/);
int main(void) { return f(0); }


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

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
main() { f(2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
ret i32 0
}
/* Type definitions */
struct timeval {
  double tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double __cl_time() {
  struct timeval t;
  gettimeofday(&t, NULL);
  return (double)t.tv_sec + t.tv_usec / 1000000.0;
}


x86 assembly (clang, -O0):
<__cl_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xec8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cl_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @__cl_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @__cl_time() {
%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 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %9, %6
ret double %10
}
/* Variables and functions */
scalar_t__ tolower(int);
void strlwc(char *str) {
  while (*str) {
    *str = (char)tolower((int)*str);
    str++;
  }
}


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

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

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

LLVM IR (-O2):
define void @strlwc(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @tolower(i32 %7)
%9 = trunc i64 %8 to i8
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
int dbgp_external_startup(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @dbgp_external_startup() {
ret i32 -1
}
int SecCertificateGetData() { return -4; }


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

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

LLVM IR (-O0):
define i32 @SecCertificateGetData() {
ret i32 -4
}

LLVM IR (-O2):
define i32 @SecCertificateGetData() {
ret i32 -4
}