xunge/DecIR huggingface dataset:
void glmMultVectorByScalar3d(double v[3], double a) {
  v[0] *= a;
  v[1] *= a;
  v[2] *= a;
}


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

x86 assembly (clang, -O2):
<glmMultVectorByScalar3d>:
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movupd %xmm2,(%rdi)
mulsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @glmMultVectorByScalar3d(double* nocapture %0, double %1) {
%3 = bitcast double* %0 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%7 = fmul <2 x double> %4, %6
%8 = bitcast double* %0 to <2 x double>*
store <2 x double> %7, <2 x double>* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fmul double %10, %1
store double %11, double* %9
ret void
}
void INT_Excep_SCI3_TEI3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI3_TEI3() {
ret void
}
/* Variables and functions */
unsigned long pack_to_align(unsigned long, unsigned int);
void pack_next(unsigned long *poffset, unsigned long *after_space, unsigned sz,
               unsigned align) {
  unsigned long offset = pack_to_align(*poffset, align);
  if (after_space)
    *after_space = offset;
  offset += sz;
  *poffset = offset;
}


x86 assembly (clang, -O0):
<pack_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%esi
call   1030 <pack_to_align@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114f <pack_next+0x3f>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_next>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    %ecx,%esi
call   1030 <pack_to_align@plt>
test   %rbp,%rbp
je     1130 <pack_next+0x20>
mov    %rax,0x0(%rbp)
mov    %r14d,%ecx
add    %rcx,%rax
mov    %rax,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @pack_next(i64* nocapture %0, i64* writeonly %1, i32 %2, i32 %3) {
%5 = load i64, i64* %0
%6 = tail call i64 @pack_to_align(i64 %5, i32 %3)
%7 = icmp eq i64* %1, null
br i1 %7, label %9, label %8
8: ; preds = %4
store i64 %6, i64* %1
br label %9
9: ; preds = %8, %4
%10 = zext i32 %2 to i64
%11 = add i64 %6, %10
store i64 %11, i64* %0
ret void
}
void highlight_mask(void) {}


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

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

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

