xunge/DecIR huggingface dataset:
int test_imm_F1int8_reg(signed char val) {
  return ((val) & (-0xF1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F1int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff0f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_F1int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -241
%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_F1int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -241
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double va_double(__builtin_va_list l) { return __builtin_va_arg(l, double); }


x86 assembly (clang, -O0):
<va_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0xa0,%eax
ja     114c <va_double+0x4c>
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%edx
mov    -0x20(%rbp),%rsi
movslq %edx,%rax
add    0x10(%rsi),%rax
add    $0x10,%edx
mov    %edx,(%rcx)
mov    %rax,-0x28(%rbp)
jmp    1163 <va_double+0x63>
mov    -0x20(%rbp),%rcx
mov    0x8(%rcx),%rdx
mov    %rdx,%rax
add    $0x8,%rdx
mov    %rdx,0x8(%rcx)
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<va_double>:
mov    0x4(%rdi),%ecx
cmp    $0xa0,%rcx
ja     111e <va_double+0x1e>
mov    %rcx,%rax
add    0x10(%rdi),%rax
add    $0x10,%ecx
mov    %ecx,0x4(%rdi)
movsd  (%rax),%xmm0
ret
mov    0x8(%rdi),%rax
lea    0x8(%rax),%rcx
mov    %rcx,0x8(%rdi)
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define double @va_double(%struct.__va_list_tag* %0) {
%2 = alloca %struct.__va_list_tag*
store %struct.__va_list_tag* %0, %struct.__va_list_tag** %2
%3 = load %struct.__va_list_tag*, %struct.__va_list_tag** %2
%4 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %3, i32 0, i32 1
%5 = load i32, i32* %4
%6 = icmp ule i32 %5, 160
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %3, i32 0, i32 3
%9 = load i8*, i8** %8
%10 = getelementptr i8, i8* %9, i32 %5
%11 = bitcast i8* %10 to double*
%12 = add i32 %5, 16
store i32 %12, i32* %4
br label %18
13: ; preds = %1
%14 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %3, i32 0, i32 2
%15 = load i8*, i8** %14
%16 = bitcast i8* %15 to double*
%17 = getelementptr i8, i8* %15, i32 8
store i8* %17, i8** %14
br label %18
18: ; preds = %13, %7
%19 = phi double* [ %11, %7 ], [ %16, %13 ]
%20 = load double, double* %19
ret double %20
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define double @va_double(%struct.__va_list_tag* nocapture %0) {
%2 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %0, i64 0, i32 1
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 161
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %0, i64 0, i32 3
%7 = load i8*, i8** %6
%8 = zext i32 %3 to i64
%9 = getelementptr i8, i8* %7, i64 %8
%10 = add nuw nsw i32 %3, 16
store i32 %10, i32* %2
br label %15
11: ; preds = %1
%12 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %0, i64 0, i32 2
%13 = load i8*, i8** %12
%14 = getelementptr i8, i8* %13, i64 8
store i8* %14, i8** %12
br label %15
15: ; preds = %11, %5
%16 = phi i8* [ %9, %5 ], [ %13, %11 ]
%17 = bitcast i8* %16 to double*
%18 = load double, double* %17
ret double %18
}
int is_start_with_number(const char *str) {
  if (*str >= '0' && *str <= '9')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_start_with_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1134 <is_start_with_number+0x34>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     1134 <is_start_with_number+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <is_start_with_number+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_start_with_number>:
mov    (%rdi),%cl
add    $0xd0,%cl
xor    %eax,%eax
cmp    $0xa,%cl
setb   %al
ret

LLVM IR (-O0):
define i32 @is_start_with_number(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 57
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %15
14: ; preds = %8, %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_start_with_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
adrreg0imm1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((p0[10000000]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0x21,0x2625a00(%rax)
ja     1135 <adrreg0imm1+0x35>
movl   $0x1,-0x4(%rbp)
jmp    113c <adrreg0imm1+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0imm1>:
xor    %eax,%eax
cmpl   $0x22,0x2625a00(%r8)
22
setb   %al
ret

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

LLVM IR (-O2):
define i32 @adrreg0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = icmp ult i32 %8, 34
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned short);
void print_ushort(unsigned short n) { printf("%hu", n); }


x86 assembly (clang, -O0):
<print_ushort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    0xeda(%rip),%rdi
movzwl -0x2(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ushort>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%hu\00"
define void @print_ushort(i16 zeroext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 zeroext %0)
ret void
}
int __libc_putenv(const char *variable) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @__libc_putenv(i8* nocapture readnone %0) {
ret i32 -1
}
unsigned short swap_two_bytes(unsigned short value) {
  unsigned char first_byte, second_byte;
  first_byte = value << 8 >> 8;
  second_byte = value >> 8;
  return first_byte << 8 ^ second_byte;
}


x86 assembly (clang, -O0):
<swap_two_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x8,%eax
sar    $0x8,%eax
mov    %al,-0x3(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0x4(%rbp)
movzbl -0x3(%rbp),%eax
shl    $0x8,%eax
movzbl -0x4(%rbp),%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_two_bytes>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @swap_two_bytes(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
%4 = alloca i8
store i16 %0, i16* %2
%5 = load i16, i16* %2
%6 = zext i16 %5 to i32
%7 = shl i32 %6, 8
%8 = ashr i32 %7, 8
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i16, i16* %2
%11 = zext i16 %10 to i32
%12 = ashr i32 %11, 8
%13 = trunc i32 %12 to i8
store i8 %13, i8* %4
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 8
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = xor i32 %16, %18
%20 = trunc i32 %19 to i16
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @swap_two_bytes(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
int getpow2(int x) {
  int res = 0;
  while ((x >>= 1))
    res++;
  return res;
}


x86 assembly (clang, -O0):
<getpow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <getpow2+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <getpow2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpow2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <getpow2+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <getpow2+0x10>
ret

LLVM IR (-O0):
define i32 @getpow2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
store i32 %6, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @getpow2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
int revnum(int n) {
  int rem = 0, rev = 0;
  while (n > 0) {
    rem = n % 10;
    rev = rev * 10 + rem;
    n = n / 10;
  }
  return rev;
}


x86 assembly (clang, -O0):
<revnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    114a <revnum+0x4a>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
imul   $0xa,-0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1115 <revnum+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<revnum>:
xor    %eax,%eax
test   %edi,%edi
jle    1131 <revnum+0x31>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
lea    (%rcx,%rax,2),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <revnum+0x10>
ret

LLVM IR (-O0):
define i32 @revnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 10
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = mul nsw i32 %11, 10
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = sdiv i32 %15, 10
store i32 %16, i32* %2
br label %5
17: ; preds = %5
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @revnum(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = urem i32 %5, 10
%7 = mul nsw i32 %4, 10
%8 = add nsw i32 %7, %6
%9 = udiv i32 %5, 10
%10 = icmp ult i32 %5, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
void regulo_strcpy(void *dest, const char *source) {
  strcpy((char *)dest, source);
}


x86 assembly (clang, -O0):
<regulo_strcpy>:
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 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regulo_strcpy>:
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @regulo_strcpy(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int ENOSYS;
int proc_modify_policy_governor(unsigned int cpu, char *governor) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<proc_modify_policy_governor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_modify_policy_governor>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @proc_modify_policy_governor(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @proc_modify_policy_governor(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
int comparar(int *a, int *b) {
  if (*a < *b) {
    return -1;
  } else {
    if (*a > *b) {
      return 1;
    } else {
      return 0;
    }
  }
}


x86 assembly (clang, -O0):
<comparar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <comparar+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <comparar+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1148 <comparar+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <comparar+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparar>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comparar(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %20
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = icmp sgt i32 %14, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 1, i32* %3
br label %20
19: ; preds = %12
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @comparar(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = icmp sgt i32 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int width;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
void set_XConfigureRequestEvent_width(void *_p, int _v) {
  ((XConfigureRequestEvent *)_p)->width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XConfigureRequestEvent_width>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XConfigureRequestEvent_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int up_irq_is_exist(unsigned int irq) {
  if (irq >= 155)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<up_irq_is_exist>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9b,-0x8(%rbp)
jb     1120 <up_irq_is_exist+0x20>
movl   $0x1,-0x4(%rbp)
jmp    1127 <up_irq_is_exist+0x27>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_irq_is_exist>:
xor    %eax,%eax
cmp    $0x9b,%edi
setae  %al
ret

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

LLVM IR (-O2):
define i32 @up_irq_is_exist(i32 %0) {
%2 = icmp ugt i32 %0, 154
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ libgieditor_close();
int /*<<< orphan*/ printf(char *);
void signal_handler(int unused) {
  if (libgieditor_close()) {
    printf("Error closing libgieditor\n");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <libgieditor_close@plt>
cmp    $0x0,%rax
je     1158 <signal_handler+0x28>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
xor    %eax,%eax
call   1040 <libgieditor_close@plt>
test   %rax,%rax
je     1149 <signal_handler+0x19>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Error closing libgieditor\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @libgieditor_close()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"Error closing libgieditor\00"
define void @signal_handler(i32 %0) {
%2 = tail call i64 (...) @libgieditor_close()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *readline_check(int, int /*<<< orphan*/);
char *readline(int fd) { return readline_check(fd, 0); }


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

x86 assembly (clang, -O2):
<readline>:
xor    %esi,%esi
jmp    1030 <readline_check@plt>

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

LLVM IR (-O2):
define i8* @readline(i32 %0) {
%2 = tail call i8* @readline_check(i32 %0, i32 0)
ret i8* %2
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
void minipack_pack_neg_fixnum(void *ptr, int8_t value, size_t *sz) {
  *sz = 1;
  *((int8_t *)ptr) = (32 + value) | 0xE0;
}


x86 assembly (clang, -O0):
<minipack_pack_neg_fixnum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x1,(%rax)
mov    -0xc(%rbp),%ecx
add    $0x20,%ecx
or     $0xe0,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_pack_neg_fixnum>:
movq   $0x1,(%rdx)
add    $0x20,%esi
or     $0xe0,%esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @minipack_pack_neg_fixnum(i8* %0, i32 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i64*, i64** %6
store i64 1, i64* %7
%8 = load i32, i32* %5
%9 = add nsw i32 32, %8
%10 = or i32 %9, 224
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @minipack_pack_neg_fixnum(i8* nocapture writeonly %0, i32 %1, i64* nocapture writeonly %2) {
store i64 1, i64* %2
%4 = add nsw i32 %1, 32
%5 = or i32 %4, 224
%6 = bitcast i8* %0 to i32*
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PositionStateHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void PositionStateUpdated() { UAVObjUpdated(PositionStateHandle()); }


x86 assembly (clang, -O0):
<PositionStateUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PositionStateHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PositionStateUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <PositionStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @PositionStateUpdated() {
%1 = call i32 (...) @PositionStateHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PositionStateUpdated() {
%1 = tail call i32 (...) @PositionStateHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
void write_dword(unsigned char *addr, unsigned int value) {
  *(unsigned int *)addr = value;
}


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

x86 assembly (clang, -O2):
<write_dword>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @write_dword(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int bar(char *);
int foo(void) {
  char b[100];
  return bar(b);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
call   1030 <bar@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x68,%rsp
mov    %rsp,%rdi
call   1030 <bar@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @bar(i8* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @bar(i8* %2)
ret i32 %3
}
void PrintMsg(Str) char *Str;
{ mvprintw(23, 1, "%s", Str); }


x86 assembly (clang, -O0):
<PrintMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x17,%edi
mov    $0x1,%esi
lea    0xecf(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintMsg>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdx
mov    $0x17,%edi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <mvprintw@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @PrintMsg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i32, i32, i8*, i8*, ...) bitcast (i32 (...)* @mvprintw to i32 (i32, i32, i8*, i8*, ...)*)(i32 23, i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @PrintMsg(i8* %0) {
%2 = tail call i32 (i32, i32, i8*, i8*, ...) bitcast (i32 (...)* @mvprintw to i32 (i32, i32, i8*, i8*, ...)*)(i32 23, i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void myth_log_pause_body(void) {}


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

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

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

LLVM IR (-O2):
define void @myth_log_pause_body() {
ret void
}
/* Type definitions */
struct ptr_valid_batch {
  int dummy;
};

/* Variables and functions */
int ptr_valid_batch(struct ptr_valid_batch *, void const *, size_t, size_t,
                    int);
bool ptr_valid_batch_r(struct ptr_valid_batch *batch, const void *p,
                       size_t align, size_t size) {
  return ptr_valid_batch(batch, p, align, size, false);
}


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

x86 assembly (clang, -O2):
<ptr_valid_batch_r>:
xor    %r8d,%r8d
jmp    1030 <ptr_valid_batch@plt>

LLVM IR (-O0):
%struct.ptr_valid_batch = type { i32 }
define i32 @ptr_valid_batch_r(%struct.ptr_valid_batch* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca %struct.ptr_valid_batch*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store %struct.ptr_valid_batch* %0, %struct.ptr_valid_batch** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load %struct.ptr_valid_batch*, %struct.ptr_valid_batch** %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @ptr_valid_batch(%struct.ptr_valid_batch* %9, i8* %10, i64 %11, i64 %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.ptr_valid_batch = type { i32 }
define i32 @ptr_valid_batch_r(%struct.ptr_valid_batch* %0, i8* %1, i64 %2, i64 %3) {
%5 = tail call i32 @ptr_valid_batch(%struct.ptr_valid_batch* %0, i8* %1, i64 %2, i64 %3, i32 0)
ret i32 %5
}
void d2i_EC_PUBKEY_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_EC_PUBKEY_bio() {
ret void
}
/* Variables and functions */
scalar_t__ player_get_score();
float f_score() { return (float)player_get_score(); }


x86 assembly (clang, -O0):
<f_score>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <player_get_score@plt>
cvtsi2ss %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_score>:
push   %rax
xor    %eax,%eax
call   1030 <player_get_score@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f_score() {
%1 = call i64 (...) @player_get_score()
%2 = sitofp i64 %1 to float
ret float %2
}

LLVM IR (-O2):
define float @f_score() {
%1 = tail call i64 (...) @player_get_score()
%2 = sitofp i64 %1 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
scalar_t__ malloc(unsigned int);
char *save_malloc(unsigned int i) {
  char *res;
  if (!(res = (char *)malloc(i)))
    error("memory overflow");
  return res;
}


x86 assembly (clang, -O0):
<save_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114d <save_malloc+0x2d>
lea    0xeb8(%rip),%rdi
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <save_malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"memory overflow\00"
define i8* @save_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [16 x i8] c"memory overflow\00"
define i8* @save_malloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ dumpbuf(char *, scalar_t__);
scalar_t__ strlen(char *);
int main() {
  char *str = "hello world"
              "what is your name!!";
  dumpbuf(str, strlen(str) + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
call   1030 <dumpbuf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"hello worldwhat is your name!!\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = call i32 @dumpbuf(i8* %2, i64 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"hello worldwhat is your name!!\00"
define i32 @main() {
%1 = tail call i32 @dumpbuf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 31)
ret i32 0
}
int IToBcd(i)
int i;
{ return (((i / 10) << 4) | (i % 10)); }


x86 assembly (clang, -O0):
<IToBcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%eax
or     %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IToBcd>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @IToBcd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = shl i32 %4, 4
%6 = load i32, i32* %2
%7 = srem i32 %6, 10
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @IToBcd(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = shl i32 %2, 4
%4 = srem i32 %0, 10
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void terminal_out(char *fmsg) { printf("%s", fmsg); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @terminal_out(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_list() {
  printf("Printing list\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Printing list\00"
define void @print_list() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ optAbortRun();
void optAbortMain() { optAbortRun(); }


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

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

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

LLVM IR (-O2):
define void @optAbortMain() {
%1 = tail call i32 (...) @optAbortRun()
ret void
}
int test_imm_70int32_mem(int *val) {
  return ((*val) & (0x70 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_70int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 112
%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_70int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 112
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int diminuto_ipcl_stream_accept_generic(int, char *, int /*<<< orphan*/);
int diminuto_ipcl_stream_accept(int fd) {
  return diminuto_ipcl_stream_accept_generic(fd, (char *)0, 0);
}


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

x86 assembly (clang, -O2):
<diminuto_ipcl_stream_accept>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <diminuto_ipcl_stream_accept_generic@plt>

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

LLVM IR (-O2):
define i32 @diminuto_ipcl_stream_accept(i32 %0) {
%2 = tail call i32 @diminuto_ipcl_stream_accept_generic(i32 %0, i8* null, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ VMStringCopy(char *, char const *);
int VMStringLength(char *);
void VMStringConcatenate(char *dest, const char *src) {
  VMStringCopy(dest + VMStringLength(dest), src);
}


x86 assembly (clang, -O0):
<VMStringConcatenate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <VMStringLength@plt>
mov    -0x18(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <VMStringCopy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMStringConcatenate>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <VMStringLength@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <VMStringCopy@plt>

LLVM IR (-O0):
define void @VMStringConcatenate(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** %3
%7 = call i32 @VMStringLength(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = call i32 @VMStringCopy(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
define void @VMStringConcatenate(i8* %0, i8* %1) {
%3 = tail call i32 @VMStringLength(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @VMStringCopy(i8* %5, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_add();
void vm_op_add(void) {
  op_add();
  return;
}


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

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

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

LLVM IR (-O2):
define void @vm_op_add() {
%1 = tail call i32 (...) @op_add()
ret void
}
/* Variables and functions */
void *realloc(void *, int);
void *refrealloc(void *data, size_t size) {
  void *ptr = data - sizeof(size_t);
  ptr = realloc(ptr, sizeof(size_t) + size);
  size_t *cnt = (size_t *)ptr;
  *cnt = 0;
  ptr += sizeof(size_t);
  return ptr;
}


x86 assembly (clang, -O0):
<refrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<refrealloc>:
push   %rax
add    $0xfffffffffffffff8,%rdi
add    $0x8,%esi
call   1030 <realloc@plt>
movq   $0x0,(%rax)
add    $0x8,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @refrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64*
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
%8 = getelementptr i8, i8* %7, i64 -8
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i64, i64* %4
%11 = add i64 8, %10
%12 = trunc i64 %11 to i32
%13 = call i8* @realloc(i8* %9, i32 %12)
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = bitcast i8* %14 to i64*
store i64* %15, i64** %6
%16 = load i64*, i64** %6
store i64 0, i64* %16
%17 = load i8*, i8** %5
%18 = getelementptr i8, i8* %17, i64 8
store i8* %18, i8** %5
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @refrealloc(i8* %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 -8
%4 = trunc i64 %1 to i32
%5 = add i32 %4, 8
%6 = tail call i8* @realloc(i8* %3, i32 %5)
%7 = bitcast i8* %6 to i64*
store i64 0, i64* %7
%8 = getelementptr i8, i8* %6, i64 8
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() { abort(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @abort()
unreachable
}
int fun734() { return 734; }


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

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

LLVM IR (-O0):
define i32 @fun734() {
ret i32 734
}

LLVM IR (-O2):
define i32 @fun734() {
ret i32 734
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void mus_lfloat_to_char(unsigned char *j, float x) {
  unsigned char *ox = (unsigned char *)&x;
  memcpy((void *)j, (void *)ox, 4);
}


x86 assembly (clang, -O0):
<mus_lfloat_to_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_lfloat_to_char>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @mus_lfloat_to_char(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
%5 = alloca i8*
store i8* %0, i8** %3
store float %1, float* %4
%6 = bitcast float* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = load i8*, i8** %5
%9 = call i32 @memcpy(i8* %7, i8* %8, i32 4)
ret void
}

LLVM IR (-O2):
define void @mus_lfloat_to_char(i8* %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = bitcast float* %3 to i8*
%5 = call i32 @memcpy(i8* %0, i8* %4, i32 4)
ret void
}
const char *ls_costN_nm5_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<ls_costN_nm5_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
test   %eax,%eax
jne    1127 <ls_costN_nm5_name_in+0x27>
jmp    1117 <ls_costN_nm5_name_in+0x17>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <ls_costN_nm5_name_in+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm5_name_in>:
xor    %eax,%eax
test   %edi,%edi
lea    0xef5(%rip),%rcx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
define i8* @ls_costN_nm5_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 0, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* null, i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
define i8* @ls_costN_nm5_name_in(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %3
}
/* Type definitions */
struct entity_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy_shield(struct entity_t *);
void shield_shield_collision(struct entity_t *shield1,
                             struct entity_t *shield2) {
  destroy_shield(shield2);
}


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

x86 assembly (clang, -O2):
<shield_shield_collision>:
mov    %rsi,%rdi
jmp    1030 <destroy_shield@plt>

LLVM IR (-O0):
%struct.entity_t = type { i32 }
define void @shield_shield_collision(%struct.entity_t* %0, %struct.entity_t* %1) {
%3 = alloca %struct.entity_t*
%4 = alloca %struct.entity_t*
store %struct.entity_t* %0, %struct.entity_t** %3
store %struct.entity_t* %1, %struct.entity_t** %4
%5 = load %struct.entity_t*, %struct.entity_t** %4
%6 = call i32 @destroy_shield(%struct.entity_t* %5)
ret void
}

LLVM IR (-O2):
%struct.entity_t = type { i32 }
define void @shield_shield_collision(%struct.entity_t* nocapture readnone %0, %struct.entity_t* %1) {
%3 = tail call i32 @destroy_shield(%struct.entity_t* %1)
ret void
}
/* Variables and functions */
int _test_macro_test();
bool test_macro_test(char **name) {
  *name = "test_macro_test";
  return _test_macro_test();
}


x86 assembly (clang, -O0):
<test_macro_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xed9(%rip),%rcx
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <_test_macro_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_macro_test>:
lea    0xee9(%rip),%rax
mov    %rax,(%rdi)
xor    %eax,%eax
jmp    1030 <_test_macro_test@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"test_macro_test\00"
define i32 @test_macro_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = call i32 (...) @_test_macro_test()
ret i32 %4
}

LLVM IR (-O2):
@.str = [16 x i8] c"test_macro_test\00"
define i32 @test_macro_test(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %0
%2 = tail call i32 (...) @_test_macro_test()
ret i32 %2
}
void f137(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    goto a;
    ({ 0; });
  a:
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f137>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @Ctypes_hook_rd_ten_s8s() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mew_debug_die_with_message(char *);
void usage_fault_handler(void) {
  mew_debug_die_with_message("usage_fault_handler");
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"usage_fault_handler\00"
define void @usage_fault_handler() {
%1 = call i32 @mew_debug_die_with_message(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"usage_fault_handler\00"
define void @usage_fault_handler() {
%1 = tail call i32 @mew_debug_die_with_message(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
void ff_hevc_put_hevc_bi_w_pel_pixels64_10_sse4() {}


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

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

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

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