xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ copysign(double, double);
float copysignf(float x, float y) {
  return (float)copysign((double)x, (double)y);
}


x86 assembly (clang, -O0):
<copysignf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <copysign@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copysignf>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <copysign@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @copysignf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i64 @copysign(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @copysignf(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i64 @copysign(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Variables and functions */
scalar_t__ log2(double);
float log2f(float s) { return (float)log2((double)s); }


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

x86 assembly (clang, -O2):
<log2f>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <log2@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @log2f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @log2(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @log2f(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @log2(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
size_t strlen(const char *s) {
  register const char *p = s;
  while (*p)
    p++;
  return p - s;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112e <strlen+0x2e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i64 @strlen(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 = %9, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %5
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i8*, i8** %2
%15 = ptrtoint i8* %13 to i64
%16 = ptrtoint i8* %14 to i64
%17 = sub i64 %15, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_xterm256_escape_sequence(uint8_t foreground, uint8_t background) {
  printf("\x1b[38;5;%dm\x1b[48;5;%dm", foreground, background);
}


x86 assembly (clang, -O0):
<print_xterm256_escape_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_xterm256_escape_sequence>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\1B[38;5;%dm\1B[48;5;%dm\00"
define void @print_xterm256_escape_sequence(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 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\1B[38;5;%dm\1B[48;5;%dm\00"
define void @print_xterm256_escape_sequence(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void bitonic_empty_function() {}


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

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

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

LLVM IR (-O2):
define void @bitonic_empty_function() {
ret void
}
_Bool call_b(_Bool (*func)(_Bool), _Bool arg) { return func(arg); }


x86 assembly (clang, -O0):
<call_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
and    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x9(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%edi
call   *%rax
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_b>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

LLVM IR (-O0):
define zeroext i1 @call_b(i1 (i1)* %0, i1 zeroext %1) {
%3 = alloca i1 (i1)*
%4 = alloca i8
store i1 (i1)* %0, i1 (i1)** %3
%5 = zext i1 %1 to i8
store i8 %5, i8* %4
%6 = load i1 (i1)*, i1 (i1)** %3
%7 = load i8, i8* %4
%8 = trunc i8 %7 to i1
%9 = call zeroext i1 %6(i1 zeroext %8)
ret i1 %9
}

LLVM IR (-O2):
define zeroext i1 @call_b(i1 (i1)* nocapture %0, i1 zeroext %1) {
%3 = tail call zeroext i1 %0(i1 zeroext %1)
ret i1 %3
}
/* Variables and functions */
double _f(int, int, double const, double const *);
double _n_3(const double omega, const double vertices_omegas[4]) {
  return (1.0 - _f(0, 3, omega, vertices_omegas) *
                    _f(1, 3, omega, vertices_omegas) *
                    _f(2, 3, omega, vertices_omegas));
}


x86 assembly (clang, -O0):
<_n_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <_f@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x3,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe59(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_n_3>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,0x18(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,0x10(%rsp)
mov    $0x2,%edi
mov    $0x3,%esi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  0x10(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe7f(%rip),%xmm0
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @_n_3(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 = load double*, double** %4
%7 = call double @_f(i32 0, i32 3, double %5, double* %6)
%8 = load double, double* %3
%9 = load double*, double** %4
%10 = call double @_f(i32 1, i32 3, double %8, double* %9)
%11 = fmul double %7, %10
%12 = load double, double* %3
%13 = load double*, double** %4
%14 = call double @_f(i32 2, i32 3, double %12, double* %13)
%15 = fneg double %11
%16 = call double @llvm.fmuladd.f64(double %15, double %14, double 1.000000e+00)
ret double %16
}

LLVM IR (-O2):
define double @_n_3(double %0, double* %1) {
%3 = tail call double @_f(i32 0, i32 3, double %0, double* %1)
%4 = tail call double @_f(i32 1, i32 3, double %0, double* %1)
%5 = tail call double @_f(i32 2, i32 3, double %0, double* %1)
%6 = fneg double %3
%7 = fmul double %4, %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double 1.000000e+00)
ret double %8
}
/* Variables and functions */
char *U_EMR_CORE5_set(int);
char *U_EMRREALIZEPALETTE_set(void) { return (U_EMR_CORE5_set(52)); }


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

x86 assembly (clang, -O2):
<U_EMRREALIZEPALETTE_set>:
mov    $0x34,%edi
jmp    1030 <U_EMR_CORE5_set@plt>

LLVM IR (-O0):
define i8* @U_EMRREALIZEPALETTE_set() {
%1 = call i8* @U_EMR_CORE5_set(i32 52)
ret i8* %1
}

LLVM IR (-O2):
define i8* @U_EMRREALIZEPALETTE_set() {
%1 = tail call i8* @U_EMR_CORE5_set(i32 52)
ret i8* %1
}
void psxdev_init(void) {}


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

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

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

LLVM IR (-O2):
define void @psxdev_init() {
ret void
}
int main(void) {
  (99 ^ ~99);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void empty(char *buf, int size) {
  while (buf[--size] = 0)
    ;
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
xor    %eax,%eax
test   $0x1,%al
jne    112e <empty+0x2e>
jmp    1133 <empty+0x33>
jmp    110b <empty+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
movslq %esi,%rax
movb   $0x0,-0x1(%rax,%rdi,1)
ret

LLVM IR (-O0):
define void @empty(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %11, %2
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
store i8 0, i8* %10
br i1 false, label %11, label %12
11: ; preds = %5
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @empty(i8* nocapture writeonly %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
ret void
}
/* Variables and functions */
scalar_t__ pow(int, int);
double sqrt(scalar_t__);
double N_sqrt(int m0, int n0, int m1, int n1) {
  return sqrt(pow((m0 - m1), 2) + pow((n0 - n1), 2));
}


x86 assembly (clang, -O0):
<N_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<N_sqrt>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %esi,%ebp
sub    %edx,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rbx
sub    %r14d,%ebp
mov    %ebp,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @N_sqrt(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = sub nsw i32 %9, %10
%12 = call i64 @pow(i32 %11, i32 2)
%13 = load i32, i32* %6
%14 = load i32, i32* %8
%15 = sub nsw i32 %13, %14
%16 = call i64 @pow(i32 %15, i32 2)
%17 = add nsw i64 %12, %16
%18 = call double @sqrt(i64 %17)
ret double %18
}

LLVM IR (-O2):
define double @N_sqrt(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = tail call i64 @pow(i32 %5, i32 2)
%7 = sub nsw i32 %1, %3
%8 = tail call i64 @pow(i32 %7, i32 2)
%9 = add nsw i64 %8, %6
%10 = tail call double @sqrt(i64 %9)
ret double %10
}
void foo592(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo592(i32 %0) {
ret void
}
/* Variables and functions */
int get_front_ir_dist(int /*<<< orphan*/);
int get_side_ir_dist(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ set_motors(int, int);
void straight() {
  if (get_side_ir_dist(0) == get_front_ir_dist(0) - 4) {
    set_motors(50, 50);
    printf("STRAIGHT SL%d FL%d\n", get_side_ir_dist(0), get_front_ir_dist(0));
  }
}


x86 assembly (clang, -O0):
<straight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <get_side_ir_dist@plt>
mov    %eax,-0x4(%rbp)
xor    %edi,%edi
call   1050 <get_front_ir_dist@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
sub    $0x4,%ecx
cmp    %ecx,%eax
jne    1197 <straight+0x57>
mov    $0x32,%esi
mov    %esi,%edi
call   1060 <set_motors@plt>
xor    %edi,%edi
call   1040 <get_side_ir_dist@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1050 <get_front_ir_dist@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<straight>:
push   %rbx
xor    %edi,%edi
call   1040 <get_side_ir_dist@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1050 <get_front_ir_dist@plt>
add    $0xfffffffc,%eax
cmp    %eax,%ebx
jne    1188 <straight+0x48>
mov    $0x32,%edi
mov    $0x32,%esi
call   1060 <set_motors@plt>
xor    %edi,%edi
call   1040 <get_side_ir_dist@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1050 <get_front_ir_dist@plt>
lea    0xe82(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"STRAIGHT SL%d FL%d\0A\00"
define void @straight() {
%1 = call i32 @get_side_ir_dist(i32 0)
%2 = call i32 @get_front_ir_dist(i32 0)
%3 = sub nsw i32 %2, 4
%4 = icmp eq i32 %1, %3
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = call i32 @set_motors(i32 50, i32 50)
%7 = call i32 @get_side_ir_dist(i32 0)
%8 = call i32 @get_front_ir_dist(i32 0)
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"STRAIGHT SL%d FL%d\0A\00"
define void @straight() {
%1 = tail call i32 @get_side_ir_dist(i32 0)
%2 = tail call i32 @get_front_ir_dist(i32 0)
%3 = add nsw i32 %2, -4
%4 = icmp eq i32 %1, %3
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = tail call i32 @set_motors(i32 50, i32 50)
%7 = tail call i32 @get_side_ir_dist(i32 0)
%8 = tail call i32 @get_front_ir_dist(i32 0)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %5, %0
ret void
}
int can_add_ulong_within(const unsigned long x, const unsigned long y,
                         const unsigned long cap) {
  return y <= cap && x <= cap && x <= (cap - y);
}


x86 assembly (clang, -O0):
<can_add_ulong_within>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x19(%rbp)
ja     114b <can_add_ulong_within+0x4b>
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x19(%rbp)
ja     114b <can_add_ulong_within+0x4b>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setbe  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_add_ulong_within>:
mov    %rdx,%rax
sub    %rsi,%rax
setae  %cl
cmp    %rdx,%rdi
setbe  %dl
cmp    %rdi,%rax
setae  %al
and    %cl,%dl
and    %al,%dl
movzbl %dl,%eax
ret

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

LLVM IR (-O2):
define i32 @can_add_ulong_within(i64 %0, i64 %1, i64 %2) {
%4 = icmp uge i64 %2, %1
%5 = icmp ule i64 %0, %2
%6 = sub i64 %2, %1
%7 = icmp uge i64 %6, %0
%8 = and i1 %4, %5
%9 = and i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
int pgcd(int a, int b) { return a % b ? pgcd(b, a % b) : b; }


x86 assembly (clang, -O0):
<pgcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
je     1147 <pgcd+0x37>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%esi
call   1030 <pgcd@plt>
mov    %eax,-0xc(%rbp)
jmp    114d <pgcd+0x3d>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgcd>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <pgcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @pgcd(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 = srem i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = srem i32 %11, %12
%14 = call i32 @pgcd(i32 %10, i32 %13)
br label %17
15: ; preds = %2
%16 = load i32, i32* %4
br label %17
17: ; preds = %15, %9
%18 = phi i32 [ %14, %9 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @pgcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
int env_connect() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @env_connect() {
ret i32 0
}
void genlwl() {}


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

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

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

LLVM IR (-O2):
define void @genlwl() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ send_errno(int /*<<< orphan*/);
int /*<<< orphan*/ send_success();
scalar_t__ unlink(char *);
void do_rm(int argc, char **argv) {
  assert(argc == 1);
  if (unlink(argv[0]) == 0)
    send_success();
  else
    send_errno(errno);
}


x86 assembly (clang, -O0):
<do_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
jne    1182 <do_rm+0x42>
mov    $0x0,%al
call   1050 <send_success@plt>
jmp    1190 <do_rm+0x50>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
call   1060 <send_errno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_rm>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
mov    %eax,%edi
call   1040 <assert@plt>
mov    (%rbx),%rdi
call   1030 <unlink@plt>
test   %rax,%rax
je     116f <do_rm+0x2f>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1060 <send_errno@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <send_success@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @do_rm(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i64 @unlink(i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 (...) @send_success()
br label %19
16: ; preds = %2
%17 = load i32, i32* @errno
%18 = call i32 @send_errno(i32 %17)
br label %19
19: ; preds = %16, %14
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @do_rm(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i8*, i8** %1
%7 = tail call i64 @unlink(i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 (...) @send_success()
br label %14
11: ; preds = %2
%12 = load i32, i32* @errno
%13 = tail call i32 @send_errno(i32 %12)
br label %14
14: ; preds = %11, %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int execv(const char *path, char *const argv[]) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<execv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execv>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @execv(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @execv(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x7d() {
  Assert_real((isprint(125)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              630, ("isprint should be 1 for }"));
}


x86 assembly (clang, -O0):
<t_isprint_0x7d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x276,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x276,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for }\00"
define void @t_isprint_0x7d() {
%1 = call i32 @isprint(i32 125)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for }\00"
define void @t_isprint_0x7d() {
%1 = tail call i32 @isprint(i32 125)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void int2char(unsigned int foo, unsigned char *bar) {
  bar[3] = foo >> 24;
  bar[2] = foo >> 16;
  bar[1] = foo >> 8;
  bar[0] = foo;
}


x86 assembly (clang, -O0):
<int2char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2char>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @int2char(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = lshr i32 %5, 24
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 3
store i8 %7, i8* %9
%10 = load i32, i32* %3
%11 = lshr i32 %10, 16
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 %12, i8* %14
%15 = load i32, i32* %3
%16 = lshr i32 %15, 8
%17 = trunc i32 %16 to i8
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8 %17, i8* %19
%20 = load i32, i32* %3
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 0
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @int2char(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %4, i8* %5
%6 = lshr i32 %0, 16
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %7, i8* %8
%9 = lshr i32 %0, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %10, i8* %11
%12 = trunc i32 %0 to i8
store i8 %12, i8* %1
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int stat(char *, struct stat *);
int CheckSysfsEntry(char *sensorName) {
  int retval;
  struct stat st;
  retval = stat(sensorName, &st);
  if (retval)
    printf("ERROR: sensor sysfs entry %s not found\n", sensorName);
  return retval;
}


x86 assembly (clang, -O0):
<CheckSysfsEntry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1156 <CheckSysfsEntry+0x36>
mov    -0x8(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckSysfsEntry>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1143 <CheckSysfsEntry+0x23>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [40 x i8] c"ERROR: sensor sysfs entry %s not found\0A\00"
define i32 @CheckSysfsEntry(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.stat
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [40 x i8] c"ERROR: sensor sysfs entry %s not found\0A\00"
define i32 @CheckSysfsEntry(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_meh(char *who) { printf("%s is meh...\n", who); }


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

x86 assembly (clang, -O2):
<print_meh>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s is meh...\0A\00"
define void @print_meh(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s is meh...\0A\00"
define void @print_meh(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void dousage(void) {
  fprintf(stderr, "Usage: setfondname -name=newname font.dfont\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: setfondname -name=newname font.dfont\0A\00"
define void @dousage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: setfondname -name=newname font.dfont\0A\00"
define void @dousage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct yamc_pub_args_info {
  int dummy;
};

/* Variables and functions */
int yamc_pub_cmd_parser2(int, char **, struct yamc_pub_args_info *,
                         int /*<<< orphan*/, int, int);
int yamc_pub_cmd_parser(int argc, char **argv,
                        struct yamc_pub_args_info *args_info) {
  return yamc_pub_cmd_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<yamc_pub_cmd_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <yamc_pub_cmd_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yamc_pub_cmd_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <yamc_pub_cmd_parser2@plt>

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

LLVM IR (-O2):
%struct.yamc_pub_args_info = type { i32 }
define i32 @yamc_pub_cmd_parser(i32 %0, i8** %1, %struct.yamc_pub_args_info* %2) {
%4 = tail call i32 @yamc_pub_cmd_parser2(i32 %0, i8** %1, %struct.yamc_pub_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool ckKeyIsAscii(uint8_t cascii) { return (cascii & 0x80) == 0; }


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

x86 assembly (clang, -O2):
<ckKeyIsAscii>:
xor    %eax,%eax
test   $0x80,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ckKeyIsAscii(i32 %0) {
%2 = lshr i32 %0, 7
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}
void foo049(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo049(i32 %0) {
ret void
}
/* Variables and functions */
int test_cbc128();
int test_cbc256();
int test_decrypt_ecb();
int test_encrypt_decrypt_cbc();
int test_encrypt_ecb();
int do_testsuite(void) {
  int rc = 0;
  rc |= test_decrypt_ecb();
  rc |= test_encrypt_ecb();
  rc |= test_encrypt_decrypt_cbc();
  rc |= test_cbc128();
  rc |= test_cbc256();
  return rc;
}


x86 assembly (clang, -O0):
<do_testsuite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_decrypt_ecb@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_encrypt_ecb@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test_encrypt_decrypt_cbc@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_cbc128@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_cbc256@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_testsuite>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <test_decrypt_ecb@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <test_encrypt_ecb@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1060 <test_encrypt_decrypt_cbc@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1040 <test_cbc128@plt>
mov    %eax,%ebx
or     %r14d,%ebx
or     %ebp,%ebx
xor    %eax,%eax
call   1050 <test_cbc256@plt>
or     %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @do_testsuite() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_decrypt_ecb()
%3 = load i32, i32* %1
%4 = or i32 %3, %2
store i32 %4, i32* %1
%5 = call i32 (...) @test_encrypt_ecb()
%6 = load i32, i32* %1
%7 = or i32 %6, %5
store i32 %7, i32* %1
%8 = call i32 (...) @test_encrypt_decrypt_cbc()
%9 = load i32, i32* %1
%10 = or i32 %9, %8
store i32 %10, i32* %1
%11 = call i32 (...) @test_cbc128()
%12 = load i32, i32* %1
%13 = or i32 %12, %11
store i32 %13, i32* %1
%14 = call i32 (...) @test_cbc256()
%15 = load i32, i32* %1
%16 = or i32 %15, %14
store i32 %16, i32* %1
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @do_testsuite() {
%1 = tail call i32 (...) @test_decrypt_ecb()
%2 = tail call i32 (...) @test_encrypt_ecb()
%3 = or i32 %2, %1
%4 = tail call i32 (...) @test_encrypt_decrypt_cbc()
%5 = or i32 %3, %4
%6 = tail call i32 (...) @test_cbc128()
%7 = or i32 %5, %6
%8 = tail call i32 (...) @test_cbc256()
%9 = or i32 %7, %8
ret i32 %9
}
void I_NoAppServicesCreateNewLobby(int publicLobby) {}


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

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

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

LLVM IR (-O2):
define void @I_NoAppServicesCreateNewLobby(i32 %0) {
ret void
}
int mystrlen(char a[]) {
  int i = 0;
  for (i = 0; a[i]; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     113b <mystrlen+0x3b>
jmp    112d <mystrlen+0x2d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <mystrlen+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mystrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void do_config(int argc, char *argv[], int start) {
  (void)argc;
  (void)argv;
  (void)start;
}


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

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

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

LLVM IR (-O2):
define void @do_config(i32 %0, i8** nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
void volatile_fetch_sub_u64(uint64_t *dest, uint64_t val) {
  *((volatile uint64_t *)dest) -= val;
}


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

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

LLVM IR (-O0):
define void @volatile_fetch_sub_u64(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64*, i64** %3
%7 = load volatile i64, i64* %6
%8 = sub nsw i64 %7, %5
store volatile i64 %8, i64* %6
ret void
}

LLVM IR (-O2):
define void @volatile_fetch_sub_u64(i64* %0, i64 %1) {
%3 = load volatile i64, i64* %0
%4 = sub nsw i64 %3, %1
store volatile i64 %4, i64* %0
ret void
}
/* Variables and functions */
int SIGINT;
int SIGTERM;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ finish_test();
void signal_callback_handler(int signum) {
  if (signum == SIGTERM || signum == SIGINT) {
    finish_test();
    exit(0);
  }
}


x86 assembly (clang, -O0):
<signal_callback_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%eax
je     114f <signal_callback_handler+0x2f>
mov    -0x4(%rbp),%eax
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <signal_callback_handler+0x3d>
mov    $0x0,%al
call   1030 <finish_test@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_callback_handler>:
push   %rax
mov    0x2eb8(%rip),%rax
cmp    %edi,(%rax)
je     1139 <signal_callback_handler+0x19>
mov    0x2eb5(%rip),%rax
cmp    %edi,(%rax)
je     1139 <signal_callback_handler+0x19>
pop    %rax
ret
xor    %eax,%eax
call   1030 <finish_test@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
@SIGINT = global i32 0
define void @signal_callback_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGTERM
%5 = icmp eq i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @SIGINT
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %6, %1
%11 = call i32 (...) @finish_test()
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %6
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@SIGINT = global i32 0
define void @signal_callback_handler(i32 %0) {
%2 = load i32, i32* @SIGTERM
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call i32 (...) @finish_test()
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %1
ret void
}
void rb_fast_mark_table_prepare() {}


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

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

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

LLVM IR (-O2):
define void @rb_fast_mark_table_prepare() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fuck_me() { printf("WTH!\n"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"WTH!\0A\00"
define void @fuck_me() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"WTH!\00"
define void @fuck_me() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err_check(scalar_t__);
scalar_t__ errno;
int /*<<< orphan*/ parse(int /*<<< orphan*/);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(void) {
  errno = 0;
  setbuf(stdout, 0);
  parse(stdin);
  err_check(errno);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
movq   $0x0,(%rax)
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <parse@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%rdi
call   1030 <err_check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ea0(%rip),%rbx
movq   $0x0,(%rbx)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <parse@plt>
mov    (%rbx),%rdi
call   1030 <err_check@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@stdout = global i32 0
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
store i64 0, i64* @errno
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32 0)
%4 = load i32, i32* @stdin
%5 = call i32 @parse(i32 %4)
%6 = load i64, i64* @errno
%7 = call i32 @err_check(i64 %6)
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
@stdout = global i32 0
@stdin = global i32 0
define i32 @main() {
store i64 0, i64* @errno
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32 0)
%3 = load i32, i32* @stdin
%4 = tail call i32 @parse(i32 %3)
%5 = load i64, i64* @errno
%6 = tail call i32 @err_check(i64 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello world!\n");
  return 1337;
}


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
call   1030 <printf@plt>
mov    $0x539,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\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 ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1337
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 1337
}
/* Variables and functions */
int /*<<< orphan*/ func();
int /*<<< orphan*/ funcWithParm(int);
int /*<<< orphan*/ funcWithParmRef(int *);
int main(int argc, char **argv) {
  func();
  funcWithParm(3);
  int c = 1;
  funcWithParmRef(&c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <func@plt>
mov    $0x3,%edi
call   1050 <funcWithParm@plt>
movl   $0x1,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <funcWithParmRef@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func@plt>
mov    $0x3,%edi
call   1050 <funcWithParm@plt>
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <funcWithParmRef@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @func()
%8 = call i32 @funcWithParm(i32 3)
store i32 1, i32* %6
%9 = call i32 @funcWithParmRef(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32 (...) @func()
%5 = tail call i32 @funcWithParm(i32 3)
%6 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%7 = call i32 @funcWithParmRef(i32* %3)
ret i32 0
}