xunge/DecIR huggingface dataset:
int compare(char *s1, char *s2) {
  while (*s1++ == *s2) {
    if (*s2++ == 0) {
      return (0);
      ;
    };
  }
  return (*--s1 - *s2);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1159 <compare+0x59>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1154 <compare+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1178 <compare+0x78>
jmp    110c <compare+0xc>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
cmp    %dl,%al
jne    1127 <compare+0x27>
add    $0x1,%rcx
test   %al,%al
jne    1110 <compare+0x10>
xor    %eax,%eax
ret
sub    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = phi i8* [ %1, %2 ], [ %11, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = sext i8 %7 to i32
%15 = sext i8 %6 to i32
%16 = sub nsw i32 %15, %14
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hash_add(int /*<<< orphan*/, int);
uint32_t hash_add64(uint32_t hash, uint64_t data) {
  return hash_add(hash_add(hash, data), data >> 32);
}


x86 assembly (clang, -O0):
<hash_add64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <hash_add@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <hash_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_add64>:
push   %rax
call   1030 <hash_add@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <hash_add@plt>

LLVM IR (-O0):
define i32 @hash_add64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @hash_add(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = ashr i32 %8, 32
%10 = call i32 @hash_add(i32 %7, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @hash_add64(i32 %0, i32 %1) {
%3 = tail call i32 @hash_add(i32 %0, i32 %1)
%4 = tail call i32 @hash_add(i32 %3, i32 poison)
ret i32 %4
}
/* Type definitions */
struct liste {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ supprimmer(struct liste **, int /*<<< orphan*/);
size_t taille(struct liste *);
void viderListe(struct liste **debut) {
  for (size_t t = 0; t < taille(*debut); t++) {
    supprimmer(debut, 0);
  }
}


x86 assembly (clang, -O0):
<viderListe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <taille@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jae    1174 <viderListe+0x54>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <supprimmer@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <viderListe+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<viderListe>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1030 <taille@plt>
test   %rax,%rax
je     115b <viderListe+0x3b>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <supprimmer@plt>
add    $0x1,%rbx
mov    (%r14),%rdi
call   1030 <taille@plt>
cmp    %rax,%rbx
jb     1140 <viderListe+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.liste = type { i32 }
define void @viderListe(%struct.liste** %0) {
%2 = alloca %struct.liste**
%3 = alloca i64
store %struct.liste** %0, %struct.liste*** %2
store i64 0, i64* %3
br label %4
4: ; preds = %13, %1
%5 = load i64, i64* %3
%6 = load %struct.liste**, %struct.liste*** %2
%7 = load %struct.liste*, %struct.liste** %6
%8 = call i64 @taille(%struct.liste* %7)
%9 = icmp ult i64 %5, %8
br i1 %9, label %10, label %16
10: ; preds = %4
%11 = load %struct.liste**, %struct.liste*** %2
%12 = call i32 @supprimmer(%struct.liste** %11, i32 0)
br label %13
13: ; preds = %10
%14 = load i64, i64* %3
%15 = add i64 %14, 1
store i64 %15, i64* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.liste = type { i32 }
define void @viderListe(%struct.liste** %0) {
%2 = load %struct.liste*, %struct.liste** %0
%3 = tail call i64 @taille(%struct.liste* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %1
ret void
6: ; preds = %1, %6
%7 = phi i64 [ %9, %6 ], [ 0, %1 ]
%8 = tail call i32 @supprimmer(%struct.liste** %0, i32 0)
%9 = add nuw i64 %7, 1
%10 = load %struct.liste*, %struct.liste** %0
%11 = tail call i64 @taille(%struct.liste* %10)
%12 = icmp ult i64 %9, %11
br i1 %12, label %6, label %5
}
int is_number(char *str) {
  while (*str >= '0' && *str <= '9')
    str++;
  return *str == 0;
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x9(%rbp)
jl     112d <is_number+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <is_number+0x3d>
jmp    114e <is_number+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <is_number+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%eax
add    $0x1,%rdi
cmp    $0xa,%al
jb     1100 <is_number>
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @is_number(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 57
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_number(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = add i8 %4, -48
%6 = icmp ult i8 %5, 10
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %2, label %8
8: ; preds = %2
%9 = icmp eq i8 %4, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int cfg_processor_get_addr(char *, char *);
int cfg_timer_a_get_tar_addr(void) {
  return cfg_processor_get_addr("timera", "tar");
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"timera\00"
@.str.1 = [4 x i8] c"tar\00"
define i32 @cfg_timer_a_get_tar_addr() {
%1 = call i32 @cfg_processor_get_addr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [7 x i8] c"timera\00"
@.str.1 = [4 x i8] c"tar\00"
define i32 @cfg_timer_a_get_tar_addr() {
%1 = tail call i32 @cfg_processor_get_addr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 %1
}
void sig_alarm(int signo) {}


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

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

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

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

/* Variables and functions */
uint16_t unaligned16(const void *v) {
  struct Unaligned {
    uint16_t i;
  } __attribute__((packed));
  return ((const struct Unaligned *)v)->i;
}


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

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

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

LLVM IR (-O2):
define i32 @unaligned16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_event_loop(void *e) {
  return -EINVAL;
}


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

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_loop(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
void XkbApplyCompatMapToKey() {}


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

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

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

LLVM IR (-O2):
define void @XkbApplyCompatMapToKey() {
ret void
}
long mul5(long a) { return (a << 2) + a; }


x86 assembly (clang, -O0):
<mul5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x2,%rax
add    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul5>:
lea    (%rdi,%rdi,4),%rax
ret

LLVM IR (-O0):
define i64 @mul5(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 2
%5 = load i64, i64* %2
%6 = add nsw i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @mul5(i64 %0) {
%2 = mul i64 %0, 5
ret i64 %2
}
/* Type definitions */
typedef char *uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint64_t rdtsc(void) {
  union {
    uint64_t tsc_64;
    struct {
      uint32_t lo_32;
      uint32_t hi_32;
    };
  } tsc;
  asm volatile("rdtsc" : "=a"(tsc.lo_32), "=d"(tsc.hi_32));
  return tsc.tsc_64;
}


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

x86 assembly (clang, -O2):
<rdtsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
%union.anon = type { i8* }
%struct.anon = type { i32, i32 }
define i8* @rdtsc() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to %struct.anon*
%3 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%4 = bitcast %union.anon* %1 to %struct.anon*
%5 = getelementptr inbounds %struct.anon, %struct.anon* %4, i32 0, i32 1
%6 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%7 = extractvalue { i32, i32 } %6, 0
%8 = extractvalue { i32, i32 } %6, 1
store i32 %7, i32* %3
store i32 %8, i32* %5
%9 = bitcast %union.anon* %1 to i8**
%10 = load i8*, i8** %9
ret i8* %10
}

LLVM IR (-O2):
define i8* @rdtsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
void calcularMatriz(int n, int provas, int matriz[][5]) {}


x86 assembly (clang, -O0):
<calcularMatriz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @calcularMatriz(i32 %0, i32 %1, [5 x i32]* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca [5 x i32]*
store i32 %0, i32* %4
store i32 %1, i32* %5
store [5 x i32]* %2, [5 x i32]** %6
ret void
}

LLVM IR (-O2):
define void @calcularMatriz(i32 %0, i32 %1, [5 x i32]* nocapture %2) {
ret void
}
/* Variables and functions */
scalar_t__ fmodl(long double, long double);
int /*<<< orphan*/ link_failure_fmodl();
void test_fmodl(long double ld1, long double ld2) {
  if (fmodl(ld1, ld2) != fmodl(ld1, ld2))
    link_failure_fmodl();
}


x86 assembly (clang, -O0):
<test_fmodl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <fmodl@plt>
mov    %rax,-0x28(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <fmodl@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     1175 <test_fmodl+0x55>
mov    $0x0,%al
call   1040 <link_failure_fmodl@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fmodl>:
push   %rbx
sub    $0x40,%rsp
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x34(%rsp)
fldt   0x60(%rsp)
fld    %st(0)
fstpt  0x28(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <fmodl@plt>
mov    %rax,%rbx
fldt   0x28(%rsp)
fstpt  0x10(%rsp)
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1030 <fmodl@plt>
cmp    %rax,%rbx
jne    1167 <test_fmodl+0x47>
add    $0x40,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
jmp    1040 <link_failure_fmodl@plt>

LLVM IR (-O0):
define void @test_fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @fmodl(x86_fp80 %5, x86_fp80 %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = load x86_fp80, x86_fp80* %4
%10 = call i64 @fmodl(x86_fp80 %8, x86_fp80 %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_fmodl()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_fmodl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @fmodl(x86_fp80 %0, x86_fp80 %1)
%4 = tail call i64 @fmodl(x86_fp80 %0, x86_fp80 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_fmodl()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ factoriel(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char const *argv[]) {
  int n;
  for (n = 0; n <= 150; n++) {
    printf("%llu\n", factoriel(n));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x96,-0x14(%rbp)
jg     116e <main+0x4e>
mov    -0x14(%rbp),%edi
call   1040 <factoriel@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1040 <factoriel@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x97,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%llu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i32 @factoriel(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 151
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 0
}
/* Type definitions */
struct memory_source {
  int dummy;
};

/* Variables and functions */
void *impl_xmalloc(size_t, struct memory_source *, char const *, unsigned int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *impl_xmallocz(size_t size, struct memory_source *src, const char *file,
                    unsigned int line) {
  void *ret = impl_xmalloc(size, src, file, line);
  memset(ret, 0, size);
  return ret;
}


x86 assembly (clang, -O0):
<impl_xmallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <impl_xmalloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<impl_xmallocz>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <impl_xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.memory_source = type { i32 }
define i8* @impl_xmallocz(i64 %0, %struct.memory_source* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca %struct.memory_source*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i64 %0, i64* %5
store %struct.memory_source* %1, %struct.memory_source** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i64, i64* %5
%11 = load %struct.memory_source*, %struct.memory_source** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i8* @impl_xmalloc(i64 %10, %struct.memory_source* %11, i8* %12, i32 %13)
store i8* %14, i8** %9
%15 = load i8*, i8** %9
%16 = load i64, i64* %5
%17 = call i32 @memset(i8* %15, i32 0, i64 %16)
%18 = load i8*, i8** %9
ret i8* %18
}

LLVM IR (-O2):
%struct.memory_source = type { i32 }
define i8* @impl_xmallocz(i64 %0, %struct.memory_source* %1, i8* %2, i32 %3) {
%5 = tail call i8* @impl_xmalloc(i64 %0, %struct.memory_source* %1, i8* %2, i32 %3)
%6 = tail call i32 @memset(i8* %5, i32 0, i64 %0)
ret i8* %5
}
int fun407() { return 407; }


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

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

LLVM IR (-O0):
define i32 @fun407() {
ret i32 407
}

LLVM IR (-O2):
define i32 @fun407() {
ret i32 407
}
/* Variables and functions */
int can_toggle_setting(char *);
int can_toggle_mptcp() {
  return can_toggle_setting("/proc/sys/net/mptcp/mptcp_enabled");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"/proc/sys/net/mptcp/mptcp_enabled\00"
define i32 @can_toggle_mptcp() {
%1 = call i32 @can_toggle_setting(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [34 x i8] c"/proc/sys/net/mptcp/mptcp_enabled\00"
define i32 @can_toggle_mptcp() {
%1 = tail call i32 @can_toggle_setting(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ gru_dealloc(void **);
void gru_dealloc_const_string(const char **obj) { gru_dealloc((void **)obj); }


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

x86 assembly (clang, -O2):
<gru_dealloc_const_string>:
jmp    1030 <gru_dealloc@plt>

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

LLVM IR (-O2):
define void @gru_dealloc_const_string(i8** %0) {
%2 = tail call i32 @gru_dealloc(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *,
                           int);
void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24) {
  smbhash(p24, c8, p21, 1);
  smbhash(p24 + 8, c8, p21 + 7, 1);
  smbhash(p24 + 16, c8, p21 + 14, 1);
}


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

x86 assembly (clang, -O2):
<E_P24>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
mov    %r15,%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
lea    0x8(%rbx),%rdi
lea    0x7(%r15),%rdx
mov    %r14,%rsi
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x10,%rbx
add    $0xe,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x1,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <smbhash@plt>

LLVM IR (-O0):
define void @E_P24(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = call i32 @smbhash(i8* %7, i8* %8, i8* %9, i32 1)
%11 = load i8*, i8** %6
%12 = getelementptr inbounds i8, i8* %11, i64 8
%13 = load i8*, i8** %5
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 7
%16 = call i32 @smbhash(i8* %12, i8* %13, i8* %15, i32 1)
%17 = load i8*, i8** %6
%18 = getelementptr inbounds i8, i8* %17, i64 16
%19 = load i8*, i8** %5
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 14
%22 = call i32 @smbhash(i8* %18, i8* %19, i8* %21, i32 1)
ret void
}

LLVM IR (-O2):
define void @E_P24(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @smbhash(i8* %2, i8* %1, i8* %0, i32 1)
%5 = getelementptr inbounds i8, i8* %2, i64 8
%6 = getelementptr inbounds i8, i8* %0, i64 7
%7 = tail call i32 @smbhash(i8* %5, i8* %1, i8* %6, i32 1)
%8 = getelementptr inbounds i8, i8* %2, i64 16
%9 = getelementptr inbounds i8, i8* %0, i64 14
%10 = tail call i32 @smbhash(i8* %8, i8* %1, i8* %9, i32 1)
ret void
}
int min(int a, int b) {
  if (a <= b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @min(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* %5
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
char *substring(char *, int, int);
int main(void) {
  char *sub = substring("Hamburger", 3, 7);
  if (sub != NULL) {
    printf("%s\n", sub);
    free(sub);
  } else {
    puts("sub = NULL");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1060 <substring@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1192 <main+0x52>
mov    -0x10(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    119e <main+0x5e>
lea    0xe75(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1060 <substring@plt>
test   %rax,%rax
je     1178 <main+0x38>
mov    %rax,%rbx
lea    0xea4(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    1184 <main+0x44>
lea    0xe8f(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Hamburger\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [11 x i8] c"sub = NULL\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @substring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3, i32 7)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
br label %13
11: ; preds = %0
%12 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Hamburger\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [11 x i8] c"sub = NULL\00"
define i32 @main() {
%1 = tail call i8* @substring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3, i32 7)
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i32 @free(i8* %1)
br label %8
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void ciao_open_emulator(const char *file, FILE **stream, const char *p) {}


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

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

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

LLVM IR (-O2):
define void @ciao_open_emulator(i8* nocapture %0, i32** nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: units [-f unitsfile] [-q] [-v] [from-unit to-unit]\n");
  exit(3);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"usage: units [-f unitsfile] [-q] [-v] [from-unit to-unit]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"usage: units [-f unitsfile] [-q] [-v] [from-unit to-unit]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ pthread_yield();
void thrd_yield(void) { pthread_yield(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gethostname(char *, int);
const char *__suselog_hostname(void) {
  static char namebuf[256];
  gethostname(namebuf, sizeof(namebuf));
  return namebuf;
}


x86 assembly (clang, -O0):
<__suselog_hostname>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
mov    $0x100,%esi
call   1030 <gethostname@plt>
lea    0x2f14(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__suselog_hostname>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <gethostname@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@__suselog_hostname.namebuf = internal global [256 x i8] zeroinitializer
define i8* @__suselog_hostname() {
%1 = call i32 @gethostname(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__suselog_hostname.namebuf, i64 0, i64 0), i32 256)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__suselog_hostname.namebuf, i64 0, i64 0)
}

LLVM IR (-O2):
@__suselog_hostname.namebuf = internal global [256 x i8] zeroinitializer
define i8* @__suselog_hostname() {
%1 = tail call i32 @gethostname(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__suselog_hostname.namebuf, i64 0, i64 0), i32 256)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @__suselog_hostname.namebuf, i64 0, i64 0)
}
unsigned short bigbinary2us(char *binary) {
  unsigned short result = 0;
  int len = sizeof(result);
  unsigned short exp = 1;
  int i;
  for (i = len - 1; i >= 0; --i) {
    result += binary[i] * exp;
    exp <<= 8;
  }
  return result;
}


x86 assembly (clang, -O0):
<bigbinary2us>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movl   $0x2,-0x10(%rbp)
movw   $0x1,-0x12(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1164 <bigbinary2us+0x64>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
movzwl -0x12(%rbp),%eax
imul   %eax,%ecx
movzwl -0xa(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0x12(%rbp),%eax
shl    $0x8,%eax
mov    %ax,-0x12(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1124 <bigbinary2us+0x24>
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigbinary2us>:
movsbl 0x1(%rdi),%ecx
movzbl (%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @bigbinary2us(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i32
%5 = alloca i16
%6 = alloca i32
store i8* %0, i8** %2
store i16 0, i16* %3
store i32 2, i32* %4
store i16 1, i16* %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %6
br label %9
9: ; preds = %30, %1
%10 = load i32, i32* %6
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %33
12: ; preds = %9
%13 = load i8*, i8** %2
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i16, i16* %5
%20 = zext i16 %19 to i32
%21 = mul nsw i32 %18, %20
%22 = load i16, i16* %3
%23 = zext i16 %22 to i32
%24 = add nsw i32 %23, %21
%25 = trunc i32 %24 to i16
store i16 %25, i16* %3
%26 = load i16, i16* %5
%27 = zext i16 %26 to i32
%28 = shl i32 %27, 8
%29 = trunc i32 %28 to i16
store i16 %29, i16* %5
br label %30
30: ; preds = %12
%31 = load i32, i32* %6
%32 = add nsw i32 %31, -1
store i32 %32, i32* %6
br label %9
33: ; preds = %9
%34 = load i16, i16* %3
ret i16 %34
}

LLVM IR (-O2):
define zeroext i16 @bigbinary2us(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = sext i8 %3 to i16
%5 = load i8, i8* %0
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = add i16 %7, %4
ret i16 %8
}
/* Variables and functions */
scalar_t__ isupper(unsigned char);
unsigned char tolower(unsigned char c) {
  if (isupper(c))
    c -= 'A' - 'a';
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
movzbl -0x1(%rbp),%eax
sub    $0xffffffe0,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @tolower(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isupper(i8 zeroext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = sub nsw i32 %8, -32
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %6, %1
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @tolower(i8 zeroext %0) {
%2 = tail call i64 @isupper(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
char *object_malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *object_strdup(const char *str) {
  size_t len;
  char *s;
  len = strlen(str);
  s = object_malloc(sizeof(char) * (len + 1));
  strcpy(s, str);
  return s;
}


x86 assembly (clang, -O0):
<object_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <object_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<object_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <object_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @object_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = mul i64 1, %8
%10 = trunc i64 %9 to i32
%11 = call i8* @object_malloc(i32 %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @object_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = tail call i8* @object_malloc(i32 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
int test_imm_3Buint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x3B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Buint64_highword_reg(i64 %0) {
%2 = and i64 %0, 253403070464
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void longjmp() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @longjmp() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
void remove_temphumidity_sensor(struct ssp_data *data) { return; }


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

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

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

LLVM IR (-O2):
%struct.ssp_data = type opaque
define void @remove_temphumidity_sensor(%struct.ssp_data* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bics_si_test(int, int);
scalar_t__ bics_si_test2(int, int);
int main(void) {
  int a = 5;
  int b = 5;
  int c = 20;
  if (bics_si_test(a, b))
    abort();
  if (bics_si_test2(c, b))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x14,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <bics_si_test@plt>
cmp    $0x0,%rax
je     1170 <main+0x40>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <bics_si_test2@plt>
cmp    $0x0,%rax
je     118c <main+0x5c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x5,%esi
call   1050 <bics_si_test@plt>
test   %rax,%rax
jne    115d <main+0x2d>
mov    $0x14,%edi
mov    $0x5,%esi
call   1040 <bics_si_test2@plt>
test   %rax,%rax
jne    115d <main+0x2d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 5, i32* %3
store i32 20, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i64 @bics_si_test(i32 %5, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = call i64 @bics_si_test2(i32 %12, i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @bics_si_test(i32 5, i32 5)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i64 @bics_si_test2(i32 20, i32 5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
ret i32 0
}
int unlockpt(int fildes) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<unlockpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xedc(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1132 <unlockpt+0x22>

x86 assembly (clang, -O2):
<unlockpt>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <unlockpt+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.unlockpt = [9 x i8] c"unlockpt\00"
define i32 @unlockpt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.unlockpt, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.unlockpt = [9 x i8] c"unlockpt\00"
define i32 @unlockpt(i32 %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.unlockpt, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char line[1000];
  getline(line, 1000);
  printf("%s", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void _wrmsr(unsigned int msr, unsigned long long val) {
  asm volatile("wrmsr" : : "c"(msr), "A"(val));
}


x86 assembly (clang, -O0):
<_wrmsr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
wrmsr
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wrmsr>:
mov    %rsi,%rax
mov    %edi,%ecx
wrmsr
ret

LLVM IR (-O0):
define void @_wrmsr(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
ret void
}

LLVM IR (-O2):
define void @_wrmsr(i32 %0, i64 %1) {
tail call void asm sideeffect "wrmsr", "{cx},A,~{dirflag},~{fpsr},~{flags}"(i32 %0, i64 %1)
ret void
}
/* Variables and functions */
int ptr2long(unsigned char *);
int check_align(unsigned char *ptr) {
  if (ptr2long(ptr) % 16)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_align>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ptr2long@plt>
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1142 <check_align+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <check_align+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_align>:
push   %rax
call   1030 <ptr2long@plt>
xor    %ecx,%ecx
test   $0xf,%al
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @check_align(i8* %0) {
%2 = tail call i32 @ptr2long(i8* %0)
%3 = and i32 %2, 15
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}