xunge/DecIR huggingface dataset:
void testBool(_Bool X) { printf("%d\n", X); }


x86 assembly (clang, -O0):
<testBool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBool>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @testBool(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
%6 = zext i1 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @testBool(i1 zeroext %0) {
%2 = zext i1 %0 to i32
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ror32(uint32_t val, int shift) {
  return shift == 0 ? val : ((val >> shift) | (val << (32 - shift)));
}


x86 assembly (clang, -O0):
<ror32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <ror32+0x1f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113b <ror32+0x3b>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror32>:
mov    %edi,%edx
mov    %esi,%ecx
sar    %cl,%edx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
or     %edx,%eax
test   %esi,%esi
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @ror32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %3
br label %18
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = ashr i32 %10, %11
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = sub nsw i32 32, %14
%16 = shl i32 %13, %15
%17 = or i32 %12, %16
br label %18
18: ; preds = %9, %7
%19 = phi i32 [ %8, %7 ], [ %17, %9 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @ror32(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = ashr i32 %0, %1
%5 = sub nsw i32 32, %1
%6 = shl i32 %0, %5
%7 = or i32 %6, %4
%8 = select i1 %3, i32 %0, i32 %7
ret i32 %8
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_multprec_container_to_target_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(286, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_multprec_container_to_target_solutions>:
mov    $0x11e,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @copy_multprec_container_to_target_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 286, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
scalar_t__ f4(int);
int /*<<< orphan*/ printf(char *, int);
int f1(int x, double z) {
  static int counter = 0;
  counter++;
  printf("counter in f1() = %d\n", counter);
  x += f4((int)z);
  return (x * z);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    0x2efe(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef5(%rip)
mov    0x2eef(%rip),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
cvttsd2si -0x10(%rbp),%edi
call   1040 <f4@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %edi,%ebx
mov    0x2f01(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2ef8(%rip)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
cvttsd2si 0x8(%rsp),%edi
call   1040 <f4@plt>
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@f1.counter = internal global i32 0
@.str = [22 x i8] c"counter in f1() = %d\0A\00"
define i32 @f1(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load i32, i32* @f1.counter
%6 = add nsw i32 %5, 1
store i32 %6, i32* @f1.counter
%7 = load i32, i32* @f1.counter
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load double, double* %4
%10 = fptosi double %9 to i32
%11 = call i64 @f4(i32 %10)
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = sitofp i32 %16 to double
%18 = load double, double* %4
%19 = fmul double %17, %18
%20 = fptosi double %19 to i32
ret i32 %20
}

LLVM IR (-O2):
@f1.counter = internal unnamed_addr global i32 0
@.str = [22 x i8] c"counter in f1() = %d\0A\00"
define i32 @f1(i32 %0, double %1) {
%3 = load i32, i32* @f1.counter
%4 = add nsw i32 %3, 1
store i32 %4, i32* @f1.counter
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = fptosi double %1 to i32
%7 = tail call i64 @f4(i32 %6)
%8 = trunc i64 %7 to i32
%9 = add i32 %8, %0
%10 = sitofp i32 %9 to double
%11 = fmul double %10, %1
%12 = fptosi double %11 to i32
ret i32 %12
}
void setDefaults() {}


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

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

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

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

/* Variables and functions */
int pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset) {
  return 0;
}


x86 assembly (clang, -O0):
<pthread_sigmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pthread_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_sigmask(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 0
}
void init_str(str, dflt) char **str, *dflt;
{
  if (!(*str)) {
    *str = md_malloc(40 + 2);
    (void)strcpy(*str, dflt);
  }
}


x86 assembly (clang, -O0):
<init_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1164 <init_str+0x44>
mov    $0x2a,%edi
mov    $0x0,%al
call   1040 <md_malloc@plt>
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_str>:
push   %r14
push   %rbx
push   %rax
cmpq   $0x0,(%rdi)
je     1132 <init_str+0x12>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2a,%edi
xor    %eax,%eax
call   1040 <md_malloc@plt>
movslq %eax,%rdi
mov    %rdi,(%rbx)
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @init_str(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** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %17, label %8
8: ; preds = %2
%9 = call i32 (i32, ...) bitcast (i32 (...)* @md_malloc to i32 (i32, ...)*)(i32 42)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = load i8**, i8*** %3
store i8* %11, i8** %12
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
%15 = load i8*, i8** %4
%16 = call i8* @strcpy(i8* %14, i8* %15)
br label %17
17: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @init_str(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @md_malloc to i32 (i32, ...)*)(i32 42)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %0
%9 = tail call i8* @strcpy(i8* dereferenceable(1) %8, i8* dereferenceable(1) %1)
br label %10
10: ; preds = %5, %2
ret void
}
/* Variables and functions */
double modulo(double, double);
double integer_division(double a, double b) { return (a - modulo(a, b)) / b; }


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

x86 assembly (clang, -O2):
<integer_division>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <modulo@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @integer_division(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* %3
%7 = load double, double* %4
%8 = call double @modulo(double %6, double %7)
%9 = fsub double %5, %8
%10 = load double, double* %4
%11 = fdiv double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @integer_division(double %0, double %1) {
%3 = tail call double @modulo(double %0, double %1)
%4 = fsub double %0, %3
%5 = fdiv double %4, %1
ret double %5
}
void dummy_void(void) { return; }


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

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

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

LLVM IR (-O2):
define void @dummy_void() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int Barcode_Version(char *vptr) {
  if (vptr)
    strcpy(vptr, "0.98");
  return 9800;
}


x86 assembly (clang, -O0):
<Barcode_Version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <Barcode_Version+0x27>
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
call   1030 <strcpy@plt>
mov    $0x2648,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Barcode_Version>:
test   %rdi,%rdi
je     1126 <Barcode_Version+0x16>
push   %rax
lea    0xee3(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x8,%rsp
mov    $0x2648,%eax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0.98\00"
define i32 @Barcode_Version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret i32 9800
}

LLVM IR (-O2):
@.str = [5 x i8] c"0.98\00"
define i32 @Barcode_Version(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret i32 9800
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isdigit(int);
int isalnum(int ch) { return (isalpha(ch) || isdigit(ch)); }


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isalnum+0x37>
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalpha(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isdigit(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isdigit(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void _Jv_AttachCurrentThreadAsDaemon() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _m_pshufw(int /*<<< orphan*/, int);
__m64 __m_pshufw(__m64 A, int const I) { return _m_pshufw(A, 1); }


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

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

LLVM IR (-O0):
define i32 @__m_pshufw(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 = call i32 @_m_pshufw(i32 %5, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__m_pshufw(i32 %0, i32 %1) {
%3 = tail call i32 @_m_pshufw(i32 %0, i32 1)
ret i32 %3
}
int do_788() { return 788; }


x86 assembly (clang, -O0):
<do_788>:
push   %rbp
mov    %rsp,%rbp
mov    $0x314,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_788() {
ret i32 788
}

LLVM IR (-O2):
define i32 @do_788() {
ret i32 788
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
void *malcalloc(size_t num, size_t size) {
  void *p = calloc(num, size);
  if (!p) {
    fprintf(stderr, "calloc(%i, %i) returned NULL\n", (int)num, (int)size);
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<malcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1187 <malcalloc+0x57>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
lea    0xe88(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <calloc@plt>
test   %rax,%rax
je     114c <malcalloc+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"calloc(%i, %i) returned NULL\0A\00"
define i8* @malcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %19, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i64, i64* %3
%14 = trunc i64 %13 to i32
%15 = load i64, i64* %4
%16 = trunc i64 %15 to i32
%17 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %16)
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %2
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"calloc(%i, %i) returned NULL\0A\00"
define noalias i8* @malcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = trunc i64 %0 to i32
%8 = trunc i64 %1 to i32
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret i8* %3
}
int Bematech_FI_DataMovimento(Var, Retorno) {
  return Formata("\x1b|35|27|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_DataMovimento>:
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
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|27|\1B\00"
define i32 @Bematech_FI_DataMovimento(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 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|27|\1B\00"
define i32 @Bematech_FI_DataMovimento(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Func1();
int /*<<< orphan*/ Func2(int /*<<< orphan*/);
int main(int argc, char **argv) {
  Func2(Func1());
  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)
mov    $0x0,%al
call   1030 <Func1@plt>
mov    %eax,%edi
call   1040 <Func2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Func1@plt>
mov    %eax,%edi
call   1040 <Func2@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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @Func1()
%7 = call i32 @Func2(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @Func1()
%4 = tail call i32 @Func2(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float a, b, c;
  printf("Input your numbers please\n");
  scanf("%f %f", &a, &b);
  printf("Here is your Ans %.2f\n", a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
divss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Input your numbers please\0A\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [23 x i8] c"Here is your Ans %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fdiv float %7, %8
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [23 x i8] c"Here is your Ans %.2f\0A\00"
@str = [26 x i8] c"Input your numbers please\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = load float, float* %2
%9 = fdiv float %7, %8
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}
int test_imm_52int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x52 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_52int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x52,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_52int64_highword_mem>:
testb  $0x52,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_52int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 352187318272
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int EINVAL;
int pthread_attr_getinheritsched(const pthread_attr_t *attr,
                                 int *inheritsched) {
  (void)attr;
  (void)inheritsched;
  return EINVAL;
}


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

x86 assembly (clang, -O2):
<pthread_attr_getinheritsched>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @pthread_attr_getinheritsched(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 = load i32, i32* @EINVAL
ret i32 %7
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @pthread_attr_getinheritsched(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
ret i32 %3
}
void XwcDrawString() {}


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

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

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

LLVM IR (-O2):
define void @XwcDrawString() {
ret void
}
int show_moose_elif() {}


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

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

LLVM IR (-O0):
define i32 @show_moose_elif() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @show_moose_elif() {
ret i32 undef
}
int initialize_tcompress() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @initialize_tcompress() {
ret i32 0
}
/* Variables and functions */
int chk_ele_sym(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  int result = chk_ele_sym(argv[1], argv[2]);
  printf("%s\n", result ? "true" : "false");
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <chk_ele_sym@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
lea    0xeb1(%rip),%rsi
lea    0xea5(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1030 <chk_ele_sym@plt>
test   %eax,%eax
lea    0xed2(%rip),%rax
lea    0xec6(%rip),%rsi
cmove  %rax,%rsi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
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 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @chk_ele_sym(i8* %9, i8* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @chk_ele_sym(i8* %4, i8* %6)
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}
/* Variables and functions */
int leftmost_one(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned x;
  printf("Please input x: ");
  scanf("%x", &x);
  printf("leftmost_one(x)=0x%x\n", leftmost_one(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <leftmost_one@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <leftmost_one@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Please input x: \00"
@.str.1 = [3 x i8] c"%x\00"
@.str.2 = [22 x i8] c"leftmost_one(x)=0x%x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @leftmost_one(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x7c() {
  Assert_real((isascii(124)),
              "/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_isascii.c",
              625, ("isascii should be 1 for |"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x7c>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x271,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for |\00"
define void @t_isascii_0x7c() {
%1 = call i32 @isascii(i32 124)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for |\00"
define void @t_isascii_0x7c() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double exp(int);
double kW(double HeightEye, double TempS, double RH) {
  double WT = 0.031;
  WT *= 0.94 * (RH / 100.0) * exp(TempS / 15) * exp(-1 * HeightEye / 3000.0);
  return WT;
}


x86 assembly (clang, -O0):
<kW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xef9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xedf(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xecb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xead(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe7f(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe6a(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kW>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
divsd  0xede(%rip),%xmm2
mulsd  0xede(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
divsd  0xed8(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0xebd(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0xeae(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @kW(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 3.100000e-02, double* %7
%8 = load double, double* %6
%9 = fdiv double %8, 1.000000e+02
%10 = fmul double 0x3FEE147AE147AE14, %9
%11 = load double, double* %5
%12 = fdiv double %11, 1.500000e+01
%13 = fptosi double %12 to i32
%14 = call double @exp(i32 %13)
%15 = fmul double %10, %14
%16 = load double, double* %4
%17 = fmul double -1.000000e+00, %16
%18 = fdiv double %17, 3.000000e+03
%19 = fptosi double %18 to i32
%20 = call double @exp(i32 %19)
%21 = fmul double %15, %20
%22 = load double, double* %7
%23 = fmul double %22, %21
store double %23, double* %7
%24 = load double, double* %7
ret double %24
}

LLVM IR (-O2):
define double @kW(double %0, double %1, double %2) {
%4 = fdiv double %2, 1.000000e+02
%5 = fmul double %4, 0x3FEE147AE147AE14
%6 = fdiv double %1, 1.500000e+01
%7 = fptosi double %6 to i32
%8 = tail call double @exp(i32 %7)
%9 = fmul double %5, %8
%10 = fdiv double %0, -3.000000e+03
%11 = fptosi double %10 to i32
%12 = tail call double @exp(i32 %11)
%13 = fmul double %9, %12
%14 = fmul double %13, 3.100000e-02
ret double %14
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char *);
short xnet_standard_port_for_service(const char *service) {
  if (strcasecmp(service, "http") == 0)
    return 80;
  else if (strcasecmp(service, "https") == 0)
    return 443;
  return 0;
}


x86 assembly (clang, -O0):
<xnet_standard_port_for_service>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1141 <xnet_standard_port_for_service+0x31>
movw   $0x50,-0x2(%rbp)
jmp    1171 <xnet_standard_port_for_service+0x61>
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1166 <xnet_standard_port_for_service+0x56>
movw   $0x1bb,-0x2(%rbp)
jmp    1171 <xnet_standard_port_for_service+0x61>
jmp    116b <xnet_standard_port_for_service+0x5b>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xnet_standard_port_for_service>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1143 <xnet_standard_port_for_service+0x33>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
mov    $0x1bb,%eax
cmovne %ecx,%eax
pop    %rbx
ret
mov    $0x50,%ax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"http\00"
@.str.1 = [6 x i8] c"https\00"
define signext i16 @xnet_standard_port_for_service(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcasecmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i16 80, i16* %2
br label %15
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strcasecmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i16 443, i16* %2
br label %15
13: ; preds = %8
br label %14
14: ; preds = %13
store i16 0, i16* %2
br label %15
15: ; preds = %14, %12, %7
%16 = load i16, i16* %2
ret i16 %16
}

LLVM IR (-O2):
@.str = [5 x i8] c"http\00"
@.str.1 = [6 x i8] c"https\00"
define signext i16 @xnet_standard_port_for_service(i8* nocapture %0) {
%2 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i16 443, i16 0
br label %8
8: ; preds = %4, %1
%9 = phi i16 [ 80, %1 ], [ %7, %4 ]
ret i16 %9
}
unsigned get_bucket(unsigned size) {
  unsigned bucket = 0;
  while (size > (1u << bucket))
    ++bucket;
  return bucket;
}


x86 assembly (clang, -O0):
<get_bucket>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
cmp    %ecx,%eax
jbe    1133 <get_bucket+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <get_bucket+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bucket>:
mov    $0xffffffff,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    %edi,%eax
jb     1110 <get_bucket+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_bucket(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = shl nuw i32 1, %3
%5 = icmp ult i32 %4, %0
%6 = add i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
void sigchild_handler(int signo) {}


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

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

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

LLVM IR (-O2):
define void @sigchild_handler(i32 %0) {
ret void
}
void CFGMR3QueryGCPtrSDef(void) {}


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

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

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

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

/* Variables and functions */
float mcp4725_get_raw_output(int /*<<< orphan*/, int);
float mcp4725_get_voltage(uint8_t addr, float vdd, bool eeprom) {
  return vdd / 0x0fff * mcp4725_get_raw_output(addr, eeprom);
}


x86 assembly (clang, -O0):
<mcp4725_get_voltage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <mcp4725_get_raw_output@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcp4725_get_voltage>:
push   %rax
divss  0xee7(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <mcp4725_get_raw_output@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @mcp4725_get_voltage(i32 %0, float %1, i32 %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca i32
store i32 %0, i32* %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = load float, float* %5
%8 = fdiv float %7, 4.095000e+03
%9 = load i32, i32* %4
%10 = load i32, i32* %6
%11 = call float @mcp4725_get_raw_output(i32 %9, i32 %10)
%12 = fmul float %8, %11
ret float %12
}

LLVM IR (-O2):
define float @mcp4725_get_voltage(i32 %0, float %1, i32 %2) {
%4 = fdiv float %1, 4.095000e+03
%5 = tail call float @mcp4725_get_raw_output(i32 %0, i32 %2)
%6 = fmul float %4, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ imprime(char *);
void main(void) {
  char s[] = "Felipe";
  char *t = "Felipe";
  char *p = "Uma frase muito legal\n";
  imprime(p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x7(%rbp)
mov    0xedc(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xed4(%rip),%al
mov    %al,-0x1(%rbp)
lea    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <imprime@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.s = [7 x i8] c"Felipe\00"
@.str = [7 x i8] c"Felipe\00"
@.str.1 = [23 x i8] c"Uma frase muito legal\0A\00"
define void @main() {
%1 = alloca [7 x i8]
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast [7 x i8]* %1 to i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @imprime(i8* %5)
ret void
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"Uma frase muito legal\0A\00"
define void @main() {
%1 = tail call i32 @imprime(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ obfsem_xor_encode(void *, size_t, void **, size_t *);
void obfsem_xor_decode(void *in, size_t insiz, void **out, size_t *outsiz) {
  obfsem_xor_encode(in, insiz, out, outsiz);
}


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

x86 assembly (clang, -O2):
<obfsem_xor_decode>:
jmp    1030 <obfsem_xor_encode@plt>

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

LLVM IR (-O2):
define void @obfsem_xor_decode(i8* %0, i64 %1, i8** %2, i64* %3) {
%5 = tail call i32 @obfsem_xor_encode(i8* %0, i64 %1, i8** %2, i64* %3)
ret void
}
void gtk_entry_set_has_frame() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @callee_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ldf();
void ldcdf() { ldf(); }


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

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

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

LLVM IR (-O2):
define void @ldcdf() {
%1 = tail call i32 (...) @ldf()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_bit(volatile uint8_t *byteaddress, uint8_t bitpos, bool state) {
  if (state) {
    *byteaddress |= (1 << bitpos);
  } else {
    *byteaddress &= ~(1 << bitpos);
  }
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1131 <set_bit+0x31>
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
jmp    1148 <set_bit+0x48>
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
test   %edx,%edx
je     1112 <set_bit+0x12>
or     (%rdi),%eax
mov    %eax,(%rdi)
ret
not    %eax
and    (%rdi),%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_bit(i32* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = shl nuw i32 1, %1
br i1 %4, label %9, label %6
6: ; preds = %3
%7 = load volatile i32, i32* %0
%8 = or i32 %7, %5
br label %13
9: ; preds = %3
%10 = xor i32 %5, -1
%11 = load volatile i32, i32* %0
%12 = and i32 %11, %10
br label %13
13: ; preds = %9, %6
%14 = phi i32 [ %12, %9 ], [ %8, %6 ]
store volatile i32 %14, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void a() { printf("In function a\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"In function a\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}