xunge/DecIR huggingface dataset:
int exact_square(int number) {
  int i;
  for (i = 0; i <= number; i++) {
    if (i * i == number)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1149 <exact_square+0x49>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1136 <exact_square+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1150 <exact_square+0x50>
jmp    113b <exact_square+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
test   %edi,%edi
js     1120 <exact_square+0x20>
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1123 <exact_square+0x23>
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1110 <exact_square+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %10, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %10, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 0, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %6 ]
ret i32 %11
}
int compute_true_airspeed(float *out_airspeed, float *out_variance) {
  *out_airspeed = 1.2345F;
  *out_variance = 0.0F;
  return 0;
}


x86 assembly (clang, -O0):
<compute_true_airspeed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0xee8(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_true_airspeed>:
movl   $0x3f9e0419,(%rdi)
movl   $0x0,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @compute_true_airspeed(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
store float 0x3FF3C08320000000, float* %5
%6 = load float*, float** %4
store float 0.000000e+00, float* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @compute_true_airspeed(float* nocapture writeonly %0, float* nocapture writeonly %1) {
store float 0x3FF3C08320000000, float* %0
store float 0.000000e+00, float* %1
ret i32 0
}
int __test() {
  int x = 3;
  int *foo = &x;
  return *foo;
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__test() {
ret i32 3
}
TMK_TEST(rcu_test_reserved_reg_name) {
  TMK_ASSERT_NULL(rcu_cre_test_reg("default-reg"));
}


x86 assembly (clang, -O0):
<TMK_TEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <rcu_cre_test_reg@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1030 <TMK_ASSERT_NULL@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TMK_TEST>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <rcu_cre_test_reg@plt>
mov    %eax,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <TMK_ASSERT_NULL@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"default-reg\00"
define i32 @TMK_TEST(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @rcu_cre_test_reg to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i32, ...) bitcast (i32 (...)* @TMK_ASSERT_NULL to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [12 x i8] c"default-reg\00"
define i32 @TMK_TEST(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @rcu_cre_test_reg to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @TMK_ASSERT_NULL to i32 (i32, ...)*)(i32 %2)
ret i32 undef
}
int do_196() { return 196; }


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

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

LLVM IR (-O0):
define i32 @do_196() {
ret i32 196
}

LLVM IR (-O2):
define i32 @do_196() {
ret i32 196
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%u\n", invert(3855, 7, 4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf0f,%edi
mov    $0x7,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf0f,%edi
mov    $0x7,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 3855, i32 7, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int stringstartswith(char *string, char *start) {
  while (*start != 0) {
    if (*string != *start)
      return (0);
    start += 1;
    string += 1;
  }
  return (1);
}


x86 assembly (clang, -O0):
<stringstartswith>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115b <stringstartswith+0x5b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     113e <stringstartswith+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1162 <stringstartswith+0x62>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <stringstartswith+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringstartswith>:
mov    (%rsi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <stringstartswith+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    %cl,(%rdi,%rdx,1)
jne    1123 <stringstartswith+0x23>
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <stringstartswith+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stringstartswith(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %12, %11 ], [ %1, %2 ]
%8 = phi i8* [ %13, %11 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %6
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i32 [ 1, %2 ], [ 1, %11 ], [ 0, %5 ]
ret i32 %17
}
/* Variables and functions */
scalar_t__ trap_Cvar_VariableValue(char *);
int ArenaServers_MaxPing(void) {
  int maxPing;
  maxPing = (int)trap_Cvar_VariableValue("cl_maxPing");
  if (maxPing < 100) {
    maxPing = 100;
  }
  return maxPing;
}


x86 assembly (clang, -O0):
<ArenaServers_MaxPing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <trap_Cvar_VariableValue@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1138 <ArenaServers_MaxPing+0x28>
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArenaServers_MaxPing>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <trap_Cvar_VariableValue@plt>
cmp    $0x65,%eax
mov    $0x64,%ecx
cmovl  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"cl_maxPing\00"
define i32 @ArenaServers_MaxPing() {
%1 = alloca i32
%2 = call i64 @trap_Cvar_VariableValue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = trunc i64 %2 to i32
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 100, i32* %1
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [11 x i8] c"cl_maxPing\00"
define i32 @ArenaServers_MaxPing() {
%1 = tail call i64 @trap_Cvar_VariableValue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = trunc i64 %1 to i32
%3 = icmp sgt i32 %2, 100
%4 = select i1 %3, i32 %2, i32 100
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sol_message_digest_shutdown();
void sol_crypto_shutdown(void) { sol_message_digest_shutdown(); }


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

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

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

LLVM IR (-O2):
define void @sol_crypto_shutdown() {
%1 = tail call i32 (...) @sol_message_digest_shutdown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_cmake_empty_comments() {
  test_parser_verify_parse(test_parser_sourcefile("cmake", " #\n"), "cmake", "",
                           "#\n", 0);
}


x86 assembly (clang, -O0):
<test_cmake_empty_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec2(%rip),%rdx
lea    0xeb9(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cmake_empty_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xecb(%rip),%rdx
lea    0xec2(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"cmake\00"
@.str.1 = [4 x i8] c" #\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [3 x i8] c"#\0A\00"
define void @test_cmake_empty_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"cmake\00"
@.str.1 = [4 x i8] c" #\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [3 x i8] c"#\0A\00"
define void @test_cmake_empty_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
int check_both_diagonals() {}


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

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

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

LLVM IR (-O2):
define i32 @check_both_diagonals() {
ret i32 undef
}
/* Variables and functions */
int _cnt(int, int, int);
int _space(int head, int tail, int size) { return _cnt(tail, head + 1, size); }


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

x86 assembly (clang, -O2):
<_space>:
mov    %esi,%eax
lea    0x1(%rdi),%esi
mov    %eax,%edi
jmp    1030 <_cnt@plt>

LLVM IR (-O0):
define i32 @_space(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* %5
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %6
%11 = call i32 @_cnt(i32 %7, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @_space(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %0, 1
%5 = tail call i32 @_cnt(i32 %1, i32 %4, i32 %2)
ret i32 %5
}
int sysloop_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sysloop_init() {
ret i32 0
}
/* Type definitions */
struct cluster_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cluster_cmdline_parser_release(struct cluster_args_info *);
void cluster_cmdline_parser_free(struct cluster_args_info *args_info) {
  cluster_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<cluster_cmdline_parser_free>:
jmp    1030 <cluster_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.cluster_args_info = type { i32 }
define void @cluster_cmdline_parser_free(%struct.cluster_args_info* %0) {
%2 = tail call i32 @cluster_cmdline_parser_release(%struct.cluster_args_info* %0)
ret void
}
int dec_to_binary(int num) {
  int bin = 0;
  int digit = 1;
  while (num > 0) {
    bin += (num % 2) * digit;
    num = num / 2;
    digit = digit * 10;
  }
  return bin;
}


x86 assembly (clang, -O0):
<dec_to_binary>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1150 <dec_to_binary+0x50>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <dec_to_binary+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_to_binary>:
xor    %eax,%eax
test   %edi,%edi
jle    1128 <dec_to_binary+0x28>
mov    $0x1,%ecx
mov    %edi,%edx
nopl   (%rax)
mov    %edi,%esi
and    $0x1,%esi
imul   %ecx,%esi
add    %esi,%eax
shr    %edx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
cmp    $0x1,%edi
mov    %edx,%edi
ja     1110 <dec_to_binary+0x10>
ret

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

LLVM IR (-O2):
define i32 @dec_to_binary(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ 1, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = phi i32 [ %10, %3 ], [ %0, %1 ]
%7 = and i32 %6, 1
%8 = mul nuw nsw i32 %4, %7
%9 = add nuw nsw i32 %8, %5
%10 = lshr i32 %6, 1
%11 = mul nsw i32 %4, 10
%12 = icmp ult i32 %6, 2
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %14
}
/* Variables and functions */
unsigned char *getccitt162(unsigned char *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
unsigned char *getccitt16(unsigned char *buffer, int start, int length) {
  unsigned char *temp = (unsigned char *)malloc(length);
  memcpy(temp, buffer + start, length);
  return getccitt162(temp, length);
}


x86 assembly (clang, -O0):
<getccitt16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    -0x10(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <getccitt162@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getccitt16>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r15d
mov    %rdi,%r14
mov    %edx,%edi
call   1050 <malloc@plt>
mov    %rax,%rbp
movslq %r15d,%rsi
add    %r14,%rsi
mov    %rax,%rdi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <getccitt162@plt>

LLVM IR (-O0):
define i8* @getccitt16(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 i32, i32* %6
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i32, i32* %6
%17 = call i32 @memcpy(i8* %11, i8* %15, i32 %16)
%18 = load i8*, i8** %7
%19 = load i32, i32* %6
%20 = call i8* @getccitt162(i8* %18, i32 %19)
ret i8* %20
}

LLVM IR (-O2):
define i8* @getccitt16(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @malloc(i32 %2)
%5 = inttoptr i64 %4 to i8*
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i32 @memcpy(i8* %5, i8* %7, i32 %2)
%9 = tail call i8* @getccitt162(i8* %5, i32 %2)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ fbtext_printf(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
void DEBUG(char *szString) {
  printf("DEBUG: %s\n", szString);
  fbtext_printf("DEBUG: %s\n", szString);
}


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

x86 assembly (clang, -O2):
<DEBUG>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fbtext_printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"DEBUG: %s\0A\00"
define void @DEBUG(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @fbtext_printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int ioperm(int, int, int);
int ec_init() {
  return (ioperm(0x66, 1, 1) != -1) && (ioperm(0x62, 1, 1) != -1);
}


x86 assembly (clang, -O0):
<ec_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x66,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <ioperm@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x1(%rbp)
je     1153 <ec_init+0x43>
mov    $0x62,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <ioperm@plt>
cmp    $0xffffffff,%eax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ec_init>:
push   %rax
mov    $0x66,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <ioperm@plt>
cmp    $0xffffffff,%eax
je     114a <ec_init+0x3a>
mov    $0x62,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <ioperm@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ec_init() {
%1 = call i32 @ioperm(i32 102, i32 1, i32 1)
%2 = icmp ne i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @ioperm(i32 98, i32 1, i32 1)
%5 = icmp ne i32 %4, -1
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ec_init() {
%1 = tail call i32 @ioperm(i32 102, i32 1, i32 1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @ioperm(i32 98, i32 1, i32 1)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
unsigned xrop3_9_0_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;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_9_0_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
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_9_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %eax,%edx
xor    $0xff,%edx
or     %ecx,%edx
not    %edx
not    %eax
and    %esi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_9_0_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 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_9_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = or i32 %6, %7
%9 = xor i32 %8, -1
%10 = xor i32 %4, -1
%11 = and i32 %10, %5
%12 = or i32 %11, %9
ret i32 %12
}
/* Variables and functions */
scalar_t__ is_in_set(char, char *);
int is_dna(char x) {
  return (is_in_set(x, "AGCTUNRYMKSWHBVD-agctunrymkswhbvd") &&
          !is_in_set(x, "-.#*~"));
}


x86 assembly (clang, -O0):
<is_dna>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rsi
movsbl -0x1(%rbp),%edi
call   1030 <is_in_set@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     115c <is_dna+0x4c>
lea    0xedb(%rip),%rsi
movsbl -0x1(%rbp),%edi
call   1030 <is_in_set@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dna>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rsi
call   1030 <is_in_set@plt>
test   %rax,%rax
je     1140 <is_dna+0x30>
movsbl %bl,%edi
lea    0xef4(%rip),%rsi
call   1030 <is_in_set@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"AGCTUNRYMKSWHBVD-agctunrymkswhbvd\00"
@.str.1 = [6 x i8] c"-.#*~\00"
define i32 @is_dna(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_in_set(i8 signext %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @is_in_set(i8 signext %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [34 x i8] c"AGCTUNRYMKSWHBVD-agctunrymkswhbvd\00"
@.str.1 = [6 x i8] c"-.#*~\00"
define i32 @is_dna(i8 signext %0) {
%2 = tail call i64 @is_in_set(i8 signext %0, i8* getelementptr inbounds ([34 x i8], [34 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 @is_in_set(i8 signext %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
float CG_DrawScores(float y) {
  float y1;
  y -= 16 + 8;
  y1 = y;
  return y1 - 8;
}


x86 assembly (clang, -O0):
<CG_DrawScores>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeee(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xeca(%rip),%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_DrawScores>:
addss  0xef8(%rip),%xmm0
addss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @CG_DrawScores(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 2.400000e+01
store float %5, float* %2
%6 = load float, float* %2
store float %6, float* %3
%7 = load float, float* %3
%8 = fsub float %7, 8.000000e+00
ret float %8
}

LLVM IR (-O2):
define float @CG_DrawScores(float %0) {
%2 = fadd float %0, -2.400000e+01
%3 = fadd float %2, -8.000000e+00
ret float %3
}
void mlx5e_ipsec_update_stats(struct mlx5e_priv *priv) {}


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

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

LLVM IR (-O0):
%struct.mlx5e_priv = type opaque
define void @mlx5e_ipsec_update_stats(%struct.mlx5e_priv* %0) {
%2 = alloca %struct.mlx5e_priv*
store %struct.mlx5e_priv* %0, %struct.mlx5e_priv** %2
ret void
}

LLVM IR (-O2):
%struct.mlx5e_priv = type opaque
define void @mlx5e_ipsec_update_stats(%struct.mlx5e_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ABDAY_2;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abday_2() { return nl_langinfo(ABDAY_2); }


x86 assembly (clang, -O0):
<langinfo_abday_2>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_abday_2>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ABDAY_2 = global i32 0
define i8* @langinfo_abday_2() {
%1 = load i32, i32* @ABDAY_2
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABDAY_2 = global i32 0
define i8* @langinfo_abday_2() {
%1 = load i32, i32* @ABDAY_2
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int abs(int);
int cmp_absintegers(const void *e1, const void *e2) {
  int *n1, *n2;
  n1 = (int *)e1;
  n2 = (int *)e2;
  return abs(*n1) - abs(*n2);
}


x86 assembly (clang, -O0):
<cmp_absintegers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1030 <abs@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_absintegers>:
mov    (%rdi),%eax
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
mov    (%rsi),%edx
mov    %edx,%eax
neg    %eax
cmovns %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_absintegers(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = call i32 @abs(i32 %12)
%14 = load i32*, i32** %6
%15 = load i32, i32* %14
%16 = call i32 @abs(i32 %15)
%17 = sub nsw i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @cmp_absintegers(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = tail call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = load i32, i32* %4
%8 = tail call i32 @llvm.abs.i32(i32 %7, i1 true)
%9 = sub nsw i32 %6, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int is_prime(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdin;
int main() {
  char string[100];
  fgets(string, 100, stdin);
  printf(" %d ", is_prime(string));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1040 <fgets@plt>
lea    -0x70(%rbp),%rdi
call   1050 <is_prime@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1050 <is_prime@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [5 x i8] c" %d \00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 100, i32 %3)
%5 = call i32 @is_prime(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int file_path_exists(const char *path) {
  struct stat s;
  return stat(path, &s);
}


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

x86 assembly (clang, -O2):
<file_path_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_path_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
ret i32 %5
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_path_exists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ expf(float);
float log1pf(int /*<<< orphan*/);
float logplogisticf(float x) { return -log1pf(expf(-x)); }


x86 assembly (clang, -O0):
<logplogisticf>:
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   1040 <expf@plt>
mov    %eax,%edi
call   1030 <log1pf@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logplogisticf>:
push   %rax
xorps  0xed8(%rip),%xmm0
call   1040 <expf@plt>
mov    %eax,%edi
call   1030 <log1pf@plt>
xorps  0xec5(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @logplogisticf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
%5 = call i32 @expf(float %4)
%6 = call float @log1pf(i32 %5)
%7 = fneg float %6
ret float %7
}

LLVM IR (-O2):
define float @logplogisticf(float %0) {
%2 = fneg float %0
%3 = tail call i32 @expf(float %2)
%4 = tail call float @log1pf(i32 %3)
%5 = fneg float %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ pclog(char *);
void iso_audio_stop() { pclog("iso_audio_stop stub\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"iso_audio_stop stub\0A\00"
define void @iso_audio_stop() {
%1 = call i32 @pclog(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"iso_audio_stop stub\0A\00"
define void @iso_audio_stop() {
%1 = tail call i32 @pclog(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
void g_unichar_type() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_type() {
ret void
}
int CalHZIndex(char *strHZ) { return (strHZ[0] + 127) * 255 + strHZ[1] + 128; }


x86 assembly (clang, -O0):
<CalHZIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x7f,%eax
imul   $0xff,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
add    %ecx,%eax
add    $0x80,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalHZIndex>:
movsbl (%rdi),%eax
mov    %eax,%ecx
shl    $0x8,%ecx
sub    %eax,%ecx
movsbl 0x1(%rdi),%eax
add    %ecx,%eax
add    $0x7f01,%eax
ret

LLVM IR (-O0):
define i32 @CalHZIndex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, 127
%8 = mul nsw i32 %7, 255
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = add nsw i32 %8, %12
%14 = add nsw i32 %13, 128
ret i32 %14
}

LLVM IR (-O2):
define i32 @CalHZIndex(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = mul nsw i32 %3, 255
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %4, 32513
%9 = add nsw i32 %8, %7
ret i32 %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void WatchdogEnable(uint32_t ui32Base) {
  ASSERT((ui32Base == 0x40000000) || (ui32Base == 0x40001000));
  (*((volatile uint32_t *)(ui32Base + 0x00000008))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<WatchdogEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x40000000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113a <WatchdogEnable+0x2a>
cmpl   $0x40001000,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%ecx
or     $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogEnable>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40000000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x1,0x8(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @WatchdogEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1073741824
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1073745920
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @ASSERT(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 8
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, 1
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @WatchdogEnable(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073741824
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 8
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = or i32 %9, 1
store volatile i32 %10, i32* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *const, char *);
void usage(FILE *const out) {
  fprintf(out, "Usage: corners [options] -I stl-binary.stl > corners.scad\n"
               "Options:\n"
               " -v | --verbose      Enable verbosity\n"
               " -i | --inset N      Inset mm\n"
               " -r | --radius N     Hole radius mm\n"
               " -I | --input file   Read binary STL from file\n"
               " -O | --output file  Write SVG to file\n"
               " -m | --model        Generate a 3D model instead of corners\n"
               "\n");
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x13e,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [319 x i8] c"Usage: corners [options] -I stl-binary.stl > corners.scad\0AOptions:\0A -v | --verbose Enable verbosity\0A -i | --inset N Inset mm\0A -r | --radius N Hole radius mm\0A -I | --input file Read binary STL from file\0A -O | --output file Write SVG to file\0A -m | --model Generate a 3D model instead of corners\0A\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [319 x i8] c"Usage: corners [options] -I stl-binary.stl > corners.scad\0AOptions:\0A -v | --verbose Enable verbosity\0A -i | --inset N Inset mm\0A -r | --radius N Hole radius mm\0A -I | --input file Read binary STL from file\0A -O | --output file Write SVG to file\0A -m | --model Generate a 3D model instead of corners\0A\0A\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str, i64 0, i64 0), i64 318, i64 1, i32* %0)
ret void
}
/* Variables and functions */
double log(scalar_t__);
scalar_t__ sqrt(double);
double asinh(double x) { return log(x + sqrt(x * x + 1.0)); }


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

x86 assembly (clang, -O2):
<asinh>:
push   %rax
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
addsd  0xece(%rip),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @asinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
%7 = call i64 @sqrt(double %6)
%8 = sitofp i64 %7 to double
%9 = fadd double %3, %8
%10 = fptosi double %9 to i64
%11 = call double @log(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @asinh(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, %0
%6 = fptosi double %5 to i64
%7 = tail call double @log(i64 %6)
ret double %7
}
char *StringEndOf(char *s) {
  while (*s)
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<StringEndOf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1126 <StringEndOf+0x26>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <StringEndOf+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @StringEndOf(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %3
}