xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ raizq(double);
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ system(char *);
int main(void) {
  double n;
  scanf("%lf", &n);
  printf("%.2lf \n", raizq(n));
  system("main");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1060 <raizq@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    0xe95(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1060 <raizq@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xe9d(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"%.2lf \0A\00"
@.str.2 = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca double
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%3 = load double, double* %1
%4 = call i32 @raizq(double %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"%.2lf \0A\00"
@.str.2 = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @raizq(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void libaes_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @libaes_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(void **);
int /*<<< orphan*/ free(void *);
void xfree(void **ptr) {
  assert(ptr);
  if (ptr != NULL) {
    free(*ptr);
    *ptr = NULL;
  }
}


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
cmpq   $0x0,-0x8(%rbp)
je     1157 <xfree+0x37>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfree>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
test   %rbx,%rbx
je     113d <xfree+0x1d>
mov    (%rbx),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @xfree(i8** %0) {
%2 = tail call i32 @assert(i8** %0)
%3 = icmp eq i8** %0, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i8*, i8** %0
%6 = tail call i32 @free(i8* %5)
store i8* null, i8** %0
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRAA_get(void) { return U_WMRCORENONE_get("U_WMRAA"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRAA\00"
define i32 @U_WMRAA_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
double Slater_1S_5S(double, double, double);
double Slater_5S_1S(double rij, double xii, double xij) {
  return Slater_1S_5S(rij, xij, xii);
}


x86 assembly (clang, -O0):
<Slater_5S_1S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
call   1030 <Slater_1S_5S@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Slater_5S_1S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <Slater_1S_5S@plt>

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

LLVM IR (-O2):
define double @Slater_5S_1S(double %0, double %1, double %2) {
%4 = tail call double @Slater_1S_5S(double %0, double %2, double %1)
ret double %4
}
double cal(double a, double b) { return (b - a) / a * b; }


x86 assembly (clang, -O0):
<cal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cal>:
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @cal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double %5, %6
%8 = load double, double* %3
%9 = fdiv double %7, %8
%10 = load double, double* %4
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @cal(double %0, double %1) {
%3 = fsub double %1, %0
%4 = fdiv double %3, %0
%5 = fmul double %4, %1
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char const *, int /*<<< orphan*/ *);
void var_num_from_name(const char *pattern, char *name, uint16_t *num) {
  sscanf(name, pattern, num);
}


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

x86 assembly (clang, -O2):
<var_num_from_name>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <sscanf@plt>

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

LLVM IR (-O2):
define void @var_num_from_name(i8* nocapture %0, i8* nocapture %1, i32* %2) {
%4 = tail call i32 @sscanf(i8* %1, i8* %0, i32* %2)
ret void
}
void rtv_DisableFicInterrupt(unsigned int nOpenedSubChNum) {}


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

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

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

LLVM IR (-O2):
define void @rtv_DisableFicInterrupt(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/
AsyncPowerManagerP__0__ResourceDefaultOwner__immediateRequested();
void ArbiterP__0__ResourceDefaultOwner__immediateRequested(void) {
  AsyncPowerManagerP__0__ResourceDefaultOwner__immediateRequested();
}


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

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

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

LLVM IR (-O2):
define void @ArbiterP__0__ResourceDefaultOwner__immediateRequested() {
%1 = tail call i32 (...) @AsyncPowerManagerP__0__ResourceDefaultOwner__immediateRequested()
ret void
}
inputline(s) char *s;
{ scanf("%s", s); }


x86 assembly (clang, -O0):
<inputline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputline>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <scanf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @inputline(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @inputline(i8* %0) {
%2 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
void dprint(int debuglevel, char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @dprint(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ printf(char *);
void fail() {
  printf("Sorry, that's not the right flag.\n");
  _exit(1);
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Sorry, that's not the right flag.\0A\00"
define void @fail() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [34 x i8] c"Sorry, that's not the right flag.\00"
define void @fail() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int fabs(double const);
double sin(double);
double Sinc(const double x) {
  if (fabs(x) < 1e-15)
    return 1.0;
  return sin((3.14159265358979323846) * x) / ((3.14159265358979323846) * x);
}


x86 assembly (clang, -O0):
<Sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xebd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    115f <Sinc+0x3f>
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1187 <Sinc+0x67>
movsd  0xea1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  0xe8f(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sinc>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    114d <Sinc+0x2d>
movsd  (%rsp),%xmm0
mulsd  0xecc(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xeab(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i32 @fabs(double %4)
%6 = sitofp i32 %5 to double
%7 = fcmp olt double %6, 1.000000e-15
br i1 %7, label %8, label %9
8: ; preds = %1
store double 1.000000e+00, double* %2
br label %16
9: ; preds = %1
%10 = load double, double* %3
%11 = fmul double 0x400921FB54442D18, %10
%12 = call double @sin(double %11)
%13 = load double, double* %3
%14 = fmul double 0x400921FB54442D18, %13
%15 = fdiv double %12, %14
store double %15, double* %2
br label %16
16: ; preds = %9, %8
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @Sinc(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = fmul double %0, 0x400921FB54442D18
%6 = tail call double @sin(double %5)
%7 = fdiv double %6, %5
br label %8
8: ; preds = %1, %4
%9 = phi double [ %7, %4 ], [ 1.000000e+00, %1 ]
ret double %9
}
/* Variables and functions */
int get_unit_number();
int test() { return get_unit_number(); }


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

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

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

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @get_unit_number()
ret i32 %1
}
int is_txt(char c) {
  if (c < ' ' || c == 0x7f)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_txt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jl     1124 <is_txt+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x7f,%eax
jne    1130 <is_txt+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <is_txt+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_txt>:
add    $0xe0,%dil
xor    %eax,%eax
cmp    $0x5f,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_txt(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 32
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 127
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 0, i32* %2
br label %13
12: ; preds = %7
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_txt(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *strdup(char *);
void http_table_column_add_tid(char **buff, pthread_t val) {
  char tmp[100];
  sprintf(tmp, "%10lu", val);
  *buff = strdup(tmp);
}


x86 assembly (clang, -O0):
<http_table_column_add_tid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_table_column_add_tid>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xecd(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <sprintf@plt>
mov    %r14,%rdi
call   1040 <strdup@plt>
mov    %rax,(%rbx)
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%10lu\00"
define void @http_table_column_add_tid(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca [100 x i8]
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%10 = call i8* @strdup(i8* %9)
%11 = load i8**, i8*** %3
store i8* %10, i8** %11
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%10lu\00"
define void @http_table_column_add_tid(i8** nocapture writeonly %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i8* @strdup(i8* %4)
store i8* %6, i8** %0
ret void
}
char *strerror(int num) {
  extern char *sys_errlist[];
  extern int sys_nerr;
  if (num < 0 || num > sys_nerr)
    return "Unknown system error / illegal error number";
  return sys_errlist[num];
}


x86 assembly (clang, -O0):
<strerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1123 <strerror+0x23>
mov    -0xc(%rbp),%eax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%eax
jle    1133 <strerror+0x33>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <strerror+0x46>
movslq -0xc(%rbp),%rcx
mov    0x2eba(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strerror>:
lea    0xef9(%rip),%rax
test   %edi,%edi
js     1123 <strerror+0x23>
mov    0x2ed6(%rip),%rcx
cmp    %edi,(%rcx)
jl     1123 <strerror+0x23>
mov    %edi,%eax
mov    0x2ed9(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
@sys_nerr = external global i32
@.str = [44 x i8] c"Unknown system error / illegal error number\00"
@sys_errlist = external global [0 x i8*]
define i8* @strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = load i32, i32* @sys_nerr
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %6, %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
11: ; preds = %6
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %13
%15 = load i8*, i8** %14
store i8* %15, i8** %2
br label %16
16: ; preds = %11, %10
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@sys_nerr = external global i32
@.str = [44 x i8] c"Unknown system error / illegal error number\00"
@sys_errlist = external global [0 x i8*]
define i8* @strerror(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = load i32, i32* @sys_nerr
%4 = icmp slt i32 %3, %0
%5 = select i1 %2, i1 true, i1 %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = zext i32 %0 to i64
%8 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %7
%9 = load i8*, i8** %8
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %11
}
char kernel__Char__succ(char self) {
  char var;
  char var1;
  var1 = self + 1;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Char__succ>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Char__succ>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @kernel__Char__succ(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
%9 = load i8, i8* %4
store i8 %9, i8* %3
br label %10
10: ; preds = %1
%11 = load i8, i8* %3
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @kernel__Char__succ(i8 signext %0) {
%2 = add i8 %0, 1
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ f(int *, double *);
int *malloc(int);
int main() {
  int *p = malloc(sizeof(double));
  *p = 1;
  f(p, (double *)p);
  if (*p != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <f@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
je     1178 <main+0x48>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0x1,(%rax)
mov    %rax,%rdi
mov    %rax,%rsi
call   1040 <f@plt>
cmpl   $0x1,(%rbx)
jne    1158 <main+0x28>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @malloc(i32 8)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
store i32 1, i32* %4
%5 = load i32*, i32** %2
%6 = load i32*, i32** %2
%7 = bitcast i32* %6 to double*
%8 = call i32 @f(i32* %5, double* %7)
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 8)
store i32 1, i32* %1
%2 = bitcast i32* %1 to double*
%3 = tail call i32 @f(i32* %1, double* %2)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
int maximum1() {
  int a = 0;
  int b = 0;
  int c = 0;
  return ((a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c));
}


x86 assembly (clang, -O0):
<maximum1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    114d <maximum1+0x4d>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113c <maximum1+0x3c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <maximum1+0x42>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1170 <maximum1+0x70>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1164 <maximum1+0x64>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    116a <maximum1+0x6a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @maximum1() {
ret i32 0
}
/* Variables and functions */
int HECMW_partlex_next_token();
int HECMW_partlex_skip_line(void) {
  int token;
  while ((token = HECMW_partlex_next_token())) {
    if (token == 1001)
      break;
  }
  return token;
}


x86 assembly (clang, -O0):
<HECMW_partlex_skip_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <HECMW_partlex_next_token@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1142 <HECMW_partlex_skip_line+0x32>
cmpl   $0x3e9,-0x4(%rbp)
jne    113d <HECMW_partlex_skip_line+0x2d>
jmp    1142 <HECMW_partlex_skip_line+0x32>
jmp    1118 <HECMW_partlex_skip_line+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HECMW_partlex_skip_line>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <HECMW_partlex_next_token@plt>
cmp    $0x3e9,%eax
je     1132 <HECMW_partlex_skip_line+0x22>
test   %eax,%eax
jne    1120 <HECMW_partlex_skip_line+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @HECMW_partlex_skip_line() {
%1 = alloca i32
br label %2
2: ; preds = %9, %0
%3 = call i32 (...) @HECMW_partlex_next_token()
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 1001
br i1 %7, label %8, label %9
8: ; preds = %5
br label %10
9: ; preds = %5
br label %2
10: ; preds = %8, %2
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @HECMW_partlex_skip_line() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @HECMW_partlex_next_token()
switch i32 %2, label %1 [
i32 1001, label %3
i32 0, label %3
]
3: ; preds = %1, %1
ret i32 %2
}
int poll(struct pollfd *fds, int nfds, int timeout) { return -1; }


x86 assembly (clang, -O0):
<poll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pollfd = type opaque
define i32 @poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = alloca %struct.pollfd*
%5 = alloca i32
%6 = alloca i32
store %struct.pollfd* %0, %struct.pollfd** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
%struct.pollfd = type opaque
define i32 @poll(%struct.pollfd* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
main() {
  static int a = 0;
  assert(a == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,0x2f06(%rip)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@main.a = internal global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @main.a
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int signed_high_prod(unsigned int, unsigned int);
unsigned unsigned_high_prod(unsigned x, unsigned y) {
  int w = sizeof(unsigned) << 3;
  int sign_x = x >> (w - 1);
  int sign_y = y >> (w - 1);
  int signed_prod = signed_high_prod(x, y);
  return signed_prod + sign_x * (int)y + sign_y * (int)x;
}


x86 assembly (clang, -O0):
<unsigned_high_prod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
shr    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
shr    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <signed_high_prod@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_high_prod>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <signed_high_prod@plt>
mov    %ebp,%ecx
sar    $0x1f,%ecx
and    %ebx,%ecx
sar    $0x1f,%ebx
and    %ebp,%ebx
add    %ecx,%ebx
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @unsigned_high_prod(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 32, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = sub nsw i32 %10, 1
%12 = lshr i32 %9, %11
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, 1
%16 = lshr i32 %13, %15
store i32 %16, i32* %7
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i32 @signed_high_prod(i32 %17, i32 %18)
store i32 %19, i32* %8
%20 = load i32, i32* %8
%21 = load i32, i32* %6
%22 = load i32, i32* %4
%23 = mul nsw i32 %21, %22
%24 = add nsw i32 %20, %23
%25 = load i32, i32* %7
%26 = load i32, i32* %3
%27 = mul nsw i32 %25, %26
%28 = add nsw i32 %24, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @unsigned_high_prod(i32 %0, i32 %1) {
%3 = tail call i32 @signed_high_prod(i32 %0, i32 %1)
%4 = icmp slt i32 %0, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = icmp slt i32 %1, 0
%7 = select i1 %6, i32 %0, i32 0
%8 = add i32 %7, %5
%9 = add i32 %8, %3
ret i32 %9
}
void nop() { ; }


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

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

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

LLVM IR (-O2):
define void @nop() {
ret void
}
void foo741(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo741(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void SysExcIntClear(uint32_t ui32IntFlags) {
  (*((volatile uint32_t *)(0x400F900C))) = ui32IntFlags;
}


x86 assembly (clang, -O0):
<SysExcIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400f900c,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntClear>:
mov    %edi,0x400f900c
ret

LLVM IR (-O0):
define void @SysExcIntClear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074761740 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysExcIntClear(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1074761740 to i32*)
ret void
}
void uart_write_str(const char *s) { (void)s; }


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

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

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

LLVM IR (-O2):
define void @uart_write_str(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\nConvert a PPM/PNM file to a C array\n"
         "\nUSAGE: ppm2c [-o newfile.c] [-i identifier] image.ppm\n\n"
         "\t-o newfile.c      write array into 'newfile.c'\n"
         "\t                  (defaults to image filename + \".c\")\n"
         "\t-i identifier     use 'identifier' as name of array variable\n"
         "\t                  (defaults to \"image\")\n"
         "\t image.bit        file name of image to convert\n\n");
}


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

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

LLVM IR (-O0):
@.str = [350 x i8] c"\0AConvert a PPM/PNM file to a C array\0A\0AUSAGE: ppm2c [-o newfile.c] [-i identifier] image.ppm\0A\0A\09-o newfile.c write array into 'newfile.c'\0A\09 (defaults to image filename + \22.c\22)\0A\09-i identifier use 'identifier' as name of array variable\0A\09 (defaults to \22image\22)\0A\09 image.bit file name of image to convert\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([350 x i8], [350 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [349 x i8] c"\0AConvert a PPM/PNM file to a C array\0A\0AUSAGE: ppm2c [-o newfile.c] [-i identifier] image.ppm\0A\0A\09-o newfile.c write array into 'newfile.c'\0A\09 (defaults to image filename + \22.c\22)\0A\09-i identifier use 'identifier' as name of array variable\0A\09 (defaults to \22image\22)\0A\09 image.bit file name of image to convert\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([349 x i8], [349 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct dhcpmsg {
  int dummy;
};

/* Variables and functions */
size_t get_dhcp_opt(struct dhcpmsg const *const, int, int /*<<< orphan*/ *,
                    size_t);
size_t get_option_clientid(const struct dhcpmsg *const packet, char *cbuf,
                           size_t clen) {
  if (clen < 1)
    return 0;
  return get_dhcp_opt(packet, 0x3d, (uint8_t *)cbuf, clen);
}


x86 assembly (clang, -O0):
<get_option_clientid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jae    113c <get_option_clientid+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1156 <get_option_clientid+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x3d,%esi
call   1030 <get_dhcp_opt@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_option_clientid>:
mov    %rdx,%rcx
test   %rdx,%rdx
je     1125 <get_option_clientid+0x15>
mov    %rsi,%rdx
mov    $0x3d,%esi
jmp    1030 <get_dhcp_opt@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.dhcpmsg = type { i32 }
define i64 @get_option_clientid(%struct.dhcpmsg* %0, i8* %1, i64 %2) {
%4 = alloca i64
%5 = alloca %struct.dhcpmsg*
%6 = alloca i8*
%7 = alloca i64
store %struct.dhcpmsg* %0, %struct.dhcpmsg** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i64, i64* %7
%9 = icmp ult i64 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %3
store i64 0, i64* %4
br label %17
11: ; preds = %3
%12 = load %struct.dhcpmsg*, %struct.dhcpmsg** %5
%13 = load i8*, i8** %6
%14 = bitcast i8* %13 to i32*
%15 = load i64, i64* %7
%16 = call i64 @get_dhcp_opt(%struct.dhcpmsg* %12, i32 61, i32* %14, i64 %15)
store i64 %16, i64* %4
br label %17
17: ; preds = %11, %10
%18 = load i64, i64* %4
ret i64 %18
}

LLVM IR (-O2):
%struct.dhcpmsg = type { i32 }
define i64 @get_option_clientid(%struct.dhcpmsg* %0, i8* %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = bitcast i8* %1 to i32*
%7 = tail call i64 @get_dhcp_opt(%struct.dhcpmsg* %0, i32 61, i32* %6, i64 %2)
br label %8
8: ; preds = %3, %5
%9 = phi i64 [ %7, %5 ], [ 0, %3 ]
ret i64 %9
}
/* Variables and functions */
int binaryGame();
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (binaryGame() == 1) {
    printf("everything OK\n");
  } else {
    printf("ERROR \n");
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <binaryGame@plt>
cmp    $0x1,%eax
jne    1150 <main+0x30>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <main+0x3c>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <binaryGame@plt>
cmp    $0x1,%eax
lea    0xed5(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"everything OK\0A\00"
@.str.1 = [8 x i8] c"ERROR \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @binaryGame()
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"ERROR \00"
@str.2 = [14 x i8] c"everything OK\00"
define i32 @main() {
%1 = tail call i32 (...) @binaryGame()
%2 = icmp eq i32 %1, 1
%3 = select i1 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
double sqrt(double);
double dv2_length(double *a) { return sqrt(a[0] * a[0] + a[1] * a[1]); }


x86 assembly (clang, -O0):
<dv2_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv2_length>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1134 <dv2_length+0x24>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @dv2_length(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = call double @sqrt(double %16)
ret double %17
}

LLVM IR (-O2):
define double @dv2_length(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = tail call double @sqrt(double %6)
ret double %7
}
long CDRgetTD(unsigned char track, unsigned char *buffer) {
  buffer[2] = 0;
  buffer[1] = 2;
  buffer[0] = 0;
  return 0;
}


x86 assembly (clang, -O0):
<CDRgetTD>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CDRgetTD>:
movb   $0x0,0x2(%rsi)
movw   $0x200,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @CDRgetTD(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 2
store i8 0, i8* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 2, i8* %8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 0, i8* %10
ret i64 0
}

LLVM IR (-O2):
define i64 @CDRgetTD(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 2
store i8 0, i8* %3
%4 = getelementptr inbounds i8, i8* %1, i64 1
store i8 2, i8* %4
store i8 0, i8* %1
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
void putstr(const char *str) {
  const char *i;
  for (i = str; *i; i++)
    putchar(*i);
}


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <putstr+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <putstr+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <putstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
OP(dd, fc) { op_fc(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_fc()
ret i32 undef
}
int crawlcanconect(struct collectionFormat *collection) {}


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

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

LLVM IR (-O0):
%struct.collectionFormat = type opaque
define i32 @crawlcanconect(%struct.collectionFormat* %0) {
%2 = alloca i32
%3 = alloca %struct.collectionFormat*
store %struct.collectionFormat* %0, %struct.collectionFormat** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.collectionFormat = type opaque
define i32 @crawlcanconect(%struct.collectionFormat* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ gptp(char *, int);
void g_sigset_t() { gptp("sigset_t", sizeof(sigset_t)); }


x86 assembly (clang, -O0):
<g_sigset_t>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <gptp@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"sigset_t\00"
define void @g_sigset_t() {
%1 = call i32 @gptp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"sigset_t\00"
define void @g_sigset_t() {
%1 = tail call i32 @gptp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
void g_markup_printf_escaped() {}


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

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

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

LLVM IR (-O2):
define void @g_markup_printf_escaped() {
ret void
}
double jac_chain_nm2_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<jac_chain_nm2_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <jac_chain_nm2_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <jac_chain_nm2_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <jac_chain_nm2_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <jac_chain_nm2_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm2_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @jac_chain_nm2_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @jac_chain_nm2_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
char Encrypt(char);
char GetInput();
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char plaintext = GetInput();
  char code = Encrypt(plaintext);
  printf("%c", code);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <GetInput@plt>
movsbl %al,%edi
call   1050 <Encrypt@plt>
movsbl %al,%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call signext i8 (...) @GetInput()
%2 = tail call signext i8 @Encrypt(i8 signext %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %2)
ret i32 0
}
void ScaleRowDown2_Any_NEON() {}


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

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

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

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