xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int si_errno;
  int si_signo;
  int si_code;
  void *si_addr;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void handler(int sig, siginfo_t *info, void *context) {
  int ssi_errno = info->si_errno;
  int ssi_signo = info->si_signo;
  int ssi_code = info->si_code;
  void *ssi_addr = info->si_addr;
  _exit(0);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x30(%rbp)
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32, i8* }
define void @handler(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%11 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 1
%16 = load i32, i32* %15
store i32 %16, i32* %8
%17 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%18 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %17, i32 0, i32 2
%19 = load i32, i32* %18
store i32 %19, i32* %9
%20 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%21 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %20, i32 0, i32 3
%22 = load i8*, i8** %21
store i8* %22, i8** %10
%23 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i8* }
define void @handler(i32 %0, %struct.TYPE_3__* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ syscall_cp(int, int, void const *, size_t,
                              int /*<<< orphan*/);
ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs) {
  return syscall_cp(18, fd, buf, size, (ofs));
}


x86 assembly (clang, -O0):
<pwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x12,%edi
call   1030 <syscall_cp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwrite>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x12,%edi
jmp    1030 <syscall_cp@plt>

LLVM IR (-O0):
define i32 @pwrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @syscall_cp(i32 18, i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pwrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @syscall_cp(i32 18, i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute((visibility("default"))) void not_hidden() {
  printf("exported symbol\n");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"exported symbol\0A\00"
define void @not_hidden() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"exported symbol\00"
define void @not_hidden() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *concatenate(char *, char *, int, char const *, char const *, char const *,
                  char const *);
char *get_container_work_directory(const char *nm_root, const char *user,
                                   const char *app_id,
                                   const char *container_id) {
  return concatenate("%s/usercache/%s"
                     "/appcache/%s"
                     "/%s",
                     "container_dir_path", 4, nm_root, user, app_id,
                     container_id);
}


x86 assembly (clang, -O0):
<get_container_work_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
lea    0xec1(%rip),%rdi
lea    0xed9(%rip),%rsi
mov    $0x4,%edx
mov    %rax,(%rsp)
call   1030 <concatenate@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_container_work_directory>:
push   %rax
mov    %rdx,%r9
mov    %rsi,%r8
mov    %rdi,%rax
mov    %rcx,(%rsp)
lea    0xedb(%rip),%rdi
lea    0xef3(%rip),%rsi
mov    $0x4,%edx
mov    %rax,%rcx
call   1030 <concatenate@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"%s/usercache/%s/appcache/%s/%s\00"
@.str.1 = [19 x i8] c"container_dir_path\00"
define i8* @get_container_work_directory(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i8* @concatenate(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* %9, i8* %10, i8* %11, i8* %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [31 x i8] c"%s/usercache/%s/appcache/%s/%s\00"
@.str.1 = [19 x i8] c"container_dir_path\00"
define i8* @get_container_work_directory(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* @concatenate(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* %0, i8* %1, i8* %2, i8* %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ su_log_stack_usage();
void signal_handler(int num) {
  (void)num;
  su_log_stack_usage();
}


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

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

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

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = tail call i32 (...) @su_log_stack_usage()
ret void
}
/* Variables and functions */
unsigned long ntohl(unsigned long);
unsigned int cidr_get_maskbits(unsigned long mask) {
  unsigned int i = 32;
  if (mask == 0)
    return 0;
  mask = ntohl(mask);
  while (mask % 2 == 0) {
    mask >>= 1;
    i--;
  }
  return i;
}


x86 assembly (clang, -O0):
<cidr_get_maskbits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x20,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113a <cidr_get_maskbits+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1179 <cidr_get_maskbits+0x69>
mov    -0x10(%rbp),%rdi
call   1030 <ntohl@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1173 <cidr_get_maskbits+0x63>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <cidr_get_maskbits+0x37>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cidr_get_maskbits>:
test   %rdi,%rdi
je     114f <cidr_get_maskbits+0x3f>
push   %rax
call   1030 <ntohl@plt>
mov    %rax,%rcx
mov    $0x20,%eax
test   $0x1,%cl
lea    0x8(%rsp),%rsp
jne    114e <cidr_get_maskbits+0x3e>
mov    $0x20,%eax
mov    %rcx,%rdx
cs nopw 0x0(%rax,%rax,1)
nop
shr    %rdx
add    $0xffffffff,%eax
test   $0x2,%cl
mov    %rdx,%rcx
je     1140 <cidr_get_maskbits+0x30>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @cidr_get_maskbits(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = tail call i64 @ntohl(i64 %0)
%5 = and i64 %4, 1
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3, %7
%8 = phi i32 [ %11, %7 ], [ 32, %3 ]
%9 = phi i64 [ %10, %7 ], [ %4, %3 ]
%10 = lshr i64 %9, 1
%11 = add i32 %8, -1
%12 = and i64 %9, 2
%13 = icmp eq i64 %12, 0
br i1 %13, label %7, label %14
14: ; preds = %7, %3, %1
%15 = phi i32 [ 0, %1 ], [ 32, %3 ], [ %11, %7 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
unsigned int strlen(char *);
int main() {
  FILE *f;
  char buffer[100];
  unsigned int i;
  f = fopen("asd", "xzy");
  if (fgets(buffer, 100, f) != 0) {
    i = strlen(buffer);
  }
  fclose(f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    0xea4(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x64,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1194 <main+0x54>
lea    -0x80(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x84(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xeb4(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x64,%esi
mov    %rax,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1178 <main+0x38>
mov    %rsp,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"asd\00"
@.str.1 = [4 x i8] c"xzy\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [100 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32* @fopen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32* %5, i32** %2
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = load i32*, i32** %2
%8 = call i64 @fgets(i8* %6, i32 100, i32* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %4
br label %13
13: ; preds = %10, %0
%14 = load i32*, i32** %2
%15 = call i32 @fclose(i32* %14)
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"asd\00"
@.str.1 = [4 x i8] c"xzy\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = call i64 @fgets(i8* %2, i32 100, i32* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @strlen(i8* %2)
br label %8
8: ; preds = %6, %0
%9 = call i32 @fclose(i32* %3)
ret i32 0
}
int datapidgen(int pid, char *buffer, int bsize, int offset) { return -1; }


x86 assembly (clang, -O0):
<datapidgen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @datapidgen(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @datapidgen(i32 %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ playsound(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ say_xy(char *, int /*<<< orphan*/, int);
void talk(void) {
  say_xy("secret.wav/22050Hz - secret unlocked", 0, 380);
  playsound(43, 22050, 0, 0, 0);
}


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
xor    %esi,%esi
mov    $0x17c,%edx
call   1030 <say_xy@plt>
mov    $0x2b,%edi
mov    $0x5622,%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1040 <playsound@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
mov    $0x17c,%edx
call   1030 <say_xy@plt>
mov    $0x2b,%edi
mov    $0x5622,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
pop    %rax
jmp    1040 <playsound@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"secret.wav/22050Hz - secret unlocked\00"
define void @talk() {
%1 = call i32 @say_xy(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 0, i32 380)
%2 = call i32 @playsound(i32 43, i32 22050, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"secret.wav/22050Hz - secret unlocked\00"
define void @talk() {
%1 = tail call i32 @say_xy(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 0, i32 380)
%2 = tail call i32 @playsound(i32 43, i32 22050, i32 0, i32 0, i32 0)
ret void
}
char *b32enc_shortdesc(void) { return "encode data to Base32 representation"; }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"encode data to Base32 representation\00"
define i8* @b32enc_shortdesc() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [37 x i8] c"encode data to Base32 representation\00"
define i8* @b32enc_shortdesc() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}
int libaroma_text_tabwidth(int x, int space_w) {
  int spacesz = space_w * 8;
  return (spacesz - (x % spacesz));
}


x86 assembly (clang, -O0):
<libaroma_text_tabwidth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libaroma_text_tabwidth>:
mov    %edi,%eax
lea    0x0(,%rsi,8),%ecx
cltd
idiv   %ecx
sub    %edx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @libaroma_text_tabwidth(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 8
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = srem i32 %9, %10
%12 = sub nsw i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @libaroma_text_tabwidth(i32 %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = srem i32 %0, %3
%5 = sub nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  while (*str != '\0') {
    ft_putchar(*str);
    ++str;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <ft_putstr+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ft_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ft_putstr(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* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void timerinit(void) {
  outb((0x040 + 3), 0x00 | 0x04 | 0x30);
  outb(0x040, ((1193182 + (100) / 2) / (100)) % 256);
  outb(0x040, ((1193182 + (100) / 2) / (100)) / 256);
}


x86 assembly (clang, -O0):
<timerinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x9c,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x2e,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerinit>:
push   %rax
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x9c,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x2e,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @timerinit() {
%1 = call i32 @outb(i32 67, i32 52)
%2 = call i32 @outb(i32 64, i32 156)
%3 = call i32 @outb(i32 64, i32 46)
ret void
}

LLVM IR (-O2):
define void @timerinit() {
%1 = tail call i32 @outb(i32 67, i32 52)
%2 = tail call i32 @outb(i32 64, i32 156)
%3 = tail call i32 @outb(i32 64, i32 46)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void sprint_mov_to_direct(char *str, uint8_t direct) {
  sprintf(str,
          "MOV   "
          "0x%02X"
          ", A                   ",
          direct);
}


x86 assembly (clang, -O0):
<sprint_mov_to_direct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_mov_to_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"MOV 0x%02X, A \00"
define void @sprint_mov_to_direct(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"MOV 0x%02X, A \00"
define void @sprint_mov_to_direct(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
double tu_timer_real(void) { return -1.0; }


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

x86 assembly (clang, -O2):
<tu_timer_real>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @tu_timer_real() {
ret double -1.000000e+00
}

LLVM IR (-O2):
define double @tu_timer_real() {
ret double -1.000000e+00
}
cfree(addr) char *addr;
{
  extern end;
  if (addr >= &end)
    free(addr);
}


x86 assembly (clang, -O0):
<cfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
cmp    %rax,-0x10(%rbp)
jb     1136 <cfree+0x26>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfree>:
push   %rax
cmp    0x2ec8(%rip),%rdi
jb     111f <cfree+0xf>
call   1030 <free@plt>
pop    %rcx
ret

LLVM IR (-O0):
@end = external global i32
define i32 @cfree(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp uge i8* %4, bitcast (i32* @end to i8*)
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** %3
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@end = external global i32
define i32 @cfree(i8* %0) {
%2 = icmp ult i8* %0, bitcast (i32* @end to i8*)
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @free(i8* %0)
br label %4
4: ; preds = %3, %1
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timeval {
  scalar_t__ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
struct timeval TimeTToTimeVal(const time_t t) {
  struct timeval tv;
  tv.tv_sec = t;
  tv.tv_usec = 0;
  return tv;
}


x86 assembly (clang, -O0):
<TimeTToTimeVal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%edx
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimeTToTimeVal>:
xor    %eax,%eax
mov    %edi,%edx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i32 }
define { i64, i32 } @TimeTToTimeVal(i32 %0) {
%2 = alloca %struct.timeval
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
store i64 0, i64* %6
%7 = bitcast %struct.timeval* %2 to { i64, i32 }*
%8 = load { i64, i32 }, { i64, i32 }* %7
ret { i64, i32 } %8
}

LLVM IR (-O2):
define { i64, i32 } @TimeTToTimeVal(i32 %0) {
%2 = insertvalue { i64, i32 } { i64 0, i32 poison }, i32 %0, 1
ret { i64, i32 } %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int star = 1;
  for (star = 1; star <= 100; star++) {
    printf("*");
    while (star % 10 == 0) {
      printf("\n");
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1176 <main+0x66>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1163 <main+0x53>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1168 <main+0x58>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
mov    $0x1,%r14b
jmp    112c <main+0x1c>
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%ebx
add    $0x1,%r14b
cmp    $0xffffff9c,%ebx
je     1160 <main+0x50>
movzbl %r14b,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%ebp
neg    %ebp
mov    $0x2a,%edi
call   1030 <putchar@plt>
or     $0x1,%bpl
cmp    %bl,%bpl
jne    1120 <main+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 1, %0 ], [ %10, %9 ]
%3 = tail call i32 @putchar(i32 42)
%4 = trunc i32 %2 to i8
%5 = urem i8 %4, 10
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @putchar(i32 10)
br label %9
9: ; preds = %1, %7
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 101
br i1 %11, label %12, label %1
12: ; preds = %9
ret i32 0
}
void nmm_get_cpu(int *cpu, int *ierr) {
  *cpu = 0;
  *ierr = 0;
}


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

x86 assembly (clang, -O2):
<nmm_get_cpu>:
movl   $0x0,(%rdi)
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @nmm_get_cpu(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
store i32 0, i32* %5
%6 = load i32*, i32** %4
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @nmm_get_cpu(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 0, i32* %0
store i32 0, i32* %1
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRAB_set(void) { return U_WMRCORENONE_set("U_WMRAB"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRAB\00"
define i8* @U_WMRAB_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRAB\00"
define i8* @U_WMRAB_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
size_t next_prev_power_2(size_t);
size_t next_power_2(size_t x) {
  if (x & (x - 1)) {
    x = next_prev_power_2(x);
    x++;
  }
  return x;
}


x86 assembly (clang, -O0):
<next_power_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     114e <next_power_2+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <next_prev_power_2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power_2>:
mov    %rdi,%rax
lea    -0x1(%rdi),%rcx
test   %rcx,%rdi
je     112d <next_power_2+0x1d>
push   %rax
mov    %rax,%rdi
call   1030 <next_prev_power_2@plt>
add    $0x1,%rax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i64 @next_power_2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 %4, 1
%6 = and i64 %3, %5
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i64 @next_prev_power_2(i64 %9)
store i64 %10, i64* %2
%11 = load i64, i64* %2
%12 = add i64 %11, 1
store i64 %12, i64* %2
br label %13
13: ; preds = %8, %1
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
define i64 @next_power_2(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
%3 = icmp ult i64 %2, 2
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @next_prev_power_2(i64 %0)
%6 = add i64 %5, 1
br label %7
7: ; preds = %4, %1
%8 = phi i64 [ %6, %4 ], [ %0, %1 ]
ret i64 %8
}
/* Variables and functions */
float __infer_nondet_float();
float atan2f(float y, float x) { return __infer_nondet_float(); }


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

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

LLVM IR (-O0):
define float @atan2f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @atan2f(float %0, float %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}
int ISODD(x) { return x % 2 == 0 ? 0 : 1; }


x86 assembly (clang, -O0):
<ISODD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ISODD(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ISODD(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ install_syscall_filter();
int /*<<< orphan*/ printf(char *);
long syscall(int);
int main(int argc, char *argv[]) {
  long ret;
  install_syscall_filter();
  printf("Hi there!\n");
  ret = syscall(69);
  printf("should not arrive here (check dmesg)\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <install_syscall_filter@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    $0x45,%edi
call   1040 <syscall@plt>
mov    %rax,-0x18(%rbp)
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <install_syscall_filter@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x45,%edi
call   1040 <syscall@plt>
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Hi there!\0A\00"
@.str.1 = [38 x i8] c"should not arrive here (check dmesg)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @install_syscall_filter()
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = call i64 @syscall(i32 69)
store i64 %9, i64* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"Hi there!\00"
@str.2 = [37 x i8] c"should not arrive here (check dmesg)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @install_syscall_filter()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%5 = tail call i64 @syscall(i32 69)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void PostRestartHook() {}


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

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

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

LLVM IR (-O2):
define void @PostRestartHook() {
ret void
}
double _nor(const int numInputs, const double *inputs,
            const double *connectionWeights) {
  int i;
  for (i = 0; i < numInputs; i++) {
    if (inputs[i] == 1) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<_nor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <_nor+0x67>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xec9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1154 <_nor+0x54>
jp     1154 <_nor+0x54>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1174 <_nor+0x74>
jmp    1159 <_nor+0x59>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1116 <_nor+0x16>
movsd  0xe91(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nor>:
test   %edi,%edi
jle    1127 <_nor+0x27>
mov    %edi,%eax
xor    %ecx,%ecx
movsd  0xef0(%rip),%xmm0
movsd  (%rsi,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
jne    111d <_nor+0x1d>
jnp    1130 <_nor+0x30>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <_nor+0x10>
ret
movsd  0xed1(%rip),%xmm0
ret
xorpd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @_nor(i32 %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store i32 0, i32* %8
br label %9
9: ; preds = %22, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %25
13: ; preds = %9
%14 = load double*, double** %6
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double, double* %17
%19 = fcmp oeq double %18, 1.000000e+00
br i1 %19, label %20, label %21
20: ; preds = %13
store double 0.000000e+00, double* %4
br label %26
21: ; preds = %13
br label %22
22: ; preds = %21
%23 = load i32, i32* %8
%24 = add nsw i32 %23, 1
store i32 %24, i32* %8
br label %9
25: ; preds = %9
store double 1.000000e+00, double* %4
br label %26
26: ; preds = %25, %20
%27 = load double, double* %4
ret double %27
}

LLVM IR (-O2):
define double @_nor(i32 %0, double* nocapture %1, double* nocapture readnone %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds double, double* %1, i64 %10
%12 = load double, double* %11
%13 = fcmp oeq double %12, 1.000000e+00
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi double [ 1.000000e+00, %3 ], [ 1.000000e+00, %7 ], [ 0.000000e+00, %9 ]
ret double %16
}
long double _Complex mul_long_double_cr(long double _Complex a, long double b) {
  return a * b;
}


x86 assembly (clang, -O0):
<mul_long_double_cr>:
push   %rbp
mov    %rsp,%rbp
fldt   0x30(%rbp)
lea    0x10(%rbp),%rax
fstpt  -0x30(%rbp)
fldt   (%rax)
fldt   0x10(%rax)
fldt   -0x30(%rbp)
fmul   %st,%st(2)
fmulp  %st,%st(1)
fxch   %st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_long_double_cr>:
fldt   0x28(%rsp)
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fxch   %st(1)
fmul   %st(2),%st
fxch   %st(1)
fmulp  %st,%st(2)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @mul_long_double_cr({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0, x86_fp80 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = alloca x86_fp80
store x86_fp80 %1, x86_fp80* %4
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%8 = load x86_fp80, x86_fp80* %7
%9 = load x86_fp80, x86_fp80* %4
%10 = fmul x86_fp80 %6, %9
%11 = fmul x86_fp80 %8, %9
%12 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %10, x86_fp80* %12
store x86_fp80 %11, x86_fp80* %13
%14 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %14
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @mul_long_double_cr({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0, x86_fp80 %1) {
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = fmul x86_fp80 %4, %1
%8 = fmul x86_fp80 %6, %1
%9 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %7, 0
%10 = insertvalue { x86_fp80, x86_fp80 } %9, x86_fp80 %8, 1
ret { x86_fp80, x86_fp80 } %10
}
void tilt_init(void) {}


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

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

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

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

/* Variables and functions */
char const *EnvGetConstructNameString(void *, struct constructHeader *);
const char *EnvGetDefclassName(void *theEnv, void *theClass) {
  return EnvGetConstructNameString(theEnv, (struct constructHeader *)theClass);
}


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

x86 assembly (clang, -O2):
<EnvGetDefclassName>:
jmp    1030 <EnvGetConstructNameString@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDefclassName(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 = bitcast i8* %6 to %struct.constructHeader*
%8 = call i8* @EnvGetConstructNameString(i8* %5, %struct.constructHeader* %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDefclassName(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @EnvGetConstructNameString(i8* %0, %struct.constructHeader* %3)
ret i8* %4
}
/* Variables and functions */
scalar_t__ is_letter(char);
int is_ident(char c) {
  return is_letter(c) || c == '$' || c == '_' || c == '.';
}


x86 assembly (clang, -O0):
<is_ident>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_letter@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    116a <is_ident+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x24,%ecx
mov    %al,-0x2(%rbp)
je     116a <is_ident+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     116a <is_ident+0x5a>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ident>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_letter@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <is_ident+0x17>
pop    %rbx
ret
cmp    $0x24,%bl
je     1125 <is_ident+0x15>
cmp    $0x5f,%bl
je     1125 <is_ident+0x15>
xor    %eax,%eax
cmp    $0x2e,%bl
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_ident(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_letter(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 36
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 46
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_ident(i8 signext %0) {
%2 = tail call i64 @is_letter(i8 signext %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i8 %0, label %6 [
i8 95, label %9
i8 36, label %9
]
6: ; preds = %5
%7 = icmp eq i8 %0, 46
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %10
}
/* Variables and functions */
int **combinationSum3(int, int, int **, int *);
int main(void) {
  int **res, n, *col;
  res = combinationSum3(3, 28, &col, &n);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x1c,%esi
lea    -0x20(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1030 <combinationSum3@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    $0x3,%edi
mov    $0x1c,%esi
call   1030 <combinationSum3@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32**
%3 = alloca i32
%4 = alloca i32*
store i32 0, i32* %1
%5 = call i32** @combinationSum3(i32 3, i32 28, i32** %4, i32* %3)
store i32** %5, i32*** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32** %2 to i8*
%5 = call i32** @combinationSum3(i32 3, i32 28, i32** %2, i32* %1)
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare(const void *str1, const void *str2) {
  return strcmp(*(const char **)str1, *(const char **)str2);
}


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

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

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
unsigned long I2CMasterErr(unsigned long ulBase) {
  unsigned long ulErr;
  ;
  ulErr = (*((volatile unsigned long *)(ulBase + 0x00000004)));
  if (ulErr & 0x00000001) {
    return (0);
  }
  if (ulErr & 0x00000002) {
    return (ulErr & (0x00000010 | 0x00000008 | 0x00000004));
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<I2CMasterErr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1133 <I2CMasterErr+0x33>
movq   $0x0,-0x8(%rbp)
jmp    115e <I2CMasterErr+0x5e>
mov    -0x18(%rbp),%rax
and    $0x2,%rax
cmp    $0x0,%rax
je     1156 <I2CMasterErr+0x56>
mov    -0x18(%rbp),%rax
and    $0x1c,%rax
mov    %rax,-0x8(%rbp)
jmp    115e <I2CMasterErr+0x5e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterErr>:
mov    0x4(%rdi),%rcx
mov    %ecx,%edx
and    $0x3,%edx
and    $0x1c,%ecx
xor    %eax,%eax
cmp    $0x2,%edx
cmove  %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @I2CMasterErr(i64 %0) {
%2 = add i64 %0, 4
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 3
%6 = icmp eq i64 %5, 2
%7 = and i64 %4, 28
%8 = select i1 %6, i64 %7, i64 0
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
int main(void) {
  double x = 3.1415926, y;
  int *p;
  p = (int *)&x;
  y = *p;
  printf("x = %f, y = %f\n", x, y);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"x = %f, y = %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double 0x400921FB4D12D84A, double 0x41D344B612800000)
ret i32 0
}