xunge/DecIR huggingface dataset:
char *langEnumControlsJoyTetrisDongle() { return "Tetris 2 Dongle"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Tetris 2 Dongle\00"
define i8* @langEnumControlsJoyTetrisDongle() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"Tetris 2 Dongle\00"
define i8* @langEnumControlsJoyTetrisDongle() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
__attribute__((always_)) void __plic_set_feature(unsigned int feature) {
  volatile unsigned int *feature_ptr = (volatile unsigned int *)0x0;
  *feature_ptr = feature;
}


x86 assembly (clang, -O0):
<__plic_set_feature>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__plic_set_feature>:
mov    %edi,0x0
ret

LLVM IR (-O0):
define void @__plic_set_feature(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
store i32* null, i32** %3
%4 = load i32, i32* %2
%5 = load i32*, i32** %3
store volatile i32 %4, i32* %5
ret void
}

LLVM IR (-O2):
define void @__plic_set_feature(i32 %0) {
store volatile i32 %0, i32* null
ret void
}
/* Variables and functions */
scalar_t__ _mman(char *);
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret += _mman(argv[0]);
  return (ret == 0) ? 0 : 2;
}


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)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <_mman@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x2,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1030 <_mman@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
add    %ecx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
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
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i64 @_mman(i8* %10)
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 0, i32 2
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @_mman(i8* %3)
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 2
ret i32 %7
}
int sysfs_create_bin_file(struct kobject *kobj,
                          const struct bin_attribute *attr) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.bin_attribute = type opaque
