xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __assert_func(char *, int, char *, char *);
void force_error() {
  __assert_func("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/daniel-hellstrom/leon-rtems/"
                "refs/heads/master/testsuites/sptests/spfatal10/testcase.h",
                23, "Init", "forced");
}


x86 assembly (clang, -O0):
<force_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x17,%esi
lea    0xf89(%rip),%rdx
lea    0xf87(%rip),%rcx
call   1030 <__assert_func@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<force_error>:
lea    0xee9(%rip),%rdi
lea    0xf92(%rip),%rdx
lea    0xf90(%rip),%rcx
mov    $0x17,%esi
jmp    1030 <__assert_func@plt>

LLVM IR (-O0):
@.str = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/daniel-hellstrom/leon-rtems/refs/heads/master/testsuites/sptests/spfatal10/testcase.h\00"
@.str.1 = [5 x i8] c"Init\00"
@.str.2 = [7 x i8] c"forced\00"
define void @force_error() {
%1 = call i32 @__assert_func(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/daniel-hellstrom/leon-rtems/refs/heads/master/testsuites/sptests/spfatal10/testcase.h\00"
@.str.1 = [5 x i8] c"Init\00"
@.str.2 = [7 x i8] c"forced\00"
define void @force_error() {
%1 = tail call i32 @__assert_func(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void ft_swap_int(int *a, int *b) {
  int i;
  i = *a;
  *a = *b;
  *b = i;
}


x86 assembly (clang, -O0):
<ft_swap_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ft_swap_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
unsigned long f() {
  unsigned char c;
  return c;
}


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

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

LLVM IR (-O0):
define i64 @f() {
%1 = alloca i8
%2 = load i8, i8* %1
%3 = zext i8 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @f() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char *, int);
int isspace(int c) { return !!strchr(" \t\r\n\v\f", c); }


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0D\0A\0B\0C\00"
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0D\0A\0B\0C\00"
define i32 @isspace(i32 %0) {
%2 = tail call i32 @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x28() {
  Assert_real((islower(40) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              205, ("islower should be 0 for ("));
}


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

x86 assembly (clang, -O2):
<t_islower_0x28>:
push   %rax
mov    $0x28,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xcd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for (\00"
define void @t_islower_0x28() {
%1 = call i64 @islower(i32 40)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for (\00"
define void @t_islower_0x28() {
%1 = tail call i64 @islower(i32 40)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t pow2_u64(uint64_t y) { return ((uint64_t)1) << y; }


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

x86 assembly (clang, -O2):
<pow2_u64>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @pow2_u64(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
/* Type definitions */
struct istr_pool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gc_desc(struct istr_pool *);
int gc_text(struct istr_pool *);
int istr_pool_gc(struct istr_pool *p) {
  gc_desc(p);
  return gc_text(p);
}


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

x86 assembly (clang, -O2):
<istr_pool_gc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <gc_desc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <gc_text@plt>

LLVM IR (-O0):
%struct.istr_pool = type { i32 }
define i32 @istr_pool_gc(%struct.istr_pool* %0) {
%2 = alloca %struct.istr_pool*
store %struct.istr_pool* %0, %struct.istr_pool** %2
%3 = load %struct.istr_pool*, %struct.istr_pool** %2
%4 = call i32 @gc_desc(%struct.istr_pool* %3)
%5 = load %struct.istr_pool*, %struct.istr_pool** %2
%6 = call i32 @gc_text(%struct.istr_pool* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.istr_pool = type { i32 }
define i32 @istr_pool_gc(%struct.istr_pool* %0) {
%2 = tail call i32 @gc_desc(%struct.istr_pool* %0)
%3 = tail call i32 @gc_text(%struct.istr_pool* %0)
ret i32 %3
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungets(char s[]) {
  size_t slen = strlen(s);
  while (slen > 0)
    ungetch(s[--slen]);
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    1166 <ungets+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
movsbl -0x1(%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
jmp    1139 <ungets+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungets>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %rax,%rax
je     1151 <ungets+0x31>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl -0x1(%r14,%rbx,1),%edi
call   1040 <ungetch@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <ungets+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ungets(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
br label %6
6: ; preds = %9, %1
%7 = load i64, i64* %3
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i8*, i8** %2
%11 = load i64, i64* %3
%12 = add i64 %11, -1
store i64 %12, i64* %3
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call i32 @ungetch(i8 signext %14)
br label %6
16: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @ungets(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ %2, %1 ]
%6 = add i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @ungetch(i8 signext %8)
%10 = icmp eq i64 %6, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, char const *);
int confirm(const char *msg) {
  printf("\e[1;31m"
         "%s (y/n) "
         "\e[m",
         msg);
  return getchar() == 'y';
}


x86 assembly (clang, -O0):
<confirm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0x79,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confirm>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %ecx,%ecx
cmp    $0x79,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\1B[1;31m%s (y/n) \1B[m\00"
define i32 @confirm(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call signext i8 (...) @getchar()
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 121
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [20 x i8] c"\1B[1;31m%s (y/n) \1B[m\00"
define i32 @confirm(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call signext i8 (...) @getchar()
%4 = icmp eq i8 %3, 121
%5 = zext i1 %4 to i32
ret i32 %5
}
void ff_hevc_put_hevc_bi_epel_h8_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h8_8_sse4() {
ret void
}
long function(char t[4]) { return t; }


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

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

LLVM IR (-O0):
define i64 @function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @function(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void do_undefined_instruction(void) { puts("BAD\n"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"BAD\0A\00"
define void @do_undefined_instruction() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  fprintf(stderr, "this is spawn-test-helper from glib/tests\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"this is spawn-test-helper from glib/tests\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"this is spawn-test-helper from glib/tests\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void errout() {
  perror("Error");
  exit(254);
}


x86 assembly (clang, -O0):
<errout>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <perror@plt>
mov    $0xfe,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errout>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <perror@plt>
mov    $0xfe,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Error\00"
define void @errout() {
%1 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 254)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"Error\00"
define void @errout() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 254)
unreachable
}
int ft_itoa_length(int n) {
  int i;
  int neg;
  neg = 0;
  i = 1;
  if (n < 0) {
    n = -n;
    neg = 1;
  }
  while (n > 9) {
    n = n / 10;
    i++;
  }
  return (i + neg + 1);
}


x86 assembly (clang, -O0):
<ft_itoa_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112e <ft_itoa_length+0x2e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
jmp    1133 <ft_itoa_length+0x33>
cmpl   $0x9,-0x4(%rbp)
jle    1159 <ft_itoa_length+0x59>
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    1133 <ft_itoa_length+0x33>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_itoa_length>:
mov    %edi,%eax
mov    %edi,%edx
neg    %edx
cmovs  %edi,%edx
mov    $0x2,%ecx
cmp    $0xa,%edx
jb     1134 <ft_itoa_length+0x34>
mov    $0x2,%ecx
mov    $0xcccccccd,%esi
nopl   (%rax)
mov    %edx,%edi
imul   %rsi,%rdi
shr    $0x23,%rdi
add    $0x1,%ecx
cmp    $0x63,%edx
mov    %edi,%edx
ja     1120 <ft_itoa_length+0x20>
shr    $0x1f,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_itoa_length(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = icmp ugt i32 %2, 9
br i1 %3, label %4, label %12
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %2, %1 ]
%7 = udiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = icmp ugt i32 %6, 99
br i1 %9, label %4, label %10
10: ; preds = %4
%11 = add nuw i32 %5, 2
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 2, %1 ], [ %11, %10 ]
%14 = lshr i32 %0, 31
%15 = add i32 %13, %14
ret i32 %15
}
void g_arith_pow_u64_f(void *s, void *d, void *o) {}


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

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

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

LLVM IR (-O2):
define void @g_arith_pow_u64_f(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
unsigned long BLInternalFlashErrorCheck(void) {
  return ((*((volatile unsigned long *)(0x400FD00C))) & 0x00000001);
}


x86 assembly (clang, -O0):
<BLInternalFlashErrorCheck>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fd00c,%eax
mov    (%rax),%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLInternalFlashErrorCheck>:
mov    0x400fd00c,%rax
40
and    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @BLInternalFlashErrorCheck() {
%1 = load volatile i64, i64* inttoptr (i64 1074778124 to i64*)
%2 = and i64 %1, 1
ret i64 %2
}

LLVM IR (-O2):
define i64 @BLInternalFlashErrorCheck() {
%1 = load volatile i64, i64* inttoptr (i64 1074778124 to i64*)
%2 = and i64 %1, 1
ret i64 %2
}
__attribute__((always_)) int set_power_toggle(int val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @set_power_toggle(i32 returned %0) {
ret i32 %0
}
double coleman_liau(int letters, int words, int sentences) {
  return 5.879851 * letters / words - 29.587280 * sentences / words - 15.800804;
}


x86 assembly (clang, -O0):
<coleman_liau>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xef6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
movsd  0xed4(%rip),%xmm1
mulsd  %xmm2,%xmm1
cvtsi2sdl -0x8(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<coleman_liau>:
cvtsi2sd %esi,%xmm1
movd   %edx,%xmm0
movd   %edi,%xmm2
punpckldq %xmm0,%xmm2
cvtdq2pd %xmm2,%xmm0
mulpd  0xee4(%rip),%xmm0
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
subsd  %xmm1,%xmm0
addsd  0xed8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @coleman_liau(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fmul double 0x401784F7A919695E, %8
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
%13 = load i32, i32* %6
%14 = sitofp i32 %13 to double
%15 = fmul double 0x403D9657FB69984A, %14
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = fdiv double %15, %17
%19 = fsub double %12, %18
%20 = fsub double %19, 0x402F9A02FB5D0310
ret double %20
}

LLVM IR (-O2):
define double @coleman_liau(i32 %0, i32 %1, i32 %2) {
%4 = sitofp i32 %1 to double
%5 = insertelement <2 x i32> poison, i32 %0, i64 0
%6 = insertelement <2 x i32> %5, i32 %2, i64 1
%7 = sitofp <2 x i32> %6 to <2 x double>
%8 = fmul <2 x double> %7, <double 0x401784F7A919695E, double 0x403D9657FB69984A>
%9 = insertelement <2 x double> poison, double %4, i64 0
%10 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> zeroinitializer
%11 = fdiv <2 x double> %8, %10
%12 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%13 = fsub <2 x double> %11, %12
%14 = extractelement <2 x double> %13, i64 0
%15 = fadd double %14, 0xC02F9A02FB5D0310
ret double %15
}
void foo747() {}


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

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

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

LLVM IR (-O2):
define void @foo747() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_MAIL;
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
main() {
  openlog("foo", 0, LOG_MAIL);
  syslog(0, "foo");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
lea    0xecc(%rip),%rdi
xor    %esi,%esi
call   1040 <openlog@plt>
xor    %edi,%edi
lea    0xebc(%rip),%rsi
call   1030 <syslog@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <openlog@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <syslog@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@LOG_MAIL = global i32 0
define i32 @main() {
%1 = load i32, i32* @LOG_MAIL
%2 = call i32 @openlog(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0, i32 %1)
%3 = call i32 @syslog(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@LOG_MAIL = global i32 0
define i32 @main() {
%1 = load i32, i32* @LOG_MAIL
%2 = tail call i32 @openlog(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0, i32 %1)
%3 = tail call i32 @syslog(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct block {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_header_and_footer(struct block *, int, int);
void mark_block_used(struct block *blk, int size) {
  set_header_and_footer(blk, size, 1);
}


x86 assembly (clang, -O0):
<mark_block_used>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1030 <set_header_and_footer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_block_used>:
mov    $0x1,%edx
jmp    1030 <set_header_and_footer@plt>

LLVM IR (-O0):
%struct.block = type { i32 }
define void @mark_block_used(%struct.block* %0, i32 %1) {
%3 = alloca %struct.block*
%4 = alloca i32
store %struct.block* %0, %struct.block** %3
store i32 %1, i32* %4
%5 = load %struct.block*, %struct.block** %3
%6 = load i32, i32* %4
%7 = call i32 @set_header_and_footer(%struct.block* %5, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
%struct.block = type { i32 }
define void @mark_block_used(%struct.block* %0, i32 %1) {
%3 = tail call i32 @set_header_and_footer(%struct.block* %0, i32 %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
void get_draw_fname(char *fname, int rank, int iteration) {
  sprintf(fname, "draw/data/%d-%d", iteration, rank);
}


x86 assembly (clang, -O0):
<get_draw_fname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecd(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_draw_fname>:
mov    %esi,%ecx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"draw/data/%d-%d\00"
define void @get_draw_fname(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"draw/data/%d-%d\00"
define void @get_draw_fname(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %1)
ret void
}
int test_imm_E7uint16_mem(unsigned short *val) {
  return ((*val) & (0xE7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E7uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xe7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E7uint16_mem>:
testb  $0xe7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E7uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 231
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_E7uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 231
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__typeof__(strdup((void *)1)) test_strdup_158(void) {
  return strdup((void *)1);
}


x86 assembly (clang, -O0):
<test_strdup_158>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <strdup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strdup_158>:
mov    $0x1,%edi
jmp    1030 <strdup@plt>

LLVM IR (-O0):
define i8* @test_strdup_158() {
%1 = call i8* @strdup(i8* inttoptr (i64 1 to i8*))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @test_strdup_158() {
%1 = tail call i8* @strdup(i8* inttoptr (i64 1 to i8*))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ fsize(char *);
int main(int argc, char *argv[]) {
  if (argc < 2)
    fsize(".");
  else
    while (--argc > 0)
      fsize(*(++argv));
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <fsize@plt>
jmp    117a <main+0x6a>
jmp    1146 <main+0x36>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1175 <main+0x65>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
call   1030 <fsize@plt>
jmp    1146 <main+0x36>
jmp    117a <main+0x6a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x2,%edi
jge    1126 <main+0x16>
lea    0xee1(%rip),%rdi
call   1030 <fsize@plt>
jmp    1154 <main+0x44>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x8,%rbx
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx),%rdi
call   1030 <fsize@plt>
add    $0x8,%rbx
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
ja     1140 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @fsize(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %21
10: ; preds = %2
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %4
%13 = add nsw i32 %12, -1
store i32 %13, i32* %4
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i32 1
store i8** %17, i8*** %5
%18 = load i8*, i8** %17
%19 = call i32 @fsize(i8* %18)
br label %11
20: ; preds = %11
br label %21
21: ; preds = %20, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @fsize(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %14
6: ; preds = %2, %6
%7 = phi i8** [ %10, %6 ], [ %1, %2 ]
%8 = phi i32 [ %9, %6 ], [ %0, %2 ]
%9 = add nsw i32 %8, -1
%10 = getelementptr inbounds i8*, i8** %7, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @fsize(i8* %11)
%13 = icmp ugt i32 %8, 2
br i1 %13, label %6, label %14
14: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _cc3_delay_sccb();
void _cc3_set_cam_ddr_sccb_write(void) {
  (*(volatile unsigned long *)((0xE0028008))) = 0x00FEBDC9;
  _cc3_delay_sccb();
}


x86 assembly (clang, -O0):
<_cc3_set_cam_ddr_sccb_write>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0028008,%eax
movq   $0xfebdc9,(%rax)
mov    $0x0,%al
call   1030 <_cc3_delay_sccb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cc3_set_cam_ddr_sccb_write>:
mov    $0xe0028008,%eax
movq   $0xfebdc9,(%rax)
xor    %eax,%eax
jmp    1030 <_cc3_delay_sccb@plt>

LLVM IR (-O0):
define void @_cc3_set_cam_ddr_sccb_write() {
store volatile i64 16694729, i64* inttoptr (i64 3758260232 to i64*)
%1 = call i32 (...) @_cc3_delay_sccb()
ret void
}

LLVM IR (-O2):
define void @_cc3_set_cam_ddr_sccb_write() {
store volatile i64 16694729, i64* inttoptr (i64 3758260232 to i64*)
%1 = tail call i32 (...) @_cc3_delay_sccb()
ret void
}
/* Variables and functions */
scalar_t__ __builtin_gammaf(float);
int /*<<< orphan*/ link_failure_builtin_gammaf();
void test_builtin_gammaf(float f) {
  if (__builtin_gammaf(f) != __builtin_gammaf(f))
    link_failure_builtin_gammaf();
}


x86 assembly (clang, -O0):
<test_builtin_gammaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <__builtin_gammaf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <__builtin_gammaf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_builtin_gammaf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_builtin_gammaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_gammaf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <__builtin_gammaf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <__builtin_gammaf@plt>
cmp    %rax,%rbx
jne    1149 <test_builtin_gammaf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_builtin_gammaf@plt>

LLVM IR (-O0):
define void @test_builtin_gammaf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @__builtin_gammaf(float %3)
%5 = load float, float* %2
%6 = call i64 @__builtin_gammaf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_builtin_gammaf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_gammaf(float %0) {
%2 = tail call i64 @__builtin_gammaf(float %0)
%3 = tail call i64 @__builtin_gammaf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_gammaf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
int /*<<< orphan*/ ft_memcpy(void *, unsigned char *, size_t);
scalar_t__ malloc(int);
void *ft_memmove(void *s1, const void *s2, size_t n) {
  unsigned char *buf;
  buf = (unsigned char *)malloc(sizeof(buf) * n);
  ft_memcpy(buf, s2, n);
  ft_memcpy(s1, buf, n);
  free(buf);
  return (s1);
}


x86 assembly (clang, -O0):
<ft_memmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <ft_memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <ft_memcpy@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memmove>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x0(,%rdx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1050 <ft_memcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1050 <ft_memcpy@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @ft_memmove(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = mul i64 8, %8
%10 = trunc i64 %9 to i32
%11 = call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = load i8*, i8** %5
%15 = load i64, i64* %6
%16 = call i32 @ft_memcpy(i8* %13, i8* %14, i64 %15)
%17 = load i8*, i8** %4
%18 = load i8*, i8** %7
%19 = load i64, i64* %6
%20 = call i32 @ft_memcpy(i8* %17, i8* %18, i64 %19)
%21 = load i8*, i8** %7
%22 = call i32 @free(i8* %21)
%23 = load i8*, i8** %4
ret i8* %23
}

LLVM IR (-O2):
define i8* @ft_memmove(i8* returned %0, i8* %1, i64 %2) {
%4 = trunc i64 %2 to i32
%5 = shl i32 %4, 3
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @ft_memcpy(i8* %7, i8* %1, i64 %2)
%9 = tail call i32 @ft_memcpy(i8* %0, i8* %7, i64 %2)
%10 = tail call i32 @free(i8* %7)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ calcula(float, float *, float *);
int /*<<< orphan*/ printf(char *, float);
int main() {
  float lado, area, perimetro;
  lado = 2.7;
  calcula(lado, &area, &perimetro);
  printf("\nLado: %.2f", lado);
  printf("\nArea: %.2f", area);
  printf("\nPerimetro: %.2f\n", perimetro);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <calcula@plt>
movss  -0x8(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
movss  -0x10(%rbp),%xmm0
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <calcula@plt>
lea    0xec7(%rip),%rdi
movss  0xebb(%rip),%xmm0
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
movss  (%rsp),%xmm0
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"\0ALado: %.2f\00"
@.str.1 = [12 x i8] c"\0AArea: %.2f\00"
@.str.2 = [18 x i8] c"\0APerimetro: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 0x40059999A0000000, float* %2
%5 = load float, float* %2
%6 = call i32 @calcula(float %5, float* %3, float* %4)
%7 = load float, float* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %9)
%11 = load float, float* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"\0ALado: %.2f\00"
@.str.1 = [12 x i8] c"\0AArea: %.2f\00"
@.str.2 = [18 x i8] c"\0APerimetro: %.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @calcula(float 0x40059999A0000000, float* %1, float* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x40059999A0000000)
%7 = load float, float* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %7)
%9 = load float, float* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), float %9)
ret i32 0
}
unsigned short peek16(volatile unsigned short *addr) { return (*addr); }


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

x86 assembly (clang, -O2):
<peek16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @peek16(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load volatile i16, i16* %3
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @peek16(i16* %0) {
%2 = load volatile i16, i16* %0
ret i16 %2
}
int test_imm_ABuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xAB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ABuint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xab,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ABuint64_midword_mem>:
testb  $0xab,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_ABuint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 171
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_ABuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 11206656
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int gleIntLoadCore_3_0_Version_3_1();
int gleIntLoadCore_3_0_Base() {
  int bIsLoaded = gleIntLoadCore_3_0_Version_3_1();
  return bIsLoaded;
}


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

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

LLVM IR (-O0):
define i32 @gleIntLoadCore_3_0_Base() {
%1 = alloca i32
%2 = call i32 (...) @gleIntLoadCore_3_0_Version_3_1()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gleIntLoadCore_3_0_Base() {
%1 = tail call i32 (...) @gleIntLoadCore_3_0_Version_3_1()
ret i32 %1
}
int stop_soil() {}


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

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

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

LLVM IR (-O2):
define i32 @stop_soil() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ initRegex();
int /*<<< orphan*/ openServiceFile();
int /*<<< orphan*/ openSpecServiceFile();
void onInitPlugin() {
  initRegex();
  openServiceFile();
  openSpecServiceFile();
}


x86 assembly (clang, -O0):
<onInitPlugin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <initRegex@plt>
mov    $0x0,%al
call   1050 <openServiceFile@plt>
mov    $0x0,%al
call   1040 <openSpecServiceFile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<onInitPlugin>:
push   %rax
xor    %eax,%eax
call   1030 <initRegex@plt>
xor    %eax,%eax
call   1050 <openServiceFile@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <openSpecServiceFile@plt>

LLVM IR (-O0):
define void @onInitPlugin() {
%1 = call i32 (...) @initRegex()
%2 = call i32 (...) @openServiceFile()
%3 = call i32 (...) @openSpecServiceFile()
ret void
}

LLVM IR (-O2):
define void @onInitPlugin() {
%1 = tail call i32 (...) @initRegex()
%2 = tail call i32 (...) @openServiceFile()
%3 = tail call i32 (...) @openSpecServiceFile()
ret void
}
void log_end(void) {}


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

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

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

LLVM IR (-O2):
define void @log_end() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t bsd_umin(uint32_t a, uint32_t b) { return (a < b ? a : b); }


x86 assembly (clang, -O0):
<bsd_umin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <bsd_umin+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <bsd_umin+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsd_umin>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @bsd_umin(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @bsd_umin(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ pthread_kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
int sigbench_profile_func(void *args) {
  (void)args;
  pthread_kill(pthread_self(), SIGUSR1);
  return 0;
}


x86 assembly (clang, -O0):
<sigbench_profile_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <pthread_kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigbench_profile_func>:
push   %rax
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <pthread_kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define i32 @sigbench_profile_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @pthread_self()
%5 = load i32, i32* @SIGUSR1
%6 = call i32 @pthread_kill(i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define i32 @sigbench_profile_func(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = load i32, i32* @SIGUSR1
%4 = tail call i32 @pthread_kill(i32 %2, i32 %3)
ret i32 0
}
/* Variables and functions */
int memcmp(unsigned char const *, unsigned char const *, int);
int digestdb_compare(const void *a, const void *b) {
  const unsigned char *ma = a;
  const unsigned char *mb = b;
  return memcmp(ma, mb, 16);
}


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

x86 assembly (clang, -O2):
<digestdb_compare>:
mov    $0x10,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @digestdb_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @memcmp(i8* %9, i8* %10, i32 16)
ret i32 %11
}

LLVM IR (-O2):
define i32 @digestdb_compare(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 16)
ret i32 %3
}
unsigned MakeColor(const unsigned int alpha, const unsigned int red,
                   const unsigned int green, const unsigned int blue) {
  return ((alpha << 24) | (red << 16) | (green << 8) | blue);
}


x86 assembly (clang, -O0):
<MakeColor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeColor>:
mov    %edx,%eax
shl    $0x18,%edi
shl    $0x10,%esi
or     %edi,%esi
shl    $0x8,%eax
or     %ecx,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @MakeColor(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = shl i32 %9, 24
%11 = load i32, i32* %6
%12 = shl i32 %11, 16
%13 = or i32 %10, %12
%14 = load i32, i32* %7
%15 = shl i32 %14, 8
%16 = or i32 %13, %15
%17 = load i32, i32* %8
%18 = or i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @MakeColor(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 24
%6 = shl i32 %1, 16
%7 = or i32 %6, %5
%8 = shl i32 %2, 8
%9 = or i32 %7, %8
%10 = or i32 %9, %3
ret i32 %10
}