xunge/DecIR huggingface dataset:
/* Variables and functions */
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double sqrt(double);
double Raiz_cuadrada(double a) {
  printf(gettext("\n enter the number to which effect the root: "));
  scanf("%lf", &a);
  return (sqrt(a));
}


x86 assembly (clang, -O0):
<Raiz_cuadrada>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1060 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Raiz_cuadrada>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xeb3(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     117e <Raiz_cuadrada+0x3e>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
call   1060 <sqrt@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [46 x i8] c"\0A enter the number to which effect the root: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Raiz_cuadrada(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i8* @gettext(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @sqrt(double %6)
ret double %7
}

LLVM IR (-O2):
@.str = [46 x i8] c"\0A enter the number to which effect the root: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Raiz_cuadrada(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i8* @gettext(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @sqrt(double %6)
ret double %7
}
int fb(void *fp __attribute__((unused)), const char *s __attribute__((unused)),
       int n __attribute__((unused))) {}


x86 assembly (clang, -O0):
<fb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fb(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int cos(float);
int sin(float);
void radial_convert(float angle, int bin, int *x, int *y) {
  float r_angle = angle * (3.14159265 / 180);
  *x = bin * cos(r_angle);
  *y = bin * sin(r_angle);
}


x86 assembly (clang, -O0):
<radial_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1040 <cos@plt>
mov    -0x24(%rbp),%ecx
imul   %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1030 <sin@plt>
mov    -0x20(%rbp),%ecx
imul   %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radial_convert>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
cvtss2sd %xmm0,%xmm0
mulsd  0xec4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
call   1040 <cos@plt>
imul   %ebp,%eax
mov    %eax,(%rbx)
movss  0xc(%rsp),%xmm0
call   1030 <sin@plt>
imul   %ebp,%eax
mov    %eax,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @radial_convert(float %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca float
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca float
store float %0, float* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = load float, float* %5
%11 = fpext float %10 to double
%12 = fmul double %11, 0x3F91DF46A1FAE712
%13 = fptrunc double %12 to float
store float %13, float* %9
%14 = load i32, i32* %6
%15 = load float, float* %9
%16 = call i32 @cos(float %15)
%17 = mul nsw i32 %14, %16
%18 = load i32*, i32** %7
store i32 %17, i32* %18
%19 = load i32, i32* %6
%20 = load float, float* %9
%21 = call i32 @sin(float %20)
%22 = mul nsw i32 %19, %21
%23 = load i32*, i32** %8
store i32 %22, i32* %23
ret void
}

LLVM IR (-O2):
define void @radial_convert(float %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = fpext float %0 to double
%6 = fmul double %5, 0x3F91DF46A1FAE712
%7 = fptrunc double %6 to float
%8 = tail call i32 @cos(float %7)
%9 = mul nsw i32 %8, %1
store i32 %9, i32* %2
%10 = tail call i32 @sin(float %7)
%11 = mul nsw i32 %10, %1
store i32 %11, i32* %3
ret void
}
/* Type definitions */
typedef int word;
typedef int Elf32_Word;

/* Variables and functions */
Elf32_Word read_elf_word(Elf32_Word word, bool swap) {
  return swap ? ((((word)&0x000000ff) << 24) | (((word)&0x0000ff00) << 8) |
                 (((word)&0x00ff0000) >> 8) | (((word)&0xff000000) >> 24))
              : word;
}


x86 assembly (clang, -O0):
<read_elf_word>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1151 <read_elf_word+0x51>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <read_elf_word+0x57>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_elf_word>:
test   %esi,%esi
mov    %edi,%eax
bswap  %eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @read_elf_word(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
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %23
7: ; preds = %2
%8 = load i32, i32* %3
%9 = and i32 %8, 255
%10 = shl i32 %9, 24
%11 = load i32, i32* %3
%12 = and i32 %11, 65280
%13 = shl i32 %12, 8
%14 = or i32 %10, %13
%15 = load i32, i32* %3
%16 = and i32 %15, 16711680
%17 = ashr i32 %16, 8
%18 = or i32 %14, %17
%19 = load i32, i32* %3
%20 = and i32 %19, -16777216
%21 = lshr i32 %20, 24
%22 = or i32 %18, %21
br label %25
23: ; preds = %2
%24 = load i32, i32* %3
br label %25
25: ; preds = %23, %7
%26 = phi i32 [ %22, %7 ], [ %24, %23 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @read_elf_word(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = tail call i32 @llvm.bswap.i32(i32 %0)
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void rop3_136_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D & S;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_136_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%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_136_0_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_136_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = load i8, i8* %7
%21 = zext i8 %20 to i32
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = and i32 %21, %24
%26 = or i32 %19, %25
%27 = load i8, i8* %6
%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 = and i32 %32, %35
%37 = or i32 %26, %36
%38 = trunc i32 %37 to i8
%39 = load i8*, i8** %4
store i8 %38, i8* %39
ret void
}

LLVM IR (-O2):
define void @rop3_136_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
int test_imm_13int64_highword_reg(long long val) {
  return ((val >> 32) & (0x13 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_13int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x13,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_13int64_highword_reg>:
movabs $0x1300000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_13int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 19
%6 = icmp ne i64 %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_13int64_highword_reg(i64 %0) {
%2 = and i64 %0, 81604378624
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ DIRECTORYSTRING_it;
ASN1_STRING *DIRECTORYSTRING_new(void) {
  return (ASN1_STRING *)ASN1_item_new(&DIRECTORYSTRING_it);
}


x86 assembly (clang, -O0):
<DIRECTORYSTRING_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DIRECTORYSTRING_new>:
mov    0x2ed9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@DIRECTORYSTRING_it = global i32 0
define i32* @DIRECTORYSTRING_new() {
%1 = call i64 @ASN1_item_new(i32* @DIRECTORYSTRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@DIRECTORYSTRING_it = global i32 0
define i32* @DIRECTORYSTRING_new() {
%1 = tail call i64 @ASN1_item_new(i32* @DIRECTORYSTRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int take_csi(char *);
int take_esc(char *ptr) {
  switch (*(ptr + 1)) {
  case '\0':
    return 1;
  case '[':
    return take_csi(ptr);
  default:
    return 2;
  }
}


x86 assembly (clang, -O0):
<take_esc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x14(%rbp)
test   %eax,%eax
je     1145 <take_esc+0x35>
jmp    1134 <take_esc+0x24>
mov    -0x14(%rbp),%eax
sub    $0x5b,%eax
je     1151 <take_esc+0x41>
jmp    1162 <take_esc+0x52>
movl   $0x1,-0x4(%rbp)
jmp    1169 <take_esc+0x59>
mov    -0x10(%rbp),%rdi
call   1030 <take_csi@plt>
mov    %eax,-0x4(%rbp)
jmp    1169 <take_esc+0x59>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<take_esc>:
movsbl 0x1(%rdi),%eax
test   %eax,%eax
je     1122 <take_esc+0x12>
cmp    $0x5b,%eax
jne    1128 <take_esc+0x18>
jmp    1030 <take_csi@plt>
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @take_esc(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 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 0, label %8
i32 91, label %9
]
8: ; preds = %1
store i32 1, i32* %2
br label %13
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @take_csi(i8* %10)
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 2, i32* %2
br label %13
13: ; preds = %12, %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @take_esc(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %7 [
i32 0, label %8
i32 91, label %5
]
5: ; preds = %1
%6 = tail call i32 @take_csi(i8* %0)
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %5
%9 = phi i32 [ 2, %7 ], [ %6, %5 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a = 0xffffffff;
  if (a > 0) {
    printf("a > 0\n");
  } else {
    printf("a < 0\n");
  }
  printf("a = %d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1143 <main+0x33>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1151 <main+0x41>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.2 = [8 x i8] c"a = %d\0A\00"
@str = [6 x i8] c"a < 0\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dune_flush_tlb();
int check_dune(void) {
  dune_flush_tlb();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @check_dune() {
%1 = call i32 (...) @dune_flush_tlb()
ret i32 0
}

LLVM IR (-O2):
define i32 @check_dune() {
%1 = tail call i32 (...) @dune_flush_tlb()
ret i32 0
}
/* Variables and functions */
double __ocml_log1p_f64(double);
double log1p(double x) { return __ocml_log1p_f64(x); }


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

x86 assembly (clang, -O2):
<log1p>:
jmp    1030 <__ocml_log1p_f64@plt>

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

LLVM IR (-O2):
define double @log1p(double %0) {
%2 = tail call double @__ocml_log1p_f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ setchr8(int /*<<< orphan*/);
int /*<<< orphan*/ setprg16(int, int /*<<< orphan*/);
void Sync(void) {
  setprg16(0x8000, 0);
  setprg16(0xc000, ~0);
  setchr8(0);
}


x86 assembly (clang, -O0):
<Sync>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8000,%edi
xor    %esi,%esi
call   1030 <setprg16@plt>
mov    $0xc000,%edi
mov    $0xffffffff,%esi
call   1030 <setprg16@plt>
xor    %edi,%edi
call   1040 <setchr8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sync>:
push   %rax
mov    $0x8000,%edi
xor    %esi,%esi
call   1030 <setprg16@plt>
mov    $0xc000,%edi
mov    $0xffffffff,%esi
call   1030 <setprg16@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <setchr8@plt>

LLVM IR (-O0):
define void @Sync() {
%1 = call i32 @setprg16(i32 32768, i32 0)
%2 = call i32 @setprg16(i32 49152, i32 -1)
%3 = call i32 @setchr8(i32 0)
ret void
}

LLVM IR (-O2):
define void @Sync() {
%1 = tail call i32 @setprg16(i32 32768, i32 0)
%2 = tail call i32 @setprg16(i32 49152, i32 -1)
%3 = tail call i32 @setchr8(i32 0)
ret void
}
int test_imm_EAuint16_reg(unsigned short val) {
  return ((val) & (-0xEA << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_EAuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -234
%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_EAuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -234
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void Cyc_Absyn_dummy_stmt_pop(void *a, struct Cyc_Absyn_Stmt *s) { ; }


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

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

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

LLVM IR (-O2):
%struct.Cyc_Absyn_Stmt = type opaque
define void @Cyc_Absyn_dummy_stmt_pop(i8* nocapture %0, %struct.Cyc_Absyn_Stmt* nocapture %1) {
ret void
}
int AdjustTypes() {}


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

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

LLVM IR (-O0):
define i32 @AdjustTypes() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @AdjustTypes() {
ret i32 undef
}
int init_native(int a) { return 1; }


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

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

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

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

/* Variables and functions */
int IPC_CREAT;
int shmget(int /*<<< orphan*/, int, int);
int createSharedMemoryId(key_t key, int size) {
  return shmget(key, size, IPC_CREAT | 0600);
}


x86 assembly (clang, -O0):
<createSharedMemoryId>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
or     $0x180,%edx
call   1030 <shmget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createSharedMemoryId>:
mov    0x2ec9(%rip),%rax
mov    $0x180,%edx
or     (%rax),%edx
jmp    1030 <shmget@plt>

LLVM IR (-O0):
@IPC_CREAT = global i32 0
define i32 @createSharedMemoryId(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 = load i32, i32* @IPC_CREAT
%8 = or i32 %7, 384
%9 = call i32 @shmget(i32 %5, i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @createSharedMemoryId(i32 %0, i32 %1) {
%3 = load i32, i32* @IPC_CREAT
%4 = or i32 %3, 384
%5 = tail call i32 @shmget(i32 %0, i32 %1, i32 %4)
ret i32 %5
}
void setup_force_aux(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_force_aux() {
ret void
}
void double_to_ss(double x, short *p) { p[3] = x; }


x86 assembly (clang, -O0):
<double_to_ss>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x6(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_ss>:
cvttsd2si %xmm0,%eax
mov    %ax,0x6(%rdi)
ret

LLVM IR (-O0):
define void @double_to_ss(double %0, i16* %1) {
%3 = alloca double
%4 = alloca i16*
store double %0, double* %3
store i16* %1, i16** %4
%5 = load double, double* %3
%6 = fptosi double %5 to i16
%7 = load i16*, i16** %4
%8 = getelementptr inbounds i16, i16* %7, i64 3
store i16 %6, i16* %8
ret void
}

LLVM IR (-O2):
define void @double_to_ss(double %0, i16* nocapture writeonly %1) {
%3 = fptosi double %0 to i16
%4 = getelementptr inbounds i16, i16* %1, i64 3
store i16 %3, i16* %4
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  char buffer[10];
  printf("Geben Sie nun etwas ein:\n");
  fgets(buffer, 10, stdin);
  printf("Sie gaben ein: %s\n", buffer);
  return EXIT_SUCCESS;
}


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    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1a(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1040 <fgets@plt>
lea    -0x1a(%rbp),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <fgets@plt>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Geben Sie nun etwas ein:\0A\00"
@stdin = global i32 0
@.str.1 = [19 x i8] c"Sie gaben ein: %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 10, i32 %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.1 = [19 x i8] c"Sie gaben ein: %s\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [25 x i8] c"Geben Sie nun etwas ein:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %4, i32 10, i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
cbuf37(f, n) { return (cbuf(f, n, 37)); }


x86 assembly (clang, -O0):
<cbuf37>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x25,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf37>:
mov    $0x25,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf37(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 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 37)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf37(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 37)
ret i32 %3
}
void test(enum foo *X) {}


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

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

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

LLVM IR (-O2):
define void @test(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void signal_handler(int signal) {
  fprintf(stderr, "SIGPIPE received, exiting\n");
  exit(3);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"SIGPIPE received, exiting\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"SIGPIPE received, exiting\0A\00"
define void @signal_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 3)
unreachable
}
/* Variables and functions */
int update_user_state();
int update_user(void) {
  int i;
  i = update_user_state();
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @update_user() {
%1 = tail call i32 (...) @update_user_state()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
void _mm512_storeu_epi64(void *, int /*<<< orphan*/);
void test_mm512_storeu_epi64(void *__P, __m512i __A) {
  return _mm512_storeu_epi64(__P, __A);
}


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

x86 assembly (clang, -O2):
<test_mm512_storeu_epi64>:
jmp    1030 <_mm512_storeu_epi64@plt>

LLVM IR (-O0):
define void @test_mm512_storeu_epi64(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
ret void
}

LLVM IR (-O2):
define void @test_mm512_storeu_epi64(i8* %0, i32 %1) {
tail call void @_mm512_storeu_epi64(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zmaster_server_main(int, char **);
int main(int argc, char **argv) {
  zmaster_server_main(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @zmaster_server_main(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DATA_olf();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_olf();
LIBRARY_olf() {
  LibraryHeader("olf", "Sat Feb  1 10:41:18 2014 ");
  DATA_olf();
  STARTUP_olf();
}


x86 assembly (clang, -O0):
<LIBRARY_olf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1050 <DATA_olf@plt>
mov    $0x0,%al
call   1030 <STARTUP_olf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_olf>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1050 <DATA_olf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <STARTUP_olf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"olf\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:18 2014 \00"
define i32 @LIBRARY_olf() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_olf()
%4 = call i32 (...) @STARTUP_olf()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [4 x i8] c"olf\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:18 2014 \00"
define i32 @LIBRARY_olf() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_olf()
%3 = tail call i32 (...) @STARTUP_olf()
ret i32 undef
}
float logf(float x) { return __builtin_logf(x); }


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

x86 assembly (clang, -O2):
<logf>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jae    1110 <logf+0x10>
ret
nopl   0x0(%rax)
jmp    1110 <logf+0x10>

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

LLVM IR (-O2):
define float @logf(float %0) {
%2 = fcmp ugt float %0, 0.000000e+00
br i1 %2, label %4, label %3
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret float undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int handle_unknown_reply(const char *line) {
  printf("BUG received %s for unknown command\n", line);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"BUG received %s for unknown command\0A\00"
define i32 @handle_unknown_reply(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"BUG received %s for unknown command\0A\00"
define i32 @handle_unknown_reply(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ be64toh(int /*<<< orphan*/);
uint64_t ReadBE64(const unsigned char *ptr) {
  return be64toh(*((uint64_t *)ptr));
}


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

x86 assembly (clang, -O2):
<ReadBE64>:
mov    (%rdi),%edi
jmp    1030 <be64toh@plt>

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

LLVM IR (-O2):
define i32 @ReadBE64(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @be64toh(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int i = 10, j = 5, k = 0;
  k = ((i++) < (++j)) ? (i++) : (++j);
  printf("%d %d %d", i, j, k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
cmp    %ecx,%eax
jge    1163 <main+0x53>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x14(%rbp)
jmp    116f <main+0x5f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xb,%esi
mov    $0x7,%edx
mov    $0x7,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 5, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
%9 = icmp slt i32 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %16
13: ; preds = %0
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %11, %10 ], [ %15, %13 ]
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19, i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 11, i32 7, i32 7)
ret i32 0
}
/* Variables and functions */
size_t make_size_t(int x) { return (size_t)x; }


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

x86 assembly (clang, -O2):
<make_size_t>:
movslq %edi,%rax
ret

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

LLVM IR (-O2):
define i64 @make_size_t(i32 %0) {
%2 = sext i32 %0 to i64
ret i64 %2
}
int gca_cmp2_char(const void *aa, const void *bb, void *p) {
  (void)p;
  const char a = *(const char *)aa;
  const char b = *(const char *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp2_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movsbl -0x19(%rbp),%eax
movsbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
movsbl -0x1a(%rbp),%ecx
movsbl -0x19(%rbp),%edx
cmp    %edx,%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp2_char>:
mov    (%rdi),%cl
mov    (%rsi),%dl
xor    %eax,%eax
xor    %esi,%esi
cmp    %dl,%cl
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp2_char(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
store i8 %11, i8* %7
%12 = load i8*, i8** %5
%13 = load i8, i8* %12
store i8 %13, i8* %8
%14 = load i8, i8* %7
%15 = sext i8 %14 to i32
%16 = load i8, i8* %8
%17 = sext i8 %16 to i32
%18 = icmp sgt i32 %15, %17
%19 = zext i1 %18 to i32
%20 = load i8, i8* %8
%21 = sext i8 %20 to i32
%22 = load i8, i8* %7
%23 = sext i8 %22 to i32
%24 = icmp sgt i32 %21, %23
%25 = zext i1 %24 to i32
%26 = sub nsw i32 %19, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @gca_cmp2_char(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = load i8, i8* %0
%5 = load i8, i8* %1
%6 = icmp sgt i8 %4, %5
%7 = zext i1 %6 to i32
%8 = icmp sgt i8 %5, %4
%9 = sext i1 %8 to i32
%10 = add nsw i32 %9, %7
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f_3(char *a) { printf("f_3\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"f_3\00"
define void @f_3(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gotoxy(int, int);
int /*<<< orphan*/ printf(char *, char *);
int strlen(char *);
void printCentered(char string[], int initX, int endX, int y) {
  gotoxy((endX - initX) / 2 - strlen(string) / 2, y);
  printf("%s", string);
}


x86 assembly (clang, -O0):
<printCentered>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%edi
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    %eax,%edi
mov    -0x14(%rbp),%esi
call   1050 <gotoxy@plt>
mov    -0x8(%rbp),%rsi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCentered>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %rdi,%rbx
sub    %esi,%edx
mov    %edx,%ebp
shr    $0x1f,%ebp
add    %edx,%ebp
sar    %ebp
call   1030 <strlen@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
sub    %ecx,%ebp
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <gotoxy@plt>
lea    0xe9a(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printCentered(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
%12 = sdiv i32 %11, 2
%13 = load i8*, i8** %5
%14 = call i32 @strlen(i8* %13)
%15 = sdiv i32 %14, 2
%16 = sub nsw i32 %12, %15
%17 = load i32, i32* %8
%18 = call i32 @gotoxy(i32 %16, i32 %17)
%19 = load i8*, i8** %5
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printCentered(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %1
%6 = sdiv i32 %5, 2
%7 = tail call i32 @strlen(i8* %0)
%8 = sdiv i32 %7, -2
%9 = add nsw i32 %8, %6
%10 = tail call i32 @gotoxy(i32 %9, i32 %3)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned long long f(unsigned long long a) { return a | 0x100000000ull; }


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

x86 assembly (clang, -O2):
<f>:
movabs $0x100000000,%rax
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = or i64 %3, 4294967296
ret i64 %4
}

LLVM IR (-O2):
define i64 @f(i64 %0) {
%2 = or i64 %0, 4294967296
ret i64 %2
}
void _M2_wrapc_finish() {}


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

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

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

LLVM IR (-O2):
define void @_M2_wrapc_finish() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, float, float);
int main(int argc, const char *argv[]) {
  float firstNumber = 123.45;
  float secondNumber = 234.56;
  double myDouble = firstNumber + secondNumber;
  printf("The value of myDouble is %f, which is %f plus %f.\n", myDouble,
         firstNumber, secondNumber);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movss  0xee0(%rip),%xmm1
movss  0xedc(%rip),%xmm2
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"The value of myDouble is %f, which is %f plus %f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca float
%6 = alloca float
%7 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
store float 0x405EDCCCC0000000, float* %5
store float 0x406D51EB80000000, float* %6
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fadd float %8, %9
%11 = fpext float %10 to double
store double %11, double* %7
%12 = load double, double* %7
%13 = load float, float* %5
%14 = load float, float* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), double %12, float %13, float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [51 x i8] c"The value of myDouble is %f, which is %f plus %f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), double 0x4076602900000000, float 0x405EDCCCC0000000, float 0x406D51EB80000000)
ret i32 0
}
double *simetric(double *p, double *s) {
  int i;
  for (i = 0; i < 2; i++) {
    s[i] = -p[i];
  }
  return s;
}


x86 assembly (clang, -O0):
<simetric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    115c <simetric+0x5c>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <simetric+0x13>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simetric>:
mov    %rsi,%rax
movsd  (%rdi),%xmm0
movaps 0xef2(%rip),%xmm1
xorps  %xmm1,%xmm0
movlps %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
xorps  %xmm1,%xmm0
movlps %xmm0,0x8(%rsi)
ret

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

LLVM IR (-O2):
define double* @simetric(double* nocapture %0, double* returned writeonly %1) {
%3 = load double, double* %0
%4 = fneg double %3
store double %4, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = fneg double %6
%8 = getelementptr inbounds double, double* %1, i64 1
store double %7, double* %8
ret double* %1
}
/* Variables and functions */
int isalpha(int);
int alpha(int c) { return isalpha(c); }


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

x86 assembly (clang, -O2):
<alpha>:
jmp    1030 <isalpha@plt>

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

LLVM IR (-O2):
define i32 @alpha(i32 %0) {
%2 = tail call i32 @isalpha(i32 %0)
ret i32 %2
}
int ti_tanh_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_tanh_start(double* nocapture readnone %0) {
ret i32 0
}
void __kernel_rem_pio2(void) {}


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

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

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

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