xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xa5() {
  Assert_real((iscntrl(165) == 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_iscntrl.c",
              830, ("iscntrl should be 0 for 0xa5"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xa5>:
push   %rax
mov    $0xa5,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x33e,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xa5\00"
define void @t_iscntrl_0xa5() {
%1 = call i64 @iscntrl(i32 165)
%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 830, i8* getelementptr inbounds ([29 x i8], [29 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xa5\00"
define void @t_iscntrl_0xa5() {
%1 = tail call i64 @iscntrl(i32 165)
%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 830, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
void wait_for_input(const char *prefix, int is_interactive) {
  char c;
  if (is_interactive) {
    printf("%s hit return to continue\n", prefix);
    fflush(stdout);
    c = getchar();
  } else {
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<wait_for_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1186 <wait_for_input+0x46>
mov    -0x8(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xd(%rbp)
jmp    1190 <wait_for_input+0x50>
mov    $0x1,%edi
call   1060 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_input>:
test   %esi,%esi
je     116d <wait_for_input+0x2d>
push   %rax
mov    %rdi,%rax
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>
mov    $0x1,%edi
jmp    1060 <sleep@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%s hit return to continue\0A\00"
@stdout = global i32 0
define void @wait_for_input(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
%13 = call signext i8 (...) @getchar()
store i8 %13, i8* %5
br label %16
14: ; preds = %2
%15 = call i32 @sleep(i32 1)
br label %16
16: ; preds = %14, %8
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s hit return to continue\0A\00"
@stdout = global i32 0
define void @wait_for_input(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call signext i8 (...) @getchar()
br label %11
9: ; preds = %2
%10 = tail call i32 @sleep(i32 1)
br label %11
11: ; preds = %9, %4
ret void
}
/* Variables and functions */
int pipe(int *);
int s_pipe(int fd[2]) { return (pipe(fd)); }


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

x86 assembly (clang, -O2):
<s_pipe>:
jmp    1030 <pipe@plt>

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

LLVM IR (-O2):
define i32 @s_pipe(i32* %0) {
%2 = tail call i32 @pipe(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t read_le64_3(unsigned char *data) {
  return (uint64_t)*data | ((uint64_t) * (data + 1) << 8) |
         ((uint64_t) * (data + 2) << 16) | ((uint64_t) * (data + 3) << 24) |
         ((uint64_t) * (data + 4) << 32) | ((uint64_t) * (data + 5) << 40) |
         ((uint64_t) * (data + 6) << 48) | ((uint64_t) * (data + 7) << 56);
}


x86 assembly (clang, -O0):
<read_le64_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x4(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x5(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x6(%rcx),%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x7(%rcx),%edx
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @read_le64_3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = or i32 %5, %10
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 16
%17 = or i32 %11, %16
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 3
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = shl i32 %21, 24
%23 = or i32 %17, %22
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 4
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 32
%29 = or i32 %23, %28
%30 = load i8*, i8** %2
%31 = getelementptr inbounds i8, i8* %30, i64 5
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = shl i32 %33, 40
%35 = or i32 %29, %34
%36 = load i8*, i8** %2
%37 = getelementptr inbounds i8, i8* %36, i64 6
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = shl i32 %39, 48
%41 = or i32 %35, %40
%42 = load i8*, i8** %2
%43 = getelementptr inbounds i8, i8* %42, i64 7
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = shl i32 %45, 56
%47 = or i32 %41, %46
ret i32 %47
}

LLVM IR (-O2):
define i32 @read_le64_3(i8* nocapture readnone %0) {
ret i32 poison
}
void Msp430TimerCapComP__9__Timer__overflow(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__9__Timer__overflow() {
ret void
}
/* Variables and functions */
double cos(double);
double Tween_SinusoidalInEasing(double k) {
  return 1 - cos(k * 3.14159265 / 2);
}


x86 assembly (clang, -O0):
<Tween_SinusoidalInEasing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeeb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tween_SinusoidalInEasing>:
push   %rax
mulsd  0xee7(%rip),%xmm0
mulsd  0xee7(%rip),%xmm0
call   1030 <cos@plt>
movsd  0xee2(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Tween_SinusoidalInEasing(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x400921FB53C8D4F1
%5 = fdiv double %4, 2.000000e+00
%6 = call double @cos(double %5)
%7 = fsub double 1.000000e+00, %6
ret double %7
}

LLVM IR (-O2):
define double @Tween_SinusoidalInEasing(double %0) {
%2 = fmul double %0, 0x400921FB53C8D4F1
%3 = fmul double %2, 5.000000e-01
%4 = tail call double @cos(double %3)
%5 = fsub double 1.000000e+00, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ GLshort;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord4s(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/);
void TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) {
  glTexCoord4s(s, t, r, q);
}


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

x86 assembly (clang, -O2):
<TexCoord4s>:
jmp    1030 <glTexCoord4s@plt>

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

LLVM IR (-O2):
define void @TexCoord4s(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glTexCoord4s(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int read(int, char *, int);
int main(int argc, char **argv) {
  char buffer[512];
  while (1) {
    int bytes = read(1, buffer, 511);
    buffer[bytes] = 0;
    printf("tester got: %s", buffer);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rsi
mov    $0x1,%edi
mov    $0x1ff,%edx
call   1040 <read@plt>
mov    %eax,-0x214(%rbp)
movslq -0x214(%rbp),%rax
movb   $0x0,-0x210(%rbp,%rax,1)
lea    -0x210(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rsp,%rbx
lea    0xecc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1ff,%edx
call   1040 <read@plt>
cltq
movb   $0x0,(%rsp,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [15 x i8] c"tester got: %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %8
8: ; preds = %2, %8
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%10 = call i32 @read(i32 1, i8* %9, i32 511)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 %12
store i8 0, i8* %13
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %8
}

LLVM IR (-O2):
@.str = [15 x i8] c"tester got: %s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %5, %2
%6 = call i32 @read(i32 1, i8* %4, i32 511)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 %7
store i8 0, i8* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %5
}
void swap(char *a, char *b) {
  *a = *a ^ *b;
  *b = *a ^ *b;
  *a = *a ^ *b;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rsi),%al
xor    (%rdi),%al
mov    %al,(%rdi)
xor    (%rsi),%al
mov    %al,(%rsi)
xor    %al,(%rdi)
ret

LLVM IR (-O0):
define void @swap(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* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = xor i32 %7, %10
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
store i8 %12, i8* %13
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = xor i32 %16, %19
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %4
store i8 %21, i8* %22
%23 = load i8*, i8** %3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = load i8*, i8** %4
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = xor i32 %25, %28
%30 = trunc i32 %29 to i8
%31 = load i8*, i8** %3
store i8 %30, i8* %31
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = xor i8 %4, %3
store i8 %5, i8* %0
%6 = load i8, i8* %1
%7 = xor i8 %6, %5
store i8 %7, i8* %1
%8 = load i8, i8* %0
%9 = xor i8 %8, %7
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void failure() { printf("Your password was not correct :(\n"); }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Your password was not correct :(\0A\00"
define void @failure() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Your password was not correct :(\00"
define void @failure() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *tigetstr(char *);
char *my_tgetstr(char *s, char *ss) { return tigetstr(ss); }


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

x86 assembly (clang, -O2):
<my_tgetstr>:
mov    %rsi,%rdi
jmp    1030 <tigetstr@plt>

LLVM IR (-O0):
define i8* @my_tgetstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i8* @tigetstr(i8* %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @my_tgetstr(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i8* @tigetstr(i8* %1)
ret i8* %3
}
int HelpItem64(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem64() {
ret i32 0
}
/* Variables and functions */
int INT_MAX;
__attribute__((weak)) void _exit(int status) {
  int x = status / INT_MAX;
  x = 4 / x;
  while (1) {
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
cltd
idivl  (%rcx)
mov    %eax,-0x8(%rbp)
mov    $0x4,%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x8(%rbp)
jmp    1123 <_exit+0x23>

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

LLVM IR (-O0):
@INT_MAX = global i32 0
define weak void @_exit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @INT_MAX
%6 = sdiv i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = sdiv i32 4, %7
store i32 %8, i32* %3
br label %9
9: ; preds = %1, %9
br label %9
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define weak void @_exit(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int rec(int);
int main() {
  int i = __VERIFIER_nondet_int();
  if (i <= 0)
    return 0;
  int res = rec(i);
  while (res < 1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     114f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1169 <main+0x49>
mov    -0x8(%rbp),%edi
call   1040 <rec@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1169 <main+0x49>
jmp    115a <main+0x3a>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1137 <main+0x17>
mov    %eax,%edi
call   1040 <rec@plt>
test   %eax,%eax
jle    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret
nopl   0x0(%rax,%rax,1)
jmp    1140 <main+0x20>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 1
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @rec(i32 %1)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %3, %6
br label %6
7: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_update_timing_info() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_update_timing_info"
         "\n");
}


x86 assembly (clang, -O0):
<pa_stream_update_timing_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [46 x i8] c"NOT IMPLEMENTED:pa_stream_update_timing_info\0A\00"
define i32 @pa_stream_update_timing_info() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [45 x i8] c"NOT IMPLEMENTED:pa_stream_update_timing_info\00"
define i32 @pa_stream_update_timing_info() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
long _rdpkru(int);
int /*<<< orphan*/ sigsafe_printf(char *, long);
int /*<<< orphan*/ wrpkru(long);
void __pkey_write_allow(int pkey, int do_allow_write) {
  long pkru = _rdpkru(125);
  int bit = pkey * 2 + 1;
  if (do_allow_write)
    pkru &= (1 << bit);
  else
    pkru |= (1 << bit);
  wrpkru(pkru);
  do {
    if (4 <= 0)
      sigsafe_printf("pkru now: %08x\n", _rdpkru(134));
  } while (0);
}


x86 assembly (clang, -O0):
<__pkey_write_allow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x7d,%edi
call   1040 <_rdpkru@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116b <__pkey_write_allow+0x4b>
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    117f <__pkey_write_allow+0x5f>
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <wrpkru@plt>
jmp    118d <__pkey_write_allow+0x6d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pkey_write_allow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x7d,%edi
call   1040 <_rdpkru@plt>
add    %ebp,%ebp
or     $0x1,%bpl
mov    $0x1,%edx
mov    %ebp,%ecx
shl    %cl,%edx
movslq %edx,%rdi
mov    %rax,%rcx
and    %rdi,%rcx
or     %rax,%rdi
test   %ebx,%ebx
cmovne %rcx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <wrpkru@plt>

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

LLVM IR (-O2):
define void @__pkey_write_allow(i32 %0, i32 %1) {
%3 = tail call i64 @_rdpkru(i32 125)
%4 = shl nsw i32 %0, 1
%5 = or i32 %4, 1
%6 = icmp eq i32 %1, 0
%7 = shl nuw i32 1, %5
%8 = sext i32 %7 to i64
%9 = and i64 %3, %8
%10 = or i64 %3, %8
%11 = select i1 %6, i64 %10, i64 %9
%12 = tail call i32 @wrpkru(i64 %11)
ret void
}
void fn000060AE() { return; }


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @fn000060AE() {
ret void
}
void sg_load_destroy_comp(void) {}


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

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

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

LLVM IR (-O2):
define void @sg_load_destroy_comp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_960(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_960() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_960() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts("BTSOOT SERVER");
  if (argc < 2) {
    perror("Not enough arguments given.");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x2,-0x8(%rbp)
jge    1164 <main+0x44>
lea    0xebb(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    116b <main+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
cmp    $0x1,%ebx
jle    1138 <main+0x18>
pop    %rbx
ret
lea    0xecf(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"BTSOOT SERVER\00"
@.str.1 = [28 x i8] c"Not enough arguments given.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [14 x i8] c"BTSOOT SERVER\00"
@.str.1 = [28 x i8] c"Not enough arguments given.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
int valid(double d) {
  union {
    double d;
    unsigned long long ull;
  } u;
  u.d = d;
  return ((u.ull >> 52) & 0x7ff) != 0x7ff;
}


x86 assembly (clang, -O0):
<valid>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x34,%rax
and    $0x7ff,%rax
cmp    $0x7ff,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid>:
movq   %xmm0,%rcx
not    %rcx
movabs $0x7ff0000000000000,%rdx
xor    %eax,%eax
test   %rdx,%rcx
setne  %al
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @valid(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to i64*
%7 = load i64, i64* %6
%8 = lshr i64 %7, 52
%9 = and i64 %8, 2047
%10 = icmp ne i64 %9, 2047
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @valid(double %0) {
%2 = bitcast double %0 to i64
%3 = and i64 %2, 9218868437227405312
%4 = icmp ne i64 %3, 9218868437227405312
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char *char_alloc(int);
char **char_alloc2p(int);
char **char_alloc2(int n, int m) {
  char **v;
  int i;
  v = char_alloc2p(n);
  for (i = 0; i < n; i++)
    v[i] = char_alloc(m);
  return v;
}


x86 assembly (clang, -O0):
<char_alloc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <char_alloc2p@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1172 <char_alloc2+0x52>
mov    -0x8(%rbp),%edi
call   1030 <char_alloc@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <char_alloc2+0x21>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_alloc2>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r15d
mov    %edi,%r14d
call   1040 <char_alloc2p@plt>
mov    %rax,%r12
test   %r14d,%r14d
jle    1155 <char_alloc2+0x35>
mov    %r14d,%ebp
xor    %ebx,%ebx
mov    %r15d,%edi
call   1030 <char_alloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <char_alloc2+0x20>
mov    %r12,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i8** @char_alloc2(i32 %0, i32 %1) {
%3 = tail call i8** @char_alloc2p(i32 %0)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = tail call i8* @char_alloc(i32 %1)
%10 = getelementptr inbounds i8*, i8** %3, i64 %8
store i8* %9, i8** %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %7
13: ; preds = %7, %2
ret i8** %3
}
int left(int i) { return 2 * i; }


x86 assembly (clang, -O0):
<left>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<left>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @left(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ safepath;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ simple_command(struct chirp_client *, int /*<<< orphan*/,
                                  char *, char *);
int /*<<< orphan*/ url_encode(char const *, char *, int);
int64_t chirp_client_unlink(struct chirp_client *c, const char *path,
                            time_t stoptime) {
  char safepath[1024];
  url_encode(path, safepath, sizeof(safepath));
  return simple_command(c, stoptime, "unlink %s\n", safepath);
}


x86 assembly (clang, -O0):
<chirp_client_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
call   1040 <url_encode@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x420(%rbp),%rcx
lea    0xea0(%rip),%rdx
call   1030 <simple_command@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_unlink>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %rsi,%rdi
mov    %r14,%rsi
mov    $0x400,%edx
call   1040 <url_encode@plt>
lea    0xeb6(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rcx
call   1030 <simple_command@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [11 x i8] c"unlink %s\0A\00"
define i32 @chirp_client_unlink(%struct.chirp_client* %0, i8* %1, i32 %2) {
%4 = alloca %struct.chirp_client*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [1024 x i8]
store %struct.chirp_client* %0, %struct.chirp_client** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%10 = call i32 @url_encode(i8* %8, i8* %9, i32 1024)
%11 = load %struct.chirp_client*, %struct.chirp_client** %4
%12 = load i32, i32* %6
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%14 = call i32 @simple_command(%struct.chirp_client* %11, i32 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [11 x i8] c"unlink %s\0A\00"
define i32 @chirp_client_unlink(%struct.chirp_client* %0, i8* %1, i32 %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @url_encode(i8* %1, i8* %5, i32 1024)
%7 = call i32 @simple_command(%struct.chirp_client* %0, i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 %7
}
int console_read(char *str, int cnt, int *newline) {
  *newline = 0;
  return 0;
}


x86 assembly (clang, -O0):
<console_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_read>:
movl   $0x0,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @console_read(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
store i32 0, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @console_read(i8* nocapture readnone %0, i32 %1, i32* nocapture writeonly %2) {
store i32 0, i32* %2
ret i32 0
}
h15hello() {}


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

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

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

LLVM IR (-O2):
define i32 @h15hello() {
ret i32 undef
}
/* Variables and functions */
int errno;
int c_get_errno_(int *errc) { return errno; }


x86 assembly (clang, -O0):
<c_get_errno_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_get_errno_>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @c_get_errno_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @errno
ret i32 %3
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @c_get_errno_(i32* nocapture readnone %0) {
%2 = load i32, i32* @errno
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct stat {
  int /*<<< orphan*/ st_mtime;
};

/* Variables and functions */
int stat(char const *, struct stat *);
time_t path_mtime(const char *path) {
  struct stat s;
  time_t mtime = 0;
  int ret;
  ret = stat(path, &s);
  if (ret == 0) {
    mtime = s.st_mtime;
  }
  return mtime;
}


x86 assembly (clang, -O0):
<path_mtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1143 <path_mtime+0x33>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_mtime>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
jne    1124 <path_mtime+0x14>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @path_mtime(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void panic(char *msg) {
  printf("%s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @panic(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 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @panic(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int fun481() { return 481; }


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

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

LLVM IR (-O0):
define i32 @fun481() {
ret i32 481
}

LLVM IR (-O2):
define i32 @fun481() {
ret i32 481
}
/* Variables and functions */
int /*<<< orphan*/ put_word(int, int);
int /*<<< orphan*/ write_ndless3x_loader(int, int /*<<< orphan*/);
__attribute__((always_)) void patch_CAS_3_1_0_392_extra(void) {
  write_ndless3x_loader(1, 0);
  put_word(0x100B19EC, 0xEAFFFFFE);
}


x86 assembly (clang, -O0):
<patch_CAS_3_1_0_392_extra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <write_ndless3x_loader@plt>
mov    $0x100b19ec,%edi
mov    $0xeafffffe,%esi
call   1040 <put_word@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_CAS_3_1_0_392_extra>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <write_ndless3x_loader@plt>
mov    $0x100b19ec,%edi
mov    $0xeafffffe,%esi
pop    %rax
jmp    1040 <put_word@plt>

LLVM IR (-O0):
define void @patch_CAS_3_1_0_392_extra() {
%1 = call i32 @write_ndless3x_loader(i32 1, i32 0)
%2 = call i32 @put_word(i32 269162988, i32 -352321538)
ret void
}

LLVM IR (-O2):
define void @patch_CAS_3_1_0_392_extra() {
%1 = tail call i32 @write_ndless3x_loader(i32 1, i32 0)
%2 = tail call i32 @put_word(i32 269162988, i32 -352321538)
ret void
}
/* Variables and functions */
char *strcpy(char *, char *);
char *os_strcpy(char *s1, char *s2) { return strcpy(s1, s2); }


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

x86 assembly (clang, -O2):
<os_strcpy>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @os_strcpy(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 = call i8* @strcpy(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @os_strcpy(i8* returned %0, i8* nocapture %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %0
}
void texcoord(double t[3], double p[3]) {
  t[0] = (p[0] + 1) / 2;
  t[1] = (p[1] + 1) / 2;
  t[2] = (p[2] + 1) / 2;
}


x86 assembly (clang, -O0):
<texcoord>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xef0(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  0xedc(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xecc(%rip),%xmm0
addsd  0x8(%rax),%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0xea6(%rip),%xmm0
addsd  0x10(%rax),%xmm0
movsd  0xe91(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<texcoord>:
movsd  0xef8(%rip),%xmm0
movsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdi)
addsd  0x10(%rsi),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @texcoord(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %8, 2.000000e+00
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
store double %9, double* %11
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fadd double %14, 1.000000e+00
%16 = fdiv double %15, 2.000000e+00
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 1
store double %16, double* %18
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = fadd double %21, 1.000000e+00
%23 = fdiv double %22, 2.000000e+00
%24 = load double*, double** %3
%25 = getelementptr inbounds double, double* %24, i64 2
store double %23, double* %25
ret void
}

LLVM IR (-O2):
define void @texcoord(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fadd double %3, 1.000000e+00
%5 = fmul double %4, 5.000000e-01
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fadd double %7, 1.000000e+00
%9 = fmul double %8, 5.000000e-01
%10 = getelementptr inbounds double, double* %0, i64 1
store double %9, double* %10
%11 = getelementptr inbounds double, double* %1, i64 2
%12 = load double, double* %11
%13 = fadd double %12, 1.000000e+00
%14 = fmul double %13, 5.000000e-01
%15 = getelementptr inbounds double, double* %0, i64 2
store double %14, double* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  int x = 0;
  do {
    printf("Hello World!\n");
    sleep(5);
  } while (x++ < 100);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x64,%eax
jl     1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x65,%ebp
lea    0xed1(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @sleep(i32 5)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = icmp slt i32 %7, 100
br i1 %9, label %3, label %10
10: ; preds = %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 5)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 101
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
int hashTableCalcSize(int capacity) {
  int size = 16;
  if (capacity > 16) {
    while (size < capacity)
      size <<= 1;
    if ((size - capacity) < size / 4)
      size = size << 1;
  } else
    size = 32;
  return size;
}


x86 assembly (clang, -O0):
<hashTableCalcSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x10,-0x8(%rbp)
cmpl   $0x10,-0x4(%rbp)
jle    1166 <hashTableCalcSize+0x66>
jmp    111d <hashTableCalcSize+0x1d>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1137 <hashTableCalcSize+0x37>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111d <hashTableCalcSize+0x1d>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jge    1161 <hashTableCalcSize+0x61>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116d <hashTableCalcSize+0x6d>
movl   $0x20,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashTableCalcSize>:
mov    $0x20,%eax
cmp    $0x11,%edi
jl     112d <hashTableCalcSize+0x2d>
mov    $0x10,%edx
nop
mov    %edx,%eax
lea    (%rax,%rax,1),%edx
mov    %eax,%ecx
sub    %edi,%ecx
jl     1110 <hashTableCalcSize+0x10>
lea    0x3(%rax),%edx
test   %eax,%eax
cmovns %eax,%edx
sar    $0x2,%edx
cmp    %edx,%ecx
setl   %cl
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @hashTableCalcSize(i32 %0) {
%2 = icmp sgt i32 %0, 16
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 16, %1 ]
%5 = icmp slt i32 %4, %0
%6 = shl i32 %4, 1
br i1 %5, label %3, label %7
7: ; preds = %3
%8 = sub nsw i32 %4, %0
%9 = sdiv i32 %4, 4
%10 = icmp slt i32 %8, %9
%11 = zext i1 %10 to i32
%12 = shl i32 %4, %11
br label %13
13: ; preds = %7, %1
%14 = phi i32 [ %12, %7 ], [ 32, %1 ]
ret i32 %14
}