LLVM IR (-O2):
define void @highlight_mask() {
ret void
}
void glVertexAttrib3f(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glVertexAttrib3f() {
ret void
}
void debug_etd_allocated(struct imx21 *imx21) {}


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

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

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

LLVM IR (-O2):
%struct.imx21 = type opaque
define void @debug_etd_allocated(%struct.imx21* nocapture %0) {
ret void
}
void dump_node(struct bst_node *node, unsigned level) {}


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

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

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

LLVM IR (-O2):
%struct.bst_node = type opaque
define void @dump_node(%struct.bst_node* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ proof_uint();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ test_sse();
int main() {
  proof_uint();
  puts("proof OK");
  test_sse();
  puts("SSE test passed");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <proof_uint@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <test_sse@plt>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"proof OK\00"
@.str.1 = [16 x i8] c"SSE test passed\00"
define i32 @main() {
%1 = call i32 (...) @proof_uint()
%2 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_sse()
%4 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"proof OK\00"
@.str.1 = [16 x i8] c"SSE test passed\00"
define i32 @main() {
%1 = tail call i32 (...) @proof_uint()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @test_sse()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
unsigned xrop3_218_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S & D;
  stk3 = ~stk3;
  stk2 = T & stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_218_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_218_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %edi,%edx
not    %edx
and    %ecx,%edx
xor    $0xff,%edx
not    %eax
and    %edx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_218_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %5
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %10
%27 = xor i32 %26, -1
store i32 %27, i32* %10
%28 = load i32, i32* %7
%29 = load i32, i32* %10
%30 = and i32 %28, %29
store i32 %30, i32* %9
%31 = load i32, i32* %5
%32 = load i32, i32* %9
%33 = xor i32 %31, %32
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = load i32, i32* %6
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @xrop3_218_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %3, -1
%8 = and i32 %6, %7
%9 = xor i32 %8, 255
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int null_is_track_audio(uint8_t id, uint32_t pos, int ismsf) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @null_is_track_audio(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
_Bool Long__GT_(long x, long y) { return x > y; }


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

x86 assembly (clang, -O2):
<Long__GT_>:
cmp    %rsi,%rdi
setg   %al
ret

LLVM IR (-O0):
define zeroext i1 @Long__GT_(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 sgt i64 %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @Long__GT_(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
ret i1 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void AESIntUnregister(uint32_t ui32Base) {
  ;
  IntDisable(111);
  IntUnregister(111);
}


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

x86 assembly (clang, -O2):
<AESIntUnregister>:
push   %rax
mov    $0x6f,%edi
call   1030 <IntDisable@plt>
mov    $0x6f,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @AESIntUnregister(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @IntDisable(i32 111)
%4 = call i32 @IntUnregister(i32 111)
ret void
}

LLVM IR (-O2):
define void @AESIntUnregister(i32 %0) {
%2 = tail call i32 @IntDisable(i32 111)
%3 = tail call i32 @IntUnregister(i32 111)
ret void
}
int __attribute__((weak)) _getpid(void) { return 1; }


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

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

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

LLVM IR (-O2):
define weak i32 @_getpid() {
ret i32 1
}
int last(int a, int b) { return b; }


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

x86 assembly (clang, -O2):
<last>:
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @last(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
float distancia(int *, int *);
int clayde(int ghost[3], int pac[3]) {
  int t[2];
  float d;
  d = distancia(ghost, pac);
  if (d > 8) {
    t[0] = pac[0];
    t[1] = pac[1];
  } else {
    t[0] = 22;
    t[1] = 0;
  }
}


x86 assembly (clang, -O0):
<clayde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <distancia@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xec1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1160 <clayde+0x50>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x1c(%rbp)
jmp    116e <clayde+0x5e>
movl   $0x16,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clayde>:
jmp    1030 <distancia@plt>

LLVM IR (-O0):
define i32 @clayde(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca [2 x i32]
%7 = alloca float
store i32* %0, i32** %4
store i32* %1, i32** %5
%8 = load i32*, i32** %4
%9 = load i32*, i32** %5
%10 = call float @distancia(i32* %8, i32* %9)
store float %10, float* %7
%11 = load float, float* %7
%12 = fcmp ogt float %11, 8.000000e+00
br i1 %12, label %13, label %22
13: ; preds = %2
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %16, i32* %17
%18 = load i32*, i32** %5
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* %19
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %20, i32* %21
br label %25
22: ; preds = %2
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 22, i32* %23
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 0, i32* %24
br label %25
25: ; preds = %22, %13
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @clayde(i32* %0, i32* %1) {
%3 = tail call float @distancia(i32* %0, i32* %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int foobar1(int x) {
  printf("I have been invoked!!!! x=%d\n", x * 2);
  return x;
}


x86 assembly (clang, -O0):
<foobar1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foobar1>:
push   %rbx
mov    %edi,%ebx
lea    (%rbx,%rbx,1),%esi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"I have been invoked!!!! x=%d\0A\00"
define i32 @foobar1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [30 x i8] c"I have been invoked!!!! x=%d\0A\00"
define i32 @foobar1(i32 returned %0) {
%2 = shl nsw i32 %0, 1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %0
}
/* Variables and functions */
int ls_costN_nm3_f0(double const **, double **, int *, double *, int);
int ls_costN_nm3(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return ls_costN_nm3_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<ls_costN_nm3>:
jmp    1030 <ls_costN_nm3_f0@plt>

LLVM IR (-O0):
define i32 @ls_costN_nm3(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @ls_costN_nm3_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @ls_costN_nm3(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @ls_costN_nm3_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int num;
  num = 27;
  printf("The number is %d\n", num);
  num = 83;
  printf("The number is now %d\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1b,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x53,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xecc(%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
mov    $0x1b,%esi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x53,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The number is %d\0A\00"
@.str.1 = [22 x i8] c"The number is now %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 27, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 83, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The number is %d\0A\00"
@.str.1 = [22 x i8] c"The number is now %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 27)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 83)
ret i32 0
}
void do_manual(void) {}


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

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

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

LLVM IR (-O2):
define void @do_manual() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_cursor() { printf("\e[?25h"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25h\00"
define void @show_cursor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25h\00"
define void @show_cursor() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
char get_r_func(int inst) { return ((inst & 0x0000003F)); }


x86 assembly (clang, -O0):
<get_r_func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_r_func>:
mov    %edi,%eax
and    $0x3f,%al
ret

LLVM IR (-O0):
define signext i8 @get_r_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 63
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @get_r_func(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = and i8 %2, 63
ret i8 %3
}
int test_imm_38uint16_mem(unsigned short *val) {
  return ((*val) & (0x38 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_38uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 56
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int filaAvance(int j) {
  if (j == 1) {
    return 1;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<filaAvance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <filaAvance+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <filaAvance+0x24>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<filaAvance>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @filaAvance(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
int test_imm_1Cint32_reg(int val) { return ((val) & (0x1C << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_1Cint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x1c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Cint32_reg>:
test   $0x1c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Cint32_reg(i32 %0) {
%2 = and i32 %0, 28
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cygwin32_getnetbyname(char *);
int /*<<< orphan*/ getnetbyname(char *);
main() {
  cygwin32_getnetbyname("");
  getnetbyname("");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <cygwin32_getnetbyname@plt>
mov    %rbx,%rdi
call   1030 <getnetbyname@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = call i32 @cygwin32_getnetbyname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @getnetbyname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @cygwin32_getnetbyname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @getnetbyname(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned int);
void ZeroMemory(void *addr, unsigned int size) { memset(addr, 0, size); }


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

x86 assembly (clang, -O2):
<ZeroMemory>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @ZeroMemory(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 @memset(i8* %5, i32 0, i32 %6)
ret void
}

LLVM IR (-O2):
define void @ZeroMemory(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
double bp_sw_state_occupancy_from_Probability(double p) { return 1 / (1 - p); }


x86 assembly (clang, -O0):
<bp_sw_state_occupancy_from_Probability>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xee2(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp_sw_state_occupancy_from_Probability>:
movsd  0xef8(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bp_sw_state_occupancy_from_Probability(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = fdiv double 1.000000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @bp_sw_state_occupancy_from_Probability(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fdiv double 1.000000e+00, %2
ret double %3
}
const char *get_lame_os_bitness(void) {
  static const char *const strXX = "";
  static const char *const str32 = "32bits";
  static const char *const str64 = "64bits";
  switch (sizeof(void *)) {
  case 4:
    return str32;
    break;
  case 8:
    return str64;
    break;
  default:
    return strXX;
  }
}


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

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

LLVM IR (-O0):
@get_lame_os_bitness.strXX = internal constant i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0)
@.str = [1 x i8] zeroinitializer
@get_lame_os_bitness.str32 = internal constant i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0)
@.str.1 = [7 x i8] c"32bits\00"
@get_lame_os_bitness.str64 = internal constant i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)
@.str.2 = [7 x i8] c"64bits\00"
define i8* @get_lame_os_bitness() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"64bits\00"
define i8* @get_lame_os_bitness() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void sprint_anl_to_direct(char *str, uint8_t direct) {
  sprintf(str,
          "ANL   "
          "0x%02X"
          ", A                   ",
          direct);
}


x86 assembly (clang, -O0):
<sprint_anl_to_direct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_anl_to_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"ANL 0x%02X, A \00"
define void @sprint_anl_to_direct(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 @sprintf(i8* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"ANL 0x%02X, A \00"
define void @sprint_anl_to_direct(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int SIGN(int a) { return (a < 0 ? -1 : 1); }


x86 assembly (clang, -O0):
<SIGN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGN>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @SIGN(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_surface {
  int dummy;
};
struct wl_shell_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, struct wl_surface *,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
void wl_shell_surface_set_transient(struct wl_shell_surface *wl_shell_surface,
                                    struct wl_surface *parent, int32_t x,
                                    int32_t y, uint32_t flags) {
  wl_proxy_marshal((struct wl_proxy *)wl_shell_surface, 4, parent, x, y, flags);
}


x86 assembly (clang, -O0):
<wl_shell_surface_set_transient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    $0x4,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_shell_surface_set_transient>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x4,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_shell_surface = type { i32 }
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_transient(%struct.wl_shell_surface* %0, %struct.wl_surface* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.wl_shell_surface*
%7 = alloca %struct.wl_surface*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.wl_shell_surface* %0, %struct.wl_shell_surface** %6
store %struct.wl_surface* %1, %struct.wl_surface** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.wl_shell_surface*, %struct.wl_shell_surface** %6
%12 = bitcast %struct.wl_shell_surface* %11 to %struct.wl_proxy*
%13 = load %struct.wl_surface*, %struct.wl_surface** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %12, i32 4, %struct.wl_surface* %13, i32 %14, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.wl_shell_surface = type { i32 }
%struct.wl_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_transient(%struct.wl_shell_surface* %0, %struct.wl_surface* %1, i32 %2, i32 %3, i32 %4) {
%6 = bitcast %struct.wl_shell_surface* %0 to %struct.wl_proxy*
%7 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %6, i32 4, %struct.wl_surface* %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_TSTP(int /*<<< orphan*/);
int gen_TSTP(void) {
  handle_TSTP(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @gen_TSTP() {
%1 = call i32 @handle_TSTP(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_TSTP() {
%1 = tail call i32 @handle_TSTP(i32 0)
ret i32 0
}
int soundio_int_max(int a, int b) { return (a >= b) ? a : b; }


x86 assembly (clang, -O0):
<soundio_int_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1121 <soundio_int_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <soundio_int_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<soundio_int_max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @soundio_int_max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freex(void *p) { free(p); }


x86 assembly (clang, -O0):
<freex>:
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):
<freex>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freex(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void dd_pbl_ios_adx_handle_url(void *url) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_adx_handle_url(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t enbyte(uint32_t x) { return x & 0x000000ff; }


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

x86 assembly (clang, -O2):
<enbyte>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @enbyte(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ init_display();
int /*<<< orphan*/ init_socket();
int /*<<< orphan*/ init_sprite_engine();
int /*<<< orphan*/ process_commands();
int /*<<< orphan*/ render();
int /*<<< orphan*/ usleep(int);
int main(void) {
  init_display();
  init_socket();
  init_sprite_engine();
  for (;;) {
    usleep(16666);
    process_commands();
    render();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <init_display@plt>
mov    $0x0,%al
call   1060 <init_socket@plt>
mov    $0x0,%al
call   1050 <init_sprite_engine@plt>
mov    $0x411a,%edi
call   1080 <usleep@plt>
mov    $0x0,%al
call   1070 <process_commands@plt>
mov    $0x0,%al
call   1030 <render@plt>
jmp    1184 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_display@plt>
xor    %eax,%eax
call   1060 <init_socket@plt>
xor    %eax,%eax
call   1050 <init_sprite_engine@plt>
cs nopw 0x0(%rax,%rax,1)
mov    $0x411a,%edi
call   1080 <usleep@plt>
xor    %eax,%eax
call   1070 <process_commands@plt>
xor    %eax,%eax
call   1030 <render@plt>
jmp    1180 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @init_display()
%3 = call i32 (...) @init_socket()
%4 = call i32 (...) @init_sprite_engine()
br label %5
5: ; preds = %5, %0
%6 = call i32 @usleep(i32 16666)
%7 = call i32 (...) @process_commands()
%8 = call i32 (...) @render()
br label %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init_display()
%2 = tail call i32 (...) @init_socket()
%3 = tail call i32 (...) @init_sprite_engine()
br label %4
4: ; preds = %4, %0
%5 = tail call i32 @usleep(i32 16666)
%6 = tail call i32 (...) @process_commands()
%7 = tail call i32 (...) @render()
br label %4
}
int fahr_to_celsius(int fahr) { return (5.0 / 9.0) * (fahr - 32.0); }


x86 assembly (clang, -O0):
<fahr_to_celsius>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xef4(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr_to_celsius>:
cvtsi2sd %edi,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @fahr_to_celsius(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double 0x3FE1C71C71C71C72, %5
%7 = fptosi double %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @fahr_to_celsius(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_usage(int);
int /*<<< orphan*/ printf(char *, int);
void exit_unknown_opt(int opt, int exit_code) {
  printf("Unknown option: %c\n", opt);
  print_usage(exit_code);
}


x86 assembly (clang, -O0):
<exit_unknown_opt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_usage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exit_unknown_opt>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <print_usage@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Unknown option: %c\0A\00"
define void @exit_unknown_opt(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 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @print_usage(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Unknown option: %c\0A\00"
define void @exit_unknown_opt(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @print_usage(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ unlock(char *);
quit() {
  unlock("/usr/spool/infoserv/queuelock");
  unlock("/usr/spool/infoserv/batchlock");
  unlock("/usr/spool/infoserv/loglock");
  exit(-1);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <unlock@plt>
lea    0xee7(%rip),%rdi
call   1030 <unlock@plt>
lea    0xef9(%rip),%rdi
call   1030 <unlock@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <unlock@plt>
lea    0xeea(%rip),%rdi
call   1030 <unlock@plt>
lea    0xefc(%rip),%rdi
call   1030 <unlock@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"/usr/spool/infoserv/queuelock\00"
@.str.1 = [30 x i8] c"/usr/spool/infoserv/batchlock\00"
@.str.2 = [28 x i8] c"/usr/spool/infoserv/loglock\00"
define i32 @quit() {
%1 = call i32 @unlock(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @unlock(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @unlock(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"/usr/spool/infoserv/queuelock\00"
@.str.1 = [30 x i8] c"/usr/spool/infoserv/batchlock\00"
@.str.2 = [28 x i8] c"/usr/spool/infoserv/loglock\00"
define i32 @quit() {
%1 = tail call i32 @unlock(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @unlock(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @unlock(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int rand();
int random_test(double proba) {
  return (rand() % 100000000) < (proba * 100000000);
}


x86 assembly (clang, -O0):
<random_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x5f5e100,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm1
movsd  0xec8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_test>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x55e63b89,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x39,%rcx
add    %edx,%ecx
imul   $0x5f5e100,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
mulsd  0xeb1(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random_test(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 100000000
%5 = sitofp i32 %4 to double
%6 = load double, double* %2
%7 = fmul double %6, 1.000000e+08
%8 = fcmp olt double %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @random_test(double %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 100000000
%4 = sitofp i32 %3 to double
%5 = fmul double %0, 1.000000e+08
%6 = fcmp ogt double %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ lmalloc_oom(size_t);
void *malloc(size_t);
void *lmalloc(size_t size) {
  void *ptr = malloc(size);
  if (!ptr) {
    ptr = malloc(size);
    if (!ptr)
      lmalloc_oom(size);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<lmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <lmalloc+0x4a>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <lmalloc+0x45>
mov    -0x8(%rbp),%rdi
call   1030 <lmalloc_oom@plt>
jmp    116a <lmalloc+0x4a>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1130 <lmalloc+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
jne    112e <lmalloc+0xe>
mov    %rbx,%rdi
call   1030 <lmalloc_oom@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @lmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i8* @malloc(i64 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @lmalloc_oom(i64 %0)
br label %9
9: ; preds = %4, %7, %1
%10 = phi i8* [ %2, %1 ], [ %5, %4 ], [ null, %7 ]
ret i8* %10
}
void PDMR3QueryDriverOnLun(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMR3QueryDriverOnLun() {
ret void
}
void gtk_radio_tool_button_new_with_stock_from_widget() {}


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

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

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

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