xunge/DecIR huggingface dataset:
unsigned int getDigitValue(int c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  } else if (c >= 'a' && c <= 'f') {
    return 10 + c - 'a';
  } else if (c >= 'A' && c <= 'F') {
    return 10 + c - 'A';
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<getDigitValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <getDigitValue+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <getDigitValue+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <getDigitValue+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     114e <getDigitValue+0x4e>
cmpl   $0x66,-0x8(%rbp)
jg     114e <getDigitValue+0x4e>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <getDigitValue+0x7a>
cmpl   $0x41,-0x8(%rbp)
jl     1173 <getDigitValue+0x73>
cmpl   $0x46,-0x8(%rbp)
jg     1173 <getDigitValue+0x73>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <getDigitValue+0x7a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDigitValue>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <getDigitValue+0x27>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <getDigitValue+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @getDigitValue(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %33
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 102
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = add nsw i32 10, %19
%21 = sub nsw i32 %20, 97
store i32 %21, i32* %2
br label %33
22: ; preds = %15, %12
%23 = load i32, i32* %3
%24 = icmp sge i32 %23, 65
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i32, i32* %3
%27 = icmp sle i32 %26, 70
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %3
%30 = add nsw i32 10, %29
%31 = sub nsw i32 %30, 65
store i32 %31, i32* %2
br label %33
32: ; preds = %25, %22
store i32 -1, i32* %2
br label %33
33: ; preds = %32, %28, %18, %9
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @getDigitValue(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %14
9: ; preds = %4
%10 = add i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -55
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
/* Variables and functions */
int strcmp(char *, char *);
int cp_hash_compare_string(void *s1, void *s2) {
  if (s1 == NULL && s2 == NULL)
    return 0;
  if (s1 == NULL || s2 == NULL)
    return -1;
  return strcmp((char *)s1, (char *)s2);
}


x86 assembly (clang, -O0):
<cp_hash_compare_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1142 <cp_hash_compare_string+0x32>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <cp_hash_compare_string+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1174 <cp_hash_compare_string+0x64>
cmpq   $0x0,-0x10(%rbp)
je     1158 <cp_hash_compare_string+0x48>
cmpq   $0x0,-0x18(%rbp)
jne    1164 <cp_hash_compare_string+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <cp_hash_compare_string+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cp_hash_compare_string>:
xor    %eax,%eax
mov    %rdi,%rcx
or     %rsi,%rcx
je     112e <cp_hash_compare_string+0x1e>
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     112e <cp_hash_compare_string+0x1e>
test   %rsi,%rsi
je     112e <cp_hash_compare_string+0x1e>
jmp    1030 <strcmp@plt>
ret

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

LLVM IR (-O2):
define i32 @cp_hash_compare_string(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = or i1 %3, %4
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %10
10: ; preds = %6, %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ], [ -1, %6 ]
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int gca_search_uint8(const void *aa, void *bb) {
  const uint8_t a = *(const uint8_t *)aa;
  const uint8_t b = *(uint8_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


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

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

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

LLVM IR (-O2):
define i32 @gca_search_uint8(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned int *, int, int);
scalar_t__ yacalloc(int, int);
int /*<<< orphan*/ yafree(void *);
scalar_t__ yamalloc(int);
int main(int argc, char const *argv[]) {
  unsigned int *ptr = (unsigned int *)yamalloc(sizeof(int));
  *ptr = 0x321;
  int size = 12 * sizeof(int);
  unsigned int *new_ptr = (unsigned int *)yacalloc(12, sizeof(int));
  memset(new_ptr, 0x53, size);
  yafree((void *)ptr);
  yafree((void *)new_ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1060 <yamalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x321,(%rax)
movl   $0x30,-0x1c(%rbp)
mov    $0xc,%edi
mov    $0x4,%esi
call   1050 <yacalloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x53,%esi
call   1040 <memset@plt>
mov    -0x18(%rbp),%rdi
call   1030 <yafree@plt>
mov    -0x28(%rbp),%rdi
call   1030 <yafree@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
call   1060 <yamalloc@plt>
mov    %rax,%r14
movl   $0x321,(%rax)
mov    $0xc,%edi
mov    $0x4,%esi
call   1050 <yacalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x53,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
call   1030 <yafree@plt>
mov    %rbx,%rdi
call   1030 <yafree@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i64 @yamalloc(i32 4)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
store i32 801, i32* %11
store i32 48, i32* %7
%12 = call i64 @yacalloc(i32 12, i32 4)
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %8
%14 = load i32*, i32** %8
%15 = load i32, i32* %7
%16 = call i32 @memset(i32* %14, i32 83, i32 %15)
%17 = load i32*, i32** %6
%18 = bitcast i32* %17 to i8*
%19 = call i32 @yafree(i8* %18)
%20 = load i32*, i32** %8
%21 = bitcast i32* %20 to i8*
%22 = call i32 @yafree(i8* %21)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @yamalloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32 801, i32* %4
%5 = tail call i64 @yacalloc(i32 12, i32 4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @memset(i32* %6, i32 83, i32 48)
%8 = inttoptr i64 %3 to i8*
%9 = tail call i32 @yafree(i8* %8)
%10 = inttoptr i64 %5 to i8*
%11 = tail call i32 @yafree(i8* %10)
ret i32 0
}
void exo_prefetch2(volatile void *p) {
  asm volatile("prefetcht2 %[p]" : [p] "+m"(*(volatile char *)p));
}


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

x86 assembly (clang, -O2):
<exo_prefetch2>:
prefetcht2 (%rdi)
ret

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

LLVM IR (-O2):
define void @exo_prefetch2(i8* %0) {
tail call void asm sideeffect "prefetcht2 $0", "=*m,*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0, i8* elementtype(i8) %0)
ret void
}
/* Type definitions */
typedef scalar_t__ u_int32_t;

/* Variables and functions */
u_int32_t swap32(u_int32_t x) {
  u_int32_t y = x;
  ((char *)&y)[0] = ((char *)&x)[3];
  ((char *)&y)[1] = ((char *)&x)[2];
  ((char *)&y)[2] = ((char *)&x)[1];
  ((char *)&y)[3] = ((char *)&x)[0];
  return y;
}


x86 assembly (clang, -O0):
<swap32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%al
mov    %al,-0x10(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0xf(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap32>:
mov    %edi,%ecx
shr    $0x18,%ecx
movabs $0xffffffff00000000,%rax
ff ff ff
and    %rdi,%rax
mov    %edi,%edx
shl    $0x18,%edx
or     %rax,%rdx
mov    %edi,%eax
shl    $0x8,%eax
and    $0xff0000,%eax
or     %rdx,%rax
shr    $0x8,%rdi
and    $0xff00,%edi
or     %rdi,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @swap32(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
store i64 %4, i64* %3
%5 = bitcast i64* %2 to i8*
%6 = getelementptr inbounds i8, i8* %5, i64 3
%7 = load i8, i8* %6
%8 = bitcast i64* %3 to i8*
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = bitcast i64* %2 to i8*
%11 = getelementptr inbounds i8, i8* %10, i64 2
%12 = load i8, i8* %11
%13 = bitcast i64* %3 to i8*
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = bitcast i64* %2 to i8*
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = bitcast i64* %3 to i8*
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8 %17, i8* %19
%20 = bitcast i64* %2 to i8*
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = bitcast i64* %3 to i8*
%24 = getelementptr inbounds i8, i8* %23, i64 3
store i8 %22, i8* %24
%25 = load i64, i64* %3
ret i64 %25
}

LLVM IR (-O2):
define i64 @swap32(i64 %0) {
%2 = lshr i64 %0, 24
%3 = and i64 %2, 255
%4 = and i64 %0, -4294967296
%5 = shl i64 %0, 24
%6 = and i64 %5, 4278190080
%7 = or i64 %6, %4
%8 = shl i64 %0, 8
%9 = and i64 %8, 16711680
%10 = or i64 %7, %9
%11 = lshr i64 %0, 8
%12 = and i64 %11, 65280
%13 = or i64 %10, %12
%14 = or i64 %13, %3
ret i64 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_get_seqnum(void *m, uint64_t *seqnum) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_get_seqnum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_get_seqnum(i8* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int yogrt_remaining();
int iyogrt_remaining_(void) { return yogrt_remaining(); }


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

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

LLVM IR (-O0):
define i32 @iyogrt_remaining_() {
%1 = call i32 (...) @yogrt_remaining()
ret i32 %1
}

LLVM IR (-O2):
define i32 @iyogrt_remaining_() {
%1 = tail call i32 (...) @yogrt_remaining()
ret i32 %1
}
int is_pseudo_mnemonic_begin(char *s) {
  return (((*s >= 'a') && (*s <= 'z')) || ((*s >= 'A') && (*s <= 'Z')) ||
          (*s == '_'));
}


x86 assembly (clang, -O0):
<is_pseudo_mnemonic_begin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     112d <is_pseudo_mnemonic_begin+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x9(%rbp)
jle    1162 <is_pseudo_mnemonic_begin+0x62>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1152 <is_pseudo_mnemonic_begin+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x9(%rbp)
jle    1162 <is_pseudo_mnemonic_begin+0x62>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pseudo_mnemonic_begin>:
mov    (%rdi),%al
mov    %eax,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
cmp    $0x1a,%cl
setb   %cl
cmp    $0x5f,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_pseudo_mnemonic_begin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 122
br i1 %11, label %27, label %12
12: ; preds = %7, %1
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sge i32 %15, 65
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 90
br i1 %21, label %27, label %22
22: ; preds = %17, %12
%23 = load i8*, i8** %2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 95
br label %27
27: ; preds = %22, %17, %7
%28 = phi i1 [ true, %17 ], [ true, %7 ], [ %26, %22 ]
%29 = zext i1 %28 to i32
ret i32 %29
}

LLVM IR (-O2):
define i32 @is_pseudo_mnemonic_begin(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -33
%4 = add i8 %3, -65
%5 = icmp ult i8 %4, 26
%6 = icmp eq i8 %2, 95
%7 = select i1 %5, i1 true, i1 %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int strcmp(char *, char *);
int compare(const void *i, const void *j) {
  return strcmp(*(char **)i, *(char **)j);
}


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

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

LLVM IR (-O0):
define i32 @compare(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void f() {
  int x = size_t(1.0) + 2;
  int y = (size_t(1.0) + 5);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee0(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
movsd  0xecb(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x1,%al
call   1030 <size_t@plt>
movsd  0xed8(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1030 <size_t@plt>

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%4 = add nsw i32 %3, 2
store i32 %4, i32* %1
%5 = call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%6 = add nsw i32 %5, 5
store i32 %6, i32* %2
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @size_t to i32 (double, ...)*)(double 1.000000e+00)
ret void
}
/* Variables and functions */
scalar_t__ floor(float);
int iroundf(float a) { return (int)((float)floor(a + 0.5f)); }


x86 assembly (clang, -O0):
<iroundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2ss %rax,%xmm0
cvttss2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iroundf>:
push   %rax
addss  0xee7(%rip),%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvttss2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @iroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e-01
%5 = call i64 @floor(float %4)
%6 = sitofp i64 %5 to float
%7 = fptosi float %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @iroundf(float %0) {
%2 = fadd float %0, 5.000000e-01
%3 = tail call i64 @floor(float %2)
%4 = sitofp i64 %3 to float
%5 = fptosi float %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ log_msg(char *, int);
void sigpipe_handler(int sig) { log_msg("[s] got signal %i (SIGPIPE)\n", sig); }


x86 assembly (clang, -O0):
<sigpipe_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <log_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [29 x i8] c"[s] got signal %i (SIGPIPE)\0A\00"
define void @sigpipe_handler(i32 %0) {
%2 = tail call i32 @log_msg(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void getDifferenceVector(double *v0, double *v1, double *diff) {
  diff[0] = v0[0] - v1[0];
  diff[1] = v0[1] - v1[1];
  diff[2] = v0[2] - v1[2];
}


x86 assembly (clang, -O0):
<getDifferenceVector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDifferenceVector>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rdi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x10(%rdi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

LLVM IR (-O0):
define void @getDifferenceVector(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %6
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %6
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double*, double** %4
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fsub double %27, %30
%32 = load double*, double** %6
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @getDifferenceVector(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fsub double %4, %5
store double %6, double* %2
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %2, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %2, i64 2
store double %17, double* %18
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ width;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
short get_XFontStruct_min_bounds_width(void *_p) {
  return (short)((XFontStruct *)_p)->min_bounds.width;
}


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

x86 assembly (clang, -O2):
<get_XFontStruct_min_bounds_width>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define signext i16 @get_XFontStruct_min_bounds_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Type definitions */
struct storage_backend {
  int dummy;
};

/* Variables and functions */
scalar_t__ PATH_MAX;
int /*<<< orphan*/ snprintf(char *, scalar_t__, char *);
int tile_read(struct storage_backend *store, const char *xmlconfig,
              const char *options, int x, int y, int z, char *buf, size_t sz,
              int *compressed, char *err_msg) {
  snprintf(err_msg, PATH_MAX - 1, "Cannot read from NULL storage.");
  return -1;
}


x86 assembly (clang, -O0):
<tile_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x28(%rbp),%rdi
mov    0x2ea6(%rip),%rax
mov    (%rax),%rsi
sub    $0x1,%rsi
lea    0xea8(%rip),%rdx
call   1030 <snprintf@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tile_read>:
push   %rax
mov    0x28(%rsp),%rdi
mov    0x2ed3(%rip),%rax
mov    (%rax),%rsi
add    $0xffffffffffffffff,%rsi
lea    0xed5(%rip),%rdx
call   1030 <snprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.storage_backend = type { i32 }
@PATH_MAX = global i64 0
@.str = [31 x i8] c"Cannot read from NULL storage.\00"
define i32 @tile_read(%struct.storage_backend* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6, i64 %7, i32* %8, i8* %9) {
%11 = alloca %struct.storage_backend*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i32*
%20 = alloca i8*
store %struct.storage_backend* %0, %struct.storage_backend** %11
store i8* %1, i8** %12
store i8* %2, i8** %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i8* %6, i8** %17
store i64 %7, i64* %18
store i32* %8, i32** %19
store i8* %9, i8** %20
%21 = load i8*, i8** %20
%22 = load i64, i64* @PATH_MAX
%23 = sub nsw i64 %22, 1
%24 = call i32 @snprintf(i8* %21, i64 %23, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.storage_backend = type { i32 }
@PATH_MAX = global i64 0
@.str = [31 x i8] c"Cannot read from NULL storage.\00"
define i32 @tile_read(%struct.storage_backend* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i32 %4, i32 %5, i8* nocapture readnone %6, i64 %7, i32* nocapture readnone %8, i8* nocapture writeonly %9) {
%11 = load i64, i64* @PATH_MAX
%12 = add nsw i64 %11, -1
%13 = tail call i32 @snprintf(i8* %9, i64 %12, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int acos(int /*<<< orphan*/);
int sin(int);
double computeOuterSquareRadius(int numSide, double regularPolygonArea) {
  return 2 * regularPolygonArea / (numSide * sin(2 * (2 * acos(0)) / numSide));
}


x86 assembly (clang, -O0):
<computeOuterSquareRadius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  0xec8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %edi,%edi
call   1030 <acos@plt>
shl    $0x1,%eax
shl    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%edi
call   1040 <sin@plt>
movsd  -0x20(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeOuterSquareRadius>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
call   1030 <acos@plt>
shl    $0x2,%eax
cltd
idiv   %ebx
mov    %eax,%edi
call   1040 <sin@plt>
imul   %ebx,%eax
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @computeOuterSquareRadius(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fmul double 2.000000e+00, %5
%7 = load i32, i32* %3
%8 = call i32 @acos(i32 0)
%9 = mul nsw i32 2, %8
%10 = mul nsw i32 2, %9
%11 = load i32, i32* %3
%12 = sdiv i32 %10, %11
%13 = call i32 @sin(i32 %12)
%14 = mul nsw i32 %7, %13
%15 = sitofp i32 %14 to double
%16 = fdiv double %6, %15
ret double %16
}

LLVM IR (-O2):
define double @computeOuterSquareRadius(i32 %0, double %1) {
%3 = fmul double %1, 2.000000e+00
%4 = tail call i32 @acos(i32 0)
%5 = shl nsw i32 %4, 2
%6 = sdiv i32 %5, %0
%7 = tail call i32 @sin(i32 %6)
%8 = mul nsw i32 %7, %0
%9 = sitofp i32 %8 to double
%10 = fdiv double %3, %9
ret double %10
}
void __pthread_unwind_next_2(struct __ptcb *__cb) {
  __asm__ __volatile__("call __pthread_unwind_next" : : "a"(__cb));
}


x86 assembly (clang, -O0):
<__pthread_unwind_next_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
call   1030 <__pthread_unwind_next@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pthread_unwind_next_2>:
mov    %rdi,%rax
call   1030 <__pthread_unwind_next@plt>
ret

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

LLVM IR (-O2):
%struct.__ptcb = type opaque
define void @__pthread_unwind_next_2(%struct.__ptcb* %0) {
tail call void asm sideeffect "call __pthread_unwind_next", "{ax},~{dirflag},~{fpsr},~{flags}"(%struct.__ptcb* %0)
ret void
}
void set_cpu_sd_state_idle(void) {}


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

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

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

LLVM IR (-O2):
define void @set_cpu_sd_state_idle() {
ret void
}
/* Variables and functions */
int _wildcard_match(char *, char *);
int wildcard_match(register char *p, register char *t) {
  return (_wildcard_match(p, t) == 1);
}


x86 assembly (clang, -O0):
<wildcard_match>:
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 <_wildcard_match@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wildcard_match>:
push   %rax
call   1030 <_wildcard_match@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wildcard_match(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 @_wildcard_match(i8* %5, i8* %6)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @wildcard_match(i8* %0, i8* %1) {
%3 = tail call i32 @_wildcard_match(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_FEuint8_reg(unsigned char val) {
  return ((val) & (-0xFE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_FEuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -254
%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_FEuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 2
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
transl_(x, y, z) float *x, *y, *z;
{ translate(*x, *y, *z); }


x86 assembly (clang, -O0):
<transl_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <translate@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transl_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <translate@plt>

LLVM IR (-O0):
define i32 @transl_(float* %0, float* %1, float* %2) {
%4 = alloca i32
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
%8 = load float*, float** %5
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = load float*, float** %7
%15 = load float, float* %14
%16 = fpext float %15 to double
%17 = call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %10, double %13, double %16)
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @transl_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @translate to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret i32 undef
}
void uchar_ushort_arg(unsigned char a, unsigned short b) {}


x86 assembly (clang, -O0):
<uchar_ushort_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @uchar_ushort_arg(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
ret void
}

LLVM IR (-O2):
define void @uchar_ushort_arg(i8 zeroext %0, i16 zeroext %1) {
ret void
}
/* Variables and functions */
float __ocml_fmin_f32(float, float);
float fminf(float x, float y) { return __ocml_fmin_f32(x, y); }


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

x86 assembly (clang, -O2):
<fminf>:
jmp    1030 <__ocml_fmin_f32@plt>

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

LLVM IR (-O2):
define float @fminf(float %0, float %1) {
%3 = tail call float @__ocml_fmin_f32(float %0, float %1)
ret float %3
}
long long unsigned getSum(long long unsigned y, long long unsigned z) {
  if (y < z) {
    return 0;
  } else {
    return ((long long unsigned)y + (long long unsigned)z) % 1000000007;
  }
}


x86 assembly (clang, -O0):
<getSum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1127 <getSum+0x27>
movq   $0x0,-0x8(%rbp)
jmp    113d <getSum+0x3d>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    $0x3b9aca07,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSum>:
cmp    %rsi,%rdi
jae    110b <getSum+0xb>
xor    %esi,%esi
mov    %rsi,%rax
ret
add    %rdi,%rsi
movabs $0x89705f3112a28fe5,%rcx
5f 70 89
mov    %rsi,%rax
mul    %rcx
shr    $0x1d,%rdx
imul   $0x3b9aca07,%rdx,%rax
sub    %rax,%rsi
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @getSum(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i64 0, i64* %3
br label %15
10: ; preds = %2
%11 = load i64, i64* %4
%12 = load i64, i64* %5
%13 = add i64 %11, %12
%14 = urem i64 %13, 1000000007
store i64 %14, i64* %3
br label %15
15: ; preds = %10, %9
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @getSum(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = add i64 %1, %0
%6 = urem i64 %5, 1000000007
br label %7
7: ; preds = %2, %4
%8 = phi i64 [ %6, %4 ], [ 0, %2 ]
ret i64 %8
}
/* Variables and functions */
double __ocml_scalbn_f64(double, int);
double scalbn(double x, int n) { return __ocml_scalbn_f64(x, n); }


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

x86 assembly (clang, -O2):
<scalbn>:
jmp    1030 <__ocml_scalbn_f64@plt>

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

LLVM IR (-O2):
define double @scalbn(double %0, i32 %1) {
%3 = tail call double @__ocml_scalbn_f64(double %0, i32 %1)
ret double %3
}
void exchange(char *p1, char *p2) {
  char t;
  t = *p1;
  *p1 = *p2;
  *p2 = t;
}


x86 assembly (clang, -O0):
<exchange>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @exchange(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @exchange(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
double __attribute__((no)) bar(double x) { return x; }


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

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

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

LLVM IR (-O2):
define double @bar(double returned %0) {
ret double %0
}
__attribute__((no)) unsigned long nondet_ulong() {}


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

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

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

LLVM IR (-O2):
define i64 @nondet_ulong() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ mp_msg(int, int /*<<< orphan*/, char *);
void flip_page(void) {
  mp_msg(3, 0, "vo_cvidix: error: didn't use vidix flip_page!\n");
  return;
}


x86 assembly (clang, -O0):
<flip_page>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
xor    %esi,%esi
lea    0xede(%rip),%rdx
call   1030 <mp_msg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_page>:
lea    0xee9(%rip),%rdx
mov    $0x3,%edi
xor    %esi,%esi
jmp    1030 <mp_msg@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"vo_cvidix: error: didn't use vidix flip_page!\0A\00"
define void @flip_page() {
%1 = call i32 @mp_msg(i32 3, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"vo_cvidix: error: didn't use vidix flip_page!\0A\00"
define void @flip_page() {
%1 = tail call i32 @mp_msg(i32 3, i32 0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool _i2c_busno_in_range(int busno) { return busno < 5; }


x86 assembly (clang, -O0):
<_i2c_busno_in_range>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_i2c_busno_in_range>:
xor    %eax,%eax
cmp    $0x5,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @_i2c_busno_in_range(i32 %0) {
%2 = icmp slt i32 %0, 5
%3 = zext i1 %2 to i32
ret i32 %3
}
regx0adrx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[x0]) <= (((short *)(11111111 & ~(__alignof__(short) - 1)))[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac6,%ecx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114c <regx0adrx1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <regx0adrx1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adrx1>:
movslq %edx,%rax
movzwl (%r8,%rax,2),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac6(%rcx,%rcx,1),%dx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @regx0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* %4, i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* inttoptr (i64 11111110 to i16*), i64 %10
%12 = load i16, i16* %11
%13 = icmp sle i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
int fibs(long low, long high) {
  long last = 0, secLast = 1, current = 1, count = 0;
  while (current <= high) {
    if (low <= current)
      count++;
    secLast = last;
    last = current;
    current = last + secLast;
  }
  return count;
}


x86 assembly (clang, -O0):
<fibs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
movq   $0x1,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1175 <fibs+0x75>
mov    -0x8(%rbp),%rax
cmp    -0x28(%rbp),%rax
jg     1154 <fibs+0x54>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    112c <fibs+0x2c>
mov    -0x30(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibs>:
test   %rsi,%rsi
jle    112d <fibs+0x2d>
mov    $0x1,%edx
xor    %eax,%eax
xor    %ecx,%ecx
xchg   %ax,%ax
mov    %rdx,%r8
xor    %edx,%edx
cmp    %rdi,%r8
setge  %dl
add    %rdx,%rax
add    %r8,%rcx
mov    %rcx,%rdx
cmp    %rsi,%rcx
mov    %r8,%rcx
jle    1110 <fibs+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fibs(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
store i64 1, i64* %6
store i64 1, i64* %7
store i64 0, i64* %8
br label %9
9: ; preds = %20, %2
%10 = load i64, i64* %7
%11 = load i64, i64* %4
%12 = icmp sle i64 %10, %11
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i64, i64* %3
%15 = load i64, i64* %7
%16 = icmp sle i64 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load i64, i64* %8
%19 = add nsw i64 %18, 1
store i64 %19, i64* %8
br label %20
20: ; preds = %17, %13
%21 = load i64, i64* %5
store i64 %21, i64* %6
%22 = load i64, i64* %7
store i64 %22, i64* %5
%23 = load i64, i64* %5
%24 = load i64, i64* %6
%25 = add nsw i64 %23, %24
store i64 %25, i64* %7
br label %9
26: ; preds = %9
%27 = load i64, i64* %8
%28 = trunc i64 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @fibs(i64 %0, i64 %1) {
%3 = icmp slt i64 %1, 1
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = phi i64 [ %11, %4 ], [ 1, %2 ]
%7 = phi i64 [ %6, %4 ], [ 0, %2 ]
%8 = icmp sge i64 %6, %0
%9 = zext i1 %8 to i64
%10 = add nuw nsw i64 %5, %9
%11 = add nsw i64 %6, %7
%12 = icmp sgt i64 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = trunc i64 %10 to i32
br label %15
15: ; preds = %13, %2
%16 = phi i32 [ 0, %2 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ checktargetpath(char *, int, int);
void check_make_directory(char *dir) { checktargetpath(dir, 1, -1); }


x86 assembly (clang, -O0):
<check_make_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0xffffffff,%edx
call   1030 <checktargetpath@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_make_directory>:
mov    $0x1,%esi
mov    $0xffffffff,%edx
jmp    1030 <checktargetpath@plt>

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

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