xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n"
          "\n"
          "Print out a classic greeting\n"
          "\n"
          "Options:\n"
          "  -n, --name NAME     Name to use for the greeting\n"
          "  -c, --casual        Use casual greeting\n"
          "  -h, --help          Show this help message\n"
          "      --verbose       Print a verbose greeting\n"
          "      --terse         Print a terse greeting (default)\n"
          "      --foo           Option without argument\n"
          "      --bar BAR       Option with argument\n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [390 x i8] c"Usage: %s [options]\0A\0APrint out a classic greeting\0A\0AOptions:\0A -n, --name NAME Name to use for the greeting\0A -c, --casual Use casual greeting\0A -h, --help Show this help message\0A --verbose Print a verbose greeting\0A --terse Print a terse greeting (default)\0A --foo Option without argument\0A --bar BAR Option with argument\0A\00"
define void @usage(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8**
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([390 x i8], [390 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [390 x i8] c"Usage: %s [options]\0A\0APrint out a classic greeting\0A\0AOptions:\0A -n, --name NAME Name to use for the greeting\0A -c, --casual Use casual greeting\0A -h, --help Show this help message\0A --verbose Print a verbose greeting\0A --terse Print a terse greeting (default)\0A --foo Option without argument\0A --bar BAR Option with argument\0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([390 x i8], [390 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int test_isPositive(int x) { return x > 0; }


x86 assembly (clang, -O0):
<test_isPositive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isPositive>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @test_isPositive(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_isPositive(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void ff_hevc_put_hevc_uni_qpel_hv8_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv8_8_sse4() {
ret void
}
void debug_dummy(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_dummy() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void usage(FILE *fp, const char *name) {
  fprintf(fp, "%s: [...] [-h] files\n", name);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"%s: [...] [-h] files\0A\00"
define void @usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%s: [...] [-h] files\0A\00"
define void @usage(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double roundl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<roundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @roundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @roundl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ begin(char *);
int /*<<< orphan*/ getLibraryParameterValueReal(char *);
int /*<<< orphan*/ lineWidth(int /*<<< orphan*/);
int /*<<< orphan*/ setLayer(int);
int /*<<< orphan*/ setWireBend(int);
void beginComponentOutline(int layer) {
  setLayer(layer);
  setWireBend(2);
  begin("WIRE");
  lineWidth(getLibraryParameterValueReal("componentLineWidth"));
}


x86 assembly (clang, -O0):
<beginComponentOutline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <setLayer@plt>
mov    $0x2,%edi
call   1070 <setWireBend@plt>
lea    0xe8c(%rip),%rdi
call   1050 <begin@plt>
lea    0xe85(%rip),%rdi
call   1060 <getLibraryParameterValueReal@plt>
mov    %eax,%edi
call   1040 <lineWidth@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beginComponentOutline>:
push   %rax
call   1030 <setLayer@plt>
mov    $0x2,%edi
call   1070 <setWireBend@plt>
lea    0xe99(%rip),%rdi
call   1050 <begin@plt>
lea    0xe92(%rip),%rdi
call   1060 <getLibraryParameterValueReal@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lineWidth@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"WIRE\00"
@.str.1 = [19 x i8] c"componentLineWidth\00"
define void @beginComponentOutline(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @setLayer(i32 %3)
%5 = call i32 @setWireBend(i32 2)
%6 = call i32 @begin(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @getLibraryParameterValueReal(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @lineWidth(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"WIRE\00"
@.str.1 = [19 x i8] c"componentLineWidth\00"
define void @beginComponentOutline(i32 %0) {
%2 = tail call i32 @setLayer(i32 %0)
%3 = tail call i32 @setWireBend(i32 2)
%4 = tail call i32 @begin(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @getLibraryParameterValueReal(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @lineWidth(i32 %5)
ret void
}
int test_RetZeroOk() { return 0; }


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

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

LLVM IR (-O0):
define i32 @test_RetZeroOk() {
ret i32 0
}

LLVM IR (-O2):
define i32 @test_RetZeroOk() {
ret i32 0
}
float *Vector3Scale(const float v[3], float scalar, float result[3]) {
  result[0] = v[0] * scalar;
  result[1] = v[1] * scalar;
  result[2] = v[2] * scalar;
  return result;
}


x86 assembly (clang, -O0):
<Vector3Scale>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vector3Scale>:
mov    %rsi,%rax
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rsi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
ret

LLVM IR (-O0):
define float* @Vector3Scale(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 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float, float* %5
%11 = fmul float %9, %10
%12 = load float*, float** %6
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float, float* %5
%18 = fmul float %16, %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
%21 = load float*, float** %4
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = load float, float* %5
%25 = fmul float %23, %24
%26 = load float*, float** %6
%27 = getelementptr inbounds float, float* %26, i64 2
store float %25, float* %27
%28 = load float*, float** %6
ret float* %28
}

LLVM IR (-O2):
define float* @Vector3Scale(float* nocapture %0, float %1, float* returned writeonly %2) {
%4 = load float, float* %0
%5 = fmul float %4, %1
store float %5, float* %2
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %1
%9 = getelementptr inbounds float, float* %2, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 2
%11 = load float, float* %10
%12 = fmul float %11, %1
%13 = getelementptr inbounds float, float* %2, i64 2
store float %12, float* %13
ret float* %2
}
/* Variables and functions */
int /*<<< orphan*/ gui_mouse_event_end();
int gui_mouse_event_timer_cb(void *data, int remaining_calls) {
  (void)data;
  (void)remaining_calls;
  gui_mouse_event_end();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gui_mouse_event_timer_cb(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 (...) @gui_mouse_event_end()
ret i32 0
}

LLVM IR (-O2):
define i32 @gui_mouse_event_timer_cb(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gui_mouse_event_end()
ret i32 0
}
/* Variables and functions */
size_t __ESBMC_zero_string_length(char const *);
size_t strlen_strabs(const char *s) {
__ESBMC_HIDE:
  return __ESBMC_zero_string_length(s);
}


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

x86 assembly (clang, -O2):
<strlen_strabs>:
jmp    1030 <__ESBMC_zero_string_length@plt>

LLVM IR (-O0):
define i64 @strlen_strabs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
%5 = call i64 @__ESBMC_zero_string_length(i8* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @strlen_strabs(i8* %0) {
%2 = tail call i64 @__ESBMC_zero_string_length(i8* %0)
ret i64 %2
}
void __libc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @__libc_init() {
ret void
}
/* Variables and functions */
double drand48();
unsigned tossCoin(void) {
  if (drand48() >= 0.5)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<tossCoin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <drand48@plt>
movsd  0xed9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     113d <tossCoin+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <tossCoin+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tossCoin>:
push   %rax
xor    %eax,%eax
call   1030 <drand48@plt>
xor    %eax,%eax
ucomisd 0xede(%rip),%xmm0
setae  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tossCoin() {
%1 = alloca i32
%2 = call double (...) @drand48()
%3 = fcmp oge double %2, 5.000000e-01
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @tossCoin() {
%1 = tail call double (...) @drand48()
%2 = fcmp oge double %1, 5.000000e-01
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
void stub1(char, short);
void testClosureBSrV(void (*closure)(char, short), char a1, short a2) {
  if (closure != NULL)
    (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureBSrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %ax,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <testClosureBSrV+0x34>
mov    -0x8(%rbp),%rax
mov    -0x9(%rbp),%cl
movsbl %cl,%edi
movswl -0xc(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureBSrV>:
test   %rdi,%rdi
je     1111 <testClosureBSrV+0x11>
mov    %rdi,%rax
movsbl %sil,%edi
movswl %dx,%esi
jmp    *%rax
ret

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

LLVM IR (-O2):
define void @testClosureBSrV(void (i8, i16)* %0, i8 signext %1, i16 signext %2) {
%4 = icmp eq void (i8, i16)* %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
tail call void %0(i8 signext %1, i16 signext %2)
br label %6
6: ; preds = %5, %3
ret void
}
void viewvideo_start(void) {}


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

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

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

LLVM IR (-O2):
define void @viewvideo_start() {
ret void
}
struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
                              const char *dev_id, const char *con_id) {
  return (struct clk *)hw;
}


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

x86 assembly (clang, -O2):
<clk_hw_create_clk>:
mov    %rsi,%rax
ret

LLVM IR (-O0):
%struct.clk = type opaque
%struct.device = type opaque
%struct.clk_hw = type opaque
define %struct.clk* @clk_hw_create_clk(%struct.device* %0, %struct.clk_hw* %1, i8* %2, i8* %3) {
%5 = alloca %struct.device*
%6 = alloca %struct.clk_hw*
%7 = alloca i8*
%8 = alloca i8*
store %struct.device* %0, %struct.device** %5
store %struct.clk_hw* %1, %struct.clk_hw** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.clk_hw*, %struct.clk_hw** %6
%10 = bitcast %struct.clk_hw* %9 to %struct.clk*
ret %struct.clk* %10
}

LLVM IR (-O2):
%struct.clk = type opaque
%struct.device = type opaque
%struct.clk_hw = type opaque
define %struct.clk* @clk_hw_create_clk(%struct.device* nocapture readnone %0, %struct.clk_hw* readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = bitcast %struct.clk_hw* %1 to %struct.clk*
ret %struct.clk* %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-m] time\n"
                  "       atq [-V] [-q x] [-v]\n"
                  "       atrm [-V] [-q x] job ...\n"
                  "       batch [-V] [-f file] [-m]\n");
  exit(EXIT_FAILURE);
}


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    0x2e98(%rip),%rax
mov    (%rax),%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    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [136 x i8] c"Usage: at [-V] [-q x] [-f file] [-m] time\0A atq [-V] [-q x] [-v]\0A atrm [-V] [-q x] job ...\0A batch [-V] [-f file] [-m]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [136 x i8] c"Usage: at [-V] [-q x] [-f file] [-m] time\0A atq [-V] [-q x] [-v]\0A atrm [-V] [-q x] job ...\0A batch [-V] [-f file] [-m]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int suzerain_inorder_wavenumber_nyquist_index(int const, int const);
int suzerain_inorder_wavenumber_imagzero_index(const int N, const int i) {
  return (i == 0) + suzerain_inorder_wavenumber_nyquist_index(N, i);
}


x86 assembly (clang, -O0):
<suzerain_inorder_wavenumber_imagzero_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <suzerain_inorder_wavenumber_nyquist_index@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suzerain_inorder_wavenumber_imagzero_index>:
push   %rbx
mov    %esi,%ebx
call   1030 <suzerain_inorder_wavenumber_nyquist_index@plt>
cmp    $0x1,%ebx
adc    $0x0,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @suzerain_inorder_wavenumber_imagzero_index(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 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @suzerain_inorder_wavenumber_nyquist_index(i32 %8, i32 %9)
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @suzerain_inorder_wavenumber_imagzero_index(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @suzerain_inorder_wavenumber_nyquist_index(i32 %0, i32 %1)
%6 = add nsw i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int a20_test(int);
int a20_test_short(void) { return a20_test(32); }


x86 assembly (clang, -O0):
<a20_test_short>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1030 <a20_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<a20_test_short>:
mov    $0x20,%edi
jmp    1030 <a20_test@plt>

LLVM IR (-O0):
define i32 @a20_test_short() {
%1 = call i32 @a20_test(i32 32)
ret i32 %1
}

LLVM IR (-O2):
define i32 @a20_test_short() {
%1 = tail call i32 @a20_test(i32 32)
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int cmp(const void *ap, const void *bp) {
  uint64_t a = *(const int64_t *)ap, b = *(const int64_t *)bp;
  return a < b ? -1 : a > b ? 1 : 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    113d <cmp+0x3d>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1155 <cmp+0x55>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp slt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %23
17: ; preds = %2
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = icmp sgt i64 %18, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 1, i32 0
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ -1, %16 ], [ %22, %17 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = icmp sgt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ ping(char *);
int main() { ping("212.77.98.9"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"212.77.98.9\00"
define i32 @main() {
%1 = call i32 @ping(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"212.77.98.9\00"
define i32 @main() {
%1 = tail call i32 @ping(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(unsigned long);
void *realloc(void *, int);
void f4(int i) {
  unsigned long j = 10;
  void *ptr = malloc(j);
  if (i > 0)
    ptr = realloc(ptr, i);
  free(ptr);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0xa,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    116a <f4+0x3a>
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1040 <malloc@plt>
test   %ebx,%ebx
jle    114b <f4+0x1b>
mov    %rax,%rdi
mov    %ebx,%esi
call   1050 <realloc@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @f4(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i8*
store i32 %0, i32* %2
store i64 10, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i32, i32* %2
%12 = call i8* @realloc(i8* %10, i32 %11)
store i8* %12, i8** %4
br label %13
13: ; preds = %9, %1
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
define void @f4(i32 %0) {
%2 = tail call dereferenceable_or_null(10) i8* @malloc(i64 10)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @realloc(i8* %2, i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %5, %4 ], [ %2, %1 ]
%8 = tail call i32 @free(i8* %7)
ret void
}
/* Type definitions */
struct cmdline_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cmdline_args_release(struct cmdline_args_info *);
void cmdline_args_free(struct cmdline_args_info *args_info) {
  cmdline_args_release(args_info);
}


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

x86 assembly (clang, -O2):
<cmdline_args_free>:
jmp    1030 <cmdline_args_release@plt>

LLVM IR (-O0):
%struct.cmdline_args_info = type { i32 }
define void @cmdline_args_free(%struct.cmdline_args_info* %0) {
%2 = alloca %struct.cmdline_args_info*
store %struct.cmdline_args_info* %0, %struct.cmdline_args_info** %2
%3 = load %struct.cmdline_args_info*, %struct.cmdline_args_info** %2
%4 = call i32 @cmdline_args_release(%struct.cmdline_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.cmdline_args_info = type { i32 }
define void @cmdline_args_free(%struct.cmdline_args_info* %0) {
%2 = tail call i32 @cmdline_args_release(%struct.cmdline_args_info* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int cpu_read_long(int);
uint32_t cpu_read_word(uint32_t address) {
  uint32_t l = cpu_read_long(address & ~3);
  l >>= 16 - (address & 2) * 8;
  return l & 0xffff;
}


x86 assembly (clang, -O0):
<cpu_read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xfffffffc,%edi
call   1030 <cpu_read_long@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
shl    $0x3,%eax
mov    $0x10,%ecx
sub    %eax,%ecx
mov    -0x8(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_read_word>:
push   %rbx
mov    %edi,%ebx
and    $0xfffffffc,%edi
call   1030 <cpu_read_long@plt>
shl    $0x3,%ebx
not    %bl
and    $0x10,%bl
mov    %ebx,%ecx
sar    %cl,%eax
movzwl %ax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cpu_read_word(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, -4
%6 = call i32 @cpu_read_long(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = and i32 %7, 2
%9 = mul nsw i32 %8, 8
%10 = sub nsw i32 16, %9
%11 = load i32, i32* %3
%12 = ashr i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = and i32 %13, 65535
ret i32 %14
}

LLVM IR (-O2):
define i32 @cpu_read_word(i32 %0) {
%2 = and i32 %0, -4
%3 = tail call i32 @cpu_read_long(i32 %2)
%4 = shl i32 %0, 3
%5 = and i32 %4, 16
%6 = xor i32 %5, 16
%7 = ashr i32 %3, %6
%8 = and i32 %7, 65535
ret i32 %8
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int number_of_dobldobl_factors(int *nf) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(656, nf, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<number_of_dobldobl_factors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x290,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_dobldobl_factors>:
mov    %rdi,%rsi
mov    $0x290,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @number_of_dobldobl_factors(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 656, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @number_of_dobldobl_factors(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 656, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Variables and functions */
unsigned short GetWord320();
unsigned short getword() { return GetWord320(); }


x86 assembly (clang, -O0):
<getword>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GetWord320@plt>
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @getword() {
%1 = call zeroext i16 (...) @GetWord320()
ret i16 %1
}

LLVM IR (-O2):
define zeroext i16 @getword() {
%1 = tail call zeroext i16 (...) @GetWord320()
ret i16 %1
}
/* Variables and functions */
void *realloc(void *, size_t);
void *shds_realloc(void *data, size_t size) { return realloc(data, size); }


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

x86 assembly (clang, -O2):
<shds_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @shds_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
char *xconcat_strings(char *, char *, char *, int /*<<< orphan*/ *);
int test_concat_strings() {
  char *output = xconcat_strings("first ", "second ", "third", NULL);
  char *expected = "first second third";
  return !strcmp(output, expected);
}


x86 assembly (clang, -O0):
<test_concat_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xed1(%rip),%rsi
lea    0xedf(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <xconcat_strings@plt>
mov    %rax,-0x8(%rbp)
lea    0xebe(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_concat_strings>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed8(%rip),%rsi
lea    0xee6(%rip),%rdx
xor    %ecx,%ecx
call   1030 <xconcat_strings@plt>
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"first \00"
@.str.1 = [8 x i8] c"second \00"
@.str.2 = [6 x i8] c"third\00"
@.str.3 = [19 x i8] c"first second third\00"
define i32 @test_concat_strings() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @xconcat_strings(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* null)
store i8* %3, i8** %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i32 @strcmp(i8* %4, i8* %5)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"first \00"
@.str.1 = [8 x i8] c"second \00"
@.str.2 = [6 x i8] c"third\00"
@.str.3 = [19 x i8] c"first second third\00"
define i32 @test_concat_strings() {
%1 = tail call i8* @xconcat_strings(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* null)
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(19) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ resample_interpolate_generic(unsigned int const);
int resample_interpolate16(const unsigned int channel) {
  return (int)resample_interpolate_generic(channel);
}


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

x86 assembly (clang, -O2):
<resample_interpolate16>:
jmp    1030 <resample_interpolate_generic@plt>

LLVM IR (-O0):
define i32 @resample_interpolate16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @resample_interpolate_generic(i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @resample_interpolate16(i32 %0) {
%2 = tail call i64 @resample_interpolate_generic(i32 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int strilen(char chaine[]) {
  int i;
  char c;
  c = 1;
  while (c != 0) {
    c = chaine[i];
    i++;
  }
  return (i - 1);
}


x86 assembly (clang, -O0):
<strilen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x1,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x0,%eax
je     1135 <strilen+0x35>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0xd(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110c <strilen+0xc>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strilen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strilen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strilen(i8* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %6, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = add i64 %3, 1
%7 = icmp eq i8 %5, 0
br i1 %7, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
unsigned long i86ul_to_host(unsigned long ul) {
  unsigned long res = 0;
  int i;
  union {
    unsigned char c[4];
    unsigned long ul;
  } u;
  u.ul = ul;
  for (i = 3; i >= 0; i--)
    res = (res << 8) + u.c[i];
  return res;
}


x86 assembly (clang, -O0):
<i86ul_to_host>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     114f <i86ul_to_host+0x4f>
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
movslq -0x14(%rbp),%rcx
movzbl -0x20(%rbp,%rcx,1),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    111f <i86ul_to_host+0x1f>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i64 }
define i64 @i86ul_to_host(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
%5 = alloca %union.anon
store i64 %0, i64* %2
store i64 0, i64* %3
%6 = load i64, i64* %2
%7 = bitcast %union.anon* %5 to i64*
store i64 %6, i64* %7
store i32 3, i32* %4
br label %8
8: ; preds = %21, %1
%9 = load i32, i32* %4
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i64, i64* %3
%13 = shl i64 %12, 8
%14 = bitcast %union.anon* %5 to [4 x i8]*
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %14, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i64
%20 = add i64 %13, %19
store i64 %20, i64* %3
br label %21
21: ; preds = %11
%22 = load i32, i32* %4
%23 = add nsw i32 %22, -1
store i32 %23, i32* %4
br label %8
24: ; preds = %8
%25 = load i64, i64* %3
ret i64 %25
}

LLVM IR (-O2):
define i64 @i86ul_to_host(i64 %0) {
%2 = and i64 %0, 4294967295
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int hanoi(int);
int main() {
  int n = __VERIFIER_nondet_int();
  if (n < 1 || n > 31) {
    return 0;
  }
  int result = hanoi(n);
  if (result >= 0) {
    return 0;
  } else {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     115d <main+0x2d>
cmpl   $0x1f,-0x8(%rbp)
jle    1169 <main+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1196 <main+0x66>
mov    -0x8(%rbp),%edi
call   1050 <hanoi@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     118a <main+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1196 <main+0x66>
jmp    118f <main+0x5f>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
lea    -0x20(%rax),%ecx
cmp    $0xffffffe1,%ecx
jb     1152 <main+0x22>
mov    %eax,%edi
call   1050 <hanoi@plt>
test   %eax,%eax
jns    1152 <main+0x22>
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 31
br i1 %9, label %10, label %11
10: ; preds = %7, %0
store i32 0, i32* %1
br label %20
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 @hanoi(i32 %12)
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 0, i32* %1
br label %20
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = call i32 (...) @__VERIFIER_error()
br label %20
20: ; preds = %10, %16, %18
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = add i32 %1, -32
%3 = icmp ult i32 %2, -31
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = tail call i32 @hanoi(i32 %1)
%6 = icmp sgt i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 (...) @__VERIFIER_error()
br label %9
9: ; preds = %7, %4, %0
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint32_t signext_16(uint16_t in) {
  int out = (uint32_t)in;
  if (out & (1 << 15))
    return out | 0xffff0000;
  return out;
}


x86 assembly (clang, -O0):
<signext_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     112e <signext_16+0x2e>
mov    -0xc(%rbp),%eax
or     $0xffff0000,%eax
mov    %eax,-0x4(%rbp)
jmp    1134 <signext_16+0x34>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signext_16>:
mov    %edi,%eax
or     $0xffff0000,%eax
test   $0x8000,%edi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @signext_16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 32768
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %4
%11 = or i32 %10, -65536
store i32 %11, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @signext_16(i32 %0) {
%2 = and i32 %0, 32768
%3 = icmp eq i32 %2, 0
%4 = or i32 %0, -65536
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ swap16(int /*<<< orphan*/);
int read16(FILE *fp, uint16_t *res) {
  if (fread(res, sizeof *res, 1, fp) < 1) {
    return -1;
  }
  *res = swap16(*res);
  return 0;
}


x86 assembly (clang, -O0):
<read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
jge    115c <read16+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <read16+0x56>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1040 <swap16@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
test   %eax,%eax
jle    114a <read16+0x2a>
mov    (%rbx),%edi
call   1040 <swap16@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @read16(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fread(i32* %1, i32 4, i32 1, i32* %0)
%4 = icmp slt i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = tail call i32 @swap16(i32 %6)
store i32 %7, i32* %1
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Type definitions */
struct xsd_tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ xsd_mktmn(struct xsd_tm *, char *, char *,
                             int /*<<< orphan*/);
void xsd_mktm(struct xsd_tm *tmp, char *fmt, char *val) {
  xsd_mktmn(tmp, fmt, val, strlen(val));
}


x86 assembly (clang, -O0):
<xsd_mktm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1030 <xsd_mktmn@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsd_mktm>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <xsd_mktmn@plt>

LLVM IR (-O0):
%struct.xsd_tm = type { i32 }
define void @xsd_mktm(%struct.xsd_tm* %0, i8* %1, i8* %2) {
%4 = alloca %struct.xsd_tm*
%5 = alloca i8*
%6 = alloca i8*
store %struct.xsd_tm* %0, %struct.xsd_tm** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.xsd_tm*, %struct.xsd_tm** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = call i32 @xsd_mktmn(%struct.xsd_tm* %7, i8* %8, i8* %9, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.xsd_tm = type { i32 }
define void @xsd_mktm(%struct.xsd_tm* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %2)
%5 = tail call i32 @xsd_mktmn(%struct.xsd_tm* %0, i8* %1, i8* %2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tape390_crypt_usage(void) {
  printf("Usage: tape390_crypt [OPTIONS] [DEVICE]\n"
         "\n"
         "Provide encryption for "
         "tape devices.\n"
         "DEVICE is the node of the tape device (e.g. '/dev/ntibm0')\n"
         "\n"
         "-h, --help               Print this help, then exit\n"
         "-v, --version            Print version information, "
         "then exit\n"
         "-q, --query              Query information on encryption "
         "status and keys\n"
         "-k, --key value:type     Set encryption key(s)\n"
         "-d, --delimiter char     Specify character separating "
         "key value from key type\n"
         "-f, --force              Do not prompt user\n"
         "-e, --encryption on|off  Switch encryption on or off\n");
}


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

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

LLVM IR (-O0):
@.str = [548 x i8] c"Usage: tape390_crypt [OPTIONS] [DEVICE]\0A\0AProvide encryption for tape devices.\0ADEVICE is the node of the tape device (e.g. '/dev/ntibm0')\0A\0A-h, --help Print this help, then exit\0A-v, --version Print version information, then exit\0A-q, --query Query information on encryption status and keys\0A-k, --key value:type Set encryption key(s)\0A-d, --delimiter char Specify character separating key value from key type\0A-f, --force Do not prompt user\0A-e, --encryption on|off Switch encryption on or off\0A\00"
define void @tape390_crypt_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([548 x i8], [548 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [547 x i8] c"Usage: tape390_crypt [OPTIONS] [DEVICE]\0A\0AProvide encryption for tape devices.\0ADEVICE is the node of the tape device (e.g. '/dev/ntibm0')\0A\0A-h, --help Print this help, then exit\0A-v, --version Print version information, then exit\0A-q, --query Query information on encryption status and keys\0A-k, --key value:type Set encryption key(s)\0A-d, --delimiter char Specify character separating key value from key type\0A-f, --force Do not prompt user\0A-e, --encryption on|off Switch encryption on or off\00"
define void @tape390_crypt_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([547 x i8], [547 x i8]* @str, i64 0, i64 0))
ret void
}