xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int nid;
};
typedef TYPE_1__ ASN1_STRING_TABLE;

/* Variables and functions */
int table_cmp(const ASN1_STRING_TABLE *a, const ASN1_STRING_TABLE *b) {
  return a->nid - b->nid;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
define i32 @table_cmp(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
define i32 @table_cmp(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
struct ctache_string {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ctache_string *);
void ctache_string_destroy(void *data) {
  struct ctache_string *string = (struct ctache_string *)(data);
  free(string);
}


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

x86 assembly (clang, -O2):
<ctache_string_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ctache_string = type { i32 }
define void @ctache_string_destroy(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.ctache_string*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.ctache_string*
store %struct.ctache_string* %5, %struct.ctache_string** %3
%6 = load %struct.ctache_string*, %struct.ctache_string** %3
%7 = call i32 @free(%struct.ctache_string* %6)
ret void
}

LLVM IR (-O2):
%struct.ctache_string = type { i32 }
define void @ctache_string_destroy(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.ctache_string*
%3 = tail call i32 @free(%struct.ctache_string* %2)
ret void
}
void sethostent(int stayopen) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<sethostent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xedc(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1132 <sethostent+0x22>

x86 assembly (clang, -O2):
<sethostent>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <sethostent+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.sethostent = [11 x i8] c"sethostent\00"
define void @sethostent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.sethostent, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.sethostent = [11 x i8] c"sethostent\00"
define void @sethostent(i32 %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.sethostent, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
double unityPDF(double r) { return r; }


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

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

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

LLVM IR (-O2):
define double @unityPDF(double returned %0) {
ret double %0
}
/* Variables and functions */
char *shell_like_escape(char const *, int);
char *escaped_arg_hook(const char match[]) {
  return shell_like_escape(match, 1);
}


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

x86 assembly (clang, -O2):
<escaped_arg_hook>:
mov    $0x1,%esi
jmp    1030 <shell_like_escape@plt>

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

LLVM IR (-O2):
define i8* @escaped_arg_hook(i8* %0) {
%2 = tail call i8* @shell_like_escape(i8* %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ test_and_print(int);
int main() {
  test_and_print(1000);
  test_and_print(1000000);
  test_and_print(1000000000);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test_and_print(i32 1000)
%3 = call i32 @test_and_print(i32 1000000)
%4 = call i32 @test_and_print(i32 1000000000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_and_print(i32 1000)
%2 = tail call i32 @test_and_print(i32 1000000)
%3 = tail call i32 @test_and_print(i32 1000000000)
ret i32 0
}
int test_imm_90uint8_reg(unsigned char val) {
  return ((val) & (0x90 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_90uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x90,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_90uint8_reg>:
test   $0x90,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_90uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -112
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ challenge_go_off();
int /*<<< orphan*/ challenge_run();
int /*<<< orphan*/ challenge_startup();
int main() {
  challenge_startup();
  challenge_run();
  challenge_go_off();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <challenge_startup@plt>
mov    $0x0,%al
call   1030 <challenge_run@plt>
mov    $0x0,%al
call   1050 <challenge_go_off@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <challenge_startup@plt>
xor    %eax,%eax
call   1030 <challenge_run@plt>
xor    %eax,%eax
call   1050 <challenge_go_off@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @challenge_startup()
%3 = call i32 (...) @challenge_run()
%4 = call i32 (...) @challenge_go_off()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @challenge_startup()
%2 = tail call i32 (...) @challenge_run()
%3 = tail call i32 (...) @challenge_go_off()
ret i32 0
}
void keyd_endtrans(struct onak_dbctx *dbctx) { return; }


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

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

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

LLVM IR (-O2):
%struct.onak_dbctx = type opaque
define void @keyd_endtrans(%struct.onak_dbctx* nocapture %0) {
ret void
}
/* Variables and functions */
float __ocml_j0_f32(float);
float j0f(float x) { return __ocml_j0_f32(x); }


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

x86 assembly (clang, -O2):
<j0f>:
jmp    1030 <__ocml_j0_f32@plt>

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

LLVM IR (-O2):
define float @j0f(float %0) {
%2 = tail call float @__ocml_j0_f32(float %0)
ret float %2
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= "
         "REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=четвер, 5 "
         "вересня 2013 21:54:48 +0300 BUILD=DEBUG CPU=ux500 USING_UMP=1 "
         "USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 "
         "USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= "
         "MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 "
         "USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=0";
}


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

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

LLVM IR (-O0):
@.str = [458 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D1\87\D0\B5\D1\82\D0\B2\D0\B5\D1\80, 5 \D0\B2\D0\B5\D1\80\D0\B5\D1\81\D0\BD\D1\8F 2013 21:54:48 +0300 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([458 x i8], [458 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [458 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D1\87\D0\B5\D1\82\D0\B2\D0\B5\D1\80, 5 \D0\B2\D0\B5\D1\80\D0\B5\D1\81\D0\BD\D1\8F 2013 21:54:48 +0300 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([458 x i8], [458 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
float M_PI;
float sin(float);
float sinc(float x) {
  if (x == 0)
    return 1;
  x *= M_PI;
  return sin(x) / x;
}


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1146 <sinc+0x36>
jp     1146 <sinc+0x36>
movss  0xec4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116f <sinc+0x5f>
mov    0x2e9b(%rip),%rax
movss  (%rax),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1125 <sinc+0x15>
jp     1125 <sinc+0x15>
movss  0xedd(%rip),%xmm0
pop    %rax
ret
mov    0x2ebc(%rip),%rax
mulss  (%rax),%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <sin@plt>
divss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @sinc(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp oeq float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 1.000000e+00, float* %2
br label %15
7: ; preds = %1
%8 = load float, float* @M_PI
%9 = load float, float* %3
%10 = fmul float %9, %8
store float %10, float* %3
%11 = load float, float* %3
%12 = call float @sin(float %11)
%13 = load float, float* %3
%14 = fdiv float %12, %13
store float %14, float* %2
br label %15
15: ; preds = %7, %6
%16 = load float, float* %2
ret float %16
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @sinc(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load float, float* @M_PI
%5 = fmul float %4, %0
%6 = tail call float @sin(float %5)
%7 = fdiv float %6, %5
br label %8
8: ; preds = %1, %3
%9 = phi float [ %7, %3 ], [ 1.000000e+00, %1 ]
ret float %9
}
void i2d_OCSP_RESPDATA(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_OCSP_RESPDATA() {
ret void
}
int CompDblAsc(const void *pv1, const void *pv2) {
  double d1 = *(double *)pv1;
  double d2 = *(double *)pv2;
  if (d1 > d2) {
    return +1;
  } else if (d1 < d2) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<CompDblAsc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1142 <CompDblAsc+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1169 <CompDblAsc+0x69>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1162 <CompDblAsc+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <CompDblAsc+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompDblAsc>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CompDblAsc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp olt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @CompDblAsc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ LCD_WriteCommand(int);
void LCD_HideCursor(void) { LCD_WriteCommand(0x08 | 0x04); }


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

x86 assembly (clang, -O2):
<LCD_HideCursor>:
mov    $0xc,%edi
jmp    1030 <LCD_WriteCommand@plt>

LLVM IR (-O0):
define void @LCD_HideCursor() {
%1 = call i32 @LCD_WriteCommand(i32 12)
ret void
}

LLVM IR (-O2):
define void @LCD_HideCursor() {
%1 = tail call i32 @LCD_WriteCommand(i32 12)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void grade(char *id) {
  id[3] = '\0';
  int number = atoi(id + 1);
  if (11 <= number && number <= 14) {
    printf("B%d\n", 15 - number);
  } else {
    puts("ERROR");
  }
  return;
}


x86 assembly (clang, -O0):
<grade>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,0x3(%rax)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1050 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    $0xb,%eax
cmp    -0xc(%rbp),%eax
jg     1185 <grade+0x55>
cmpl   $0xe,-0xc(%rbp)
jg     1185 <grade+0x55>
mov    $0xf,%esi
sub    -0xc(%rbp),%esi
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
jmp    1191 <grade+0x61>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grade>:
push   %rax
movb   $0x0,0x3(%rdi)
add    $0x1,%rdi
call   1050 <atoi@plt>
lea    -0xb(%rax),%ecx
cmp    $0x3,%ecx
ja     115a <grade+0x2a>
mov    $0xf,%esi
sub    %eax,%esi
lea    0xeac(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>
lea    0xea4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"B%d\0A\00"
@.str.1 = [6 x i8] c"ERROR\00"
define void @grade(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
store i8 0, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = tail call i32 @atoi(i8* %3)
%5 = add i32 %4, -11
%6 = icmp ult i32 %5, 4
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = sub nuw nsw i32 15, %4
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %12
10: ; preds = %1
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_copy_into_quaddobl_systems_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(473, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_copy_into_quaddobl_systems_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1d9,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_copy_into_quaddobl_systems_container>:
mov    $0x1d9,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_copy_into_quaddobl_systems_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 473, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_copy_into_quaddobl_systems_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 473, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void wbinvd(void) { __asm__ volatile("wbinvd"); }


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

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

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

LLVM IR (-O2):
define void @wbinvd() {
tail call void asm sideeffect "wbinvd", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void ubitmap_clear_bit(void *b, size_t num) {
  ((uint8_t *)b)[(num) / 8] &= ~(0x80 >> ((num) % 8));
}


x86 assembly (clang, -O0):
<ubitmap_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x80,%edx
sar    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ubitmap_clear_bit>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0xffffff7f,%eax
sar    %cl,%eax
shr    $0x3,%rsi
and    %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @ubitmap_clear_bit(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = urem i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = ashr i32 128, %7
%9 = xor i32 %8, -1
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to i32*
%12 = load i64, i64* %4
%13 = udiv i64 %12, 8
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = and i32 %15, %9
store i32 %16, i32* %14
ret void
}

LLVM IR (-O2):
define void @ubitmap_clear_bit(i8* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 7
%5 = ashr i32 -129, %4
%6 = bitcast i8* %0 to i32*
%7 = lshr i64 %1, 3
%8 = getelementptr inbounds i32, i32* %6, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %5
store i32 %10, i32* %8
ret void
}
int fakePrintf(const char *format, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fakePrintf(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Variables and functions */
int lower(char);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  printf("%c%c\n", lower('A'), lower('x'));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x41,%edi
call   1040 <lower@plt>
mov    %eax,-0x8(%rbp)
mov    $0x78,%edi
call   1040 <lower@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x41,%edi
call   1040 <lower@plt>
mov    %eax,%ebx
mov    $0x78,%edi
call   1040 <lower@plt>
lea    0xec2(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%c%c\0A\00"
define i32 @main() {
%1 = tail call i32 @lower(i8 signext 65)
%2 = tail call i32 @lower(i8 signext 120)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
void MUTEX_UNLOCK(struct brcmf_pub *drvr) {}


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

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

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

LLVM IR (-O2):
%struct.brcmf_pub = type opaque
define void @MUTEX_UNLOCK(%struct.brcmf_pub* nocapture %0) {
ret void
}
/* Variables and functions */
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
void strcpy_effects(char *x, char *y) {
  char a = x[0];
  if (strcpy(x, y) != x)
    (void)*(char *)0;
  if (strlen(x) != strlen(y))
    (void)*(char *)0;
  if (a != x[0])
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcpy_effects>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
cmp    -0x8(%rbp),%rax
je     1150 <strcpy_effects+0x30>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     1176 <strcpy_effects+0x56>
movsbl -0x11(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1189 <strcpy_effects+0x69>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_effects>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @strcpy_effects(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
store i8 %8, i8* %5
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i8* @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
%13 = icmp ne i8* %11, %12
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = load i8, i8* null
br label %16
16: ; preds = %14, %2
%17 = load i8*, i8** %3
%18 = call i64 @strlen(i8* %17)
%19 = load i8*, i8** %4
%20 = call i64 @strlen(i8* %19)
%21 = icmp ne i64 %18, %20
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = load i8, i8* null
br label %24
24: ; preds = %22, %16
%25 = load i8, i8* %5
%26 = sext i8 %25 to i32
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %26, %30
br i1 %31, label %32, label %34
32: ; preds = %24
%33 = load i8, i8* null
br label %34
34: ; preds = %32, %24
ret void
}

LLVM IR (-O2):
define void @strcpy_effects(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strcpy(i8* %0, i8* dereferenceable(1) %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void th_main(char *arg) {
  int i;
  for (i = 0; i < 10; i++)
    print(arg);
}


x86 assembly (clang, -O0):
<th_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1144 <th_main+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <print@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <th_main+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<th_main>:
push   %rbx
mov    %rdi,%rbx
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <print@plt>

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

LLVM IR (-O2):
define void @th_main(i8* %0) {
%2 = tail call i32 @print(i8* %0)
%3 = tail call i32 @print(i8* %0)
%4 = tail call i32 @print(i8* %0)
%5 = tail call i32 @print(i8* %0)
%6 = tail call i32 @print(i8* %0)
%7 = tail call i32 @print(i8* %0)
%8 = tail call i32 @print(i8* %0)
%9 = tail call i32 @print(i8* %0)
%10 = tail call i32 @print(i8* %0)
%11 = tail call i32 @print(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Print(char *);
int /*<<< orphan*/ nap(int);
void handsfull(void) {
  Print("You can't carry anything more!");
  nap(2200);
}


x86 assembly (clang, -O0):
<handsfull>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <Print@plt>
mov    $0x898,%edi
call   1030 <nap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handsfull>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <Print@plt>
mov    $0x898,%edi
pop    %rax
jmp    1030 <nap@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"You can't carry anything more!\00"
define void @handsfull() {
%1 = call i32 @Print(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @nap(i32 2200)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"You can't carry anything more!\00"
define void @handsfull() {
%1 = tail call i32 @Print(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @nap(i32 2200)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeMem(void *Ptr) {
  if (Ptr != NULL) {
    free(Ptr);
  }
}


x86 assembly (clang, -O0):
<FreeMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <FreeMem+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeMem>:
test   %rdi,%rdi
je     111a <FreeMem+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @FreeMem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @FreeMem(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ccvt_420i(int, int, unsigned char *, unsigned char *, int);
void ccvt_420i_bgr24(int width, int height, void *src, void *dst) {
  ccvt_420i(width, height, (unsigned char *)src, (unsigned char *)dst, 2);
}


x86 assembly (clang, -O0):
<ccvt_420i_bgr24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x2,%r8d
call   1030 <ccvt_420i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccvt_420i_bgr24>:
mov    $0x2,%r8d
jmp    1030 <ccvt_420i@plt>

LLVM IR (-O0):
define void @ccvt_420i_bgr24(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @ccvt_420i(i32 %9, i32 %10, i8* %11, i8* %12, i32 2)
ret void
}

LLVM IR (-O2):
define void @ccvt_420i_bgr24(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @ccvt_420i(i32 %0, i32 %1, i8* %2, i8* %3, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __cbrtl(long double x) {
  fputs("__cbrtl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__cbrtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cbrtl>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [25 x i8] c"__cbrtl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__cbrtl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [25 x i8] c"__cbrtl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__cbrtl(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *mqc_DupString(char *old_str, char *free_this) {
  char *new_str = NULL;
  int ilen;
  ilen = strlen(old_str);
  new_str = malloc(ilen + 8);
  strcpy(new_str, old_str);
  if (free_this != (char *)NULL) {
    free(free_this);
  }
  return (new_str);
}


x86 assembly (clang, -O0):
<mqc_DupString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
add    $0x8,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
cmpq   $0x0,-0x10(%rbp)
je     1194 <mqc_DupString+0x54>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mqc_DupString>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1050 <strlen@plt>
lea    0x8(%rax),%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
test   %r14,%r14
je     1173 <mqc_DupString+0x33>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mqc_DupString(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 8
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = load i8*, i8** %4
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i8*, i8** %4
%19 = call i32 @free(i8* %18)
br label %20
20: ; preds = %17, %2
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @mqc_DupString(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, 8
%5 = tail call i8* @malloc(i32 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
%7 = icmp eq i8* %1, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @free(i8* %1)
br label %10
10: ; preds = %8, %2
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ search_replace_string(char *, char *, char *);
void unescape_string(char *s) { search_replace_string(s, "\\", ""); }


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

x86 assembly (clang, -O2):
<unescape_string>:
lea    0xee9(%rip),%rsi
lea    0xee3(%rip),%rdx
jmp    1030 <search_replace_string@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\\\00"
@.str.1 = [1 x i8] zeroinitializer
define void @unescape_string(i8* %0) {
%2 = tail call i32 @search_replace_string(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *, int, char const *);
void *malloc(size_t);
void *xmalloc_(size_t size, const char *file, int line, const char *func) {
  void *p = malloc(size);
  if (!p)
    err(1, "%s:%d (%s): malloc() failed", file, line, func);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    116b <xmalloc_+0x4b>
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    $0x1,%edi
lea    0xe9a(%rip),%rsi
call   1030 <err@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1157 <xmalloc_+0x37>
lea    0xebc(%rip),%rsi
mov    $0x1,%edi
mov    %rbp,%rdx
mov    %r15d,%ecx
mov    %r14,%r8
call   1030 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"%s:%d (%s): malloc() failed\00"
define noalias i8* @xmalloc_(i64 %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i8* @malloc(i64 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %3)
br label %9
9: ; preds = %7, %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ callmealias();
void c() { callmealias(); }


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

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

LLVM IR (-O0):
define void @c() {
%1 = call i32 (...) @callmealias()
ret void
}

LLVM IR (-O2):
define void @c() {
%1 = tail call i32 (...) @callmealias()
ret void
}
int c_procedure(char *msg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c_procedure(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
async_read() {
  printf("Your system does not support async I/O\n");
  exit(169);
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Your system does not support async I/O\0A\00"
define i32 @async_read() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 169)
unreachable
}

LLVM IR (-O2):
@str = [39 x i8] c"Your system does not support async I/O\00"
define i32 @async_read() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 169)
unreachable
}
int sg_snapshot() { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void setx_begin(FILE *buf) { fputc(0x02, buf); }


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

x86 assembly (clang, -O2):
<setx_begin>:
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define void @setx_begin(i32* nocapture %0) {
%2 = tail call i32 @fputc(i32 2, i32* %0)
ret void
}
void nntp_main_init(void) {}


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

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

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

LLVM IR (-O2):
define void @nntp_main_init() {
ret void
}
ddiscard(x) double x;
{}


x86 assembly (clang, -O0):
<ddiscard>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ddiscard(double %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int answer, result;
  answer = 100;
  result = answer - 10;
  printf("The result is %i\n", result + 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
add    $0x5,%esi
lea    0xec4(%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
mov    $0x5f,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The result is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 5
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The result is %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 95)
ret i32 0
}
int main(void) {
  typedef int T[5];
  struct S {
    int a;
    T b[5];
  };
  if (foo(5, 2, 3) !=
      __builtin_offsetof(struct S, b) + (5 * 2 + 3) * sizeof(int))
    abort();
  if (foo(5, 5, 5) !=
      __builtin_offsetof(struct S, b) + (5 * 5 + 5) * sizeof(int))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1040 <foo@plt>
cltq
cmp    $0x38,%rax
je     1156 <main+0x36>
call   1030 <abort@plt>
mov    $0x5,%edx
mov    %edx,%edi
mov    %edx,%esi
mov    $0x0,%al
call   1040 <foo@plt>
cltq
cmp    $0x7c,%rax
je     1177 <main+0x57>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x38,%eax
jne    115b <main+0x3b>
mov    $0x5,%edi
mov    $0x5,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x7c,%eax
jne    115b <main+0x3b>
xor    %eax,%eax
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @foo to i32 (i32, i32, i32, ...)*)(i32 5, i32 2, i32 3)
%3 = sext i32 %2 to i64
%4 = icmp ne i64 %3, 56
br i1 %4, label %5, label %6
5: ; preds = %0
unreachable
6: ; preds = %0
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @foo to i32 (i32, i32, i32, ...)*)(i32 5, i32 5, i32 5)
%8 = sext i32 %7 to i64
%9 = icmp ne i64 %8, 124
br i1 %9, label %10, label %11
10: ; preds = %6
unreachable
11: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @foo to i32 (i32, i32, i32, ...)*)(i32 5, i32 2, i32 3)
%2 = icmp eq i32 %1, 56
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
%5 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @foo to i32 (i32, i32, i32, ...)*)(i32 5, i32 5, i32 5)
%6 = icmp eq i32 %5, 124
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void @abort()
unreachable
8: ; preds = %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LoadScript(char *);
int /*<<< orphan*/ RunScript();
int /*<<< orphan*/ UnloadScript();
int main() {
  LoadScript("./example.script");
  RunScript();
  UnloadScript();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <LoadScript@plt>
xor    %eax,%eax
call   1050 <RunScript@plt>
xor    %eax,%eax
call   1030 <UnloadScript@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"./example.script\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @LoadScript(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @RunScript()
%4 = call i32 (...) @UnloadScript()
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"./example.script\00"
define i32 @main() {
%1 = tail call i32 @LoadScript(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @RunScript()
%3 = tail call i32 (...) @UnloadScript()
ret i32 0
}