xunge/DecIR huggingface dataset:
/* Variables and functions */
int d31(int);
int d32(int a) { return d31(d31(a)); }


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

x86 assembly (clang, -O2):
<d32>:
push   %rax
call   1030 <d31@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d31@plt>

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

LLVM IR (-O2):
define i32 @d32(i32 %0) {
%2 = tail call i32 @d31(i32 %0)
%3 = tail call i32 @d31(i32 %2)
ret i32 %3
}
void CClinkern_flipper_free_world(void) {}


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

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

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

LLVM IR (-O2):
define void @CClinkern_flipper_free_world() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMGET;
int TIOCM_CAR;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
bool serial_get_dcd(int fd) {
  int status;
  ioctl(fd, TIOCMGET, &status);
  return (status & TIOCM_CAR);
}


x86 assembly (clang, -O0):
<serial_get_dcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
mov    0x2eae(%rip),%rcx
and    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_get_dcd>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
and    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCMGET = global i32 0
@TIOCM_CAR = global i32 0
define i32 @serial_get_dcd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @TIOCMGET
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
%7 = load i32, i32* %3
%8 = load i32, i32* @TIOCM_CAR
%9 = and i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
@TIOCMGET = global i32 0
@TIOCM_CAR = global i32 0
define i32 @serial_get_dcd(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCMGET
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* @TIOCM_CAR
%8 = and i32 %7, %6
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ pong_main();
int main(int argc, char **argv) {
  pong_main();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pong_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Welcome to Abncoin Repository");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Welcome to Abncoin Repository\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Welcome to Abncoin Repository\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mtig_test();
void *mtig_thread(void *arg) {
  (void)arg;
  mtig_test();
  return 0;
}


x86 assembly (clang, -O0):
<mtig_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <mtig_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @mtig_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @mtig_test()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @mtig_thread(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @mtig_test()
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ crc16(int /*<<< orphan*/ *, int, int, int);
uint16_t crc16ccitt_xmodem(uint8_t *message, int nBytes) {
  return crc16(message, nBytes, 0x0000, 0x1021);
}


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

x86 assembly (clang, -O2):
<crc16ccitt_xmodem>:
xor    %edx,%edx
mov    $0x1021,%ecx
jmp    1030 <crc16@plt>

LLVM IR (-O0):
define i32 @crc16ccitt_xmodem(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 @crc16(i32* %5, i32 %6, i32 0, i32 4129)
ret i32 %7
}

LLVM IR (-O2):
define i32 @crc16ccitt_xmodem(i32* %0, i32 %1) {
%3 = tail call i32 @crc16(i32* %0, i32 %1, i32 0, i32 4129)
ret i32 %3
}
void *__attribute__((no)) test4a(char *p) {
  void *temp;
  temp = __builtin_return_address(1);
  return temp;
}


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

x86 assembly (clang, -O2):
<test4a>:
push   %rbp
mov    %rsp,%rbp
mov    0x0(%rbp),%rax
mov    0x8(%rax),%rax
pop    %rbp
ret

LLVM IR (-O0):
define i8* @test4a(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @llvm.returnaddress(i32 1)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
ret i8* %5
}

LLVM IR (-O2):
define i8* @test4a(i8* nocapture readnone %0) {
%2 = tail call i8* @llvm.returnaddress(i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ sincos_x86_fpu(float, double *, double *);
float stupid_sincosf_x86_fpu(float x) {
  double s, c;
  sincos_x86_fpu(x, &s, &c);
  return (float)(s + c);
}


x86 assembly (clang, -O0):
<stupid_sincosf_x86_fpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <sincos_x86_fpu@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stupid_sincosf_x86_fpu>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <sincos_x86_fpu@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @stupid_sincosf_x86_fpu(float %0) {
%2 = alloca float
%3 = alloca double
%4 = alloca double
store float %0, float* %2
%5 = load float, float* %2
%6 = call i32 @sincos_x86_fpu(float %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fadd double %7, %8
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
define float @stupid_sincosf_x86_fpu(float %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 @sincos_x86_fpu(float %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fadd double %7, %8
%10 = fptrunc double %9 to float
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ Rf_error(char *, char const *);
__attribute__((noreturn)) void r_never_reached(const char *fn) {
  Rf_error("Internal error in `%s()`: Reached the unreachable.", fn);
}


x86 assembly (clang, -O0):
<r_never_reached>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <Rf_error@plt>

x86 assembly (clang, -O2):
<r_never_reached>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <Rf_error@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"Internal error in `%s()`: Reached the unreachable.\00"
define void @r_never_reached(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Rf_error(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %3)
unreachable
}

LLVM IR (-O2):
@.str = [51 x i8] c"Internal error in `%s()`: Reached the unreachable.\00"
define void @r_never_reached(i8* %0) {
%2 = tail call i32 @Rf_error(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
unreachable
}
unsigned hash(char *s) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++)
    hashval = *s + 31 * hashval;
  return hashval % 10;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1140 <hash+0x40>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
mov    $0xcccccccd,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    %edx,%edx
lea    (%rdx,%rdx,4),%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 10
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
int test() {
  int i, j, k;
  i = 0;
  while (i++ < 10)
    ;
  if (i != 11)
    return 1;
  j = 1, k = 0;
  do {
    j *= 2;
    k++;
  } while (j < 65536);
  if (k != 16)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0xa,%eax
jge    1124 <test+0x24>
jmp    110b <test+0xb>
cmpl   $0xb,-0x8(%rbp)
je     113a <test+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1184 <test+0x84>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x10000,-0xc(%rbp)
jl     1148 <test+0x48>
cmpl   $0x10,-0x10(%rbp)
je     117d <test+0x7d>
movl   $0x2,-0x4(%rbp)
jmp    1184 <test+0x84>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %2
br label %5
5: ; preds = %9, %0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = icmp slt i32 %6, 10
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 11
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 1, i32* %1
br label %28
14: ; preds = %10
store i32 1, i32* %3
store i32 0, i32* %4
br label %15
15: ; preds = %20, %14
%16 = load i32, i32* %3
%17 = mul nsw i32 %16, 2
store i32 %17, i32* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %20
20: ; preds = %15
%21 = load i32, i32* %3
%22 = icmp slt i32 %21, 65536
br i1 %22, label %15, label %23
23: ; preds = %20
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 16
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 2, i32* %1
br label %28
27: ; preds = %23
store i32 0, i32* %1
br label %28
28: ; preds = %27, %26, %13
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
define i32 @test() {
ret i32 0
}
int function_y() { return 5; }


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

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

LLVM IR (-O0):
define i32 @function_y() {
ret i32 5
}

LLVM IR (-O2):
define i32 @function_y() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ printDateTimeFormat();
int /*<<< orphan*/ printLanguageResolvers();
int /*<<< orphan*/ printNumberFormat();
int /*<<< orphan*/ printTextInfo();
void printDefinition(void) {
  printDateTimeFormat();
  printNumberFormat();
  printLanguageResolvers();
  printTextInfo();
}


x86 assembly (clang, -O0):
<printDefinition>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <printDateTimeFormat@plt>
mov    $0x0,%al
call   1060 <printNumberFormat@plt>
mov    $0x0,%al
call   1050 <printLanguageResolvers@plt>
mov    $0x0,%al
call   1030 <printTextInfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDefinition>:
push   %rax
xor    %eax,%eax
call   1040 <printDateTimeFormat@plt>
xor    %eax,%eax
call   1060 <printNumberFormat@plt>
xor    %eax,%eax
call   1050 <printLanguageResolvers@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <printTextInfo@plt>

LLVM IR (-O0):
define void @printDefinition() {
%1 = call i32 (...) @printDateTimeFormat()
%2 = call i32 (...) @printNumberFormat()
%3 = call i32 (...) @printLanguageResolvers()
%4 = call i32 (...) @printTextInfo()
ret void
}

LLVM IR (-O2):
define void @printDefinition() {
%1 = tail call i32 (...) @printDateTimeFormat()
%2 = tail call i32 (...) @printNumberFormat()
%3 = tail call i32 (...) @printLanguageResolvers()
%4 = tail call i32 (...) @printTextInfo()
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int ioctl(int, int, void *);
int xioctl(int fd, int request, void *arg) {
  int ret;
  do {
    ret = ioctl(fd, request, arg);
  } while (ret == -1 && errno == EINTR);
  return ret;
}


x86 assembly (clang, -O0):
<xioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jne    115d <xioctl+0x4d>
mov    0x2e96(%rip),%rax
mov    (%rax),%rax
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1122 <xioctl+0x12>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xioctl>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2eba(%rip),%r15
mov    0x2eab(%rip),%r12
nopl   (%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    114a <xioctl+0x3a>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <xioctl+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @xioctl(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 @ioctl(i32 %9, i32 %10, i8* %11)
store i32 %12, i32* %7
br label %13
13: ; preds = %8
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i64, i64* @errno
%18 = load i64, i64* @EINTR
%19 = icmp eq i64 %17, %18
br label %20
20: ; preds = %16, %13
%21 = phi i1 [ false, %13 ], [ %19, %16 ]
br i1 %21, label %8, label %22
22: ; preds = %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @xioctl(i32 %0, i32 %1, i8* %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @ioctl(i32 %0, i32 %1, i8* %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
/* Variables and functions */
size_t __fs_MIN(size_t a, size_t b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}


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

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

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

LLVM IR (-O2):
define i64 @__fs_MIN(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void glmMatrixFromVectors2dT(double m[4], const double v1[2],
                             const double v2[2]) {
  m[0] = v1[0];
  m[2] = v1[1];
  m[1] = v2[0];
  m[3] = v2[1];
}


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

x86 assembly (clang, -O2):
<glmMatrixFromVectors2dT>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x18(%rdi)
ret

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

LLVM IR (-O2):
define void @glmMatrixFromVectors2dT(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
store double %4, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %0, i64 2
store double %6, double* %7
%8 = load double, double* %2
%9 = getelementptr inbounds double, double* %0, i64 1
store double %8, double* %9
%10 = getelementptr inbounds double, double* %2, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %0, i64 3
store double %11, double* %12
ret void
}
/* Variables and functions */
scalar_t__ COND_EQ();
int /*<<< orphan*/ EA_AY_PI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_seq_8_pi(void) {
  m68ki_write_8(EA_AY_PI_8(), COND_EQ() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_seq_8_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_PI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_EQ@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_seq_8_pi>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_PI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_EQ@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_seq_8_pi() {
%1 = call i32 (...) @EA_AY_PI_8()
%2 = call i64 (...) @COND_EQ()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_seq_8_pi() {
%1 = tail call i32 (...) @EA_AY_PI_8()
%2 = tail call i64 (...) @COND_EQ()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void print_float(int a) { printf("%f\n", (float)a); }


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

x86 assembly (clang, -O2):
<print_float>:
cvtsi2ss %edi,%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @print_float(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to float
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %4)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @print_float(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ifc_close();
int /*<<< orphan*/ ifc_init();
int ifc_up(char const *);
int ifc_enable(const char *ifname) {
  int result;
  ifc_init();
  result = ifc_up(ifname);
  ifc_close();
  return result;
}


x86 assembly (clang, -O0):
<ifc_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <ifc_init@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ifc_up@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <ifc_close@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ifc_enable>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <ifc_init@plt>
mov    %rbx,%rdi
call   1030 <ifc_up@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <ifc_close@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ifc_enable(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @ifc_init()
%5 = load i8*, i8** %2
%6 = call i32 @ifc_up(i8* %5)
store i32 %6, i32* %3
%7 = call i32 (...) @ifc_close()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @ifc_enable(i8* %0) {
%2 = tail call i32 (...) @ifc_init()
%3 = tail call i32 @ifc_up(i8* %0)
%4 = tail call i32 (...) @ifc_close()
ret i32 %3
}
void __assert(const char *func, const char *file, int line, const char *exp) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<__assert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
jmp    1113 <__assert+0x13>

x86 assembly (clang, -O2):
<__assert>:
jmp    1100 <__assert>

LLVM IR (-O0):
define void @__assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
br label %9
9: ; preds = %9, %4
br label %9
}

LLVM IR (-O2):
define void @__assert(i8* nocapture %0, i8* nocapture %1, i32 %2, i8* nocapture %3) {
br label %5
5: ; preds = %5, %4
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ computeDpll();
int /*<<< orphan*/ init();
int /*<<< orphan*/ systemInit();
int main(void) {
  systemInit();
  init();
  for (;;) {
    computeDpll();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <systemInit@plt>
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <computeDpll@plt>
jmp    114d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <systemInit@plt>
xor    %eax,%eax
call   1040 <init@plt>
nop
xor    %eax,%eax
call   1050 <computeDpll@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @systemInit()
%3 = call i32 (...) @init()
br label %4
4: ; preds = %4, %0
%5 = call i32 (...) @computeDpll()
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @systemInit()
%2 = tail call i32 (...) @init()
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @computeDpll()
br label %3
}
int main() {
  volatile int a, c;
  __asm__ __volatile__("mov $0xAABBCCDD, %%eax\n\t"
                       "mov $0x11223344, %%ecx\n\t"
                       "xor %%edx, %%edx\n\t"
                       "xor %%ebx, %%ebx\n\t"
                       "mov $0xab, %%dh\n\t"
                       "mov $0x23, %%bh\n\t"
                       "mov $-1, %%esi\n\t"
                       "mov $0x22334455, %%edi\n\t"
                       "movzx %%dh, %%eax\n\t"
                       "movzx %%bh, %%ecx\n\t"
                       "mov %%eax, %0\n\t"
                       "mov %%ecx, %1\n\t"
                       : "=m"(a), "=m"(c)
                       :
                       : "eax", "ecx", "ebx", "edx", "esi", "edi");
  do {
    if (!(a == 0xab))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  do {
    if (!(c == 0x23))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  asm volatile(".byte 0xd6" : : "a"(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
mov    $0xaabbccdd,%eax
mov    $0x11223344,%ecx
xor    %edx,%edx
xor    %ebx,%ebx
mov    $0xab,%dh
mov    $0x23,%bh
mov    $0xffffffff,%esi
mov    $0x22334455,%edi
movzbl %dh,%eax
movzbl %bh,%ecx
mov    %eax,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    $0xab,%eax
je     1148 <main+0x48>
mov    $0x1,%eax
(bad)
jmp    114d <main+0x4d>
jmp    1152 <main+0x52>
mov    -0x14(%rbp),%eax
cmp    $0x23,%eax
je     1164 <main+0x64>
mov    $0x1,%eax
(bad)
jmp    1169 <main+0x69>
xor    %eax,%eax
(bad)
xor    %eax,%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xaabbccdd,%eax
mov    $0x11223344,%ecx
xor    %edx,%edx
xor    %ebx,%ebx
mov    $0xab,%dh
mov    $0x23,%bh
mov    $0xffffffff,%esi
mov    $0x22334455,%edi
movzbl %dh,%eax
movzbl %bh,%ecx
mov    %eax,-0x4(%rsp)
mov    %ecx,-0x8(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0xab,%eax
je     113c <main+0x3c>
mov    $0x1,%eax
(bad)
mov    -0x8(%rsp),%eax
cmp    $0x23,%eax
je     114b <main+0x4b>
mov    $0x1,%eax
(bad)
xor    %eax,%eax
(bad)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %0
%5 = load volatile i32, i32* %2
%6 = icmp eq i32 %5, 171
br i1 %6, label %8, label %7
7: ; preds = %4
br label %8
8: ; preds = %7, %4
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
%11 = load volatile i32, i32* %3
%12 = icmp eq i32 %11, 35
br i1 %12, label %14, label %13
13: ; preds = %10
br label %14
14: ; preds = %13, %10
br label %15
15: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = load volatile i32, i32* %1
%6 = icmp eq i32 %5, 171
br i1 %6, label %8, label %7
7: ; preds = %0
br label %8
8: ; preds = %0, %7
%9 = load volatile i32, i32* %2
%10 = icmp eq i32 %9, 35
br i1 %10, label %12, label %11
11: ; preds = %8
br label %12
12: ; preds = %11, %8
ret i32 0
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double log1p(double);
double pop(struct lifo *);
double opr_log1p(struct lifo *stack) {
  double op = pop(stack);
  return log1p(op);
}


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

x86 assembly (clang, -O2):
<opr_log1p>:
push   %rax
call   1030 <pop@plt>
pop    %rax
jmp    1040 <log1p@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_log1p(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @log1p(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_log1p(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @log1p(double %2)
ret double %3
}
/* Type definitions */
typedef int int32_t;

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


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, unsigned int);
void KeccakP1600_OverwriteBytes(void *state, const unsigned char *data,
                                unsigned int offset, unsigned int length) {
  assert(offset < 200);
  assert(offset + length <= 200);
  memcpy((unsigned char *)state + offset, data, length);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0xc8,-0x14(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    $0xc8,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %rsi,%r15
mov    %rdi,%r12
xor    %edi,%edi
cmp    $0xc8,%edx
setb   %dil
call   1030 <assert@plt>
lea    (%r14,%rbx,1),%eax
xor    %edi,%edi
cmp    $0xc9,%eax
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
add    %rax,%r12
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define void @KeccakP1600_OverwriteBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = icmp ult i32 %9, 200
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add i32 %13, %14
%16 = icmp ule i32 %15, 200
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %5
%20 = load i32, i32* %7
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8*, i8** %6
%24 = load i32, i32* %8
%25 = call i32 @memcpy(i8* %22, i8* %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @KeccakP1600_OverwriteBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %2, 200
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = add i32 %3, %2
%9 = icmp ult i32 %8, 201
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = zext i32 %2 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = tail call i32 @memcpy(i8* %13, i8* %1, i32 %3)
ret void
}
unsigned char *getXmitBuffer(void) { return (0); }


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

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

LLVM IR (-O0):
define i8* @getXmitBuffer() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @getXmitBuffer() {
ret i8* null
}
float LightingFuncGGX_D(float dotNH, float roughness) {
  float alpha = roughness * roughness;
  float alphaSqr = alpha * alpha;
  float pi = 3.14159f;
  float denom = dotNH * dotNH * (alphaSqr - 1.0) + 1.0f;
  float D = alphaSqr / (pi * denom * denom);
  return D;
}


x86 assembly (clang, -O0):
<LightingFuncGGX_D>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xed4(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xea8(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<LightingFuncGGX_D>:
mulss  %xmm1,%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm2
addsd  0xee4(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xee0(%rip),%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  0xed9(%rip),%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
divss  %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @LightingFuncGGX_D(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %3
store float %1, float* %4
%10 = load float, float* %4
%11 = load float, float* %4
%12 = fmul float %10, %11
store float %12, float* %5
%13 = load float, float* %5
%14 = load float, float* %5
%15 = fmul float %13, %14
store float %15, float* %6
store float 0x400921FA00000000, float* %7
%16 = load float, float* %3
%17 = load float, float* %3
%18 = fmul float %16, %17
%19 = fpext float %18 to double
%20 = load float, float* %6
%21 = fpext float %20 to double
%22 = fsub double %21, 1.000000e+00
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double 1.000000e+00)
%24 = fptrunc double %23 to float
store float %24, float* %8
%25 = load float, float* %6
%26 = load float, float* %7
%27 = load float, float* %8
%28 = fmul float %26, %27
%29 = load float, float* %8
%30 = fmul float %28, %29
%31 = fdiv float %25, %30
store float %31, float* %9
%32 = load float, float* %9
ret float %32
}

LLVM IR (-O2):
define float @LightingFuncGGX_D(float %0, float %1) {
%3 = fmul float %1, %1
%4 = fmul float %3, %3
%5 = fmul float %0, %0
%6 = fpext float %5 to double
%7 = fpext float %4 to double
%8 = fadd double %7, -1.000000e+00
%9 = tail call double @llvm.fmuladd.f64(double %6, double %8, double 1.000000e+00)
%10 = fptrunc double %9 to float
%11 = fmul float %10, 0x400921FA00000000
%12 = fmul float %11, %10
%13 = fdiv float %4, %12
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_GetBlueVideoBlackLevel(void *,
                                                                        int);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPRenderingControl_GetBlueVideoBlackLevel(void *upnptoken,
                                                 unsigned int InstanceID) {
  printf("Invoke: UPnPRenderingControl_GetBlueVideoBlackLevel(%u);\r\n",
         InstanceID);
  UPnPResponse_RenderingControl_GetBlueVideoBlackLevel(upnptoken, 250);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_GetBlueVideoBlackLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0xfa,%esi
call   1040 <UPnPResponse_RenderingControl_GetBlueVideoBlackLevel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_GetBlueVideoBlackLevel>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfa,%esi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_GetBlueVideoBlackLevel@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Invoke: UPnPRenderingControl_GetBlueVideoBlackLevel(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetBlueVideoBlackLevel(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 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_RenderingControl_GetBlueVideoBlackLevel(i8* %7, i32 250)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Invoke: UPnPRenderingControl_GetBlueVideoBlackLevel(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetBlueVideoBlackLevel(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_RenderingControl_GetBlueVideoBlackLevel(i8* %0, i32 250)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_quaddobl_initialize(int n) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(319, &n, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @syspool_quaddobl_initialize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 319, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long nitems;
};
typedef TYPE_1__ XTextProperty;

/* Variables and functions */
void set_XTextProperty_nitems(void *_p, unsigned long _v) {
  ((XTextProperty *)_p)->nitems = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XTextProperty_nitems(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %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 i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XTextProperty_nitems(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
double getAverage(int *, int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  int balance[5] = {1000, 2, 3, 17, 50};
  double avg;
  avg = getAverage(balance, 5);
  printf("Average  value is : %f\n", avg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1030 <getAverage@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <getAverage@plt>
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.balance = [5 x i32] [i32 1000, i32 2, i32 3, i32 17, i32 50]
@.str = [24 x i8] c"Average value is : %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca double
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call double @getAverage(i32* %5, i32 5)
store double %6, double* %3
%7 = load double, double* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.balance = [5 x i32] [i32 1000, i32 2, i32 3, i32 17, i32 50]
@.str = [24 x i8] c"Average value is : %f\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call double @getAverage(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
int execute_getcwd() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getcwd() {
ret i32 0
}
void orcConfigure(unsigned int enable) {
  (*((volatile unsigned int *const)(0x40010500))) = enable;
}


x86 assembly (clang, -O0):
<orcConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x40010500,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<orcConfigure>:
mov    %edi,0x40010500
ret

LLVM IR (-O0):
define void @orcConfigure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1073808640 to i32*)
ret void
}

LLVM IR (-O2):
define void @orcConfigure(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1073808640 to i32*)
ret void
}
main() {
  void display(char[]);
  char message[] = {"Vaction is near"};
  display(message);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <display@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <display@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.message = [16 x i8] c"Vaction is near\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
store i32 0, i32* %1
%3 = bitcast [16 x i8]* %2 to i8*
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
ret i32 0
}

LLVM IR (-O2):
@__const.main.message = [16 x i8] c"Vaction is near\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
ret i32 0
}
int a_swap(volatile int *x, int v) {
  int old;
  do
    old = *x;
  while (((int (*)(int, int, volatile int *))0xffff0fc0)(old, v, x));
  return old;
}


x86 assembly (clang, -O0):
<a_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    $0xffff0fc0,%eax
call   *%rax
cmp    $0x0,%eax
jne    110f <a_swap+0xf>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_swap>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0xffff0fc0,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx),%ebp
mov    %ebp,%edi
mov    %r14d,%esi
mov    %rbx,%rdx
call   *%r15
test   %eax,%eax
jne    1120 <a_swap+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @a_swap(i32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = load volatile i32, i32* %0
%5 = tail call i32 inttoptr (i64 4294905792 to i32 (i32, i32, i32*)*)(i32 %4, i32 %1, i32* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret i32 %4
}