xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint;

/* Variables and functions */
uint monus_u(uint const a, uint const b) { return a >= b ? a - b : 0; }


x86 assembly (clang, -O0):
<monus_u>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jl     112b <monus_u+0x2b>
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1136 <monus_u+0x36>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1136 <monus_u+0x36>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<monus_u>:
xor    %eax,%eax
sub    %rsi,%rdi
cmovge %rdi,%rax
ret

LLVM IR (-O0):
define i64 @monus_u(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sge i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = sub nsw i64 %9, %10
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %8
%14 = phi i64 [ %11, %8 ], [ 0, %12 ]
ret i64 %14
}

LLVM IR (-O2):
define i64 @monus_u(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = sub nsw i64 %0, %1
%5 = select i1 %3, i64 0, i64 %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ advance(int);
char peek(int /*<<< orphan*/);
void skip_spaces(void) {
  for (;;) {
    char c = peek(0);
    if (c == ' ' || c == '\n')
      advance(1);
    else
      break;
  }
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <peek@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
je     114c <skip_spaces+0x2c>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    115b <skip_spaces+0x3b>
mov    $0x1,%edi
call   1040 <advance@plt>
jmp    1160 <skip_spaces+0x40>
jmp    1165 <skip_spaces+0x45>
jmp    1128 <skip_spaces+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
push   %rax
jmp    113a <skip_spaces+0x1a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x1,%edi
call   1040 <advance@plt>
xor    %edi,%edi
call   1030 <peek@plt>
cmp    $0x20,%al
je     1130 <skip_spaces+0x10>
cmp    $0xa,%al
je     1130 <skip_spaces+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @skip_spaces() {
%1 = alloca i8
br label %2
2: ; preds = %14, %0
%3 = call signext i8 @peek(i32 0)
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 10
br i1 %10, label %11, label %13
11: ; preds = %7, %2
%12 = call i32 @advance(i32 1)
br label %14
13: ; preds = %7
br label %15
14: ; preds = %11
br label %2
15: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @skip_spaces() {
br label %1
1: ; preds = %3, %0
%2 = tail call signext i8 @peek(i32 0)
switch i8 %2, label %5 [
i8 32, label %3
i8 10, label %3
]
3: ; preds = %1, %1
%4 = tail call i32 @advance(i32 1)
br label %1
5: ; preds = %1
ret void
}
void h(int x) {}


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

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

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

LLVM IR (-O2):
define void @h(i32 %0) {
ret void
}
/* Variables and functions */
char *char2hex(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("%s\n", char2hex(argv[1]));
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <char2hex@plt>
mov    %rax,%rsi
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <char2hex@plt>
lea    0xecf(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i8* @char2hex(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_settimeofday;
int syscall(int /*<<< orphan*/, struct timeval const *, int /*<<< orphan*/ *);
int settimeofday_syscall(const struct timeval *tv) {
  return syscall(SYS_settimeofday, tv, NULL);
}


x86 assembly (clang, -O0):
<settimeofday_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<settimeofday_syscall>:
mov    %rdi,%rsi
mov    0x2ede(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@SYS_settimeofday = global i32 0
define i32 @settimeofday_syscall(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load i32, i32* @SYS_settimeofday
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = call i32 @syscall(i32 %3, %struct.timeval* %4, i32* null)
ret i32 %5
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@SYS_settimeofday = global i32 0
define i32 @settimeofday_syscall(%struct.timeval* %0) {
%2 = load i32, i32* @SYS_settimeofday
%3 = tail call i32 @syscall(i32 %2, %struct.timeval* %0, i32* null)
ret i32 %3
}
/* Variables and functions */
unsigned char getc(int /*<<< orphan*/);
int /*<<< orphan*/ printMenu();
int /*<<< orphan*/ stdin;
char getMenuChoice(void) {
  unsigned char c;
  printMenu();
  c = getc(stdin);
  if (c != '0') {
    getc(stdin);
  }
  return c;
}


x86 assembly (clang, -O0):
<getMenuChoice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <printMenu@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x30,%eax
je     115b <getMenuChoice+0x3b>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMenuChoice>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <printMenu@plt>
mov    0x2eb6(%rip),%r14
mov    (%r14),%edi
call   1040 <getc@plt>
mov    %eax,%ebx
cmp    $0x30,%al
je     1148 <getMenuChoice+0x28>
mov    (%r14),%edi
call   1040 <getc@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define signext i8 @getMenuChoice() {
%1 = alloca i8
%2 = call i32 (...) @printMenu()
%3 = load i32, i32* @stdin
%4 = call zeroext i8 @getc(i32 %3)
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 48
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* @stdin
%10 = call zeroext i8 @getc(i32 %9)
br label %11
11: ; preds = %8, %0
%12 = load i8, i8* %1
ret i8 %12
}

LLVM IR (-O2):
@stdin = global i32 0
define signext i8 @getMenuChoice() {
%1 = tail call i32 (...) @printMenu()
%2 = load i32, i32* @stdin
%3 = tail call zeroext i8 @getc(i32 %2)
%4 = icmp eq i8 %3, 48
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* @stdin
%7 = tail call zeroext i8 @getc(i32 %6)
br label %8
8: ; preds = %5, %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("C: Hello\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 = [10 x i8] c"C: Hello\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 ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"C: Hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *basename(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int /*<<< orphan*/ stderr;
void _usage(const char *cmd) {
  fprintf(stderr,
          "%s(%u):  "
          "Usage: %s [check <filesystem> | resize <filesystem> <size>]"
          "\n",
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/cedricde/lrs/refs/heads/master/client/"
          "src_initrd/lvm2/tools/fsadm/fsadm.c",
          47, basename(cmd));
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%r8
lea    0xeb2(%rip),%rsi
lea    0xef1(%rip),%rdx
mov    $0x2f,%ecx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
call   1040 <basename@plt>
lea    0xeca(%rip),%rsi
lea    0xf09(%rip),%rdx
mov    %ebx,%edi
mov    $0x2f,%ecx
mov    %rax,%r8
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [70 x i8] c"%s(%u): Usage: %s [check <filesystem> | resize <filesystem> <size>]\0A\00"
@.str.1 = [164 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cedricde/lrs/refs/heads/master/client/src_initrd/lvm2/tools/fsadm/fsadm.c\00"
define void @_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i8* @basename(i8* %4)
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.1, i64 0, i64 0), i32 47, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [70 x i8] c"%s(%u): Usage: %s [check <filesystem> | resize <filesystem> <size>]\0A\00"
@.str.1 = [164 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cedricde/lrs/refs/heads/master/client/src_initrd/lvm2/tools/fsadm/fsadm.c\00"
define void @_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @basename(i8* %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.1, i64 0, i64 0), i32 47, i8* %3)
ret void
}
int longcompare(i, j)
long *i, *j;
{ return (*i > *j ? 1 : *i == *j ? 0 : -1); }


x86 assembly (clang, -O0):
<longcompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
jle    112d <longcompare+0x2d>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <longcompare+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<longcompare>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setne  %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @longcompare(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp sgt i64 %3, %4
%6 = icmp ne i64 %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
__attribute__((vector_size(16))) int fc(void) {
  return (__attribute__((vector_size(16))) int){0, 1, 0, 1};
}


x86 assembly (clang, -O0):
<fc>:
push   %rbp
mov    %rsp,%rbp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,-0x10(%rbp)
movdqa -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc>:
movaps 0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define <4 x i32> @fc() {
%1 = alloca <4 x i32>
store <4 x i32> <i32 0, i32 1, i32 0, i32 1>, <4 x i32>* %1
%2 = load <4 x i32>, <4 x i32>* %1
ret <4 x i32> %2
}

LLVM IR (-O2):
define <4 x i32> @fc() {
ret <4 x i32> <i32 0, i32 1, i32 0, i32 1>
}
int check_kvm_guest(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_kvm_guest() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_long;
struct timeval {
  int dummy;
};
struct sockaddr_in {
  int dummy;
};
typedef int /*<<< orphan*/ CLIENT;

/* Variables and functions */
int /*<<< orphan*/ UDPMSGSIZE;
int /*<<< orphan*/ *clntudp_bufcreate(struct sockaddr_in *, int /*<<< orphan*/,
                                      int /*<<< orphan*/, struct timeval, int *,
                                      int /*<<< orphan*/, int /*<<< orphan*/);
CLIENT *clntudp_create(struct sockaddr_in *raddr, u_long program,
                       u_long version, struct timeval wait, int *sockp) {
  return (clntudp_bufcreate(raddr, program, version, wait, sockp, UDPMSGSIZE,
                            UDPMSGSIZE));
}


x86 assembly (clang, -O0):
<clntudp_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %ecx,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%r8
mov    0x2ea2(%rip),%rax
mov    (%rax),%r9d
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
mov    %eax,(%rsp)
call   1030 <clntudp_bufcreate@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clntudp_create>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%r9d
mov    %r9d,(%rsp)
call   1030 <clntudp_bufcreate@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.timeval = type { i32 }
@UDPMSGSIZE = global i32 0
define i32* @clntudp_create(%struct.sockaddr_in* %0, i32 %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca %struct.timeval
%7 = alloca %struct.sockaddr_in*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
store i32 %3, i32* %11
store %struct.sockaddr_in* %0, %struct.sockaddr_in** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %4, i32** %10
%12 = load %struct.sockaddr_in*, %struct.sockaddr_in** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32*, i32** %10
%16 = load i32, i32* @UDPMSGSIZE
%17 = load i32, i32* @UDPMSGSIZE
%18 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%19 = load i32, i32* %18
%20 = call i32* @clntudp_bufcreate(%struct.sockaddr_in* %12, i32 %13, i32 %14, i32 %19, i32* %15, i32 %16, i32 %17)
ret i32* %20
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
@UDPMSGSIZE = global i32 0
define i32* @clntudp_create(%struct.sockaddr_in* %0, i32 %1, i32 %2, i32 %3, i32* %4) {
%6 = load i32, i32* @UDPMSGSIZE
%7 = tail call i32* @clntudp_bufcreate(%struct.sockaddr_in* %0, i32 %1, i32 %2, i32 %3, i32* %4, i32 %6, i32 %6)
ret i32* %7
}
int tick_broadcast_oneshot_active(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tick_broadcast_oneshot_active() {
ret i32 0
}
void CMovableModelEntity_OnEndClass(void) {}


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

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

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

LLVM IR (-O2):
define void @CMovableModelEntity_OnEndClass() {
ret void
}
int main() {
  char digits[][6] = {"zero", "one", "two",   "three", "four",
                      "five", "six", "seven", "eight", "nine"};
  int n;
  scanf("%d", &n);
  printf("%s\n", digits[n]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x3c,%edx
call   1040 <memcpy@plt>
lea    0xee8(%rip),%rdi
lea    -0x44(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rsi
imul   $0x6,%rax,%rax
add    %rax,%rsi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movups 0xf01(%rip),%xmm0
movups %xmm0,0x3c(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xee1(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,2),%rdi
add    $0x10,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.digits = [10 x [6 x i8]] [[6 x i8] c"zero\00\00", [6 x i8] c"one\00\00\00", [6 x i8] c"two\00\00\00", [6 x i8] c"three\00", [6 x i8] c"four\00\00", [6 x i8] c"five\00\00", [6 x i8] c"six\00\00\00", [6 x i8] c"seven\00", [6 x i8] c"eight\00", [6 x i8] c"nine\00\00"]
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [10 x [6 x i8]]
%2 = alloca i32
%3 = bitcast [10 x [6 x i8]]* %1 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [10 x [6 x i8]], [10 x [6 x i8]]* %1, i64 0, i64 %6
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.digits = [10 x [6 x i8]] [[6 x i8] c"zero\00\00", [6 x i8] c"one\00\00\00", [6 x i8] c"two\00\00\00", [6 x i8] c"three\00", [6 x i8] c"four\00\00", [6 x i8] c"five\00\00", [6 x i8] c"six\00\00\00", [6 x i8] c"seven\00", [6 x i8] c"eight\00", [6 x i8] c"nine\00\00"]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10 x [6 x i8]]
%2 = alloca i32
%3 = getelementptr inbounds [10 x [6 x i8]], [10 x [6 x i8]]* %1, i64 0, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [10 x [6 x i8]], [10 x [6 x i8]]* %1, i64 0, i64 %7, i64 0
%9 = call i32 @puts(i8* %8)
ret i32 0
}
/* Variables and functions */
int mystrlen(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char a[] = "the quick brown fox";
  printf("strlen(a) = %d\n", mystrlen(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <mystrlen@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x786f66,0x10(%rsp)
mov    %rsp,%rdi
call   1040 <mystrlen@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [20 x i8] c"the quick brown fox\00"
@.str = [16 x i8] c"strlen(a) = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @mystrlen(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [20 x i8] c"the quick brown fox\00"
@.str = [16 x i8] c"strlen(a) = %d\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @mystrlen(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void thread_fn(void *data) {
  int i = 0;
  printf("in thread_fn\n");
  while (1) {
    i++;
  }
}


x86 assembly (clang, -O0):
<thread_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    %eax,-0xc(%rbp)
jmp    112f <thread_fn+0x1f>

x86 assembly (clang, -O2):
<thread_fn>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <thread_fn+0x10>

LLVM IR (-O0):
@.str = [14 x i8] c"in thread_fn\0A\00"
define void @thread_fn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %1, %5
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
br label %5
}

LLVM IR (-O2):
@str = [13 x i8] c"in thread_fn\00"
define void @thread_fn(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %3
3: ; preds = %3, %1
br label %3
}
void ble_rsp_connection_features_get(
    const struct ble_msg_connection_features_get_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_connection_features_get_rsp_t = type opaque
define void @ble_rsp_connection_features_get(%struct.ble_msg_connection_features_get_rsp_t* nocapture %0) {
ret void
}
void XkbUpdateMapFromCore() {}


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

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

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

LLVM IR (-O2):
define void @XkbUpdateMapFromCore() {
ret void
}
int color_offset_f2(int x, int y) {
  return ((y << 10) - (((x << 10) * 310) / 297) - (3 << 10)) >> 10;
}


x86 assembly (clang, -O0):
<color_offset_f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0x136,%eax,%eax
mov    $0x129,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
sub    $0xc00,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f2>:
shl    $0xa,%esi
imul   $0x4d800,%edi,%eax
cltq
imul   $0xffffffff91ab8753,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x27,%rax
add    %ecx,%eax
add    %esi,%eax
add    $0xfffff400,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 310
%10 = sdiv i32 %9, 297
%11 = sub nsw i32 %6, %10
%12 = sub nsw i32 %11, 3072
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f2(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 317440
%5 = sdiv i32 %4, -297
%6 = add i32 %3, -3072
%7 = add i32 %6, %5
%8 = ashr i32 %7, 10
ret i32 %8
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
uint64_t rot_right64(uint64_t w, unsigned c) {
  return (w >> c) | (w << (64 - c));
}


x86 assembly (clang, -O0):
<rot_right64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot_right64>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot_right64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 64, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rot_right64(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 64, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
float relu(float x) { return (x > 0) ? x : 0; }


x86 assembly (clang, -O0):
<relu>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1129 <relu+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1136 <relu+0x36>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1136 <relu+0x36>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<relu>:
xorps  %xmm1,%xmm1
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @relu(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi float [ %6, %5 ], [ 0.000000e+00, %7 ]
ret float %9
}

LLVM IR (-O2):
define float @relu(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float %0, float 0.000000e+00
ret float %3
}
short MaxLineLength(short resolution) {
  return (((156 * resolution / 150) * 5) / 4) + 8;
}


x86 assembly (clang, -O0):
<MaxLineLength>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
imul   $0x9c,%eax,%eax
mov    $0x96,%ecx
cltd
idiv   %ecx
imul   $0x5,%eax,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x8,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<MaxLineLength>:
imul   $0x9c,%edi,%eax
cltq
imul   $0x1b4e81b5,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x24,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rax,4),%eax
add    $0x3,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
shr    $0x2,%eax
add    $0x8,%eax
ret

LLVM IR (-O0):
define signext i16 @MaxLineLength(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = mul nsw i32 156, %4
%6 = sdiv i32 %5, 150
%7 = mul nsw i32 %6, 5
%8 = sdiv i32 %7, 4
%9 = add nsw i32 %8, 8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @MaxLineLength(i16 signext %0) {
%2 = sext i16 %0 to i32
%3 = mul nsw i32 %2, 156
%4 = sdiv i32 %3, 150
%5 = mul nsw i32 %4, 5
%6 = sdiv i32 %5, 4
%7 = trunc i32 %6 to i16
%8 = add i16 %7, 8
ret i16 %8
}
void deallocate_ErrorResponse(struct ErrorResponse *v) {}


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

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

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

LLVM IR (-O2):
%struct.ErrorResponse = type opaque
define void @deallocate_ErrorResponse(%struct.ErrorResponse* nocapture %0) {
ret void
}
/* Variables and functions */
float ceilf(float);
float *vec3_ceil(float *result, float *a) {
  result[0] = ceilf(a[0]);
  result[1] = ceilf(a[1]);
  result[2] = ceilf(a[2]);
  return result;
}


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

x86 assembly (clang, -O2):
<vec3_ceil>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  (%rsi),%xmm0
call   1030 <ceilf@plt>
movss  %xmm0,(%rbx)
movss  0x4(%r14),%xmm0
call   1030 <ceilf@plt>
movss  %xmm0,0x4(%rbx)
movss  0x8(%r14),%xmm0
call   1030 <ceilf@plt>
movss  %xmm0,0x8(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float* @vec3_ceil(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = call float @llvm.ceil.f32(float %7)
%9 = load float*, float** %3
%10 = getelementptr inbounds float, float* %9, i64 0
store float %8, float* %10
%11 = load float*, float** %4
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = call float @llvm.ceil.f32(float %13)
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 1
store float %14, float* %16
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = call float @llvm.ceil.f32(float %19)
%21 = load float*, float** %3
%22 = getelementptr inbounds float, float* %21, i64 2
store float %20, float* %22
%23 = load float*, float** %3
ret float* %23
}

LLVM IR (-O2):
define float* @vec3_ceil(float* returned writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = tail call float @llvm.ceil.f32(float %3)
store float %4, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = tail call float @llvm.ceil.f32(float %6)
%8 = getelementptr inbounds float, float* %0, i64 1
store float %7, float* %8
%9 = getelementptr inbounds float, float* %1, i64 2
%10 = load float, float* %9
%11 = tail call float @llvm.ceil.f32(float %10)
%12 = getelementptr inbounds float, float* %0, i64 2
store float %11, float* %12
ret float* %0
}
/* Variables and functions */
int memcmp(void *, void *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int strcmp(const char *str1, const char *str2) {
  return memcmp((void *)str1, (void *)str2, strlen(str1));
}


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

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

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @memcmp(i8* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ applyIeee802154Patch();
void rf_patch_cpe_ieee_802_15_4(void) { applyIeee802154Patch(); }


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

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

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

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

/* Variables and functions */
int token_weight(uint64_t token) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @token_weight(i32 %0) {
ret i32 1
}
int is_special(char c) {
  if ((c == '!') || (c == '?') || (c == ':') || (c == ';'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_special>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x21,%eax
je     113e <is_special+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x3f,%eax
je     113e <is_special+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
je     113e <is_special+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x3b,%eax
jne    114a <is_special+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <is_special+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_special>:
cmp    $0x3f,%dil
ja     1120 <is_special+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x8c00000200000000,%rdx
bt     %rcx,%rdx
jae    1120 <is_special+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_special(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 33
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 63
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 58
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 59
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %21
20: ; preds = %15
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_special(i8 signext %0) {
switch i8 %0, label %2 [
i8 63, label %3
i8 59, label %3
i8 58, label %3
i8 33, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dectodoz(char *, double);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char doznum[2000] = "";
  double decnum = 0.33333333333333333333333333333333333;
  dectodoz(doznum, decnum);
  printf("%s\n", doznum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x7d0,%edx
call   1040 <memset@plt>
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x7e8(%rbp)
ff
lea    -0x7e0(%rbp),%rdi
movsd  -0x7e8(%rbp),%xmm0
ff
call   1050 <dectodoz@plt>
lea    -0x7e0(%rbp),%rsi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x7d0,%rsp
mov    %rsp,%rbx
mov    $0x7d0,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movsd  0xeae(%rip),%xmm0
mov    %rbx,%rdi
call   1050 <dectodoz@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7d0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [2000 x i8]
%2 = getelementptr inbounds [2000 x i8], [2000 x i8]* %1, i64 0, i64 0
%3 = call i32 @dectodoz(i8* %2, double 0x3FD5555555555555)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_DivideVec2f_init(void) {
  _hmt_register_covercase("HMM_DivideVec2f", "1");
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"HMM_DivideVec2f\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_DivideVec2f_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char *
analysis_or_forecast_generating_process_identifier_location(unsigned char **);
int analysis_or_forecast_generating_process_identifier(unsigned char **sec) {
  unsigned char *p;
  p = analysis_or_forecast_generating_process_identifier_location(sec);
  if (p)
    return (int)*p;
  return -1;
}


x86 assembly (clang, -O0):
<analysis_or_forecast_generating_process_identifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <analysis_or_forecast_generating_process_identifier_location@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1143 <analysis_or_forecast_generating_process_identifier+0x33>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <analysis_or_forecast_generating_process_identifier+0x3a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analysis_or_forecast_generating_process_identifier>:
push   %rax
call   1030 <analysis_or_forecast_generating_process_identifier_location@plt>
test   %rax,%rax
je     1120 <analysis_or_forecast_generating_process_identifier+0x10>
movzbl (%rax),%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @analysis_or_forecast_generating_process_identifier(i8** %0) {
%2 = tail call i8* @analysis_or_forecast_generating_process_identifier_location(i8** %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
unsigned int dictGenHashFunction(void const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(void const *);
unsigned int hash_func(const void *key) {
  return dictGenHashFunction(key, strlen(key));
}


x86 assembly (clang, -O0):
<hash_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <dictGenHashFunction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_func>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <dictGenHashFunction@plt>

LLVM IR (-O0):
define i32 @hash_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @dictGenHashFunction(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @hash_func(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @dictGenHashFunction(i8* %0, i32 %2)
ret i32 %3
}
void mdp4_overlay0_done_mddi(int cndx) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_overlay0_done_mddi(i32 %0) {
ret void
}
float fpconv_f64_f32(double x) { return x; }


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

x86 assembly (clang, -O2):
<fpconv_f64_f32>:
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fpconv_f64_f32(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptrunc double %3 to float
ret float %4
}

LLVM IR (-O2):
define float @fpconv_f64_f32(double %0) {
%2 = fptrunc double %0 to float
ret float %2
}
int f4(int a, int b, int c) { return 0; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f4(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
ret i32 0
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
int countWords(char *str) {
  int i, count = 0;
  for (i = 0; str[i] != '\0'; ++i)
    if (str[i] == ' ') {
      count++;
    }
  count++;
  return count;
}


x86 assembly (clang, -O0):
<countWords>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <countWords+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1149 <countWords+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114e <countWords+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <countWords+0x16>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countWords>:
xor    %eax,%eax
jmp    1117 <countWords+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x20,%cl
je     1110 <countWords+0x10>
test   %cl,%cl
jne    1113 <countWords+0x13>
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @countWords(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i64 [ %11, %9 ], [ 0, %1 ]
%4 = phi i32 [ %10, %9 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
switch i8 %6, label %9 [
i8 0, label %12
i8 32, label %7
]
7: ; preds = %2
%8 = add nsw i32 %4, 1
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ %4, %2 ]
%11 = add nuw i64 %3, 1
br label %2
12: ; preds = %2
%13 = add nsw i32 %4, 1
ret i32 %13
}