xunge/DecIR huggingface dataset:
unsigned geom_imax3d(const double v[3]) {
  unsigned i = 0;
  if (v[1] > v[i]) {
    i = 1;
  }
  if (v[2] > v[i]) {
    i = 2;
  }
  return i;
}


x86 assembly (clang, -O0):
<geom_imax3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1131 <geom_imax3d+0x31>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1153 <geom_imax3d+0x53>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_imax3d>:
movsd  0x8(%rdi),%xmm0
xor    %ecx,%ecx
ucomisd (%rdi),%xmm0
seta   %cl
movsd  0x10(%rdi),%xmm0
ucomisd (%rdi,%rcx,8),%xmm0
mov    $0x2,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @geom_imax3d(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = load double, double* %0
%5 = fcmp ogt double %3, %4
%6 = zext i1 %5 to i32
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = zext i1 %5 to i64
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = load double, double* %10
%12 = fcmp ogt double %8, %11
%13 = select i1 %12, i32 2, i32 %6
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ napms(int);
int win_retard(int ms) {
  napms(ms);
  return (0);
}


x86 assembly (clang, -O0):
<win_retard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <napms@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @win_retard(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @napms(i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @win_retard(i32 %0) {
%2 = tail call i32 @napms(i32 %0)
ret i32 0
}
/* Type definitions */
struct depmod {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ depmod_symbol_add(struct depmod *, char *,
                                     int /*<<< orphan*/, int /*<<< orphan*/ *);
void depmod_add_fake_syms(struct depmod *depmod) {
  depmod_symbol_add(depmod, "__this_module", 0, NULL);
  depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", 0, NULL);
}


x86 assembly (clang, -O0):
<depmod_add_fake_syms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <depmod_symbol_add@plt>
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <depmod_symbol_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<depmod_add_fake_syms>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <depmod_symbol_add@plt>
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <depmod_symbol_add@plt>

LLVM IR (-O0):
%struct.depmod = type { i32 }
@.str = [14 x i8] c"__this_module\00"
@.str.1 = [22 x i8] c"_GLOBAL_OFFSET_TABLE_\00"
define void @depmod_add_fake_syms(%struct.depmod* %0) {
%2 = alloca %struct.depmod*
store %struct.depmod* %0, %struct.depmod** %2
%3 = load %struct.depmod*, %struct.depmod** %2
%4 = call i32 @depmod_symbol_add(%struct.depmod* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0, i32* null)
%5 = load %struct.depmod*, %struct.depmod** %2
%6 = call i32 @depmod_symbol_add(%struct.depmod* %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null)
ret void
}

LLVM IR (-O2):
%struct.depmod = type { i32 }
@.str = [14 x i8] c"__this_module\00"
@.str.1 = [22 x i8] c"_GLOBAL_OFFSET_TABLE_\00"
define void @depmod_add_fake_syms(%struct.depmod* %0) {
%2 = tail call i32 @depmod_symbol_add(%struct.depmod* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 0, i32* null)
%3 = tail call i32 @depmod_symbol_add(%struct.depmod* %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int singleNumber(int *, int);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  int nums[5] = {0, 0, 3, 4, 3};
  int res = singleNumber(nums, 5);
  printf("single 数字:%d\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0xee5(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee2(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xee0(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1030 <singleNumber@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
mov    0xeca(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <singleNumber@plt>
lea    0xeab(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@__const.main.nums = [5 x i32] [i32 0, i32 0, i32 3, i32 4, i32 3]
@.str.1 = [18 x i8] c"single \E6\95\B0\E5\AD\97:%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = bitcast [5 x i32]* %6 to i8*
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%11 = call i32 @singleNumber(i32* %10, i32 5)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [5 x i32] [i32 0, i32 0, i32 3, i32 4, i32 3]
@.str.1 = [18 x i8] c"single \E6\95\B0\E5\AD\97:%d\0A\00"
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = bitcast [5 x i32]* %3 to i8*
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%7 = call i32 @singleNumber(i32* %6, i32 5)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((hotpatch(2))) void hp1(void) { printf("hello, world!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define void @hp1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *memchr(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void nullpointerMemchr3(char *p) {
  char *s = 0;
  p = memchr(s, 0, strlen(s));
}


x86 assembly (clang, -O0):
<nullpointerMemchr3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memchr@plt>
mov    %rax,-0x8(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nullpointerMemchr3>:
push   %rax
xor    %edi,%edi
call   1030 <strlen@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %eax,%edx
pop    %rax
jmp    1040 <memchr@plt>

LLVM IR (-O0):
define void @nullpointerMemchr3(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = call i8* @memchr(i8* %4, i32 0, i32 %6)
store i8* %7, i8** %2
ret void
}

LLVM IR (-O2):
define void @nullpointerMemchr3(i8* nocapture readnone %0) {
%2 = tail call i32 @strlen(i8* null)
%3 = tail call i8* @memchr(i8* null, i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char const *, char);
bool is_valid_tag(const char *tag) {
  return !strchr(tag, ':') && !strchr(tag, ' ');
}


x86 assembly (clang, -O0):
<is_valid_tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1153 <is_valid_tag+0x43>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_tag>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1128 <is_valid_tag+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_valid_tag(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strchr(i8* %3, i8 signext 58)
%5 = icmp ne i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strchr(i8* %7, i8 signext 32)
%9 = icmp ne i32 %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):
define i32 @is_valid_tag(i8* %0) {
%2 = tail call i32 @strchr(i8* %0, i8 signext 58)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @strchr(i8* %0, i8 signext 32)
%6 = icmp eq i32 %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
}
void CheckNLipids(const int nLipidsPerEdgeXY, const int nLipids) {
  if (((nLipidsPerEdgeXY) * (nLipidsPerEdgeXY)) * 2 != nLipids) {
    printf("Error in InitLipidBilayer(): the requested number of lipids is not "
           "valid! Exiting...\n");
    printf("The total number of lipids nLipids should be such that sqrt( "
           "nLipids / 2 ) is an integer. Exiting...\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<CheckNLipids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
shl    $0x1,%eax
cmp    -0x8(%rbp),%eax
je     1164 <CheckNLipids+0x44>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckNLipids>:
imul   %edi,%edi
add    %edi,%edi
cmp    %esi,%edi
jne    112a <CheckNLipids+0xa>
ret
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [86 x i8] c"Error in InitLipidBilayer(): the requested number of lipids is not valid! Exiting...\0A\00"
@.str.1 = [102 x i8] c"The total number of lipids nLipids should be such that sqrt( nLipids / 2 ) is an integer. Exiting...\0A\00"
define void @CheckNLipids(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
%8 = mul nsw i32 %7, 2
%9 = load i32, i32* %4
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.1, i64 0, i64 0))
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@str = [85 x i8] c"Error in InitLipidBilayer(): the requested number of lipids is not valid! Exiting...\00"
@str.2 = [101 x i8] c"The total number of lipids nLipids should be such that sqrt( nLipids / 2 ) is an integer. Exiting...\00"
define void @CheckNLipids(i32 %0, i32 %1) {
%3 = shl i32 %0, 1
%4 = mul i32 %3, %0
%5 = icmp eq i32 %4, %1
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([101 x i8], [101 x i8]* @str.2, i64 0, i64 0))
tail call void @exit(i32 0)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
unsigned int read(int /*<<< orphan*/, char *, int);
int getc() {
  char ans;
  unsigned int c = 0;
  do {
    c = read(0, &ans, 1);
  } while (c == 0);
  return ans;
}


x86 assembly (clang, -O0):
<getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
xor    %edi,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111f <getc+0xf>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc>:
push   %rbx
sub    $0x10,%rsp
lea    0xf(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %eax,%eax
je     1120 <getc+0x10>
movsbl 0xf(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getc() {
%1 = alloca i8
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %5, %0
%4 = call i32 @read(i32 0, i8* %1, i32 1)
store i32 %4, i32* %2
br label %5
5: ; preds = %3
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %3, label %8
8: ; preds = %5
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @getc() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i32 @read(i32 0, i8* %1, i32 1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, char, double);
void fig09_11() {
  printf("%10s%10d%10c%10f\n\n", "hello", 7, 'a', 1.23);
  printf("%-10s%-10d%-10c%-10f\n", "hello", 7, 'a', 1.23);
}


x86 assembly (clang, -O0):
<fig09_11>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
lea    0xef9(%rip),%rsi
mov    $0x7,%edx
mov    $0x61,%ecx
movsd  0xecc(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x7,%edx
mov    $0x61,%ecx
movsd  0xea7(%rip),%xmm0
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fig09_11>:
push   %rbx
lea    0xef0(%rip),%rdi
lea    0xefc(%rip),%rbx
movsd  0xed9(%rip),%xmm0
mov    %rbx,%rsi
mov    $0x7,%edx
mov    $0x61,%ecx
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
mov    $0x7,%edx
mov    $0x61,%ecx
movsd  0xeab(%rip),%xmm0
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"%10s%10d%10c%10f\0A\0A\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [22 x i8] c"%-10s%-10d%-10c%-10f\0A\00"
define void @fig09_11() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 7, i8 signext 97, double 1.230000e+00)
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 7, i8 signext 97, double 1.230000e+00)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%10s%10d%10c%10f\0A\0A\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [22 x i8] c"%-10s%-10d%-10c%-10f\0A\00"
define void @fig09_11() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 7, i8 signext 97, double 1.230000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 7, i8 signext 97, double 1.230000e+00)
ret void
}
void gdk_device_free_history() {}


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

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

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

LLVM IR (-O2):
define void @gdk_device_free_history() {
ret void
}
int ptdump_register(struct ptdump_info *info, const char *name) { return 0; }


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

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

LLVM IR (-O0):
%struct.ptdump_info = type opaque
define i32 @ptdump_register(%struct.ptdump_info* %0, i8* %1) {
%3 = alloca %struct.ptdump_info*
%4 = alloca i8*
store %struct.ptdump_info* %0, %struct.ptdump_info** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.ptdump_info = type opaque
define i32 @ptdump_register(%struct.ptdump_info* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t get_TCP_dst_port_from_TCP_header(uint8_t *tcp_packet) {
  return (tcp_packet[2] << 8) + tcp_packet[3];
}


x86 assembly (clang, -O0):
<get_TCP_dst_port_from_TCP_header>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
add    0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_TCP_dst_port_from_TCP_header>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
add    0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_TCP_dst_port_from_TCP_header(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 3
%9 = load i32, i32* %8
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_TCP_dst_port_from_TCP_header(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
%7 = add nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(unsigned char const *, unsigned char const *, int);
int cdiUUIDIsNull(const unsigned char uuid[16]) {
  static const unsigned char uuid_nil[16];
  return !memcmp(uuid, uuid_nil, 16);
}


x86 assembly (clang, -O0):
<cdiUUIDIsNull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x10,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdiUUIDIsNull>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x10,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@cdiUUIDIsNull.uuid_nil = internal constant [16 x i8] zeroinitializer
define i32 @cdiUUIDIsNull(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memcmp(i8* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @cdiUUIDIsNull.uuid_nil, i64 0, i64 0), i32 16)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@cdiUUIDIsNull.uuid_nil = internal constant [16 x i8] zeroinitializer
define i32 @cdiUUIDIsNull(i8* %0) {
%2 = tail call i32 @memcmp(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @cdiUUIDIsNull.uuid_nil, i64 0, i64 0), i32 16)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void free_files(char **array, int size) {
  int i;
  for (i = 0; i < size; i++) {
    free(array[i]);
  }
  free(array);
}


x86 assembly (clang, -O0):
<free_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_files+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_files+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_files>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_files+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_files+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_files(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
float ANTweenTimingFunctionExpoInOut(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionExpoInOut(float time, float duration) {
  return ANTweenTimingFunctionExpoInOut(time, 0, 1, duration);
}


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

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionExpoInOut>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionExpoInOut@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionExpoInOut(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionExpoInOut(float %0, i32 0, i32 1, float %1)
ret float %3
}
unsigned short *wnn_Strcat(s1, s2)
register unsigned short *s1;
register unsigned short *s2;
{
  register unsigned short *d;
  for (d = s1; *d++ != 0;)
    ;
  for (--d; (*d++ = *s2++) != 0;)
    ;
  return s1;
}


x86 assembly (clang, -O0):
<wnn_Strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x18(%rbp)
movzwl (%rax),%eax
cmp    $0x0,%eax
je     1134 <wnn_Strcat+0x34>
jmp    1114 <wnn_Strcat+0x14>
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffffe,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%ax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x2,%rdx
mov    %rdx,-0x18(%rbp)
mov    %ax,(%rcx)
movzwl %ax,%eax
cmp    $0x0,%eax
je     1175 <wnn_Strcat+0x75>
jmp    1140 <wnn_Strcat+0x40>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wnn_Strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpw   $0x0,(%rcx)
lea    0x2(%rcx),%rcx
jne    1110 <wnn_Strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax)
movzwl (%rsi,%rdx,1),%edi
mov    %di,-0x2(%rcx,%rdx,1)
add    $0x2,%rdx
test   %di,%di
jne    1120 <wnn_Strcat+0x20>
ret

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

LLVM IR (-O2):
define i16* @wnn_Strcat(i16* returned %0, i16* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i16* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i16, i16* %4, i64 1
%6 = load i16, i16* %4
%7 = icmp eq i16 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i16* [ %11, %8 ], [ %1, %3 ]
%10 = phi i16* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i16, i16* %9, i64 1
%12 = load i16, i16* %9
%13 = getelementptr inbounds i16, i16* %10, i64 1
store i16 %12, i16* %10
%14 = icmp eq i16 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i16* %0
}
/* Variables and functions */
unsigned long get_error_values(int /*<<< orphan*/, int /*<<< orphan*/,
                               char const **, int *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
unsigned long ERR_peek_error_line(const char **file, int *line) {
  return (get_error_values(0, 0, file, line, NULL, NULL));
}


x86 assembly (clang, -O0):
<ERR_peek_error_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%r9d
mov    %esi,%edi
mov    %r9,%r8
call   1030 <get_error_values@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERR_peek_error_line>:
mov    %rsi,%rcx
mov    %rdi,%rdx
xor    %edi,%edi
xor    %esi,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <get_error_values@plt>

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

LLVM IR (-O2):
define i64 @ERR_peek_error_line(i8** %0, i32* %1) {
%3 = tail call i64 @get_error_values(i32 0, i32 0, i8** %0, i32* %1, i32* null, i32* null)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "lut2ppm file.lut (outputs file.lut.ppm file.lut.control_points)\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [65 x i8] c"lut2ppm file.lut (outputs file.lut.ppm file.lut.control_points)\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [65 x i8] c"lut2ppm file.lut (outputs file.lut.ppm file.lut.control_points)\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void *strndup(char const *, size_t);
void *xstrndup(const char *str, size_t n) {
  void *ret = strndup(str, n);
  if (!ret)
    errx(1, "Malloc failed");
  return ret;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strndup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <xstrndup+0x3d>
mov    $0x1,%edi
lea    0xea8(%rip),%rsi
call   1030 <errx@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %rbx
call   1040 <strndup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xstrndup+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Malloc failed\00"
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @strndup(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @errx(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"Malloc failed\00"
define noalias i8* @xstrndup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @strndup(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void GetAnatomicalLengths(double *anatLengths) {}


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

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

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

LLVM IR (-O2):
define void @GetAnatomicalLengths(double* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_RFM_RXD_PIN() { set_io_bit(0x37, 2); }


x86 assembly (clang, -O0):
<TOSH_SET_RFM_RXD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x37,%edi
mov    $0x2,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_RFM_RXD_PIN>:
mov    $0x37,%edi
mov    $0x2,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_RFM_RXD_PIN() {
%1 = call i32 @set_io_bit(i32 55, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_RFM_RXD_PIN() {
%1 = tail call i32 @set_io_bit(i32 55, i32 2)
ret void
}
unsigned int util_string_hash32(const char *str) {
  unsigned int hash = 0;
  while (str[0] != '\0') {
    hash += str[0] << 4;
    hash += str[0] >> 4;
    hash *= 11;
    str++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<util_string_hash32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1157 <util_string_hash32+0x57>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x4,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sar    $0x4,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0xb,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <util_string_hash32+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_string_hash32>:
mov    (%rdi),%cl
test   %cl,%cl
je     1131 <util_string_hash32+0x31>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
add    %eax,%edx
sar    $0x4,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%eax
lea    (%rcx,%rax,2),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <util_string_hash32+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @util_string_hash32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %15, %4 ], [ %2, %1 ]
%6 = phi i32 [ %13, %4 ], [ 0, %1 ]
%7 = phi i8* [ %14, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = shl nsw i32 %8, 4
%10 = add i32 %9, %6
%11 = ashr i32 %8, 4
%12 = add i32 %10, %11
%13 = mul i32 %12, 11
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %1
%18 = phi i32 [ 0, %1 ], [ %13, %4 ]
ret i32 %18
}
int dnacomplement(char *file) {}


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

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

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

LLVM IR (-O2):
define i32 @dnacomplement(i8* nocapture readnone %0) {
ret i32 undef
}
void CRYPTO_set_locked_mem_functions(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_set_locked_mem_functions() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
char const *strerror(int /*<<< orphan*/);
const char *sd_locker_posix_error_message(void) { return strerror(errno); }


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

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

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

LLVM IR (-O2):
@errno = global i32 0
define i8* @sd_locker_posix_error_message() {
%1 = load i32, i32* @errno
%2 = tail call i8* @strerror(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned long long __udivdi3(unsigned long long n, unsigned long long d) {
  abort();
  return n + d;
}


x86 assembly (clang, -O0):
<__udivdi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__udivdi3>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i64 @__udivdi3(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i64 @__udivdi3(i64 %0, i64 %1) {
%3 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ gptrtp(char *, char *);
int /*<<< orphan*/ gsitp(char *, int);
void g_time_t() {
  gsitp("time_t", sizeof(time_t));
  gptrtp("time_t", "time_t");
}


x86 assembly (clang, -O0):
<g_time_t>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x4,%esi
call   1040 <gsitp@plt>
lea    0xec4(%rip),%rsi
mov    %rsi,%rdi
call   1030 <gptrtp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_time_t>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <gsitp@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <gptrtp@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"time_t\00"
define void @g_time_t() {
%1 = call i32 @gsitp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = call i32 @gptrtp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"time_t\00"
define void @g_time_t() {
%1 = tail call i32 @gsitp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @gptrtp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int length(int n) {
  if (n / 10 == 0) {
    return 1;
  } else if (n / 100 == 0) {
    return 2;
  } else if (n / 1000 == 0) {
    return 3;
  } else if (n / 10000 == 0) {
    return 4;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1127 <length+0x27>
movl   $0x1,-0x4(%rbp)
jmp    118e <length+0x8e>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1147 <length+0x47>
movl   $0x2,-0x4(%rbp)
jmp    118e <length+0x8e>
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1167 <length+0x67>
movl   $0x3,-0x4(%rbp)
jmp    118e <length+0x8e>
mov    -0x8(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1187 <length+0x87>
movl   $0x4,-0x4(%rbp)
jmp    118e <length+0x8e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
lea    0x9(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x13,%ecx
jb     1144 <length+0x44>
lea    0x63(%rdi),%ecx
mov    $0x2,%eax
cmp    $0xc7,%ecx
jb     1144 <length+0x44>
lea    0x3e7(%rdi),%ecx
mov    $0x3,%eax
cmp    $0x7cf,%ecx
jb     1144 <length+0x44>
add    $0x270f,%edi
xor    %eax,%eax
cmp    $0x4e1f,%edi
setb   %al
shl    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @length(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sdiv i32 %4, 10
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %24
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 100
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %2
br label %24
13: ; preds = %8
%14 = load i32, i32* %3
%15 = sdiv i32 %14, 1000
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 3, i32* %2
br label %24
18: ; preds = %13
%19 = load i32, i32* %3
%20 = sdiv i32 %19, 10000
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 4, i32* %2
br label %24
23: ; preds = %18
store i32 0, i32* %2
br label %24
24: ; preds = %23, %22, %17, %12, %7
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @length(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, 99
%6 = icmp ult i32 %5, 199
br i1 %6, label %14, label %7
7: ; preds = %4
%8 = add i32 %0, 999
%9 = icmp ult i32 %8, 1999
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = add i32 %0, 9999
%12 = icmp ult i32 %11, 19999
%13 = select i1 %12, i32 4, i32 0
br label %14
14: ; preds = %10, %7, %4, %1
%15 = phi i32 [ 1, %1 ], [ 2, %4 ], [ 3, %7 ], [ %13, %10 ]
ret i32 %15
}
int test_imm_1Cuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x1C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Cuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 120259084288
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void b_smp_lock(unsigned long ptr) {
  asm volatile("call 0x001001B8" : : "a"(ptr));
}


x86 assembly (clang, -O0):
<b_smp_lock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
call   1001b8 <completed.0+0xfc198>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_smp_lock>:
mov    %rdi,%rax
call   1001b8 <completed.0+0xfc198>
ret

LLVM IR (-O0):
define void @b_smp_lock(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @b_smp_lock(i64 %0) {
tail call void asm sideeffect "call 0x001001B8", "{ax},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Variables and functions */
scalar_t__ unlink(char const *);
int /*<<< orphan*/ vperror(char *, char const *);
void remove_pidfile(const char *pid_file) {
  if (pid_file == NULL)
    return;
  if (unlink(pid_file) != 0) {
    vperror("Could not remove the pid file %s", pid_file);
  }
}


x86 assembly (clang, -O0):
<remove_pidfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <remove_pidfile+0x1c>
jmp    115f <remove_pidfile+0x3f>
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
je     115f <remove_pidfile+0x3f>
mov    -0x8(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <vperror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_pidfile>:
push   %rbx
test   %rdi,%rdi
je     1143 <remove_pidfile+0x23>
mov    %rdi,%rbx
call   1030 <unlink@plt>
test   %rax,%rax
je     1143 <remove_pidfile+0x23>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <vperror@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Could not remove the pid file %s\00"
define void @remove_pidfile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %13
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @unlink(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = call i32 @vperror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %5, %10, %6
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Could not remove the pid file %s\00"
define void @remove_pidfile(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @unlink(i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @vperror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %1, %6, %3
ret void
}
extern long double __copysignl(long double x, long double y) {
  return __builtin_copysignl(x, y);
}


x86 assembly (clang, -O0):
<__copysignl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x30(%rbp)
fabs
fld    %st(0)
fchs
mov    -0x27(%rbp),%al
test   $0x80,%al
fxch   %st(1)
fcmovne %st(1),%st
fstp   %st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__copysignl>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fstpt  -0x18(%rsp)
fabs
testb  $0x80,-0xf(%rsp)
fld    %st(0)
fchs
fxch   %st(1)
fcmovne %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @__copysignl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call x86_fp80 @llvm.copysign.f80(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @__copysignl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @llvm.copysign.f80(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}