xunge/DecIR huggingface dataset:
void vexpress_scc_ctl_snoops(int cluster, int enable) {}


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

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

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

LLVM IR (-O2):
define void @vexpress_scc_ctl_snoops(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
testNegation() { printf("-%d = %d\n", 10, -10); }


x86 assembly (clang, -O0):
<testNegation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0xa,%esi
mov    $0xfffffff6,%edx
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testNegation>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0xfffffff6,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"-%d = %d\0A\00"
define i32 @testNegation() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 10, i32 -10)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [10 x i8] c"-%d = %d\0A\00"
define i32 @testNegation() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 10, i32 -10)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ main();
void __start(void) {
  extern unsigned int _edata, _end;
  unsigned int *p;
  for (p = &_edata; p < &_end; p++)
    *p = 0;
  main();
  while (1)
    ;
}


x86 assembly (clang, -O0):
<__start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ebe(%rip),%rax
cmp    %rax,-0x8(%rbp)
jae    114f <__start+0x3f>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <__start+0x13>
mov    $0x0,%al
call   1030 <main@plt>
jmp    1156 <__start+0x46>

x86 assembly (clang, -O2):
<__start>:
push   %rax
mov    0x2eb0(%rip),%rdi
cmp    0x2eb9(%rip),%rdi
jae    115c <__start+0x3c>
lea    0x4(%rdi),%rax
mov    0x2eac(%rip),%rcx
cmp    %rax,%rcx
cmova  %rcx,%rax
mov    %rdi,%rcx
not    %rcx
lea    (%rcx,%rax,1),%rdx
add    $0x4,%rdx
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
xor    %eax,%eax
call   1040 <main@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
jmp    1170 <__start+0x50>

LLVM IR (-O0):
@_edata = external global i32
@_end = external global i32
define void @__start() {
%1 = alloca i32*
store i32* @_edata, i32** %1
br label %2
2: ; preds = %7, %0
%3 = load i32*, i32** %1
%4 = icmp ult i32* %3, @_end
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32*, i32** %1
store i32 0, i32* %6
br label %7
7: ; preds = %5
%8 = load i32*, i32** %1
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %1
br label %2
10: ; preds = %2
%11 = call i32 (...) @main()
br label %12
12: ; preds = %10, %12
br label %12
}

LLVM IR (-O2):
@_edata = external global i32
@_end = external global i32
define void @__start() {
br i1 icmp ult (i32* @_edata, i32* @_end), label %1, label %5
1: ; preds = %0
%2 = call i64 @llvm.umax.i64(i64 ptrtoint (i32* @_end to i64), i64 add (i64 ptrtoint (i32* @_edata to i64), i64 4))
%3 = add i64 %2, add (i64 xor (i64 ptrtoint (i32* @_edata to i64), i64 -1), i64 4)
%4 = and i64 %3, -4
br label %5
5: ; preds = %1, %0
%6 = tail call i32 (...) @main()
br label %7
7: ; preds = %7, %5
br label %7
}
int c_main(int argc, char **argv) {
  if (0 == argc)
    return 0;
  return argc;
}


