xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
void bf_set(uint8_t field[], size_t idx) {
  field[idx / 8] |= (1u << (idx % 8));
}


x86 assembly (clang, -O0):
<bf_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_set>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x3,%rsi
or     %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @bf_set(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = urem i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i32*, i32** %3
%10 = load i64, i64* %4
%11 = udiv i64 %10, 8
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %8
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @bf_set(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 7
%5 = shl nuw nsw i32 1, %4
%6 = lshr i64 %1, 3
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %5
store i32 %9, i32* %7
ret void
}
/* Variables and functions */
double log10(double);
double Phred(double pvalue) {
  double v = log10(pvalue);
  return -10 * v;
}


x86 assembly (clang, -O0):
<Phred>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log10@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Phred>:
push   %rax
call   1030 <log10@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Phred(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @log10(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fmul double -1.000000e+01, %6
ret double %7
}

LLVM IR (-O2):
define double @Phred(double %0) {
%2 = tail call double @log10(double %0)
%3 = fmul double %2, -1.000000e+01
ret double %3
}
/* Variables and functions */
int bar();
int __attribute__((weak)) _old_bar() { return bar(); }


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

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

LLVM IR (-O0):
define weak i32 @_old_bar() {
%1 = call i32 (...) @bar()
ret i32 %1
}

LLVM IR (-O2):
define weak i32 @_old_bar() {
%1 = tail call i32 (...) @bar()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int setresgid(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int pthread_setresgid_np(gid_t rgid, gid_t egid, gid_t sgid) {
  return setresgid(rgid, egid, sgid);
}


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

x86 assembly (clang, -O2):
<pthread_setresgid_np>:
jmp    1030 <setresgid@plt>

LLVM IR (-O0):
define i32 @pthread_setresgid_np(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @setresgid(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @pthread_setresgid_np(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @setresgid(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
int libmesh_C_isnan_double(double a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @libmesh_C_isnan_double(double %0) {
ret i32 0
}
signed int fci_hpi_deinit(void *handle) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fci_hpi_deinit(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ strmatch(char *, char *, int /*<<< orphan*/ *);
void check_if(char *str, int linenr) {
  if (strmatch(str, "#if", NULL)) {
    printf("Error: \"#if...\" preprocessor statement should not be in SCPACK "
           "section "
           "(line %d)\n",
           linenr);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <strmatch@plt>
cmp    $0x0,%rax
je     1176 <check_if+0x46>
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_if>:
push   %rbx
mov    %esi,%ebx
lea    0xec6(%rip),%rsi
xor    %edx,%edx
call   1030 <strmatch@plt>
test   %rax,%rax
jne    1148 <check_if+0x18>
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"#if\00"
@.str.1 = [82 x i8] c"Error: \22#if...\22 preprocessor statement should not be in SCPACK section (line %d)\0A\00"
define void @check_if(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i64 @strmatch(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"#if\00"
@.str.1 = [82 x i8] c"Error: \22#if...\22 preprocessor statement should not be in SCPACK section (line %d)\0A\00"
define void @check_if(i8* %0, i32 %1) {
%3 = tail call i64 @strmatch(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_animate_dk();
int /*<<< orphan*/ test_animate_seir();
int /*<<< orphan*/ test_animate_si();
int /*<<< orphan*/ test_animate_sir();
int /*<<< orphan*/ test_animate_sis();
int /*<<< orphan*/ test_animate_sizr();
int main() {
  test_animate_si();
  test_animate_sis();
  test_animate_sir();
  test_animate_seir();
  test_animate_dk();
  test_animate_sizr();
  printf("\n\nsuccess\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <test_animate_si@plt>
mov    $0x0,%al
call   1060 <test_animate_sis@plt>
mov    $0x0,%al
call   1080 <test_animate_sir@plt>
mov    $0x0,%al
call   1050 <test_animate_seir@plt>
mov    $0x0,%al
call   1070 <test_animate_dk@plt>
mov    $0x0,%al
call   1030 <test_animate_sizr@plt>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <test_animate_si@plt>
xor    %eax,%eax
call   1060 <test_animate_sis@plt>
xor    %eax,%eax
call   1080 <test_animate_sir@plt>
xor    %eax,%eax
call   1050 <test_animate_seir@plt>
xor    %eax,%eax
call   1070 <test_animate_dk@plt>
xor    %eax,%eax
call   1040 <test_animate_sizr@plt>
lea    0xe5e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\0A\0Asuccess\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_animate_si()
%3 = call i32 (...) @test_animate_sis()
%4 = call i32 (...) @test_animate_sir()
%5 = call i32 (...) @test_animate_seir()
%6 = call i32 (...) @test_animate_dk()
%7 = call i32 (...) @test_animate_sizr()
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"\0A\0Asuccess\00"
define i32 @main() {
%1 = tail call i32 (...) @test_animate_si()
%2 = tail call i32 (...) @test_animate_sis()
%3 = tail call i32 (...) @test_animate_sir()
%4 = tail call i32 (...) @test_animate_seir()
%5 = tail call i32 (...) @test_animate_dk()
%6 = tail call i32 (...) @test_animate_sizr()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int ev_n(int n) {
  if (n < 0)
    return -n - 1;
  else
    return n;
}


x86 assembly (clang, -O0):
<ev_n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1121 <ev_n+0x21>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <ev_n+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev_n>:
mov    %edi,%eax
sar    $0x1f,%eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @ev_n(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, %0
ret i32 %3
}
void key_swap(char *key, int i, int j) {
  char tmp = key[j];
  key[j] = key[i];
  key[i] = tmp;
}


x86 assembly (clang, -O0):
<key_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_swap>:
movslq %edx,%rax
mov    (%rdi,%rax,1),%r8b
movslq %esi,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %r8b,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @key_swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
/* Variables and functions */
scalar_t__ exp(float);
float log(scalar_t__);
float logsigmoid(float x) { return -log(1 + exp(-x)); }


x86 assembly (clang, -O0):
<logsigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <exp@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <log@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logsigmoid>:
push   %rax
xorps  0xed8(%rip),%xmm0
call   1030 <exp@plt>
lea    0x1(%rax),%rdi
call   1040 <log@plt>
xorps  0xec3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @logsigmoid(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
%5 = call i64 @exp(float %4)
%6 = add nsw i64 1, %5
%7 = call float @log(i64 %6)
%8 = fneg float %7
ret float %8
}

LLVM IR (-O2):
define float @logsigmoid(float %0) {
%2 = fneg float %0
%3 = tail call i64 @exp(float %2)
%4 = add nsw i64 %3, 1
%5 = tail call float @log(i64 %4)
%6 = fneg float %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ _psTrace(char *);
int /*<<< orphan*/ _psTraceStr(char *, char *);
void _psErrorStr(char *msg, char *val) {
  _psTraceStr(msg, val);
  _psTrace("\n");
}


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

x86 assembly (clang, -O2):
<_psErrorStr>:
push   %rax
call   1030 <_psTraceStr@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1040 <_psTrace@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @_psErrorStr(i8* %0, i8* %1) {
%3 = tail call i32 @_psTraceStr(i8* %0, i8* %1)
%4 = tail call i32 @_psTrace(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double JDTDtoUTC(double);
double JDUTCToLocalTime(double);
double JDTDtoLocalTime(double tdJD) {
  double tmp = JDTDtoUTC(tdJD);
  return JDUTCToLocalTime(tmp);
}


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

x86 assembly (clang, -O2):
<JDTDtoLocalTime>:
push   %rax
call   1030 <JDTDtoUTC@plt>
pop    %rax
jmp    1040 <JDUTCToLocalTime@plt>

LLVM IR (-O0):
define double @JDTDtoLocalTime(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @JDTDtoUTC(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @JDUTCToLocalTime(double %6)
ret double %7
}

LLVM IR (-O2):
define double @JDTDtoLocalTime(double %0) {
%2 = tail call double @JDTDtoUTC(double %0)
%3 = tail call double @JDUTCToLocalTime(double %2)
ret double %3
}
/* Variables and functions */
double exp2(int /*<<< orphan*/);
int /*<<< orphan*/ trunc(double);
double fpu_fscale(double a, double b) {
  double c;
  c = a * exp2(trunc(b));
  return c;
}


x86 assembly (clang, -O0):
<fpu_fscale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <trunc@plt>
mov    %eax,%edi
call   1030 <exp2@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpu_fscale>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1040 <trunc@plt>
mov    %eax,%edi
call   1030 <exp2@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @fpu_fscale(double %0, double %1) {
%3 = tail call i32 @trunc(double %1)
%4 = tail call double @exp2(i32 %3)
%5 = fmul double %4, %0
ret double %5
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int tcsetattr(int, int, struct termios *);
int _tcsetattr(int fd, int optional, struct termios *termios_p) {
  int tmp;
  for (;;) {
    if ((tmp = tcsetattr(fd, optional, termios_p)))
      if (errno == EINTR)
        continue;
    break;
  }
  return tmp;
}


x86 assembly (clang, -O0):
<_tcsetattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <tcsetattr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1161 <_tcsetattr+0x51>
mov    0x2e9c(%rip),%rax
mov    (%rax),%rax
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
jne    115c <_tcsetattr+0x4c>
jmp    1122 <_tcsetattr+0x12>
jmp    1161 <_tcsetattr+0x51>
jmp    1166 <_tcsetattr+0x56>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tcsetattr>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2eba(%rip),%r15
mov    0x2eab(%rip),%r12
nopl   (%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <tcsetattr@plt>
test   %eax,%eax
je     1149 <_tcsetattr+0x39>
mov    (%r15),%rcx
cmp    (%r12),%rcx
je     1130 <_tcsetattr+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@errno = global i64 0
@EINTR = global i64 0
define i32 @_tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.termios*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.termios* %2, %struct.termios** %6
br label %8
8: ; preds = %18, %3
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load %struct.termios*, %struct.termios** %6
%12 = call i32 @tcsetattr(i32 %9, i32 %10, %struct.termios* %11)
store i32 %12, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %8
%15 = load i64, i64* @errno
%16 = load i64, i64* @EINTR
%17 = icmp eq i64 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
br label %8
19: ; preds = %14
br label %20
20: ; preds = %19, %8
br label %21
21: ; preds = %20
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@errno = global i64 0
@EINTR = global i64 0
define i32 @_tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @tcsetattr(i32 %0, i32 %1, %struct.termios* %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %7
ret i32 %5
}
/* Type definitions */
struct mini_enc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct mini_enc *);
int /*<<< orphan*/ mn_clear_table(struct mini_enc *);
void mn_enc_free(struct mini_enc *enc) {
  mn_clear_table(enc);
  free(enc);
}


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

x86 assembly (clang, -O2):
<mn_enc_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mn_clear_table@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.mini_enc = type { i32 }
define void @mn_enc_free(%struct.mini_enc* %0) {
%2 = alloca %struct.mini_enc*
store %struct.mini_enc* %0, %struct.mini_enc** %2
%3 = load %struct.mini_enc*, %struct.mini_enc** %2
%4 = call i32 @mn_clear_table(%struct.mini_enc* %3)
%5 = load %struct.mini_enc*, %struct.mini_enc** %2
%6 = call i32 @free(%struct.mini_enc* %5)
ret void
}

LLVM IR (-O2):
%struct.mini_enc = type { i32 }
define void @mn_enc_free(%struct.mini_enc* %0) {
%2 = tail call i32 @mn_clear_table(%struct.mini_enc* %0)
%3 = tail call i32 @free(%struct.mini_enc* %0)
ret void
}
/* Variables and functions */
int BIT(int);
int wpa_auth_alg_fils(int alg) { return !!(alg & (BIT(5) | BIT(6))); }


x86 assembly (clang, -O0):
<wpa_auth_alg_fils>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,-0xc(%rbp)
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_auth_alg_fils>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x6,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
xor    %ecx,%ecx
test   %ebx,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_auth_alg_fils(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 5)
%5 = call i32 @BIT(i32 6)
%6 = or i32 %4, %5
%7 = and i32 %3, %6
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @wpa_auth_alg_fils(i32 %0) {
%2 = tail call i32 @BIT(i32 5)
%3 = tail call i32 @BIT(i32 6)
%4 = or i32 %3, %2
%5 = and i32 %4, %0
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
unsigned int UINT64_C(int);
void clear_flag(uint64_t *array, unsigned int idx) {
  array[idx >> 6] &= ~(UINT64_C(1) << (idx & 0x3f));
}


x86 assembly (clang, -O0):
<clear_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%edx
mov    -0xc(%rbp),%ecx
and    $0x3f,%ecx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x6,%ecx
mov    %ecx,%ecx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_flag>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x1,%edi
call   1030 <UINT64_C@plt>
mov    %ebx,%ecx
shl    %cl,%eax
not    %eax
shr    $0x6,%ebx
and    %eax,(%r14,%rbx,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @clear_flag(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 @UINT64_C(i32 1)
%6 = load i32, i32* %4
%7 = and i32 %6, 63
%8 = shl i32 %5, %7
%9 = xor i32 %8, -1
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = lshr i32 %11, 6
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = load i32, i32* %14
%16 = and i32 %15, %9
store i32 %16, i32* %14
ret void
}

LLVM IR (-O2):
define void @clear_flag(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @UINT64_C(i32 1)
%4 = and i32 %1, 63
%5 = shl i32 %3, %4
%6 = xor i32 %5, -1
%7 = lshr i32 %1, 6
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = and i32 %10, %6
store i32 %11, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ modulus(double, double);
double vector_projection_with_precalculated_axis_modulus(double, double, double,
                                                         double,
                                                         int /*<<< orphan*/);
double vector_projection(double axis_x, double axis_y, double px, double py) {
  return vector_projection_with_precalculated_axis_modulus(
      axis_x, axis_y, px, py, modulus(axis_x, axis_y));
}


x86 assembly (clang, -O0):
<vector_projection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <modulus@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
mov    %eax,%edi
call   1040 <vector_projection_with_precalculated_axis_modulus@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_projection>:
sub    $0x28,%rsp
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <modulus@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    %eax,%edi
add    $0x28,%rsp
jmp    1040 <vector_projection_with_precalculated_axis_modulus@plt>

LLVM IR (-O0):
define double @vector_projection(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call i32 @modulus(double %13, double %14)
%16 = call double @vector_projection_with_precalculated_axis_modulus(double %9, double %10, double %11, double %12, i32 %15)
ret double %16
}

LLVM IR (-O2):
define double @vector_projection(double %0, double %1, double %2, double %3) {
%5 = tail call i32 @modulus(double %0, double %1)
%6 = tail call double @vector_projection_with_precalculated_axis_modulus(double %0, double %1, double %2, double %3, i32 %5)
ret double %6
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("%d\n", fib(36));
  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    $0x24,%edi
call   1040 <fib@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x24,%edi
call   1040 <fib@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fib(i32 36)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
const char *_nl_expand_alias() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @_nl_expand_alias() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @_nl_expand_alias() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_CC_FIFOP_INPUT() { clear_io_bit(-6, 1); }


x86 assembly (clang, -O0):
<TOSH_MAKE_CC_FIFOP_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffa,%edi
mov    $0x1,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_CC_FIFOP_INPUT>:
mov    $0xfffffffa,%edi
mov    $0x1,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_CC_FIFOP_INPUT() {
%1 = call i32 @clear_io_bit(i32 -6, i32 1)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_CC_FIFOP_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 -6, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_host_addr(char *);
int /*<<< orphan*/ zinfo(char *, char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    zinfo("USAGE: %s host_or_domain\n", argv[0]);
    return 0;
  }
  get_host_addr(argv[1]);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    115f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <zinfo@plt>
movl   $0x0,-0x4(%rbp)
jmp    1173 <main+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <get_host_addr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1137 <main+0x17>
mov    (%rsi),%rsi
lea    0xed0(%rip),%rdi
call   1030 <zinfo@plt>
jmp    1140 <main+0x20>
mov    0x8(%rsi),%rdi
call   1040 <get_host_addr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"USAGE: %s host_or_domain\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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @zinfo(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %11)
store i32 0, i32* %3
br label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @get_host_addr(i8* %16)
store i32 0, i32* %3
br label %18
18: ; preds = %13, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [26 x i8] c"USAGE: %s host_or_domain\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @zinfo(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @get_host_addr(i8* %9)
br label %11
11: ; preds = %7, %4
ret i32 0
}
unsigned xrop3_224_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk1 = T & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_224_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_224_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = xor i32 %29, -1
%31 = and i32 %28, %30
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %7
%41 = and i32 %39, %40
%42 = or i32 %38, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_224_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmx_dielectric(int, char **);
int main(int argc, char *argv[]) {
  gmx_dielectric(argc, argv);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_dielectric@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <gmx_dielectric@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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_dielectric(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_dielectric(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ warn(char *, char const *, unsigned int, char const *);
void grammar(const char *cmd, const char *filename, unsigned int line) {
  warn("%s line %u: ignoring bad line starting with '%s'\n", filename, line,
       cmd);
}


x86 assembly (clang, -O0):
<grammar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <warn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grammar>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
jmp    1030 <warn@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"%s line %u: ignoring bad line starting with '%s'\0A\00"
define void @grammar(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @warn(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"%s line %u: ignoring bad line starting with '%s'\0A\00"
define void @grammar(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @warn(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test89(__m64 a, __m64 b) { return _mm_cmpgt_pi32(a, b); }


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

x86 assembly (clang, -O2):
<test89>:
jmp    1030 <_mm_cmpgt_pi32@plt>

LLVM IR (-O0):
define i32 @test89(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 @_mm_cmpgt_pi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test89(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_pi32(i32 %0, i32 %1)
ret i32 %3
}
unsigned int __gnu_dev_minor(unsigned long long int __dev) {
  return (__dev & 0xff) | ((unsigned int)(__dev >> 12) & ~0xff);
}


x86 assembly (clang, -O0):
<__gnu_dev_minor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    -0x8(%rbp),%rcx
shr    $0xc,%rcx
and    $0xffffff00,%ecx
mov    %ecx,%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnu_dev_minor>:
movzbl %dil,%eax
shr    $0xc,%rdi
and    $0xffffff00,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__gnu_dev_minor(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 255
%5 = load i64, i64* %2
%6 = lshr i64 %5, 12
%7 = trunc i64 %6 to i32
%8 = and i32 %7, -256
%9 = zext i32 %8 to i64
%10 = or i64 %4, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @__gnu_dev_minor(i64 %0) {
%2 = and i64 %0, 255
%3 = lshr i64 %0, 12
%4 = and i64 %3, 4294967040
%5 = or i64 %4, %2
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ perfect(int);
int scanf(char *, int *);
int main() {
  int n;
  while (scanf("%d", &n) == 1)
    perfect(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1155 <main+0x35>
mov    -0x8(%rbp),%edi
call   1030 <perfect@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1169 <main+0x49>
lea    0xebf(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
call   1030 <perfect@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load i32, i32* %1
%7 = call i32 @perfect(i32 %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = icmp eq i32 %8, 1
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
double asin(x)
double x;
{
  double y;
  y = sqrt(1 - x * x);
  return atan(x / y);
}


x86 assembly (clang, -O0):
<asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea6(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <atan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asin>:
push   %rax
movapd %xmm0,%xmm2
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xecb(%rip),%xmm0
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1149 <asin+0x29>
sqrtsd %xmm0,%xmm0
jmp    1158 <asin+0x38>
movsd  %xmm2,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @asin(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fneg double %4
%7 = call double @llvm.fmuladd.f64(double %6, double %5, double 1.000000e+00)
%8 = call double @sqrt(double %7)
store double %8, double* %3
%9 = load double, double* %2
%10 = load double, double* %3
%11 = fdiv double %9, %10
%12 = call double @atan(double %11)
ret double %12
}

LLVM IR (-O2):
define double @asin(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = tail call double @sqrt(double %3)
%5 = fdiv double %0, %4
%6 = tail call double @atan(double %5)
ret double %6
}
/* Variables and functions */
double const fabsl(double const);
bool compare_eps(const double a, const double b, const double eps) {
  return fabsl(a - b) < eps;
}


x86 assembly (clang, -O0):
<compare_eps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <fabsl@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_eps>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm2
seta   %al
ret

LLVM IR (-O0):
define i32 @compare_eps(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
%10 = call double @fabsl(double %9)
%11 = load double, double* %6
%12 = fcmp olt double %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @compare_eps(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fcmp olt double %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
scalar_t__ wPopNumber();
int /*<<< orphan*/ wPushNumber(int);
void wBasInt() { wPushNumber((int)wPopNumber()); }


x86 assembly (clang, -O0):
<wBasInt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasInt>:
push   %rax
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasInt() {
%1 = call i64 (...) @wPopNumber()
%2 = trunc i64 %1 to i32
%3 = call i32 @wPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBasInt() {
%1 = tail call i64 (...) @wPopNumber()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @wPushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swap_le32(void *, void *);
void swap_le32_num(void *s, void *d, int n) {
  int i;
  for (i = 0; i < n; i++, s += 32 / 8, d += 32 / 8)
    swap_le32(s, d);
}


x86 assembly (clang, -O0):
<swap_le32_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1169 <swap_le32_num+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <swap_le32@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    112a <swap_le32_num+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_le32_num>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    1149 <swap_le32_num+0x39>
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <swap_le32@plt>
add    $0x4,%rbp
add    $0x4,%rbx
add    $0xffffffff,%r14d
jne    1130 <swap_le32_num+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @swap_le32_num(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = call i32 @swap_le32(i8* %13, i8* %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i8*, i8** %4
%20 = getelementptr i8, i8* %19, i64 4
store i8* %20, i8** %4
%21 = load i8*, i8** %5
%22 = getelementptr i8, i8* %21, i64 4
store i8* %22, i8** %5
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @swap_le32_num(i8* %0, i8* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ 0, %3 ]
%7 = phi i8* [ %11, %5 ], [ %0, %3 ]
%8 = phi i8* [ %12, %5 ], [ %1, %3 ]
%9 = tail call i32 @swap_le32(i8* %7, i8* %8)
%10 = add nuw nsw i32 %6, 1
%11 = getelementptr i8, i8* %7, i64 4
%12 = getelementptr i8, i8* %8, i64 4
%13 = icmp eq i32 %10, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x_root;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
int get_XButtonEvent_x_root(void *_p) {
  return (int)((XButtonEvent *)_p)->x_root;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XButtonEvent_x_root(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XButtonEvent_x_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ mkstemps(char *, int /*<<< orphan*/);
char *mkdtemp(char *template) {
  if (mkstemps(template, 0)) {
    return NULL;
  } else {
    return template;
  }
}


x86 assembly (clang, -O0):
<mkdtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <mkstemps@plt>
cmp    $0x0,%rax
je     113e <mkdtemp+0x2e>
movq   $0x0,-0x8(%rbp)
jmp    1146 <mkdtemp+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdtemp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <mkstemps@plt>
test   %rax,%rax
cmove  %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @mkdtemp(i8* %0) {
%2 = tail call i64 @mkstemps(i8* %0, i32 0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* %0, i8* null
ret i8* %4
}