xunge/DecIR huggingface dataset:
double fd2ep(string)
char *string;
{
  double dj;
  dj = fd2jd(string);
  if (dj < 1.0)
    return (dj / 365.2422);
  else
    return (jd2ep(dj));
}


x86 assembly (clang, -O0):
<fd2ep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb8(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    116e <fd2ep+0x4e>
movsd  -0x18(%rbp),%xmm0
movsd  0xea8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1183 <fd2ep+0x63>
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <jd2ep@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd2ep>:
push   %rax
xor    %eax,%eax
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
test   %eax,%eax
jle    1140 <fd2ep+0x20>
mov    $0x1,%al
call   1030 <jd2ep@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret
divsd  0xeb8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fd2ep(i8* %0) {
%2 = alloca double
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %5)
%7 = sitofp i32 %6 to double
store double %7, double* %4
%8 = load double, double* %4
%9 = fcmp olt double %8, 1.000000e+00
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load double, double* %4
%12 = fdiv double %11, 0x4076D3E00D1B7176
store double %12, double* %2
br label %17
13: ; preds = %1
%14 = load double, double* %4
%15 = call i32 (double, ...) bitcast (i32 (...)* @jd2ep to i32 (double, ...)*)(double %14)
%16 = sitofp i32 %15 to double
store double %16, double* %2
br label %17
17: ; preds = %13, %10
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @fd2ep(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = icmp slt i32 %2, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = fdiv double %3, 0x4076D3E00D1B7176
br label %10
7: ; preds = %1
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2ep to i32 (double, ...)*)(double %3)
%9 = sitofp i32 %8 to double
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}
void __attribute__((no)) HEX00_strtabsInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_strtabsInit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;

/* Variables and functions */
uint8_t reg8_read(volatile uint8_t *reg) { return *reg; }


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

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

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

LLVM IR (-O2):
define i32 @reg8_read(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("all done\n");
  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)
