xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ test;

/* Variables and functions */
int crc32c(int /*<<< orphan*/, char *, int);
int main(int argc, char *argv[]) {
  char test[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9'};
  return crc32c(0, test, sizeof(test)) == 0xe3069283 ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x19(%rbp)
mov    0xed1(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x19(%rbp),%rsi
xor    %edi,%edi
mov    $0x9,%edx
call   1030 <crc32c@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0xe3069283,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x3837363534333231,%rax
36 37 38
mov    %rax,0x8(%rsp)
movb   $0x39,0x10(%rsp)
lea    0x8(%rsp),%rsi
xor    %edi,%edi
mov    $0x9,%edx
call   1030 <crc32c@plt>
xor    %ecx,%ecx
cmp    $0xe3069283,%eax
setne  %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.test = [9 x i8] c"123456789"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [9 x i8]* %6 to i8*
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%9 = call i32 @crc32c(i32 0, i8* %8, i32 9)
%10 = icmp eq i32 %9, -486108541
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 0, i32 1
ret i32 %12
}

LLVM IR (-O2):
@__const.main.test = [9 x i8] c"123456789"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%5 = call i32 @crc32c(i32 0, i8* %4, i32 9)
%6 = icmp ne i32 %5, -486108541
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
long double atan2l(long double, long double);
long double libm_atan2l(long double x, long double y) { return atan2l(x, y); }


x86 assembly (clang, -O0):
<libm_atan2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <atan2l@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libm_atan2l>:
jmp    1030 <atan2l@plt>

LLVM IR (-O0):
define x86_fp80 @libm_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call x86_fp80 @atan2l(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @libm_atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 4;
  a /= 2;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo305() {
ret void
}
int sol_util_int_compare(const int a, const int b) { return (a > b) - (a < b); }


x86 assembly (clang, -O0):
<sol_util_int_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x4(%rbp),%ecx
cmp    -0x8(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sol_util_int_compare>:
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %esi,%edi
setg   %al
setl   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sol_util_int_compare(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 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i32
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = sub nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @sol_util_int_compare(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
%5 = icmp slt i32 %0, %1
%6 = sext i1 %5 to i32
%7 = add nsw i32 %6, %4
ret i32 %7
}
extern unsigned short __inwc_p(unsigned short port) {
  unsigned short _v;
  __asm__ __volatile__("in"
                       "w"
                       " %"
                       ""
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "id"(port));
  __asm__ __volatile__("outb %al,$0x80");
  return _v;
}


x86 assembly (clang, -O0):
<__inwc_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %ax,-0x4(%rbp)
out    %al,$0x80
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inwc_p>:
mov    %edi,%edx
in     (%dx),%ax
out    %al,$0x80
ret

LLVM IR (-O0):
define zeroext i16 @__inwc_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm sideeffect "inw $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @__inwc_p(i16 zeroext %0) {
%2 = tail call i16 asm sideeffect "inw $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret i16 %2
}
/* Variables and functions */
int test_dcbzl();
int main(int argc, char **argv) {
  int status;
  status = test_dcbzl();
  return status;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_dcbzl()
ret i32 %3
}
void swap(int *s, int *q) {
  int tmp;
  tmp = *s;
  *s = *q;
  *q = tmp;
}


x86 assembly (clang, -O0):
<swap>:
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):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(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 @swap(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
}
int test_imm_54int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x54 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_54int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 84
%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_54int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 5505024
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ release;
};

/* Variables and functions */
scalar_t__ __strverscmp(int /*<<< orphan*/, char *);
scalar_t__ uname(struct utsname *);
int kernel_has_rtsig(void) {
  struct utsname name;
  return uname(&name) == 0 && __strverscmp(name.release, "2.1.70") >= 0;
}


x86 assembly (clang, -O0):
<kernel_has_rtsig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <uname@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115c <kernel_has_rtsig+0x3c>
mov    -0x8(%rbp),%edi
lea    0xeb3(%rip),%rsi
call   1040 <__strverscmp@plt>
cmp    $0x0,%rax
setge  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_has_rtsig>:
push   %rax
mov    %rsp,%rdi
call   1030 <uname@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <kernel_has_rtsig+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
lea    0xec1(%rip),%rsi
call   1040 <__strverscmp@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.utsname = type { i32 }
@.str = [7 x i8] c"2.1.70\00"
define i32 @kernel_has_rtsig() {
%1 = alloca %struct.utsname
%2 = call i64 @uname(%struct.utsname* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i64 @__strverscmp(i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = icmp sge i64 %7, 0
br label %9
9: ; preds = %4, %0
%10 = phi i1 [ false, %0 ], [ %8, %4 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
@.str = [7 x i8] c"2.1.70\00"
define i32 @kernel_has_rtsig() {
%1 = alloca %struct.utsname
%2 = bitcast %struct.utsname* %1 to i8*
%3 = call i64 @uname(%struct.utsname* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i64 @__strverscmp(i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = lshr i64 %8, 63
%10 = trunc i64 %9 to i32
%11 = xor i32 %10, 1
br label %12
12: ; preds = %5, %0
%13 = phi i32 [ 0, %0 ], [ %11, %5 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ cgi_useragent(char *);
int /*<<< orphan*/ cginocache_msie();
int /*<<< orphan*/ cginocache_other();
int /*<<< orphan*/ printf(char *);
void cginocache() {
  printf("Cache-Control: no-store, max-age=0, s-maxage=0, proxy-revalidate, "
         "must-revalidate\n");
  printf("Expires: -1\n");
  printf("Pragma: no-cache\n");
  return;
  if (cgi_useragent("MSIE"))
    cginocache_msie();
  else
    cginocache_other();
}


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

x86 assembly (clang, -O2):
<cginocache>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"Cache-Control: no-store, max-age=0, s-maxage=0, proxy-revalidate, must-revalidate\0A\00"
@.str.1 = [13 x i8] c"Expires: -1\0A\00"
@.str.2 = [18 x i8] c"Pragma: no-cache\0A\00"
define void @cginocache() {
%1 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [82 x i8] c"Cache-Control: no-store, max-age=0, s-maxage=0, proxy-revalidate, must-revalidate\00"
@str.3 = [12 x i8] c"Expires: -1\00"
@str.4 = [17 x i8] c"Pragma: no-cache\00"
define void @cginocache() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
void ICPrintLengthByLastIndex(unsigned int index) {
  printf("If index of last elament = %u ; Length of array = %u\n", index,
         index + 1);
}


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

x86 assembly (clang, -O2):
<ICPrintLengthByLastIndex>:
mov    %edi,%esi
lea    0x1(%rsi),%edx
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"If index of last elament = %u ; Length of array = %u\0A\00"
define void @ICPrintLengthByLastIndex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"If index of last elament = %u ; Length of array = %u\0A\00"
define void @ICPrintLengthByLastIndex(i32 %0) {
%2 = add i32 %0, 1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
ret void
}
/* Variables and functions */
long double M_LN2;
long double logl(long double);
long double log2l(long double x) { return (logl(x) / M_LN2); }


x86 assembly (clang, -O0):
<log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <logl@plt>
mov    0x2eae(%rip),%rax
fldt   (%rax)
fdivrp %st,%st(1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2l>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <logl@plt>
mov    0x2eb9(%rip),%rax
fldt   (%rax)
fdivrp %st,%st(1)
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_LN2 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @logl(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* @M_LN2
%6 = fdiv x86_fp80 %4, %5
ret x86_fp80 %6
}

LLVM IR (-O2):
@M_LN2 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = tail call x86_fp80 @logl(x86_fp80 %0)
%3 = load x86_fp80, x86_fp80* @M_LN2
%4 = fdiv x86_fp80 %2, %3
ret x86_fp80 %4
}
int abs(x)
int x;
{ return x < 0 ? -x : x; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t msr_set_bit(uint64_t val, int bit) { return (val | (1 << bit)); }


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

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

LLVM IR (-O0):
define i32 @msr_set_bit(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 = shl i32 1, %6
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @msr_set_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
void avio_open() {}


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

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

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

LLVM IR (-O2):
define void @avio_open() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addvrfield2_(float *, float *, float *, int *, int *, int *);
void caddvrfield2(float a[], float b[], float c[], int ndim, int nxe, int nye) {
  addvrfield2_(a, b, c, &ndim, &nxe, &nye);
  return;
}


x86 assembly (clang, -O0):
<caddvrfield2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
lea    -0x24(%rbp),%r9
call   1030 <addvrfield2_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<caddvrfield2>:
sub    $0x18,%rsp
mov    %ecx,0x14(%rsp)
mov    %r8d,0x10(%rsp)
mov    %r9d,0xc(%rsp)
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
call   1030 <addvrfield2_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @caddvrfield2(float* %0, float* %1, float* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store float* %0, float** %7
store float* %1, float** %8
store float* %2, float** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load float*, float** %7
%14 = load float*, float** %8
%15 = load float*, float** %9
%16 = call i32 @addvrfield2_(float* %13, float* %14, float* %15, i32* %10, i32* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @caddvrfield2(float* %0, float* %1, float* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %3, i32* %7
store i32 %4, i32* %8
store i32 %5, i32* %9
%10 = call i32 @addvrfield2_(float* %0, float* %1, float* %2, i32* %7, i32* %8, i32* %9)
ret void
}
void i2d_PROXY_POLICY(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PROXY_POLICY() {
ret void
}
int main(void) {
  __func__;
  return func();
}


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

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

LLVM IR (-O0):
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
ret i32 %1
}
int eisinf(x)
unsigned short x[];
{
  if ((x[6 - 1] & 0x7fff) == 0x7fff) {
    if (eisnan(x))
      return (0);
    return (1);
  } else
    return (0);
}


x86 assembly (clang, -O0):
<eisinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzwl 0xa(%rax),%eax
and    $0x7fff,%eax
cmp    $0x7fff,%eax
jne    1160 <eisinf+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <eisnan@plt>
cmp    $0x0,%eax
je     1154 <eisinf+0x44>
movl   $0x0,-0x4(%rbp)
jmp    1167 <eisinf+0x57>
movl   $0x1,-0x4(%rbp)
jmp    1167 <eisinf+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eisinf>:
push   %rax
movzwl 0xa(%rdi),%ecx
not    %ecx
xor    %eax,%eax
test   $0x7fff,%ecx
jne    1131 <eisinf+0x21>
xor    %eax,%eax
call   1030 <eisnan@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eisinf(i16* %0) {
%2 = alloca i32
%3 = alloca i16*
store i16* %0, i16** %3
%4 = load i16*, i16** %3
%5 = getelementptr inbounds i16, i16* %4, i64 5
%6 = load i16, i16* %5
%7 = zext i16 %6 to i32
%8 = and i32 %7, 32767
%9 = icmp eq i32 %8, 32767
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i16*, i16** %3
%12 = call i32 (i16*, ...) bitcast (i32 (...)* @eisnan to i32 (i16*, ...)*)(i16* %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %2
br label %17
15: ; preds = %10
store i32 1, i32* %2
br label %17
16: ; preds = %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15, %14
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @eisinf(i16* %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 5
%3 = load i16, i16* %2
%4 = and i16 %3, 32767
%5 = icmp eq i16 %4, 32767
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i32 (i16*, ...) bitcast (i32 (...)* @eisnan to i32 (i16*, ...)*)(i16* %0)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
void set_bright(unsigned int i) {
  if (!i)
    i = 0x80;
  *((unsigned char *)0x2100) = (i);
  ;
}


x86 assembly (clang, -O0):
<set_bright>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1118 <set_bright+0x18>
movl   $0x80,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    $0x2100,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bright>:
test   %edi,%edi
mov    $0x80,%eax
cmovne %edi,%eax
mov    %al,0x2100
ret

LLVM IR (-O0):
define void @set_bright(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
store i32 128, i32* %2
br label %6
6: ; preds = %5, %1
%7 = load i32, i32* %2
%8 = trunc i32 %7 to i8
store i8 %8, i8* inttoptr (i64 8448 to i8*)
ret void
}

LLVM IR (-O2):
define void @set_bright(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 -128, i8 %3
store i8 %4, i8* inttoptr (i64 8448 to i8*)
ret void
}
/* Variables and functions */
int fgetc(int /*<<< orphan*/);
int getchar() { return fgetc(0); }


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <fgetc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar>:
xor    %edi,%edi
jmp    1030 <fgetc@plt>

LLVM IR (-O0):
define i32 @getchar() {
%1 = call i32 @fgetc(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getchar() {
%1 = tail call i32 @fgetc(i32 0)
ret i32 %1
}
int cairo_code_draw_LED_get_height() { return 19; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_LED_get_height() {
ret i32 19
}

LLVM IR (-O2):
define i32 @cairo_code_draw_LED_get_height() {
ret i32 19
}
/* Type definitions */
typedef double clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
double clock();
void pausa(double msec) {
  double CPMS = CLOCKS_PER_SEC / 1000.0;
  clock_t start = clock();
  while ((clock() - start) / CPMS < msec) {
  }
}


x86 assembly (clang, -O0):
<pausa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ec4(%rip),%rax
movsd  (%rax),%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
movaps %xmm0,%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    116d <pausa+0x5d>
jmp    1145 <pausa+0x35>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pausa>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
mov    0x2ec7(%rip),%rax
movsd  (%rax),%xmm0
divsd  0xed3(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <clock@plt>
movsd  %xmm0,(%rsp)
nop
xor    %eax,%eax
call   1030 <clock@plt>
subsd  (%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     1140 <pausa+0x30>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @pausa(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* @CLOCKS_PER_SEC
%6 = fdiv double %5, 1.000000e+03
store double %6, double* %3
%7 = call double (...) @clock()
store double %7, double* %4
br label %8
8: ; preds = %16, %1
%9 = call double (...) @clock()
%10 = load double, double* %4
%11 = fsub double %9, %10
%12 = load double, double* %3
%13 = fdiv double %11, %12
%14 = load double, double* %2
%15 = fcmp olt double %13, %14
br i1 %15, label %16, label %17
16: ; preds = %8
br label %8
17: ; preds = %8
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @pausa(double %0) {
%2 = load double, double* @CLOCKS_PER_SEC
%3 = fdiv double %2, 1.000000e+03
%4 = tail call double (...) @clock()
br label %5
5: ; preds = %5, %1
%6 = tail call double (...) @clock()
%7 = fsub double %6, %4
%8 = fdiv double %7, %3
%9 = fcmp olt double %8, %0
br i1 %9, label %5, label %10
10: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DrawBox(double, double, double, double);
void DrawCenteredBox(double x, double y, double width, double height) {
  DrawBox(x - width / 2, y - height / 2, width, height);
}


x86 assembly (clang, -O0):
<DrawCenteredBox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xec2(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  0xea8(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <DrawBox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawCenteredBox>:
movsd  0xee8(%rip),%xmm4
movapd %xmm2,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm5,%xmm0
mulsd  %xmm3,%xmm4
subsd  %xmm4,%xmm1
jmp    1030 <DrawBox@plt>

LLVM IR (-O0):
define void @DrawCenteredBox(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %7
%11 = fdiv double %10, 2.000000e+00
%12 = fsub double %9, %11
%13 = load double, double* %6
%14 = load double, double* %8
%15 = fdiv double %14, 2.000000e+00
%16 = fsub double %13, %15
%17 = load double, double* %7
%18 = load double, double* %8
%19 = call i32 @DrawBox(double %12, double %16, double %17, double %18)
ret void
}

LLVM IR (-O2):
define void @DrawCenteredBox(double %0, double %1, double %2, double %3) {
%5 = fmul double %2, 5.000000e-01
%6 = fsub double %0, %5
%7 = fmul double %3, 5.000000e-01
%8 = fsub double %1, %7
%9 = tail call i32 @DrawBox(double %6, double %8, double %2, double %3)
ret void
}
int sha1_test(void) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @sha1_test() {
ret i32 2
}
/* Variables and functions */
int t(int);
q() {
  int i = t(1);
  if (!i)
    i = t(1);
}


x86 assembly (clang, -O0):
<q>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <t@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113c <q+0x2c>
mov    $0x1,%edi
call   1030 <t@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q>:
push   %rax
mov    $0x1,%edi
call   1030 <t@plt>
test   %eax,%eax
je     1121 <q+0x11>
pop    %rcx
ret
mov    $0x1,%edi
call   1030 <t@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @q() {
%1 = tail call i32 @t(i32 1)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @t(i32 1)
br label %5
5: ; preds = %3, %0
ret i32 undef
}
/* Type definitions */
struct ricerca_contatto {
  int dummy;
};
struct contatto {
  int dummy;
};

/* Variables and functions */
int cancella_record(struct ricerca_contatto *);
int nuovo_record(struct contatto *);
int modifica_record(struct contatto *new, struct ricerca_contatto *cerca) {
  if (cancella_record(cerca) == 1)
    return 1;
  if (nuovo_record(new) == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<modifica_record>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <cancella_record@plt>
cmp    $0x1,%eax
jne    114e <modifica_record+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1173 <modifica_record+0x53>
mov    -0x10(%rbp),%rdi
call   1030 <nuovo_record@plt>
cmp    $0x1,%eax
jne    116c <modifica_record+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1173 <modifica_record+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modifica_record>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <cancella_record@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     114a <modifica_record+0x2a>
mov    %rbx,%rdi
call   1030 <nuovo_record@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.contatto = type { i32 }
%struct.ricerca_contatto = type { i32 }
define i32 @modifica_record(%struct.contatto* %0, %struct.ricerca_contatto* %1) {
%3 = alloca i32
%4 = alloca %struct.contatto*
%5 = alloca %struct.ricerca_contatto*
store %struct.contatto* %0, %struct.contatto** %4
store %struct.ricerca_contatto* %1, %struct.ricerca_contatto** %5
%6 = load %struct.ricerca_contatto*, %struct.ricerca_contatto** %5
%7 = call i32 @cancella_record(%struct.ricerca_contatto* %6)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %16
10: ; preds = %2
%11 = load %struct.contatto*, %struct.contatto** %4
%12 = call i32 @nuovo_record(%struct.contatto* %11)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 1, i32* %3
br label %16
15: ; preds = %10
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.contatto = type { i32 }
%struct.ricerca_contatto = type { i32 }
define i32 @modifica_record(%struct.contatto* %0, %struct.ricerca_contatto* %1) {
%3 = tail call i32 @cancella_record(%struct.ricerca_contatto* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @nuovo_record(%struct.contatto* %0)
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef scalar_t__ GLint;
typedef double GLdouble;

/* Variables and functions */
scalar_t__ INT_MAX;
int /*<<< orphan*/ assert(int);
void shoveSint(GLdouble value, int index, void *data) {
  assert(0.0 <= value && value <= (GLdouble)INT_MAX);
  ((GLint *)data)[index] = (GLint)value;
}


x86 assembly (clang, -O0):
<shoveSint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jb     1156 <shoveSint+0x46>
movsd  -0x8(%rbp),%xmm1
mov    0x2ea1(%rip),%rax
cvtsi2sdq (%rax),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cvttsd2si -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shoveSint>:
push   %rbp
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
mov    0x2ebe(%rip),%rcx
xorps  %xmm1,%xmm1
cvtsi2sdq (%rcx),%xmm1
ucomisd %xmm0,%xmm1
mov    %rsi,%rbx
mov    %edi,%ebp
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
cvttsd2si (%rsp),%rax
movslq %ebp,%rcx
mov    %rax,(%rbx,%rcx,8)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define void @shoveSint(double %0, i32 %1, i8* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i8*
store double %0, double* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load double, double* %4
%8 = fcmp ole double 0.000000e+00, %7
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load double, double* %4
%11 = load i64, i64* @INT_MAX
%12 = sitofp i64 %11 to double
%13 = fcmp ole double %10, %12
br label %14
14: ; preds = %9, %3
%15 = phi i1 [ false, %3 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load double, double* %4
%19 = fptosi double %18 to i64
%20 = load i8*, i8** %6
%21 = bitcast i8* %20 to i64*
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i64, i64* %21, i64 %23
store i64 %19, i64* %24
ret void
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define void @shoveSint(double %0, i32 %1, i8* nocapture writeonly %2) {
%4 = fcmp oge double %0, 0.000000e+00
%5 = load i64, i64* @INT_MAX
%6 = sitofp i64 %5 to double
%7 = fcmp oge double %6, %0
%8 = select i1 %4, i1 %7, i1 false
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = fptosi double %0 to i64
%12 = bitcast i8* %2 to i64*
%13 = sext i32 %1 to i64
%14 = getelementptr inbounds i64, i64* %12, i64 %13
store i64 %11, i64* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_collision_warning_gauge();
int /*<<< orphan*/ init_crosshair();
int /*<<< orphan*/ init_torp_gauge();
void init_hud(void) {
  init_crosshair();
  init_collision_warning_gauge();
  init_torp_gauge();
  return;
}


x86 assembly (clang, -O0):
<init_hud>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <init_crosshair@plt>
mov    $0x0,%al
call   1030 <init_collision_warning_gauge@plt>
mov    $0x0,%al
call   1040 <init_torp_gauge@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_hud>:
push   %rax
xor    %eax,%eax
call   1050 <init_crosshair@plt>
xor    %eax,%eax
call   1030 <init_collision_warning_gauge@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <init_torp_gauge@plt>

LLVM IR (-O0):
define void @init_hud() {
%1 = call i32 (...) @init_crosshair()
%2 = call i32 (...) @init_collision_warning_gauge()
%3 = call i32 (...) @init_torp_gauge()
ret void
}

LLVM IR (-O2):
define void @init_hud() {
%1 = tail call i32 (...) @init_crosshair()
%2 = tail call i32 (...) @init_collision_warning_gauge()
%3 = tail call i32 (...) @init_torp_gauge()
ret void
}
void av_fourcc_make_string() {}


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

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

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

LLVM IR (-O2):
define void @av_fourcc_make_string() {
ret void
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
uint highbits(uint x, uint k) { return x >> k; }


x86 assembly (clang, -O0):
<highbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<highbits>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @highbits(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 = ashr i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @highbits(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __NR_mq_unlink;
int syscall(int /*<<< orphan*/, char const *);
int stp_mq_unlink(const char *name) { return syscall(__NR_mq_unlink, name); }


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

x86 assembly (clang, -O2):
<stp_mq_unlink>:
mov    %rdi,%rsi
mov    0x2ede(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_mq_unlink = global i32 0
define i32 @stp_mq_unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @__NR_mq_unlink
%4 = load i8*, i8** %2
%5 = call i32 @syscall(i32 %3, i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@__NR_mq_unlink = global i32 0
define i32 @stp_mq_unlink(i8* %0) {
%2 = load i32, i32* @__NR_mq_unlink
%3 = tail call i32 @syscall(i32 %2, i8* %0)
ret i32 %3
}
void foo_1_1_1_2_1_2_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_2_1_2_2() {
ret void
}
int intlog2(unsigned int val) {
  int ret = -1;
  while (val != 0) {
    val >>= 1;
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<intlog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <intlog2+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <intlog2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlog2>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111c <intlog2+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <intlog2+0x10>
ret

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

LLVM IR (-O2):
define i32 @intlog2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ -1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
float sqrt(float);
float norma(float *x) {
  float norma2 = 0;
  int i;
  for (i = 0; i < 3; i++)
    norma2 += x[i] * x[i];
  return sqrt(norma2);
}


x86 assembly (clang, -O0):
<norma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    116f <norma+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <norma+0x1b>
movss  -0xc(%rbp),%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norma>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm0
xorps  %xmm2,%xmm2
addss  %xmm2,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jb     1143 <norma+0x33>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @norma(float* %0) {
%2 = alloca float*
%3 = alloca float
%4 = alloca i32
store float* %0, float** %2
store float 0.000000e+00, float* %3
store i32 0, i32* %4
br label %5
5: ; preds = %21, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load float*, float** %2
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds float, float* %9, i64 %11
%13 = load float, float* %12
%14 = load float*, float** %2
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = load float, float* %3
%20 = call float @llvm.fmuladd.f32(float %13, float %18, float %19)
store float %20, float* %3
br label %21
21: ; preds = %8
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %5
24: ; preds = %5
%25 = load float, float* %3
%26 = call float @sqrt(float %25)
ret float %26
}

LLVM IR (-O2):
define float @norma(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @llvm.fmuladd.f32(float %2, float %2, float 0.000000e+00)
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %3)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call float @sqrt(float %9)
ret float %10
}
int fun807() { return 807; }


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

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

LLVM IR (-O0):
define i32 @fun807() {
ret i32 807
}

LLVM IR (-O2):
define i32 @fun807() {
ret i32 807
}
int adis16203_initialize_ring(struct iio_ring_buffer *ring) { return 0; }


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

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

LLVM IR (-O0):
%struct.iio_ring_buffer = type opaque
define i32 @adis16203_initialize_ring(%struct.iio_ring_buffer* %0) {
%2 = alloca %struct.iio_ring_buffer*
store %struct.iio_ring_buffer* %0, %struct.iio_ring_buffer** %2
ret i32 0
}

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define i32 @adis16203_initialize_ring(%struct.iio_ring_buffer* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *allocate_protected_space(int);
int /*<<< orphan*/ deallocate_protected_space(char *, int);
int /*<<< orphan*/ print_ptr(int /*<<< orphan*/);
int /*<<< orphan*/ scheme_entry(char *);
int main(int argc, char **argv) {
  int stack_size = (16 * 4096);
  char *stack_top = allocate_protected_space(stack_size);
  char *stack_base = stack_top + stack_size;
  print_ptr(scheme_entry(stack_base));
  deallocate_protected_space(stack_top, stack_size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x10000,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <allocate_protected_space@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1060 <scheme_entry@plt>
mov    %eax,%edi
call   1050 <print_ptr@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <deallocate_protected_space@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x10000,%edi
call   1040 <allocate_protected_space@plt>
mov    %rax,%rbx
lea    0x10000(%rax),%rdi
call   1060 <scheme_entry@plt>
mov    %eax,%edi
call   1050 <print_ptr@plt>
mov    %rbx,%rdi
mov    $0x10000,%esi
call   1030 <deallocate_protected_space@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 65536, i32* %6
%9 = load i32, i32* %6
%10 = call i8* @allocate_protected_space(i32 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8* %14, i8** %8
%15 = load i8*, i8** %8
%16 = call i32 @scheme_entry(i8* %15)
%17 = call i32 @print_ptr(i32 %16)
%18 = load i8*, i8** %7
%19 = load i32, i32* %6
%20 = call i32 @deallocate_protected_space(i8* %18, i32 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @allocate_protected_space(i32 65536)
%4 = getelementptr inbounds i8, i8* %3, i64 65536
%5 = tail call i32 @scheme_entry(i8* %4)
%6 = tail call i32 @print_ptr(i32 %5)
%7 = tail call i32 @deallocate_protected_space(i8* %3, i32 65536)
ret i32 0
}
float height(int num) {
  if (1 == num)
    return 50;
  else
    return height(num - 1) / 2;
}


x86 assembly (clang, -O0):
<height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    113b <height+0x2b>
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1157 <height+0x47>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <height@plt>
movss  0xeb2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<height>:
push   %rax
cmp    $0x1,%edi
jne    1120 <height+0x10>
movss  0xee2(%rip),%xmm0
pop    %rax
ret
add    $0xffffffff,%edi
call   1030 <height@plt>
mulss  0xed4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @height(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 1, %4
br i1 %5, label %6, label %7
6: ; preds = %1
store float 5.000000e+01, float* %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call float @height(i32 %9)
%11 = fdiv float %10, 2.000000e+00
store float %11, float* %2
br label %12
12: ; preds = %7, %6
%13 = load float, float* %2
ret float %13
}

LLVM IR (-O2):
define float @height(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi float [ %8, %5 ], [ 5.000000e+01, %1 ]
ret float %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call float @height(i32 %6)
%8 = fmul float %7, 5.000000e-01
br label %3
}