xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long get_tls_address();
unsigned long get_thread_local_offset(void *thread_local_ptr) {
  return (unsigned long)thread_local_ptr - get_tls_address();
}


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

x86 assembly (clang, -O2):
<get_thread_local_offset>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <get_tls_address@plt>
sub    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @get_thread_local_offset(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i64 (...) @get_tls_address()
%6 = sub i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_thread_local_offset(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i64 (...) @get_tls_address()
%4 = sub i64 %2, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_173() {
  Assert_real((isqrt(173) == 13),
              "/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/stdlib/isqrt.c",
              870, ("Integer square root of 173 should be 13"));
}


x86 assembly (clang, -O0):
<t_sqrt_173>:
push   %rbp
mov    %rsp,%rbp
mov    $0xad,%edi
call   1030 <isqrt@plt>
cmp    $0xd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x366,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_173>:
push   %rax
mov    $0xad,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xd,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x366,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 173 should be 13\00"
define void @t_sqrt_173() {
%1 = call i32 @isqrt(i32 173)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 870, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 173 should be 13\00"
define void @t_sqrt_173() {
%1 = tail call i32 @isqrt(i32 173)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 870, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int host_to_usrp_u32(unsigned int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @host_to_usrp_u32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ putd(unsigned int);
int /*<<< orphan*/ str_split(char *, char *, unsigned int *);
void test_str_split() {
  unsigned int length;
  char str5[] = " a simon!";
  str_split(str5, "", &length);
  putd(length);
}


x86 assembly (clang, -O0):
<test_str_split>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xe(%rbp),%rdi
lea    0xec0(%rip),%rsi
lea    -0x4(%rbp),%rdx
call   1040 <str_split@plt>
mov    -0x4(%rbp),%edi
call   1030 <putd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_str_split>:
sub    $0x18,%rsp
movabs $0x6e6f6d6973206120,%rax
6d 6f 6e
mov    %rax,0x8(%rsp)
movw   $0x21,0x10(%rsp)
lea    0xec8(%rip),%rsi
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rdx
call   1040 <str_split@plt>
mov    0x4(%rsp),%edi
call   1030 <putd@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_str_split.str5 = [10 x i8] c" a simon!\00"
@.str = [1 x i8] zeroinitializer
define void @test_str_split() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast [10 x i8]* %2 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @str_split(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @putd(i32 %6)
ret void
}

LLVM IR (-O2):
@__const.test_str_split.str5 = [10 x i8] c" a simon!\00"
@.str = [1 x i8] zeroinitializer
define void @test_str_split() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @str_split(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @putd(i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_RCVBUF;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/ *, int);
int set_rcvbuf(int socket, u_int32_t buff_size) {
  return setsockopt(socket, SOL_SOCKET, SO_RCVBUF, &buff_size,
                    sizeof(u_int32_t));
}


x86 assembly (clang, -O0):
<set_rcvbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_rcvbuf>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_RCVBUF = global i32 0
define i32 @set_rcvbuf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_RCVBUF
%8 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i32* %4, i32 4)
ret i32 %8
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_RCVBUF = global i32 0
define i32 @set_rcvbuf(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_RCVBUF
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %3, i32 4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_TRIANGLES;
int /*<<< orphan*/ glArrayElement(int);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFlush();
void display() {
  glClear(GL_COLOR_BUFFER_BIT);
  glBegin(GL_TRIANGLES);
  glArrayElement(0);
  glArrayElement(1);
  glArrayElement(2);
  glEnd();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
xor    %edi,%edi
call   1060 <glArrayElement@plt>
mov    $0x1,%edi
call   1060 <glArrayElement@plt>
mov    $0x2,%edi
call   1060 <glArrayElement@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
mov    $0x0,%al
call   1050 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
xor    %edi,%edi
call   1060 <glArrayElement@plt>
mov    $0x1,%edi
call   1060 <glArrayElement@plt>
mov    $0x2,%edi
call   1060 <glArrayElement@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_TRIANGLES = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = load i32, i32* @GL_TRIANGLES
%4 = call i32 @glBegin(i32 %3)
%5 = call i32 @glArrayElement(i32 0)
%6 = call i32 @glArrayElement(i32 1)
%7 = call i32 @glArrayElement(i32 2)
%8 = call i32 (...) @glEnd()
%9 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_TRIANGLES = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = load i32, i32* @GL_TRIANGLES
%4 = tail call i32 @glBegin(i32 %3)
%5 = tail call i32 @glArrayElement(i32 0)
%6 = tail call i32 @glArrayElement(i32 1)
%7 = tail call i32 @glArrayElement(i32 2)
%8 = tail call i32 (...) @glEnd()
%9 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test2(void) { printf("test2\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"test2\00"
define void @test2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t send_ipi(int32_t which) {
  if (which != 0) {
    return -22;
  }
  return 0;
}


x86 assembly (clang, -O0):
<send_ipi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1120 <send_ipi+0x20>
movq   $0xffffffffffffffea,-0x8(%rbp)
ff
jmp    1128 <send_ipi+0x28>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_ipi>:
test   %rdi,%rdi
mov    $0xffffffffffffffea,%rax
cmove  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @send_ipi(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 -22, i64* %2
br label %8
7: ; preds = %1
store i64 0, i64* %2
br label %8
8: ; preds = %7, %6
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
define i64 @send_ipi(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 0, i64 -22
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ SCOTCHFRANDOMPROC(int const *const);
void scotchfrandomproc_(const int *const procnum) {
  SCOTCHFRANDOMPROC(procnum);
}


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

x86 assembly (clang, -O2):
<scotchfrandomproc_>:
jmp    1030 <SCOTCHFRANDOMPROC@plt>

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

LLVM IR (-O2):
define void @scotchfrandomproc_(i32* %0) {
%2 = tail call i32 @SCOTCHFRANDOMPROC(i32* %0)
ret void
}
/* Variables and functions */
int getopt(int, char *const *, char const *);
int wbt_getopt(int argc, char *const argv[], const char *optstring) {
  return getopt(argc, argv, optstring);
}


x86 assembly (clang, -O0):
<wbt_getopt>:
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
mov    -0x18(%rbp),%rdx
call   1030 <getopt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wbt_getopt>:
jmp    1030 <getopt@plt>

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

LLVM IR (-O2):
define i32 @wbt_getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @getopt(i32 %0, i8** %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mvaddstr(int, int, char *);
int /*<<< orphan*/ refresh();
void eraseNode(int x, int y) {
  mvaddstr(x, y, " ");
  refresh();
}


x86 assembly (clang, -O0):
<eraseNode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0xec5(%rip),%rdx
call   1040 <mvaddstr@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eraseNode>:
push   %rax
lea    0xed8(%rip),%rdx
call   1040 <mvaddstr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <refresh@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @eraseNode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @mvaddstr(i32 %5, i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @eraseNode(i32 %0, i32 %1) {
%3 = tail call i32 @mvaddstr(i32 %0, i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
scalar_t__ entab(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char line[1000];
  while (entab(line, 1000) > 0)
    printf("%s", line);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <entab@plt>
cmp    $0x0,%rax
jle    1165 <main+0x45>
lea    -0x3f0(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <entab@plt>
test   %rax,%rax
jle    116d <main+0x4d>
lea    0xebd(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <entab@plt>
test   %rax,%rax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @entab(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i64 @entab(i8* %2, i32 1000)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
int ukvm_dumpcore_supported() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ukvm_dumpcore_supported() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float *, int);
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
float stress_funcret_deep_float1(int /*<<< orphan*/);
int /*<<< orphan*/ stress_funcret_float1(float);
float __attribute__((no)) stress_funcret_deeper_float1(float a) {
  float b;
  (void)memcpy(&b, &a, sizeof(a));
  (void)memset(&a, 0, sizeof(a));
  return stress_funcret_deep_float1(stress_funcret_float1(b));
}


x86 assembly (clang, -O0):
<stress_funcret_deeper_float1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movss  -0x8(%rbp),%xmm0
call   1050 <stress_funcret_float1@plt>
mov    %eax,%edi
call   1060 <stress_funcret_deep_float1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_funcret_deeper_float1>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movss  0x8(%rsp),%xmm0
call   1050 <stress_funcret_float1@plt>
mov    %eax,%edi
call   1060 <stress_funcret_deep_float1@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @stress_funcret_deeper_float1(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i32 @memcpy(float* %3, float* %2, i32 4)
%5 = call i32 @memset(float* %2, i32 0, i32 4)
%6 = load float, float* %3
%7 = call i32 @stress_funcret_float1(float %6)
%8 = call float @stress_funcret_deep_float1(i32 %7)
ret float %8
}

LLVM IR (-O2):
define float @stress_funcret_deeper_float1(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = bitcast float* %3 to i8*
%5 = call i32 @memcpy(float* %3, float* %2, i32 4)
%6 = call i32 @memset(float* %2, i32 0, i32 4)
%7 = load float, float* %3
%8 = call i32 @stress_funcret_float1(float %7)
%9 = call float @stress_funcret_deep_float1(i32 %8)
ret float %9
}
__float128 from_sign_int_load_4(int *a) { return (__float128)a[4]; }


x86 assembly (clang, -O0):
<from_sign_int_load_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
xchg   %ax,%ax

x86 assembly (clang, -O2):
<from_sign_int_load_4>:
push   %rax
mov    0x10(%rdi),%edi
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_sign_int_load_4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to fp128
ret fp128 %6
}

LLVM IR (-O2):
define fp128 @from_sign_int_load_4(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to fp128
ret fp128 %4
}
/* Type definitions */
struct aa_ui_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
struct aa_ui_t *get_default_ui(void) {
  printf("get_default_ui()\n");
  return (struct aa_ui_t *)0;
}


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

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

LLVM IR (-O0):
%struct.aa_ui_t = type { i32 }
@.str = [18 x i8] c"get_default_ui()\0A\00"
define %struct.aa_ui_t* @get_default_ui() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret %struct.aa_ui_t* null
}

LLVM IR (-O2):
%struct.aa_ui_t = type { i32 }
@str = [17 x i8] c"get_default_ui()\00"
define noalias %struct.aa_ui_t* @get_default_ui() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret %struct.aa_ui_t* null
}
/* Variables and functions */
int /*<<< orphan*/ HTS_error(int, char *);
scalar_t__ calloc(size_t const, size_t const);
char *HTS_calloc(const size_t num, const size_t size) {
  char *mem = (char *)calloc(num, size);
  if (mem == NULL)
    HTS_error(1, "HTS_calloc: Cannot allocate memory.\n");
  return mem;
}


x86 assembly (clang, -O0):
<HTS_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <HTS_calloc+0x3d>
mov    $0x1,%edi
lea    0xea8(%rip),%rsi
call   1040 <HTS_error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HTS_calloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <HTS_calloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1040 <HTS_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"HTS_calloc: Cannot allocate memory.\0A\00"
define i8* @HTS_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i64 @calloc(i64 %6, i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @HTS_error(i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [37 x i8] c"HTS_calloc: Cannot allocate memory.\0A\00"
define i8* @HTS_calloc(i64 %0, i64 %1) {
%3 = tail call i64 @calloc(i64 %0, i64 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @HTS_error(i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = inttoptr i64 %3 to i8*
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handler(int num) {
  printf("time is comming\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"time is comming\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"time is comming\00"
define void @handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
double fcube(double x) { return x * x * x; }


x86 assembly (clang, -O0):
<fcube>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcube>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fcube(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @fcube(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
int f4() {
  return (struct s8 { int i; }){0}.i;
}


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

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

LLVM IR (-O0):
%struct.s8 = type { i32 }
define i32 @f4() {
%1 = alloca %struct.s8
%2 = getelementptr inbounds %struct.s8, %struct.s8* %1, i32 0, i32 0
store i32 0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @f4() {
ret i32 0
}
int _missing_opt_char(const char *options) {
  if ((options[0] == ':') ||
      (((options[0] == '-') || (options[0] == '+')) && (options[1] == ':')))
    return ':';
  else
    return '?';
}


x86 assembly (clang, -O0):
<_missing_opt_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     1149 <_missing_opt_char+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1138 <_missing_opt_char+0x38>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1155 <_missing_opt_char+0x55>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3a,%eax
jne    1155 <_missing_opt_char+0x55>
movl   $0x3a,-0x4(%rbp)
jmp    115c <_missing_opt_char+0x5c>
movl   $0x3f,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_missing_opt_char>:
mov    (%rdi),%cl
mov    $0x3a,%eax
cmp    $0x2b,%cl
je     1116 <_missing_opt_char+0x16>
cmp    $0x3a,%cl
je     1121 <_missing_opt_char+0x21>
cmp    $0x2d,%cl
jne    111c <_missing_opt_char+0x1c>
cmpb   $0x3a,0x1(%rdi)
je     1121 <_missing_opt_char+0x21>
mov    $0x3f,%eax
ret

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

LLVM IR (-O2):
define i32 @_missing_opt_char(i8* nocapture %0) {
%2 = load i8, i8* %0
switch i8 %2, label %7 [
i8 58, label %8
i8 45, label %3
i8 43, label %3
]
3: ; preds = %1, %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 58
br i1 %6, label %8, label %7
7: ; preds = %1, %3
br label %8
8: ; preds = %3, %1, %7
%9 = phi i32 [ 63, %7 ], [ 58, %1 ], [ 58, %3 ]
ret i32 %9
}
void func3(int a, int *b, char c) { *(1 + (1 + b)) = 300; }


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x12c,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
movl   $0x12c,0x8(%rsi)
ret

LLVM IR (-O0):
define void @func3(i32 %0, i32* %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8 %2, i8* %6
%7 = load i32*, i32** %5
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 300, i32* %9
ret void
}

LLVM IR (-O2):
define void @func3(i32 %0, i32* nocapture writeonly %1, i8 signext %2) {
%4 = getelementptr inbounds i32, i32* %1, i64 2
store i32 300, i32* %4
ret void
}
int main() { return sizeof(long long); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}
void spd_set_sdramc(void) { return; }


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

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

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

LLVM IR (-O2):
define void @spd_set_sdramc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int is_subcore_capable(void) {
  return access("/sys/devices/system/cpu/subcores_per_core", F_OK) == 0;
}


x86 assembly (clang, -O0):
<is_subcore_capable>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_subcore_capable>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"/sys/devices/system/cpu/subcores_per_core\00"
@F_OK = global i32 0
define i32 @is_subcore_capable() {
%1 = load i32, i32* @F_OK
%2 = call i64 @access(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
@.str = [42 x i8] c"/sys/devices/system/cpu/subcores_per_core\00"
@F_OK = global i32 0
define i32 @is_subcore_capable() {
%1 = load i32, i32* @F_OK
%2 = tail call i64 @access(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void *nuevoDouble(double d) {
  double *p = (double *)malloc(sizeof(double));
  if (!p)
    error();
  *p = d;
  return p;
}


x86 assembly (clang, -O0):
<nuevoDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114d <nuevoDouble+0x2d>
mov    $0x0,%al
call   1040 <error@plt>
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nuevoDouble>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1144 <nuevoDouble+0x24>
xor    %eax,%eax
call   1040 <error@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @nuevoDouble(double %0) {
%2 = alloca double
%3 = alloca double*
store double %0, double* %2
%4 = call i8* @malloc(i64 8)
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = load double*, double** %3
%7 = icmp ne double* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @error()
br label %10
10: ; preds = %8, %1
%11 = load double, double* %2
%12 = load double*, double** %3
store double %11, double* %12
%13 = load double*, double** %3
%14 = bitcast double* %13 to i8*
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @nuevoDouble(double %0) {
%2 = tail call dereferenceable_or_null(8) i8* @malloc(i64 8)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @error()
br label %6
6: ; preds = %4, %1
%7 = bitcast i8* %2 to double*
store double %0, double* %7
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ LPC2xxx_copy_vectors();
int VIC_setup_fiq(int intnum, void *IRQHandler) {
  LPC2xxx_copy_vectors();
  *((unsigned int *)0x4000003c) = (unsigned int)IRQHandler;
  (*((volatile unsigned long *)0xFFFFF00C)) |= ~(1 << intnum);
  (*((volatile unsigned long *)0xFFFFF010)) |= 1 << intnum;
  return 1;
}


x86 assembly (clang, -O0):
<VIC_setup_fiq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <LPC2xxx_copy_vectors@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x4000003c,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
cltq
mov    $0xfffff00c,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0xfffff00c,%eax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    $0xfffff010,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0xfffff010,%eax
mov    %rcx,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIC_setup_fiq>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <LPC2xxx_copy_vectors@plt>
mov    $0x1,%eax
mov    %ebp,%ecx
shl    %cl,%eax
mov    $0xfffffffe,%edx
rol    %cl,%edx
mov    %ebx,0x4000003c
movslq %edx,%rcx
mov    $0xfffff00c,%edx
or     %rcx,(%rdx)
cltq
or     %rax,0x4(%rdx)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @VIC_setup_fiq(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (...) @LPC2xxx_copy_vectors()
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
store i32 %7, i32* inttoptr (i64 1073741884 to i32*)
%8 = load i32, i32* %3
%9 = shl i32 1, %8
%10 = xor i32 %9, -1
%11 = sext i32 %10 to i64
%12 = load volatile i64, i64* inttoptr (i64 4294963212 to i64*)
%13 = or i64 %12, %11
store volatile i64 %13, i64* inttoptr (i64 4294963212 to i64*)
%14 = load i32, i32* %3
%15 = shl i32 1, %14
%16 = sext i32 %15 to i64
%17 = load volatile i64, i64* inttoptr (i64 4294963216 to i64*)
%18 = or i64 %17, %16
store volatile i64 %18, i64* inttoptr (i64 4294963216 to i64*)
ret i32 1
}

LLVM IR (-O2):
define i32 @VIC_setup_fiq(i32 %0, i8* %1) {
%3 = tail call i32 (...) @LPC2xxx_copy_vectors()
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
store i32 %5, i32* inttoptr (i64 1073741884 to i32*)
%6 = shl nuw i32 1, %0
%7 = xor i32 %6, -1
%8 = sext i32 %7 to i64
%9 = load volatile i64, i64* inttoptr (i64 4294963212 to i64*)
%10 = or i64 %9, %8
store volatile i64 %10, i64* inttoptr (i64 4294963212 to i64*)
%11 = sext i32 %6 to i64
%12 = load volatile i64, i64* inttoptr (i64 4294963216 to i64*)
%13 = or i64 %12, %11
store volatile i64 %13, i64* inttoptr (i64 4294963216 to i64*)
ret i32 1
}
int create(char *n, int m, long p) {
  int creat(char *, int);
  if (m != 1)
    return -1;
  return creat(n, p);
}


x86 assembly (clang, -O0):
<create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     1139 <create+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <create+0x3b>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    %eax,%esi
call   1030 <creat@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create>:
cmp    $0x1,%esi
jne    111c <create+0xc>
mov    %edx,%esi
jmp    1030 <creat@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @create(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i32 %1, 1
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i64 %2 to i32
%7 = tail call i32 @creat(i8* %0, i32 %6)
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void aw_bdb_checkpoint() { fatal("BerkeleyDB support not compiled"); }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"BerkeleyDB support not compiled\00"
define void @aw_bdb_checkpoint() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"BerkeleyDB support not compiled\00"
define void @aw_bdb_checkpoint() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ act_update_drop_map();
int get_prandom_u32();
__attribute__((section("action-rand"), used)) int
act_rand_main(struct __sk_buff *skb) {
  if ((get_prandom_u32() & 3) == 0) {
    act_update_drop_map();
    return 2;
  }
  return (-1);
}


x86 assembly (clang, -O0):
<act_rand_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_prandom_u32@plt>
and    $0x3,%eax
cmp    $0x0,%eax
jne    1152 <act_rand_main+0x32>
mov    $0x0,%al
call   1040 <act_update_drop_map@plt>
movl   $0x2,-0x4(%rbp)
jmp    1159 <act_rand_main+0x39>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<act_rand_main>:
push   %rax
xor    %eax,%eax
call   1030 <get_prandom_u32@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
test   $0x3,%cl
je     1136 <act_rand_main+0x16>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <act_update_drop_map@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @act_rand_main to i8*)], section "llvm.metadata"
define i32 @act_rand_main(%struct.__sk_buff* %0) section "action-rand" {
%2 = alloca i32
%3 = alloca %struct.__sk_buff*
store %struct.__sk_buff* %0, %struct.__sk_buff** %3
%4 = call i32 (...) @get_prandom_u32()
%5 = and i32 %4, 3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @act_update_drop_map()
store i32 2, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @act_rand_main to i8*)], section "llvm.metadata"
define i32 @act_rand_main(%struct.__sk_buff* nocapture readnone %0) section "action-rand" {
%2 = tail call i32 (...) @get_prandom_u32()
%3 = and i32 %2, 3
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @act_update_drop_map()
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 2, %5 ], [ -1, %1 ]
ret i32 %8
}
void query_stripplus(char *str) {
  do
    if (*str == '+')
      *str = ' ';
  while (*++str);
}


x86 assembly (clang, -O0):
<query_stripplus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    111f <query_stripplus+0x1f>
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
jmp    1124 <query_stripplus+0x24>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,0x1(%rax)
jne    1108 <query_stripplus+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<query_stripplus>:
mov    (%rdi),%al
add    $0x1,%rdi
jmp    111b <query_stripplus+0x1b>
nopl   0x0(%rax,%rax,1)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1125 <query_stripplus+0x25>
cmp    $0x2b,%al
jne    1110 <query_stripplus+0x10>
movb   $0x20,-0x1(%rdi)
jmp    1110 <query_stripplus+0x10>
ret

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

LLVM IR (-O2):
define void @query_stripplus(i8* nocapture %0) {
%2 = load i8, i8* %0
br label %3
3: ; preds = %8, %1
%4 = phi i8 [ %10, %8 ], [ %2, %1 ]
%5 = phi i8* [ %9, %8 ], [ %0, %1 ]
%6 = icmp eq i8 %4, 43
br i1 %6, label %7, label %8
7: ; preds = %3
store i8 32, i8* %5
br label %8
8: ; preds = %3, %7
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pascaltriangle(int);
int main(void) {
  pascaltriangle(8);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <pascaltriangle@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @pascaltriangle(i32 8)
ret i32 0
}
char *test_func_00(char *p, int c) {
  *--p = (char)c;
  *--p = (char)c;
  return p;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,-0x1(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %sil,-0x1(%rdi)
mov    %sil,-0x2(%rdi)
lea    -0x2(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @test_func_00(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = trunc i32 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 -1
store i8* %8, i8** %3
store i8 %6, i8* %8
%9 = load i32, i32* %4
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 -1
store i8* %12, i8** %3
store i8 %10, i8* %12
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_func_00(i8* writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 -1
store i8 %3, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 -2
store i8 %3, i8* %5
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ RunANSICBasics01();
int main(int argc, const char *argv[]) {
  RunANSICBasics01();
  return 0;
}


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

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

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

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

/* Variables and functions */
void *__zbuf_push(struct zbuf *, size_t, int);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void zbuf_put(struct zbuf *zb, const void *src, size_t len) {
  void *dst = (__zbuf_push(zb, len, 1));
  if (dst)
    memcpy(dst, src, len);
}


x86 assembly (clang, -O0):
<zbuf_put>:
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    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1040 <__zbuf_push@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1166 <zbuf_put+0x46>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zbuf_put>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
mov    $0x1,%edx
call   1040 <__zbuf_push@plt>
test   %rax,%rax
je     1151 <zbuf_put+0x31>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.zbuf = type { i32 }
define void @zbuf_put(%struct.zbuf* %0, i8* %1, i64 %2) {
%4 = alloca %struct.zbuf*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store %struct.zbuf* %0, %struct.zbuf** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.zbuf*, %struct.zbuf** %4
%9 = load i64, i64* %6
%10 = call i8* @__zbuf_push(%struct.zbuf* %8, i64 %9, i32 1)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i8*, i8** %7
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
br label %18
18: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
%struct.zbuf = type { i32 }
define void @zbuf_put(%struct.zbuf* %0, i8* %1, i64 %2) {
%4 = tail call i8* @__zbuf_push(%struct.zbuf* %0, i64 %2, i32 1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @memcpy(i8* %4, i8* %1, i64 %2)
br label %8
8: ; preds = %6, %3
ret void
}
void NV21ToARGBRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToARGBRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x = 5, y = 5;
  printf("x/y"
         "=%g\n",
         x / y);
  return 0;
}


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

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

LLVM IR (-O2):
@.str = [8 x i8] c"x/y=%g\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}