xunge/DecIR huggingface dataset:
void foo(void) { printf("%s\n", __FUNCTION__); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

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

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

LLVM IR (-O2):
@__FUNCTION__.foo = [4 x i8] c"foo\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.foo, i64 0, i64 0))
ret void
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setPercussionFirst(struct b_tonegen *, int);
void setPercHarmonicFromMIDI(void *d, unsigned char u) {
  struct b_tonegen *t = (struct b_tonegen *)d;
  setPercussionFirst(t, u < 64 ? 0 : 1);
}


x86 assembly (clang, -O0):
<setPercHarmonicFromMIDI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
movzbl -0x9(%rbp),%ecx
mov    $0x1,%esi
xor    %eax,%eax
cmp    $0x40,%ecx
cmovl  %eax,%esi
call   1030 <setPercussionFirst@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPercHarmonicFromMIDI>:
xor    %eax,%eax
cmp    $0x40,%sil
setae  %al
mov    %eax,%esi
jmp    1030 <setPercussionFirst@plt>

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setPercHarmonicFromMIDI(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca %struct.b_tonegen*
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.b_tonegen*
store %struct.b_tonegen* %7, %struct.b_tonegen** %5
%8 = load %struct.b_tonegen*, %struct.b_tonegen** %5
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = icmp slt i32 %10, 64
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 1
%14 = call i32 @setPercussionFirst(%struct.b_tonegen* %8, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setPercHarmonicFromMIDI(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_tonegen*
%4 = icmp ugt i8 %1, 63
%5 = zext i1 %4 to i32
%6 = tail call i32 @setPercussionFirst(%struct.b_tonegen* %3, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ starMemInitPrivate(int /*<<< orphan*/);
scalar_t__ starMemIsInitialised();
void starMemInitFort() {
  if (starMemIsInitialised())
    return;
  starMemInitPrivate(0);
}


x86 assembly (clang, -O0):
<starMemInitFort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <starMemIsInitialised@plt>
cmp    $0x0,%rax
je     113a <starMemInitFort+0x1a>
jmp    1141 <starMemInitFort+0x21>
xor    %edi,%edi
call   1030 <starMemInitPrivate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<starMemInitFort>:
push   %rax
xor    %eax,%eax
call   1040 <starMemIsInitialised@plt>
test   %rax,%rax
je     112f <starMemInitFort+0xf>
pop    %rax
ret
xor    %edi,%edi
pop    %rax
jmp    1030 <starMemInitPrivate@plt>

LLVM IR (-O0):
define void @starMemInitFort() {
%1 = call i64 (...) @starMemIsInitialised()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %6
4: ; preds = %0
%5 = call i32 @starMemInitPrivate(i32 0)
br label %6
6: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
define void @starMemInitFort() {
%1 = tail call i64 (...) @starMemIsInitialised()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @starMemInitPrivate(i32 0)
br label %5
5: ; preds = %0, %3
ret void
}
/* Variables and functions */
double merc_lat(double);
double geohashGetYWGS84(double y) { return merc_lat(y); }


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

x86 assembly (clang, -O2):
<geohashGetYWGS84>:
jmp    1030 <merc_lat@plt>

LLVM IR (-O0):
define double @geohashGetYWGS84(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @merc_lat(double %3)
ret double %4
}

LLVM IR (-O2):
define double @geohashGetYWGS84(double %0) {
%2 = tail call double @merc_lat(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ vecNf_scalarDiv_new(float *, float const *, float const,
                                       int);
void vec3f_scalarDiv_new(float result[3], const float v[3],
                         const float scalar) {
  vecNf_scalarDiv_new(result, v, scalar, 3);
}


x86 assembly (clang, -O0):
<vec3f_scalarDiv_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
mov    $0x3,%edx
call   1030 <vecNf_scalarDiv_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3f_scalarDiv_new>:
mov    $0x3,%edx
jmp    1030 <vecNf_scalarDiv_new@plt>

LLVM IR (-O0):
define void @vec3f_scalarDiv_new(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = load float, float* %6
%10 = call i32 @vecNf_scalarDiv_new(float* %7, float* %8, float %9, i32 3)
ret void
}

LLVM IR (-O2):
define void @vec3f_scalarDiv_new(float* %0, float* %1, float %2) {
%4 = tail call i32 @vecNf_scalarDiv_new(float* %0, float* %1, float %2, i32 3)
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void DDI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ui32RegOffset = 0x00000080;
  (*((volatile unsigned long *)(ui32Base + ui32RegOffset + ui32Reg))) = ui32Val;
}


x86 assembly (clang, -O0):
<DDI32BitsSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x80,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DDI32BitsSet>:
mov    %rdx,0x80(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @DDI32BitsSet(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i64 128, i64* %7
%8 = load i64, i64* %6
%9 = load i64, i64* %4
%10 = load i64, i64* %7
%11 = add i64 %9, %10
%12 = load i64, i64* %5
%13 = add i64 %11, %12
%14 = inttoptr i64 %13 to i64*
store volatile i64 %8, i64* %14
ret void
}

LLVM IR (-O2):
define void @DDI32BitsSet(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 128
%5 = add i64 %4, %1
%6 = inttoptr i64 %5 to i64*
store volatile i64 %2, i64* %6
ret void
}
/* Variables and functions */
unsigned long parse_unit(char *);
unsigned long strtoul(char const *, char **, int);
unsigned long parse_long(const char *arg) {
  unsigned long ret;
  char *end;
  ret = strtoul(arg, &end, 10);
  ret *= parse_unit(end);
  return ret;
}


x86 assembly (clang, -O0):
<parse_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <parse_unit@plt>
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_long>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rdi
call   1030 <parse_unit@plt>
imul   %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @parse_long(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtoul(i8* %5, i8** %4, i32 10)
store i64 %6, i64* %3
%7 = load i8*, i8** %4
%8 = call i64 @parse_unit(i8* %7)
%9 = load i64, i64* %3
%10 = mul i64 %9, %8
store i64 %10, i64* %3
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
define i64 @parse_long(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtoul(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = tail call i64 @parse_unit(i8* %5)
%7 = mul i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int M_PI;
double normalizeAngle(double ang) {
  double result = ang;
  if (ang > 2 * M_PI) {
    ang = (ang - 2 * M_PI);
  } else if (ang < 0.0) {
    ang = (2 * M_PI - ang);
  }
  return result;
}


x86 assembly (clang, -O0):
<normalizeAngle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1155 <normalizeAngle+0x55>
movsd  -0x8(%rbp),%xmm0
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1182 <normalizeAngle+0x82>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    117d <normalizeAngle+0x7d>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1182 <normalizeAngle+0x82>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
@M_PI = global i32 0
define double @normalizeAngle(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %2
%6 = load i32, i32* @M_PI
%7 = mul nsw i32 2, %6
%8 = sitofp i32 %7 to double
%9 = fcmp ogt double %5, %8
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load double, double* %2
%12 = load i32, i32* @M_PI
%13 = mul nsw i32 2, %12
%14 = sitofp i32 %13 to double
%15 = fsub double %11, %14
store double %15, double* %2
br label %26
16: ; preds = %1
%17 = load double, double* %2
%18 = fcmp olt double %17, 0.000000e+00
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i32, i32* @M_PI
%21 = mul nsw i32 2, %20
%22 = sitofp i32 %21 to double
%23 = load double, double* %2
%24 = fsub double %22, %23
store double %24, double* %2
br label %25
25: ; preds = %19, %16
br label %26
26: ; preds = %25, %10
%27 = load double, double* %3
ret double %27
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @normalizeAngle(double returned %0) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *mem;
  if (!size)
    return (NULL);
  if (!(mem = malloc(size)))
    return (NULL);
  ft_bzero(mem, size);
  return (mem);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <ft_memalloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    117d <ft_memalloc+0x5d>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1168 <ft_memalloc+0x48>
movq   $0x0,-0x8(%rbp)
jmp    117d <ft_memalloc+0x5d>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1146 <ft_memalloc+0x26>
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1146 <ft_memalloc+0x26>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <ft_bzero@plt>
jmp    1149 <ft_memalloc+0x29>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @ft_bzero(i8* %4, i64 %0)
br label %8
8: ; preds = %3, %1, %6
%9 = phi i8* [ %4, %6 ], [ null, %1 ], [ null, %3 ]
ret i8* %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
unsigned long get_XExposeEvent_serial(void *_p) {
  return (unsigned long)((XExposeEvent *)_p)->serial;
}


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

x86 assembly (clang, -O2):
<get_XExposeEvent_serial>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XExposeEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ B9600;
int /*<<< orphan*/ CS8;
scalar_t__ logitech_command(int, char *);
int /*<<< orphan*/ setline(int, int /*<<< orphan*/, int /*<<< orphan*/);
int mzp_init(int fd, unsigned long *id, unsigned long *extra) {
  if (logitech_command(fd, "*X*q"))
    return -1;
  setline(fd, CS8, B9600);
  return 0;
}


x86 assembly (clang, -O0):
<mzp_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
lea    0xec3(%rip),%rsi
call   1030 <logitech_command@plt>
cmp    $0x0,%rax
je     1158 <mzp_init+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <mzp_init+0x59>
mov    -0x8(%rbp),%edi
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
mov    0x2e7d(%rip),%rax
mov    (%rax),%edx
call   1040 <setline@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mzp_init>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
call   1030 <logitech_command@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     113e <mzp_init+0x1e>
pop    %rbx
ret
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
call   1040 <setline@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"*X*q\00"
@CS8 = global i32 0
@B9600 = global i32 0
define i32 @mzp_init(i32 %0, i64* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64*
%7 = alloca i64*
store i32 %0, i32* %5
store i64* %1, i64** %6
store i64* %2, i64** %7
%8 = load i32, i32* %5
%9 = call i64 @logitech_command(i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 -1, i32* %4
br label %17
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load i32, i32* @CS8
%15 = load i32, i32* @B9600
%16 = call i32 @setline(i32 %13, i32 %14, i32 %15)
store i32 0, i32* %4
br label %17
17: ; preds = %12, %11
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@.str = [5 x i8] c"*X*q\00"
@CS8 = global i32 0
@B9600 = global i32 0
define i32 @mzp_init(i32 %0, i64* nocapture readnone %1, i64* nocapture readnone %2) {
%4 = tail call i64 @logitech_command(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @CS8
%8 = load i32, i32* @B9600
%9 = tail call i32 @setline(i32 %0, i32 %7, i32 %8)
br label %10
10: ; preds = %3, %6
%11 = phi i32 [ 0, %6 ], [ -1, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ trap_CIN_DrawCinematic(int);
int /*<<< orphan*/ trap_CIN_SetExtents(int, float, float, float, float);
void CG_DrawCinematic(int handle, float x, float y, float w, float h) {
  trap_CIN_SetExtents(handle, x, y, w, h);
  trap_CIN_DrawCinematic(handle);
}


x86 assembly (clang, -O0):
<CG_DrawCinematic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
mov    -0x4(%rbp),%edi
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
call   1040 <trap_CIN_SetExtents@plt>
mov    -0x4(%rbp),%edi
call   1030 <trap_CIN_DrawCinematic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_DrawCinematic>:
push   %rbx
mov    %edi,%ebx
call   1040 <trap_CIN_SetExtents@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <trap_CIN_DrawCinematic@plt>

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

LLVM IR (-O2):
define void @CG_DrawCinematic(i32 %0, float %1, float %2, float %3, float %4) {
%6 = tail call i32 @trap_CIN_SetExtents(i32 %0, float %1, float %2, float %3, float %4)
%7 = tail call i32 @trap_CIN_DrawCinematic(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void FMC_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @FMC_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @FMC_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x;
  for (x = 0; x <= 100; x++) {
    printf("%d\n", x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 101
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void NativeStringToVoid(const char *s) {}


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

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

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

LLVM IR (-O2):
define void @NativeStringToVoid(i8* nocapture %0) {
ret void
}
double DMIN(double a, double b) { return (a < b ? a : b); }


x86 assembly (clang, -O0):
<DMIN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <DMIN+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <DMIN+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<DMIN>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @DMIN(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 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @DMIN(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
struct _tuple0 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_my_qvar_cmp(struct _tuple0 *, struct _tuple0 *);
int Cyc_Absyn_q_cmp(struct _tuple0 *q1, struct _tuple0 *q2) {
  return ({ Cyc_Absyn_my_qvar_cmp(q1, q2); }) == 0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_q_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Cyc_Absyn_my_qvar_cmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_q_cmp>:
push   %rax
call   1030 <Cyc_Absyn_my_qvar_cmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct._tuple0 = type { i32 }
define i32 @Cyc_Absyn_q_cmp(%struct._tuple0* %0, %struct._tuple0* %1) {
%3 = alloca %struct._tuple0*
%4 = alloca %struct._tuple0*
%5 = alloca i32
store %struct._tuple0* %0, %struct._tuple0** %3
store %struct._tuple0* %1, %struct._tuple0** %4
%6 = load %struct._tuple0*, %struct._tuple0** %3
%7 = load %struct._tuple0*, %struct._tuple0** %4
%8 = call i32 @Cyc_Absyn_my_qvar_cmp(%struct._tuple0* %6, %struct._tuple0* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct._tuple0 = type { i32 }
define i32 @Cyc_Absyn_q_cmp(%struct._tuple0* %0, %struct._tuple0* %1) {
%3 = tail call i32 @Cyc_Absyn_my_qvar_cmp(%struct._tuple0* %0, %struct._tuple0* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int func2() {
#pragma critTer : 6 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 7 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func2() {
ret i32 0
}
void BN_add_word(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_add_word() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_8x30X() { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_8x30X() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ testFunction();
int main(void) {
  testFunction();
  puts("Hellow World!");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <testFunction@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hellow World!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @testFunction()
%3 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hellow World!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @testFunction()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ create_sigpipe();
int /*<<< orphan*/ fork();
pid_t myfork(void) {
  pid_t pid;
  if ((pid = fork()) == 0)
    create_sigpipe();
  return (pid);
}


x86 assembly (clang, -O0):
<myfork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jne    1142 <myfork+0x22>
mov    $0x0,%al
call   1030 <create_sigpipe@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfork>:
push   %rbx
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1135 <myfork+0x15>
xor    %eax,%eax
call   1030 <create_sigpipe@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @myfork() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @create_sigpipe()
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @myfork() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @create_sigpipe()
br label %5
5: ; preds = %3, %0
ret i32 %1
}
/* Type definitions */
struct stack_with_min {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct stack_with_min *);
void free_stack(struct stack_with_min *s) { free(s); }


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

x86 assembly (clang, -O2):
<free_stack>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.stack_with_min = type { i32 }
define void @free_stack(%struct.stack_with_min* %0) {
%2 = alloca %struct.stack_with_min*
store %struct.stack_with_min* %0, %struct.stack_with_min** %2
%3 = load %struct.stack_with_min*, %struct.stack_with_min** %2
%4 = call i32 @free(%struct.stack_with_min* %3)
ret void
}

LLVM IR (-O2):
%struct.stack_with_min = type { i32 }
define void @free_stack(%struct.stack_with_min* nocapture %0) {
%2 = tail call i32 @free(%struct.stack_with_min* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
long zgettid(void) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<zgettid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zgettid>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i64 @zgettid() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i64 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i64 @zgettid() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "usage: %s <temp> <pe file>\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"usage: %s <temp> <pe file>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"usage: %s <temp> <pe file>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int execvp(char *, char **);
int main(int argc, char *argv[]) { return execvp(argv[1], &argv[1]); }


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

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
add    $0x8,%rsi
jmp    1030 <execvp@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = call i32 @execvp(i8* %8, i8** %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @execvp(i8* %4, i8** %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ frob(int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  printf("i = %d\n", i);
  frob(&i);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"i = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 undef)
%4 = call i32 @frob(i32* %1)
ret i32 0
}
void str_cpy(char *s, char *t) {
  while ((*s++ = *t++) != '\0')
    continue;
}


x86 assembly (clang, -O0):
<str_cpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <str_cpy+0x3f>
jmp    110c <str_cpy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cpy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <str_cpy+0x10>
ret

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

LLVM IR (-O2):
define void @str_cpy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ pyrhash(int /*<<< orphan*/ const *,
                           int /*<<< orphan*/ const *, int);
uint64_t F(uint64_t r, uint64_t R, uint64_t seed) {
  uint64_t buf[2];
  uint64_t key[2];
  key[0] = seed;
  key[1] = seed;
  buf[0] = r;
  buf[1] = R;
  return pyrhash((const uint8_t *)key, (const uint8_t *)buf, sizeof(buf));
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x8,%edx
call   1030 <pyrhash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
sub    $0x18,%rsp
mov    %edx,0x8(%rsp)
mov    %edx,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %esi,0x14(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1030 <pyrhash@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @F(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca [2 x i32]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 %9, i32* %10
%11 = load i32, i32* %6
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
store i32 %11, i32* %12
%13 = load i32, i32* %4
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %5
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %15, i32* %16
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%19 = call i32 @pyrhash(i32* %17, i32* %18, i32 8)
ret i32 %19
}

LLVM IR (-O2):
define i32 @F(i32 %0, i32 %1, i32 %2) {
%4 = alloca [2 x i32]
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %4 to i8*
%7 = bitcast [2 x i32]* %5 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %2, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %9
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %10
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %1, i32* %11
%12 = call i32 @pyrhash(i32* %8, i32* %10, i32 8)
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ t_init_unicode();
int t_set_flags(int);
int /*<<< orphan*/ t_unset_flags(int);
int t_init(int flags) {
  t_init_unicode();
  initscr();
  t_unset_flags(~flags);
  return t_set_flags(flags);
}


x86 assembly (clang, -O0):
<t_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <t_init_unicode@plt>
mov    $0x0,%al
call   1040 <initscr@plt>
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
call   1050 <t_unset_flags@plt>
mov    -0x4(%rbp),%edi
call   1060 <t_set_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_init>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <t_init_unicode@plt>
xor    %eax,%eax
call   1040 <initscr@plt>
mov    %ebx,%edi
not    %edi
call   1050 <t_unset_flags@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <t_set_flags@plt>

LLVM IR (-O0):
define i32 @t_init(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @t_init_unicode()
%4 = call i32 (...) @initscr()
%5 = load i32, i32* %2
%6 = xor i32 %5, -1
%7 = call i32 @t_unset_flags(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @t_set_flags(i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @t_init(i32 %0) {
%2 = tail call i32 (...) @t_init_unicode()
%3 = tail call i32 (...) @initscr()
%4 = xor i32 %0, -1
%5 = tail call i32 @t_unset_flags(i32 %4)
%6 = tail call i32 @t_set_flags(i32 %0)
ret i32 %6
}
printw(fmt, a, b, c, d, e, f, g, h) char *fmt;
{
  char buf[512];
  sprintf(buf, fmt, a, b, c, d, e, f, g, h);
  VPutString(buf);
}


x86 assembly (clang, -O0):
<printw>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x248,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %edx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
lea    -0x230(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x2c(%rbp),%ebx
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x230(%rbp),%rdi
mov    $0x0,%al
call   1030 <VPutString@plt>
mov    -0xc(%rbp),%eax
add    $0x248,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<printw>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %r9d,%r10d
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x220(%rsp),%r11d
mov    0x228(%rsp),%r14d
mov    0x230(%rsp),%r15d
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
push   %r15
push   %r14
push   %r11
push   %r10
call   1040 <sprintf@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <VPutString@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @printw(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca [512 x i8]
store i8* %0, i8** %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
%21 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
%22 = load i8*, i8** %11
%23 = load i32, i32* %12
%24 = load i32, i32* %13
%25 = load i32, i32* %14
%26 = load i32, i32* %15
%27 = load i32, i32* %16
%28 = load i32, i32* %17
%29 = load i32, i32* %18
%30 = load i32, i32* %19
%31 = call i32 (i8*, i8*, ...) @sprintf(i8* %21, i8* %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30)
%32 = getelementptr inbounds [512 x i8], [512 x i8]* %20, i64 0, i64 0
%33 = call i32 (i8*, ...) bitcast (i32 (...)* @VPutString to i32 (i8*, ...)*)(i8* %32)
%34 = load i32, i32* %10
ret i32 %34
}

LLVM IR (-O2):
define i32 @printw(i8* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca [512 x i8]
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%12 = call i32 (i8*, i8*, ...) @sprintf(i8* %11, i8* dereferenceable(1) %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8)
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @VPutString to i32 (i8*, ...)*)(i8* %11)
ret i32 undef
}
void atom_mark(struct object *object) {}


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

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

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

LLVM IR (-O2):
%struct.object = type opaque
define void @atom_mark(%struct.object* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ hd44780_ll_instruction_write(int);
int8_t hd44780_function_set(uint8_t bus_is_8bit, uint8_t display_is_2line,
                            uint8_t display_font_5x11) {
  uint8_t data = 0x20;
  if (bus_is_8bit) {
    data = data | 0x10;
  }
  if (display_is_2line) {
    data = data | 0x08;
  }
  if (display_font_5x11) {
    data = data | 0x04;
  }
  return (hd44780_ll_instruction_write(data));
}


x86 assembly (clang, -O0):
<hd44780_function_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x20,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113b <hd44780_function_set+0x2b>
mov    -0x10(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114e <hd44780_function_set+0x3e>
mov    -0x10(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1161 <hd44780_function_set+0x51>
mov    -0x10(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <hd44780_ll_instruction_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd44780_function_set>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
shl    $0x4,%eax
xor    %ecx,%ecx
test   %esi,%esi
setne  %cl
lea    (%rax,%rcx,8),%eax
xor    %ecx,%ecx
test   %edx,%edx
setne  %cl
lea    (%rax,%rcx,4),%edi
add    $0x20,%edi
jmp    1030 <hd44780_ll_instruction_write@plt>

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

LLVM IR (-O2):
define i32 @hd44780_function_set(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 32, i32 48
%6 = icmp eq i32 %1, 0
%7 = or i32 %5, 8
%8 = select i1 %6, i32 %5, i32 %7
%9 = icmp eq i32 %2, 0
%10 = or i32 %8, 4
%11 = select i1 %9, i32 %8, i32 %10
%12 = tail call i32 @hd44780_ll_instruction_write(i32 %11)
ret i32 %12
}
/* Type definitions */
struct sip_msg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int print_f(struct sip_msg *msg, char *str, char *str2) {
  printf("%s\n", str);
  return 1;
}


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

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

LLVM IR (-O0):
%struct.sip_msg = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define i32 @print_f(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sip_msg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sip_msg* %0, %struct.sip_msg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 1
}

LLVM IR (-O2):
%struct.sip_msg = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define i32 @print_f(%struct.sip_msg* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 1
}
int isoper(int ch) {
  return ch == '`' || ch == '~' || ch == '!' || ch == '@' || ch == '#' ||
         ch == '$';
}


x86 assembly (clang, -O0):
<isoper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x60,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isoper+0x5c>
mov    $0x1,%al
cmpl   $0x7e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isoper+0x5c>
mov    $0x1,%al
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isoper+0x5c>
mov    $0x1,%al
cmpl   $0x40,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isoper+0x5c>
mov    $0x1,%al
cmpl   $0x23,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isoper+0x5c>
cmpl   $0x24,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoper>:
mov    $0x1,%eax
lea    -0x21(%rdi),%ecx
cmp    $0x3f,%ecx
ja     111d <isoper+0x1d>
movabs $0x8000000080000005,%rdx
bt     %rcx,%rdx
jb     1122 <isoper+0x22>
cmp    $0x7e,%edi
jne    1123 <isoper+0x23>
ret
xor    %eax,%eax
cmp    $0x24,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isoper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 96
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 126
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 33
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 64
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 35
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 36
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isoper(i32 %0) {
switch i32 %0, label %2 [
i32 126, label %5
i32 96, label %5
i32 64, label %5
i32 35, label %5
i32 33, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 36
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}