xunge/DecIR huggingface dataset:
_Complex long double test_ccoshl(_Complex long double x) {
  return __builtin_ccoshl(x);
}


x86 assembly (clang, -O0):
<test_ccoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <ccoshl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ccoshl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <ccoshl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_ccoshl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_ccoshl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
/* Variables and functions */
long snprintf(int /*<<< orphan*/ *, int /*<<< orphan*/, char *, unsigned char);
long abstract_text___Byte_byte_to_s_len___impl(unsigned char self) {
  return snprintf(NULL, 0, "0x%02x", self);
}


x86 assembly (clang, -O0):
<abstract_text___Byte_byte_to_s_len___impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xed5(%rip),%rdx
movzbl -0x1(%rbp),%ecx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abstract_text___Byte_byte_to_s_len___impl>:
mov    %edi,%ecx
lea    0xee7(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"0x%02x\00"
define i64 @abstract_text___Byte_byte_to_s_len___impl(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext %3)
ret i64 %4
}

LLVM IR (-O2):
@.str = [7 x i8] c"0x%02x\00"
define i64 @abstract_text___Byte_byte_to_s_len___impl(i8 zeroext %0) {
%2 = tail call i64 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ pelkap_(double *, double *, int *);
void cpelkap(double *xmom, double *para, int *ifail) {
  pelkap_(xmom, para, ifail);
}


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

x86 assembly (clang, -O2):
<cpelkap>:
jmp    1030 <pelkap_@plt>

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

LLVM IR (-O2):
define void @cpelkap(double* %0, double* %1, i32* %2) {
%4 = tail call i32 @pelkap_(double* %0, double* %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_rec_d(double *, double);
double xil_fpo_rec_d(double a) {
  double res_d;
  xip_fpo_rec_d(&res_d, a);
  return res_d;
}


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

x86 assembly (clang, -O2):
<xil_fpo_rec_d>:
push   %rax
mov    %rsp,%rdi
call   1030 <xip_fpo_rec_d@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @xil_fpo_rec_d(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @xip_fpo_rec_d(double* %2, double %0)
%5 = load double, double* %2
ret double %5
}
/* Variables and functions */
double gammp(double, double);
double erff_(double x) {
  return x < 0.0 ? -gammp(0.5, x * x) : gammp(0.5, x * x);
}


x86 assembly (clang, -O0):
<erff_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1163 <erff_+0x53>
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xec3(%rip),%xmm0
call   1030 <gammp@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    117f <erff_+0x6f>
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe8b(%rip),%xmm0
call   1030 <gammp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erff_>:
sub    $0x18,%rsp
movapd %xmm0,(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xed7(%rip),%xmm0
call   1030 <gammp@plt>
movapd 0xeda(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd (%rsp),%xmm3
cmpltsd %xmm2,%xmm3
movapd %xmm3,%xmm2
andnpd %xmm0,%xmm2
andpd  %xmm1,%xmm3
orpd   %xmm2,%xmm3
movapd %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @erff_(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 %11
5: ; preds = %1
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = call double @gammp(double 5.000000e-01, double %8)
%10 = fneg double %9
br label %16
11: ; preds = %1
%12 = load double, double* %2
%13 = load double, double* %2
%14 = fmul double %12, %13
%15 = call double @gammp(double 5.000000e-01, double %14)
br label %16
16: ; preds = %11, %5
%17 = phi double [ %10, %5 ], [ %15, %11 ]
ret double %17
}

LLVM IR (-O2):
define double @erff_(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fmul double %0, %0
%4 = tail call double @gammp(double 5.000000e-01, double %3)
%5 = fneg double %4
%6 = select i1 %2, double %5, double %4
ret double %6
}
/* Variables and functions */
double atan(double);
double Atan(double a, double b) { return atan(a); }


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

x86 assembly (clang, -O2):
<Atan>:
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @Atan(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @atan(double %5)
ret double %6
}

LLVM IR (-O2):
define double @Atan(double %0, double %1) {
%3 = tail call double @atan(double %0)
ret double %3
}
int main() {
  int x = 1 << 32;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int color_offset_f2(int x, int y) { return ((y) - ((467 * (x)) / 447) - 25); }


x86 assembly (clang, -O0):
<color_offset_f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0x1d3,-0x4(%rbp),%eax
mov    $0x1bf,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
sub    $0x19,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f2>:
imul   $0x1d3,%edi,%eax
cltq
imul   $0x6d63140b,%rax,%rcx
shr    $0x20,%rcx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x8,%ecx
add    %eax,%ecx
lea    (%rsi,%rcx,1),%eax
add    $0xffffffe7,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 467, %6
%8 = sdiv i32 %7, 447
%9 = sub nsw i32 %5, %8
%10 = sub nsw i32 %9, 25
ret i32 %10
}

LLVM IR (-O2):
define i32 @color_offset_f2(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 467
%4 = sdiv i32 %3, -447
%5 = add i32 %1, -25
%6 = add i32 %5, %4
ret i32 %6
}
int invert(int x, int p, int n) {
  int y1 = ~0 << (p + 1);
  int y2 = ~(~0 << (p - n + 1));
  int y3 = ~(y1 | y2);
  int r = x ^ y3;
  return r;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
lea    0x1(%rsi),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
sub    %edx,%ecx
not    %eax
shr    %cl,%eax
shl    %cl,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %5
%12 = add nsw i32 %11, 1
%13 = shl i32 -1, %12
store i32 %13, i32* %7
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = sub nsw i32 %14, %15
%17 = add nsw i32 %16, 1
%18 = shl i32 -1, %17
%19 = xor i32 %18, -1
store i32 %19, i32* %8
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = or i32 %20, %21
%23 = xor i32 %22, -1
store i32 %23, i32* %9
%24 = load i32, i32* %4
%25 = load i32, i32* %9
%26 = xor i32 %24, %25
store i32 %26, i32* %10
%27 = load i32, i32* %10
ret i32 %27
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %1, 1
%5 = shl nsw i32 -1, %4
%6 = sub i32 %4, %2
%7 = shl nsw i32 -1, %6
%8 = xor i32 %5, -1
%9 = and i32 %7, %8
%10 = xor i32 %9, %0
ret i32 %10
}
void gtk_ui_manager_add_ui_from_file() {}


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

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

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

LLVM IR (-O2):
define void @gtk_ui_manager_add_ui_from_file() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fail(char *);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
scalar_t__ xmalloc(scalar_t__);
char *xstrdup(char *s) {
  if (!s || !s[0])
    fail("Null pointer or empty string passed to xstrdup()");
  return strcpy((char *)xmalloc(strlen(s) + 1), s);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1164 <xstrdup+0x24>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1170 <xstrdup+0x30>
lea    0xe95(%rip),%rdi
call   1040 <fail@plt>
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <xmalloc@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     114e <xstrdup+0xe>
cmpb   $0x0,(%rbx)
jne    115a <xstrdup+0x1a>
lea    0xeab(%rip),%rdi
call   1040 <fail@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <xmalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"Null pointer or empty string passed to xstrdup()\00"
define i8* @xstrdup(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 %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %5, %1
%11 = call i32 @fail(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %5
%13 = load i8*, i8** %2
%14 = call i64 @strlen(i8* %13)
%15 = add nsw i64 %14, 1
%16 = call i64 @xmalloc(i64 %15)
%17 = inttoptr i64 %16 to i8*
%18 = load i8*, i8** %2
%19 = call i8* @strcpy(i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
@.str = [49 x i8] c"Null pointer or empty string passed to xstrdup()\00"
define i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3, %1
%7 = tail call i32 @fail(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
%9 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%10 = add nsw i64 %9, 1
%11 = tail call i64 @xmalloc(i64 %10)
%12 = inttoptr i64 %11 to i8*
%13 = tail call i8* @strcpy(i8* dereferenceable(1) %12, i8* dereferenceable(1) %0)
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ sysctlbyname(char *, long *, size_t *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
long long cpucycles_x86tscfreq_persecond(void) {
  long result = 0;
  size_t resultlen = sizeof(long);
  sysctlbyname("machdep.tsc_freq", &result, &resultlen, 0, 0);
  return result;
}


x86 assembly (clang, -O0):
<cpucycles_x86tscfreq_persecond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x8,-0x10(%rbp)
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <sysctlbyname@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpucycles_x86tscfreq_persecond>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
movq   $0x8,0x10(%rsp)
lea    0xed3(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <sysctlbyname@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"machdep.tsc_freq\00"
define i64 @cpucycles_x86tscfreq_persecond() {
%1 = alloca i64
%2 = alloca i64
store i64 0, i64* %1
store i64 8, i64* %2
%3 = call i32 @sysctlbyname(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i32 0, i32 0)
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
@.str = [17 x i8] c"machdep.tsc_freq\00"
define i64 @cpucycles_x86tscfreq_persecond() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%4 = bitcast i64* %2 to i8*
store i64 8, i64* %2
%5 = call i32 @sysctlbyname(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i32 0, i32 0)
%6 = load i64, i64* %1
ret i64 %6
}
/* Variables and functions */
size_t firstlen(const char *s) {
  size_t len = 0;
  while (*s) {
    if (*s == '\n') {
      return len;
    } else {
      len++;
    }
    s++;
  }
  return len;
}


x86 assembly (clang, -O0):
<firstlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <firstlen+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    113a <firstlen+0x3a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <firstlen+0x5f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <firstlen+0x10>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<firstlen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1123 <firstlen+0x23>
cmp    $0xa,%cl
je     1123 <firstlen+0x23>
add    $0x1,%rax
jmp    1110 <firstlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @firstlen(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %8, %6 ]
%4 = phi i64 [ 0, %1 ], [ %7, %6 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %9
i8 10, label %9
]
6: ; preds = %2
%7 = add i64 %4, 1
%8 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
9: ; preds = %2, %2
ret i64 %4
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void setup_root_dir(uint8_t *base) {
  strcpy((char *)(base + 0x001), "Hugo");
  base[0x4cc] = '$';
  base[0x4d6] = 2;
  base[0x4d9] = '$';
  strcpy((char *)(base + 0x4fb), "Hugo");
}


x86 assembly (clang, -O0):
<setup_root_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movb   $0x24,0x4cc(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2,0x4d6(%rax)
mov    -0x8(%rbp),%rax
movb   $0x24,0x4d9(%rax)
mov    -0x8(%rbp),%rdi
add    $0x4fb,%rdi
lea    0xe9d(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_root_dir>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x1,%rdi
lea    0xede(%rip),%r14
mov    %r14,%rsi
call   1030 <strcpy@plt>
movb   $0x24,0x4cc(%rbx)
movb   $0x2,0x4d6(%rbx)
movb   $0x24,0x4d9(%rbx)
add    $0x4fb,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Hugo\00"
define void @setup_root_dir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1228
store i8 36, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1238
store i8 2, i8* %9
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1241
store i8 36, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1275
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"Hugo\00"
define void @setup_root_dir(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds i8, i8* %0, i64 1228
store i8 36, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 1238
store i8 2, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 1241
store i8 36, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 1275
%8 = tail call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fib(int /*<<< orphan*/);
int main(void) { return fib(0); }


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

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <fib@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fib(i32 0)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fib(i32 0)
ret i32 %1
}
/* Type definitions */
struct S {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ non_existent(struct S *, int);
void hooray4(struct S *p) { non_existent(p, 3); }


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

x86 assembly (clang, -O2):
<hooray4>:
mov    $0x3,%esi
jmp    1030 <non_existent@plt>

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

LLVM IR (-O2):
%struct.S = type { i32 }
define void @hooray4(%struct.S* %0) {
%2 = tail call i32 @non_existent(%struct.S* %0, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _dictStringKeyValCopyHTValDestructor(void *privdata, void *val) {
  ((void)privdata);
  free((void *)val);
}


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

x86 assembly (clang, -O2):
<_dictStringKeyValCopyHTValDestructor>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @_dictStringKeyValCopyHTValDestructor(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
signed short signedshort_ignoring_signedint(signed short x, signed int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshort_ignoring_signedint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @signedshort_ignoring_signedint(i16 signext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshort_ignoring_signedint(i16 returned signext %0, i32 %1) {
ret i16 %0
}
int bit_diff(int a, int b) {
  int xor = a ^ b;
  int count = 0;
  while (xor) {
    count += xor&1;
    xor >>= 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<bit_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113e <bit_diff+0x3e>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111a <bit_diff+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_diff>:
xor    %eax,%eax
xor    %esi,%edi
je     1120 <bit_diff+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bit_diff+0x10>
ret

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

LLVM IR (-O2):
define i32 @bit_diff(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %6, %8
%10 = ashr i32 %7, 1
%11 = icmp ult i32 %7, 2
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %9, %5 ]
ret i32 %13
}
int at_client_initializing() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @at_client_initializing() {
ret i32 0
}
void arch_numa_init(void) {}


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

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

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

LLVM IR (-O2):
define void @arch_numa_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("Line: %d\n", 15);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0xf,%esi
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    $0xf,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"Line: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 15)
ret i32 0
}
/* Variables and functions */
int dir_exists(char *);
int dmi_board_check() { return dir_exists("/sys/class/dmi/id/"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"/sys/class/dmi/id/\00"
define i32 @dmi_board_check() {
%1 = call i32 @dir_exists(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [19 x i8] c"/sys/class/dmi/id/\00"
define i32 @dmi_board_check() {
%1 = tail call i32 @dir_exists(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int sd_protected(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sd_protected() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(const char *message) {
  fprintf(stderr, "ERROR: %s\n", message);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ slot;

/* Variables and functions */
void *htdel(void **ptable, void *slot, size_t size) {
  if (!*ptable || !slot)
    return NULL;
  (*(const char **)((slot) + 0)) = NULL;
  return slot;
}


x86 assembly (clang, -O0):
<htdel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1129 <htdel+0x29>
cmpq   $0x0,-0x18(%rbp)
jne    1136 <htdel+0x36>
movq   $0x0,-0x8(%rbp)
jmp    1149 <htdel+0x49>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htdel>:
xor    %eax,%eax
test   %rsi,%rsi
je     1117 <htdel+0x17>
cmpq   $0x0,(%rdi)
je     1117 <htdel+0x17>
movq   $0x0,(%rsi)
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @htdel(i8** nocapture %0, i8* writeonly %1, i64 %2) {
%4 = load i8*, i8** %0
%5 = icmp ne i8* %4, null
%6 = icmp ne i8* %1, null
%7 = and i1 %6, %5
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = bitcast i8* %1 to i8**
store i8* null, i8** %9
br label %10
10: ; preds = %3, %8
%11 = phi i8* [ %1, %8 ], [ null, %3 ]
ret i8* %11
}
void XdbeAllocateBackBufferName() {}


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

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

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

LLVM IR (-O2):
define void @XdbeAllocateBackBufferName() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Write_LCD(int, char *, int);
void Set_19200(int fd) {
  char cmd[] = {254, 57, 0x0F, 253};
  Write_LCD(fd, cmd, 4);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <Write_LCD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
movl   $0xfd0f39fe,0x4(%rsp)
fd
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <Write_LCD@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.Set_19200.cmd = [4 x i8] c"\FE9\0F\FD"
define void @Set_19200(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%7 = call i32 @Write_LCD(i32 %5, i8* %6, i32 4)
ret void
}

LLVM IR (-O2):
define void @Set_19200(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 -49333762, i32* %2
%4 = call i32 @Write_LCD(i32 %0, i8* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void showVersion() { printf("mqttc-bridge version %s\n", "1.0beta"); }


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

x86 assembly (clang, -O2):
<showVersion>:
lea    0xee9(%rip),%rdi
lea    0xefb(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"mqttc-bridge version %s\0A\00"
@.str.1 = [8 x i8] c"1.0beta\00"
define void @showVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"mqttc-bridge version %s\0A\00"
@.str.1 = [8 x i8] c"1.0beta\00"
define void @showVersion() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
bool dmc_unrar_unicode_utf16_is_lead_surrogate(uint16_t code) {
  return (code >= 0xD800) && (code <= 0xDBFF);
}


x86 assembly (clang, -O0):
<dmc_unrar_unicode_utf16_is_lead_surrogate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xd800,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <dmc_unrar_unicode_utf16_is_lead_surrogate+0x26>
cmpl   $0xdbff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmc_unrar_unicode_utf16_is_lead_surrogate>:
and    $0xfffffc00,%edi
xor    %eax,%eax
cmp    $0xd800,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @dmc_unrar_unicode_utf16_is_lead_surrogate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 55296
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 56319
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @dmc_unrar_unicode_utf16_is_lead_surrogate(i32 %0) {
%2 = and i32 %0, -1024
%3 = icmp eq i32 %2, 55296
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ errorf(char *, scalar_t__);
int /*<<< orphan*/ exit(int);
char *strdup(char const *);
scalar_t__ strlen(char const *);
char *safe_strdup(const char *s) {
  char *result = strdup(s);
  if (result == NULL) {
    errorf("Failed to reallocate %i bytes.\n", strlen(s) + 1);
    exit(127);
  }
  return result;
}


x86 assembly (clang, -O0):
<safe_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    118a <safe_strdup+0x4a>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
add    $0x1,%rsi
lea    0xe85(%rip),%rdi
call   1040 <errorf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1060 <strdup@plt>
test   %rax,%rax
je     1150 <safe_strdup+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rsi
lea    0xe9d(%rip),%rdi
call   1040 <errorf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Failed to reallocate %i bytes.\0A\00"
define i8* @safe_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i32 @errorf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = call i32 @exit(i32 127)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [32 x i8] c"Failed to reallocate %i bytes.\0A\00"
define noalias i8* @safe_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = add nsw i64 %5, 1
%7 = tail call i32 @errorf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = tail call i32 @exit(i32 127)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ interface_cleanup();
int /*<<< orphan*/ interface_closeClient();
int /*<<< orphan*/ interface_closeLibrary();
void cleanup() {
  interface_closeClient();
  interface_cleanup();
  interface_closeLibrary();
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <interface_closeClient@plt>
mov    $0x0,%al
call   1050 <interface_cleanup@plt>
mov    $0x0,%al
call   1040 <interface_closeLibrary@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
xor    %eax,%eax
call   1030 <interface_closeClient@plt>
xor    %eax,%eax
call   1050 <interface_cleanup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <interface_closeLibrary@plt>

LLVM IR (-O0):
define void @cleanup() {
%1 = call i32 (...) @interface_closeClient()
%2 = call i32 (...) @interface_cleanup()
%3 = call i32 (...) @interface_closeLibrary()
ret void
}

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @interface_closeClient()
%2 = tail call i32 (...) @interface_cleanup()
%3 = tail call i32 (...) @interface_closeLibrary()
ret void
}
int sumOfNumberInString(const char *str) {
  int sum = 0;
  int i = 0;
  while (str[i] != '\0') {
    sum += str[i] - '0';
    i++;
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumOfNumberInString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114e <sumOfNumberInString+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <sumOfNumberInString+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumOfNumberInString>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <sumOfNumberInString+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %ecx,%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <sumOfNumberInString+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sumOfNumberInString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = add i32 %7, -48
%10 = add i32 %9, %8
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %16
}
int iscntrl(int c) { return ((c < ' ') || (c == 0x7f)); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <iscntrl+0x20>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setl   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp slt i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void gtk_text_view_forward_display_line() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_forward_display_line() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void signal_handler(int signal) {
  static int count = 10;
  printf("SIGALRM received\n");
  if (--count <= 0)
    exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ef3(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2eea(%rip)
cmp    $0x0,%eax
jg     115d <signal_handler+0x3d>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2efd(%rip),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x2ef4(%rip)
cmp    $0x1,%eax
jle    1143 <signal_handler+0x23>
pop    %rax
ret
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@signal_handler.count = internal global i32 10
@.str = [18 x i8] c"SIGALRM received\0A\00"
@EXIT_SUCCESS = global i32 0
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @signal_handler.count
%5 = add nsw i32 %4, -1
store i32 %5, i32* @signal_handler.count
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EXIT_SUCCESS
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@signal_handler.count = internal unnamed_addr global i32 10
@EXIT_SUCCESS = global i32 0
@str = [17 x i8] c"SIGALRM received\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @signal_handler.count
%4 = add nsw i32 %3, -1
store i32 %4, i32* @signal_handler.count
%5 = icmp slt i32 %3, 2
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EXIT_SUCCESS
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ portout(int, int /*<<< orphan*/);
void portout16(uint16_t portnum, uint16_t value) {
  portout(portnum, (uint8_t)value);
  portout(portnum + 1, (uint8_t)(value >> 8));
}


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

x86 assembly (clang, -O2):
<portout16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <portout@plt>
add    $0x1,%ebp
sar    $0x8,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <portout@plt>

LLVM IR (-O0):
define void @portout16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @portout(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %4
%11 = ashr i32 %10, 8
%12 = call i32 @portout(i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @portout16(i32 %0, i32 %1) {
%3 = tail call i32 @portout(i32 %0, i32 %1)
%4 = add nsw i32 %0, 1
%5 = ashr i32 %1, 8
%6 = tail call i32 @portout(i32 %4, i32 %5)
ret void
}