define i32 @sysfs_create_bin_file(%struct.kobject* %0, %struct.bin_attribute* %1) {
%3 = alloca %struct.kobject*
%4 = alloca %struct.bin_attribute*
store %struct.kobject* %0, %struct.kobject** %3
store %struct.bin_attribute* %1, %struct.bin_attribute** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.bin_attribute = type opaque
define i32 @sysfs_create_bin_file(%struct.kobject* nocapture readnone %0, %struct.bin_attribute* nocapture readnone %1) {
ret i32 0
}
extern void set_timer_counter(unsigned short value) {
  *(volatile unsigned short int *)(0 + 0x44) = value;
}


x86 assembly (clang, -O0):
<set_timer_counter>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%cx
mov    $0x44,%eax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_timer_counter>:
mov    %di,0x44
ret

LLVM IR (-O0):
define void @set_timer_counter(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
store volatile i16 %3, i16* inttoptr (i64 68 to i16*)
ret void
}

LLVM IR (-O2):
define void @set_timer_counter(i16 zeroext %0) {
store volatile i16 %0, i16* inttoptr (i64 68 to i16*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x36_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x36_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x36_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x36_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x36_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
void clear_bit(int nr, volatile void *addr) {
  int mask;
  volatile int *a = addr;
  a += nr >> 5;
  mask = 1 << (nr & 0x1f);
  *a &= ~mask;
}


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
mov    %edi,%ecx
mov    %edi,%eax
sar    $0x5,%eax
mov    $0xfffffffe,%edx
rol    %cl,%edx
cltq
and    %edx,(%rsi,%rax,4)
ret

LLVM IR (-O0):
define void @clear_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %6
%9 = load i32, i32* %3
%10 = ashr i32 %9, 5
%11 = load i32*, i32** %6
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i32, i32* %11, i64 %12
store i32* %13, i32** %6
%14 = load i32, i32* %3
%15 = and i32 %14, 31
%16 = shl i32 1, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = xor i32 %17, -1
%19 = load i32*, i32** %6
%20 = load volatile i32, i32* %19
%21 = and i32 %20, %18
store volatile i32 %21, i32* %19
ret void
}

LLVM IR (-O2):
define void @clear_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = ashr i32 %0, 5
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %3, i64 %5
%7 = and i32 %0, 31
%8 = shl nuw i32 1, %7
%9 = xor i32 %8, -1
%10 = load volatile i32, i32* %6
%11 = and i32 %10, %9
store volatile i32 %11, i32* %6
ret void
}
/* Type definitions */
struct RNALfold_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_args(struct RNALfold_args_info *);
int /*<<< orphan*/ clear_given(struct RNALfold_args_info *);
int /*<<< orphan*/ init_args_info(struct RNALfold_args_info *);
void RNALfold_cmdline_parser_init(struct RNALfold_args_info *args_info) {
  clear_given(args_info);
  clear_args(args_info);
  init_args_info(args_info);
}


x86 assembly (clang, -O0):
<RNALfold_cmdline_parser_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_given@plt>
mov    -0x8(%rbp),%rdi
call   1030 <clear_args@plt>
mov    -0x8(%rbp),%rdi
call   1050 <init_args_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNALfold_cmdline_parser_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_given@plt>
mov    %rbx,%rdi
call   1030 <clear_args@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <init_args_info@plt>

LLVM IR (-O0):
%struct.RNALfold_args_info = type { i32 }
define void @RNALfold_cmdline_parser_init(%struct.RNALfold_args_info* %0) {
%2 = alloca %struct.RNALfold_args_info*
store %struct.RNALfold_args_info* %0, %struct.RNALfold_args_info** %2
%3 = load %struct.RNALfold_args_info*, %struct.RNALfold_args_info** %2
%4 = call i32 @clear_given(%struct.RNALfold_args_info* %3)
%5 = load %struct.RNALfold_args_info*, %struct.RNALfold_args_info** %2
%6 = call i32 @clear_args(%struct.RNALfold_args_info* %5)
%7 = load %struct.RNALfold_args_info*, %struct.RNALfold_args_info** %2
%8 = call i32 @init_args_info(%struct.RNALfold_args_info* %7)
ret void
}

LLVM IR (-O2):
%struct.RNALfold_args_info = type { i32 }
define void @RNALfold_cmdline_parser_init(%struct.RNALfold_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.RNALfold_args_info* %0)
%3 = tail call i32 @clear_args(%struct.RNALfold_args_info* %0)
%4 = tail call i32 @init_args_info(%struct.RNALfold_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void before() { puts("before===================="); }


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

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

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

LLVM IR (-O2):
@.str = [27 x i8] c"before====================\00"
define void @before() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ showbitmap(int, int, int);
int main(void) {
  showbitmap(320, 240, 0);
  showbitmap(320, 240, 1);
  showbitmap(320, 240, 2);
  showbitmap(240, 160, 0);
  showbitmap(400, 272, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x140,%edi
mov    $0xf0,%esi
xor    %edx,%edx
call   1030 <showbitmap@plt>
mov    $0x140,%edi
mov    $0xf0,%esi
mov    $0x1,%edx
call   1030 <showbitmap@plt>
mov    $0x140,%edi
mov    $0xf0,%esi
mov    $0x2,%edx
call   1030 <showbitmap@plt>
mov    $0xf0,%edi
mov    $0xa0,%esi
xor    %edx,%edx
call   1030 <showbitmap@plt>
mov    $0x190,%edi
mov    $0x110,%esi
xor    %edx,%edx
call   1030 <showbitmap@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x140,%edi
mov    $0xf0,%esi
xor    %edx,%edx
call   1030 <showbitmap@plt>
mov    $0x140,%edi
mov    $0xf0,%esi
mov    $0x1,%edx
call   1030 <showbitmap@plt>
mov    $0x140,%edi
mov    $0xf0,%esi
mov    $0x2,%edx
call   1030 <showbitmap@plt>
mov    $0xf0,%edi
mov    $0xa0,%esi
xor    %edx,%edx
call   1030 <showbitmap@plt>
mov    $0x190,%edi
mov    $0x110,%esi
xor    %edx,%edx
call   1030 <showbitmap@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @showbitmap(i32 320, i32 240, i32 0)
%3 = call i32 @showbitmap(i32 320, i32 240, i32 1)
%4 = call i32 @showbitmap(i32 320, i32 240, i32 2)
%5 = call i32 @showbitmap(i32 240, i32 160, i32 0)
%6 = call i32 @showbitmap(i32 400, i32 272, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @showbitmap(i32 320, i32 240, i32 0)
%2 = tail call i32 @showbitmap(i32 320, i32 240, i32 1)
%3 = tail call i32 @showbitmap(i32 320, i32 240, i32 2)
%4 = tail call i32 @showbitmap(i32 240, i32 160, i32 0)
%5 = tail call i32 @showbitmap(i32 400, i32 272, i32 0)
ret i32 0
}
int ascending(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

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

LLVM IR (-O2):
define i32 @ascending(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SysCtlVoltageEventConfig(uint32_t ui32Config) {
  (*((volatile unsigned long *)(0x400FE038))) = ui32Config;
}


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

x86 assembly (clang, -O2):
<SysCtlVoltageEventConfig>:
mov    %rdi,0x400fe038
40
ret

LLVM IR (-O0):
define void @SysCtlVoltageEventConfig(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074782264 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlVoltageEventConfig(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074782264 to i64*)
ret void
}
/* Variables and functions */
void *memmove_timec(void *, void const *, size_t);
void *tc_memmove(void *dest, const void *src, size_t n) {
  return memmove_timec(dest, src, n);
}


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

x86 assembly (clang, -O2):
<tc_memmove>:
jmp    1030 <memmove_timec@plt>

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

LLVM IR (-O2):
define i8* @tc_memmove(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @memmove_timec(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ is_prime(unsigned long);
unsigned long find_prime_greater_than(unsigned long val) {
  if (val & 1) {
    val += 2;
  } else {
    val++;
  }
  while (!is_prime(val)) {
    val += 2;
  }
  return val;
}


x86 assembly (clang, -O0):
<find_prime_greater_than>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     113f <find_prime_greater_than+0x2f>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    114b <find_prime_greater_than+0x3b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1150 <find_prime_greater_than+0x40>
mov    -0x8(%rbp),%rdi
call   1030 <is_prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    116e <find_prime_greater_than+0x5e>
jmp    117f <find_prime_greater_than+0x6f>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    1150 <find_prime_greater_than+0x40>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_prime_greater_than>:
push   %rbx
mov    %rdi,%rbx
mov    %ebx,%eax
and    $0x1,%eax
cmp    $0x1,%rax
sbb    $0x0,%rbx
add    $0x2,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1030 <is_prime@plt>
add    $0x2,%rbx
test   %eax,%eax
je     1130 <find_prime_greater_than+0x20>
add    $0xfffffffffffffffe,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @find_prime_greater_than(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = add i64 %7, 2
store i64 %8, i64* %2
br label %12
9: ; preds = %1
%10 = load i64, i64* %2
%11 = add i64 %10, 1
store i64 %11, i64* %2
br label %12
12: ; preds = %9, %6
br label %13
13: ; preds = %18, %12
%14 = load i64, i64* %2
%15 = call i32 @is_prime(i64 %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i64, i64* %2
%20 = add i64 %19, 2
store i64 %20, i64* %2
br label %13
21: ; preds = %13
%22 = load i64, i64* %2
ret i64 %22
}

LLVM IR (-O2):
define i64 @find_prime_greater_than(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i64 1, i64 2
%5 = add i64 %4, %0
br label %6
6: ; preds = %6, %1
%7 = phi i64 [ %5, %1 ], [ %10, %6 ]
%8 = tail call i32 @is_prime(i64 %7)
%9 = icmp eq i32 %8, 0
%10 = add i64 %7, 2
br i1 %9, label %6, label %11
11: ; preds = %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hi Paul\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Hi Paul\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ exp(double);
double log(scalar_t__);
double logadd(double V, double lp) {
  if (lp > V) {
    double t = lp;
    lp = V;
    V = t;
  }
  return V + log(1.0 + exp(lp - V));
}


x86 assembly (clang, -O0):
<logadd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1160 <logadd+0x40>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
cvtsi2sd %rax,%xmm1
movsd  0xe7a(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logadd>:
push   %rax
movapd %xmm0,%xmm2
minsd  %xmm1,%xmm2
maxsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
subsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xeb1(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <log@plt>
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @logadd(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %5
%11 = load double, double* %3
store double %11, double* %4
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %9, %2
%14 = load double, double* %3
%15 = load double, double* %4
%16 = load double, double* %3
%17 = fsub double %15, %16
%18 = call i64 @exp(double %17)
%19 = sitofp i64 %18 to double
%20 = fadd double 1.000000e+00, %19
%21 = fptosi double %20 to i64
%22 = call double @log(i64 %21)
%23 = fadd double %14, %22
ret double %23
}

LLVM IR (-O2):
define double @logadd(double %0, double %1) {
%3 = fcmp ogt double %1, %0
%4 = select i1 %3, double %0, double %1
%5 = select i1 %3, double %1, double %0
%6 = fsub double %4, %5
%7 = tail call i64 @exp(double %6)
%8 = sitofp i64 %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fptosi double %9 to i64
%11 = tail call double @log(i64 %10)
%12 = fadd double %5, %11
ret double %12
}
/* Type definitions */
struct ip6_hdr {
  scalar_t__ ip6_plen;
  scalar_t__ ip6_nxt;
};

/* Variables and functions */
scalar_t__ IPPROTO_NONE;
bool IsBubble(const struct ip6_hdr *hdr) {
  return (hdr->ip6_plen == 0) && (hdr->ip6_nxt == IPPROTO_NONE);
}


x86 assembly (clang, -O0):
<IsBubble>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jne    1133 <IsBubble+0x33>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x2ebe(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsBubble>:
xor    %eax,%eax
cmpq   $0x0,(%rdi)
je     1109 <IsBubble+0x9>
ret
mov    0x8(%rdi),%rcx
mov    0x2ed4(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
%struct.ip6_hdr = type { i64, i64 }
@IPPROTO_NONE = global i64 0
define i32 @IsBubble(%struct.ip6_hdr* %0) {
%2 = alloca %struct.ip6_hdr*
store %struct.ip6_hdr* %0, %struct.ip6_hdr** %2
%3 = load %struct.ip6_hdr*, %struct.ip6_hdr** %2
%4 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load %struct.ip6_hdr*, %struct.ip6_hdr** %2
%9 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = load i64, i64* @IPPROTO_NONE
%12 = icmp eq i64 %10, %11
br label %13
13: ; preds = %7, %1
%14 = phi i1 [ false, %1 ], [ %12, %7 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
%struct.ip6_hdr = type { i64, i64 }
@IPPROTO_NONE = global i64 0
define i32 @IsBubble(%struct.ip6_hdr* nocapture %0) {
%2 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = load i64, i64* @IPPROTO_NONE
%9 = icmp eq i64 %7, %8
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %5, %1
%12 = phi i32 [ 0, %1 ], [ %10, %5 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_def_storage(void) { output_with_tab(".blkb "); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c".blkb \00"
define void @gen_def_storage() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int /*<<< orphan*/, int, int, int);
int autohelperowl_attackpat6(struct pattern *patt, int transformation, int move,
                             int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(0, 2, move, transformation);
  return countlib(a) > 2;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x2,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat6>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
setge  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat6(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 2, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp sgt i32 %19, 2
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat6(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 2, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp sgt i32 %7, 2
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
scalar_t__ munmap(void *, size_t);
int /*<<< orphan*/ t_error(char *);
void xmunmap(void *ptr, size_t len) {
  if (munmap(ptr, len) != 0) {
    t_error("failed to unmap memory region");
  }
}


x86 assembly (clang, -O0):
<xmunmap>:
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 <munmap@plt>
cmp    $0x0,%rax
je     1153 <xmunmap+0x33>
lea    0xeb2(%rip),%rdi
call   1040 <t_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmunmap>:
push   %rax
call   1030 <munmap@plt>
test   %rax,%rax
je     1138 <xmunmap+0x18>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1040 <t_error@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"failed to unmap memory region\00"
define void @xmunmap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i64 @munmap(i8* %5, i64 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @t_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"failed to unmap memory region\00"
define void @xmunmap(i8* %0, i64 %1) {
%3 = tail call i64 @munmap(i8* %0, i64 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @t_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int pwrite(int, int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int write_msr(int fd, uint64_t which, uint64_t value) {
  if (pwrite(fd, &value, sizeof(value), which) != sizeof value) {
    perror("rdmsr:pwrite");
    exit(127);
  }
  return 0;
}


x86 assembly (clang, -O0):
<write_msr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <pwrite@plt>
cltq
cmp    $0x4,%rax
je     1177 <write_msr+0x47>
lea    0xe98(%rip),%rdi
call   1040 <perror@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_msr>:
push   %rax
mov    %esi,%ecx
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <pwrite@plt>
cmp    $0x4,%eax
jne    114f <write_msr+0x1f>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"rdmsr:pwrite\00"
define i32 @write_msr(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 @pwrite(i32 %0, i32* %4, i32 4, i32 %1)
%6 = icmp eq i32 %5, 4
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 127)
unreachable
10: ; preds = %3
ret i32 0
}
void CRYPTO_get_new_lockid(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_get_new_lockid() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;
typedef int /*<<< orphan*/ mbs;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
size_t wcsrtombs(char *, int /*<<< orphan*/ const **, size_t,
                 int /*<<< orphan*/ *);
size_t wcstombs(char *__restrict s, const wchar_t *__restrict pwcs, size_t n) {
  mbstate_t mbs;
  const wchar_t *pwcsp;
  memset(&mbs, 0, sizeof(mbs));
  pwcsp = pwcs;
  return (wcsrtombs(s, &pwcsp, n, &mbs));
}


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

x86 assembly (clang, -O2):
<wcstombs>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0x14(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    %rbx,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
mov    %r12,%rcx
call   1030 <wcsrtombs@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @wcstombs(i8* noalias %0, i32* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%9 = call i32 @memset(i32* %7, i32 0, i32 4)
%10 = load i32*, i32** %5
store i32* %10, i32** %8
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = call i64 @wcsrtombs(i8* %11, i32** %8, i64 %12, i32* %7)
ret i64 %13
}

LLVM IR (-O2):
define i64 @wcstombs(i8* noalias %0, i32* noalias %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = bitcast i32* %4 to i8*
%7 = bitcast i32** %5 to i8*
%8 = call i32 @memset(i32* %4, i32 0, i32 4)
store i32* %1, i32** %5
%9 = call i64 @wcsrtombs(i8* %0, i32** %5, i64 %2, i32* %4)
ret i64 %9
}
/* Variables and functions */
int ObjectSize3(void *const);
int IndirectObjectSize3(void *const p __attribute__((pass_object_size(3)))) {
  return ObjectSize3(p);
}


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

x86 assembly (clang, -O2):
<IndirectObjectSize3>:
jmp    1030 <ObjectSize3@plt>

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

LLVM IR (-O2):
define i32 @IndirectObjectSize3(i8* %0, i64 %1) {
%3 = tail call i32 @ObjectSize3(i8* %0)
ret i32 %3
}
void esp_event_handler_init(void) {}


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

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

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

LLVM IR (-O2):
define void @esp_event_handler_init() {
ret void
}
int do_495() { return 495; }


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

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

LLVM IR (-O0):
define i32 @do_495() {
ret i32 495
}

LLVM IR (-O2):
define i32 @do_495() {
ret i32 495
}
/* Variables and functions */
size_t upper_bound(size_t *pascal, size_t row_length, size_t L,
                   unsigned int n) {
  return pascal[(L - n) * row_length + L];
}


x86 assembly (clang, -O0):
<upper_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%edx
sub    %rdx,%rcx
imul   -0x10(%rbp),%rcx
add    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper_bound>:
mov    %ecx,%eax
mov    %rdx,%rcx
sub    %rax,%rcx
imul   %rsi,%rcx
add    %rdx,%rcx
mov    (%rdi,%rcx,8),%rax
ret

LLVM IR (-O0):
define i64 @upper_bound(i64* %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i64*, i64** %5
%10 = load i64, i64* %7
%11 = load i32, i32* %8
%12 = zext i32 %11 to i64
%13 = sub i64 %10, %12
%14 = load i64, i64* %6
%15 = mul i64 %13, %14
%16 = load i64, i64* %7
%17 = add i64 %15, %16
%18 = getelementptr inbounds i64, i64* %9, i64 %17
%19 = load i64, i64* %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @upper_bound(i64* nocapture %0, i64 %1, i64 %2, i32 %3) {
%5 = zext i32 %3 to i64
%6 = sub i64 %2, %5
%7 = mul i64 %6, %1
%8 = add i64 %7, %2
%9 = getelementptr inbounds i64, i64* %0, i64 %8
%10 = load i64, i64* %9
ret i64 %10
}
int isValidFile(char *fileName) { return fileName[0] != '.'; }


x86 assembly (clang, -O0):
<isValidFile>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidFile>:
xor    %eax,%eax
cmpb   $0x2e,(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @isValidFile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 46
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isValidFile(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ne i8 %2, 46
%4 = zext i1 %3 to i32
ret i32 %4
}
int strcmp(const char *a, const char *b) {
  while (*a && *b) {
    if (*(a++) != *(b++))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1131 <strcmp+0x31>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1141 <strcmp+0x41>
jmp    117e <strcmp+0x7e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1179 <strcmp+0x79>
movl   $0x1,-0x4(%rbp)
jmp    1185 <strcmp+0x85>
jmp    110c <strcmp+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdi,%rcx,1),%r8d
test   %r8b,%r8b
je     1130 <strcmp+0x30>
movzbl (%rsi,%rcx,1),%edx
test   %dl,%dl
je     1130 <strcmp+0x30>
add    $0x1,%rcx
cmp    %dl,%r8b
je     1110 <strcmp+0x10>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(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 = %29, %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i8*, i8** %5
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %11, %6
%17 = phi i1 [ false, %6 ], [ %15, %11 ]
br i1 %17, label %18, label %30
18: ; preds = %16
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %4
%21 = load i8, i8* %19
%22 = sext i8 %21 to i32
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %5
%25 = load i8, i8* %23
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %22, %26
br i1 %27, label %28, label %29
28: ; preds = %18
store i32 1, i32* %3
br label %31
29: ; preds = %18
br label %6
30: ; preds = %16
store i32 0, i32* %3
br label %31
31: ; preds = %30, %28
%32 = load i32, i32* %3
ret i32 %32
}

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

/* Variables and functions */
int /*<<< orphan*/ SwapByteOrder_32(int /*<<< orphan*/);
void bswap_32(const size_t n, void *u) {
  uint32_t *T = u;
  size_t i;
  for (i = 0; i < n; i++) {
    *(T + i) = SwapByteOrder_32(*(T + i));
  }
  return;
}


x86 assembly (clang, -O0):
<bswap_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116c <bswap_32+0x5c>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <SwapByteOrder_32@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1130 <bswap_32+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_32>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1146 <bswap_32+0x36>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,4),%edi
call   1030 <SwapByteOrder_32@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <bswap_32+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @bswap_32(i64 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = icmp eq i64 %0, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i32, i32* %3, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 @SwapByteOrder_32(i32 %8)
store i32 %9, i32* %7
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *getenv(char *);
const char *conf_get_configname(void) {
  char *name = getenv("BUILD_DIALOG_CONFIG");
  return name ? name : "./tools/watch-config.dlg";
}


x86 assembly (clang, -O0):
<conf_get_configname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <conf_get_configname+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_configname+0x40>
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_configname+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_get_configname>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xeed(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"BUILD_DIALOG_CONFIG\00"
@.str.1 = [25 x i8] c"./tools/watch-config.dlg\00"
define i8* @conf_get_configname() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"BUILD_DIALOG_CONFIG\00"
@.str.1 = [25 x i8] c"./tools/watch-config.dlg\00"
define i8* @conf_get_configname() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ miniuart_putc(int /*<<< orphan*/);
void miniuart_puts(char *str) {
  if (str) {
    while (*str) {
      miniuart_putc(*str++);
    }
  }
}


x86 assembly (clang, -O0):
<miniuart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115a <miniuart_puts+0x4a>
jmp    112c <miniuart_puts+0x1c>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1155 <miniuart_puts+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <miniuart_putc@plt>
jmp    112c <miniuart_puts+0x1c>
jmp    115a <miniuart_puts+0x4a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<miniuart_puts>:
push   %rbx
test   %rdi,%rdi
je     1143 <miniuart_puts+0x33>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1143 <miniuart_puts+0x33>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <miniuart_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <miniuart_puts+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @miniuart_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %17
5: ; preds = %1
br label %6
6: ; preds = %10, %5
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = call i32 @miniuart_putc(i32 %14)
br label %6
16: ; preds = %6
br label %17
17: ; preds = %16, %1
ret void
}

LLVM IR (-O2):
define void @miniuart_puts(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %12, %6 ], [ %4, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %7 to i32
%11 = tail call i32 @miniuart_putc(i32 %10)
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %3, %1
ret void
}
int xTEDSwrap() { return 1; }


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

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

LLVM IR (-O0):
define i32 @xTEDSwrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @xTEDSwrap() {
ret i32 1
}