xunge/DecIR huggingface dataset:
/* Variables and functions */
int ispunct(int);
bool invalidFunctionArgBool_ispunct(bool b, int c) {
  (void)ispunct(b);
  return ispunct(c != 0);
}


x86 assembly (clang, -O0):
<invalidFunctionArgBool_ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ispunct@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgBool_ispunct>:
xor    %edi,%edi
test   %esi,%esi
setne  %dil
jmp    1030 <ispunct@plt>

LLVM IR (-O0):
define i32 @invalidFunctionArgBool_ispunct(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 = call i32 @ispunct(i32 %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @ispunct(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @invalidFunctionArgBool_ispunct(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @ispunct(i32 %4)
ret i32 %5
}
/* Variables and functions */
int rom_present(char *);
int riva128_available(void) {
  return rom_present(L"roms/video/nv_riva128/Diamond_V330_rev-e.vbi");
}


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

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

LLVM IR (-O0):
@.str = [45 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 110, i32 118, i32 95, i32 114, i32 105, i32 118, i32 97, i32 49, i32 50, i32 56, i32 47, i32 68, i32 105, i32 97, i32 109, i32 111, i32 110, i32 100, i32 95, i32 86, i32 51, i32 51, i32 48, i32 95, i32 114, i32 101, i32 118, i32 45, i32 101, i32 46, i32 118, i32 98, i32 105, i32 0]
define i32 @riva128_available() {
%1 = call i32 @rom_present(i8* bitcast ([45 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [45 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 110, i32 118, i32 95, i32 114, i32 105, i32 118, i32 97, i32 49, i32 50, i32 56, i32 47, i32 68, i32 105, i32 97, i32 109, i32 111, i32 110, i32 100, i32 95, i32 86, i32 51, i32 51, i32 48, i32 95, i32 114, i32 101, i32 118, i32 45, i32 101, i32 46, i32 118, i32 98, i32 105, i32 0]
define i32 @riva128_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([45 x i32]* @.str to i8*))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ FindTest();
int main() {
  FindTest();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @FindTest()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @FindTest()
ret i32 0
}
unsigned xrop3_85_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned stk1;
  stk1 = ~D;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_85_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_85_0_0(i8 zeroext %0, i8 zeroext %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 255, i32* %5
%7 = load i32, i32* %5
%8 = xor i32 %7, -1
store i32 %8, i32* %6
%9 = load i32, i32* %6
ret i32 %9
}

LLVM IR (-O2):
define i32 @xrop3_85_0_0(i8 zeroext %0, i8 zeroext %1) {
ret i32 -256
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int, int, int, int);
int /*<<< orphan*/ play_attack_defend2_n(int, int, int, int, int, int);
int autohelperowl_attackpat168(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-1, 1, move, transformation);
  return !play_attack_defend2_n(color, 1, 1, move, move, a);
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat168>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <play_attack_defend2_n@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat168>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
mov    %esi,%ecx
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1040 <offset@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %eax,%r9d
call   1030 <play_attack_defend2_n@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat168(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -1, i32 1, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %9
%19 = load i32, i32* %8
%20 = load i32, i32* %8
%21 = load i32, i32* %11
%22 = call i32 @play_attack_defend2_n(i32 %18, i32 1, i32 1, i32 %19, i32 %20, i32 %21)
%23 = icmp ne i32 %22, 0
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat168(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -1, i32 1, i32 %2, i32 %1)
%7 = tail call i32 @play_attack_defend2_n(i32 %3, i32 1, i32 1, i32 %2, i32 %2, i32 %6)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
scalar_t__ getentabline(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char line[1000000];
  while (getentabline(line) > 0) {
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4250,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1040 <getentabline@plt>
cmp    $0x0,%rax
jle    1167 <main+0x47>
lea    -0xf4250(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0xf4250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf4248,%rsp
mov    %rsp,%rdi
call   1040 <getentabline@plt>
test   %rax,%rax
jle    1168 <main+0x48>
lea    0xec2(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <getentabline@plt>
test   %rax,%rax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0xf4248,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %11, %2
%8 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %6, i64 0, i64 0
%9 = call i64 @getentabline(i8* %8)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %6, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %7
14: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000000 x i8]
%4 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%5 = call i64 @getentabline(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2, %7
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i64 @getentabline(i8* %4)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int);
void SeedRandomNumberGeneratorInt(int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<SeedRandomNumberGeneratorInt>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @SeedRandomNumberGeneratorInt(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
int ft_isalpha(int c) {
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     111b <ft_isalpha+0x1b>
cmpl   $0x7a,-0x8(%rbp)
jle    112f <ft_isalpha+0x2f>
cmpl   $0x41,-0x8(%rbp)
jl     113b <ft_isalpha+0x3b>
cmpl   $0x5a,-0x8(%rbp)
jg     113b <ft_isalpha+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <ft_isalpha+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %15, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 90
br i1 %14, label %15, label %16
15: ; preds = %12, %6
store i32 1, i32* %2
br label %17
16: ; preds = %12, %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int recursiveStrFind(char *, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                     int);
int strFind(char sub[], char text[]) {
  return recursiveStrFind(sub, text, 0, 0, -1);
}


x86 assembly (clang, -O0):
<strFind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    $0xffffffff,%r8d
mov    %ecx,%edx
call   1030 <recursiveStrFind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strFind>:
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0xffffffff,%r8d
jmp    1030 <recursiveStrFind@plt>

LLVM IR (-O0):
define i32 @strFind(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 i32 @recursiveStrFind(i8* %5, i8* %6, i32 0, i32 0, i32 -1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strFind(i8* %0, i8* %1) {
%3 = tail call i32 @recursiveStrFind(i8* %0, i8* %1, i32 0, i32 0, i32 -1)
ret i32 %3
}
void test117_TestProg_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test117_TestProg_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ perror(char *);
void blad(char *s) {
  perror(s);
  _exit(1);
}


x86 assembly (clang, -O0):
<blad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<blad>:
push   %rax
call   1040 <perror@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @blad(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @blad(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @_exit(i32 1)
unreachable
}
int gz_dump_write(struct coredump_params *cprm, const void *addr, int nr) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.coredump_params = type opaque
define i32 @gz_dump_write(%struct.coredump_params* %0, i8* %1, i32 %2) {
%4 = alloca %struct.coredump_params*
%5 = alloca i8*
%6 = alloca i32
store %struct.coredump_params* %0, %struct.coredump_params** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 1
}

LLVM IR (-O2):
%struct.coredump_params = type opaque
define i32 @gz_dump_write(%struct.coredump_params* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 1
}
void copia(void) {
  int i;
  extern char linea[], linea_max[];
  i = 0;
  while (*(linea) != '\0') {
    *(linea_max + i) = *(linea + i);
    i++;
  }
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2ede(%rip),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <copia+0x48>
movslq -0x4(%rbp),%rcx
mov    0x2ec7(%rip),%rax
mov    (%rax,%rcx,1),%dl
movslq -0x4(%rbp),%rcx
mov    0x2ea1(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copia+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%cl
test   %cl,%cl
je     112e <copia+0x2e>
xor    %edx,%edx
mov    0x2ec2(%rip),%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %cl,(%rsi,%rdx,1)
movzbl 0x1(%rax,%rdx,1),%ecx
add    $0x1,%rdx
jmp    1120 <copia+0x20>
ret

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0)
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %2
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0), i64 %8
%10 = load i8, i8* %9
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea_max, i64 0, i64 0), i64 %12
store i8 %10, i8* %13
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %2
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = load i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0, %3
%4 = phi i8 [ %9, %3 ], [ %1, %0 ]
%5 = phi i64 [ %7, %3 ], [ 0, %0 ]
%6 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %5
store i8 %4, i8* %6
%7 = add nuw i64 %5, 1
%8 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %7
%9 = load i8, i8* %8
br label %3
10: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Scl_ConGetOutLoad(int);
float Scl_Int2Flt(int /*<<< orphan*/);
float Scl_ConGetOutLoadFloat(int i) {
  return Scl_Int2Flt(Scl_ConGetOutLoad(i));
}


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

x86 assembly (clang, -O2):
<Scl_ConGetOutLoadFloat>:
push   %rax
call   1030 <Scl_ConGetOutLoad@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <Scl_Int2Flt@plt>

LLVM IR (-O0):
define float @Scl_ConGetOutLoadFloat(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @Scl_ConGetOutLoad(i32 %3)
%5 = call float @Scl_Int2Flt(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @Scl_ConGetOutLoadFloat(i32 %0) {
%2 = tail call i32 @Scl_ConGetOutLoad(i32 %0)
%3 = tail call float @Scl_Int2Flt(i32 %2)
ret float %3
}
/* Variables and functions */
int rom_present(char *);
int genius_available() { return rom_present(L"roms/video/genius/8x12.bin"); }


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

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

LLVM IR (-O0):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 103, i32 101, i32 110, i32 105, i32 117, i32 115, i32 47, i32 56, i32 120, i32 49, i32 50, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @genius_available() {
%1 = call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 103, i32 101, i32 110, i32 105, i32 117, i32 115, i32 47, i32 56, i32 120, i32 49, i32 50, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @genius_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}
int isInRange(int y, int x, int height, int width) {
  if (y < 0 || y >= height)
    return 0;
  if (x < 0 || x >= width)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isInRange>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1126 <isInRange+0x26>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1132 <isInRange+0x32>
movl   $0x0,-0x4(%rbp)
jmp    115b <isInRange+0x5b>
cmpl   $0x0,-0xc(%rbp)
jl     1148 <isInRange+0x48>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     1154 <isInRange+0x54>
movl   $0x0,-0x4(%rbp)
jmp    115b <isInRange+0x5b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isInRange>:
test   %edi,%edi
setns  %al
cmp    %edx,%edi
setl   %dl
and    %al,%dl
test   %esi,%esi
setns  %al
cmp    %ecx,%esi
setl   %cl
and    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isInRange(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, -1
%6 = icmp slt i32 %0, %2
%7 = and i1 %5, %6
%8 = icmp sgt i32 %1, -1
%9 = icmp slt i32 %1, %3
%10 = and i1 %8, %9
%11 = and i1 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ execvp(char *, char **);
scalar_t__ fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int spawn(char *program_name, char **arg_list) {
  pid_t child_pid;
  child_pid = fork();
  if (child_pid != 0) {
    return child_pid;
  } else {
    execvp(program_name, arg_list);
    fprintf(stderr, "an error occured when invoking execvp.\n");
    abort();
  }
}


x86 assembly (clang, -O0):
<spawn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1170 <spawn+0x30>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <execvp@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xe73(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<spawn>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <fork@plt>
test   %rax,%rax
je     115e <spawn+0x1e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <execvp@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    0xe87(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"an error occured when invoking execvp.\0A\00"
define i32 @spawn(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i64
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = call i64 (...) @fork()
store i64 %6, i64* %5
%7 = load i64, i64* %5
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i64, i64* %5
%11 = trunc i64 %10 to i32
ret i32 %11
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8**, i8*** %4
%15 = call i32 @execvp(i8* %13, i8** %14)
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"an error occured when invoking execvp.\0A\00"
define i32 @spawn(i8* %0, i8** %1) {
%3 = tail call i64 (...) @fork()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = trunc i64 %3 to i32
ret i32 %6
7: ; preds = %2
%8 = tail call i32 @execvp(i8* %0, i8** %1)
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ doit(int);
int main(int argc, char *argv[]) {
  bool p;
  doit(p);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @doit(i32 undef)
ret i32 0
}
/* Type definitions */
struct StringBuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ appendToStringBuffer(struct StringBuffer *, char const);
void appendStringToStringBuffer(struct StringBuffer *buffer, const char *s) {
  while (*s) {
    appendToStringBuffer(buffer, *s);
    s++;
  }
}


x86 assembly (clang, -O0):
<appendStringToStringBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <appendStringToStringBuffer+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <appendToStringBuffer@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <appendStringToStringBuffer+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appendStringToStringBuffer>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1146 <appendStringToStringBuffer+0x36>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <appendToStringBuffer@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <appendStringToStringBuffer+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.StringBuffer = type { i32 }
define void @appendStringToStringBuffer(%struct.StringBuffer* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = tail call i32 @appendToStringBuffer(%struct.StringBuffer* %0, i8 signext %6)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
size_t trim(char *s, size_t len) {
  while (len != 0 && isspace(s[len - 1]))
    s[--len] = '\0';
  return len;
}


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     114f <trim+0x3f>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115f <trim+0x4f>
jmp    117c <trim+0x6c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
movb   $0x0,-0x1(%rax,%rcx,1)
jmp    1120 <trim+0x10>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     113c <trim+0x2c>
mov    %rsi,%rbx
mov    %rdi,%r14
nop
movsbl -0x1(%r14,%rbx,1),%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113e <trim+0x2e>
movb   $0x0,-0x1(%r14,%rbx,1)
add    $0xffffffffffffffff,%rbx
jne    1120 <trim+0x10>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @trim(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %18, %2
%6 = load i64, i64* %4
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = sub i64 %10, 1
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = call i64 @isspace(i8 signext %13)
%15 = icmp ne i64 %14, 0
br label %16
16: ; preds = %8, %5
%17 = phi i1 [ false, %5 ], [ %15, %8 ]
br i1 %17, label %18, label %23
18: ; preds = %16
%19 = load i8*, i8** %3
%20 = load i64, i64* %4
%21 = add i64 %20, -1
store i64 %21, i64* %4
%22 = getelementptr inbounds i8, i8* %19, i64 %21
store i8 0, i8* %22
br label %5
23: ; preds = %16
%24 = load i64, i64* %4
ret i64 %24
}

LLVM IR (-O2):
define i64 @trim(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %11
%5 = phi i64 [ %6, %11 ], [ %1, %2 ]
%6 = add i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i64 @isspace(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %4
store i8 0, i8* %7
%12 = icmp eq i64 %6, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %11, %2
%14 = phi i64 [ 0, %2 ], [ 0, %11 ], [ %5, %4 ]
ret i64 %14
}
double vde_chain_nm9_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<vde_chain_nm9_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <vde_chain_nm9_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <vde_chain_nm9_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <vde_chain_nm9_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <vde_chain_nm9_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm9_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @vde_chain_nm9_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @vde_chain_nm9_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void gpio_set(uint32_t port, uint32_t pin) {
  (*((volatile uint32_t *)(port + 0x18))) |= (1 << pin);
}


x86 assembly (clang, -O0):
<gpio_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x4(%rbp),%eax
add    $0x18,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_set>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %edi,%rcx
or     %eax,0x18(%rcx)
ret

LLVM IR (-O0):
define void @gpio_set(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 24
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, %6
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @gpio_set(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = add nsw i32 %0, 24
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, %3
store volatile i32 %8, i32* %6
ret void
}
void inclass2bol_inclass_ext_unit() {}


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

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

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

LLVM IR (-O2):
define void @inclass2bol_inclass_ext_unit() {
ret void
}
/* Variables and functions */
float stub1();
float testClosureVrF(float (*closure)(void)) {
  return closure != NULL ? (*closure)() : (float)0;
}


x86 assembly (clang, -O0):
<testClosureVrF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1124 <testClosureVrF+0x24>
call   *-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
jmp    1131 <testClosureVrF+0x31>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1131 <testClosureVrF+0x31>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureVrF>:
test   %rdi,%rdi
je     1107 <testClosureVrF+0x7>
jmp    *%rdi
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @testClosureVrF(float ()* %0) {
%2 = alloca float ()*
store float ()* %0, float ()** %2
%3 = load float ()*, float ()** %2
%4 = icmp ne float ()* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float ()*, float ()** %2
%7 = call float %6()
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi float [ %7, %5 ], [ 0.000000e+00, %8 ]
ret float %10
}

LLVM IR (-O2):
define float @testClosureVrF(float ()* %0) {
%2 = icmp eq float ()* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call float %0()
br label %5
5: ; preds = %1, %3
%6 = phi float [ %4, %3 ], [ 0.000000e+00, %1 ]
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ OutputDACchannel(int, int);
void SetDACchannel(int channel_no) { OutputDACchannel(channel_no, 63); }


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

x86 assembly (clang, -O2):
<SetDACchannel>:
mov    $0x3f,%esi
jmp    1030 <OutputDACchannel@plt>

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

LLVM IR (-O2):
define void @SetDACchannel(i32 %0) {
%2 = tail call i32 @OutputDACchannel(i32 %0, i32 63)
ret void
}
void copy(void) {
  int i;
  extern char line[], longest[];
  i = 0;
  while ((longest[i] = line[i]) != '\0')
    ++i;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2ed2(%rip),%rax
mov    (%rax,%rcx,1),%al
movslq -0x4(%rbp),%rdx
mov    0x2eb4(%rip),%rcx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <copy+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copy+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
mov    0x2edf(%rip),%rsi
mov    0x2ec8(%rip),%rdx
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy+0x10>
ret

LLVM IR (-O0):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copy() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %8
store i8 %6, i8* %9
%10 = sext i8 %6 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copy() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %2
store i8 %4, i8* %5
%6 = icmp eq i8 %4, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _flushall();
void sync(void) { _flushall(); }


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

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

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

LLVM IR (-O2):
define void @sync() {
%1 = tail call i32 (...) @_flushall()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ point(int, int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basPoint() {
  int x, y;
  y = popNumber();
  x = popNumber();
  pushNumber(point(x, y));
}


x86 assembly (clang, -O0):
<basPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <point@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basPoint>:
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <point@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basPoint() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @popNumber()
store i32 %3, i32* %2
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @point(i32 %5, i32 %6)
%8 = call i32 @pushNumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @basPoint() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 @point(i32 %2, i32 %1)
%4 = tail call i32 @pushNumber(i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ pow(int, int);
int nth_digit(int n, int d) {
  int magnitude = (int)pow(10, d);
  return (n / magnitude) % 10;
}


x86 assembly (clang, -O0):
<nth_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nth_digit>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    %ebx,%eax
cltd
idiv   %ecx
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nth_digit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i64 @pow(i32 10, i32 %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = sdiv i32 %9, %10
%12 = srem i32 %11, 10
ret i32 %12
}

LLVM IR (-O2):
define i32 @nth_digit(i32 %0, i32 %1) {
%3 = tail call i64 @pow(i32 10, i32 %1)
%4 = trunc i64 %3 to i32
%5 = sdiv i32 %0, %4
%6 = srem i32 %5, 10
ret i32 %6
}
int insideblock(int blkx, int blky, int pblkx, int pblky, int sx, int sy) {
  return ((blkx >= pblkx - sx) && (blkx < pblkx + (41)) &&
          (blky >= pblky - sy) && (blky < pblky + (23)));
}


x86 assembly (clang, -O0):
<insideblock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0xc(%rbp),%edx
sub    -0x14(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x19(%rbp)
jl     116b <insideblock+0x6b>
mov    -0x4(%rbp),%ecx
mov    -0xc(%rbp),%edx
add    $0x29,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x19(%rbp)
jge    116b <insideblock+0x6b>
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%edx
sub    -0x18(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x19(%rbp)
jl     116b <insideblock+0x6b>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x17,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insideblock>:
mov    %edx,%eax
sub    %r8d,%eax
cmp    %edi,%eax
setle  %al
add    $0x29,%edx
cmp    %edi,%edx
setg   %dl
and    %al,%dl
mov    %ecx,%eax
sub    %r9d,%eax
cmp    %esi,%eax
setle  %al
add    $0x17,%ecx
cmp    %esi,%ecx
setg   %cl
and    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @insideblock(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = sub nsw i32 %2, %4
%8 = icmp sle i32 %7, %0
%9 = add nsw i32 %2, 41
%10 = icmp sgt i32 %9, %0
%11 = select i1 %8, i1 %10, i1 false
%12 = sub nsw i32 %3, %5
%13 = icmp sle i32 %12, %1
%14 = select i1 %11, i1 %13, i1 false
%15 = add nsw i32 %3, 23
%16 = icmp sgt i32 %15, %1
%17 = select i1 %14, i1 %16, i1 false
%18 = zext i1 %17 to i32
ret i32 %18
}
int reg(void (*callback)()) {}


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

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

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

LLVM IR (-O2):
define i32 @reg(void (...)* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGContextRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGContextRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGContextRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ *we_wordv;
};
typedef TYPE_1__ wordexp_t;

/* Variables and functions */
char *strdup(int /*<<< orphan*/);
int /*<<< orphan*/ wordexp(char *, TYPE_1__ *, int /*<<< orphan*/);
int /*<<< orphan*/ wordfree(TYPE_1__ *);
char *expand_path(char *path) {
  wordexp_t wordexp_buffer;
  wordexp(path, &wordexp_buffer, 0);
  char *expanded = strdup(wordexp_buffer.we_wordv[0]);
  wordfree(&wordexp_buffer);
  return expanded;
}


x86 assembly (clang, -O0):
<expand_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <wordexp@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <wordfree@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand_path>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r14
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <wordexp@plt>
mov    (%rsp),%rax
mov    (%rax),%edi
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <wordfree@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32* }
define i8* @expand_path(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.TYPE_4__
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @wordexp(i8* %5, %struct.TYPE_4__* %3, i32 0)
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i32 0, i32 0
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = call i8* @strdup(i32 %10)
store i8* %11, i8** %4
%12 = call i32 @wordfree(%struct.TYPE_4__* %3)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32* }
define i8* @expand_path(i8* %0) {
%2 = alloca %struct.TYPE_4__
%3 = bitcast %struct.TYPE_4__* %2 to i8*
%4 = call i32 @wordexp(i8* %0, %struct.TYPE_4__* %2, i32 0)
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %2, i64 0, i32 0
%6 = load i32*, i32** %5
%7 = load i32, i32* %6
%8 = call i8* @strdup(i32 %7)
%9 = call i32 @wordfree(%struct.TYPE_4__* %2)
ret i8* %8
}
int func0(void) {
  while (1) {
    while (1) {
      while (1) {
        while (1) {
          while (1) {
            return (1);
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<func0>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <func0+0x9>
jmp    110e <func0+0xe>
jmp    1113 <func0+0x13>
jmp    1118 <func0+0x18>
jmp    111d <func0+0x1d>
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func0() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3
br label %5
5: ; preds = %4
ret i32 1
}

LLVM IR (-O2):
define i32 @func0() {
ret i32 1
}