xunge/DecIR huggingface dataset:
float argument(x, y)
float x, y;
{
  if (x == 0.0 && y == 0.0)
    return (0.0);
  else
    return ((float)atan2((double)y, (double)x));
}


x86 assembly (clang, -O0):
<argument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm1,-0x18(%rbp)
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    117c <argument+0x6c>
jp     117c <argument+0x6c>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    117c <argument+0x6c>
jp     117c <argument+0x6c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119c <argument+0x8c>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <atan2@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argument>:
cvtsd2ss %xmm0,%xmm2
cvtsd2ss %xmm1,%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jne    112d <argument+0x1d>
jp     112d <argument+0x1d>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm3
jne    112d <argument+0x1d>
jp     112d <argument+0x1d>
ret
push   %rax
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
call   1030 <atan2@plt>
cvtsd2ss %xmm0,%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define float @argument(double %0, double %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = fptrunc double %0 to float
%7 = fptrunc double %1 to float
store float %6, float* %4
store float %7, float* %5
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = fcmp oeq double %9, 0.000000e+00
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load float, float* %5
%13 = fpext float %12 to double
%14 = fcmp oeq double %13, 0.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %11
store float 0.000000e+00, float* %3
br label %23
16: ; preds = %11, %2
%17 = load float, float* %5
%18 = fpext float %17 to double
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = call double @atan2(double %18, double %20)
%22 = fptrunc double %21 to float
store float %22, float* %3
br label %23
23: ; preds = %16, %15
%24 = load float, float* %3
ret float %24
}