lea    0xed3(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"all done\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"all done\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void safe_free(void *buf) {
  if (buf != NULL)
    free(buf);
  return;
}


x86 assembly (clang, -O0):
<safe_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <safe_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_free>:
test   %rdi,%rdi
je     111a <safe_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @safe_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *ticker(void *x_void_ptr) {
  while (42) {
    sleep(1);
    printf("tick\n");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<ticker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    112c <ticker+0xc>

x86 assembly (clang, -O2):
<ticker>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1130 <ticker+0x10>

LLVM IR (-O0):
@.str = [6 x i8] c"tick\0A\00"
define i8* @ticker(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @sleep(i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %3
}

LLVM IR (-O2):
@str = [5 x i8] c"tick\00"
define noalias i8* @ticker(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %2
}
long int foo(void *s) { return 10; }


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

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

LLVM IR (-O0):
define i64 @foo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i64 10
}

LLVM IR (-O2):
define i64 @foo(i8* nocapture readnone %0) {
ret i64 10
}
void session_out(struct servermsg *msg, struct _session *session) {}


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

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

LLVM IR (-O0):
%struct.servermsg = type opaque
%struct._session = type opaque
define void @session_out(%struct.servermsg* %0, %struct._session* %1) {
%3 = alloca %struct.servermsg*
%4 = alloca %struct._session*
store %struct.servermsg* %0, %struct.servermsg** %3
store %struct._session* %1, %struct._session** %4
ret void
}

LLVM IR (-O2):
%struct.servermsg = type opaque
%struct._session = type opaque
define void @session_out(%struct.servermsg* nocapture %0, %struct._session* nocapture %1) {
ret void
}
void changeroute(argc, argv) int argc;
char *argv[];
{
  printf("not supported\n");
  argc = argc;
  argv = argv;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"not supported\00"
define void @changeroute(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
int gcd(int a, int b) {
  int r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <gcd+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(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* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = srem i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
store i32 %13, i32* %3
%14 = load i32, i32* %5
store i32 %14, i32* %4
br label %6
15: ; preds = %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ dmat_mul_brow(double **, double **, double **, double **,
                                 double **, double **, long, double **,
                                 double **);
void dmat_mul_a2(double **ax1, double **ax2, double **b11, double **b12,
                 double **b21, double **b22, long n, double **cx1,
                 double **cx2) {
  dmat_mul_brow(ax1, ax2, b11, b12, b21, b22, n, cx1, cx2);
}


x86 assembly (clang, -O0):
<dmat_mul_a2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <dmat_mul_brow@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmat_mul_a2>:
jmp    1030 <dmat_mul_brow@plt>

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

LLVM IR (-O2):
define void @dmat_mul_a2(double** %0, double** %1, double** %2, double** %3, double** %4, double** %5, i64 %6, double** %7, double** %8) {
%10 = tail call i32 @dmat_mul_brow(double** %0, double** %1, double** %2, double** %3, double** %4, double** %5, i64 %6, double** %7, double** %8)
ret void
}
issymbolic(dir, component) register char *dir, *component;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @issymbolic(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ __printerr(int, char const *, int /*<<< orphan*/);
void vwarn(const char *fmt, va_list ap) { __printerr(1, fmt, ap); }


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

x86 assembly (clang, -O2):
<vwarn>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <__printerr@plt>

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

LLVM IR (-O2):
define void @vwarn(i8* %0, i32 %1) {
%3 = tail call i32 @__printerr(i32 1, i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_packs_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test75(__m64 a, __m64 b) { return _mm_packs_pi16(a, b); }


x86 assembly (clang, -O0):
<test75>:
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_packs_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test75>:
jmp    1030 <_mm_packs_pi16@plt>

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

LLVM IR (-O2):
define i32 @test75(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_packs_pi16(i32 %0, i32 %1)
ret i32 %3
}
void cm_default_free(struct cm_attr *mem __attribute__((unused)),
                     void *ptr __attribute__((unused))) {}


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

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

LLVM IR (-O0):
%struct.cm_attr = type opaque
define void @cm_default_free(%struct.cm_attr* %0, i8* %1) {
%3 = alloca %struct.cm_attr*
%4 = alloca i8*
store %struct.cm_attr* %0, %struct.cm_attr** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.cm_attr = type opaque
define void @cm_default_free(%struct.cm_attr* nocapture %0, i8* nocapture %1) {
ret void
}
void foo244(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo244(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_DFL;
scalar_t__ SIG_ERR;
int /*<<< orphan*/ printf(char *);
scalar_t__ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void sig_quit(int signo) {
  printf("caught SIGQUIT\n");
  if (signal(SIGQUIT, SIG_DFL) == SIG_ERR)
    printf("can't reset SIGQUIT\n");
}


x86 assembly (clang, -O0):
<sig_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e83(%rip),%rcx
cmp    (%rcx),%rax
jne    116a <sig_quit+0x4a>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_quit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
jne    115d <sig_quit+0x3d>
lea    0xeb8(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"caught SIGQUIT\0A\00"
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
@SIG_ERR = global i64 0
@.str.1 = [21 x i8] c"can't reset SIGQUIT\0A\00"
define void @sig_quit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_DFL
%6 = call i64 @signal(i32 %4, i32 %5)
%7 = load i64, i64* @SIG_ERR
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
@SIG_ERR = global i64 0
@str = [15 x i8] c"caught SIGQUIT\00"
@str.2 = [20 x i8] c"can't reset SIGQUIT\00"
define void @sig_quit(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @SIGQUIT
%4 = load i32, i32* @SIG_DFL
%5 = tail call i64 @signal(i32 %3, i32 %4)
%6 = load i64, i64* @SIG_ERR
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local2;
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local2 = 0UL;
      while (local2 < input[1UL]) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 146565199UL) + 0xfd76d96b99e243c4UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%rax
jae    1173 <RandomFunc+0x73>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%rax
jae    1162 <RandomFunc+0x62>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    113f <RandomFunc+0x3f>
mov    -0x28(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
sub    $0x8bc684f,%rcx
movabs $0xfd76d96b99e243c4,%rax
d9 76 fd
add    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movabs $0xfd76d96b908be6ba,%rax
d9 76 fd
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = add i64 %10, -10089659
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %7
br label %13
13: ; preds = %29, %2
%14 = load i64, i64* %7
%15 = load i64*, i64** %3
%16 = getelementptr inbounds i64, i64* %15, i64 1
%17 = load i64, i64* %16
%18 = icmp ult i64 %14, %17
br i1 %18, label %19, label %32
19: ; preds = %13
store i64 0, i64* %6
br label %20
20: ; preds = %26, %19
%21 = load i64, i64* %6
%22 = load i64*, i64** %3
%23 = getelementptr inbounds i64, i64* %22, i64 1
%24 = load i64, i64* %23
%25 = icmp ult i64 %21, %24
br i1 %25, label %26, label %29
26: ; preds = %20
%27 = load i64, i64* %6
%28 = add i64 %27, 2
store i64 %28, i64* %6
br label %20
29: ; preds = %20
%30 = load i64, i64* %7
%31 = add i64 %30, 2
store i64 %31, i64* %7
br label %13
32: ; preds = %13
%33 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%34 = load i64, i64* %33
%35 = sub i64 %34, 146565199
%36 = add i64 %35, -182719678695455804
%37 = load i64*, i64** %4
%38 = getelementptr inbounds i64, i64* %37, i64 0
store i64 %36, i64* %38
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -182719678852110662
store i64 %4, i64* %1
ret void
}
void pintar_posicion(char c, unsigned int x, unsigned int y,
                     unsigned char color) {
  static unsigned short *p;
  p = (unsigned short *)0xb8000 + (80 * y + x);
  *p = (color << 8) | c;
}


x86 assembly (clang, -O0):
<pintar_posicion>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %al,-0xd(%rbp)
imul   $0x50,-0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0xb8000,%eax
shl    $0x1,%rcx
add    %rcx,%rax
mov    %rax,0x2ef5(%rip)
movzbl -0xd(%rbp),%eax
shl    $0x8,%eax
movsbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %ax,%cx
mov    0x2ede(%rip),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pintar_posicion>:
lea    (%rdx,%rdx,4),%eax
shl    $0x4,%eax
add    %esi,%eax
shl    $0x8,%ecx
or     %edi,%ecx
mov    %cx,0xb8000(%rax,%rax,1)
ret

LLVM IR (-O0):
@pintar_posicion.p = internal global i16* null
define void @pintar_posicion(i8 signext %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i8 %0, i8* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load i32, i32* %7
%10 = mul i32 80, %9
%11 = load i32, i32* %6
%12 = add i32 %10, %11
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i16, i16* inttoptr (i64 753664 to i16*), i64 %13
store i16* %14, i16** @pintar_posicion.p
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %5
%19 = sext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i16
%22 = load i16*, i16** @pintar_posicion.p
store i16 %21, i16* %22
ret void
}

LLVM IR (-O2):
define void @pintar_posicion(i8 signext %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = mul i32 %2, 80
%6 = add i32 %5, %1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 753664 to i16*), i64 %7
%9 = zext i8 %3 to i16
%10 = shl nuw i16 %9, 8
%11 = sext i8 %0 to i16
%12 = or i16 %10, %11
store i16 %12, i16* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void op_clr() { puts("CLR"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"CLR\00"
define void @op_clr() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *get_version();
int /*<<< orphan*/ printf(char *, char *);
void show_version(void) { printf("%s\n", get_version()); }


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <get_version@plt>
mov    %rax,%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_version>:
push   %rax
xor    %eax,%eax
call   1040 <get_version@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @show_version() {
%1 = call i8* (...) @get_version()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @show_version() {
%1 = tail call i8* (...) @get_version()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
int getpwnam_r(const char *name, struct passwd *pwd, char *buffer,
               size_t bufsize, struct passwd **result) {
  return 0;
}


x86 assembly (clang, -O0):
<getpwnam_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.passwd = type { i32 }
define i32 @getpwnam_r(i8* %0, %struct.passwd* %1, i8* %2, i64 %3, %struct.passwd** %4) {
%6 = alloca i8*
%7 = alloca %struct.passwd*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca %struct.passwd**
store i8* %0, i8** %6
store %struct.passwd* %1, %struct.passwd** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store %struct.passwd** %4, %struct.passwd*** %10
ret i32 0
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define i32 @getpwnam_r(i8* nocapture readnone %0, %struct.passwd* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, %struct.passwd** nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "aBcDeFgHiJkLmNoPqRsTuVwXyZ", 26);
  write(1, "\n", 1);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x1a,%edx
call   1030 <write@plt>
lea    0xeed(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"aBcDeFgHiJkLmNoPqRsTuVwXyZ\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"aBcDeFgHiJkLmNoPqRsTuVwXyZ\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
int xogray5(int i) {
  register int c = 0xDB;
  switch (i) {
  case 0:
    c = 0x20;
    break;
  case 1:
    c = 0xB0;
    break;
  case 2:
    c = 0xB1;
    break;
  case 3:
    c = 0xB2;
    break;
  case 4:
    c = 0xDB;
    break;
  }
  return c;
}


x86 assembly (clang, -O0):
<xogray5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xdb,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x4,%rax
ja     116a <xogray5+0x6a>
mov    -0x10(%rbp),%rax
lea    0xed6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x20,-0x8(%rbp)
jmp    116a <xogray5+0x6a>
movl   $0xb0,-0x8(%rbp)
jmp    116a <xogray5+0x6a>
movl   $0xb1,-0x8(%rbp)
jmp    116a <xogray5+0x6a>
movl   $0xb2,-0x8(%rbp)
jmp    116a <xogray5+0x6a>
movl   $0xdb,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xogray5>:
mov    $0xdb,%eax
cmp    $0x3,%edi
ja     1117 <xogray5+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @xogray5(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 219, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %10 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
]
5: ; preds = %1
store i32 32, i32* %3
br label %10
6: ; preds = %1
store i32 176, i32* %3
br label %10
7: ; preds = %1
store i32 177, i32* %3
br label %10
8: ; preds = %1
store i32 178, i32* %3
br label %10
9: ; preds = %1
store i32 219, i32* %3
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@switch.table.xogray5 = [4 x i32] [i32 32, i32 176, i32 177, i32 178]
define i32 @xogray5(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.xogray5, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 219, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ __arch_atomic_inc(long *);
void atomic_inc(long int *p) { __arch_atomic_inc(p); }


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

x86 assembly (clang, -O2):
<atomic_inc>:
jmp    1030 <__arch_atomic_inc@plt>

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

LLVM IR (-O2):
define void @atomic_inc(i64* %0) {
%2 = tail call i32 @__arch_atomic_inc(i64* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f9(int /*<<< orphan*/);
void test_transcribed_availability() { f9(0); }


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

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

LLVM IR (-O0):
define void @test_transcribed_availability() {
%1 = call i32 @f9(i32 0)
ret void
}

LLVM IR (-O2):
define void @test_transcribed_availability() {
%1 = tail call i32 @f9(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void listfreeallitems(char **list, int count) {
  int i = 0;
  for (i = 0; i < count; i++) {
    free(list[i]);
    list[i] = NULL;
  }
}


x86 assembly (clang, -O0):
<listfreeallitems>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1168 <listfreeallitems+0x58>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <listfreeallitems+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listfreeallitems>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <listfreeallitems+0x3a>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
movq   $0x0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <listfreeallitems+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @listfreeallitems(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load i8**, i8*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
%16 = call i32 @free(i8* %15)
%17 = load i8**, i8*** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
store i8* null, i8** %20
br label %21
21: ; preds = %10
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @listfreeallitems(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @free(i8* %9)
store i8* null, i8** %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int **);
int main() {
  int b;
  int *c = &b;
  foo(&c);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32* %2, i32** %3
%4 = call i32 @foo(i32** %3)
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*
store i32* %1, i32** %2
%5 = call i32 @foo(i32** %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_yajl_end_array(void *ctx) {
  printf("array close ']'\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"array close ']'\0A\00"
define i32 @test_yajl_end_array(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [16 x i8] c"array close ']'\00"
define i32 @test_yajl_end_array(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void foo_2_1_1_2_2_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_2_2_2_2_2() {
ret void
}
void RTVfsIoStrmFlush(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsIoStrmFlush() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int semget(int /*<<< orphan*/, int, int);
int get_semaphore(key_t id) {
  int semid;
  if ((semid = semget(id, 1, 0666)) == -1) {
    perror("semget failed");
    return -1;
  }
  return semid;
}


x86 assembly (clang, -O0):
<get_semaphore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
mov    $0x1b6,%edx
call   1030 <semget@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    1161 <get_semaphore+0x41>
lea    0xeb0(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <get_semaphore+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_semaphore>:
push   %rbx
mov    $0x1,%esi
mov    $0x1b6,%edx
call   1030 <semget@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     113b <get_semaphore+0x1b>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
jmp    1137 <get_semaphore+0x17>

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

LLVM IR (-O2):
@.str = [14 x i8] c"semget failed\00"
define i32 @get_semaphore(i32 %0) {
%2 = tail call i32 @semget(i32 %0, i32 1, i32 438)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret i32 %2
}
/* Variables and functions */
int ts72xx_model();
int board_is_ts7250(void) { return ts72xx_model() == 0x01; }


x86 assembly (clang, -O0):
<board_is_ts7250>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ts72xx_model@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_is_ts7250>:
push   %rax
xor    %eax,%eax
call   1030 <ts72xx_model@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @board_is_ts7250() {
%1 = call i32 (...) @ts72xx_model()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @board_is_ts7250() {
%1 = tail call i32 (...) @ts72xx_model()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_cmpgt_pi32(__m64 a, __m64 b) { return _mm_cmpgt_pi32(a, b); }


x86 assembly (clang, -O0):
<test_mm_cmpgt_pi32>:
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_cmpgt_pi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_cmpgt_pi32>:
jmp    1030 <_mm_cmpgt_pi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpgt_pi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_pi32(i32 %0, i32 %1)
ret i32 %3
}
long grib_op_lt(long a, long b) { return a < b; }


x86 assembly (clang, -O0):
<grib_op_lt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_lt>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i64 @grib_op_lt(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @grib_op_lt(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLdouble;
typedef int /*<<< orphan*/ GLUquadric;

/* Variables and functions */
int /*<<< orphan*/ gluPartialDisk(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, double, double);
void gluDisk(GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius,
             GLint slices, GLint loops) {
  gluPartialDisk(qobj, innerRadius, outerRadius, slices, loops, 0.0, 360.0);
}


x86 assembly (clang, -O0):
<gluDisk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xorps  %xmm0,%xmm0
movsd  0xebb(%rip),%xmm1
call   1030 <gluPartialDisk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gluDisk>:
movsd  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
jmp    1030 <gluPartialDisk@plt>

LLVM IR (-O0):
define void @gluDisk(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @gluPartialDisk(i32* %11, i32 %12, i32 %13, i32 %14, i32 %15, double 0.000000e+00, double 3.600000e+02)
ret void
}

LLVM IR (-O2):
define void @gluDisk(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @gluPartialDisk(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, double 0.000000e+00, double 3.600000e+02)
ret void
}
/* Variables and functions */
double slc_distance(double const *, double const *, double);
double geo_distance_km(const double *a, const double *b, int k) {
  return slc_distance(a, b, 6371.0);
}


x86 assembly (clang, -O0):
<geo_distance_km>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  0xecd(%rip),%xmm0
call   1030 <slc_distance@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geo_distance_km>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <slc_distance@plt>

LLVM IR (-O0):
define double @geo_distance_km(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = call double @slc_distance(double* %7, double* %8, double 6.371000e+03)
ret double %9
}

LLVM IR (-O2):
define double @geo_distance_km(double* %0, double* %1, i32 %2) {
%4 = tail call double @slc_distance(double* %0, double* %1, double 6.371000e+03)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int;

/* Variables and functions */
int match_pattern_list(char const *, char const *, int /*<<< orphan*/, int);
int match_hostname(const char *host, const char *pattern, u_int len) {
  return match_pattern_list(host, pattern, len, 1);
}


x86 assembly (clang, -O0):
<match_hostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <match_pattern_list@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_hostname>:
mov    $0x1,%ecx
jmp    1030 <match_pattern_list@plt>

LLVM IR (-O0):
define i32 @match_hostname(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @match_pattern_list(i8* %7, i8* %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @match_hostname(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @match_pattern_list(i8* %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
unsigned short ShortToLittleEndian(unsigned short number) {
  unsigned short result;
  *(((char *)&result) + 0) = *(((char *)&number) + 1);
  *(((char *)&result) + 1) = *(((char *)&number) + 0);
  return result;
}


x86 assembly (clang, -O0):
<ShortToLittleEndian>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x4(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShortToLittleEndian>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @ShortToLittleEndian(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = bitcast i16* %2 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = bitcast i16* %3 to i8*
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = bitcast i16* %2 to i8*
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = bitcast i16* %3 to i8*
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i16, i16* %3
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @ShortToLittleEndian(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__4__GeneralIO__clr();
void CC2420TransmitP__CSN__clr(void) { Msp430GpioC__4__GeneralIO__clr(); }


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

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

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

LLVM IR (-O2):
define void @CC2420TransmitP__CSN__clr() {
%1 = tail call i32 (...) @Msp430GpioC__4__GeneralIO__clr()
ret void
}
int SDL_imageFilterNormalizeLinearMMX(unsigned char *Src1, unsigned char *Dest,
                                      int length, int Cmin, int Cmax, int Nmin,
                                      int Nmax) {
  return (0);
}


x86 assembly (clang, -O0):
<SDL_imageFilterNormalizeLinearMMX>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterNormalizeLinearMMX(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterNormalizeLinearMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
ret i32 0
}