xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  fprintf(stderr, "__NR_pidfd_getfd undefined. The pidfd_getfd syscall is "
                  "unavailable. Test aborting\n");
  return 4;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"__NR_pidfd_getfd undefined. The pidfd_getfd syscall is unavailable. Test aborting\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
ret i32 4
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"__NR_pidfd_getfd undefined. The pidfd_getfd syscall is unavailable. Test aborting\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
ret i32 4
}
real_to_ieee(r, a, iflg) float r;
char *a;
int iflg;
{
  long *xx;
  char *cf;
  float xf;
  int i;
  xx = (long *)&xf;
  xf = r;
  if (iflg != 0)
    *xx = 0xFFFFFFFF;
  for (i = 0, cf = (char *)xx; i < 4; i++)
    a[i] = *cf++;
}


x86 assembly (clang, -O0):
<real_to_ieee>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x2c(%rbp),%rax
mov    %rax,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     113c <real_to_ieee+0x3c>
mov    -0x20(%rbp),%rax
mov    $0xffffffff,%ecx
mov    %rcx,(%rax)
movl   $0x0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x4,-0x30(%rbp)
jge    117f <real_to_ieee+0x7f>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
mov    (%rax),%dl
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    114b <real_to_ieee+0x4b>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<real_to_ieee>:
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define i32 @real_to_ieee(double %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca float
%11 = alloca i32
%12 = fptrunc double %0 to float
store float %12, float* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%13 = bitcast float* %10 to i64*
store i64* %13, i64** %8
%14 = load float, float* %5
store float %14, float* %10
%15 = load i32, i32* %7
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %3
%18 = load i64*, i64** %8
store i64 4294967295, i64* %18
br label %19
19: ; preds = %17, %3
store i32 0, i32* %11
%20 = load i64*, i64** %8
%21 = bitcast i64* %20 to i8*
store i8* %21, i8** %9
br label %22
22: ; preds = %33, %19
%23 = load i32, i32* %11
%24 = icmp slt i32 %23, 4
br i1 %24, label %25, label %36
25: ; preds = %22
%26 = load i8*, i8** %9
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %9
%28 = load i8, i8* %26
%29 = load i8*, i8** %6
%30 = load i32, i32* %11
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
store i8 %28, i8* %32
br label %33
33: ; preds = %25
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %22
36: ; preds = %22
%37 = load i32, i32* %4
ret i32 %37
}

