xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void eat(char *food) { printf("I'm a dog, I eat %s\n", food); }


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

x86 assembly (clang, -O2):
<eat>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [21 x i8] c"I'm a dog, I eat %s\0A\00"
define void @eat(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int compare_prec(const void *a, const void *b) {
  if (*(double *)a < *(double *)b) {
    return -1;
  } else if (*(double *)a > *(double *)b) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<compare_prec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1132 <compare_prec+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <compare_prec+0x5b>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1154 <compare_prec+0x54>
movl   $0x1,-0x4(%rbp)
jmp    115b <compare_prec+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_prec>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_prec(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  for (int i = 0; i < 100; i++)
    printf("%i\n", 1001 + rand() % 4000);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11a1 <main+0x61>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0xfa0,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x3e9,%esi
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x64,%ebp
lea    0xea3(%rip),%rbx
nopl   (%rax)
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x28,%rcx
add    %edx,%ecx
imul   $0xfa0,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x3e9,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1160 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 4000
%11 = add nsw i32 1001, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
br label %4
3: ; preds = %4
ret i32 0
4: ; preds = %0, %4
%5 = phi i32 [ 0, %0 ], [ %10, %4 ]
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 4000
%8 = add nsw i32 %7, 1001
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, 100
br i1 %11, label %3, label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int16_t;

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
u_int16_t store_swp_ntoh16(u_int16_t v) { return ntohs(v); }


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

x86 assembly (clang, -O2):
<store_swp_ntoh16>:
jmp    1030 <ntohs@plt>

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

LLVM IR (-O2):
define i32 @store_swp_ntoh16(i32 %0) {
%2 = tail call i32 @ntohs(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x7a() {
  Assert_real((isdigit(122) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              615, ("isdigit should be 0 for z"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x7a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x267,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x7a>:
push   %rax
mov    $0x7a,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x267,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for z\00"
define void @t_isdigit_0x7a() {
%1 = call i64 @isdigit(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for z\00"
define void @t_isdigit_0x7a() {
%1 = tail call i64 @isdigit(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ esc(int *);
int /*<<< orphan*/ fluff();
__attribute__((no)) int fun(int parama, int paramb) {
  if (parama)
    parama = paramb;
  fluff();
  esc(&parama);
  return 0;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <fun+0x1e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fluff@plt>
lea    -0x4(%rbp),%rdi
call   1040 <esc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rax
test   %edi,%edi
cmove  %edi,%esi
mov    %esi,0x4(%rsp)
xor    %eax,%eax
call   1030 <fluff@plt>
lea    0x4(%rsp),%rdi
call   1040 <esc@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fun(i32 %0, i32 %1) {
%3 = alloca i32
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 0, i32 %1
store i32 %5, i32* %3
%6 = tail call i32 (...) @fluff()
%7 = call i32 @esc(i32* %3)
ret i32 0
}
void ff_hevc_put_hevc_bi_pel_pixels4_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels4_8_sse4() {
ret void
}
void tor_trace_init(void) {}


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

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

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

LLVM IR (-O2):
define void @tor_trace_init() {
ret void
}
int strEqual(char str1[], char str2[]) {
  for (int i = 0; str1[i] == str2[i]; i++) {
    if (str1[i] == 0) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<strEqual>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1167 <strEqual+0x67>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1154 <strEqual+0x54>
movl   $0x1,-0x4(%rbp)
jmp    116e <strEqual+0x6e>
jmp    1159 <strEqual+0x59>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <strEqual+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strEqual>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
movzbl (%rsi,%rax,1),%edx
cmp    %dl,%cl
jne    1124 <strEqual+0x24>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strEqual+0x10>
xor    %eax,%eax
cmp    %dl,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @strEqual(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %12, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %6, %8
%10 = icmp ne i8 %6, 0
%11 = and i1 %9, %10
%12 = add nuw i64 %4, 1
br i1 %11, label %3, label %13
13: ; preds = %3
%14 = zext i1 %9 to i32
ret i32 %14
}
int abbrev_size(long abbrev) {
  int size = 1;
  if (abbrev == 0) {
    return 2;
  }
  while (abbrev > 0) {
    size++;
    abbrev /= 64;
  }
  return size;
}


x86 assembly (clang, -O0):
<abbrev_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1126 <abbrev_size+0x26>
movl   $0x2,-0x4(%rbp)
jmp    115c <abbrev_size+0x5c>
jmp    112b <abbrev_size+0x2b>
cmpq   $0x0,-0x10(%rbp)
jle    1156 <abbrev_size+0x56>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x40,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
jmp    112b <abbrev_size+0x2b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abbrev_size>:
test   %rdi,%rdi
je     1121 <abbrev_size+0x21>
mov    $0x1,%eax
jle    1120 <abbrev_size+0x20>
mov    %rdi,%rcx
nop
add    $0x1,%eax
shr    $0x6,%rcx
cmp    $0x3f,%rdi
mov    %rcx,%rdi
ja     1110 <abbrev_size+0x10>
ret
mov    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @abbrev_size(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = icmp sgt i64 %0, 0
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 1, %3 ]
%7 = phi i64 [ %9, %5 ], [ %0, %3 ]
%8 = add nuw nsw i32 %6, 1
%9 = lshr i64 %7, 6
%10 = icmp ult i64 %7, 64
br i1 %10, label %11, label %5
11: ; preds = %5, %3, %1
%12 = phi i32 [ 2, %1 ], [ 1, %3 ], [ %8, %5 ]
ret i32 %12
}
unsigned long long umax2(unsigned long long a, unsigned long long b) {
  return a ^ ((a ^ b) & -(a <= b));
}


x86 assembly (clang, -O0):
<umax2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
xor    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rdx
cmp    -0x10(%rbp),%rdx
setbe  %dl
and    $0x1,%dl
movzbl %dl,%esi
xor    %edx,%edx
sub    %esi,%edx
movslq %edx,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umax2>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @umax2(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = xor i64 %6, %7
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = icmp ule i64 %9, %10
%12 = zext i1 %11 to i32
%13 = sub nsw i32 0, %12
%14 = sext i32 %13 to i64
%15 = and i64 %8, %14
%16 = xor i64 %5, %15
ret i64 %16
}

LLVM IR (-O2):
define i64 @umax2(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void TargetInit(void) {}


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

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

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

LLVM IR (-O2):
define void @TargetInit() {
ret void
}
float flt_cmp_eq(float a, float b, float c, float d) {
  return (a == b) ? c : d;
}


x86 assembly (clang, -O0):
<flt_cmp_eq>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    113c <flt_cmp_eq+0x3c>
jp     113c <flt_cmp_eq+0x3c>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1146 <flt_cmp_eq+0x46>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt_cmp_eq>:
cmpeqss %xmm1,%xmm0
andps  %xmm0,%xmm2
andnps %xmm3,%xmm0
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @flt_cmp_eq(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fcmp oeq float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = load float, float* %7
br label %16
14: ; preds = %4
%15 = load float, float* %8
br label %16
16: ; preds = %14, %12
%17 = phi float [ %13, %12 ], [ %15, %14 ]
ret float %17
}

LLVM IR (-O2):
define float @flt_cmp_eq(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %0, %1
%6 = select i1 %5, float %2, float %3
ret float %6
}
void patchprecision_(useg, vseg) int *useg, *vseg;
{ patchprecision((long)*useg, (long)*vseg); }


x86 assembly (clang, -O0):
<patchprecision_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
movslq (%rax),%rsi
mov    $0x0,%al
call   1030 <patchprecision@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<patchprecision_>:
movslq (%rdi),%rdi
movslq (%rsi),%rsi
xor    %eax,%eax
jmp    1030 <patchprecision@plt>

LLVM IR (-O0):
define void @patchprecision_(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* %5
%7 = sext i32 %6 to i64
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
%11 = call i32 (i64, i64, ...) bitcast (i32 (...)* @patchprecision to i32 (i64, i64, ...)*)(i64 %7, i64 %10)
ret void
}

LLVM IR (-O2):
define void @patchprecision_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @patchprecision to i32 (i64, i64, ...)*)(i64 %4, i64 %6)
ret void
}
unsigned int pl_strcnt(const char *s, char c) {
  unsigned int num = 0;
  for (unsigned int i = 0; s[i] != '\0'; ++i) {
    if (s[i] != c) {
      continue;
    }
    num++;
  }
  return num;
}


x86 assembly (clang, -O0):
<pl_strcnt>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1163 <pl_strcnt+0x63>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
je     114c <pl_strcnt+0x4c>
jmp    1155 <pl_strcnt+0x55>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <pl_strcnt+0x1c>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_strcnt>:
mov    (%rdi),%r8b
xor    %eax,%eax
test   %r8b,%r8b
je     1129 <pl_strcnt+0x29>
mov    $0x1,%ecx
nop
xor    %edx,%edx
cmp    %sil,%r8b
sete   %dl
add    %edx,%eax
mov    %ecx,%edx
movzbl (%rdi,%rdx,1),%r8d
add    $0x1,%ecx
test   %r8b,%r8b
jne    1110 <pl_strcnt+0x10>
ret

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

LLVM IR (-O2):
define i32 @pl_strcnt(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %7, %2
%6 = phi i32 [ 0, %2 ], [ %13, %7 ]
ret i32 %6
7: ; preds = %2, %7
%8 = phi i8 [ %17, %7 ], [ %3, %2 ]
%9 = phi i32 [ %14, %7 ], [ 0, %2 ]
%10 = phi i32 [ %13, %7 ], [ 0, %2 ]
%11 = icmp eq i8 %8, %1
%12 = zext i1 %11 to i32
%13 = add i32 %10, %12
%14 = add i32 %9, 1
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %0, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %5, label %7
}
/* Type definitions */
struct token {
  int dummy;
};

/* Variables and functions */
char *token_get(char const *, struct token *);
int /*<<< orphan*/ token_space_p(struct token *);
const char *ts_get_token_no_ws(const char *p, struct token *token) {
  for (;;) {
    p = token_get(p, token);
    if (!token_space_p(token))
      return p;
  }
}


x86 assembly (clang, -O0):
<ts_get_token_no_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <token_get@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <token_space_p@plt>
cmp    $0x0,%eax
jne    115d <ts_get_token_no_ws+0x3d>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1130 <ts_get_token_no_ws+0x10>

x86 assembly (clang, -O2):
<ts_get_token_no_ws>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <token_get@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <token_space_p@plt>
test   %eax,%eax
jne    1130 <ts_get_token_no_ws+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.token = type { i32 }
define i8* @ts_get_token_no_ws(i8* %0, %struct.token* %1) {
%3 = alloca i8*
%4 = alloca %struct.token*
store i8* %0, i8** %3
store %struct.token* %1, %struct.token** %4
br label %5
5: ; preds = %14, %2
%6 = load i8*, i8** %3
%7 = load %struct.token*, %struct.token** %4
%8 = call i8* @token_get(i8* %6, %struct.token* %7)
store i8* %8, i8** %3
%9 = load %struct.token*, %struct.token** %4
%10 = call i32 @token_space_p(%struct.token* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %5
%13 = load i8*, i8** %3
ret i8* %13
14: ; preds = %5
br label %5
}

LLVM IR (-O2):
%struct.token = type { i32 }
define i8* @ts_get_token_no_ws(i8* %0, %struct.token* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = tail call i8* @token_get(i8* %4, %struct.token* %1)
%6 = tail call i32 @token_space_p(%struct.token* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ aes128e(unsigned char *, unsigned char *,
                           unsigned char const *);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
void InitialHashSubkey(unsigned char *ENC, const unsigned char *k) {
  memset(ENC, 0, 16);
  aes128e(ENC, ENC, k);
}


x86 assembly (clang, -O0):
<InitialHashSubkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <aes128e@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitialHashSubkey>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <aes128e@plt>

LLVM IR (-O0):
define void @InitialHashSubkey(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 = call i32 @memset(i8* %5, i32 0, i32 16)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @aes128e(i8* %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @InitialHashSubkey(i8* %0, i8* %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 16)
%4 = tail call i32 @aes128e(i8* %0, i8* %0, i8* %1)
ret void
}
void free_csv_line(char **parsed) {
  char **ptr;
  for (ptr = parsed; *ptr; ptr++) {
    free(*ptr);
  }
  free(parsed);
}


x86 assembly (clang, -O0):
<free_csv_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <free_csv_line+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <free_csv_line+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_csv_line>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <free_csv_line+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_csv_line+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_csv_line(i8** %0) {
%2 = alloca i8**
%3 = alloca i8**
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
store i8** %4, i8*** %3
br label %5
5: ; preds = %12, %1
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
br label %12
12: ; preds = %9
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %3
br label %5
15: ; preds = %5
%16 = load i8**, i8*** %2
%17 = bitcast i8** %16 to i8*
ret void
}

LLVM IR (-O2):
define void @free_csv_line(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
tail call void @free(i8* %5)
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = bitcast i8** %0 to i8*
tail call void @free(i8* %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
void code_segment_gtext(void) { output_line("\t.text"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\09.text\00"
define void @code_segment_gtext() {
%1 = call i32 @output_line(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\09.text\00"
define void @code_segment_gtext() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  int a = 2;
  return a++;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
scalar_t__ memrmem(char const *, int /*<<< orphan*/, char const *,
                   int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *strrstr(const char *haystack, const char *needle) {
  return ((char *)memrmem(haystack, strlen(haystack), needle, strlen(needle)));
}


x86 assembly (clang, -O0):
<strrstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
call   1040 <memrmem@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrstr>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <memrmem@plt>

LLVM IR (-O0):
define i8* @strrstr(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** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = call i64 @memrmem(i8* %5, i32 %7, i8* %8, i32 %10)
%12 = inttoptr i64 %11 to i8*
ret i8* %12
}

LLVM IR (-O2):
define i8* @strrstr(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i64 @memrmem(i8* %0, i32 %3, i8* %1, i32 %4)
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int __pformat(int, char *, int /*<<< orphan*/, char const *,
              int /*<<< orphan*/);
int __attribute__((__cdecl__))
__vsprintf(char *buf, const char *fmt, va_list argv) {
  register int retval;
  buf[retval = __pformat(0x4000, buf, 0, fmt, argv)] = '\0';
  return retval;
}


x86 assembly (clang, -O0):
<__vsprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x4000,%edi
xor    %edx,%edx
call   1030 <__pformat@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,-0x18(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__vsprintf>:
push   %rbx
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rbx
mov    $0x4000,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <__pformat@plt>
cltq
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @__pformat(i32 16384, i8* %9, i32 0, i8* %10, i32 %11)
store i32 %12, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %8, i64 %13
store i8 0, i8* %14
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @__vsprintf(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @__pformat(i32 16384, i8* %0, i32 0, i8* %1, i32 %2)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hash_add(void *, void **, void **);
bool __shrink_str_1_filt(void *cc_, void *k, void *v) {
  if (*(uint32_t *)v < 9) {
    hash_add(cc_, &k, &v);
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<__shrink_str_1_filt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0x9,(%rax)
jge    114e <__shrink_str_1_filt+0x3e>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <hash_add@plt>
movl   $0x1,-0x4(%rbp)
jmp    1155 <__shrink_str_1_filt+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__shrink_str_1_filt>:
sub    $0x18,%rsp
mov    %rsi,0x10(%rsp)
mov    %rdx,0x8(%rsp)
xor    %eax,%eax
cmpl   $0x8,(%rdx)
jg     1139 <__shrink_str_1_filt+0x29>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <hash_add@plt>
mov    $0x1,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @__shrink_str_1_filt(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
store i8* %1, i8** %4
store i8* %2, i8** %5
%6 = bitcast i8* %2 to i32*
%7 = load i32, i32* %6
%8 = icmp slt i32 %7, 9
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 @hash_add(i8* %0, i8** %4, i8** %5)
br label %11
11: ; preds = %3, %9
%12 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ check(char *, char *, int, char *, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
int main(void) {
  check("foo", "a", 1, "b", 0, NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x1,%edx
lea    0xecd(%rip),%rcx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xee0(%rip),%rcx
mov    $0x1,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [2 x i8] c"b\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @check(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0, i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [2 x i8] c"b\00"
define i32 @main() {
%1 = tail call i32 @check(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 0, i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nhr_free(void *);
void nhr_free_clean(void **mem) {
  if (mem) {
    nhr_free(*mem);
    *mem = NULL;
  }
}


x86 assembly (clang, -O0):
<nhr_free_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113e <nhr_free_clean+0x2e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <nhr_free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nhr_free_clean>:
test   %rdi,%rdi
je     1129 <nhr_free_clean+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <nhr_free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @nhr_free_clean(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @nhr_free(i8* %4)
store i8* null, i8** %0
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
bool fspath_move(const char path[], const char new_location[]) { return false; }


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

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

LLVM IR (-O0):
define i32 @fspath_move(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 @fspath_move(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ jffs2_lzma_init();
int /*<<< orphan*/ jffs2_rtime_init();
int /*<<< orphan*/ jffs2_zlib_init();
int jffs2_compressors_init(void) {
  jffs2_zlib_init();
  jffs2_rtime_init();
  jffs2_lzma_init();
  return 0;
}


x86 assembly (clang, -O0):
<jffs2_compressors_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <jffs2_zlib_init@plt>
mov    $0x0,%al
call   1050 <jffs2_rtime_init@plt>
mov    $0x0,%al
call   1040 <jffs2_lzma_init@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jffs2_compressors_init>:
push   %rax
xor    %eax,%eax
call   1030 <jffs2_zlib_init@plt>
xor    %eax,%eax
call   1050 <jffs2_rtime_init@plt>
xor    %eax,%eax
call   1040 <jffs2_lzma_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @jffs2_compressors_init() {
%1 = call i32 (...) @jffs2_zlib_init()
%2 = call i32 (...) @jffs2_rtime_init()
%3 = call i32 (...) @jffs2_lzma_init()
ret i32 0
}

LLVM IR (-O2):
define i32 @jffs2_compressors_init() {
%1 = tail call i32 (...) @jffs2_zlib_init()
%2 = tail call i32 (...) @jffs2_rtime_init()
%3 = tail call i32 (...) @jffs2_lzma_init()
ret i32 0
}
int bump_detect_back() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bump_detect_back() {
ret i32 0
}
char *led_str(unsigned char b) {
  char *pstr;
  switch (b) {
  case 1:
    pstr = "ON";
    break;
  case 2:
    pstr = "Blink";
    break;
  case 0:
  default:
    pstr = "off";
    break;
  }
  return (pstr);
}


x86 assembly (clang, -O0):
<led_str>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x14(%rbp)
test   %eax,%eax
je     1160 <led_str+0x60>
jmp    111e <led_str+0x1e>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
je     1140 <led_str+0x40>
jmp    112f <led_str+0x2f>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     1150 <led_str+0x50>
jmp    1165 <led_str+0x65>
lea    0xeb9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1170 <led_str+0x70>
lea    0xeac(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1170 <led_str+0x70>
jmp    1165 <led_str+0x65>
lea    0xe9d(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_str>:
cmp    $0x2,%dil
lea    0xef8(%rip),%rax
lea    0xef7(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%dil
lea    0xedf(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ON\00"
@.str.1 = [6 x i8] c"Blink\00"
@.str.2 = [4 x i8] c"off\00"
define i8* @led_str(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8*
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
switch i32 %5, label %9 [
i32 1, label %6
i32 2, label %7
i32 0, label %8
]
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %10
8: ; preds = %1
br label %9
9: ; preds = %1, %8
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %10
10: ; preds = %9, %7, %6
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"ON\00"
@.str.1 = [6 x i8] c"Blink\00"
@.str.2 = [4 x i8] c"off\00"
define i8* @led_str(i8 zeroext %0) {
%2 = icmp eq i8 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i8 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
void mpp_recv_double(double *data, int size, int from_pe) {}


x86 assembly (clang, -O0):
<mpp_recv_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mpp_recv_double(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @mpp_recv_double(double* nocapture %0, i32 %1, i32 %2) {
ret void
}
void copy_userblock(char *outfilename, char *infilename) {}


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

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

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

LLVM IR (-O2):
define void @copy_userblock(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
long INLINE_SYSCALL_NCS(long, int, long, long, long, long, long, long);
long syscall(long sysnum, long arg1, long arg2, long arg3, long arg4, long arg5,
             long arg6) {
  return INLINE_SYSCALL_NCS(sysnum, 6, arg1, arg2, arg3, arg4, arg5, arg6);
}


x86 assembly (clang, -O0):
<syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    $0x6,%esi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <INLINE_SYSCALL_NCS@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall>:
push   %rax
mov    %r9,%rax
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x6,%esi
push   0x10(%rsp)
push   %rax
call   1030 <INLINE_SYSCALL_NCS@plt>
add    $0x10,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @syscall(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6) {
%8 = tail call i64 @INLINE_SYSCALL_NCS(i64 %0, i32 6, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6)
ret i64 %8
}
_Bool isMpcint(double q, double e, double i) {
  return q < 1.3 || e >= .5 || i >= 40.;
}


x86 assembly (clang, -O0):
<isMpcint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    $0x1,%al
movsd  0xee3(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0x19(%rbp)
ja     115e <isMpcint+0x5e>
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
movsd  0xece(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jae    115e <isMpcint+0x5e>
movsd  -0x18(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isMpcint>:
movsd  0xef8(%rip),%xmm3
ucomisd %xmm0,%xmm3
seta   %cl
ucomisd 0xef1(%rip),%xmm1
setae  %dl
ucomisd 0xeee(%rip),%xmm2
setae  %al
or     %dl,%al
or     %cl,%al
ret

LLVM IR (-O0):
define zeroext i1 @isMpcint(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fcmp olt double %7, 1.300000e+00
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load double, double* %5
%11 = fcmp oge double %10, 5.000000e-01
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load double, double* %6
%14 = fcmp oge double %13, 4.000000e+01
br label %15
15: ; preds = %12, %9, %3
%16 = phi i1 [ true, %9 ], [ true, %3 ], [ %14, %12 ]
ret i1 %16
}

LLVM IR (-O2):
define zeroext i1 @isMpcint(double %0, double %1, double %2) {
%4 = fcmp olt double %0, 1.300000e+00
%5 = fcmp oge double %1, 5.000000e-01
%6 = or i1 %4, %5
%7 = fcmp oge double %2, 4.000000e+01
%8 = or i1 %6, %7
ret i1 %8
}