xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage() {
  printf("\nsu_balance_fire by S. Vakeva (2016-2017)\n\nUsage: su_balance_fire "
         "-s [STACK.su] -m [MIGRATED.su] -o [OUTFILE.su] [-v]\n");
  printf("\nScales the migrated SU file so that the section retains the same "
         "energy distribution in depth as the original stack.\n");
  printf("\nAverages all traces, determines a function of form a*exp(b*t) by "
         "which the migrated section is then scaled.\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf52(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [119 x i8] c"\0Asu_balance_fire by S. Vakeva (2016-2017)\0A\0AUsage: su_balance_fire -s [STACK.su] -m [MIGRATED.su] -o [OUTFILE.su] [-v]\0A\00"
@.str.1 = [119 x i8] c"\0AScales the migrated SU file so that the section retains the same energy distribution in depth as the original stack.\0A\00"
@.str.2 = [110 x i8] c"\0AAverages all traces, determines a function of form a*exp(b*t) by which the migrated section is then scaled.\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.2, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [118 x i8] c"\0Asu_balance_fire by S. Vakeva (2016-2017)\0A\0AUsage: su_balance_fire -s [STACK.su] -m [MIGRATED.su] -o [OUTFILE.su] [-v]\00"
@str.3 = [118 x i8] c"\0AScales the migrated SU file so that the section retains the same energy distribution in depth as the original stack.\00"
@str.4 = [109 x i8] c"\0AAverages all traces, determines a function of form a*exp(b*t) by which the migrated section is then scaled.\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([118 x i8], [118 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([118 x i8], [118 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([109 x i8], [109 x i8]* @str.4, i64 0, i64 0))
ret i32 1
}
int test_imm_A4uint16_mem(unsigned short *val) {
  return ((*val) & (-0xA4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A4uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff5c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A4uint16_mem>:
movzwl (%rdi),%eax
test   $0xff5c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A4uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -164
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_A4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -164
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("System doesn't have required numa support.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"System doesn't have required numa support.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [43 x i8] c"System doesn't have required numa support.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int cio_bytein();
long long cio_read(int n) {
  int i;
  long long v;
  v = 0;
  for (i = n - 1; i >= 0; i--) {
    v += cio_bytein() << (i << 3);
  }
  return v;
}


x86 assembly (clang, -O0):
<cio_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     115d <cio_read+0x4d>
mov    $0x0,%al
call   1030 <cio_bytein@plt>
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <cio_read+0x1c>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cio_read>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    114d <cio_read+0x3d>
mov    %edi,%ebx
add    $0x1,%ebx
lea    -0x8(,%rdi,8),%ebp
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <cio_bytein@plt>
mov    %ebp,%ecx
shl    %cl,%eax
cltq
add    %rax,%r14
add    $0xffffffff,%ebx
add    $0xfffffff8,%ebp
cmp    $0x1,%ebx
ja     1130 <cio_read+0x20>
jmp    1150 <cio_read+0x40>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @cio_read(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i64 [ %11, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 (...) @cio_bytein()
%8 = shl i32 %6, 3
%9 = shl i32 %7, %8
%10 = sext i32 %9 to i64
%11 = add nsw i64 %5, %10
%12 = icmp ugt i32 %4, 1
br i1 %12, label %3, label %13
13: ; preds = %3, %1
%14 = phi i64 [ 0, %1 ], [ %11, %3 ]
ret i64 %14
}
/* Variables and functions */
float QSqrt(float const);
float Maths_InvSqrt(const float number) { return QSqrt(number); }


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

x86 assembly (clang, -O2):
<Maths_InvSqrt>:
jmp    1030 <QSqrt@plt>

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

LLVM IR (-O2):
define float @Maths_InvSqrt(float %0) {
%2 = tail call float @QSqrt(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
int /*<<< orphan*/ unlink(char *);
remove_file(char *base, int nb) {
  char file[128];
  sprintf(file, "%s%d", base, nb);
  unlink(file);
}


x86 assembly (clang, -O0):
<remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0xa0(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_file>:
push   %rbx
sub    $0x80,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xecc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%d\00"
define i32 @remove_file(i8* %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = call i32 @unlink(i8* %4)
ret i32 undef
}
void MOUSE_ShowCursor(void) {}


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

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

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

LLVM IR (-O2):
define void @MOUSE_ShowCursor() {
ret void
}
/* Variables and functions */
float pow(float, int);
float quartic_in(float step, float max_steps, float max_val) {
  float ratio = step / max_steps;
  return max_val * pow(ratio, 4);
}


x86 assembly (clang, -O0):
<quartic_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quartic_in>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @quartic_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
store float %10, float* %7
%11 = load float, float* %6
%12 = load float, float* %7
%13 = call float @pow(float %12, i32 4)
%14 = fmul float %11, %13
ret float %14
}

LLVM IR (-O2):
define float @quartic_in(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = tail call float @pow(float %4, i32 4)
%6 = fmul float %5, %2
ret float %6
}
int vde_chain_nm7_n_in(void) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm7_n_in() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFD;
int errno;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int);
void CloseOnExec(int fd, int flag) {
  int oerrno;
  oerrno = errno;
  (void)fcntl(fd, F_SETFD, flag ? 1 : 0);
  errno = oerrno;
}


x86 assembly (clang, -O0):
<CloseOnExec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%ecx
xor    %edx,%edx
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
call   1030 <fcntl@plt>
mov    -0xc(%rbp),%ecx
mov    0x2e83(%rip),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloseOnExec>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ebe(%rip),%rbx
mov    (%rbx),%ebp
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
xor    %edx,%edx
test   %esi,%esi
setne  %dl
mov    %eax,%esi
call   1030 <fcntl@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
@F_SETFD = global i32 0
define void @CloseOnExec(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* @errno
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* @F_SETFD
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
%13 = call i32 @fcntl(i32 %7, i32 %8, i32 %12)
%14 = load i32, i32* %5
store i32 %14, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@F_SETFD = global i32 0
define void @CloseOnExec(i32 %0, i32 %1) {
%3 = load i32, i32* @errno
%4 = load i32, i32* @F_SETFD
%5 = icmp ne i32 %1, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %6)
store i32 %3, i32* @errno
ret void
}
float ease_in_quad(float t, float b, float c, float d) {
  t /= d;
  return c * t * t + b;
}


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

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

LLVM IR (-O0):
define float @ease_in_quad(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = fdiv float %10, %9
store float %11, float* %5
%12 = load float, float* %7
%13 = load float, float* %5
%14 = fmul float %12, %13
%15 = load float, float* %5
%16 = load float, float* %6
%17 = call float @llvm.fmuladd.f32(float %14, float %15, float %16)
ret float %17
}

LLVM IR (-O2):
define float @ease_in_quad(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fmul float %5, %2
%7 = tail call float @llvm.fmuladd.f32(float %6, float %5, float %1)
ret float %7
}
/* Type definitions */
struct proc_mcp {
  int dummy;
};
typedef int int32_t;
typedef int /*<<< orphan*/ arg;

/* Variables and functions */
int /*<<< orphan*/ send_response(struct proc_mcp *, char const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void send_response_int(struct proc_mcp *mcp, const char *cmd, int32_t iarg) {
  char arg[12];
  snprintf(arg, sizeof(arg), "%d", iarg);
  send_response(mcp, cmd, arg);
}


x86 assembly (clang, -O0):
<send_response_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    $0xc,%esi
lea    0xeba(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <send_response@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_response_int>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ecx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xec8(%rip),%rdx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
mov    $0xc,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <send_response@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.proc_mcp = type { i32 }
@.str = [3 x i8] c"%d\00"
define void @send_response_int(%struct.proc_mcp* %0, i8* %1, i32 %2) {
%4 = alloca %struct.proc_mcp*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [12 x i8]
store %struct.proc_mcp* %0, %struct.proc_mcp** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [12 x i8], [12 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 @snprintf(i8* %8, i32 12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load %struct.proc_mcp*, %struct.proc_mcp** %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %7, i64 0, i64 0
%14 = call i32 @send_response(%struct.proc_mcp* %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.proc_mcp = type { i32 }
@.str = [3 x i8] c"%d\00"
define void @send_response_int(%struct.proc_mcp* %0, i8* %1, i32 %2) {
%4 = alloca [12 x i8]
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @send_response(%struct.proc_mcp* %0, i8* %1, i8* %5)
ret void
}
/* Variables and functions */
int xbp_unlink(char const *);
int __wrap_unlink(const char *filename) { return xbp_unlink(filename); }


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

x86 assembly (clang, -O2):
<__wrap_unlink>:
jmp    1030 <xbp_unlink@plt>

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

LLVM IR (-O2):
define i32 @__wrap_unlink(i8* %0) {
%2 = tail call i32 @xbp_unlink(i8* %0)
ret i32 %2
}
/* Type definitions */
struct option {
  int dummy;
};
struct _getopt_data {
  int dummy;
};

/* Variables and functions */
int _getopt_internal_r(int, char **, char const *, struct option const *, int *,
                       int, int /*<<< orphan*/, struct _getopt_data *);
int _getopt_long_only_r(int argc, char **argv, const char *options,
                        const struct option *long_options, int *opt_index,
                        struct _getopt_data *d) {
  return _getopt_internal_r(argc, argv, options, long_options, opt_index, 1, 0,
                            d);
}


x86 assembly (clang, -O0):
<_getopt_long_only_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    $0x1,%r9d
xor    %r10d,%r10d
movl   $0x0,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <_getopt_internal_r@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getopt_long_only_r>:
push   %rax
mov    %r9,%rax
mov    $0x1,%r9d
push   %rax
push   $0x0
call   1030 <_getopt_internal_r@plt>
add    $0x10,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.option = type { i32 }
%struct._getopt_data = type { i32 }
define i32 @_getopt_long_only_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, %struct._getopt_data* %5) {
%7 = tail call i32 @_getopt_internal_r(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1, i32 0, %struct._getopt_data* %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prgname) {
  fprintf(stderr, "usage: %s [-hbs] [-v version] <infile> -o <outfile>\n",
          prgname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"usage: %s [-hbs] [-v version] <infile> -o <outfile>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"usage: %s [-hbs] [-v version] <infile> -o <outfile>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int send(int, void *, int, int /*<<< orphan*/);
int socket_send(int fileDesc, void *data, int size) {
  return send(fileDesc, data, size, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @socket_send(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
void swap(int *x, int *y) {
  int hold = *y;
  *y = *x;
  *x = hold;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap(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** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
store i32 %4, i32* %1
store i32 %3, i32* %0
ret void
}
char *decsngl_shortdesc(void) {
  return "decrypt Base32 encoded data using a specified AES key";
}


x86 assembly (clang, -O0):
<decsngl_shortdesc>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decsngl_shortdesc>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [54 x i8] c"decrypt Base32 encoded data using a specified AES key\00"
define i8* @decsngl_shortdesc() {
ret i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [54 x i8] c"decrypt Base32 encoded data using a specified AES key\00"
define i8* @decsngl_shortdesc() {
ret i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char mpop();
int /*<<< orphan*/ putchar(char);
void emit() {
  char c = mpop();
  if (c == '\r')
    c = '\n';
  putchar(c);
}


x86 assembly (clang, -O0):
<emit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <mpop@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
jne    1143 <emit+0x23>
movb   $0xa,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit>:
push   %rax
xor    %eax,%eax
call   1040 <mpop@plt>
cmp    $0xd,%al
movzbl %al,%eax
mov    $0xa,%ecx
cmovne %eax,%ecx
movsbl %cl,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @emit() {
%1 = alloca i8
%2 = call signext i8 (...) @mpop()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 13
br i1 %5, label %6, label %7
6: ; preds = %0
store i8 10, i8* %1
br label %7
7: ; preds = %6, %0
%8 = load i8, i8* %1
%9 = call i32 @putchar(i8 signext %8)
ret void
}

LLVM IR (-O2):
define void @emit() {
%1 = tail call signext i8 (...) @mpop()
%2 = icmp eq i8 %1, 13
%3 = select i1 %2, i8 10, i8 %1
%4 = tail call i32 @putchar(i8 signext %3)
ret void
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
void Wait(double delta) {
  clock_t expire = clock() + delta * CLOCKS_PER_SEC;
  while (clock() < expire) {
  }
}


x86 assembly (clang, -O0):
<Wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x8(%rbp),%xmm0
mov    0x2eb3(%rip),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cmp    -0x10(%rbp),%rax
jge    1160 <Wait+0x50>
jmp    114a <Wait+0x3a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Wait>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <clock@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x2eb7(%rip),%rax
movsd  0x8(%rsp),%xmm1
mulsd  (%rax),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <clock@plt>
cmp    %rbx,%rax
jl     1150 <Wait+0x40>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @Wait(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = call i64 (...) @clock()
%5 = sitofp i64 %4 to double
%6 = load double, double* %2
%7 = load double, double* @CLOCKS_PER_SEC
%8 = call double @llvm.fmuladd.f64(double %6, double %7, double %5)
%9 = fptosi double %8 to i64
store i64 %9, i64* %3
br label %10
10: ; preds = %14, %1
%11 = call i64 (...) @clock()
%12 = load i64, i64* %3
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
br label %10
15: ; preds = %10
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @Wait(double %0) {
%2 = tail call i64 (...) @clock()
%3 = sitofp i64 %2 to double
%4 = load double, double* @CLOCKS_PER_SEC
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double %3)
%6 = fptosi double %5 to i64
br label %7
7: ; preds = %7, %1
%8 = tail call i64 (...) @clock()
%9 = icmp slt i64 %8, %6
br i1 %9, label %7, label %10
10: ; preds = %7
ret void
}
/* Variables and functions */
int BBM_INIT(void *);
int mtv_init(void *hDevice) {
  int res = 1;
  res = BBM_INIT(hDevice);
  return res;
}


x86 assembly (clang, -O0):
<mtv_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <BBM_INIT@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtv_init>:
jmp    1030 <BBM_INIT@plt>

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

LLVM IR (-O2):
define i32 @mtv_init(i8* %0) {
%2 = tail call i32 @BBM_INIT(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr,
                "usage: mrcp [-p] f1 f2; or: mrcp [-rp] [-M munge_socket] [-P "
                "service_port] f1 ... fn directory\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [96 x i8] c"usage: mrcp [-p] f1 f2; or: mrcp [-rp] [-M munge_socket] [-P service_port] f1 ... fn directory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [96 x i8] c"usage: mrcp [-p] f1 f2; or: mrcp [-rp] [-M munge_socket] [-P service_port] f1 ... fn directory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ UART_OutChar(int);
void UART_OutUDec(uint32_t n) {
  if (n >= 10) {
    UART_OutUDec(n / 10);
    n = n % 10;
  }
  UART_OutChar(n + '0');
}


x86 assembly (clang, -O0):
<UART_OutUDec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     1155 <UART_OutUDec+0x35>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <UART_OutUDec@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x30,%edi
call   1030 <UART_OutChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_OutUDec>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
cmp    $0xa,%edi
jl     1147 <UART_OutUDec+0x27>
mov    %ebp,%eax
mov    $0xcccccccd,%ebx
imul   %rax,%rbx
shr    $0x23,%rbx
mov    %ebx,%edi
call   1040 <UART_OutUDec@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%eax
sub    %eax,%ebp
add    $0x30,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <UART_OutChar@plt>

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

LLVM IR (-O2):
define void @UART_OutUDec(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = udiv i32 %0, 10
tail call void @UART_OutUDec(i32 %4)
%5 = urem i32 %0, 10
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = add nsw i32 %7, 48
%9 = tail call i32 @UART_OutChar(i32 %8)
ret void
}
int passwd_cb(char *buf, int size, int rwflag, void *userdata) { return 0; }


x86 assembly (clang, -O0):
<passwd_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @passwd_cb(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @passwd_cb(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS)
    stream = stdout;
  fprintf(stream, "Usage: %s [POLICY] [PRIORITY] [COMMAND]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [41 x i8] c"Usage: %s [POLICY] [PRIORITY] [COMMAND]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [41 x i8] c"Usage: %s [POLICY] [PRIORITY] [COMMAND]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
void set_underline(int flag) { flag = flag; }


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

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

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

LLVM IR (-O2):
define void @set_underline(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("argv[] required!\n");
    exit(0);
  }
  printf("You input: ");
  printf(argv[1]);
  printf("Down\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1153 <main+0x33>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jle    115e <main+0x2e>
mov    %rsi,%rbx
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str.1 = [12 x i8] c"You input: \00"
@str = [5 x i8] c"Down\00"
@str.3 = [17 x i8] c"argv[] required!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @printf(i8* dereferenceable(1) %10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void cmx_atomic_smp_wmb(void) {
  __asm__ volatile("sfence" : : : "memory");
  return;
}


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

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

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

LLVM IR (-O2):
define void @cmx_atomic_smp_wmb() {
tail call void asm sideeffect "sfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
extern const char *drflac_version_string(void) {
  return "0"
         "."
         "12"
         "."
         "29";
}


x86 assembly (clang, -O0):
<drflac_version_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<drflac_version_string>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"0.12.29\00"
define i8* @drflac_version_string() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"0.12.29\00"
define i8* @drflac_version_string() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double logfac(int);
double logbino(int n, int k) {
  double top, bot;
  top = logfac(n);
  bot = logfac(n - k) + logfac(k);
  return top - bot;
}


x86 assembly (clang, -O0):
<logbino>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <logfac@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <logfac@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <logfac@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbino>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <logfac@plt>
movsd  %xmm0,0x10(%rsp)
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <logfac@plt>
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%edi
call   1030 <logfac@plt>
addsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @logbino(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = call double @logfac(i32 %7)
store double %8, double* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call double @logfac(i32 %11)
%13 = load i32, i32* %4
%14 = call double @logfac(i32 %13)
%15 = fadd double %12, %14
store double %15, double* %6
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fsub double %16, %17
ret double %18
}

LLVM IR (-O2):
define double @logbino(i32 %0, i32 %1) {
%3 = tail call double @logfac(i32 %0)
%4 = sub nsw i32 %0, %1
%5 = tail call double @logfac(i32 %4)
%6 = tail call double @logfac(i32 %1)
%7 = fadd double %5, %6
%8 = fsub double %3, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void the_while() {
  int counter = 0;
  while (counter < 5) {
    printf("OK counter is now equal to: %d\n", counter);
    counter = counter + 1;
  }
}


x86 assembly (clang, -O0):
<the_while>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1146 <the_while+0x36>
mov    -0x4(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <the_while+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<the_while>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"OK counter is now equal to: %d\0A\00"
define void @the_while() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 5
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"OK counter is now equal to: %d\0A\00"
define void @the_while() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CAN0_IRQ0_DriverIRQHandler();
__attribute__((weak)) void CAN0_IRQ0_IRQHandler(void) {
  CAN0_IRQ0_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @CAN0_IRQ0_IRQHandler() {
%1 = tail call i32 (...) @CAN0_IRQ0_DriverIRQHandler()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t BinIOFormatByteCount(char const *);
int /*<<< orphan*/ fread(void *, size_t, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(void *);
void *malloc(size_t);
int /*<<< orphan*/ vsunpackf(void *, char const *, int /*<<< orphan*/);
void vfunpackf(FILE *file, const char *format, va_list args) {
  size_t n_bytes = BinIOFormatByteCount(format);
  void *buffer = malloc(n_bytes);
  fread(buffer, n_bytes, 1, file);
  vsunpackf(buffer, format, args);
  free(buffer);
}


x86 assembly (clang, -O0):
<vfunpackf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <BinIOFormatByteCount@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1070 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1060 <vsunpackf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfunpackf>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %rsi,%r12
mov    %rdi,%r15
mov    %rsi,%rdi
call   1050 <BinIOFormatByteCount@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r14d,%edx
call   1060 <vsunpackf@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @vfunpackf(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i8*, i8** %5
%10 = call i64 @BinIOFormatByteCount(i8* %9)
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = load i64, i64* %7
%15 = load i32*, i32** %4
%16 = call i32 @fread(i8* %13, i64 %14, i32 1, i32* %15)
%17 = load i8*, i8** %8
%18 = load i8*, i8** %5
%19 = load i32, i32* %6
%20 = call i32 @vsunpackf(i8* %17, i8* %18, i32 %19)
%21 = load i8*, i8** %8
%22 = call i32 @free(i8* %21)
ret void
}

LLVM IR (-O2):
define void @vfunpackf(i32* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i64 @BinIOFormatByteCount(i8* %1)
%5 = tail call i8* @malloc(i64 %4)
%6 = tail call i32 @fread(i8* %5, i64 %4, i32 1, i32* %0)
%7 = tail call i32 @vsunpackf(i8* %5, i8* %1, i32 %2)
%8 = tail call i32 @free(i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disconnectSock();
int disconnect_server() {
  disconnectSock();
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @disconnect_server() {
%1 = call i32 (...) @disconnectSock()
ret i32 0
}

LLVM IR (-O2):
define i32 @disconnect_server() {
%1 = tail call i32 (...) @disconnectSock()
ret i32 0
}