xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x74() {
  Assert_real((isgraph(116)),
              "/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",
              585, ("isgraph should be 1 for t"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x74>:
push   %rax
mov    $0x74,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x249,%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 t\00"
define void @t_isgraph_0x74() {
%1 = call i32 @isgraph(i32 116)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 585, 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 t\00"
define void @t_isgraph_0x74() {
%1 = tail call i32 @isgraph(i32 116)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 585, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long gfx_pci_config_read(int);
int /*<<< orphan*/ gfx_pci_config_write(int, unsigned long);
int cs5530_disable_softvga(void) {
  unsigned long reg_val;
  reg_val = gfx_pci_config_read(0x80009444);
  reg_val |= 0x1;
  gfx_pci_config_write(0x80009444, reg_val);
  reg_val = gfx_pci_config_read(0x80009444);
  if ((reg_val & 0x1) == 0x1)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<cs5530_disable_softvga>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x80009444,%edi
call   1030 <gfx_pci_config_write@plt>
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x1,%rax
jne    117c <cs5530_disable_softvga+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1183 <cs5530_disable_softvga+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs5530_disable_softvga>:
push   %rax
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
or     $0x1,%rax
mov    $0x80009444,%edi
mov    %rax,%rsi
call   1030 <gfx_pci_config_write@plt>
mov    $0x80009444,%edi
call   1040 <gfx_pci_config_read@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cs5530_disable_softvga() {
%1 = alloca i32
%2 = alloca i64
%3 = call i64 @gfx_pci_config_read(i32 -2147445692)
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = or i64 %4, 1
store i64 %5, i64* %2
%6 = load i64, i64* %2
%7 = call i32 @gfx_pci_config_write(i32 -2147445692, i64 %6)
%8 = call i64 @gfx_pci_config_read(i32 -2147445692)
store i64 %8, i64* %2
%9 = load i64, i64* %2
%10 = and i64 %9, 1
%11 = icmp eq i64 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %0
store i32 1, i32* %1
br label %14
13: ; preds = %0
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @cs5530_disable_softvga() {
%1 = tail call i64 @gfx_pci_config_read(i32 -2147445692)
%2 = or i64 %1, 1
%3 = tail call i32 @gfx_pci_config_write(i32 -2147445692, i64 %2)
%4 = tail call i64 @gfx_pci_config_read(i32 -2147445692)
%5 = trunc i64 %4 to i32
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int strtoul(char *, char **, int /*<<< orphan*/);
void parse_arg(char *arg, int *paddr, int *psize) {
  char *end;
  *paddr = strtoul(arg, &end, 0);
  if (*end == ':')
    *psize = strtoul(++end, 0, 0);
}


x86 assembly (clang, -O0):
<parse_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    116a <parse_arg+0x5a>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_arg>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %eax,(%rbx)
mov    (%rsp),%rdi
cmpb   $0x3a,(%rdi)
jne    113f <parse_arg+0x2f>
add    $0x1,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @parse_arg(i8* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @strtoul(i8* %0, i8** %4, i32 0)
store i32 %6, i32* %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 58
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = tail call i32 @strtoul(i8* nocapture %11, i8** null, i32 0)
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %3
ret void
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
void *_malloc_r(struct _reent *r, size_t size) { return malloc(size); }


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

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

LLVM IR (-O0):
%struct._reent = type { i32 }
define i8* @_malloc_r(%struct._reent* %0, i64 %1) {
%3 = alloca %struct._reent*
%4 = alloca i64
store %struct._reent* %0, %struct._reent** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define noalias i8* @_malloc_r(%struct._reent* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
int main(int argc, char **argv) {
  unsigned int i;
  for (i = 0; i < 2000000000; i++)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x77359400,-0x14(%rbp)
jae    1139 <main+0x39>
jmp    112b <main+0x2b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
store i32 0, i32* %6
br label %7
7: ; preds = %11, %2
%8 = load i32, i32* %6
%9 = icmp ult i32 %8, 2000000000
br i1 %9, label %10, label %14
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = load i32, i32* %6
%13 = add i32 %12, 1
store i32 %13, i32* %6
br label %7
14: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t count_digits(uint32_t num) {
  uint32_t digits = 1;
  while (num > 9) {
    num /= 10;
    digits++;
  }
  return digits;
}


x86 assembly (clang, -O0):
<count_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    1134 <count_digits+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <count_digits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_digits>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <count_digits+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <count_digits+0x20>
ret

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

LLVM IR (-O2):
define i32 @count_digits(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
void RTStrUtf8ToCurrentCPTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrUtf8ToCurrentCPTag() {
ret void
}
/* Variables and functions */
void xor_swap(char **left, char **right) {
  *left = (char *)(((intptr_t)*left) ^ ((intptr_t)*right));
  *right = (char *)(((intptr_t)*left) ^ ((intptr_t)*right));
  *left = (char *)(((intptr_t)*left) ^ ((intptr_t)*right));
}


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

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

LLVM IR (-O0):
define void @xor_swap(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = ptrtoint i8* %6 to i64
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = ptrtoint i8* %9 to i64
%11 = xor i64 %7, %10
%12 = inttoptr i64 %11 to i8*
%13 = load i8**, i8*** %3
store i8* %12, i8** %13
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
%16 = ptrtoint i8* %15 to i64
%17 = load i8**, i8*** %4
%18 = load i8*, i8** %17
%19 = ptrtoint i8* %18 to i64
%20 = xor i64 %16, %19
%21 = inttoptr i64 %20 to i8*
%22 = load i8**, i8*** %4
store i8* %21, i8** %22
%23 = load i8**, i8*** %3
%24 = load i8*, i8** %23
%25 = ptrtoint i8* %24 to i64
%26 = load i8**, i8*** %4
%27 = load i8*, i8** %26
%28 = ptrtoint i8* %27 to i64
%29 = xor i64 %25, %28
%30 = inttoptr i64 %29 to i8*
%31 = load i8**, i8*** %3
store i8* %30, i8** %31
ret void
}

LLVM IR (-O2):
define void @xor_swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = ptrtoint i8* %3 to i64
%5 = load i8*, i8** %1
%6 = ptrtoint i8* %5 to i64
%7 = xor i64 %6, %4
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %0
%9 = load i8*, i8** %1
%10 = ptrtoint i8* %9 to i64
%11 = xor i64 %7, %10
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %1
%13 = load i8*, i8** %0
%14 = ptrtoint i8* %13 to i64
%15 = xor i64 %11, %14
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %0
ret void
}
int foo(int i) { return i; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ giraVertical();
int /*<<< orphan*/ inverteMatriz();
void inverteMatriz2() {
  giraVertical();
  inverteMatriz();
}


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

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

LLVM IR (-O0):
define void @inverteMatriz2() {
%1 = call i32 (...) @giraVertical()
%2 = call i32 (...) @inverteMatriz()
ret void
}

LLVM IR (-O2):
define void @inverteMatriz2() {
%1 = tail call i32 (...) @giraVertical()
%2 = tail call i32 (...) @inverteMatriz()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void sleep_1(int *secs) { sleep(*secs); }


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

x86 assembly (clang, -O2):
<sleep_1>:
mov    (%rdi),%edi
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @sleep_1(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @sleep(i32 %2)
ret void
}
/* Variables and functions */
int execve(char *, char *const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void run_exec(void) {
  char *const argv[] = {"./exec_target", NULL};
  if (execve("./exec_target", argv, NULL) == -1) {
    perror("execve");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<run_exec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2cd1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2cce(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <execve@plt>
cmp    $0xffffffff,%eax
jne    1181 <run_exec+0x51>
lea    0xe9c(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_exec>:
sub    $0x18,%rsp
movaps 0x2cd5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeba(%rip),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <execve@plt>
cmp    $0xffffffff,%eax
je     115a <run_exec+0x2a>
add    $0x18,%rsp
ret
lea    0xead(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"./exec_target\00"
@__const.run_exec.argv = [2 x i8*] [i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [7 x i8] c"execve\00"
define void @run_exec() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execve(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %3, i32* null)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"./exec_target\00"
@__const.run_exec.argv = [2 x i8*] [i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [7 x i8] c"execve\00"
define void @run_exec() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execve(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %3, i32* null)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
ret void
}
float __attribute__((no)) foo(float d, int n) {
  unsigned i;
  float accum = d;
  for (i = 0; i < n; i++)
    accum += d;
  return accum;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1146 <foo+0x46>
movss  -0x4(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <foo+0x1d>
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %edi,%edi
je     115c <foo+0x5c>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
movaps %xmm0,%xmm1
cmp    $0x7,%ecx
jb     1145 <foo+0x45>
and    $0xfffffff8,%edi
movaps %xmm0,%xmm1
nopw   0x0(%rax,%rax,1)
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
addss  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1120 <foo+0x20>
test   %eax,%eax
je     1159 <foo+0x59>
nopl   0x0(%rax)
addss  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1150 <foo+0x50>
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @foo(float %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %33, label %4
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi float [ %0, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = fadd float %11, %0
%14 = fadd float %13, %0
%15 = fadd float %14, %0
%16 = fadd float %15, %0
%17 = fadd float %16, %0
%18 = fadd float %17, %0
%19 = fadd float %18, %0
%20 = fadd float %19, %0
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi float [ undef, %4 ], [ %20, %10 ]
%25 = phi float [ %0, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi float [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = fadd float %28, %0
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi float [ %0, %2 ], [ %24, %23 ], [ %30, %27 ]
ret float %34
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ write_little_endian32(int /*<<< orphan*/ *,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ write_little_endian64(int /*<<< orphan*/ *,
                                         int /*<<< orphan*/);
void write_addr(uint8_t *buf, uint64_t value, int address_size) {
  switch (address_size) {
  case 4:
    write_little_endian32(buf, value);
    return;
  case 8:
    write_little_endian64(buf, value);
    return;
  }
}


x86 assembly (clang, -O0):
<write_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x4,%eax
je     1157 <write_addr+0x37>
jmp    1146 <write_addr+0x26>
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
je     1168 <write_addr+0x48>
jmp    1174 <write_addr+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <write_little_endian32@plt>
jmp    1174 <write_addr+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <write_little_endian64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_addr>:
cmp    $0x8,%edx
je     112f <write_addr+0xf>
cmp    $0x4,%edx
jne    1134 <write_addr+0x14>
jmp    1030 <write_little_endian32@plt>
jmp    1040 <write_little_endian64@plt>
ret

LLVM IR (-O0):
define void @write_addr(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* %6
switch i32 %7, label %16 [
i32 4, label %8
i32 8, label %12
]
8: ; preds = %3
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = call i32 @write_little_endian32(i32* %9, i32 %10)
br label %16
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = call i32 @write_little_endian64(i32* %13, i32 %14)
br label %16
16: ; preds = %8, %12, %3
ret void
}

LLVM IR (-O2):
define void @write_addr(i32* %0, i32 %1, i32 %2) {
switch i32 %2, label %8 [
i32 4, label %4
i32 8, label %6
]
4: ; preds = %3
%5 = tail call i32 @write_little_endian32(i32* %0, i32 %1)
br label %8
6: ; preds = %3
%7 = tail call i32 @write_little_endian64(i32* %0, i32 %1)
br label %8
8: ; preds = %4, %6, %3
ret void
}
void RTStrToUInt8Ex(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToUInt8Ex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swap(int *, int *);
void f(void) {
  int a = 83;
  int c = -74;
  swap(&a, &c);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x53,-0x4(%rbp)
movl   $0xffffffb6,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movl   $0x53,0x4(%rsp)
movl   $0xffffffb6,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <swap@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
store i32 83, i32* %1
store i32 -74, i32* %2
%3 = call i32 @swap(i32* %1, i32* %2)
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 83, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 -74, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
ret void
}
void mmu_setup_pgd(struct mm_struct *mm, void *pgd) {}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @mmu_setup_pgd(%struct.mm_struct* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aux(void *, size_t, size_t,
                       int (*)(void const *, void const *, void *), void *,
                       int /*<<< orphan*/, size_t);
void qsort_r(void *base, size_t nmemb, size_t size,
             int (*compar)(const void *, const void *, void *), void *arg) {
  if (nmemb > 0)
    aux(base, nmemb, size, compar, arg, 0, nmemb - 1);
}


x86 assembly (clang, -O0):
<qsort_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    115f <qsort_r+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
xor    %r9d,%r9d
mov    %rax,(%rsp)
call   1030 <aux@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_r>:
test   %rsi,%rsi
je     1127 <qsort_r+0x17>
push   %rax
lea    -0x1(%rsi),%rax
mov    %rax,(%rsp)
xor    %r9d,%r9d
call   1030 <aux@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @qsort_r(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32 (i8*, i8*, i8*)*
%10 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 (i8*, i8*, i8*)* %3, i32 (i8*, i8*, i8*)** %9
store i8* %4, i8** %10
%11 = load i64, i64* %7
%12 = icmp ugt i64 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %5
%14 = load i8*, i8** %6
%15 = load i64, i64* %7
%16 = load i64, i64* %8
%17 = load i32 (i8*, i8*, i8*)*, i32 (i8*, i8*, i8*)** %9
%18 = load i8*, i8** %10
%19 = load i64, i64* %7
%20 = sub i64 %19, 1
%21 = call i32 @aux(i8* %14, i64 %15, i64 %16, i32 (i8*, i8*, i8*)* %17, i8* %18, i32 0, i64 %20)
br label %22
22: ; preds = %13, %5
ret void
}

LLVM IR (-O2):
define void @qsort_r(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4) {
%6 = icmp eq i64 %1, 0
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = add i64 %1, -1
%9 = tail call i32 @aux(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4, i32 0, i64 %8)
br label %10
10: ; preds = %7, %5
ret void
}
/* Variables and functions */
int get_enough(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putenv(char *);
int main() {
  putenv("LOOP_O=0.0");
  putenv("TIMING_O=0.0");
  printf("%u\n", get_enough(0));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <putenv@plt>
lea    0xeb9(%rip),%rdi
call   1050 <putenv@plt>
xor    %edi,%edi
call   1040 <get_enough@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <putenv@plt>
lea    0xec7(%rip),%rdi
call   1050 <putenv@plt>
xor    %edi,%edi
call   1040 <get_enough@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"LOOP_O=0.0\00"
@.str.1 = [13 x i8] c"TIMING_O=0.0\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @putenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @putenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @get_enough(i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"LOOP_O=0.0\00"
@.str.1 = [13 x i8] c"TIMING_O=0.0\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @putenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @get_enough(i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}
void _backlight_off(void) {}


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

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

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

LLVM IR (-O2):
define void @_backlight_off() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ codeln(char *);
void ini_quadratic() { codeln("cfg_quadratic (0.5);"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"cfg_quadratic (0.5);\00"
define void @ini_quadratic() {
%1 = call i32 @codeln(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"cfg_quadratic (0.5);\00"
define void @ini_quadratic() {
%1 = tail call i32 @codeln(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
int isatty(int x) { return x == 0; }


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isatty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void Atm128AlarmAsyncP$0$Alarm$fired(void) { AlarmToTimerC$0$Alarm$fired(); }


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

x86 assembly (clang, -O2):
<Atm128AlarmAsyncP$0$Alarm$fired>:
xor    %eax,%eax
jmp    1030 <AlarmToTimerC$0$Alarm$fired@plt>

LLVM IR (-O0):
define void @"Atm128AlarmAsyncP$0$Alarm$fired"() {
%1 = call i32 (...) @"AlarmToTimerC$0$Alarm$fired"()
ret void
}

LLVM IR (-O2):
define void @"Atm128AlarmAsyncP$0$Alarm$fired"() {
%1 = tail call i32 (...) @"AlarmToTimerC$0$Alarm$fired"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void ERROR(char *text, int errornum) {
  fprintf(stderr, "%s\n", text);
  exit(errornum);
}


x86 assembly (clang, -O0):
<ERROR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ERROR>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @ERROR(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @ERROR(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
char *chksumfile(char *);
char *acceptable_sum(char *dep) { return chksumfile(dep); }


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

x86 assembly (clang, -O2):
<acceptable_sum>:
jmp    1030 <chksumfile@plt>

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

LLVM IR (-O2):
define i8* @acceptable_sum(i8* %0) {
%2 = tail call i8* @chksumfile(i8* %0)
ret i8* %2
}
double dot(const double *p1, const double *p2) {
  return (p1[0] * p2[0] + p1[1] * p2[1] + p1[2] * p2[2]);
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @dot(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 5;
  int y = x + 1;
  printf("%d\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%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
mov    $0x6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void cfree(void *);
void _cfree_r(struct _reent *ptr, void *mem) { return cfree(mem); }


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

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

LLVM IR (-O0):
%struct._reent = type { i32 }
define void @_cfree_r(%struct._reent* %0, i8* %1) {
%3 = alloca %struct._reent*
%4 = alloca i8*
store %struct._reent* %0, %struct._reent** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define void @_cfree_r(%struct._reent* nocapture readnone %0, i8* %1) {
tail call void @cfree(i8* %1)
ret void
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ graphicMode();
int xmessagePresent() {
  static int lXmessagePresent = -1;
  if (lXmessagePresent < 0) {
    lXmessagePresent = detectPresence("xmessage");
  }
  return lXmessagePresent && graphicMode();
}


x86 assembly (clang, -O0):
<xmessagePresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <xmessagePresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116a <xmessagePresent+0x4a>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmessagePresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1143 <xmessagePresent+0x23>
test   %eax,%eax
je     1159 <xmessagePresent+0x39>
xor    %eax,%eax
call   1030 <graphicMode@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2edb(%rip)
test   %eax,%eax
jne    112f <xmessagePresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@xmessagePresent.lXmessagePresent = internal global i32 -1
@.str = [9 x i8] c"xmessage\00"
define i32 @xmessagePresent() {
%1 = load i32, i32* @xmessagePresent.lXmessagePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @xmessagePresent.lXmessagePresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @xmessagePresent.lXmessagePresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@xmessagePresent.lXmessagePresent = internal unnamed_addr global i32 -1
@.str = [9 x i8] c"xmessage\00"
define i32 @xmessagePresent() {
%1 = load i32, i32* @xmessagePresent.lXmessagePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @xmessagePresent.lXmessagePresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
void RTMsgErrorV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMsgErrorV() {
ret void
}
__attribute__((no, noclone)) unsigned __int128 t144_3sub(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((signed __int128)(-1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t144_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
not    %rcx
not    %rdx
mov    $0x1,%al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    1155 <t144_3sub+0x45>
jmp    115c <t144_3sub+0x4c>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t144_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
not    %rbx
not    %r14
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t144_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = zext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 -1, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t144_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = xor i128 %6, -1
%8 = tail call i32 (...) @bar()
%9 = trunc i128 %7 to i64
%10 = lshr i128 %7, 64
%11 = trunc i128 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
/* Variables and functions */
int LCS_Length();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("\nДължина на най-дългата обща подредица: %u", LCS_Length());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <LCS_Length@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [75 x i8] c"\0A\D0\94\D1\8A\D0\BB\D0\B6\D0\B8\D0\BD\D0\B0 \D0\BD\D0\B0 \D0\BD\D0\B0\D0\B9-\D0\B4\D1\8A\D0\BB\D0\B3\D0\B0\D1\82\D0\B0 \D0\BE\D0\B1\D1\89\D0\B0 \D0\BF\D0\BE\D0\B4\D1\80\D0\B5\D0\B4\D0\B8\D1\86\D0\B0: %u\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @LCS_Length()
%3 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [75 x i8] c"\0A\D0\94\D1\8A\D0\BB\D0\B6\D0\B8\D0\BD\D0\B0 \D0\BD\D0\B0 \D0\BD\D0\B0\D0\B9-\D0\B4\D1\8A\D0\BB\D0\B3\D0\B0\D1\82\D0\B0 \D0\BE\D0\B1\D1\89\D0\B0 \D0\BF\D0\BE\D0\B4\D1\80\D0\B5\D0\B4\D0\B8\D1\86\D0\B0: %u\00"
define i32 @main() {
%1 = tail call i32 (...) @LCS_Length()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ be_nice_to_people();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ snprintf(char *, int, char const *);
int /*<<< orphan*/ system(char *);
int main(int argc, const char **argv) {
  be_nice_to_people();
  char buf[80];
  snprintf(buf, 70, argv[1]);
  printf(buf);
  printf("\n");
  system("/bin/ls");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <be_nice_to_people@plt>
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    $0x46,%esi
call   1050 <snprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <printf@plt>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
lea    0xe63(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%rbx
xor    %eax,%eax
call   1080 <be_nice_to_people@plt>
mov    0x8(%rbx),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x46,%esi
call   1060 <snprintf@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe64(%rip),%rdi
call   1040 <system@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [8 x i8] c"/bin/ls\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [80 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @be_nice_to_people()
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @snprintf(i8* %8, i32 70, i8* %11)
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%14 = call i32 @printf(i8* %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"/bin/ls\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [80 x i8]
%4 = tail call i32 (...) @be_nice_to_people()
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @snprintf(i8* %5, i32 70, i8* %7)
%9 = call i32 @printf(i8* %5)
%10 = call i32 @putchar(i32 10)
%11 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
}
int main() {
  int f = 0;
  f = 3;
  return f;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}