xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ rfftb1(int, double *, double *, double *, int *);
void rfftb(int n, double r[], double wsave[]) {
  if (n == 1)
    return;
  rfftb1(n, r, wsave, wsave + n, (int *)(wsave + 2 * n));
}


x86 assembly (clang, -O0):
<rfftb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1132 <rfftb+0x22>
jmp    1164 <rfftb+0x54>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%r8
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
call   1030 <rfftb1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfftb>:
cmp    $0x1,%edi
jne    1116 <rfftb+0x6>
ret
movslq %edi,%rax
lea    (%rdx,%rax,8),%rcx
lea    (%rdi,%rdi,1),%eax
cltq
lea    (%rdx,%rax,8),%r8
jmp    1030 <rfftb1@plt>

LLVM IR (-O0):
define void @rfftb(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %3
br label %25
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load double*, double** %5
%13 = load double*, double** %6
%14 = load double*, double** %6
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double*, double** %6
%19 = load i32, i32* %4
%20 = mul nsw i32 2, %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %18, i64 %21
%23 = bitcast double* %22 to i32*
%24 = call i32 @rfftb1(i32 %11, double* %12, double* %13, double* %17, i32* %23)
br label %25
25: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @rfftb(i32 %0, double* %1, double* %2) {
%4 = icmp eq i32 %0, 1
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds double, double* %2, i64 %6
%8 = shl nsw i32 %0, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds double, double* %2, i64 %9
%11 = bitcast double* %10 to i32*
%12 = tail call i32 @rfftb1(i32 %0, double* %1, double* %2, double* %7, i32* %11)
br label %13
13: ; preds = %3, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int V1 = 2;
  int V2 = 3;
  int V3 = 1;
  int V4;
  if (V1 == 2) {
    if (V3 == 2) {
      V4 = 1;
    } else {
      V4 = 2;
    }
  } else {
    if (V2 == 2) {
      V4 = 3;
    } else {
      V4 = 4;
    }
  }
  printf("%d\n", V4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1159 <main+0x49>
cmpl   $0x2,-0xc(%rbp)
jne    114d <main+0x3d>
movl   $0x1,-0x10(%rbp)
jmp    1154 <main+0x44>
movl   $0x2,-0x10(%rbp)
jmp    117b <main+0x6b>
cmpl   $0x2,-0x8(%rbp)
jne    116f <main+0x5f>
movl   $0x3,-0x10(%rbp)
jmp    1176 <main+0x66>
movl   $0x4,-0x10(%rbp)
jmp    117b <main+0x6b>
mov    -0x10(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *dll_fopen(char const *, char const *);
FILE *__wrap_fopen64(const char *path, const char *mode) {
  return dll_fopen(path, mode);
}


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

x86 assembly (clang, -O2):
<__wrap_fopen64>:
jmp    1030 <dll_fopen@plt>

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

LLVM IR (-O2):
define i32* @__wrap_fopen64(i8* %0, i8* %1) {
%3 = tail call i32* @dll_fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x18() {
  Assert_real((isalnum(24) == 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_isalnum.c",
              125, ("isalnum should be 0 for 0x18"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x18>:
push   %rax
mov    $0x18,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x7d,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x18\00"
define void @t_isalnum_0x18() {
%1 = call i64 @isalnum(i32 24)
%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 125, i8* getelementptr inbounds ([29 x i8], [29 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x18\00"
define void @t_isalnum_0x18() {
%1 = tail call i64 @isalnum(i32 24)
%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 125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void prool_version() {
  printf("Built by Prool %s %s "
         "proolix@gmail.com\nhttp://calculix.kharkov.org\nUse PROOL command in "
         "CGX main window for additional info\n",
         "Mar 18 2022", "23:18:27");
}


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

x86 assembly (clang, -O2):
<prool_version>:
lea    0xee9(%rip),%rdi
lea    0xf5f(%rip),%rsi
lea    0xf64(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [125 x i8] c"Built by Prool %s %s proolix@gmail.com\0Ahttp://calculix.kharkov.org\0AUse PROOL command in CGX main window for additional info\0A\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"23:18:27\00"
define void @prool_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [125 x i8] c"Built by Prool %s %s proolix@gmail.com\0Ahttp://calculix.kharkov.org\0AUse PROOL command in CGX main window for additional info\0A\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"23:18:27\00"
define void @prool_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setMIDIDrawBar(struct b_tonegen *, int /*<<< orphan*/,
                                  unsigned char);
void setDrawbar0(void *d, unsigned char v) {
  setMIDIDrawBar((struct b_tonegen *)d, 0, v);
}


x86 assembly (clang, -O0):
<setDrawbar0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
movzbl -0x9(%rbp),%edx
call   1030 <setMIDIDrawBar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDrawbar0>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <setMIDIDrawBar@plt>

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setDrawbar0(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.b_tonegen*
%7 = load i8, i8* %4
%8 = call i32 @setMIDIDrawBar(%struct.b_tonegen* %6, i32 0, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setDrawbar0(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_tonegen*
%4 = tail call i32 @setMIDIDrawBar(%struct.b_tonegen* %3, i32 0, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
void *child_thread(void *args) {
  printf("I am in child thread, starting msg = %s\n", (char *)args);
  sleep(10);
  return ((void *)99);
}


x86 assembly (clang, -O0):
<child_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
mov    $0x63,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_thread>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"I am in child thread, starting msg = %s\0A\00"
define i8* @child_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @sleep(i32 10)
ret i8* inttoptr (i64 99 to i8*)
}

LLVM IR (-O2):
@.str = [41 x i8] c"I am in child thread, starting msg = %s\0A\00"
define i8* @child_thread(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @sleep(i32 10)
ret i8* inttoptr (i64 99 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ EX_OSERR;
int /*<<< orphan*/ pfpanic(char *, unsigned short, unsigned short, char const *,
                           char const *, int, int, int /*<<< orphan*/);
void __pfpanic_pthread_create(unsigned short _syslog, unsigned short _verbose,
                              const char *_function_name,
                              const char *_file_name, int _line_number,
                              int _errno) {
  pfpanic("Unable to create thread", _syslog, _verbose, _function_name,
          _file_name, _line_number, _errno, EX_OSERR);
}


x86 assembly (clang, -O0):
<__pfpanic_pthread_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x2(%rbp),%si
mov    -0x4(%rbp),%dx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
lea    0xea2(%rip),%rdi
movzwl %si,%esi
movzwl %dx,%edx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <pfpanic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pfpanic_pthread_create>:
push   %rax
mov    %r9d,%r10d
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2eb8(%rip),%rdi
mov    (%rdi),%eax
lea    0xecf(%rip),%rdi
push   %rax
push   %r10
call   1030 <pfpanic@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Unable to create thread\00"
@EX_OSERR = global i32 0
define void @__pfpanic_pthread_create(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i16 %0, i16* %7
store i16 %1, i16* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i16, i16* %7
%14 = load i16, i16* %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = load i32, i32* @EX_OSERR
%20 = call i32 @pfpanic(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i16 zeroext %13, i16 zeroext %14, i8* %15, i8* %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Unable to create thread\00"
@EX_OSERR = global i32 0
define void @__pfpanic_pthread_create(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = load i32, i32* @EX_OSERR
%8 = tail call i32 @pfpanic(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5, i32 %7)
ret void
}
void ff_hevc_put_hevc_bi_epel_v4_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v4_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flipper_extend();
int /*<<< orphan*/ flipper_retract();
int /*<<< orphan*/ flipper_wait();
void flipper_flip() {
  flipper_extend();
  flipper_wait();
  flipper_retract();
}


x86 assembly (clang, -O0):
<flipper_flip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <flipper_extend@plt>
mov    $0x0,%al
call   1030 <flipper_wait@plt>
mov    $0x0,%al
call   1050 <flipper_retract@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flipper_flip>:
push   %rax
xor    %eax,%eax
call   1040 <flipper_extend@plt>
xor    %eax,%eax
call   1030 <flipper_wait@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <flipper_retract@plt>

LLVM IR (-O0):
define void @flipper_flip() {
%1 = call i32 (...) @flipper_extend()
%2 = call i32 (...) @flipper_wait()
%3 = call i32 (...) @flipper_retract()
ret void
}

LLVM IR (-O2):
define void @flipper_flip() {
%1 = tail call i32 (...) @flipper_extend()
%2 = tail call i32 (...) @flipper_wait()
%3 = tail call i32 (...) @flipper_retract()
ret void
}
/* Variables and functions */
int __print_status(char **, int, int /*<<< orphan*/);
int print_status(char **args, int num_args) {
  return __print_status(args, num_args, 0);
}


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

x86 assembly (clang, -O2):
<print_status>:
xor    %edx,%edx
jmp    1030 <__print_status@plt>

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

LLVM IR (-O2):
define i32 @print_status(i8** %0, i32 %1) {
%3 = tail call i32 @__print_status(i8** %0, i32 %1, i32 0)
ret i32 %3
}
void init_array_1(int data[]) {
  int index;
  for (index = 0; index < 10; ++index)
    data[index] = 0;
}


x86 assembly (clang, -O0):
<init_array_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1136 <init_array_1+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init_array_1+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_array_1>:
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0x20(%rdi)
ret

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

LLVM IR (-O2):
define void @init_array_1(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
double DegreesToRadians(double deg) { return deg / 180.0 * 3.14159265; }


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

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

LLVM IR (-O0):
define double @DegreesToRadians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.800000e+02
%5 = fmul double %4, 0x400921FB53C8D4F1
ret double %5
}

LLVM IR (-O2):
define double @DegreesToRadians(double %0) {
%2 = fdiv double %0, 1.800000e+02
%3 = fmul double %2, 0x400921FB53C8D4F1
ret double %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int backing_store;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
void set_XWindowAttributes_backing_store(void *_p, int _v) {
  ((XWindowAttributes *)_p)->backing_store = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XWindowAttributes_backing_store>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XWindowAttributes_backing_store(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XWindowAttributes_backing_store(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int tcsendbreak(int fd, int duration) { return -1; }


x86 assembly (clang, -O0):
<tcsendbreak>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @tcsendbreak(i32 %0, i32 %1) {
ret i32 -1
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_slurp_string_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_slurp_string(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_slurp_string_rec(lexbuf, 6);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_slurp_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1030 <Cyc_slurp_string_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_slurp_string>:
mov    $0x6,%esi
jmp    1030 <Cyc_slurp_string_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_slurp_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_slurp_string_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 6)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_slurp_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_slurp_string_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 6)
ret i32 %2
}
int DigitSum(int n) {
  if (n % 10 == 0) {
    return 0;
  } else {
    return ((n % 10) + DigitSum(n / 10));
  }
}


x86 assembly (clang, -O0):
<DigitSum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113b <DigitSum+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1163 <DigitSum+0x53>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <DigitSum@plt>
mov    -0xc(%rbp),%edx
add    %eax,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DigitSum>:
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ecx
je     116a <DigitSum+0x6a>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %ecx,%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
jne    1130 <DigitSum+0x30>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @DigitSum(i32 %0) {
%2 = srem i32 %0, 10
%3 = icmp eq i32 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %10, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ %0, %1 ]
%7 = phi i32 [ %9, %4 ], [ 0, %1 ]
%8 = sdiv i32 %6, 10
%9 = add nsw i32 %5, %7
%10 = srem i32 %8, 10
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %13
}
INSTR(CLRS) {
  STORE_S_IMM_I32(0);
  NEXT_INSTR();
}


x86 assembly (clang, -O0):
<INSTR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <STORE_S_IMM_I32@plt>
mov    $0x0,%al
call   1040 <NEXT_INSTR@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INSTR>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <STORE_S_IMM_I32@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <NEXT_INSTR@plt>

LLVM IR (-O0):
define i32 @INSTR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @STORE_S_IMM_I32 to i32 (i32, ...)*)(i32 0)
%5 = call i32 (...) @NEXT_INSTR()
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @INSTR(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @STORE_S_IMM_I32 to i32 (i32, ...)*)(i32 0)
%3 = tail call i32 (...) @NEXT_INSTR()
ret i32 undef
}
void arch_haltpoll_disable(unsigned int cpu) {}


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

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

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

LLVM IR (-O2):
define void @arch_haltpoll_disable(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void pprintf(char *sc) { printf("pprintf:\n\tString Constant = [%s]\n", sc); }


x86 assembly (clang, -O0):
<pprintf>:
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):
<pprintf>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"pprintf:\0A\09String Constant = [%s]\0A\00"
define void @pprintf(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"pprintf:\0A\09String Constant = [%s]\0A\00"
define void @pprintf(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int SacarDato(int ind_c) {
  extern int buffer[100];
  return buffer[ind_c];
}


x86 assembly (clang, -O0):
<SacarDato>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2ece(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SacarDato>:
movslq %edi,%rax
mov    0x2ed6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@buffer = external global [100 x i32]
define i32 @SacarDato(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [100 x i32], [100 x i32]* @buffer, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
@buffer = external global [100 x i32]
define i32 @SacarDato(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [100 x i32], [100 x i32]* @buffer, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int getch();
int jerk_getch(void) { return getch(); }


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

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

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

LLVM IR (-O2):
define i32 @jerk_getch() {
%1 = tail call i32 (...) @getch()
ret i32 %1
}
/* Variables and functions */
char DUART_GETC();
int /*<<< orphan*/ DUART_PUTC(char);
void gets(char *s) {
  char c;
  do {
    c = DUART_GETC();
    DUART_PUTC(c);
    *s++ = c;
  } while (c != '\n');
  *--s = 0;
}


x86 assembly (clang, -O0):
<gets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <DUART_GETC@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <DUART_PUTC@plt>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    112c <gets+0xc>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,-0x1(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gets>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <DUART_GETC@plt>
movsbl %al,%ebp
mov    %ebp,%edi
call   1030 <DUART_PUTC@plt>
mov    %bpl,(%rbx)
add    $0x1,%rbx
cmp    $0xa,%bpl
jne    1130 <gets+0x10>
movb   $0x0,-0x1(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @gets(i8* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = tail call signext i8 (...) @DUART_GETC()
%5 = tail call i32 @DUART_PUTC(i8 signext %4)
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %4, i8* %3
%7 = icmp eq i8 %4, 10
br i1 %7, label %8, label %2
8: ; preds = %2
store i8 0, i8* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
wchar_t *wmemcpy(wchar_t *restrict dest, const wchar_t *restrict src,
                 size_t length) {
  for (size_t i = 0; i < length; i++) {
    dest[i] = src[i];
  }
  return dest;
}


x86 assembly (clang, -O0):
<wmemcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114d <wmemcpy+0x4d>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1118 <wmemcpy+0x18>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmemcpy>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1125 <wmemcpy+0x15>
shl    $0x2,%rdx
mov    %rbx,%rdi
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @wmemcpy(i32* noalias returned writeonly %0, i32* noalias nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %0 to i8*
%8 = shl nuw i64 %2, 2
br label %9
9: ; preds = %5, %3
ret i32* %0
}
void MlmeQOSAction(struct rt_rtmp_adapter *pAd,
                   struct rt_mlme_queue_elem *Elem) {}


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

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

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

LLVM IR (-O2):
%struct.rt_rtmp_adapter = type opaque
%struct.rt_mlme_queue_elem = type opaque
define void @MlmeQOSAction(%struct.rt_rtmp_adapter* nocapture %0, %struct.rt_mlme_queue_elem* nocapture %1) {
ret void
}
void svg_show(char *str, int type) {}


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

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

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

LLVM IR (-O2):
define void @svg_show(i8* nocapture %0, i32 %1) {
ret void
}
int simple_other_function(char *arg1) { return 42; }


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

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

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

LLVM IR (-O2):
define i32 @simple_other_function(i8* nocapture readnone %0) {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int print_array(const char **array) {
  const char **p;
  int i;
  p = array;
  while (*p) {
    printf("Element %i - '%s'", i++, *p++);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1162 <print_array+0x52>
mov    -0x1c(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rax
mov    %eax,%edx
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    1124 <print_array+0x14>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%rdx
test   %rdx,%rdx
je     1149 <print_array+0x39>
mov    %rdi,%rbx
add    $0x8,%rbx
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    0x1(%rsi),%ebp
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rdx
add    $0x8,%rbx
mov    %ebp,%esi
test   %rdx,%rdx
jne    1130 <print_array+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"Element %i - '%s'\00"
define i32 @print_array(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ undef, %1 ]
%7 = phi i8** [ %9, %4 ], [ %0, %1 ]
%8 = add nsw i32 %6, 1
%9 = getelementptr inbounds i8*, i8** %7, i64 1
%10 = ptrtoint i8* %5 to i64
%11 = trunc i64 %10 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %11)
%13 = load i8*, i8** %9
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %4
15: ; preds = %4, %1
ret i32 undef
}
long acrn_hypercall1(unsigned long hcall_id, unsigned long param1) {
  long result;
  asm volatile("movl %1, %%r8d\n\t"
               "vmcall\n\t"
               : "=a"(result)
               : "g"(hcall_id), "D"(param1)
               : "r8", "memory");
  return result;
}


x86 assembly (clang, -O0):
<acrn_hypercall1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%r8d
vmcall
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i64 @acrn_hypercall1(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 "movl $1, %r8d\0A\09vmcall\0A\09", "={ax},imr,{di},~{r8},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XQueryExtension() {
  printf("XQueryExtension called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"XQueryExtension called\00"
define i32 @XQueryExtension() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_div_sint(struct Var *avar, const char *areg, const char *lreg,
                     const char *rreg) {
  pA("%s = %s / %s;", areg, lreg, rreg);
}


x86 assembly (clang, -O0):
<__func_div_sint>:
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    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec5(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s / %s;\00"
define void @__func_div_sint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s / %s;\00"
define void @__func_div_sint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NAR_Alphabet_Test();
int /*<<< orphan*/ NAR_Follow_Test();
int /*<<< orphan*/ NAR_Multistep2_Test();
int /*<<< orphan*/ NAR_Multistep_Test();
int /*<<< orphan*/ NAR_Procedure_Test();
int /*<<< orphan*/ NAR_Sequence_Test();
int /*<<< orphan*/ NAR_UDPNAR_Test();
void Run_System_Tests() {
  NAR_Alphabet_Test();
  NAR_Procedure_Test();
  NAR_Follow_Test();
  NAR_Multistep_Test();
  NAR_Multistep2_Test();
  NAR_Sequence_Test();
  NAR_UDPNAR_Test();
}


x86 assembly (clang, -O0):
<Run_System_Tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <NAR_Alphabet_Test@plt>
mov    $0x0,%al
call   1060 <NAR_Procedure_Test@plt>
mov    $0x0,%al
call   1030 <NAR_Follow_Test@plt>
mov    $0x0,%al
call   1080 <NAR_Multistep_Test@plt>
mov    $0x0,%al
call   1090 <NAR_Multistep2_Test@plt>
mov    $0x0,%al
call   1070 <NAR_Sequence_Test@plt>
mov    $0x0,%al
call   1040 <NAR_UDPNAR_Test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Run_System_Tests>:
push   %rax
xor    %eax,%eax
call   1050 <NAR_Alphabet_Test@plt>
xor    %eax,%eax
call   1060 <NAR_Procedure_Test@plt>
xor    %eax,%eax
call   1030 <NAR_Follow_Test@plt>
xor    %eax,%eax
call   1080 <NAR_Multistep_Test@plt>
xor    %eax,%eax
call   1090 <NAR_Multistep2_Test@plt>
xor    %eax,%eax
call   1070 <NAR_Sequence_Test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <NAR_UDPNAR_Test@plt>

LLVM IR (-O0):
define void @Run_System_Tests() {
%1 = call i32 (...) @NAR_Alphabet_Test()
%2 = call i32 (...) @NAR_Procedure_Test()
%3 = call i32 (...) @NAR_Follow_Test()
%4 = call i32 (...) @NAR_Multistep_Test()
%5 = call i32 (...) @NAR_Multistep2_Test()
%6 = call i32 (...) @NAR_Sequence_Test()
%7 = call i32 (...) @NAR_UDPNAR_Test()
ret void
}

LLVM IR (-O2):
define void @Run_System_Tests() {
%1 = tail call i32 (...) @NAR_Alphabet_Test()
%2 = tail call i32 (...) @NAR_Procedure_Test()
%3 = tail call i32 (...) @NAR_Follow_Test()
%4 = tail call i32 (...) @NAR_Multistep_Test()
%5 = tail call i32 (...) @NAR_Multistep2_Test()
%6 = tail call i32 (...) @NAR_Sequence_Test()
%7 = tail call i32 (...) @NAR_UDPNAR_Test()
ret void
}
/* Variables and functions */
int m_len(int);
unsigned char *mls(int, int);
int s_index(int buf, int p, int ch) {
  unsigned char *d;
  while (p < m_len(buf)) {
    d = mls(buf, p);
    if (*d == ch)
      return p;
  }
  return -1;
}


x86 assembly (clang, -O0):
<s_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <m_len@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
jge    117b <s_index+0x5b>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <mls@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x10(%rbp),%eax
jne    1176 <s_index+0x56>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1182 <s_index+0x62>
jmp    1131 <s_index+0x11>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_index>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <m_len@plt>
cmp    %ebx,%eax
jle    114e <s_index+0x2e>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <mls@plt>
movzbl (%rax),%eax
cmp    %r14d,%eax
jne    1130 <s_index+0x10>
jmp    1153 <s_index+0x33>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s_index(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
br label %9
9: ; preds = %25, %3
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = call i32 @m_len(i32 %11)
%13 = icmp slt i32 %10, %12
br i1 %13, label %14, label %26
14: ; preds = %9
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i8* @mls(i32 %15, i32 %16)
store i8* %17, i8** %8
%18 = load i8*, i8** %8
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i32, i32* %7
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %14
%24 = load i32, i32* %6
store i32 %24, i32* %4
br label %27
25: ; preds = %14
br label %9
26: ; preds = %9
store i32 -1, i32* %4
br label %27
27: ; preds = %26, %23
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @s_index(i32 %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @m_len(i32 %0)
%6 = icmp sgt i32 %5, %1
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = tail call i8* @mls(i32 %0, i32 %1)
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, %2
br i1 %11, label %12, label %4
12: ; preds = %4, %7
%13 = phi i32 [ %1, %7 ], [ -1, %4 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ hfuzz_trace_cmp8_internal(uintptr_t, int /*<<< orphan*/,
                                             int /*<<< orphan*/);
void hfuzz_trace_cmp8(uintptr_t pc, uint64_t Arg1, uint64_t Arg2) {
  hfuzz_trace_cmp8_internal(pc, Arg1, Arg2);
}


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

x86 assembly (clang, -O2):
<hfuzz_trace_cmp8>:
jmp    1030 <hfuzz_trace_cmp8_internal@plt>

LLVM IR (-O0):
define void @hfuzz_trace_cmp8(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @hfuzz_trace_cmp8_internal(i64 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @hfuzz_trace_cmp8(i64 %0, i32 %1, i32 %2) {
%4 = tail call i32 @hfuzz_trace_cmp8_internal(i64 %0, i32 %1, i32 %2)
ret void
}
int plus(int a, int b) {
  int c = a + b;
  return c;
}


x86 assembly (clang, -O0):
<plus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plus>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @plus(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @plus(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void output_char(char c) {
  *(char *)(0x100000208) = (char)c;
  return;
}


x86 assembly (clang, -O0):
<output_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
movabs $0x100000208,%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_char>:
movabs $0x100000208,%rax
mov    %dil,(%rax)
ret

LLVM IR (-O0):
define void @output_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
store i8 %3, i8* inttoptr (i64 4294967816 to i8*)
ret void
}

LLVM IR (-O2):
define void @output_char(i8 signext %0) {
store i8 %0, i8* inttoptr (i64 4294967816 to i8*)
ret void
}