xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ttyprint(int /*<<< orphan*/, int, char *);
void print_error(char *pstr) {
  ttyprint(0, 35, pstr);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
mov    $0x23,%esi
call   1030 <ttyprint@plt>
jmp    112c <print_error+0x1c>

x86 assembly (clang, -O2):
<print_error>:
push   %rax
mov    %rdi,%rdx
xor    %edi,%edi
mov    $0x23,%esi
call   1030 <ttyprint@plt>
jmp    1120 <print_error+0x10>

LLVM IR (-O0):
define void @print_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ttyprint(i32 0, i32 35, i8* %3)
br label %5
5: ; preds = %1, %5
br label %5
}

LLVM IR (-O2):
define void @print_error(i8* %0) {
%2 = tail call i32 @ttyprint(i32 0, i32 35, i8* %0)
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
int yas_kxdm_write_reg(unsigned char, unsigned char *, int);
int yas_kxdm_write_reg_byte(int adr, int val) {
  return yas_kxdm_write_reg((unsigned char)adr, (unsigned char *)&val, 1);
}


x86 assembly (clang, -O0):
<yas_kxdm_write_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
lea    -0x8(%rbp),%rsi
mov    $0x1,%edx
movzbl %al,%edi
call   1030 <yas_kxdm_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_kxdm_write_reg_byte>:
push   %rax
mov    %esi,0x4(%rsp)
movzbl %dil,%edi
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <yas_kxdm_write_reg@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_kxdm_write_reg_byte(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 = trunc i32 %5 to i8
%7 = bitcast i32* %4 to i8*
%8 = call i32 @yas_kxdm_write_reg(i8 zeroext %6, i8* %7, i32 1)
ret i32 %8
}

LLVM IR (-O2):
define i32 @yas_kxdm_write_reg_byte(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = trunc i32 %0 to i8
%5 = bitcast i32* %3 to i8*
%6 = call i32 @yas_kxdm_write_reg(i8 zeroext %4, i8* %5, i32 1)
ret i32 %6
}
/* Variables and functions */
unsigned int if_nametoindex(char const *);
unsigned int netif_nametoindex(const char *__ifname) {
  return if_nametoindex(__ifname);
}


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

x86 assembly (clang, -O2):
<netif_nametoindex>:
jmp    1030 <if_nametoindex@plt>

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

LLVM IR (-O2):
define i32 @netif_nametoindex(i8* %0) {
%2 = tail call i32 @if_nametoindex(i8* %0)
ret i32 %2
}
/* Variables and functions */
char const *scout_ip_literal(char const *);
char *scout_ipv4address(char const *);
char *scout_reg_name(char const *);
const char *scout_host(const char *c) {
  const char *p = scout_reg_name(c);
  if (p == NULL) {
    if ((p = scout_ipv4address(c)) == NULL)
      return scout_ip_literal(c);
  }
  return p;
}


x86 assembly (clang, -O0):
<scout_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <scout_reg_name@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1182 <scout_host+0x52>
mov    -0x10(%rbp),%rdi
call   1040 <scout_ipv4address@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117d <scout_host+0x4d>
mov    -0x10(%rbp),%rdi
call   1050 <scout_ip_literal@plt>
mov    %rax,-0x8(%rbp)
jmp    118a <scout_host+0x5a>
jmp    1182 <scout_host+0x52>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scout_host>:
push   %rbx
mov    %rdi,%rbx
call   1030 <scout_reg_name@plt>
test   %rax,%rax
jne    114b <scout_host+0x1b>
mov    %rbx,%rdi
call   1040 <scout_ipv4address@plt>
test   %rax,%rax
je     114d <scout_host+0x1d>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <scout_ip_literal@plt>

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

LLVM IR (-O2):
define i8* @scout_host(i8* %0) {
%2 = tail call i8* @scout_reg_name(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i8* @scout_ipv4address(i8* %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i8* @scout_ip_literal(i8* %0)
br label %9
9: ; preds = %1, %4, %7
%10 = phi i8* [ %8, %7 ], [ %5, %4 ], [ %2, %1 ]
ret i8* %10
}
void ext4_exit_xattr(void) {}


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

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

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

LLVM IR (-O2):
define void @ext4_exit_xattr() {
ret void
}
/* Variables and functions */
int strcasecmp(char *, char *);
int sonoOrdinati(char *a, char *b) {
  int x = strcasecmp(a, b);
  return x < 0 ? 1 : (x == 0 ? 0 : -1);
}


x86 assembly (clang, -O0):
<sonoOrdinati>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1147 <sonoOrdinati+0x37>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115a <sonoOrdinati+0x4a>
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sonoOrdinati>:
push   %rax
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
neg    %ecx
test   %eax,%eax
mov    $0x1,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sonoOrdinati(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @strcasecmp(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %17
12: ; preds = %2
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 -1
br label %17
17: ; preds = %12, %11
%18 = phi i32 [ 1, %11 ], [ %16, %12 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @sonoOrdinati(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
%4 = icmp slt i32 %3, 0
%5 = icmp ne i32 %3, 0
%6 = sext i1 %5 to i32
%7 = select i1 %4, i32 1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x69() {
  Assert_real((isodigit(105) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              530, ("isodigit should be 0 for i"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x69>:
push   %rbp
mov    %rsp,%rbp
mov    $0x69,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x212,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x69>:
push   %rax
mov    $0x69,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x212,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for i\00"
define void @t_isodigit_0x69() {
%1 = call i64 @isodigit(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for i\00"
define void @t_isodigit_0x69() {
%1 = tail call i64 @isodigit(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CRAB_assert(int);
int main(void) {
  int i, j;
  i = 0;
  while (i < 10) {
    j = 0;
    while (j < 10) {
      j++;
    }
    i++;
  }
  __CRAB_assert(i == 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    115d <main+0x4d>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    114f <main+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
cmpl   $0xa,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CRAB_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__CRAB_assert(i32 1)
ret i32 0
}
void f6(void *p) { __builtin_bzero(p, 0); }


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

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

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

LLVM IR (-O2):
define void @f6(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ KeySym;

/* Variables and functions */
int IsPrivateKeypadKey(int /*<<< orphan*/);
int x11_extras_IsPrivateKeypadKey(KeySym keysym) {
  return IsPrivateKeypadKey(keysym);
}


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

x86 assembly (clang, -O2):
<x11_extras_IsPrivateKeypadKey>:
jmp    1030 <IsPrivateKeypadKey@plt>

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

LLVM IR (-O2):
define i32 @x11_extras_IsPrivateKeypadKey(i32 %0) {
%2 = tail call i32 @IsPrivateKeypadKey(i32 %0)
ret i32 %2
}
void unset_pnfs_layoutdriver(struct nfs_server *s) {}


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

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

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

LLVM IR (-O2):
%struct.nfs_server = type opaque
define void @unset_pnfs_layoutdriver(%struct.nfs_server* nocapture %0) {
ret void
}
void mbc_huc3_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @mbc_huc3_cleanup() {
ret void
}
int fun470() { return 470; }


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

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

LLVM IR (-O0):
define i32 @fun470() {
ret i32 470
}

LLVM IR (-O2):
define i32 @fun470() {
ret i32 470
}
unsigned long rdtsc(void) {
  unsigned int a, d;
  asm volatile("rdtsc" : "=a"(a), "=d"(d));
  return ((unsigned long)a) | (((unsigned long)d) << 32);
}


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

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

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @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
ret i64 %7
}
unsigned int _swapl(volatile unsigned long v) {
  return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24));
}


x86 assembly (clang, -O0):
<_swapl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff0000,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x18,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_swapl(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = shl i64 %3, 24
%5 = load volatile i64, i64* %2
%6 = and i64 %5, 65280
%7 = shl i64 %6, 8
%8 = or i64 %4, %7
%9 = load volatile i64, i64* %2
%10 = and i64 %9, 16711680
%11 = lshr i64 %10, 8
%12 = or i64 %8, %11
%13 = load volatile i64, i64* %2
%14 = lshr i64 %13, 24
%15 = or i64 %12, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @_swapl(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = shl i64 %3, 24
%5 = load volatile i64, i64* %2
%6 = shl i64 %5, 8
%7 = and i64 %6, 16711680
%8 = or i64 %7, %4
%9 = load volatile i64, i64* %2
%10 = lshr i64 %9, 8
%11 = and i64 %10, 65280
%12 = or i64 %8, %11
%13 = load volatile i64, i64* %2
%14 = lshr i64 %13, 24
%15 = or i64 %12, %14
%16 = trunc i64 %15 to i32
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
void mp_disconnect(int sd) {
  shutdown(sd, SHUT_RDWR);
  close(sd);
}


x86 assembly (clang, -O0):
<mp_disconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_disconnect>:
push   %rbx
mov    %edi,%ebx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define void @mp_disconnect(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_RDWR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
ret void
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define void @mp_disconnect(i32 %0) {
%2 = load i32, i32* @SHUT_RDWR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
unsigned int __sleep(unsigned int seconds) {
  __set_errno(ENOSYS);
  return seconds;
}


x86 assembly (clang, -O0):
<__sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sleep>:
push   %rbx
mov    %edi,%ebx
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__sleep(i32 returned %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ putint(int);
int main(void) { putint(42); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%edi
call   1030 <putint@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <putint@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @putint(i32 42)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putint(i32 42)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_barrier(int PE_start, int logPE_stride, int PE_size,
                          long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_barrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_barrier(i32 %0, i32 %1, i32 %2, i64* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64* %3, i64** %8
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_barrier(i32 %0, i32 %1, i32 %2, i64* nocapture readnone %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
size_t _getNameIndex(uint8_t *buffer, size_t length) { return 8; }


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

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

LLVM IR (-O0):
define i64 @_getNameIndex(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
ret i64 8
}

LLVM IR (-O2):
define i64 @_getNameIndex(i32* nocapture readnone %0, i64 %1) {
ret i64 8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("test !!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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"test !!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = 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"test !!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ff_hevc_put_hevc_uni_w_pel_pixels64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels64_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
main() {
  printf("Executing some Unix Commands\n");
  execl("/bin/ls", "ls", "-l", (char *)0);
  perror("Fail executing ls");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    0xecf(%rip),%rsi
lea    0xeb6(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1060 <execl@plt>
lea    0xea9(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0xea6(%rip),%rdx
xor    %ecx,%ecx
call   1060 <execl@plt>
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Executing some Unix Commands\0A\00"
@.str.1 = [8 x i8] c"/bin/ls\00"
@.str.2 = [3 x i8] c"ls\00"
@.str.3 = [3 x i8] c"-l\00"
@.str.4 = [18 x i8] c"Fail executing ls\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* null)
%4 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"/bin/ls\00"
@.str.2 = [3 x i8] c"ls\00"
@.str.3 = [3 x i8] c"-l\00"
@.str.4 = [18 x i8] c"Fail executing ls\00"
@str = [29 x i8] c"Executing some Unix Commands\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* null)
%3 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _clear_error_stack();
int _set_cache_location(char const *);
int set_cache_location(const char *path) {
  { _clear_error_stack(); };
  return (_set_cache_location(path));
}


x86 assembly (clang, -O0):
<set_cache_location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <_clear_error_stack@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_set_cache_location@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cache_location>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <_clear_error_stack@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_set_cache_location@plt>

LLVM IR (-O0):
define i32 @set_cache_location(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @_clear_error_stack()
%4 = load i8*, i8** %2
%5 = call i32 @_set_cache_location(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @set_cache_location(i8* %0) {
%2 = tail call i32 (...) @_clear_error_stack()
%3 = tail call i32 @_set_cache_location(i8* %0)
ret i32 %3
}
void RTHandleTableAllocWithCtx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHandleTableAllocWithCtx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char);
void uart_puts(char *str) {
  while (*str) {
    uart_putc(*(str++));
  }
  uart_putc('\n');
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <uart_puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart_putc@plt>
jmp    111c <uart_puts+0xc>
mov    $0xa,%edi
call   1030 <uart_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <uart_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <uart_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart_puts+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <uart_putc@plt>

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

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @uart_putc(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = tail call i32 @uart_putc(i8 signext 10)
ret void
}
void gtk_text_buffer_backspace() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_backspace() {
ret void
}
/* Variables and functions */
double pre2dou(int *);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int *in;
  scanf("%s", in);
  double result;
  result = pre2dou(in);
  printf("%.10lf", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <pre2dou@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <scanf@plt>
call   1030 <pre2dou@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%.10lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca double
store i32 0, i32* %1
%4 = load i32*, i32** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = load i32*, i32** %2
%7 = call double @pre2dou(i32* %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%.10lf\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* undef)
%2 = tail call double @pre2dou(i32* undef)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %2)
ret i32 0
}
int Section2Hours(int seconds) { return seconds / 3600; }


x86 assembly (clang, -O0):
<Section2Hours>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section2Hours>:
movslq %edi,%rax
imul   $0xffffffff91a2b3c5,%rax,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0xb,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Section2Hours(i32 %0) {
%2 = sdiv i32 %0, 3600
ret i32 %2
}
int parent_index(int x) { return (x - 1) >> 1; }


x86 assembly (clang, -O0):
<parent_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent_index>:
lea    -0x1(%rdi),%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @parent_index(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int);
void clear_screen(void) {
  const char *CLEAR_SCREEN_ANSI = "\e[1;1H\e[2J";
  write(STDOUT_FILENO, CLEAR_SCREEN_ANSI, 12);
}


x86 assembly (clang, -O0):
<clear_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    $0xc,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_screen>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0xc,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[1;1H\1B[2J\00"
@STDOUT_FILENO = global i32 0
define void @clear_screen() {
%1 = alloca i8*
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @STDOUT_FILENO
%3 = load i8*, i8** %1
%4 = call i32 @write(i32 %2, i8* %3, i32 12)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[1;1H\1B[2J\00"
@STDOUT_FILENO = global i32 0
define void @clear_screen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 12)
ret void
}
/* Variables and functions */
int aplusb(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int sum = 0;
  sum = aplusb(1, 1);
  printf("%d\n", sum);
  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)
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <aplusb@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <aplusb@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\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
%7 = call i32 @aplusb(i32 1, i32 1)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @aplusb(i32 1, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void MPIU_Exit(int exit_code) { exit(exit_code); }


x86 assembly (clang, -O0):
<MPIU_Exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<MPIU_Exit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @MPIU_Exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @MPIU_Exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int main(int, char **, char **);
__attribute__((section(".text.unlikely"))) void _start(int argc, char *argv[],
                                                       char *envp[]) {
  int ret = main(argc, argv, envp);
  exit(ret);
  assert(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <main@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <exit@plt>
xchg   %ax,%ax

x86 assembly (clang, -O2):
<_start>:
push   %rax
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>
nopl   (%rax)

LLVM IR (-O0):
define void @_start(i32 %0, i8** %1, i8** %2) section ".text.unlikely" {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = load i8**, i8*** %6
%11 = call i32 @main(i32 %8, i8** %9, i8** %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
define void @_start(i32 %0, i8** %1, i8** %2) section ".text.unlikely" {
%4 = tail call i32 @main(i32 %0, i8** %1, i8** %2)
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int ddns3_sockio_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @ddns3_sockio_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ddns3_sockio_init() {
ret i32 0
}
unsigned int fb_hMakeColor(int bpp, unsigned int index, int r, int g, int b) {
  unsigned int color;
  if (bpp == 2)
    color = (b >> 3) | ((g << 3) & 0x07E0) | ((r << 8) & 0xF800);
  else
    color = index;
  return color;
}


x86 assembly (clang, -O0):
<fb_hMakeColor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1148 <fb_hMakeColor+0x48>
mov    -0x14(%rbp),%eax
sar    $0x3,%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
and    $0x7e0,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x8,%ecx
and    $0xf800,%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    114e <fb_hMakeColor+0x4e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_hMakeColor>:
mov    %esi,%eax
cmp    $0x2,%edi
jne    1120 <fb_hMakeColor+0x20>
sar    $0x3,%r8d
and    $0xfc,%ecx
shl    $0x8,%edx
and    $0xf800,%edx
lea    (%rdx,%rcx,8),%eax
or     %r8d,%eax
ret

LLVM IR (-O0):
define i32 @fb_hMakeColor(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %25
14: ; preds = %5
%15 = load i32, i32* %10
%16 = ashr i32 %15, 3
%17 = load i32, i32* %9
%18 = shl i32 %17, 3
%19 = and i32 %18, 2016
%20 = or i32 %16, %19
%21 = load i32, i32* %8
%22 = shl i32 %21, 8
%23 = and i32 %22, 63488
%24 = or i32 %20, %23
store i32 %24, i32* %11
br label %27
25: ; preds = %5
%26 = load i32, i32* %7
store i32 %26, i32* %11
br label %27
27: ; preds = %25, %14
%28 = load i32, i32* %11
ret i32 %28
}

LLVM IR (-O2):
define i32 @fb_hMakeColor(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %0, 2
br i1 %6, label %7, label %15
7: ; preds = %5
%8 = ashr i32 %4, 3
%9 = shl i32 %3, 3
%10 = and i32 %9, 2016
%11 = shl i32 %2, 8
%12 = and i32 %11, 63488
%13 = or i32 %10, %12
%14 = or i32 %13, %8
br label %15
15: ; preds = %5, %7
%16 = phi i32 [ %14, %7 ], [ %1, %5 ]
ret i32 %16
}
double general_equation(int a, double x, double z) {
  double var_Y = 0.0;
  var_Y = (3.0 / 4) * x - z / (a % 2) + 3.14159265;
  return var_Y;
}


x86 assembly (clang, -O0):
<general_equation>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm2
divsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xeb3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe9b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<general_equation>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
and    $0xfffffffe,%eax
sub    %eax,%edi
cvtsi2sd %edi,%xmm2
mulsd  0xee8(%rip),%xmm0
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  0xee0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @general_equation(i32 %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %4
store double %1, double* %5
store double %2, double* %6
store double 0.000000e+00, double* %7
%8 = load double, double* %5
%9 = load double, double* %6
%10 = load i32, i32* %4
%11 = srem i32 %10, 2
%12 = sitofp i32 %11 to double
%13 = fdiv double %9, %12
%14 = fneg double %13
%15 = call double @llvm.fmuladd.f64(double 7.500000e-01, double %8, double %14)
%16 = fadd double %15, 0x400921FB53C8D4F1
store double %16, double* %7
%17 = load double, double* %7
ret double %17
}

LLVM IR (-O2):
define double @general_equation(i32 %0, double %1, double %2) {
%4 = srem i32 %0, 2
%5 = sitofp i32 %4 to double
%6 = fneg double %2
%7 = fdiv double %6, %5
%8 = tail call double @llvm.fmuladd.f64(double %1, double 7.500000e-01, double %7)
%9 = fadd double %8, 0x400921FB53C8D4F1
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ pabort(char *);
int openAnalogSPI(const char *device) {
  int fd;
  fd = open(device, O_RDWR);
  if (fd < 0) {
    pabort("can't open device");
    return -1;
  }
  return fd;
}


x86 assembly (clang, -O0):
<openAnalogSPI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1163 <openAnalogSPI+0x43>
lea    0xeae(%rip),%rdi
call   1040 <pabort@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <openAnalogSPI+0x49>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openAnalogSPI>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
test   %eax,%eax
js     1135 <openAnalogSPI+0x15>
pop    %rcx
ret
lea    0xec4(%rip),%rdi
call   1040 <pabort@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@O_RDWR = global i32 0
@.str = [18 x i8] c"can't open device\00"
define i32 @openAnalogSPI(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDWR
%7 = call i32 @open(i8* %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @pabort(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@.str = [18 x i8] c"can't open device\00"
define i32 @openAnalogSPI(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @pabort(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ %3, %1 ]
ret i32 %8
}
inc(int x) { return x + 1; }


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

x86 assembly (clang, -O2):
<inc>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @inc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @inc(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int imap_pm_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @imap_pm_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @imap_pm_init() {
ret i32 0
}
void RTC_EveryWeekHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @RTC_EveryWeekHandler() {
ret void
}
/* Variables and functions */
char tolower(char);
void lower_case(char *str) {
  if (!str)
    return;
  for (; *str; str++)
    *str = tolower(*str);
}


x86 assembly (clang, -O0):
<lower_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <lower_case+0x1c>
jmp    1163 <lower_case+0x53>
jmp    1131 <lower_case+0x21>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <lower_case+0x53>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1131 <lower_case+0x21>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @lower_case(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 %6, label %5
5: ; preds = %1
br label %19
6: ; preds = %1
br label %7
7: ; preds = %16, %6
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = call signext i8 @tolower(i8 signext %13)
%15 = load i8*, i8** %2
store i8 %14, i8* %15
br label %16
16: ; preds = %11
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %7
19: ; preds = %5, %7
ret void
}

LLVM IR (-O2):
define void @lower_case(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = tail call signext i8 @tolower(i8 signext %7)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret void
}
void XkbFreeGeomRows() {}


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

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

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

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

/* Variables and functions */
int __nacl_irt_gettod(struct timeval *);
int __gettimeofday(struct timeval *tv, struct timezone *tz) {
  return __nacl_irt_gettod(tv);
}


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

x86 assembly (clang, -O2):
<__gettimeofday>:
jmp    1030 <__nacl_irt_gettod@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @__gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = call i32 @__nacl_irt_gettod(%struct.timeval* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @__gettimeofday(%struct.timeval* %0, %struct.timezone* nocapture readnone %1) {
%3 = tail call i32 @__nacl_irt_gettod(%struct.timeval* %0)
ret i32 %3
}