xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xbc() {
  Assert_real((isxdigit(188) == 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_isxdigit.c",
              945, ("isxdigit should be 0 for 0xbc"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xbc>:
push   %rax
mov    $0xbc,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3b1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xbc\00"
define void @t_isxdigit_0xbc() {
%1 = call i64 @isxdigit(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xbc\00"
define void @t_isxdigit_0xbc() {
%1 = tail call i64 @isxdigit(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int opn(char *fname) {
  int hndl;
  hndl = open(fname, O_RDONLY);
  if (hndl < 0) {
    fprintf(stderr, "opn: open error %s\n", fname);
    exit(1);
  }
  return (hndl);
}


x86 assembly (clang, -O0):
<opn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    117e <opn+0x4e>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opn>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
test   %eax,%eax
js     1148 <opn+0x18>
pop    %rbx
ret
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"opn: open error %s\0A\00"
define i32 @opn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"opn: open error %s\0A\00"
define i32 @opn(i8* %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ logGC();
void vmemDumpShort() { logGC(); }


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

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

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

LLVM IR (-O2):
define void @vmemDumpShort() {
%1 = tail call i32 (...) @logGC()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int n, k, i, j;
  k = 0;
  i = 0;
  while (i < n) {
    i = i + 1;
    k = k + 1;
  }
  j = n;
  while (j > 0) {
    __VERIFIER_assert(k > 0);
    j = j - 1;
    k = k - 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1150 <main+0x40>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1188 <main+0x78>
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x46>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pr_info(char *);
void so2_dumpstack_exit(void) { pr_info("dumpstack exit\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"dumpstack exit\0A\00"
define void @so2_dumpstack_exit() {
%1 = call i32 @pr_info(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"dumpstack exit\0A\00"
define void @so2_dumpstack_exit() {
%1 = tail call i32 @pr_info(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("*\n* *\n* * *\n* * * *\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"*\0A* *\0A* * *\0A* * * *\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int foo1(void) {}


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

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

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

LLVM IR (-O2):
define i32 @foo1() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ cs_high();
int /*<<< orphan*/ spi(int);
void sdmmc_cmd_term() {
  cs_high();
  spi(0xff);
}


x86 assembly (clang, -O0):
<sdmmc_cmd_term>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cs_high@plt>
mov    $0xff,%edi
call   1040 <spi@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_cmd_term>:
push   %rax
xor    %eax,%eax
call   1030 <cs_high@plt>
mov    $0xff,%edi
pop    %rax
jmp    1040 <spi@plt>

LLVM IR (-O0):
define void @sdmmc_cmd_term() {
%1 = call i32 (...) @cs_high()
%2 = call i32 @spi(i32 255)
ret void
}

LLVM IR (-O2):
define void @sdmmc_cmd_term() {
%1 = tail call i32 (...) @cs_high()
%2 = tail call i32 @spi(i32 255)
ret void
}
/* Type definitions */
struct test {
  int dummy;
};

/* Variables and functions */
void priv_netinet_raw_cleanup(int asroot, int injail, struct test *test) {}


x86 assembly (clang, -O0):
<priv_netinet_raw_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.test = type { i32 }
define void @priv_netinet_raw_cleanup(i32 %0, i32 %1, %struct.test* nocapture %2) {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int Iso15693Crc(int *, int);
int Iso15693AddCrc(uint8_t *req, int n) {
  uint16_t crc = Iso15693Crc(req, n);
  req[n] = crc & 0xff;
  req[n + 1] = crc >> 8;
  return n + 2;
}


x86 assembly (clang, -O0):
<Iso15693AddCrc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <Iso15693Crc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
and    $0xff,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%edx
sar    $0x8,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iso15693AddCrc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <Iso15693Crc@plt>
movzbl %al,%edx
movslq %ebp,%rcx
mov    %edx,(%rbx,%rcx,4)
sar    $0x8,%eax
mov    %eax,0x4(%rbx,%rcx,4)
add    $0x2,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Iso15693AddCrc(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** %3
%7 = load i32, i32* %4
%8 = call i32 @Iso15693Crc(i32* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = and i32 %9, 255
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 %10, i32* %14
%15 = load i32, i32* %5
%16 = ashr i32 %15, 8
%17 = load i32*, i32** %3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
store i32 %16, i32* %21
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 2
ret i32 %23
}

LLVM IR (-O2):
define i32 @Iso15693AddCrc(i32* %0, i32 %1) {
%3 = tail call i32 @Iso15693Crc(i32* %0, i32 %1)
%4 = and i32 %3, 255
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %4, i32* %6
%7 = ashr i32 %3, 8
%8 = add nsw i32 %1, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %7, i32* %10
%11 = add nsw i32 %1, 2
ret i32 %11
}
/* Variables and functions */
int rand();
int nextInt(int size) { return rand() % size; }


x86 assembly (clang, -O0):
<nextInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextInt>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nextInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @nextInt(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ aligned_x();
scalar_t__ aligned_y_avx();
int main() {
  if (aligned_x() != aligned_y_avx())
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <aligned_x@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <aligned_y_avx@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     1168 <main+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <aligned_x@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <aligned_y_avx@plt>
cmp    %rax,%rbx
jne    114b <main+0x1b>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @aligned_x()
%3 = call i64 (...) @aligned_y_avx()
%4 = icmp ne i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @aligned_x()
%2 = tail call i64 (...) @aligned_y_avx()
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}
void gtk_binding_set_find() {}


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

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

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

LLVM IR (-O2):
define void @gtk_binding_set_find() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Convert_UncompensatedToTrue();
int main() {
  Convert_UncompensatedToTrue();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Convert_UncompensatedToTrue()
ret i32 0
}
signed short signedshort_ignoring_signedlong(signed short x, signed long y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshort_ignoring_signedlong>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedshort_ignoring_signedlong>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @signedshort_ignoring_signedlong(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshort_ignoring_signedlong(i16 returned signext %0, i64 %1) {
ret i16 %0
}
/* Variables and functions */
int doit(int);
int /*<<< orphan*/ exit(int);
int main(void) {
  int tmp;
  int tmp___0;
  {
    tmp = doit(0);
    if (tmp != 0) {
      exit(1);
    }
    tmp___0 = doit(1);
    if (tmp___0 != 1) {
      exit(1);
    }
    exit(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <doit@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114d <main+0x2d>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    $0x1,%edi
call   1030 <doit@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     116e <main+0x4e>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <doit@plt>
test   %eax,%eax
jne    1142 <main+0x22>
mov    $0x1,%edi
call   1030 <doit@plt>
cmp    $0x1,%eax
jne    1142 <main+0x22>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @doit(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
%6 = tail call i32 @doit(i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %5
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
float max_ff(int /*<<< orphan*/, float);
int /*<<< orphan*/ max_fff(float, float, float);
float max_ffff(float a, float b, float c, float d) {
  return max_ff(max_fff(a, b, c), d);
}


x86 assembly (clang, -O0):
<max_ffff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <max_fff@plt>
mov    %eax,%edi
movss  -0x10(%rbp),%xmm0
call   1040 <max_ff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_ffff>:
push   %rax
movss  %xmm3,0x4(%rsp)
call   1030 <max_fff@plt>
mov    %eax,%edi
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <max_ff@plt>

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

LLVM IR (-O2):
define float @max_ffff(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @max_fff(float %0, float %1, float %2)
%6 = tail call float @max_ff(i32 %5, float %3)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long *);
int foo(long i, long j) {
  printf("foo: i: %ld, address: %p\n", i, &i);
  printf("foo: j: %ld, address: %p\n", j, &j);
  return i * j;
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rdi,0x8(%rsp)
mov    %rbx,(%rsp)
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rdx
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    %rsp,%rdx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    (%rsp),%eax
imul   0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"foo: i: %ld, address: %p\0A\00"
@.str.1 = [26 x i8] c"foo: j: %ld, address: %p\0A\00"
define i32 @foo(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %5, i64* %3)
%7 = load i64, i64* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i64 %7, i64* %4)
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = mul nsw i64 %9, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [26 x i8] c"foo: i: %ld, address: %p\0A\00"
@.str.1 = [26 x i8] c"foo: j: %ld, address: %p\0A\00"
define i32 @foo(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %0, i64* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i64 %1, i64* %4)
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = mul nsw i64 %8, %7
%10 = trunc i64 %9 to i32
ret i32 %10
}
int Cyc_Callgraph_hash_fndecl(struct Cyc_Absyn_Fndecl *fd) { return (int)fd; }


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

x86 assembly (clang, -O2):
<Cyc_Callgraph_hash_fndecl>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_Fndecl = type opaque
define i32 @Cyc_Callgraph_hash_fndecl(%struct.Cyc_Absyn_Fndecl* %0) {
%2 = alloca %struct.Cyc_Absyn_Fndecl*
store %struct.Cyc_Absyn_Fndecl* %0, %struct.Cyc_Absyn_Fndecl** %2
%3 = load %struct.Cyc_Absyn_Fndecl*, %struct.Cyc_Absyn_Fndecl** %2
%4 = ptrtoint %struct.Cyc_Absyn_Fndecl* %3 to i32
ret i32 %4
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Fndecl = type opaque
define i32 @Cyc_Callgraph_hash_fndecl(%struct.Cyc_Absyn_Fndecl* %0) {
%2 = ptrtoint %struct.Cyc_Absyn_Fndecl* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double const *, int);
void tml_dr_vCopy(const double *src, double *dst, int n) {
  memcpy(dst, src, n * sizeof(double));
}


x86 assembly (clang, -O0):
<tml_dr_vCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tml_dr_vCopy>:
mov    %rdi,%rax
shl    $0x3,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @tml_dr_vCopy(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %5
%8 = load double*, double** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(double* %7, double* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @tml_dr_vCopy(double* %0, double* %1, i32 %2) {
%4 = shl i32 %2, 3
%5 = tail call i32 @memcpy(double* %1, double* %0, i32 %4)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare_string(const void *c1, const void *c2) {
  return strcmp((const char *)c1, (const char *)c2);
}


x86 assembly (clang, -O0):
<compare_string>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_string>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare_string(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int strcmp(char *, char *);
int key_cmp_str_p(char **old, char **new) { return strcmp(*new, *old); }


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

x86 assembly (clang, -O2):
<key_cmp_str_p>:
mov    (%rsi),%rax
mov    (%rdi),%rsi
mov    %rax,%rdi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @key_cmp_str_p(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 = load i8*, i8** %5
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = call i32 @strcmp(i8* %6, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @key_cmp_str_p(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i8*, i8** %0
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
ret i32 %5
}
int sse_version_available(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @sse_version_available() {
ret i32 2
}

LLVM IR (-O2):
define i32 @sse_version_available() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ ajAsseminExit();
int /*<<< orphan*/ ajAssemoutExit();
void ajAssemExit(void) {
  ajAsseminExit();
  ajAssemoutExit();
  return;
}


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

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

LLVM IR (-O0):
define void @ajAssemExit() {
%1 = call i32 (...) @ajAsseminExit()
%2 = call i32 (...) @ajAssemoutExit()
ret void
}

LLVM IR (-O2):
define void @ajAssemExit() {
%1 = tail call i32 (...) @ajAsseminExit()
%2 = tail call i32 (...) @ajAssemoutExit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, double);
size_t strlen(char *);
size_t get_ratingstr_len(char *s, int decimals, double rating) {
  sprintf(s, "%.*f", decimals, rating);
  return strlen(s);
}


x86 assembly (clang, -O0):
<get_ratingstr_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ratingstr_len>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xed3(%rip),%rsi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%.*f\00"
define i64 @get_ratingstr_len(i8* %0, i32 %1, double %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
store i8* %0, i8** %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load double, double* %6
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8, double %9)
%11 = load i8*, i8** %4
%12 = call i64 @strlen(i8* %11)
ret i64 %12
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.*f\00"
define i64 @get_ratingstr_len(i8* nocapture %0, i32 %1, double %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, double %2)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %5
}
/* Variables and functions */
scalar_t__ alloca(size_t);
int /*<<< orphan*/ assert(unsigned char *);
scalar_t__ malloc(size_t);
unsigned char *memory_allocate(size_t size) {
  unsigned char *p_buffer = 0;
  p_buffer = (size < 512) ? ((unsigned char *)alloca(size))
                          : ((unsigned char *)malloc(size));
  assert(p_buffer);
  return p_buffer;
}


x86 assembly (clang, -O0):
<memory_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x200,-0x8(%rbp)
jae    1164 <memory_allocate+0x34>
mov    -0x8(%rbp),%rdi
call   1040 <alloca@plt>
mov    %rax,-0x18(%rbp)
jmp    1171 <memory_allocate+0x41>
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_allocate>:
push   %rbx
cmp    $0x1ff,%rdi
ja     1141 <memory_allocate+0x11>
call   1040 <alloca@plt>
jmp    1146 <memory_allocate+0x16>
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memory_allocate(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = icmp ult i64 %4, 512
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i64 @alloca(i64 %7)
%9 = inttoptr i64 %8 to i8*
br label %14
10: ; preds = %1
%11 = load i64, i64* %2
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
br label %14
14: ; preds = %10, %6
%15 = phi i8* [ %9, %6 ], [ %13, %10 ]
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = call i32 @assert(i8* %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @memory_allocate(i64 %0) {
%2 = icmp ult i64 %0, 512
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i64 @alloca(i64 %0)
br label %7
5: ; preds = %1
%6 = tail call i64 @malloc(i64 %0)
br label %7
7: ; preds = %5, %3
%8 = phi i64 [ %4, %3 ], [ %6, %5 ]
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @assert(i8* %9)
ret i8* %9
}
/* Type definitions */
struct user_regs_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exec_by_all_variants(int, int *);
void sys_rt_sigreturn(int variant_count, int *child,
                      struct user_regs_struct *regs) {
  exec_by_all_variants(variant_count, child);
}


x86 assembly (clang, -O0):
<sys_rt_sigreturn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <exec_by_all_variants@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_rt_sigreturn>:
jmp    1030 <exec_by_all_variants@plt>

LLVM IR (-O0):
%struct.user_regs_struct = type { i32 }
define void @sys_rt_sigreturn(i32 %0, i32* %1, %struct.user_regs_struct* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.user_regs_struct*
store i32 %0, i32* %4
store i32* %1, i32** %5
store %struct.user_regs_struct* %2, %struct.user_regs_struct** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = call i32 @exec_by_all_variants(i32 %7, i32* %8)
ret void
}

LLVM IR (-O2):
%struct.user_regs_struct = type { i32 }
define void @sys_rt_sigreturn(i32 %0, i32* %1, %struct.user_regs_struct* nocapture readnone %2) {
%4 = tail call i32 @exec_by_all_variants(i32 %0, i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/ *, int, int);
void macro_getmaxyx(WINDOW *win, int *y, int *x) { getmaxyx(win, *y, *x); }


x86 assembly (clang, -O0):
<macro_getmaxyx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
call   1030 <getmaxyx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macro_getmaxyx>:
mov    (%rsi),%esi
mov    (%rdx),%edx
jmp    1030 <getmaxyx@plt>

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

LLVM IR (-O2):
define void @macro_getmaxyx(i32* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = tail call i32 @getmaxyx(i32* %0, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
char const *strong_n3();
const char *__attribute__((section(".test.c"))) call_strong_n3(void) {
  return strong_n3() + 1;
}


x86 assembly (clang, -O0):
<call_strong_n3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <strong_n3@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_strong_n3>:
push   %rax
xor    %eax,%eax
call   1030 <strong_n3@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_strong_n3() section ".test.c" {
%1 = call i8* (...) @strong_n3()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_strong_n3() section ".test.c" {
%1 = tail call i8* (...) @strong_n3()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
/* Variables and functions */
float sinx(float, float);
float window_mag(float pidetune, float cospidetune) {
  return (sinx(pidetune + (3.14159265 / 2), cospidetune) +
          sinx(pidetune - (3.14159265 / 2), -cospidetune));
}


x86 assembly (clang, -O0):
<window_mag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xecd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <sinx@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea5(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
call   1030 <sinx@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_mag>:
sub    $0x28,%rsp
movaps %xmm1,0x10(%rsp)
cvtss2sd %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0xed5(%rip),%xmm0
addsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <sinx@plt>
movss  %xmm0,0x4(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xebc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movaps 0x10(%rsp),%xmm1
xorps  0xeb4(%rip),%xmm1
call   1030 <sinx@plt>
addss  0x4(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @window_mag(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fadd double %6, 0x3FF921FB53C8D4F1
%8 = fptrunc double %7 to float
%9 = load float, float* %4
%10 = call float @sinx(float %8, float %9)
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = fsub double %12, 0x3FF921FB53C8D4F1
%14 = fptrunc double %13 to float
%15 = load float, float* %4
%16 = fneg float %15
%17 = call float @sinx(float %14, float %16)
%18 = fadd float %10, %17
ret float %18
}

LLVM IR (-O2):
define float @window_mag(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fadd double %3, 0x3FF921FB53C8D4F1
%5 = fptrunc double %4 to float
%6 = tail call float @sinx(float %5, float %1)
%7 = fadd double %3, 0xBFF921FB53C8D4F1
%8 = fptrunc double %7 to float
%9 = fneg float %1
%10 = tail call float @sinx(float %8, float %9)
%11 = fadd float %6, %10
ret float %11
}
int colliding_name(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @colliding_name() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @colliding_name() {
ret i32 -1
}
int isdigit(int c) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_surface_get_version(struct wl_surface *wl_surface) {
  return wl_proxy_get_version((struct wl_proxy *)wl_surface);
}


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

x86 assembly (clang, -O2):
<wl_surface_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

LLVM IR (-O0):
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_surface_get_version(%struct.wl_surface* %0) {
%2 = alloca %struct.wl_surface*
store %struct.wl_surface* %0, %struct.wl_surface** %2
%3 = load %struct.wl_surface*, %struct.wl_surface** %2
%4 = bitcast %struct.wl_surface* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_get_version(%struct.wl_proxy* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_surface_get_version(%struct.wl_surface* %0) {
%2 = bitcast %struct.wl_surface* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ date_time;

/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
scalar_t__ strptime(char *, char *, struct tm *);
int /*<<< orphan*/ timegm(struct tm *);
time_t sp_isdate(char *string) {
  struct tm date_time;
  time_t seconds = 0;
  memset((void *)&date_time, 0, sizeof(date_time));
  if (strptime(string, "%Y-%m-%d", &date_time)) {
    seconds = timegm(&date_time);
  }
  return seconds;
}


x86 assembly (clang, -O0):
<sp_isdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    0xea2(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1050 <strptime@plt>
cmp    $0x0,%rax
je     117d <sp_isdate+0x4d>
lea    -0x10(%rbp),%rdi
call   1040 <timegm@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp_isdate>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
lea    0x8(%rsp),%r15
xor    %ebx,%ebx
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    0xea7(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
call   1050 <strptime@plt>
test   %rax,%rax
je     1175 <sp_isdate+0x45>
lea    0x8(%rsp),%rdi
call   1040 <timegm@plt>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%Y-%m-%d\00"
define i32 @sp_isdate(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.tm
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
%5 = bitcast %struct.tm* %3 to i8*
%6 = call i32 @memset(i8* %5, i32 0, i32 4)
%7 = load i8*, i8** %2
%8 = call i64 @strptime(i8* %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %3)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @timegm(%struct.tm* %3)
store i32 %11, i32* %4
br label %12
12: ; preds = %10, %1
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%Y-%m-%d\00"
define i32 @sp_isdate(i8* %0) {
%2 = alloca %struct.tm
%3 = bitcast %struct.tm* %2 to i8*
%4 = call i32 @memset(i8* %3, i32 0, i32 4)
%5 = call i64 @strptime(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @timegm(%struct.tm* %2)
br label %9
9: ; preds = %7, %1
%10 = phi i32 [ %8, %7 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x48() {
  Assert_real((isgraph(72)),
              "/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_isgraph.c",
              365, ("isgraph should be 1 for H"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x48>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x16d,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x48>:
push   %rax
mov    $0x48,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x16d,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for H\00"
define void @t_isgraph_0x48() {
%1 = call i32 @isgraph(i32 72)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for H\00"
define void @t_isgraph_0x48() {
%1 = tail call i32 @isgraph(i32 72)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetPrechargePeriod(char a) {
  unsigned char d[] = {0xD9, a};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetPrechargePeriod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0xd9,-0x3(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
lea    -0x3(%rbp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetPrechargePeriod>:
push   %rax
movb   $0xd9,0x6(%rsp)
mov    %dil,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SetPrechargePeriod(i8 signext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 -39, i8* %4
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %2
store i8 %6, i8* %5
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call i32 @oled_SendCommand(i8* %7, i32 2)
ret void
}

LLVM IR (-O2):
define void @SetPrechargePeriod(i8 signext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 -39, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 %0, i8* %4
%5 = call i32 @oled_SendCommand(i8* %3, i32 2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
int get_XExposeEvent_send_event(void *_p) {
  return (int)((XExposeEvent *)_p)->send_event;
}


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

x86 assembly (clang, -O2):
<get_XExposeEvent_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XExposeEvent_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XExposeEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
NWL(n) int n;
{
  int i = 1;
  while (i <= n) {
    printf("\n");
    i++;
  }
}


x86 assembly (clang, -O0):
<NWL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114a <NWL+0x3a>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <NWL+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NWL>:
push   %rbx
test   %edi,%edi
jle    112f <NWL+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <NWL+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @NWL(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = tail call i32 @putchar(i32 10)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i32 undef
}
void _buttonlight_off(void) {}


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

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

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

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