xunge/DecIR huggingface dataset:
void X509V3_EXT_val_prn(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_val_prn() {
ret void
}
void reverse(int *nums, int l, int r) {
  int tmp = 0;
  while (l < r) {
    tmp = nums[l];
    nums[l] = nums[r];
    nums[r] = tmp;
    l++;
    r--;
  }
  return;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116a <reverse+0x6a>
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)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <reverse+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %edx,%esi
jge    112e <reverse+0x2e>
movslq %edx,%rax
movslq %esi,%rcx
add    $0xffffffffffffffff,%rax
xchg   %ax,%ax
mov    (%rdi,%rcx,4),%edx
mov    0x4(%rdi,%rax,4),%esi
mov    %esi,(%rdi,%rcx,4)
mov    %edx,0x4(%rdi,%rax,4)
add    $0x1,%rcx
lea    -0x1(%rax),%rdx
cmp    %rax,%rcx
mov    %rdx,%rax
jl     1110 <reverse+0x10>
ret

LLVM IR (-O0):
define void @reverse(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
store i32 0, i32* %7
br label %8
8: ; preds = %12, %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %36
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
%34 = load i32, i32* %6
%35 = add nsw i32 %34, -1
store i32 %35, i32* %6
br label %8
36: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @reverse(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %2 to i64
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %15, %8 ]
%10 = phi i64 [ %6, %5 ], [ %16, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %9
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %10
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %9, 1
%16 = add nsw i64 %10, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int strlen(char *);
char tolower(char);
void normalizedWord(char *word) {
  int i = 0, len = strlen(word);
  for (; i < len; i++) {
    word[i] = tolower(word[i]);
  }
}


x86 assembly (clang, -O0):
<normalizedWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1177 <normalizedWord+0x57>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <normalizedWord+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalizedWord>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %eax,%eax
jle    1157 <normalizedWord+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <normalizedWord+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @normalizedWord(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @tolower(i8 signext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help() {
  fprintf(stderr,
          "fastq-kmers [OPTION]... [FILE]...\n"
          "Print kmer counts for the given kmer size.\n"
          "Output is in two tab-seperated columns for kmer and frequency.\n\n"
          "Options:\n"
          "  -k NUM, --size=NUM      kmer size (default: 1)\n"
          "  -h, --help              print this message\n"
          "  -V, --version           output version information and exit\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [307 x i8] c"fastq-kmers [OPTION]... [FILE]...\0APrint kmer counts for the given kmer size.\0AOutput is in two tab-seperated columns for kmer and frequency.\0A\0AOptions:\0A -k NUM, --size=NUM kmer size (default: 1)\0A -h, --help print this message\0A -V, --version output version information and exit\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [307 x i8] c"fastq-kmers [OPTION]... [FILE]...\0APrint kmer counts for the given kmer size.\0AOutput is in two tab-seperated columns for kmer and frequency.\0A\0AOptions:\0A -k NUM, --size=NUM kmer size (default: 1)\0A -h, --help print this message\0A -V, --version output version information and exit\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0))
ret void
}
int decimal_width(int n) {
  int i;
  for (i = 1; n /= 10; ++i)
    ;
  return i;
}


x86 assembly (clang, -O0):
<decimal_width>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1138 <decimal_width+0x38>
jmp    112a <decimal_width+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <decimal_width+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimal_width>:
lea    0x9(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x13,%ecx
jb     1145 <decimal_width+0x45>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
lea    (%rcx,%rdx,1),%edi
add    $0x1,%eax
add    %edx,%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1120 <decimal_width+0x20>
ret

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

LLVM IR (-O2):
define i32 @decimal_width(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = sdiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = add nsw i32 %7, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ func(char *);
int main() { func("test1"); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <func@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"test1\00"
define i32 @main() {
%1 = call i32 @func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"test1\00"
define i32 @main() {
%1 = tail call i32 @func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void Zip_Interrupt_CPU_Disable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @Zip_Interrupt_CPU_Disable() {
ret void
}
/* Variables and functions */
double __nv_erfcx(double);
double erfcx(double __a) { return __nv_erfcx(__a); }


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

x86 assembly (clang, -O2):
<erfcx>:
jmp    1030 <__nv_erfcx@plt>

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

LLVM IR (-O2):
define double @erfcx(double %0) {
%2 = tail call double @__nv_erfcx(double %0)
ret double %2
}
int diag_l3_base_start(struct diag_l3_conn *d_l3_conn __attribute__((unused))) {
  return (0);
}


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

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

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

LLVM IR (-O2):
%struct.diag_l3_conn = type opaque
define i32 @diag_l3_base_start(%struct.diag_l3_conn* nocapture readnone %0) {
ret i32 0
}
int foo(char k, int N) {
  while (k < N) {
    int i = 0;
    int j = k;
    while (i < j) {
      i = i + 1;
      j = j - 1;
    }
    k = k + 1;
  }
  return k;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115a <foo+0x5a>
movl   $0x0,-0xc(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    114b <foo+0x4b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <foo+0x28>
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    110d <foo+0xd>
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
cmp    %esi,%edi
jge    1119 <foo+0x19>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%al
movsbl %al,%eax
cmp    %esi,%eax
jl     1110 <foo+0x10>
ret

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

LLVM IR (-O2):
define i32 @foo(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ %3, %2 ]
%7 = shl nsw i32 %6, 24
%8 = add i32 %7, 16777216
%9 = ashr exact i32 %8, 24
%10 = icmp slt i32 %9, %1
br i1 %10, label %5, label %11
11: ; preds = %5, %2
%12 = phi i32 [ %3, %2 ], [ %9, %5 ]
ret i32 %12
}
/* Variables and functions */
void *malloc(size_t);
void *am_malloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<am_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @am_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int stack_underflow(void) {
  printf("Parentheses/braces are not nested properly!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<stack_underflow>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<stack_underflow>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Parentheses/braces are not nested properly!\0A\00"
define i32 @stack_underflow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [44 x i8] c"Parentheses/braces are not nested properly!\00"
define i32 @stack_underflow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
float division(int a, int b) {
  float c;
  c = (float)a / b;
  return c;
}


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

x86 assembly (clang, -O2):
<division>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
divss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @division(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = fdiv float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
main() {
  char c[100];
  scanf("%s", c);
  printf("%s", c);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xec2(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @getch()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
int /*<<< orphan*/ hex2int(int /*<<< orphan*/, int);
int /*<<< orphan*/ l_askNbytes(int /*<<< orphan*/, char *, int /*<<< orphan*/,
                               int);
char *long2str(char *, int /*<<< orphan*/);
char *macjobftime(char *arg) {
  return long2str(arg, hex2int(l_askNbytes(get_string(arg), "5a", 0, 8), 8));
}


x86 assembly (clang, -O0):
<macjobftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
lea    0xe9a(%rip),%rsi
xor    %edx,%edx
mov    $0x8,%ecx
call   1030 <l_askNbytes@plt>
mov    %eax,%edi
mov    $0x8,%esi
call   1050 <hex2int@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1060 <long2str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macjobftime>:
push   %rbx
mov    %rdi,%rbx
call   1040 <get_string@plt>
lea    0xeb0(%rip),%rsi
mov    %eax,%edi
xor    %edx,%edx
mov    $0x8,%ecx
call   1030 <l_askNbytes@plt>
mov    %eax,%edi
mov    $0x8,%esi
call   1050 <hex2int@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1060 <long2str@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"5a\00"
define i8* @macjobftime(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @get_string(i8* %4)
%6 = call i32 @l_askNbytes(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 8)
%7 = call i32 @hex2int(i32 %6, i32 8)
%8 = call i8* @long2str(i8* %3, i32 %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"5a\00"
define i8* @macjobftime(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i32 @l_askNbytes(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 8)
%4 = tail call i32 @hex2int(i32 %3, i32 8)
%5 = tail call i8* @long2str(i8* %0, i32 %4)
ret i8* %5
}
/* Variables and functions */
char *str2nhex(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *str2hex(char *dest, char *src) {
  return str2nhex(dest, src, strlen(src));
}


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

x86 assembly (clang, -O2):
<str2hex>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <str2nhex@plt>

LLVM IR (-O0):
define i8* @str2hex(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @str2nhex(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @str2hex(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @str2nhex(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cgiSimpleTableFieldStart() { printf("<TD>"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"<TD>\00"
define void @cgiSimpleTableFieldStart() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"<TD>\00"
define void @cgiSimpleTableFieldStart() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_session_registers();
int /*<<< orphan*/ tag_enable(int);
void tag_dump_session(void) {
  tag_enable(1);
  print_session_registers();
  tag_enable(0);
}


x86 assembly (clang, -O0):
<tag_dump_session>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <tag_enable@plt>
mov    $0x0,%al
call   1040 <print_session_registers@plt>
xor    %edi,%edi
call   1030 <tag_enable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_dump_session>:
push   %rax
mov    $0x1,%edi
call   1030 <tag_enable@plt>
xor    %eax,%eax
call   1040 <print_session_registers@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <tag_enable@plt>

LLVM IR (-O0):
define void @tag_dump_session() {
%1 = call i32 @tag_enable(i32 1)
%2 = call i32 (...) @print_session_registers()
%3 = call i32 @tag_enable(i32 0)
ret void
}

LLVM IR (-O2):
define void @tag_dump_session() {
%1 = tail call i32 @tag_enable(i32 1)
%2 = tail call i32 (...) @print_session_registers()
%3 = tail call i32 @tag_enable(i32 0)
ret void
}
void has_undefined_symbol2(void) {}


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

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

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

LLVM IR (-O2):
define void @has_undefined_symbol2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *fun2(char *p) {
  printf("%s\n", p);
  return p;
}


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

x86 assembly (clang, -O2):
<fun2>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i8* @fun2(i8* returned %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ myprintf(char *, ...);
int main(void) {
  myprintf("hello world.\n");
  myprintf("[%%]\n");
  myprintf("[%d]\n", 1234567890);
  myprintf("[%p]\n", 1234567890);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xed2(%rip),%rdi
mov    $0x499602d2,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xec5(%rip),%rdi
mov    $0x499602d2,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee0(%rip),%rdi
mov    $0x499602d2,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xed3(%rip),%rdi
mov    $0x499602d2,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"hello world.\0A\00"
@.str.1 = [6 x i8] c"[%%]\0A\00"
@.str.2 = [6 x i8] c"[%d]\0A\00"
@.str.3 = [6 x i8] c"[%p]\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 1234567890)
%5 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 1234567890)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"hello world.\0A\00"
@.str.1 = [6 x i8] c"[%%]\0A\00"
@.str.2 = [6 x i8] c"[%d]\0A\00"
@.str.3 = [6 x i8] c"[%p]\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 1234567890)
%4 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 1234567890)
ret i32 0
}
int gettimeofday(struct timeval *tv, void *tz) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.timeval = type opaque
define i32 @gettimeofday(%struct.timeval* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int max(int, int /*<<< orphan*/);
int strlen(char *);
int ctr(char *p) { return max((80 - strlen(p)) / 2, 0); }


x86 assembly (clang, -O0):
<ctr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x50,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
xor    %esi,%esi
call   1040 <max@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctr>:
push   %rax
call   1030 <strlen@plt>
mov    $0x50,%ecx
sub    %eax,%ecx
mov    %ecx,%edi
shr    $0x1f,%edi
add    %ecx,%edi
sar    %edi
xor    %esi,%esi
pop    %rax
jmp    1040 <max@plt>

LLVM IR (-O0):
define i32 @ctr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = sub nsw i32 80, %4
%6 = sdiv i32 %5, 2
%7 = call i32 @max(i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ctr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sub nsw i32 80, %2
%4 = sdiv i32 %3, 2
%5 = tail call i32 @max(i32 %4, i32 0)
ret i32 %5
}
int test_imm_79int8_mem(signed char *val) {
  return ((*val) & (0x79 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_79int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 121
%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_79int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 121
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int fo_scheduler_userID() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @fo_scheduler_userID() {
ret i32 0
}
/* Variables and functions */
char *_resposta_padrao(int, int, char *);
char *AtualizarSoftwareSAT(int sessao, char *codigo_ativacao) {
  return _resposta_padrao(sessao, 14000, "Software atualizado com sucesso");
}


x86 assembly (clang, -O0):
<AtualizarSoftwareSAT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x36b0,%esi
lea    0xed2(%rip),%rdx
call   1030 <_resposta_padrao@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AtualizarSoftwareSAT>:
lea    0xee9(%rip),%rdx
mov    $0x36b0,%esi
jmp    1030 <_resposta_padrao@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Software atualizado com sucesso\00"
define i8* @AtualizarSoftwareSAT(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 = call i8* @_resposta_padrao(i32 %5, i32 14000, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i8* %6
}

LLVM IR (-O2):
@.str = [32 x i8] c"Software atualizado com sucesso\00"
define i8* @AtualizarSoftwareSAT(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @_resposta_padrao(i32 %0, i32 14000, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Input Text:");
  printf("%d", (getchar() != EOF));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Input Text:\00"
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Input Text:\00"
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
double stat_mean(double *, int);
double stat_stderr(double *, int);
double stat_rel_stderr(double *data, int size) {
  return stat_stderr(data, size) / stat_mean(data, size) * 100.0;
}


x86 assembly (clang, -O0):
<stat_rel_stderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <stat_stderr@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <stat_mean@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat_rel_stderr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <stat_stderr@plt>
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <stat_mean@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xeb3(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @stat_rel_stderr(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = load i32, i32* %4
%7 = call double @stat_stderr(double* %5, i32 %6)
%8 = load double*, double** %3
%9 = load i32, i32* %4
%10 = call double @stat_mean(double* %8, i32 %9)
%11 = fdiv double %7, %10
%12 = fmul double %11, 1.000000e+02
ret double %12
}

LLVM IR (-O2):
define double @stat_rel_stderr(double* %0, i32 %1) {
%3 = tail call double @stat_stderr(double* %0, i32 %1)
%4 = tail call double @stat_mean(double* %0, i32 %1)
%5 = fdiv double %3, %4
%6 = fmul double %5, 1.000000e+02
ret double %6
}
int LZ4_sizeofStreamState(void) {
  return (((1 << (14 - 3)) + 4 + ((sizeof(void *) == 16) ? 4 : 0)) *
          sizeof(unsigned long long));
}


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

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

LLVM IR (-O0):
define i32 @LZ4_sizeofStreamState() {
ret i32 16416
}

LLVM IR (-O2):
define i32 @LZ4_sizeofStreamState() {
ret i32 16416
}
void device_sound_stream_play(void) {}


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

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

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

LLVM IR (-O2):
define void @device_sound_stream_play() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
char *showParameters_il() {
  static char text[200];
  sprintf(text, "samplerate=%d; lenBitmapDiv=%d", 4, 8);
  return text;
}


x86 assembly (clang, -O0):
<showParameters_il>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x4,%edx
mov    $0x8,%ecx
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<showParameters_il>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
mov    $0x8,%ecx
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@showParameters_il.text = internal global [200 x i8] zeroinitializer
@.str = [31 x i8] c"samplerate=%d; lenBitmapDiv=%d\00"
define i8* @showParameters_il() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 4, i32 8)
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0)
}

LLVM IR (-O2):
@showParameters_il.text = internal global [200 x i8] zeroinitializer
@.str = [31 x i8] c"samplerate=%d; lenBitmapDiv=%d\00"
define i8* @showParameters_il() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 4, i32 8)
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0)
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
bool __shrink_1_filt_less(void *cc, void *k, void *v) {
  return *(uint64_t *)k < *(uint64_t *)cc;
}


x86 assembly (clang, -O0):
<__shrink_1_filt_less>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__shrink_1_filt_less>:
mov    (%rsi),%rcx
xor    %eax,%eax
cmp    (%rdi),%rcx
setl   %al
ret

LLVM IR (-O0):
define i32 @__shrink_1_filt_less(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
%13 = icmp slt i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @__shrink_1_filt_less(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %0 to i64*
%7 = load i64, i64* %6
%8 = icmp slt i64 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
int fs_handler_add(char *fn, void *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fs_handler_add(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IF_execVar(char *);
int /*<<< orphan*/ free(void *);
char *getString();
int /*<<< orphan*/ messErr(int);
int /*<<< orphan*/ printf(char *, char *);
void IF_execCSv(void) {
  char *f;
  f = getString();
  if (f != NULL) {
    if (!IF_execVar(f)) {
      printf("%s - ", f);
      messErr(24);
    }
    free((void *)f);
  }
}


x86 assembly (clang, -O0):
<IF_execCSv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getString@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11a3 <IF_execCSv+0x53>
mov    -0x8(%rbp),%rdi
call   1050 <IF_execVar@plt>
cmp    $0x0,%eax
jne    119a <IF_execCSv+0x4a>
mov    -0x8(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1070 <printf@plt>
mov    $0x18,%edi
call   1060 <messErr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_execCSv>:
push   %rbx
xor    %eax,%eax
call   1030 <getString@plt>
test   %rax,%rax
je     118e <IF_execCSv+0x3e>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <IF_execVar@plt>
test   %eax,%eax
jne    1185 <IF_execCSv+0x35>
lea    0xe8d(%rip),%rdi
mov    %rbx,%rsi
call   1070 <printf@plt>
mov    $0x18,%edi
call   1060 <messErr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s - \00"
define void @IF_execCSv() {
%1 = alloca i8*
%2 = call i8* (...) @getString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %16
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 @IF_execVar(i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = load i8*, i8** %1
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @messErr(i32 24)
br label %13
13: ; preds = %9, %5
%14 = load i8*, i8** %1
%15 = call i32 @free(i8* %14)
br label %16
16: ; preds = %13, %0
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s - \00"
define void @IF_execCSv() {
%1 = tail call i8* (...) @getString()
%2 = icmp eq i8* %1, null
br i1 %2, label %11, label %3
3: ; preds = %0
%4 = tail call i32 @IF_execVar(i8* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @messErr(i32 24)
br label %9
9: ; preds = %6, %3
%10 = tail call i32 @free(i8* %1)
br label %11
11: ; preds = %9, %0
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ errx(int, char *);
void *xcalloc(size_t memb, size_t sz) {
  void *ret = calloc(memb, sz);
  if (!ret)
    errx(1, "Malloc failed");
  return ret;
}


x86 assembly (clang, -O0):
<xcalloc>:
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 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <xcalloc+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):
<xcalloc>:
push   %rbx
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xcalloc+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* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %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* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %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
}
/* Variables and functions */
int /*<<< orphan*/ ios_delay();
int ipc_read(int);
void ipc_wait_ack(void) {
  while (!(ipc_read(1) & 0x2))
    ;
  ios_delay();
}


x86 assembly (clang, -O0):
<ipc_wait_ack>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <ipc_wait_ack+0x9>
mov    $0x1,%edi
call   1040 <ipc_read@plt>
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114b <ipc_wait_ack+0x2b>
jmp    1150 <ipc_wait_ack+0x30>
jmp    1129 <ipc_wait_ack+0x9>
mov    $0x0,%al
call   1030 <ios_delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_wait_ack>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <ipc_read@plt>
test   $0x2,%al
je     1130 <ipc_wait_ack+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ios_delay@plt>

LLVM IR (-O0):
define void @ipc_wait_ack() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @ipc_read(i32 1)
%3 = and i32 %2, 2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
%8 = call i32 (...) @ios_delay()
ret void
}

LLVM IR (-O2):
define void @ipc_wait_ack() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @ipc_read(i32 1)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 (...) @ios_delay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ raw_local_irq_restore(int);
void raw_local_irq_enable(void) { raw_local_irq_restore(1); }


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

x86 assembly (clang, -O2):
<raw_local_irq_enable>:
mov    $0x1,%edi
jmp    1030 <raw_local_irq_restore@plt>

LLVM IR (-O0):
define void @raw_local_irq_enable() {
%1 = call i32 @raw_local_irq_restore(i32 1)
ret void
}

LLVM IR (-O2):
define void @raw_local_irq_enable() {
%1 = tail call i32 @raw_local_irq_restore(i32 1)
ret void
}
void noretornanada(float a, float b) { printf("%s\n", a + b); }


x86 assembly (clang, -O0):
<noretornanada>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noretornanada>:
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee1(%rip),%rdi
mov    $0x1,%al
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @noretornanada(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 = fadd float %5, %6
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @noretornanada(float %0, float %1) {
%3 = fadd float %0, %1
%4 = fpext float %3 to double
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
ret void
}
void __Default_Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @__Default_Handler() {
ret void
}
void rt_mutex_adjust_pi(struct task_struct *task) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @rt_mutex_adjust_pi(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bp_UpdateLogging();
void BP_UpdateLogging(void) { bp_UpdateLogging(); }


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

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

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

LLVM IR (-O2):
define void @BP_UpdateLogging() {
%1 = tail call i32 (...) @bp_UpdateLogging()
ret void
}