LLVM IR (-O2):
define i32 @real_to_ieee(double %0, i8* nocapture writeonly %1, i32 %2) {
%4 = fptrunc double %0 to float
%5 = bitcast i8* %1 to float*
store float %4, float* %5
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void config_ddr_phy_x(void) {
  *(uint32_t *)(0x4C0000E4) = (uint32_t)(0x00100007);
  *(uint32_t *)(0x4C0000E8) = (uint32_t)(0x00100007);
}


x86 assembly (clang, -O0):
<config_ddr_phy_x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4c0000e4,%eax
movq   $0x100007,(%rax)
mov    $0x4c0000e8,%eax
movq   $0x100007,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_ddr_phy_x>:
movq   $0x100007,0x4c0000e4
movq   $0x100007,0x4c0000e8
ret

LLVM IR (-O0):
define void @config_ddr_phy_x() {
store i64 1048583, i64* inttoptr (i64 1275068644 to i64*)
store i64 1048583, i64* inttoptr (i64 1275068648 to i64*)
ret void
}

LLVM IR (-O2):
define void @config_ddr_phy_x() {
store i64 1048583, i64* inttoptr (i64 1275068644 to i64*)
store i64 1048583, i64* inttoptr (i64 1275068648 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core3_swap(char *, int);
void U_EMRRESTOREDC_swap(char *record, int torev) { core3_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRRESTOREDC_swap>:
jmp    1030 <core3_swap@plt>

LLVM IR (-O0):
define void @U_EMRRESTOREDC_swap(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 @core3_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_EMRRESTOREDC_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lsda_setreportlevel(int);
void lsdasetrlevel(int *level) { lsda_setreportlevel((int)*level); }


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

x86 assembly (clang, -O2):
<lsdasetrlevel>:
mov    (%rdi),%edi
jmp    1030 <lsda_setreportlevel@plt>

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

LLVM IR (-O2):
define void @lsdasetrlevel(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @lsda_setreportlevel(i32 %2)
ret void
}
/* Type definitions */
struct ottery_state {
  int dummy;
};

/* Variables and functions */
scalar_t__ ottery_st_rand_check_init(struct ottery_state *);
unsigned int ottery_st_rand_range_nolock(struct ottery_state *, unsigned int);
unsigned ottery_st_rand_range(struct ottery_state *state, unsigned upper) {
  unsigned n;
  if (ottery_st_rand_check_init(state))
    return 0;
  ((void)0);
  n = ottery_st_rand_range_nolock(state, upper);
  ((void)0);
  return n;
}


x86 assembly (clang, -O0):
<ottery_st_rand_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ottery_st_rand_check_init@plt>
cmp    $0x0,%rax
je     114e <ottery_st_rand_range+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1163 <ottery_st_rand_range+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <ottery_st_rand_range_nolock@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ottery_st_rand_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <ottery_st_rand_check_init@plt>
test   %rax,%rax
je     113b <ottery_st_rand_range+0x1b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ottery_st_rand_range_nolock@plt>

LLVM IR (-O0):
%struct.ottery_state = type { i32 }
define i32 @ottery_st_rand_range(%struct.ottery_state* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.ottery_state*
%5 = alloca i32
%6 = alloca i32
store %struct.ottery_state* %0, %struct.ottery_state** %4
store i32 %1, i32* %5
%7 = load %struct.ottery_state*, %struct.ottery_state** %4
%8 = call i64 @ottery_st_rand_check_init(%struct.ottery_state* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %16
11: ; preds = %2
%12 = load %struct.ottery_state*, %struct.ottery_state** %4
%13 = load i32, i32* %5
%14 = call i32 @ottery_st_rand_range_nolock(%struct.ottery_state* %12, i32 %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.ottery_state = type { i32 }
define i32 @ottery_st_rand_range(%struct.ottery_state* %0, i32 %1) {
%3 = tail call i64 @ottery_st_rand_check_init(%struct.ottery_state* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @ottery_st_rand_range_nolock(%struct.ottery_state* %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
void qd_alloc_debug_dump(const char *file) {}


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

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

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

LLVM IR (-O2):
define void @qd_alloc_debug_dump(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ die(char *);
scalar_t__ fputc(char, int /*<<< orphan*/ *);
void wrbyte(FILE *fd, char val) {
  if (fputc(val, fd) == EOF)
    die("Unexpected EOF");
}


x86 assembly (clang, -O0):
<wrbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%rax
jne    115d <wrbyte+0x3d>
lea    0xea8(%rip),%rdi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrbyte>:
push   %rax
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
call   1030 <fputc@plt>
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%rax
jne    1147 <wrbyte+0x27>
lea    0xebf(%rip),%rdi
pop    %rax
jmp    1040 <die@plt>
pop    %rax
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [15 x i8] c"Unexpected EOF\00"
define void @wrbyte(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i32*, i32** %3
%7 = call i64 @fputc(i8 signext %5, i32* %6)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [15 x i8] c"Unexpected EOF\00"
define void @wrbyte(i32* nocapture %0, i8 signext %1) {
%3 = tail call i64 @fputc(i8 signext %1, i32* %0)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int main(int argc, char *argv[]) {
  init("./test/write");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"./test/write\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @init(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
long sysconf(int /*<<< orphan*/);
long sys_get_cpu_count(void) { return sysconf(_SC_NPROCESSORS_ONLN); }


x86 assembly (clang, -O0):
<sys_get_cpu_count>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_get_cpu_count>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_NPROCESSORS_ONLN = global i32 0
define i64 @sys_get_cpu_count() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = call i64 @sysconf(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
@_SC_NPROCESSORS_ONLN = global i32 0
define i64 @sys_get_cpu_count() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = tail call i64 @sysconf(i32 %1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void htmlHeaderText(char *title) {
  printf("Content-type: text/plain\n\n<HEAD><TITLE>%s</TITLE></HEAD>", title);
}


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

LLVM IR (-O0):
@.str = [57 x i8] c"Content-type: text/plain\0A\0A<HEAD><TITLE>%s</TITLE></HEAD>\00"
define void @htmlHeaderText(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"Content-type: text/plain\0A\0A<HEAD><TITLE>%s</TITLE></HEAD>\00"
define void @htmlHeaderText(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
__attribute__((always_)) const float mlaf(float x, float y, float z) {
  return x * y + z;
}


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

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

LLVM IR (-O0):
define float @mlaf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @llvm.fmuladd.f32(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @mlaf(float %0, float %1, float %2) {
%4 = tail call float @llvm.fmuladd.f32(float %0, float %1, float %2)
ret float %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xnoexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xnoexpose_type(void *_p) {
  return (int)((XEvent *)_p)->xnoexpose.type;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xnoexpose_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xnoexpose_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgunscale(void) { gen("shr\tax,1"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"shr\09ax,1\00"
define void @cgunscale() {
%1 = call i32 @gen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"shr\09ax,1\00"
define void @cgunscale() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
void mmc_crypto_set_initial_state(struct mmc_host *host) {}


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

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

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

LLVM IR (-O2):
%struct.mmc_host = type opaque
define void @mmc_crypto_set_initial_state(%struct.mmc_host* nocapture %0) {
ret void
}
void test_create_destroy(void *fixture) {}


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

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

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

LLVM IR (-O2):
define void @test_create_destroy(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ w5100_write_byte(int, unsigned int);
void w5100_writePTIMER(unsigned data) { w5100_write_byte(0x0028, data); }


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

x86 assembly (clang, -O2):
mov    %edi,%esi
mov    $0x28,%edi
jmp    1030 <w5100_write_byte@plt>

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

LLVM IR (-O2):
define void @w5100_writePTIMER(i32 %0) {
%2 = tail call i32 @w5100_write_byte(i32 40, i32 %0)
ret void
}
int isbdigit(int c) {
  if ((c == '0') || (c == '1')) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isbdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
je     111b <isbdigit+0x1b>
cmpl   $0x31,-0x8(%rbp)
jne    1127 <isbdigit+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <isbdigit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isbdigit>:
and    $0xfffffffe,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isbdigit(i32 %0) {
%2 = and i32 %0, -2
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ ceil(size_t);
size_t TKEstimateBas64DecodedDataSize(size_t inDataSize) {
  size_t theDecodedDataSize = (int)ceil(inDataSize / 4.0) * 3;
  return (theDecodedDataSize);
}


x86 assembly (clang, -O0):
<TKEstimateBas64DecodedDataSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <ceil@plt>
imul   $0x3,%eax,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TKEstimateBas64DecodedDataSize>:
push   %rax
movq   %rdi,%xmm0
punpckldq 0xee2(%rip),%xmm0
subpd  0xeea(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee6(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xeda(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x20,%rax
lea    (%rax,%rax,2),%rax
sar    $0x20,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @TKEstimateBas64DecodedDataSize(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
%6 = fdiv double %5, 4.000000e+00
%7 = fptoui double %6 to i64
%8 = call i64 @ceil(i64 %7)
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 3
%11 = sext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @TKEstimateBas64DecodedDataSize(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fmul double %2, 2.500000e-01
%4 = fptoui double %3 to i64
%5 = tail call i64 @ceil(i64 %4)
%6 = mul i64 %5, 12884901888
%7 = ashr exact i64 %6, 32
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 1;
  int sum = 0;
  while (i < 101) {
    printf("i=%d\n", i);
    sum = sum + i;
    i++;
  }
  printf("sum=%d\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    115d <main+0x4d>
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1120 <main+0x10>
lea    0xecd(%rip),%rdi
mov    $0x13ba,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"i=%d\0A\00"
@.str.1 = [8 x i8] c"sum=%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 101
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 5050)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ realloc(char *, int);
char *strcat(int /*<<< orphan*/, char const *);
int strlen(char const *);
char *strmalloccat(char *str1, const char *str2) {
  int l = strlen(str1) + strlen(str2);
  str1 = strcat(realloc(str1, l + 1), str2);
  str1[l] = '\0';
  return str1;
}


x86 assembly (clang, -O0):
<strmalloccat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
call   1040 <realloc@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strmalloccat>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    (%rax,%rbx,1),%ebp
lea    (%rax,%rbx,1),%esi
add    $0x1,%esi
mov    %r15,%rdi
call   1040 <realloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1050 <strcat@plt>
movslq %ebp,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @strmalloccat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %7, %9
store i32 %10, i32* %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
%14 = call i32 @realloc(i8* %11, i32 %13)
%15 = load i8*, i8** %4
%16 = call i8* @strcat(i32 %14, i8* %15)
store i8* %16, i8** %3
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @strmalloccat(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add nsw i32 %4, %3
%6 = add nsw i32 %5, 1
%7 = tail call i32 @realloc(i8* %0, i32 %6)
%8 = tail call i8* @strcat(i32 %7, i8* %1)
%9 = sext i32 %5 to i64
%10 = getelementptr inbounds i8, i8* %8, i64 %9
store i8 0, i8* %10
ret i8* %8
}
void ssmash_quote(char *str) {
  for (; *str != '\0'; str++) {
    if (*str == '`')
      *str = '-';
  }
  return;
}


x86 assembly (clang, -O0):
<ssmash_quote>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <ssmash_quote+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x60,%eax
jne    112f <ssmash_quote+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x2d,(%rax)
jmp    1134 <ssmash_quote+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <ssmash_quote+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssmash_quote>:
jmp    1117 <ssmash_quote+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2d,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x60,%al
je     1110 <ssmash_quote+0x10>
test   %al,%al
jne    1113 <ssmash_quote+0x13>
ret

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

LLVM IR (-O2):
define void @ssmash_quote(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 96, label %5
]
5: ; preds = %2
store i8 45, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
double dqawce(double (*)(double), double, double, double, double, double,
              double *, int *, int *);
double dqawc(double f(double), double a, double b, double c, double epsabs,
             double epsrel, double *abserr, int *neval, int *ier) {
  double result;
  result = dqawce(f, a, b, c, epsabs, epsrel, abserr, neval, ier);
  return result;
}


x86 assembly (clang, -O0):
<dqawc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
call   1030 <dqawce@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dqawc>:
jmp    1030 <dqawce@plt>

LLVM IR (-O0):
define double @dqawc(double (double)* %0, double %1, double %2, double %3, double %4, double %5, double* %6, i32* %7, i32* %8) {
%10 = alloca double (double)*
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca double
store double (double)* %0, double (double)** %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double* %6, double** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%20 = load double (double)*, double (double)** %10
%21 = load double, double* %11
%22 = load double, double* %12
%23 = load double, double* %13
%24 = load double, double* %14
%25 = load double, double* %15
%26 = load double*, double** %16
%27 = load i32*, i32** %17
%28 = load i32*, i32** %18
%29 = call double @dqawce(double (double)* %20, double %21, double %22, double %23, double %24, double %25, double* %26, i32* %27, i32* %28)
store double %29, double* %19
%30 = load double, double* %19
ret double %30
}

LLVM IR (-O2):
define double @dqawc(double (double)* %0, double %1, double %2, double %3, double %4, double %5, double* %6, i32* %7, i32* %8) {
%10 = tail call double @dqawce(double (double)* %0, double %1, double %2, double %3, double %4, double %5, double* %6, i32* %7, i32* %8)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ callProc(int);
int /*<<< orphan*/ printProcList();
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char const *argv[]) {
  int selectedProc;
  printProcList();
  scanf("%d", &selectedProc);
  callProc(selectedProc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <printProcList@plt>
lea    0xeac(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1040 <callProc@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <printProcList@plt>
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <callProc@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (...) @printProcList()
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = call i32 @callProc(i32 %7)
ret i32 0
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main() {
#pragma omp target parallel num_threads(1)
  printf("Thread: %d\n", omp_get_thread_num());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Thread: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showStaticRoutes();
void cmdShowStaticRoutes(int cmdType, struct cmd_arg *pCmdArg) {
  showStaticRoutes();
}


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowStaticRoutes(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showStaticRoutes()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowStaticRoutes(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showStaticRoutes()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ RSA_PKCS1_PADDING;
int RSA_private_decrypt(int, unsigned char *, unsigned char *,
                        int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *createRSA(unsigned char *, int /*<<< orphan*/);
int private_decrypt(unsigned char *enc_data, int data_len, unsigned char *key,
                    unsigned char *decrypted) {
  RSA *rsa = createRSA(key, 0);
  int result = RSA_private_decrypt(data_len, enc_data, decrypted, rsa,
                                   RSA_PKCS1_PADDING);
  return result;
}


x86 assembly (clang, -O0):
<private_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <createRSA@plt>
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    0x2e7c(%rip),%rax
mov    (%rax),%r8d
call   1040 <RSA_private_decrypt@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<private_decrypt>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rdx,%rdi
xor    %esi,%esi
call   1030 <createRSA@plt>
mov    0x2e9b(%rip),%rcx
mov    (%rcx),%r8d
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <RSA_private_decrypt@plt>

LLVM IR (-O0):
@RSA_PKCS1_PADDING = global i32 0
define i32 @private_decrypt(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load i8*, i8** %7
%12 = call i32* @createRSA(i8* %11, i32 0)
store i32* %12, i32** %9
%13 = load i32, i32* %6
%14 = load i8*, i8** %5
%15 = load i8*, i8** %8
%16 = load i32*, i32** %9
%17 = load i32, i32* @RSA_PKCS1_PADDING
%18 = call i32 @RSA_private_decrypt(i32 %13, i8* %14, i8* %15, i32* %16, i32 %17)
store i32 %18, i32* %10
%19 = load i32, i32* %10
ret i32 %19
}

LLVM IR (-O2):
@RSA_PKCS1_PADDING = global i32 0
define i32 @private_decrypt(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32* @createRSA(i8* %2, i32 0)
%6 = load i32, i32* @RSA_PKCS1_PADDING
%7 = tail call i32 @RSA_private_decrypt(i32 %1, i8* %0, i8* %3, i32* %5, i32 %6)
ret i32 %7
}
int array_pos(char rank) {
  if (rank == 'A')
    return 0;
  if (rank == 'T')
    return 9;
  if (rank == 'J')
    return 10;
  if (rank == 'Q')
    return 11;
  if (rank == 'K')
    return 12;
  return (int)(rank - '1');
}


x86 assembly (clang, -O0):
<array_pos>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jne    1123 <array_pos+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1191 <array_pos+0x91>
movsbl -0x5(%rbp),%eax
cmp    $0x54,%eax
jne    113c <array_pos+0x3c>
movl   $0x9,-0x4(%rbp)
jmp    1191 <array_pos+0x91>
movsbl -0x5(%rbp),%eax
cmp    $0x4a,%eax
jne    1155 <array_pos+0x55>
movl   $0xa,-0x4(%rbp)
jmp    1191 <array_pos+0x91>
movsbl -0x5(%rbp),%eax
cmp    $0x51,%eax
jne    116e <array_pos+0x6e>
movl   $0xb,-0x4(%rbp)
jmp    1191 <array_pos+0x91>
movsbl -0x5(%rbp),%eax
cmp    $0x4b,%eax
jne    1187 <array_pos+0x87>
movl   $0xc,-0x4(%rbp)
jmp    1191 <array_pos+0x91>
movsbl -0x5(%rbp),%eax
sub    $0x31,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_pos>:
lea    -0x41(%rdi),%ecx
cmp    $0x13,%cl
ja     1123 <array_pos+0x23>
xor    %eax,%eax
movzbl %cl,%ecx
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0xa,%eax
ret
movsbl %dil,%eax
add    $0xffffffcf,%eax
ret
mov    $0xc,%eax
ret
mov    $0xb,%eax
ret
mov    $0x9,%eax
ret

LLVM IR (-O0):
define i32 @array_pos(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 65
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %32
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 84
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 9, i32* %2
br label %32
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 74
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 10, i32* %2
br label %32
18: ; preds = %13
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 81
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 11, i32* %2
br label %32
23: ; preds = %18
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 75
br i1 %26, label %27, label %28
27: ; preds = %23
store i32 12, i32* %2
br label %32
28: ; preds = %23
%29 = load i8, i8* %3
%30 = sext i8 %29 to i32
%31 = sub nsw i32 %30, 49
store i32 %31, i32* %2
br label %32
32: ; preds = %28, %27, %22, %17, %12, %7
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @array_pos(i8 signext %0) {
switch i8 %0, label %6 [
i8 65, label %9
i8 84, label %2
i8 74, label %3
i8 81, label %4
i8 75, label %5
]
2: ; preds = %1
br label %9
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = sext i8 %0 to i32
%8 = add nsw i32 %7, -49
br label %9
9: ; preds = %1, %6, %5, %4, %3, %2
%10 = phi i32 [ 9, %2 ], [ 10, %3 ], [ 11, %4 ], [ 12, %5 ], [ %8, %6 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int main(void) {
  int x = 100;
  printf("decimal signed constant: %d\n", x);
  unsigned int y = 100U;
  printf("decimal unsigned constant: %d\n", y);
  long int z = 10E5L;
  printf("decimal long range constant: %d\n", z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movslq -0x8(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
movl   $0x64,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
movq   $0xf4240,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"decimal signed constant: %d\0A\00"
@.str.1 = [31 x i8] c"decimal unsigned constant: %d\0A\00"
@.str.2 = [33 x i8] c"decimal long range constant: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 0, i32* %1
store i32 100, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %6)
store i32 100, i32* %3
%8 = load i32, i32* %3
%9 = zext i32 %8 to i64
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i64 %9)
store i64 1000000, i64* %4
%11 = load i64, i64* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i64 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"decimal signed constant: %d\0A\00"
@.str.1 = [31 x i8] c"decimal unsigned constant: %d\0A\00"
@.str.2 = [33 x i8] c"decimal long range constant: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 100)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i64 100)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i64 1000000)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ prg32setBank0(int);
void m11_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  prg32setBank0((val & 3) << 15);
  chr8setBank0((val >> 4) << 13);
}


x86 assembly (clang, -O0):
<m11_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x3,%edi
shl    $0xf,%edi
call   1030 <prg32setBank0@plt>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m11_setParams>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0x3,%edi
shl    $0xf,%edi
call   1030 <prg32setBank0@plt>
and    $0xfffffff0,%ebx
shl    $0x9,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <chr8setBank0@plt>

LLVM IR (-O0):
define void @m11_setParams(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 = and i32 %6, 3
%8 = shl i32 %7, 15
%9 = call i32 @prg32setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = ashr i32 %10, 4
%12 = shl i32 %11, 13
%13 = call i32 @chr8setBank0(i32 %12)
ret void
}

LLVM IR (-O2):
define void @m11_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 15
%4 = and i32 %3, 98304
%5 = tail call i32 @prg32setBank0(i32 %4)
%6 = shl i32 %1, 9
%7 = and i32 %6, -8192
%8 = tail call i32 @chr8setBank0(i32 %7)
ret void
}
int async_prompt_abort(const char *message) {
  (void)message;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @async_prompt_abort(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int RTLD_GLOBAL;
int RTLD_NOW;
void *dlopen(char const *, int);
void *sqlite3UnixDlopen(const char *zFilename) {
  return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL);
}


x86 assembly (clang, -O0):
<sqlite3UnixDlopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
or     (%rax),%esi
call   1030 <dlopen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3UnixDlopen>:
mov    0x2ec9(%rip),%rax
mov    0x2eca(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <dlopen@plt>

LLVM IR (-O0):
@RTLD_NOW = global i32 0
@RTLD_GLOBAL = global i32 0
define i8* @sqlite3UnixDlopen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @RTLD_NOW
%5 = load i32, i32* @RTLD_GLOBAL
%6 = or i32 %4, %5
%7 = call i8* @dlopen(i8* %3, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
@RTLD_NOW = global i32 0
@RTLD_GLOBAL = global i32 0
define i8* @sqlite3UnixDlopen(i8* %0) {
%2 = load i32, i32* @RTLD_NOW
%3 = load i32, i32* @RTLD_GLOBAL
%4 = or i32 %3, %2
%5 = tail call i8* @dlopen(i8* %0, i32 %4)
ret i8* %5
}
unsigned int h(unsigned int a, unsigned int b) { return ~(-(b + 1) ^ a); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
xor    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @h(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}