x86 assembly (clang, -O0):
<c_main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jne    1122 <c_main+0x22>
movl   $0x0,-0x4(%rbp)
jmp    1128 <c_main+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @c_main(i32 %0, i8** nocapture readnone %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int x, y, z;
  x = 03;
  y = -1;
  z = 01;
  printf("int=%d", x ^ x);
  ;
  z <<= 3;
  printf("int=%d", x);
  ;
  y >>= 3;
  printf("int=%d", y);
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x4(%rbp),%esi
xor    -0x4(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"int=%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 3, i32* %1
store i32 -1, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %1
%5 = load i32, i32* %1
%6 = xor i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
store i32 %9, i32* %3
%10 = load i32, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %2
%13 = ashr i32 %12, 3
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"int=%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
void *a_swap_p(void *volatile *x, void *v) {
  __asm__(".byte 0x67\n\txchg %0, %1"
          : "=r"(v), "=m"(*(void **)x)
          : "0"(v)
          : "memory");
  return v;
}


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

x86 assembly (clang, -O2):
<a_swap_p>:
mov    %rsi,%rax
xchg   %rax,(%edi)
ret

LLVM IR (-O0):
define i8* @a_swap_p(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = call i8* asm ".byte 0x67\0A\09xchg $0, $1", "=r,=*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %5, i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
define i8* @a_swap_p(i8** %0, i8* %1) {
%3 = tail call i8* asm ".byte 0x67\0A\09xchg $0, $1", "=r,=*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %0, i8* %1)
ret i8* %3
}
void brn() {
  asm volatile("popq %%rax\n\t"
               "popq %%rbx\n\t"
               "test %%rax, %%rax\n\t"
               "jz _skipbrn\n\t"
               "jmp *%%rbx\n\t"
               "_skipbrn:\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<brn>:
push   %rbp
mov    %rsp,%rbp
pop    %rax
pop    %rbx
test   %rax,%rax
je     1111 <_skipbrn>
jmp    *%rbx

x86 assembly (clang, -O2):
<brn>:
pop    %rax
pop    %rbx
test   %rax,%rax
je     1109 <_skipbrn>
jmp    *%rbx

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

LLVM IR (-O2):
define void @brn() {
tail call void asm sideeffect "popq %rax\0A\09popq %rbx\0A\09test %rax, %rax\0A\09jz _skipbrn\0A\09jmp *%rbx\0A\09_skipbrn:\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void installCrashHandlers() {}


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

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

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

LLVM IR (-O2):
define void @installCrashHandlers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void simdl_destroy(void *gen) { printf("In simdl_destroy\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"In simdl_destroy\00"
define void @simdl_destroy(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double *getVector(double, double, double);
double *addVector(double *a, double *b) {
  return getVector(a[0] + b[0], a[1] + b[1], a[2] + b[2]);
}


x86 assembly (clang, -O0):
<addVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm2
call   1030 <getVector@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addVector>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
addsd  (%rsi),%xmm0
addsd  0x8(%rsi),%xmm1
movsd  0x10(%rdi),%xmm2
addsd  0x10(%rsi),%xmm2
jmp    1030 <getVector@plt>

LLVM IR (-O0):
define double* @addVector(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fadd double %7, %10
%12 = load double*, double** %3
%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 1
%17 = load double, double* %16
%18 = fadd double %14, %17
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = fadd double %21, %24
%26 = call double* @getVector(double %11, double %18, double %25)
ret double* %26
}

LLVM IR (-O2):
define double* @addVector(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fadd double %3, %4
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fadd double %7, %9
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = fadd double %12, %14
%16 = tail call double* @getVector(double %5, double %10, double %15)
ret double* %16
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_or_si128(__m128i A, __m128i B) { return _mm_or_si128(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_or_si128>:
jmp    1030 <_mm_or_si128@plt>

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

LLVM IR (-O2):
define i32 @test_mm_or_si128(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_or_si128(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void EPIIntErrorClear(unsigned long ulBase, unsigned long ulErrFlags) {
  DEBUG_ASSERT(ulBase == 0x400D0000);
  DEBUG_ASSERT(ulErrFlags < 16);
  (*((volatile unsigned long *)(ulBase + 0x0000021C))) = ulErrFlags;
}


x86 assembly (clang, -O0):
<EPIIntErrorClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x400d0000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x10,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x21c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntErrorClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x400d0000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x10,%r14
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0x21c(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @EPIIntErrorClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074593792
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = icmp ult i64 %9, 16
%11 = zext i1 %10 to i32
%12 = call i32 @DEBUG_ASSERT(i32 %11)
%13 = load i64, i64* %4
%14 = load i64, i64* %3
%15 = add i64 %14, 540
%16 = inttoptr i64 %15 to i64*
store volatile i64 %13, i64* %16
ret void
}

LLVM IR (-O2):
define void @EPIIntErrorClear(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074593792
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = icmp ult i64 %1, 16
%7 = zext i1 %6 to i32
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = add i64 %0, 540
%10 = inttoptr i64 %9 to i64*
store volatile i64 %1, i64* %10
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
volatile uint8_t *port_to_dir_reg(volatile uint8_t *port_reg) {
  return port_reg - 0x01;
}


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

x86 assembly (clang, -O2):
<port_to_dir_reg>:
lea    -0x4(%rdi),%rax
ret

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

LLVM IR (-O2):
define i32* @port_to_dir_reg(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -1
ret i32* %2
}
int test_imm_E8int16_mem(short *val) {
  return ((*val) & (0xE8 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E8int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 232
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
expr(vp) register char ***vp;
{ return (exp0(vp, 0)); }


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

x86 assembly (clang, -O2):
<expr>:
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <exp0@plt>

LLVM IR (-O0):
define i32 @expr(i8*** %0) {
%2 = alloca i8***
store i8*** %0, i8**** %2
%3 = load i8***, i8**** %2
%4 = call i32 (i8***, i32, ...) bitcast (i32 (...)* @exp0 to i32 (i8***, i32, ...)*)(i8*** %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
define i32 @expr(i8*** %0) {
%2 = tail call i32 (i8***, i32, ...) bitcast (i32 (...)* @exp0 to i32 (i8***, i32, ...)*)(i8*** %0, i32 0)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
void set_XConfigureEvent_x(void *_p, int _v) {
  ((XConfigureEvent *)_p)->x = (int)_v;
}


x86 assembly (clang, -O0):
<set_XConfigureEvent_x>:
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_XConfigureEvent_x>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XConfigureEvent_x(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_XConfigureEvent_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  char *pw_name;
};

/* Variables and functions */
TYPE_1__ *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
char *UserName() { return getpwuid(getuid())->pw_name; }


x86 assembly (clang, -O0):
<UserName>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UserName>:
push   %rax
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define i8* @UserName() {
%1 = call i32 (...) @getuid()
%2 = call %struct.TYPE_2__* @getpwuid(i32 %1)
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i32 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i8* }
define i8* @UserName() {
%1 = tail call i32 (...) @getuid()
%2 = tail call %struct.TYPE_2__* @getpwuid(i32 %1)
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i64 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
double get_elapsed(clock_t start, clock_t stop) {
  double elapsed = ((double)(stop - start)) / CLOCKS_PER_SEC;
  return elapsed;
}


x86 assembly (clang, -O0):
<get_elapsed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2ec8(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_elapsed>:
sub    %rdi,%rsi
cvtsi2sd %rsi,%xmm0
mov    0x2ed9(%rip),%rax
divsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @get_elapsed(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca double
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = sitofp i64 %8 to double
%10 = load double, double* @CLOCKS_PER_SEC
%11 = fdiv double %9, %10
store double %11, double* %5
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @get_elapsed(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = sitofp i64 %3 to double
%5 = load double, double* @CLOCKS_PER_SEC
%6 = fdiv double %4, %5
ret double %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EPIIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ASSERT(ui32Base == 0x400D0000);
  ASSERT(ui32IntFlags < 17);
  (*((volatile uint32_t *)(ui32Base + 0x00000210))) |= ui32IntFlags;
}


x86 assembly (clang, -O0):
<EPIIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x400d0000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x11,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x210,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400d0000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x11,%ebx
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
or     %ebx,0x210(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @EPIIntEnable(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 = icmp eq i32 %5, 1074593792
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 17
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 528
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = or i32 %18, %13
store volatile i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @EPIIntEnable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074593792
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp slt i32 %1, 17
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 528
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = or i32 %12, %1
store volatile i32 %13, i32* %11
ret void
}
double MixRatio(double E, double Es) {
  double MixRatio = 621.97 * E / (Es - E);
  return MixRatio;
}


x86 assembly (clang, -O0):
<MixRatio>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MixRatio>:
subsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @MixRatio(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = fmul double 6.219700e+02, %6
%8 = load double, double* %4
%9 = load double, double* %3
%10 = fsub double %8, %9
%11 = fdiv double %7, %10
store double %11, double* %5
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @MixRatio(double %0, double %1) {
%3 = fmul double %0, 6.219700e+02
%4 = fsub double %1, %0
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int g(int, int);
int f(int t, int c) {
  int d = 0;
  int e = 0;
  if (t) {
    d = c + 1;
    e = t;
  } else
    d = 0, e = 0;
  return g(e, d);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114a <f+0x3a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1158 <f+0x48>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
add    $0x1,%esi
test   %edi,%edi
cmove  %edi,%esi
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = add nsw i32 %1, 1
%5 = select i1 %3, i32 0, i32 %4
%6 = tail call i32 @g(i32 %0, i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int nwkGroupSwitch(int /*<<< orphan*/, int);
bool NWK_GroupRemove(uint16_t group) { return nwkGroupSwitch(group, 0xffff); }


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

x86 assembly (clang, -O2):
<NWK_GroupRemove>:
mov    $0xffff,%esi
jmp    1030 <nwkGroupSwitch@plt>

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

LLVM IR (-O2):
define i32 @NWK_GroupRemove(i32 %0) {
%2 = tail call i32 @nwkGroupSwitch(i32 %0, i32 65535)
ret i32 %2
}
int config_CS_ANTICASC(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @config_CS_ANTICASC() {
ret i32 1
}

LLVM IR (-O2):
define i32 @config_CS_ANTICASC() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void __internal_print_message__(const char *level, const char *msg) {
  printf("%s%s\e[0m", level, msg);
}


x86 assembly (clang, -O0):
<__internal_print_message__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__internal_print_message__>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s%s\1B[0m\00"
define void @__internal_print_message__(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s%s\1B[0m\00"
define void @__internal_print_message__(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
int testExample3(void *ptr, double a, double *out) {
  double *b = (double *)ptr;
  *out = *b * a;
  return 0;
}


x86 assembly (clang, -O0):
<testExample3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testExample3>:
mulsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @testExample3(i8* %0, double %1, double* %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store double %1, double* %5
store double* %2, double** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %7
%10 = load double*, double** %7
%11 = load double, double* %10
%12 = load double, double* %5
%13 = fmul double %11, %12
%14 = load double*, double** %6
store double %13, double* %14
ret i32 0
}

LLVM IR (-O2):
define i32 @testExample3(i8* nocapture %0, double %1, double* nocapture writeonly %2) {
%4 = bitcast i8* %0 to double*
%5 = load double, double* %4
%6 = fmul double %5, %1
store double %6, double* %2
ret i32 0
}
int is_hexdigit(char c) {
  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') ||
         (c >= 'A' && c <= 'F');
}


x86 assembly (clang, -O0):
<is_hexdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <is_hexdigit+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    116d <is_hexdigit+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1148 <is_hexdigit+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    116d <is_hexdigit+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <is_hexdigit+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hexdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_hexdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_hexdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void tty_clear(void *ui) {
  FILE *tty = ui;
  fprintf(tty, "clear: \r\n");
}


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

x86 assembly (clang, -O2):
<tty_clear>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"clear: \0D\0A\00"
define void @tty_clear(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"clear: \0D\0A\00"
define void @tty_clear(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 9, i64 1, i32* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  }
  fprintf(stream, "Usage: %s [syscall]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [21 x i8] c"Usage: %s [syscall]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [21 x i8] c"Usage: %s [syscall]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ al_string_cat(char *, char *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int, int, int);
void al_ansi_escape_color(char *dest, int maxlen, int fg, int bg, int style) {
  char buf[48] = {0};
  snprintf(buf, 48, "\\[\\e[0;38;5;%d;48;5;%d;%dm\\]", fg, bg, style);
  al_string_cat(dest, buf, maxlen);
}


x86 assembly (clang, -O0):
<al_ansi_escape_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    $0x30,%esi
lea    0xe8c(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <al_string_cat@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<al_ansi_escape_color>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%ebp
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xeb3(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x30,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <al_string_cat@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\\[\\e[0;38;5;%d;48;5;%d;%dm\\]\00"
define void @al_ansi_escape_color(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [48 x i8]
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = bitcast [48 x i8]* %11 to i8*
%13 = getelementptr inbounds [48 x i8], [48 x i8]* %11, i64 0, i64 0
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @snprintf(i8* %13, i32 48, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16)
%18 = load i8*, i8** %6
%19 = getelementptr inbounds [48 x i8], [48 x i8]* %11, i64 0, i64 0
%20 = load i32, i32* %7
%21 = call i32 @al_string_cat(i8* %18, i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"\\[\\e[0;38;5;%d;48;5;%d;%dm\\]\00"
define void @al_ansi_escape_color(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [48 x i8]
%7 = getelementptr inbounds [48 x i8], [48 x i8]* %6, i64 0, i64 0
%8 = call i32 @snprintf(i8* %7, i32 48, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
%9 = call i32 @al_string_cat(i8* %0, i8* %7, i32 %1)
ret void
}
void RTDirFlush(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDirFlush() {
ret void
}
/* Variables and functions */
double randmtzig_exprnd();
double exp_rand(void) { return randmtzig_exprnd(); }


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

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

LLVM IR (-O0):
define double @exp_rand() {
%1 = call double (...) @randmtzig_exprnd()
ret double %1
}

LLVM IR (-O2):
define double @exp_rand() {
%1 = tail call double (...) @randmtzig_exprnd()
ret double %1
}
float population_reproduction_function(float normalised_score) {
  return normalised_score * normalised_score;
}


x86 assembly (clang, -O0):
<population_reproduction_function>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<population_reproduction_function>:
mulss  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define float @population_reproduction_function(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: whois [-aAbfgiIklmPQrRS] [-c country-code | -h hostname] "
          "[-p port] name ...\n");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [84 x i8] c"usage: whois [-aAbfgiIklmPQrRS] [-c country-code | -h hostname] [-p port] name ...\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [84 x i8] c"usage: whois [-aAbfgiIklmPQrRS] [-c country-code | -h hostname] [-p port] name ...\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
void default_handler(const char *format, va_list ap) {}


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

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

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

LLVM IR (-O2):
define void @default_handler(i8* nocapture %0, i32 %1) {
ret void
}
int main() {
  int sum = 0;
  if (0 && sum++) {
    sum += 2;
  }
  if (1 && 2 && 3 && 4 && 5) {
    sum += 4;
  }
  if (5 && 4 && 3 && 0) {
    sum += 8;
  }
  if (!sum && !sum) {
    sum += 16;
  }
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1138 <main+0x38>
cmpl   $0x0,-0x8(%rbp)
jne    1138 <main+0x38>
mov    -0x8(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
void gtk_icon_view_get_columns() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_view_get_columns() {
ret void
}
/* Variables and functions */
char *my_strcat(unsigned char *, unsigned char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, unsigned char *);
int main(void) {
  unsigned char a[1000];
  unsigned char b[1000];
  scanf("%s", a);
  scanf("%s", b);
  printf("%s", my_strcat(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x7e0(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1040 <my_strcat@plt>
mov    %rax,%rsi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x7e0,%rsp
lea    0xebd(%rip),%r15
lea    0x3f0(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <my_strcat@plt>
mov    %r15,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = call i8* @my_strcat(i8* %3, i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _rdtscp();
int /*<<< orphan*/ _sync_tsc();
uint64_t bench_end(void) {
  uint64_t t = _rdtscp();
  _sync_tsc();
  return t;
}


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

x86 assembly (clang, -O2):
<bench_end>:
push   %rbx
xor    %eax,%eax
call   1040 <_rdtscp@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <_sync_tsc@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @bench_end() {
%1 = tail call i32 (...) @_rdtscp()
%2 = tail call i32 (...) @_sync_tsc()
ret i32 %1
}