xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ dst_ut_int_rand();
float dst_ut_float_rand() { return (float)dst_ut_int_rand() / (float)32767; }


x86 assembly (clang, -O0):
<dst_ut_float_rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dst_ut_int_rand@plt>
cvtsi2ss %rax,%xmm0
movss  0xed8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dst_ut_float_rand>:
push   %rax
xor    %eax,%eax
call   1030 <dst_ut_int_rand@plt>
cvtsi2ss %rax,%xmm0
divss  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dst_ut_float_rand() {
%1 = call i64 (...) @dst_ut_int_rand()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 3.276700e+04
ret float %3
}

LLVM IR (-O2):
define float @dst_ut_float_rand() {
%1 = tail call i64 (...) @dst_ut_int_rand()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 3.276700e+04
ret float %3
}
/* Variables and functions */
__attribute__((always_)) bool IsNumber(char C) {
  bool Result = (((C >= '0') && (C <= '9')) || C == '-' || C == '.');
  return Result;
}


x86 assembly (clang, -O0):
<IsNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <IsNumber+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x9(%rbp)
jle    1148 <IsNumber+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
je     1148 <IsNumber+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNumber>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
add    $0xd3,%dil
cmp    $0x2,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IsNumber(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %19, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 46
br label %19
19: ; preds = %15, %11, %7
%20 = phi i1 [ true, %11 ], [ true, %7 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @IsNumber(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = add i8 %0, -45
%5 = icmp ult i8 %4, 2
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ myfunc();
int main() { myfunc(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <myfunc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @myfunc()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @myfunc()
ret i32 0
}
int HEX_CheckType(const char *dummy) {
  return 0;
  ;
}


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

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

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

LLVM IR (-O2):
define i32 @HEX_CheckType(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x = 100;
  printf("x的值是:%d\n", x);
  printf("x所占空间大小是:%ld\n", sizeof x);
  printf("x的地址是:%p\n", &x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x64,0x4(%rsp)
lea    0xee0(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"x\E7\9A\84\E5\80\BC\E6\98\AF:%d\0A\00"
@.str.1 = [28 x i8] c"x\E6\89\80\E5\8D\A0\E7\A9\BA\E9\97\B4\E5\A4\A7\E5\B0\8F\E6\98\AF:%ld\0A\00"
@.str.2 = [18 x i8] c"x\E7\9A\84\E5\9C\B0\E5\9D\80\E6\98\AF:%p\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 100, i32* %1
%2 = load i32, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i64 4)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"x\E7\9A\84\E5\80\BC\E6\98\AF:%d\0A\00"
@.str.1 = [28 x i8] c"x\E6\89\80\E5\8D\A0\E7\A9\BA\E9\97\B4\E5\A4\A7\E5\B0\8F\E6\98\AF:%ld\0A\00"
@.str.2 = [18 x i8] c"x\E7\9A\84\E5\9C\B0\E5\9D\80\E6\98\AF:%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 100, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 100)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i64 4)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
int icasetest();
int main(int argc, char **argv) { return icasetest(); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @icasetest()
ret i32 %3
}
/* Variables and functions */
scalar_t__ printf(char *, char *, char *);
int print_version(void) {
  return printf("%s\n"
                "Copyright (C) %s.\n"
                "License GPLv3+: GNU GPL version 3 or later "
                "<http://gnu.org/licenses/gpl.html>.\n"
                "This is free software: you are free to change and "
                "redistribute it.\n"
                "There is NO WARRANTY, to the extent permitted by law.\n"
                "\n"
                "Written by Mattias Andrée.\n",
                "scrotty"
                " "
                "development-version",
                "2014, 2015 Mattias Andrée") < 0
             ? -1
             : 0;
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xfd9(%rip),%rsi
lea    0xfee(%rip),%rdx
call   1030 <printf@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xfdc(%rip),%rsi
lea    0xff1(%rip),%rdx
call   1030 <printf@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [251 x i8] c"%s\0ACopyright (C) %s.\0ALicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\0AWritten by Mattias Andr\C3\A9e.\0A\00"
@.str.1 = [28 x i8] c"scrotty development-version\00"
@.str.2 = [27 x i8] c"2014, 2015 Mattias Andr\C3\A9e\00"
define i32 @print_version() {
%1 = call i64 @printf(i8* getelementptr inbounds ([251 x i8], [251 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 -1, i32 0
ret i32 %4
}

LLVM IR (-O2):
@.str = [251 x i8] c"%s\0ACopyright (C) %s.\0ALicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\0AWritten by Mattias Andr\C3\A9e.\0A\00"
@.str.1 = [28 x i8] c"scrotty development-version\00"
@.str.2 = [27 x i8] c"2014, 2015 Mattias Andr\C3\A9e\00"
define i32 @print_version() {
%1 = tail call i64 @printf(i8* getelementptr inbounds ([251 x i8], [251 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%2 = ashr i64 %1, 63
%3 = trunc i64 %2 to i32
ret i32 %3
}
_Bool Int_safe_MINUS_mul(int x, int y, int *res) {
  return __builtin_smul_overflow(x, y, res);
}


x86 assembly (clang, -O0):
<Int_safe_MINUS_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   %eax,%edx
seto   %al
mov    %edx,(%rcx)
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_safe_MINUS_mul>:
imul   %esi,%edi
seto   %al
mov    %edi,(%rdx)
ret

LLVM IR (-O0):
define zeroext i1 @Int_safe_MINUS_mul(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, i1 } @llvm.smul.with.overflow.i32(i32 %7, i32 %8)
%11 = extractvalue { i32, i1 } %10, 1
%12 = extractvalue { i32, i1 } %10, 0
store i32 %12, i32* %9
ret i1 %11
}

LLVM IR (-O2):
define zeroext i1 @Int_safe_MINUS_mul(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = tail call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %0, i32 %1)
%5 = extractvalue { i32, i1 } %4, 1
%6 = extractvalue { i32, i1 } %4, 0
store i32 %6, i32* %2
ret i1 %5
}
int inbounds(int x, int y) { return x >= 0 && x < 7 && y >= 0 && y < 6; }


x86 assembly (clang, -O0):
<inbounds>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <inbounds+0x41>
xor    %eax,%eax
cmpl   $0x7,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jge    1141 <inbounds+0x41>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <inbounds+0x41>
cmpl   $0x6,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inbounds>:
cmp    $0x7,%edi
setb   %al
cmp    $0x6,%esi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @inbounds(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 7
%4 = icmp ult i32 %1, 6
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_filled_ellipse(int /*<<< orphan*/, float, float, float,
                                     float);
void g2_filled_ellipse_(float *dev, float *x, float *y, float *r1, float *r2) {
  g2_filled_ellipse(dtoi(*dev), *x, *y, *r1, *r2);
}


x86 assembly (clang, -O0):
<g2_filled_ellipse_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm3
call   1040 <g2_filled_ellipse@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_filled_ellipse_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
movss  (%rbx),%xmm0
movss  (%r12),%xmm1
movss  (%r15),%xmm2
movss  (%r14),%xmm3
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <g2_filled_ellipse@plt>

LLVM IR (-O0):
define void @g2_filled_ellipse_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = call i32 @dtoi(float %12)
%14 = load float*, float** %7
%15 = load float, float* %14
%16 = load float*, float** %8
%17 = load float, float* %16
%18 = load float*, float** %9
%19 = load float, float* %18
%20 = load float*, float** %10
%21 = load float, float* %20
%22 = call i32 @g2_filled_ellipse(i32 %13, float %15, float %17, float %19, float %21)
ret void
}

LLVM IR (-O2):
define void @g2_filled_ellipse_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = tail call i32 @dtoi(float %6)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = tail call i32 @g2_filled_ellipse(i32 %7, float %8, float %9, float %10, float %11)
ret void
}
void removecard(a, b) int a, b;
{
  move(b, a);
  printw("   ");
}


x86 assembly (clang, -O0):
<removecard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <move@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removecard>:
push   %rax
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <move@plt>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printw@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c" \00"
define void @removecard(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %1, i32 %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fmax(float, float);
float fmin(float, int /*<<< orphan*/);
float fclamp(float val, float min, float max) {
  return fmin(max, fmax(min, val));
}


x86 assembly (clang, -O0):
<fclamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
call   1040 <fmax@plt>
movss  -0x10(%rbp),%xmm0
mov    %eax,%edi
call   1030 <fmin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fclamp>:
push   %rax
movss  %xmm2,0x4(%rsp)
movaps %xmm0,%xmm2
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
call   1040 <fmax@plt>
movss  0x4(%rsp),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1030 <fmin@plt>

LLVM IR (-O0):
define float @fclamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %5
%9 = load float, float* %4
%10 = call i32 @fmax(float %8, float %9)
%11 = call float @fmin(float %7, i32 %10)
ret float %11
}

LLVM IR (-O2):
define float @fclamp(float %0, float %1, float %2) {
%4 = tail call i32 @fmax(float %1, float %0)
%5 = tail call float @fmin(float %2, i32 %4)
ret float %5
}
void GPIOPortG_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortG_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortG_Handler+0x9>
jmp    1109 <GPIOPortG_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortG_Handler>:
jmp    1100 <GPIOPortG_Handler>

LLVM IR (-O0):
define void @GPIOPortG_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortG_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ PTHREAD_CANCEL_ENABLE;
int /*<<< orphan*/ pthread_setcancelstate(int /*<<< orphan*/,
                                          int /*<<< orphan*/ *);
void ptcancel_en(void) { pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); }


x86 assembly (clang, -O0):
<ptcancel_en>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_setcancelstate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptcancel_en>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <pthread_setcancelstate@plt>

LLVM IR (-O0):
@PTHREAD_CANCEL_ENABLE = global i32 0
define void @ptcancel_en() {
%1 = load i32, i32* @PTHREAD_CANCEL_ENABLE
%2 = call i32 @pthread_setcancelstate(i32 %1, i32* null)
ret void
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ENABLE = global i32 0
define void @ptcancel_en() {
%1 = load i32, i32* @PTHREAD_CANCEL_ENABLE
%2 = tail call i32 @pthread_setcancelstate(i32 %1, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ matocsserv_want_to_be_privileged(int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ *);
void matocsserv_privileged_cleanup(void) {
  matocsserv_want_to_be_privileged(NULL, NULL);
}


x86 assembly (clang, -O0):
<matocsserv_privileged_cleanup>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <matocsserv_want_to_be_privileged@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<matocsserv_privileged_cleanup>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <matocsserv_want_to_be_privileged@plt>

LLVM IR (-O0):
define void @matocsserv_privileged_cleanup() {
%1 = call i32 @matocsserv_want_to_be_privileged(i32* null, i32* null)
ret void
}

LLVM IR (-O2):
define void @matocsserv_privileged_cleanup() {
%1 = tail call i32 @matocsserv_want_to_be_privileged(i32* null, i32* null)
ret void
}
void swap(int array[], int index1, int index2) {
  int temp = array[index1];
  array[index1] = array[index2];
  array[index2] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
_trap3() {}


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

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

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

LLVM IR (-O2):
define i32 @_trap3() {
ret i32 undef
}
char *skip_nonwhitespaces(char *str) {
  char *p;
  for (p = str; *p && *p != ' ' && *p != '\t' && *p != '\r' && *p != '\n'; ++p)
    ;
  return p;
}


x86 assembly (clang, -O0):
<skip_nonwhitespaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1174 <skip_nonwhitespaces+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1174 <skip_nonwhitespaces+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x11(%rbp)
je     1174 <skip_nonwhitespaces+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
mov    %al,-0x11(%rbp)
je     1174 <skip_nonwhitespaces+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1184 <skip_nonwhitespaces+0x84>
jmp    119a <skip_nonwhitespaces+0x9a>
jmp    1189 <skip_nonwhitespaces+0x89>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_nonwhitespaces+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_nonwhitespaces>:
mov    %rdi,%rax
movabs $0x100002601,%rcx
jmp    1114 <skip_nonwhitespaces+0x14>
nop
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1110 <skip_nonwhitespaces+0x10>
bt     %rdx,%rcx
jae    1110 <skip_nonwhitespaces+0x10>
ret

LLVM IR (-O0):
define i8* @skip_nonwhitespaces(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %33, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %30
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 32
br i1 %14, label %15, label %30
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 9
br i1 %19, label %20, label %30
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 13
br i1 %24, label %25, label %30
25: ; preds = %20
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 10
br label %30
30: ; preds = %25, %20, %15, %10, %5
%31 = phi i1 [ false, %20 ], [ false, %15 ], [ false, %10 ], [ false, %5 ], [ %29, %25 ]
br i1 %31, label %32, label %36
32: ; preds = %30
br label %33
33: ; preds = %32
%34 = load i8*, i8** %3
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %3
br label %5
36: ; preds = %30
%37 = load i8*, i8** %3
ret i8* %37
}

LLVM IR (-O2):
define i8* @skip_nonwhitespaces(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 32, label %7
i8 9, label %7
i8 13, label %7
i8 10, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2, %2, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_attr_destroy(int /*<<< orphan*/ *);
void pthread_attr_destroy_nrv(void *attr) {
  pthread_attr_destroy((pthread_attr_t *)attr);
}


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

x86 assembly (clang, -O2):
<pthread_attr_destroy_nrv>:
jmp    1030 <pthread_attr_destroy@plt>

LLVM IR (-O0):
define void @pthread_attr_destroy_nrv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @pthread_attr_destroy(i32* %4)
ret void
}

LLVM IR (-O2):
define void @pthread_attr_destroy_nrv(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @pthread_attr_destroy(i32* %2)
ret void
}
void __attribute__((weak)) usart2_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<usart2_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usart2_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.usart2_isr = [11 x i8] c"usart2_isr\00"
define weak void @usart2_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.usart2_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.usart2_isr = [11 x i8] c"usart2_isr\00"
define weak void @usart2_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.usart2_isr, i64 0, i64 0))
ret void
}
float ResDiv(float k1, float k2) {
  float k3 = k1 / (k1 + k2);
  return k3;
}


x86 assembly (clang, -O0):
<ResDiv>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
addss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResDiv>:
addss  %xmm0,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ResDiv(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fadd float %7, %8
%10 = fdiv float %6, %9
store float %10, float* %5
%11 = load float, float* %5
ret float %11
}

LLVM IR (-O2):
define float @ResDiv(float %0, float %1) {
%3 = fadd float %0, %1
%4 = fdiv float %0, %3
ret float %4
}
float PcToFrac(int pc) { return (float)pc / 100.0f; }


x86 assembly (clang, -O0):
<PcToFrac>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  0xeec(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<PcToFrac>:
cvtsi2ss %edi,%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @PcToFrac(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to float
%5 = fdiv float %4, 1.000000e+02
ret float %5
}

LLVM IR (-O2):
define float @PcToFrac(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = fdiv float %2, 1.000000e+02
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_RESPONSE;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_RESPONSE_it;
void OCSP_RESPONSE_free(OCSP_RESPONSE *a) {
  ASN1_item_free((ASN1_VALUE *)a, &OCSP_RESPONSE_it);
}


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

x86 assembly (clang, -O2):
<OCSP_RESPONSE_free>:
mov    0x2ed9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@OCSP_RESPONSE_it = global i32 0
define void @OCSP_RESPONSE_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @OCSP_RESPONSE_it)
ret void
}

LLVM IR (-O2):
@OCSP_RESPONSE_it = global i32 0
define void @OCSP_RESPONSE_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @OCSP_RESPONSE_it)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
typedef int /*<<< orphan*/ res_state;

/* Variables and functions */
int __libc_res_nquerydomain(int /*<<< orphan*/, char const *, char const *, int,
                            int, int /*<<< orphan*/ *, int,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *);
int res_nquerydomain(res_state statp, const char *name, const char *domain,
                     int class, int type, u_char *answer, int anslen) {
  return __libc_res_nquerydomain(statp, name, domain, class, type, answer,
                                 anslen, NULL, NULL, NULL, NULL, NULL);
}


x86 assembly (clang, -O0):
<res_nquerydomain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
xor    %r10d,%r10d
mov    %eax,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x20(%rsp)
movq   $0x0,0x28(%rsp)
call   1030 <__libc_res_nquerydomain@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<res_nquerydomain>:
sub    $0x38,%rsp
mov    0x40(%rsp),%eax
xorps  %xmm0,%xmm0
movups %xmm0,0x18(%rsp)
movups %xmm0,0x8(%rsp)
mov    %eax,(%rsp)
movq   $0x0,0x28(%rsp)
call   1030 <__libc_res_nquerydomain@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @res_nquerydomain(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
store i32 %0, i32* %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32* %5, i32** %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i8*, i8** %9
%17 = load i8*, i8** %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32*, i32** %13
%21 = load i32, i32* %14
%22 = call i32 @__libc_res_nquerydomain(i32 %15, i8* %16, i8* %17, i32 %18, i32 %19, i32* %20, i32 %21, i32* null, i32* null, i32* null, i32* null, i32* null)
ret i32 %22
}

LLVM IR (-O2):
define i32 @res_nquerydomain(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %5, i32 %6) {
%8 = tail call i32 @__libc_res_nquerydomain(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %5, i32 %6, i32* null, i32* null, i32* null, i32* null, i32* null)
ret i32 %8
}
/* Variables and functions */
int lace_builtin_execfd_main(unsigned int, char **, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
int main_execfd(unsigned argc, char **argv) {
  return lace_builtin_execfd_main(argc, argv, NULL, NULL);
}


x86 assembly (clang, -O0):
<main_execfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <lace_builtin_execfd_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_execfd>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <lace_builtin_execfd_main@plt>

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

LLVM IR (-O2):
define i32 @main_execfd(i32 %0, i8** %1) {
%3 = tail call i32 @lace_builtin_execfd_main(i32 %0, i8** %1, i32* null, i32* null)
ret i32 %3
}
/* Variables and functions */
int atoi(char *);
char *cfg_get_str(char *, char *);
int cfg_get_int(char *sec, char *ent) {
  char *val;
  val = cfg_get_str(sec, ent);
  if (NULL == val)
    return -1;
  return atoi(val);
}


x86 assembly (clang, -O0):
<cfg_get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <cfg_get_str@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
cmp    -0x20(%rbp),%rax
jne    1159 <cfg_get_int+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <cfg_get_int+0x45>
mov    -0x20(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_get_int>:
push   %rax
call   1030 <cfg_get_str@plt>
test   %rax,%rax
je     1134 <cfg_get_int+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cfg_get_int(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @cfg_get_str(i8* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp eq i8* null, %10
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -1, i32* %3
br label %16
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @cfg_get_int(i8* %0, i8* %1) {
%3 = tail call i8* @cfg_get_str(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @atoi(i8* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
void make_closure() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_cvtsi128_si64(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_srli_si128(int /*<<< orphan*/, int);
int64_t xx_hsum_epi64_si64(__m128i v_q) {
  v_q = _mm_add_epi64(v_q, _mm_srli_si128(v_q, 8));
  return _mm_cvtsi128_si64(v_q);
}


x86 assembly (clang, -O0):
<xx_hsum_epi64_si64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1040 <_mm_srli_si128@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_add_epi64@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_mm_cvtsi128_si64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xx_hsum_epi64_si64>:
push   %rbx
mov    %edi,%ebx
mov    $0x8,%esi
call   1040 <_mm_srli_si128@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <_mm_add_epi64@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <_mm_cvtsi128_si64@plt>

LLVM IR (-O0):
define i32 @xx_hsum_epi64_si64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @_mm_srli_si128(i32 %4, i32 8)
%6 = call i32 @_mm_add_epi64(i32 %3, i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @_mm_cvtsi128_si64(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @xx_hsum_epi64_si64(i32 %0) {
%2 = tail call i32 @_mm_srli_si128(i32 %0, i32 8)
%3 = tail call i32 @_mm_add_epi64(i32 %0, i32 %2)
%4 = tail call i32 @_mm_cvtsi128_si64(i32 %3)
ret i32 %4
}
unsigned int OscAddressGetNumberOfParts(const char *oscAddressPattern) {
  unsigned int numberOfParts = 0;
  while (*oscAddressPattern != '\0') {
    if (*oscAddressPattern == '/') {
      numberOfParts++;
    }
    oscAddressPattern++;
  }
  return numberOfParts;
}


x86 assembly (clang, -O0):
<OscAddressGetNumberOfParts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <OscAddressGetNumberOfParts+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1138 <OscAddressGetNumberOfParts+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <OscAddressGetNumberOfParts+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OscAddressGetNumberOfParts>:
xor    %eax,%eax
jmp    1117 <OscAddressGetNumberOfParts+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x2f,%cl
je     1110 <OscAddressGetNumberOfParts+0x10>
test   %cl,%cl
jne    1113 <OscAddressGetNumberOfParts+0x13>
ret

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

LLVM IR (-O2):
define i32 @OscAddressGetNumberOfParts(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i32 [ 0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
]
6: ; preds = %2
%7 = add i32 %4, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  short x;
};
typedef TYPE_1__ XArc;

/* Variables and functions */
void set_XArc_x(void *_p, short _v) { ((XArc *)_p)->x = (short)_v; }


x86 assembly (clang, -O0):
<set_XArc_x>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XArc_x>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i16 }
define void @set_XArc_x(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i16 %5, i16* %8
ret void
}

LLVM IR (-O2):
define void @set_XArc_x(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
int test_imm_21uint8_mem(unsigned char *val) {
  return ((*val) & (-0x21 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_21uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffdf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_21uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -33
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dps_close();
int /*<<< orphan*/ gci_close();
void io_close(void) {
  gci_close();
  dps_close();
}


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

x86 assembly (clang, -O2):
<io_close>:
push   %rax
xor    %eax,%eax
call   1030 <gci_close@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <dps_close@plt>

LLVM IR (-O0):
define void @io_close() {
%1 = call i32 (...) @gci_close()
%2 = call i32 (...) @dps_close()
ret void
}

LLVM IR (-O2):
define void @io_close() {
%1 = tail call i32 (...) @gci_close()
%2 = tail call i32 (...) @dps_close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("usage: iam_ut [-v] [-h] file\n"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"usage: iam_ut [-v] [-h] file\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"usage: iam_ut [-v] [-h] file\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pixel_avg_wxh(int /*<<< orphan*/ *, int,
                                 int /*<<< orphan*/ *, int, int, int);
void pixel_avg_4x8(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                   int i_stride_pix2) {
  pixel_avg_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 4, 8);
}


x86 assembly (clang, -O0):
<pixel_avg_4x8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x4,%r8d
mov    $0x8,%r9d
call   1030 <pixel_avg_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_avg_4x8>:
mov    $0x4,%r8d
mov    $0x8,%r9d
jmp    1030 <pixel_avg_wxh@plt>

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

LLVM IR (-O2):
define void @pixel_avg_4x8(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_avg_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 4, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void mergeSort(int arr[], int left, int right) {
  if (left < right) {
    int mid = (right + left) / 2;
    mergeSort(arr, left, mid);
    mergeSort(arr, mid + 1, right);
    merge(arr, left, mid, right);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <mergeSort+0x62>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %edx,%esi
jge    1172 <mergeSort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergeSort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergeSort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
void start_single() {}


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

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

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

LLVM IR (-O2):
define void @start_single() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lloptest2(long long, long long);
void lloptest(long long a, long long b) {
  lloptest2(a, b);
  lloptest2(b, a);
}


x86 assembly (clang, -O0):
<lloptest>:
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 <lloptest2@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <lloptest2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lloptest>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <lloptest2@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <lloptest2@plt>

LLVM IR (-O0):
define void @lloptest(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @lloptest2(i64 %5, i64 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = call i32 @lloptest2(i64 %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @lloptest(i64 %0, i64 %1) {
%3 = tail call i32 @lloptest2(i64 %0, i64 %1)
%4 = tail call i32 @lloptest2(i64 %1, i64 %0)
ret void
}