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

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, char const *, void *, size_t);
ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size) {
  return syscall(193, filedes, name, value, size);
}


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

x86 assembly (clang, -O2):
<fgetxattr>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0xc1,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @fgetxattr(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @syscall(i32 193, i32 %9, i8* %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @fgetxattr(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @syscall(i32 193, i32 %0, i8* %1, i8* %2, i64 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_log2();
scalar_t__ log2(double);
void test_log2(double d) {
  if (log2(d) != log2(d))
    link_failure_log2();
}


x86 assembly (clang, -O0):
<test_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log2@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_log2+0x3c>
mov    $0x0,%al
call   1040 <link_failure_log2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log2>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <log2@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1030 <log2@plt>
cmp    %rax,%rbx
jne    1149 <test_log2+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_log2@plt>

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

LLVM IR (-O2):
define void @test_log2(double %0) {
%2 = tail call i64 @log2(double %0)
%3 = tail call i64 @log2(double %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_log2()
br label %7
7: ; preds = %5, %1
ret void
}
void uart0SendChar(unsigned char charToSend) {
  while (!((*((volatile unsigned long *)0xE000C014)) & 0x20))
    ;
  (*((volatile unsigned long *)0xE000C000)) = charToSend;
}


x86 assembly (clang, -O0):
<uart0SendChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xe000c014,%eax
mov    (%rax),%rax
and    $0x20,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112c <uart0SendChar+0x2c>
jmp    1131 <uart0SendChar+0x31>
jmp    110a <uart0SendChar+0xa>
movzbl -0x1(%rbp),%eax
mov    %eax,%ecx
mov    $0xe000c000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0SendChar>:
mov    $0xe000c000,%eax
cs nopw 0x0(%rax,%rax,1)
nop
testq  $0x20,0x14(%rax)
je     1110 <uart0SendChar+0x10>
movzbl %dil,%ecx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @uart0SendChar(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i64, i64* inttoptr (i64 3758145556 to i64*)
%5 = and i64 %4, 32
%6 = icmp ne i64 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i8, i8* %2
%11 = zext i8 %10 to i64
store volatile i64 %11, i64* inttoptr (i64 3758145536 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart0SendChar(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* inttoptr (i64 3758145556 to i64*)
%4 = and i64 %3, 32
%5 = icmp eq i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = zext i8 %0 to i64
store volatile i64 %7, i64* inttoptr (i64 3758145536 to i64*)
ret void
}
int exact_square(int chislo) {
  int i = 0;
  while (i <= chislo) {
    if (chislo == i * i) {
      return 1;
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1146 <exact_square+0x46>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <exact_square+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114d <exact_square+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
test   %edi,%edi
js     1120 <exact_square+0x20>
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1123 <exact_square+0x23>
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1110 <exact_square+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %10, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %10, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 0, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %6 ]
ret i32 %11
}
void instr_34() {}


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

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

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

LLVM IR (-O2):
define void @instr_34() {
ret void
}
int div16(int x) {
  int sign = (x & (1 << 31)) >> 31;
  return (x + (sign & 0x0F)) >> 4;
}


x86 assembly (clang, -O0):
<div16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80000000,%eax
sar    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
sar    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div16>:
mov    %edi,%eax
sar    $0x1f,%eax
and    $0xf,%eax
add    %edi,%eax
sar    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @div16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, -2147483648
%6 = ashr i32 %5, 31
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = and i32 %8, 15
%10 = add nsw i32 %7, %9
%11 = ashr i32 %10, 4
ret i32 %11
}

LLVM IR (-O2):
define i32 @div16(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 15, i32 0
%4 = add nsw i32 %3, %0
%5 = ashr i32 %4, 4
ret i32 %5
}
/* Variables and functions */
scalar_t__ isPalindrome(int);
int /*<<< orphan*/ printf(char *, int, char *);
int main() {
  int a = 5225;
  printf("%d => %s", a, isPalindrome(a) ? "true" : "false");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1469,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isPalindrome@plt>
mov    -0x8(%rbp),%esi
mov    %rax,%rcx
lea    0xec4(%rip),%rdx
lea    0xeb8(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1469,%edi
call   1040 <isPalindrome@plt>
test   %rax,%rax
lea    0xed9(%rip),%rax
lea    0xecd(%rip),%rdx
cmove  %rax,%rdx
lea    0xeb9(%rip),%rdi
mov    $0x1469,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d => %s\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca i32
store i32 5225, i32* %1
%2 = load i32, i32* %1
%3 = load i32, i32* %1
%4 = call i64 @isPalindrome(i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d => %s\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = tail call i64 @isPalindrome(i32 5225)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 5225, i8* %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t strncmp(char *, char *, size_t);
size_t wcsxfrm(wchar_t *s1, const wchar_t *s2, size_t n) {
  return strncmp((char *)s1, (char *)s2, n);
}


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

x86 assembly (clang, -O2):
<wcsxfrm>:
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
define i64 @wcsxfrm(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** %5
%10 = bitcast i32* %9 to i8*
%11 = load i64, i64* %6
%12 = call i64 @strncmp(i8* %8, i8* %10, i64 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @wcsxfrm(i32* %0, i32* %1, i64 %2) {
%4 = bitcast i32* %0 to i8*
%5 = bitcast i32* %1 to i8*
%6 = tail call i64 @strncmp(i8* %4, i8* %5, i64 %2)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ f(long long);
main() { f(-(1LL << 35)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movabs $0xfffffff800000000,%rdi
ff ff ff
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0xfffffff800000000,%rdi
ff ff ff
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i64 -34359738368)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i64 -34359738368)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ResetTachoCount(unsigned char);
void ResetBlockAndTachoCount(unsigned char Outputs) {
  ResetTachoCount(Outputs);
}


x86 assembly (clang, -O0):
<ResetBlockAndTachoCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <ResetTachoCount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResetBlockAndTachoCount>:
jmp    1030 <ResetTachoCount@plt>

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

LLVM IR (-O2):
define void @ResetBlockAndTachoCount(i8 zeroext %0) {
%2 = tail call i32 @ResetTachoCount(i8 zeroext %0)
ret void
}
int caracValeur(char carac) {
  if (carac >= 'a' && carac <= 'z')
    return carac - 'a';
  else if (carac >= 'A' && carac <= 'Z')
    return carac - 'A';
}


x86 assembly (clang, -O0):
<caracValeur>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <caracValeur+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <caracValeur+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <caracValeur+0x61>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     115c <caracValeur+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     115c <caracValeur+0x5c>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <caracValeur+0x61>
jmp    1161 <caracValeur+0x61>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<caracValeur>:
mov    %edi,%eax
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     110e <caracValeur+0xe>
add    $0xffffff9f,%eax
ret
add    $0xffffffbf,%eax
ret

LLVM IR (-O0):
define i32 @caracValeur(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
store i32 %14, i32* %2
br label %28
15: ; preds = %7, %1
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 65
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 90
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = sub nsw i32 %25, 65
store i32 %26, i32* %2
br label %28
27: ; preds = %19, %15
br label %28
28: ; preds = %11, %23, %27
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @caracValeur(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -97
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -97
br label %12
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 26
%10 = add nsw i32 %2, -65
%11 = select i1 %9, i32 %10, i32 undef
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
ret i32 %13
}
int strsize(char *s) {
  int x = 0;
  while (s[x] != '\0')
    x++;
  return x;
}


x86 assembly (clang, -O0):
<strsize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strsize+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strsize+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsize>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strsize+0x10>
ret

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

LLVM IR (-O2):
define i32 @strsize(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ vectorSet(float *, float, float, float);
void vectorNegate(float v[3]) { vectorSet(v, -v[0], -v[1], -v[2]); }


x86 assembly (clang, -O0):
<vectorNegate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <vectorSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectorNegate>:
movaps 0xee9(%rip),%xmm3
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
movss  0x8(%rdi),%xmm2
xorps  %xmm3,%xmm0
xorps  %xmm3,%xmm1
xorps  %xmm3,%xmm2
jmp    1030 <vectorSet@plt>

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

LLVM IR (-O2):
define void @vectorNegate(float* %0) {
%2 = load float, float* %0
%3 = fneg float %2
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = fneg float %5
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = fneg float %8
%10 = tail call i32 @vectorSet(float* %0, float %3, float %6, float %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_spaces(int length) {
  for (int i = 0; i < length; ++i)
    printf(" ");
}


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

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

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

LLVM IR (-O2):
define void @print_spaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i32 32)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t Hashfunc_sdbm(const unsigned char *str) {
  uint64_t hash = 0;
  int c;
  while ((c = *str++)) {
    hash = c + (hash << 6) + (hash << 16) - hash;
  };
  return hash;
}


x86 assembly (clang, -O0):
<Hashfunc_sdbm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     114b <Hashfunc_sdbm+0x4b>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <Hashfunc_sdbm+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hashfunc_sdbm>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <Hashfunc_sdbm+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
imul   $0x1003f,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <Hashfunc_sdbm+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Hashfunc_sdbm(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 65599
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputc(int, int /*<<< orphan*/ *);
int putc(int character, FILE *stream) { return fputc(character, stream); }


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

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define i32 @putc(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @fputc(i32 %0, i32* %1)
ret i32 %3
}
long oadd(t1, t2)
long t1;
long t2;
{
  register long t;
  t = t1 + t2;
  if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
    error("time overflow");
    exit(1);
  }
  return t;
}


x86 assembly (clang, -O0):
<oadd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1155 <oadd+0x35>
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jle    116e <oadd+0x4e>
cmpq   $0x0,-0x10(%rbp)
jge    1186 <oadd+0x66>
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jl     1186 <oadd+0x66>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oadd>:
lea    (%rdi,%rsi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @oadd(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("HELLO WORLD\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"HELLO WORLD\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void conf_load_defaults(void) { return; }


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

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

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

LLVM IR (-O2):
define void @conf_load_defaults() {
ret void
}
const char *msg() { return "I am the best."; }


x86 assembly (clang, -O0):
<msg>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"I am the best.\00"
define i8* @msg() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"I am the best.\00"
define i8* @msg() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int minor_code;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
void set_XGraphicsExposeEvent_minor_code(void *_p, int _v) {
  ((XGraphicsExposeEvent *)_p)->minor_code = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XGraphicsExposeEvent_minor_code>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XGraphicsExposeEvent_minor_code(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int a1(int x, int y) {
  int t = x & y;
  int tt = x | y;
  unsigned t1 = t - tt;
  return t1 + -1;
}


x86 assembly (clang, -O0):
<a1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a1>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @a1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = and i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = or i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = add i32 %17, -1
ret i32 %18
}

LLVM IR (-O2):
define i32 @a1(i32 %0, i32 %1) {
%3 = xor i32 %0, %1
%4 = xor i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms_cache(int);
void delay_ms(int msecs) { delay_ms_cache(msecs); }


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <delay_ms_cache@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
jmp    1030 <delay_ms_cache@plt>

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

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
%2 = tail call i32 @delay_ms_cache(i32 %0)
ret void
}
__attribute((always_)) float glm_min(float a, float b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<glm_min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <glm_min+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <glm_min+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_min>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @glm_min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %5
store float %12, float* %3
br label %13
13: ; preds = %11, %9
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @glm_min(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __msp_safe_free(void **ptr) {
  if (ptr != NULL) {
    if (*ptr != NULL) {
      free(*ptr);
      *ptr = NULL;
    }
  }
}


x86 assembly (clang, -O0):
<__msp_safe_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1151 <__msp_safe_free+0x41>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114c <__msp_safe_free+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    1151 <__msp_safe_free+0x41>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__msp_safe_free>:
push   %rbx
test   %rdi,%rdi
je     112d <__msp_safe_free+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <__msp_safe_free+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @__msp_safe_free(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %8
8: ; preds = %3, %6, %1
ret void
}
/* Type definitions */
struct csvdata {
  int dummy;
};

/* Variables and functions */
char *csvdata_value_string(struct csvdata *, int, int, char const *);
long trans_long(char const *, long);
long csvdata_value_long(struct csvdata *csv, int line, int row, long def) {
  const char *val = csvdata_value_string(csv, line, row, (const char *)NULL);
  if (!val)
    return def;
  return trans_long(val, def);
}


x86 assembly (clang, -O0):
<csvdata_value_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <csvdata_value_string@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1165 <csvdata_value_long+0x45>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1176 <csvdata_value_long+0x56>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <trans_long@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csvdata_value_long>:
push   %rbx
mov    %rcx,%rbx
xor    %ecx,%ecx
call   1040 <csvdata_value_string@plt>
test   %rax,%rax
je     113c <csvdata_value_long+0x1c>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <trans_long@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.csvdata = type { i32 }
define i64 @csvdata_value_long(%struct.csvdata* %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i64
%6 = alloca %struct.csvdata*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i8*
store %struct.csvdata* %0, %struct.csvdata** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i64 %3, i64* %9
%11 = load %struct.csvdata*, %struct.csvdata** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i8* @csvdata_value_string(%struct.csvdata* %11, i32 %12, i32 %13, i8* null)
store i8* %14, i8** %10
%15 = load i8*, i8** %10
%16 = icmp ne i8* %15, null
br i1 %16, label %19, label %17
17: ; preds = %4
%18 = load i64, i64* %9
store i64 %18, i64* %5
br label %23
19: ; preds = %4
%20 = load i8*, i8** %10
%21 = load i64, i64* %9
%22 = call i64 @trans_long(i8* %20, i64 %21)
store i64 %22, i64* %5
br label %23
23: ; preds = %19, %17
%24 = load i64, i64* %5
ret i64 %24
}

LLVM IR (-O2):
%struct.csvdata = type { i32 }
define i64 @csvdata_value_long(%struct.csvdata* %0, i32 %1, i32 %2, i64 %3) {
%5 = tail call i8* @csvdata_value_string(%struct.csvdata* %0, i32 %1, i32 %2, i8* null)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i64 @trans_long(i8* %5, i64 %3)
br label %9
9: ; preds = %4, %7
%10 = phi i64 [ %8, %7 ], [ %3, %4 ]
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ prefix;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int /*<<< orphan*/);
const char *get_prefix(void) {
  static int counter;
  static char prefix[32];
  snprintf(prefix, sizeof(prefix), "%d-", counter++);
  return prefix;
}


x86 assembly (clang, -O0):
<get_prefix>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f26(%rip),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,0x2f1b(%rip)
lea    0x2f24(%rip),%rdi
mov    $0x20,%esi
lea    0xec8(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f0c(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_prefix>:
push   %rbx
mov    0x2f29(%rip),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x2f20(%rip)
lea    0x2f29(%rip),%rbx
lea    0xed2(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_prefix.counter = internal global i32 0
@get_prefix.prefix = internal global [32 x i8] zeroinitializer
@.str = [4 x i8] c"%d-\00"
define i8* @get_prefix() {
%1 = load i32, i32* @get_prefix.counter
%2 = add nsw i32 %1, 1
store i32 %2, i32* @get_prefix.counter
%3 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_prefix.prefix, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_prefix.prefix, i64 0, i64 0)
}

LLVM IR (-O2):
@get_prefix.counter = internal unnamed_addr global i32 0
@get_prefix.prefix = internal global [32 x i8] zeroinitializer
@.str = [4 x i8] c"%d-\00"
define i8* @get_prefix() {
%1 = load i32, i32* @get_prefix.counter
%2 = add nsw i32 %1, 1
store i32 %2, i32* @get_prefix.counter
%3 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_prefix.prefix, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_prefix.prefix, i64 0, i64 0)
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int support_size(int idx) {
  int fail, nbr;
  int *b;
  double *c;
  nbr = idx;
  fail = _ada_use_c2phc4c(586, &nbr, b, c, 0);
  return nbr;
}


x86 assembly (clang, -O0):
<support_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x24a,%edi
lea    -0xc(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<support_size>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x24a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @support_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
store i32 %0, i32* %2
%7 = load i32, i32* %2
store i32 %7, i32* %4
%8 = load i32*, i32** %5
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc4c(i32 586, i32* %4, i32* %8, double* %9, i32 0)
store i32 %10, i32* %3
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @support_size(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 586, i32* %2, i32* undef, double* undef, i32 0)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ uart1_init();
void ulin_init(void) { uart1_init(); }


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

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

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

LLVM IR (-O2):
define void @ulin_init() {
%1 = tail call i32 (...) @uart1_init()
ret void
}
/* Variables and functions */
double M_PI;
double cosf(double);
float hann(float n, float N, float a) {
  (void)a;
  return 0.5 * (1.0 - cosf(2.0 * M_PI * n / (N - 1.0)));
}


x86 assembly (clang, -O0):
<hann>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movsd  0xee1(%rip),%xmm0
mov    0x2eb2(%rip),%rax
mulsd  (%rax),%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeb0(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <cosf@plt>
movsd  0xe9b(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xe87(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hann>:
push   %rax
mov    0x2ed0(%rip),%rax
movsd  (%rax),%xmm2
addsd  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
cvtss2sd %xmm1,%xmm1
addsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <cosf@plt>
movsd  0xec3(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xebf(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define float @hann(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load double, double* @M_PI
%9 = fmul double 2.000000e+00, %8
%10 = load float, float* %4
%11 = fpext float %10 to double
%12 = fmul double %9, %11
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = fsub double %14, 1.000000e+00
%16 = fdiv double %12, %15
%17 = call double @cosf(double %16)
%18 = fsub double 1.000000e+00, %17
%19 = fmul double 5.000000e-01, %18
%20 = fptrunc double %19 to float
ret float %20
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define float @hann(float %0, float %1, float %2) {
%4 = load double, double* @M_PI
%5 = fmul double %4, 2.000000e+00
%6 = fpext float %0 to double
%7 = fmul double %5, %6
%8 = fpext float %1 to double
%9 = fadd double %8, -1.000000e+00
%10 = fdiv double %7, %9
%11 = tail call double @cosf(double %10)
%12 = fsub double 1.000000e+00, %11
%13 = fmul double %12, 5.000000e-01
%14 = fptrunc double %13 to float
ret float %14
}
int sequence_five(int b) { return ((2 * b * b) % 5) + 11 * 5; }


x86 assembly (clang, -O0):
<sequence_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
imul   -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x37,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sequence_five>:
imul   %edi,%edi
add    %edi,%edi
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x37,%eax
ret

LLVM IR (-O0):
define i32 @sequence_five(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = srem i32 %6, 5
%8 = add nsw i32 %7, 55
ret i32 %8
}

LLVM IR (-O2):
define i32 @sequence_five(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = srem i32 %3, 5
%5 = add nsw i32 %4, 55
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int set_process_group(pid_t pid __attribute__((__unused__)),
                      pid_t pgrp __attribute__((__unused__))) {
  return 0;
}


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

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

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

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

/* Variables and functions */
uint32_t int_to_uint(int number) {
  uint32_t byte;
  byte = number & 0xffffffff;
  return byte;
}


x86 assembly (clang, -O0):
<int_to_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @int_to_uint(i32 returned %0) {
ret i32 %0
}
void XkbAllocGeomSectionDoodads() {}


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

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

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

LLVM IR (-O2):
define void @XkbAllocGeomSectionDoodads() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutGetModifiers();
int /*<<< orphan*/ hidMouseMoveEvent(int, int, int /*<<< orphan*/);
void mainMouseMoveEvent(int x, int y) {
  hidMouseMoveEvent(x, y, glutGetModifiers());
}


x86 assembly (clang, -O0):
<mainMouseMoveEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <glutGetModifiers@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
call   1030 <hidMouseMoveEvent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mainMouseMoveEvent>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <glutGetModifiers@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <hidMouseMoveEvent@plt>

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

LLVM IR (-O2):
define void @mainMouseMoveEvent(i32 %0, i32 %1) {
%3 = tail call i32 (...) @glutGetModifiers()
%4 = tail call i32 @hidMouseMoveEvent(i32 %0, i32 %1, i32 %3)
ret void
}
int testExe1lib(void) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  time_t now;
  now = time(NULL);
  fputs(ctime(&now), stdout);
  return 0;
}


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)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <ctime@plt>
mov    %eax,%edi
mov    0x2e7c(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
mov    0x2e93(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <fputs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
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 @time(i32* null)
store i32 %7, i32* %6
%8 = call i32 @ctime(i32* %6)
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call i32 @ctime(i32* %3)
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i32 %6, i32 %7)
ret i32 0
}
int _umh(int i) { return i + 1; }


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

x86 assembly (clang, -O2):
<_umh>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @_umh(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}