xunge/DecIR huggingface dataset:
int mpeg3_pcm_check(unsigned char *header) {
  if (header[0] == ((0x7f7f807f & 0xff000000) >> 24) &&
      header[1] == ((0x7f7f807f & 0xff0000) >> 16) &&
      header[2] == ((0x7f7f807f & 0xff00) >> 8) &&
      header[3] == (0x7f7f807f & 0xff))
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<mpeg3_pcm_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x7f,%eax
jne    1159 <mpeg3_pcm_check+0x59>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x7f,%eax
jne    1159 <mpeg3_pcm_check+0x59>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0x80,%eax
jne    1159 <mpeg3_pcm_check+0x59>
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x7f,%eax
jne    1159 <mpeg3_pcm_check+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1160 <mpeg3_pcm_check+0x60>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpeg3_pcm_check>:
cmpb   $0x7f,(%rdi)
jne    1119 <mpeg3_pcm_check+0x19>
cmpb   $0x7f,0x1(%rdi)
jne    1119 <mpeg3_pcm_check+0x19>
cmpb   $0x80,0x2(%rdi)
jne    1119 <mpeg3_pcm_check+0x19>
xor    %eax,%eax
cmpb   $0x7f,0x3(%rdi)
je     111e <mpeg3_pcm_check+0x1e>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @mpeg3_pcm_check(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %7, 127
br i1 %8, label %9, label %28
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 127
br i1 %14, label %15, label %28
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = icmp eq i32 %19, 128
br i1 %20, label %21, label %28
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = icmp eq i32 %25, 127
br i1 %26, label %27, label %28
27: ; preds = %21
store i32 0, i32* %2
br label %29
28: ; preds = %21, %15, %9, %1
store i32 1, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @mpeg3_pcm_check(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 127
br i1 %3, label %4, label %16
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 127
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, -128
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 127
br i1 %15, label %17, label %16
16: ; preds = %12, %8, %4, %1
br label %17
17: ; preds = %12, %16
%18 = phi i32 [ 1, %16 ], [ 0, %12 ]
ret i32 %18
}
void __attribute__((no)) f(char *const *p) {
  __asm__("" : : "g"(p) : "memory");
}


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

x86 assembly (clang, -O2):
<f>:
mov    %rdi,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @f(i8** %0) {
tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void f2(void *b) {
  char *c = (char *)b;
  char *d = b + 1;
  printf("%s", c);
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @f2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void NV12ToRGB565Row_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @NV12ToRGB565Row_Any_AVX2() {
ret void
}
void rop3_140_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = *D | stk3;
  stk1 = S & stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_140_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_140_1_0>:
and    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_140_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
store i8 %5, i8* %0
ret void
}
void test(__complex__ double D, double X) { D /= X; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
divsd  %xmm2,%xmm1
divsd  %xmm2,%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test(double %0, double %1, double %2) {
%4 = alloca { double, double }
%5 = alloca double
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %7
store double %2, double* %5
%8 = load double, double* %5
%9 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%10 = load double, double* %9
%11 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%12 = load double, double* %11
%13 = fdiv double %10, %8
%14 = fdiv double %12, %8
%15 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%16 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %13, double* %15
store double %14, double* %16
ret void
}

LLVM IR (-O2):
define void @test(double %0, double %1, double %2) {
ret void
}
void store16(p, a) short *p;
short a;
{ *p = a; }


x86 assembly (clang, -O0):
<store16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store16>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @store16(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i16
%5 = trunc i32 %1 to i16
store i16* %0, i16** %3
store i16 %5, i16* %4
%6 = load i16, i16* %4
%7 = load i16*, i16** %3
store i16 %6, i16* %7
ret void
}

LLVM IR (-O2):
define void @store16(i16* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i16
store i16 %3, i16* %0
ret void
}
unsigned xrop3_238_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D | S;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_238_1_1>:
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    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_238_1_1>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
mov    %edi,%ecx
not    %cl
movzbl %cl,%ecx
not    %eax
and    %ecx,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_238_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %0, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int gdGdcReqCmd(int, void *);
int cdops_send_cmd(int cmd, void *param) { return gdGdcReqCmd(cmd, param); }


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

x86 assembly (clang, -O2):
<cdops_send_cmd>:
jmp    1030 <gdGdcReqCmd@plt>

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

LLVM IR (-O2):
define i32 @cdops_send_cmd(i32 %0, i8* %1) {
%3 = tail call i32 @gdGdcReqCmd(i32 %0, i8* %1)
ret i32 %3
}
void mtk_bt_disable(int fd) {}


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

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

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

LLVM IR (-O2):
define void @mtk_bt_disable(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
unsigned short byteSwap16(unsigned short);
int /*<<< orphan*/ mustReadFd(int, unsigned short *, int);
unsigned short fdReadBits16(int fd, int isSwapped) {
  unsigned short val;
  mustReadFd((fd), &(val), sizeof(val));
  if (isSwapped)
    val = byteSwap16(val);
  return val;
}


x86 assembly (clang, -O0):
<fdReadBits16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa(%rbp),%rsi
mov    $0x2,%edx
call   1040 <mustReadFd@plt>
cmpl   $0x0,-0x8(%rbp)
je     1156 <fdReadBits16+0x36>
movzwl -0xa(%rbp),%edi
call   1030 <byteSwap16@plt>
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdReadBits16>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
lea    0xe(%rsp),%rsi
mov    $0x2,%edx
call   1040 <mustReadFd@plt>
movzwl 0xe(%rsp),%eax
test   %ebx,%ebx
je     1147 <fdReadBits16+0x27>
movzwl %ax,%edi
call   1030 <byteSwap16@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define zeroext i16 @fdReadBits16(i32 %0, i32 %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = call i32 @mustReadFd(i32 %0, i16* %3, i32 2)
%6 = icmp eq i32 %1, 0
%7 = load i16, i16* %3
br i1 %6, label %10, label %8
8: ; preds = %2
%9 = call zeroext i16 @byteSwap16(i16 zeroext %7)
br label %10
10: ; preds = %2, %8
%11 = phi i16 [ %9, %8 ], [ %7, %2 ]
ret i16 %11
}
/* Type definitions */
struct core_instr {
  int dummy;
};

/* Variables and functions */
scalar_t__ instr_is_op1ptr(struct core_instr *);
scalar_t__ instr_is_op2ptr(struct core_instr *);
int instr_has_ptr(struct core_instr *i) {
  return (instr_is_op1ptr(i) || instr_is_op2ptr(i));
}


x86 assembly (clang, -O0):
<instr_has_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <instr_is_op1ptr@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <instr_has_ptr+0x3a>
mov    -0x8(%rbp),%rdi
call   1040 <instr_is_op2ptr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<instr_has_ptr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <instr_is_op1ptr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <instr_has_ptr+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <instr_is_op2ptr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.core_instr = type { i32 }
define i32 @instr_has_ptr(%struct.core_instr* %0) {
%2 = alloca %struct.core_instr*
store %struct.core_instr* %0, %struct.core_instr** %2
%3 = load %struct.core_instr*, %struct.core_instr** %2
%4 = call i64 @instr_is_op1ptr(%struct.core_instr* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.core_instr*, %struct.core_instr** %2
%8 = call i64 @instr_is_op2ptr(%struct.core_instr* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.core_instr = type { i32 }
define i32 @instr_has_ptr(%struct.core_instr* %0) {
%2 = tail call i64 @instr_is_op1ptr(%struct.core_instr* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @instr_is_op2ptr(%struct.core_instr* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int rand();
unsigned short random_short() {
  unsigned int i = 0;
  unsigned short v = 0;
  unsigned char buffer[2];
  for (i = 0; i < 2; i++) {
    buffer[i] = rand() & 0xFF;
  }
  v = *(unsigned short *)buffer;
  return v;
}


x86 assembly (clang, -O0):
<random_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x0,-0x6(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jae    1159 <random_short+0x49>
mov    $0x0,%al
call   1030 <rand@plt>
and    $0xff,%eax
mov    %al,%cl
mov    -0x4(%rbp),%eax
mov    %cl,-0x8(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112c <random_short+0x1c>
mov    -0x8(%rbp),%ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_short>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
shl    $0x8,%eax
movzbl %bl,%ecx
or     %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @random_short() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca [2 x i8]
store i32 0, i32* %1
store i16 0, i16* %2
store i32 0, i32* %1
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %1
%6 = icmp ult i32 %5, 2
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = call i32 (...) @rand()
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i32, i32* %1
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 %12
store i8 %10, i8* %13
br label %14
14: ; preds = %7
%15 = load i32, i32* %1
%16 = add i32 %15, 1
store i32 %16, i32* %1
br label %4
17: ; preds = %4
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%19 = bitcast i8* %18 to i16*
%20 = load i16, i16* %19
store i16 %20, i16* %2
%21 = load i16, i16* %2
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @random_short() {
%1 = tail call i32 (...) @rand()
%2 = trunc i32 %1 to i16
%3 = tail call i32 (...) @rand()
%4 = trunc i32 %3 to i16
%5 = shl i16 %4, 8
%6 = and i16 %2, 255
%7 = or i16 %5, %6
ret i16 %7
}
double GetWindage(double *sln, int yardage) {
  double size = sln[50001 * 10 + 1];
  if (yardage < size) {
    return sln[10 * yardage + 4];
  } else
    return 0;
}


x86 assembly (clang, -O0):
<GetWindage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x3d0958(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    114d <GetWindage+0x4d>
mov    -0x10(%rbp),%rax
imul   $0xa,-0x14(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <GetWindage+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetWindage>:
cvtsi2sd %esi,%xmm1
movsd  0x3d0958(%rdi),%xmm2
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jbe    1122 <GetWindage+0x22>
add    %esi,%esi
lea    (%rsi,%rsi,4),%eax
cltq
movsd  0x20(%rdi,%rax,8),%xmm0
ret

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

LLVM IR (-O2):
define double @GetWindage(double* nocapture %0, i32 %1) {
%3 = getelementptr inbounds double, double* %0, i64 500011
%4 = load double, double* %3
%5 = sitofp i32 %1 to double
%6 = fcmp ogt double %4, %5
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = mul nsw i32 %1, 10
%9 = add nsw i32 %8, 4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
br label %13
13: ; preds = %2, %7
%14 = phi double [ %12, %7 ], [ 0.000000e+00, %2 ]
ret double %14
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int FD_ISSET(int, int /*<<< orphan*/ *);
int Selective_FdIsSet(int fd, fd_set *s) { return FD_ISSET(fd, s); }


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

x86 assembly (clang, -O2):
<Selective_FdIsSet>:
jmp    1030 <FD_ISSET@plt>

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

LLVM IR (-O2):
define i32 @Selective_FdIsSet(i32 %0, i32* %1) {
%3 = tail call i32 @FD_ISSET(i32 %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
void *malloc(long);
void *cb_malloc(long nbytes) { return malloc(nbytes); }


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

x86 assembly (clang, -O2):
<cb_malloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @cb_malloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @cb_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_read_standard_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(30, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_read_standard_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1e,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_read_standard_solutions>:
mov    $0x1e,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_read_standard_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 30, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_read_standard_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 30, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ glutSolidSphere(double, int, int);
void renderSphere(GLfloat x, GLfloat y, GLfloat z) {
  glPushMatrix();
  glTranslatef(x, y, z);
  glutSolidSphere(0.4, 16, 16);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<renderSphere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1060 <glTranslatef@plt>
movsd  0xe92(%rip),%xmm0
mov    $0x10,%esi
mov    %esi,%edi
call   1050 <glutSolidSphere@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renderSphere>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1060 <glTranslatef@plt>
movsd  0xe9a(%rip),%xmm0
mov    $0x10,%edi
mov    $0x10,%esi
call   1050 <glutSolidSphere@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <glPopMatrix@plt>

LLVM IR (-O0):
define void @renderSphere(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
%7 = call i32 (...) @glPushMatrix()
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @glTranslatef(i32 %8, i32 %9, i32 %10)
%12 = call i32 @glutSolidSphere(double 4.000000e-01, i32 16, i32 16)
%13 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
define void @renderSphere(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @glPushMatrix()
%5 = tail call i32 @glTranslatef(i32 %0, i32 %1, i32 %2)
%6 = tail call i32 @glutSolidSphere(double 4.000000e-01, i32 16, i32 16)
%7 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Type definitions */
struct hostent {
  scalar_t__ *h_addr_list;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ herror(char *);
unsigned long resolve(char *hostname) {
  struct hostent *host;
  if ((host = gethostbyname(hostname)) == NULL) {
    herror("gethostbyname() failed");
    exit(-1);
  }
  return *(unsigned long *)host->h_addr_list[0];
}


x86 assembly (clang, -O0):
<resolve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gethostbyname@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1169 <resolve+0x39>
lea    0xea6(%rip),%rdi
call   1040 <herror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolve>:
push   %rax
call   1030 <gethostbyname@plt>
test   %rax,%rax
je     1146 <resolve+0x16>
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
pop    %rcx
ret
lea    0xeb3(%rip),%rdi
call   1040 <herror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.hostent = type { i64* }
@.str = [23 x i8] c"gethostbyname() failed\00"
define i64 @resolve(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.hostent*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.hostent* @gethostbyname(i8* %4)
store %struct.hostent* %5, %struct.hostent** %3
%6 = icmp eq %struct.hostent* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @herror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %1
%11 = load %struct.hostent*, %struct.hostent** %3
%12 = getelementptr inbounds %struct.hostent, %struct.hostent* %11, i32 0, i32 0
%13 = load i64*, i64** %12
%14 = getelementptr inbounds i64, i64* %13, i64 0
%15 = load i64, i64* %14
%16 = inttoptr i64 %15 to i64*
%17 = load i64, i64* %16
ret i64 %17
}

LLVM IR (-O2):
%struct.hostent = type { i64* }
@.str = [23 x i8] c"gethostbyname() failed\00"
define i64 @resolve(i8* %0) {
%2 = tail call %struct.hostent* @gethostbyname(i8* %0)
%3 = icmp eq %struct.hostent* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @herror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
%8 = getelementptr inbounds %struct.hostent, %struct.hostent* %2, i64 0, i32 0
%9 = load i64*, i64** %8
%10 = load i64, i64* %9
%11 = inttoptr i64 %10 to i64*
%12 = load i64, i64* %11
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void vm_timing_sleep_microseconds(unsigned int microseconds) {
  usleep(microseconds);
}


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

x86 assembly (clang, -O2):
<vm_timing_sleep_microseconds>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @vm_timing_sleep_microseconds(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
float fabsf(float x) {}


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

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

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

LLVM IR (-O2):
define float @fabsf(float %0) {
ret float undef
}
int bd_claim(struct block_device *x, void *y) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.block_device = type opaque
define i32 @bd_claim(%struct.block_device* %0, i8* %1) {
%3 = alloca %struct.block_device*
%4 = alloca i8*
%5 = alloca i32
store %struct.block_device* %0, %struct.block_device** %3
store i8* %1, i8** %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.block_device = type opaque
define i32 @bd_claim(%struct.block_device* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
void callee_1_2_1() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @perfmon_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void write1and1(char *str1, char *str2) {
  printf("%s", str1);
  printf("%s", " ");
  printf("%s", str2);
}


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

x86 assembly (clang, -O2):
<write1and1>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rsi
lea    0xedf(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c" \00"
define void @write1and1(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void fe_free_2d(void **arr) {
  if (arr != NULL) {
    free(arr[0]);
    free(arr);
  }
}


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

x86 assembly (clang, -O2):
<fe_free_2d>:
test   %rdi,%rdi
je     112a <fe_free_2d+0x1a>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @fe_free_2d(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = bitcast i8** %0 to i8***
%5 = load i8**, i8*** %4
%6 = tail call i32 @free(i8** %5)
%7 = tail call i32 @free(i8** %0)
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_score(int);
char mvinch(int, int);
void over_der(int row, int col) {
  if (mvinch(row + 1, col) == 'o' || mvinch(row + 2, col) == 'o')
    add_score(2);
}


x86 assembly (clang, -O0):
<over_der>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1040 <mvinch@plt>
movsbl %al,%eax
cmp    $0x6f,%eax
je     1162 <over_der+0x42>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
mov    -0x8(%rbp),%esi
call   1040 <mvinch@plt>
movsbl %al,%eax
cmp    $0x6f,%eax
jne    116c <over_der+0x4c>
mov    $0x2,%edi
call   1030 <add_score@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<over_der>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
lea    0x1(%rbx),%edi
call   1040 <mvinch@plt>
cmp    $0x6f,%al
je     1143 <over_der+0x23>
add    $0x2,%ebx
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <mvinch@plt>
cmp    $0x6f,%al
jne    1153 <over_der+0x33>
mov    $0x2,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <add_score@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @over_der(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 = add nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = call signext i8 @mvinch(i32 %6, i32 %7)
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 111
br i1 %10, label %18, label %11
11: ; preds = %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 2
%14 = load i32, i32* %4
%15 = call signext i8 @mvinch(i32 %13, i32 %14)
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 111
br i1 %17, label %18, label %20
18: ; preds = %11, %2
%19 = call i32 @add_score(i32 2)
br label %20
20: ; preds = %18, %11
ret void
}

LLVM IR (-O2):
define void @over_der(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = tail call signext i8 @mvinch(i32 %3, i32 %1)
%5 = icmp eq i8 %4, 111
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = add nsw i32 %0, 2
%8 = tail call signext i8 @mvinch(i32 %7, i32 %1)
%9 = icmp eq i8 %8, 111
br i1 %9, label %10, label %12
10: ; preds = %6, %2
%11 = tail call i32 @add_score(i32 2)
br label %12
12: ; preds = %10, %6
ret void
}
float f(_Complex float x, _Complex float y) {
  x += y;
  return __builtin_cimagf(x);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x8(%rbp)
movlpd %xmm1,-0x10(%rbp)
movss  -0x10(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
addss  %xmm3,%xmm1
addss  %xmm2,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
addps  %xmm1,%xmm0
shufps $0x55,%xmm0,%xmm0
ret

LLVM IR (-O0):
define float @f(<2 x float> %0, <2 x float> %1) {
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %5
%6 = bitcast { float, float }* %4 to <2 x float>*
store <2 x float> %1, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%12 = load float, float* %11
%13 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%14 = load float, float* %13
%15 = fadd float %12, %8
%16 = fadd float %14, %10
%17 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%18 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float %15, float* %17
store float %16, float* %18
%19 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%22 = load float, float* %21
ret float %22
}

LLVM IR (-O2):
define float @f(<2 x float> %0, <2 x float> %1) {
%3 = fadd <2 x float> %0, %1
%4 = extractelement <2 x float> %3, i64 1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ read_word_data(int /*<<< orphan*/, int);
uint16_t read_bus(uint8_t address) { return read_word_data(address, 0x12); }


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

x86 assembly (clang, -O2):
<read_bus>:
mov    $0x12,%esi
jmp    1030 <read_word_data@plt>

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

LLVM IR (-O2):
define i32 @read_bus(i32 %0) {
%2 = tail call i32 @read_word_data(i32 %0, i32 18)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Comp(int);
int /*<<< orphan*/ Create();
int /*<<< orphan*/ GetWord();
int /*<<< orphan*/ Reveal();
void DoVariable() {
  GetWord();
  Create();
  Comp(3);
  Comp(0);
  Reveal();
}


x86 assembly (clang, -O0):
<DoVariable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GetWord@plt>
mov    $0x0,%al
call   1030 <Create@plt>
mov    $0x3,%edi
call   1050 <Comp@plt>
xor    %edi,%edi
call   1050 <Comp@plt>
mov    $0x0,%al
call   1060 <Reveal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoVariable>:
push   %rax
xor    %eax,%eax
call   1040 <GetWord@plt>
xor    %eax,%eax
call   1030 <Create@plt>
mov    $0x3,%edi
call   1050 <Comp@plt>
xor    %edi,%edi
call   1050 <Comp@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Reveal@plt>

LLVM IR (-O0):
define void @DoVariable() {
%1 = call i32 (...) @GetWord()
%2 = call i32 (...) @Create()
%3 = call i32 @Comp(i32 3)
%4 = call i32 @Comp(i32 0)
%5 = call i32 (...) @Reveal()
ret void
}

LLVM IR (-O2):
define void @DoVariable() {
%1 = tail call i32 (...) @GetWord()
%2 = tail call i32 (...) @Create()
%3 = tail call i32 @Comp(i32 3)
%4 = tail call i32 @Comp(i32 0)
%5 = tail call i32 (...) @Reveal()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char const *argv[]) {
  char *a;
  a = "hehe";
  printf("%s\n", a);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"hehe\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void dbg_msg(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @dbg_msg(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void corpus_free(void *ptr) { free(ptr); }


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

LLVM IR (-O0):
define void @corpus_free(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 @corpus_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int test_imm_09int16_reg(short val) {
  return ((val) & (-0x09 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_09int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xfffffff7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_09int16_reg>:
test   $0xfff7,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_09int16_reg(i16 signext %0) {
%2 = and i16 %0, -9
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int sin(double);
double my_csc(double x) { return 1 / sin(x); }


x86 assembly (clang, -O0):
<my_csc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_csc>:
push   %rax
call   1030 <sin@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @my_csc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @sin(double %3)
%5 = sdiv i32 1, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @my_csc(double %0) {
%2 = tail call i32 @sin(double %0)
%3 = add i32 %2, 1
%4 = icmp ult i32 %3, 3
%5 = select i1 %4, i32 %2, i32 0
%6 = sitofp i32 %5 to double
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int OK;
int /*<<< orphan*/ _wcursback(int /*<<< orphan*/ *);
int /*<<< orphan*/ _wputc(int /*<<< orphan*/ *, char, int);
int wdelch(WINDOW *win) {
  _wputc(win, ' ', 1);
  _wcursback(win);
  return OK;
}


x86 assembly (clang, -O0):
<wdelch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
call   1040 <_wputc@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_wcursback@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wdelch>:
push   %rbx
mov    %rdi,%rbx
mov    $0x20,%esi
mov    $0x1,%edx
call   1040 <_wputc@plt>
mov    %rbx,%rdi
call   1030 <_wcursback@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@OK = global i32 0
define i32 @wdelch(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @_wputc(i32* %3, i8 signext 32, i32 1)
%5 = load i32*, i32** %2
%6 = call i32 @_wcursback(i32* %5)
%7 = load i32, i32* @OK
ret i32 %7
}

LLVM IR (-O2):
@OK = global i32 0
define i32 @wdelch(i32* %0) {
%2 = tail call i32 @_wputc(i32* %0, i8 signext 32, i32 1)
%3 = tail call i32 @_wcursback(i32* %0)
%4 = load i32, i32* @OK
ret i32 %4
}
__attribute__((visibility("default"))) char *strleft(char *val, int cnt) {
  val[cnt] = '\0';
  return val;
}


x86 assembly (clang, -O0):
<strleft>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strleft>:
mov    %rdi,%rax
movslq %esi,%rcx
movb   $0x0,(%rdi,%rcx,1)
ret

LLVM IR (-O0):
define i8* @strleft(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @strleft(i8* returned writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 0, i8* %4
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void showHelp(char *app) { printf("%s <number>\n", app); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"%s <number>\0A\00"
define void @showHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s <number>\0A\00"
define void @showHelp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}