LLVM IR (-O2):
define float @argument(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fcmp oeq float %3, 0.000000e+00
%6 = fcmp oeq float %4, 0.000000e+00
%7 = and i1 %5, %6
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = fpext float %3 to double
%10 = fpext float %4 to double
%11 = tail call double @atan2(double %10, double %9)
%12 = fptrunc double %11 to float
br label %13
13: ; preds = %2, %8
%14 = phi float [ %12, %8 ], [ 0.000000e+00, %2 ]
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version(void) {
  printf("spi-hdlc-adapter "
         "0.06"
         " ("
         "07:57:18"
         " "
         "Mar 17 2022"
         ")\n");
  printf("Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\n");
}


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

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"spi-hdlc-adapter 0.06 (07:57:18 Mar 17 2022)\0A\00"
@.str.1 = [64 x i8] c"Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"spi-hdlc-adapter 0.06 (07:57:18 Mar 17 2022)\00"
@str.2 = [63 x i8] c"Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writebyte(unsigned short);
void writeword(unsigned short w) {
  writebyte((w) / 256);
  writebyte((w) % 256);
}


x86 assembly (clang, -O0):
<writeword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
movzwl %ax,%edi
call   1030 <writebyte@plt>
movzwl -0x2(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dx,%ax
movzwl %ax,%edi
call   1030 <writebyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeword>:
push   %rbx
mov    %edi,%ebx
shr    $0x8,%edi
call   1030 <writebyte@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <writebyte@plt>

LLVM IR (-O0):
define void @writeword(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = sdiv i32 %4, 256
%6 = trunc i32 %5 to i16
%7 = call i32 @writebyte(i16 zeroext %6)
%8 = load i16, i16* %2
%9 = zext i16 %8 to i32
%10 = srem i32 %9, 256
%11 = trunc i32 %10 to i16
%12 = call i32 @writebyte(i16 zeroext %11)
ret void
}

LLVM IR (-O2):
define void @writeword(i16 zeroext %0) {
%2 = lshr i16 %0, 8
%3 = tail call i32 @writebyte(i16 zeroext %2)
%4 = and i16 %0, 255
%5 = tail call i32 @writebyte(i16 zeroext %4)
ret void
}
int count_lbx_entry_delimiter_chars(char *s) {
  int i;
  i = 0;
  while ((s[i] == '\r') || (s[i] == '\n'))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<count_lbx_entry_delimiter_chars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0xd(%rbp)
je     113e <count_lbx_entry_delimiter_chars+0x3e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114e <count_lbx_entry_delimiter_chars+0x4e>
jmp    115c <count_lbx_entry_delimiter_chars+0x5c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <count_lbx_entry_delimiter_chars+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_lbx_entry_delimiter_chars>:
xor    %eax,%eax
jmp    1114 <count_lbx_entry_delimiter_chars+0x14>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rax
movzbl (%rdi,%rax,1),%ecx
cmp    $0xd,%cl
je     1110 <count_lbx_entry_delimiter_chars+0x10>
cmp    $0xa,%cl
je     1110 <count_lbx_entry_delimiter_chars+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_lbx_entry_delimiter_chars(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 13, label %6
i8 10, label %6
]
6: ; preds = %2, %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int test_imm_B2uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xB2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B2uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 178
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
unsigned int hash_func_int32_t(void *ptr) {
  int32_t v = *((int32_t *)ptr);
  if (sizeof(int32_t) > sizeof(unsigned int))
    return v ^ (v >> 32);
  else
    return v;
}


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

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

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

LLVM IR (-O2):
define i32 @hash_func_int32_t(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
unsigned int test_11(int x) { return ~(x >> 31); }


x86 assembly (clang, -O0):
<test_11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_11(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, -1
ret i32 %3
}
/* Variables and functions */
int idglobal_add(char *, int, int, int);
int idlocal_add(char *, int, int, int);
int id_add(char *name, int len, int type, int size) {
  return ((type & (1 << 6)) ? idlocal_add(name, len, type, size)
                            : idglobal_add(name, len, type, size));
}


x86 assembly (clang, -O0):
<id_add>:
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
and    $0x40,%eax
cmp    $0x0,%eax
je     115e <id_add+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <idlocal_add@plt>
mov    %eax,-0x18(%rbp)
jmp    1173 <id_add+0x53>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <idglobal_add@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id_add>:
test   $0x40,%dl
jne    112a <id_add+0xa>
jmp    1040 <idglobal_add@plt>
jmp    1030 <idlocal_add@plt>

LLVM IR (-O0):
define i32 @id_add(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 = and i32 %9, 64
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @idlocal_add(i8* %13, i32 %14, i32 %15, i32 %16)
br label %24
18: ; preds = %4
%19 = load i8*, i8** %5
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = call i32 @idglobal_add(i8* %19, i32 %20, i32 %21, i32 %22)
br label %24
24: ; preds = %18, %12
%25 = phi i32 [ %17, %12 ], [ %23, %18 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @id_add(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 64
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @idlocal_add(i8* %0, i32 %1, i32 %2, i32 %3)
br label %11
9: ; preds = %4
%10 = tail call i32 @idglobal_add(i8* %0, i32 %1, i32 %2, i32 %3)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int xbee_setuplogAPI(char *, int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int xbee_setuplog(char *path, int baudrate, int logfd) {
  return xbee_setuplogAPI(path, baudrate, logfd, 0, 0);
}


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

x86 assembly (clang, -O2):
<xbee_setuplog>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <xbee_setuplogAPI@plt>

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

LLVM IR (-O2):
define i32 @xbee_setuplog(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @xbee_setuplogAPI(i8* %0, i32 %1, i32 %2, i32 0, i32 0)
ret i32 %4
}
void ARGBShuffleRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGBShuffleRow_C() {
ret void
}
/* Variables and functions */
int close(int);
int serialClose(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<serialClose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @serialClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void ff_hevc_put_hevc_qpel_hv4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv4_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/
deceptiveTrapKLooseEncodingFunctionProblemEvaluation(char *, double *, double *,
                                                     int);
void deceptiveTrap5LooseEncodingFunctionProblemEvaluation(
    char *parameters, double *objective_value, double *constraint_value) {
  deceptiveTrapKLooseEncodingFunctionProblemEvaluation(
      parameters, objective_value, constraint_value, 5);
}


x86 assembly (clang, -O0):
<deceptiveTrap5LooseEncodingFunctionProblemEvaluation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x5,%ecx
call   1030 <deceptiveTrapKLooseEncodingFunctionProblemEvaluation@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deceptiveTrap5LooseEncodingFunctionProblemEvaluation>:
mov    $0x5,%ecx
jmp    1030 <deceptiveTrapKLooseEncodingFunctionProblemEvaluation@plt>

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

LLVM IR (-O2):
define void @deceptiveTrap5LooseEncodingFunctionProblemEvaluation(i8* %0, double* %1, double* %2) {
%4 = tail call i32 @deceptiveTrapKLooseEncodingFunctionProblemEvaluation(i8* %0, double* %1, double* %2, i32 5)
ret void
}
void mpool_free() {}


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

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

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

LLVM IR (-O2):
define void @mpool_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void show_credentials(void) {
  printf("Security credential information isn't available.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<show_credentials>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_credentials>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"Security credential information isn't available.\0A\00"
define void @show_credentials() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [49 x i8] c"Security credential information isn't available.\00"
define void @show_credentials() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int __isleap(int year) {
  return (!(year % 4) && ((year % 100) || !(year % 400)));
}


x86 assembly (clang, -O0):
<__isleap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1155 <__isleap+0x55>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x6(%rbp)
jne    114f <__isleap+0x4f>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isleap>:
xor    %eax,%eax
test   $0x3,%dil
je     1109 <__isleap+0x9>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
mov    $0x1,%eax
cmp    $0x28f5c28,%edx
ja     1108 <__isleap+0x8>
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @__isleap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = icmp ne i32 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 100
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %10, %6
%16 = phi i1 [ true, %6 ], [ %14, %10 ]
br label %17
17: ; preds = %15, %1
%18 = phi i1 [ false, %1 ], [ %16, %15 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @__isleap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %7, %1
%12 = phi i32 [ 0, %1 ], [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}
int test4(int g, int h) { return g | (h & g); }


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

x86 assembly (clang, -O2):
<test4>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @test4(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* %3
%8 = and i32 %6, %7
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @test4(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Variables and functions */
char **realloc(char **, int);
char *strdup(char *);
char **addString(char **src, char *line, int *size) {
  int l = *size;
  src = realloc(src, ++l * sizeof(char *));
  src[l - 1] = strdup(line);
  *size = l;
  return src;
}


x86 assembly (clang, -O0):
<addString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cltq
shl    $0x3,%rax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addString>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
movslq (%rdx),%rbx
lea    0x1(%rbx),%ebp
lea    0x8(,%rbx,8),%esi
call   1030 <realloc@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1040 <strdup@plt>
mov    %rax,(%r12,%rbx,8)
mov    %ebp,(%r15)
mov    %r12,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8** @addString(i8** %0, i8* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = load i32*, i32** %6
%9 = load i32, i32* %8
store i32 %9, i32* %7
%10 = load i8**, i8*** %4
%11 = load i32, i32* %7
%12 = add nsw i32 %11, 1
store i32 %12, i32* %7
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 8
%15 = trunc i64 %14 to i32
%16 = call i8** @realloc(i8** %10, i32 %15)
store i8** %16, i8*** %4
%17 = load i8*, i8** %5
%18 = call i8* @strdup(i8* %17)
%19 = load i8**, i8*** %4
%20 = load i32, i32* %7
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %19, i64 %22
store i8* %18, i8** %23
%24 = load i32, i32* %7
%25 = load i32*, i32** %6
store i32 %24, i32* %25
%26 = load i8**, i8*** %4
ret i8** %26
}

LLVM IR (-O2):
define i8** @addString(i8** %0, i8* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = shl i32 %5, 3
%7 = tail call i8** @realloc(i8** %0, i32 %6)
%8 = tail call i8* @strdup(i8* %1)
%9 = sext i32 %4 to i64
%10 = getelementptr inbounds i8*, i8** %7, i64 %9
store i8* %8, i8** %10
store i32 %5, i32* %2
ret i8** %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr, "Usage: ppgap groupname.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: ppgap groupname.\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: ppgap groupname.\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ BIO_free_all(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_pop(int /*<<< orphan*/ *);
void do_free_upto(BIO *f, BIO *upto) {
  if (upto) {
    BIO *tbio;
    do {
      tbio = BIO_pop(f);
      BIO_free(f);
      f = tbio;
    } while (f != upto);
  } else
    BIO_free_all(f);
}


x86 assembly (clang, -O0):
<do_free_upto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1181 <do_free_upto+0x51>
jmp    1150 <do_free_upto+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <BIO_pop@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <BIO_free@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1150 <do_free_upto+0x20>
jmp    118a <do_free_upto+0x5a>
mov    -0x8(%rbp),%rdi
call   1050 <BIO_free_all@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_free_upto>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     1161 <do_free_upto+0x31>
mov    %rsi,%r14
mov    %rbx,%rdi
call   1030 <BIO_pop@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1040 <BIO_free@plt>
mov    %r15,%rbx
cmp    %r14,%r15
jne    1140 <do_free_upto+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <BIO_free_all@plt>

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

LLVM IR (-O2):
define void @do_free_upto(i32* %0, i32* readnone %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32* [ %6, %4 ], [ %0, %2 ]
%6 = tail call i32* @BIO_pop(i32* %5)
%7 = tail call i32 @BIO_free(i32* %5)
%8 = icmp eq i32* %6, %1
br i1 %8, label %11, label %4
9: ; preds = %2
%10 = tail call i32 @BIO_free_all(i32* %0)
br label %11
11: ; preds = %4, %9
ret void
}
/* Variables and functions */
char tolower(char);
void strtolower(char *s, size_t l) {
  size_t i;
  for (i = 0; i < l; i++)
    s[i] = tolower(s[i]);
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1165 <strtolower+0x55>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <strtolower+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1147 <strtolower+0x37>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <strtolower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @strtolower(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %19, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i8, i8* %11, i64 %12
%14 = load i8, i8* %13
%15 = call signext i8 @tolower(i8 signext %14)
%16 = load i8*, i8** %3
%17 = load i64, i64* %5
%18 = getelementptr inbounds i8, i8* %16, i64 %17
store i8 %15, i8* %18
br label %19
19: ; preds = %10
%20 = load i64, i64* %5
%21 = add i64 %20, 1
store i64 %21, i64* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @strtolower(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @tolower(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void flexray_leaf_free(void *leaf) { free(leaf); }


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

LLVM IR (-O0):
define void @flexray_leaf_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 @flexray_leaf_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void sysError(const char *err) {
  fprintf(stdout, "Error: %s\n\n", err);
  exit(2);
}


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

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"Error: %s\0A\0A\00"
define void @sysError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"Error: %s\0A\0A\00"
define void @sysError(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int x_close(int fd) {
  const int result = close(fd);
  if (result == -1) {
    perror("close() error");
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<x_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    116a <x_close+0x3a>
lea    0xea9(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_close>:
push   %rax
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     113d <x_close+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"close() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i32 %2
}
void INT_Excep_PERIB_INTB151(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB151() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alloc_free(char *);
void dns_domain_free(char **out) {
  if (*out) {
    alloc_free(*out);
    *out = 0;
  }
}


x86 assembly (clang, -O0):
<dns_domain_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <dns_domain_free+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <alloc_free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_domain_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <dns_domain_free+0x18>
call   1030 <alloc_free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @dns_domain_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @alloc_free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret void
}
void RTLdrGetBits(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLdrGetBits() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGGeometryRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGGeometryRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGGeometryRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
int foo() { return 42; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 42
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 42
}
int timeout_v_abi(void) { return 0x20160224; }


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

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

LLVM IR (-O0):
define i32 @timeout_v_abi() {
ret i32 538313252
}

LLVM IR (-O2):
define i32 @timeout_v_abi() {
ret i32 538313252
}
/* Variables and functions */
void *dlsym(void *, char *);
void *mpgfio_dlsym(void *handle, char *symbol) { return dlsym(handle, symbol); }


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

x86 assembly (clang, -O2):
<mpgfio_dlsym>:
jmp    1030 <dlsym@plt>

LLVM IR (-O0):
define i8* @mpgfio_dlsym(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 = load i8*, i8** %4
%7 = call i8* @dlsym(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @mpgfio_dlsym(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
char *basename(char *filename) {
  char *f = filename;
  while (*f) {
    if (*f == '/')
      filename = f + 1;
    f++;
  }
  return filename;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <basename+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1139 <basename+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <basename+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <basename+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <basename+0x10>
test   %dl,%dl
jne    1113 <basename+0x13>
ret

LLVM IR (-O0):
define i8* @basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 47
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %2
br label %17
17: ; preds = %14, %9
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
br label %5
20: ; preds = %5
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @basename(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = phi i8* [ %0, %1 ], [ %10, %8 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %3, %2 ]
%10 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
11: ; preds = %2
ret i8* %3
}
int getrusage(int who, struct rusage *usage) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(who);
  (void)(usage);
  return -1;
}


x86 assembly (clang, -O0):
<getrusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrusage>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rusage = type opaque
@.str = [3 x i8] c"# \00"
@__FUNCTION__.getrusage = [10 x i8] c"getrusage\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @getrusage(i32 %0, %struct.rusage* %1) {
%3 = alloca i32
%4 = alloca %struct.rusage*
store i32 %0, i32* %3
store %struct.rusage* %1, %struct.rusage** %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.getrusage, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load i32, i32* %3
%10 = load %struct.rusage*, %struct.rusage** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.rusage = type opaque
@.str = [3 x i8] c"# \00"
@__FUNCTION__.getrusage = [10 x i8] c"getrusage\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @getrusage(i32 %0, %struct.rusage* nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.getrusage, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i32 -1
}
char *platform_id() { return "amd64"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"amd64\00"
define i8* @platform_id() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"amd64\00"
define i8* @platform_id() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bit_gravity;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
int get_XWindowAttributes_bit_gravity(void *_p) {
  return (int)((XWindowAttributes *)_p)->bit_gravity;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XWindowAttributes_bit_gravity(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void main() {
  int a[4] = {1, 2, 3, 4};
  int *ptr1 = (int *)(&a + 1);
  int *ptr2 = (int *)((int)a + 1);
  int *ptr3 = a + 1;
  printf("%p,%p,%p,%p", ptr1[-2], ptr1[-1], *ptr2, *ptr3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
lea    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rax),%esi
mov    -0x18(%rbp),%rax
mov    -0x4(%rax),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8d
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rax
cltq
mov    0x1(%rax),%ecx
lea    0xee2(%rip),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x2,%r8d
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [12 x i8] c"%p,%p,%p,%p\00"
define void @main() {
%1 = alloca [4 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = bitcast [4 x i32]* %1 to i8*
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 1
%7 = bitcast [4 x i32]* %6 to i32*
store i32* %7, i32** %2
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%9 = ptrtoint i32* %8 to i32
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %3
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32* %14, i32** %4
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 -2
%17 = load i32, i32* %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 -1
%20 = load i32, i32* %19
%21 = load i32*, i32** %3
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %20, i32 %22, i32 %24)
ret void
}

LLVM IR (-O2):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [12 x i8] c"%p,%p,%p,%p\00"
define void @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = ptrtoint [4 x i32]* %1 to i64
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = or i64 %5, 1
%7 = inttoptr i64 %6 to i32*
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3, i32 4, i32 %8, i32 2)
ret void
}
void ata_acpi_hotplug_init(struct ata_host *host) {}


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

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

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

LLVM IR (-O2):
%struct.ata_host = type opaque
define void @ata_acpi_hotplug_init(%struct.ata_host* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned char *find_device_deep(int /*<<< orphan*/, int, unsigned int);
unsigned char *find_device(unsigned int devid) {
  return find_device_deep(0, 0x30000000, devid);
}


x86 assembly (clang, -O0):
<find_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x30000000,%esi
call   1030 <find_device_deep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_device>:
mov    %edi,%edx
xor    %edi,%edi
mov    $0x30000000,%esi
jmp    1030 <find_device_deep@plt>

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

LLVM IR (-O2):
define i8* @find_device(i32 %0) {
%2 = tail call i8* @find_device_deep(i32 0, i32 805306368, i32 %0)
ret i8* %2
}