xunge/DecIR huggingface dataset:
/* Variables and functions */
int ack(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int m, n;
  printf("Please input m,n:");
  scanf("%d,%d", &m, &n);
  printf("Ack(%d,%d)=%d\n", m, n, ack(m, n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <ack@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    (%rsp),%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <ack@plt>
lea    0xeac(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Please input m,n:\00"
@.str.1 = [6 x i8] c"%d,%d\00"
@.str.2 = [15 x i8] c"Ack(%d,%d)=%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @ack(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Please input m,n:\00"
@.str.1 = [6 x i8] c"%d,%d\00"
@.str.2 = [15 x i8] c"Ack(%d,%d)=%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @ack(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int /*<<< orphan*/);
void print_version(void) {
  printf("beeversion v%d.%d.%d - "
         "by Marius Tolzmann <m@rius.berlin> 2010-2016\n",
         1, 3, 0);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"beeversion v%d.%d.%d - by Marius Tolzmann <m@rius.berlin> 2010-2016\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 1, i32 3, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"beeversion v%d.%d.%d - by Marius Tolzmann <m@rius.berlin> 2010-2016\0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 1, i32 3, i32 0)
ret void
}
/* Variables and functions */
void *malloc(size_t const);
int /*<<< orphan*/ memset(void *, char const, size_t const);
int /*<<< orphan*/ perror(char *);
void *mem_calloc(const size_t size, const size_t word_size,
                 const char placeholder) {
  void *map = malloc(size * word_size);
  if (map) {
    memset(map, placeholder, size);
  } else {
    perror("mem_calloc: ");
  }
  return map;
}


x86 assembly (clang, -O0):
<mem_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     117a <mem_calloc+0x4a>
mov    -0x20(%rbp),%rdi
mov    -0x11(%rbp),%al
mov    -0x8(%rbp),%rdx
movsbl %al,%esi
call   1030 <memset@plt>
jmp    1186 <mem_calloc+0x56>
lea    0xe7f(%rip),%rdi
call   1050 <perror@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_calloc>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rdi,%r14
imul   %rdi,%rsi
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1164 <mem_calloc+0x34>
movsbl %bpl,%esi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xe95(%rip),%rdi
call   1050 <perror@plt>
jmp    115c <mem_calloc+0x2c>

LLVM IR (-O0):
@.str = [13 x i8] c"mem_calloc: \00"
define i8* @mem_calloc(i64 %0, i64 %1, i8 signext %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8
%7 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8 %2, i8* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = mul i64 %8, %9
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i8*, i8** %7
%16 = load i8, i8* %6
%17 = load i64, i64* %4
%18 = call i32 @memset(i8* %15, i8 signext %16, i64 %17)
br label %21
19: ; preds = %3
%20 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %14
%22 = load i8*, i8** %7
ret i8* %22
}

LLVM IR (-O2):
@.str = [13 x i8] c"mem_calloc: \00"
define i8* @mem_calloc(i64 %0, i64 %1, i8 signext %2) {
%4 = mul i64 %1, %0
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @memset(i8* %5, i8 signext %2, i64 %0)
br label %11
9: ; preds = %3
%10 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i8* %5
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xresizerequest_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xresizerequest.serial = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xresizerequest_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
char *intoa(int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char a[5] = "\n";
  char *s = a;
  if (1)
    s = intoa(54321);
  else
    s = "Error";
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0xd431,%edi
call   1040 <intoa@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @intoa(i32 54321)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
void security_d_instantiate(struct dentry *dentry, struct inode *inode) {}


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

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

LLVM IR (-O0):
%struct.dentry = type opaque
%struct.inode = type opaque
define void @security_d_instantiate(%struct.dentry* %0, %struct.inode* %1) {
%3 = alloca %struct.dentry*
%4 = alloca %struct.inode*
store %struct.dentry* %0, %struct.dentry** %3
store %struct.inode* %1, %struct.inode** %4
ret void
}

LLVM IR (-O2):
%struct.dentry = type opaque
%struct.inode = type opaque
define void @security_d_instantiate(%struct.dentry* nocapture %0, %struct.inode* nocapture %1) {
ret void
}
/* Type definitions */
struct rlimit {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_CPU;
int /*<<< orphan*/ getpid();
int prlimit(int /*<<< orphan*/ const, int /*<<< orphan*/, int /*<<< orphan*/ *,
            struct rlimit *);
int main(void) {
  struct rlimit old_rlim;
  const pid_t pid = getpid();
  return prlimit(pid, RLIMIT_CPU, NULL, &old_rlim);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x8(%rbp),%rcx
call   1040 <prlimit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
mov    %rsp,%rcx
mov    %eax,%edi
xor    %edx,%edx
call   1040 <prlimit@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@RLIMIT_CPU = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.rlimit
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @getpid()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @RLIMIT_CPU
%7 = call i32 @prlimit(i32 %5, i32 %6, i32* null, %struct.rlimit* %2)
ret i32 %7
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@RLIMIT_CPU = global i32 0
define i32 @main() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = tail call i32 (...) @getpid()
%4 = load i32, i32* @RLIMIT_CPU
%5 = call i32 @prlimit(i32 %3, i32 %4, i32* null, %struct.rlimit* %1)
ret i32 %5
}
/* Variables and functions */
int AF_UNSPEC;
int idrnet_af_unspec() { return AF_UNSPEC; }


x86 assembly (clang, -O0):
<idrnet_af_unspec>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idrnet_af_unspec>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@AF_UNSPEC = global i32 0
define i32 @idrnet_af_unspec() {
%1 = load i32, i32* @AF_UNSPEC
ret i32 %1
}

LLVM IR (-O2):
@AF_UNSPEC = global i32 0
define i32 @idrnet_af_unspec() {
%1 = load i32, i32* @AF_UNSPEC
ret i32 %1
}
void snd_info_set_text_ops(struct snd_info_entry *entry __attribute__((unused)),
                           void *private_data, long read_size,
                           void (*read)(struct snd_info_entry *,
                                        struct snd_info_buffer *)) {}


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

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

LLVM IR (-O0):
%struct.snd_info_entry = type opaque
%struct.snd_info_buffer = type opaque
define void @snd_info_set_text_ops(%struct.snd_info_entry* %0, i8* %1, i64 %2, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %3) {
%5 = alloca %struct.snd_info_entry*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca void (%struct.snd_info_entry*, %struct.snd_info_buffer*)*
store %struct.snd_info_entry* %0, %struct.snd_info_entry** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* %3, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)** %8
ret void
}

LLVM IR (-O2):
%struct.snd_info_entry = type opaque
%struct.snd_info_buffer = type opaque
define void @snd_info_set_text_ops(%struct.snd_info_entry* nocapture %0, i8* nocapture %1, i64 %2, void (%struct.snd_info_entry*, %struct.snd_info_buffer*)* nocapture %3) {
ret void
}
void printPathStack() {}


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

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

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

LLVM IR (-O2):
define void @printPathStack() {
ret void
}
char *cstrcpy(char *to, const char *from) {
  char *save = to;
  for (; (*to = *from) != '\0'; ++from, ++to)
    ;
  return (save);
}


x86 assembly (clang, -O0):
<cstrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     114e <cstrcpy+0x4e>
jmp    1131 <cstrcpy+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <cstrcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstrcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     111f <cstrcpy+0x1f>
mov    $0x1,%ecx
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <cstrcpy+0x10>
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ *malloc(size_t);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          size_t);
int wcslen(int /*<<< orphan*/ const *);
wchar_t *compat_wcsdup(const wchar_t *src) {
  size_t n = (wcslen(src) + 1) * sizeof(wchar_t);
  wchar_t *dest = malloc(n);
  memcpy(dest, src, n);
  return dest;
}


x86 assembly (clang, -O0):
<compat_wcsdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wcslen@plt>
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compat_wcsdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <wcslen@plt>
cltq
lea    0x4(,%rax,4),%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @compat_wcsdup(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i32*
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @wcslen(i32* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 4
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = call i32* @malloc(i64 %10)
store i32* %11, i32** %4
%12 = load i32*, i32** %4
%13 = load i32*, i32** %2
%14 = load i64, i64* %3
%15 = call i32 @memcpy(i32* %12, i32* %13, i64 %14)
%16 = load i32*, i32** %4
ret i32* %16
}

LLVM IR (-O2):
define i32* @compat_wcsdup(i32* %0) {
%2 = tail call i32 @wcslen(i32* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = shl nsw i64 %4, 2
%6 = tail call i32* @malloc(i64 %5)
%7 = tail call i32 @memcpy(i32* %6, i32* %0, i64 %5)
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *);
int /*<<< orphan*/ draw_status();
int /*<<< orphan*/ kill_this_task();
void drop(void) {
  debug("bomb removed");
  draw_status();
  kill_this_task();
}


x86 assembly (clang, -O0):
<drop>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <debug@plt>
mov    $0x0,%al
call   1050 <draw_status@plt>
mov    $0x0,%al
call   1030 <kill_this_task@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <debug@plt>
xor    %eax,%eax
call   1050 <draw_status@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <kill_this_task@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"bomb removed\00"
define void @drop() {
%1 = call i32 @debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @draw_status()
%3 = call i32 (...) @kill_this_task()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"bomb removed\00"
define void @drop() {
%1 = tail call i32 @debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @draw_status()
%3 = tail call i32 (...) @kill_this_task()
ret void
}
void moveArm_top() {}


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

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

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

LLVM IR (-O2):
define void @moveArm_top() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "DEMO semigroup Sampled Gaussian kernel convolution  \n");
  fprintf(
      stderr,
      " gaussconv_sampled_kernel in sigma k(truncation) N(iterations) out \n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xefd(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf07(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"DEMO semigroup Sampled Gaussian kernel convolution \0A\00"
@.str.1 = [69 x i8] c" gaussconv_sampled_kernel in sigma k(truncation) N(iterations) out \0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"DEMO semigroup Sampled Gaussian kernel convolution \0A\00"
@.str.1 = [69 x i8] c" gaussconv_sampled_kernel in sigma k(truncation) N(iterations) out \0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ranged_random_pcg32_boundedrand(scalar_t__);
void loop_pcg32_linear(size_t count, uint32_t range, uint32_t *output) {
  for (size_t i = 0; i < count; i++) {
    *output++ = ranged_random_pcg32_boundedrand(range + i);
  }
}


x86 assembly (clang, -O0):
<loop_pcg32_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116d <loop_pcg32_linear+0x5d>
mov    -0x10(%rbp),%rdi
add    -0x20(%rbp),%rdi
call   1030 <ranged_random_pcg32_boundedrand@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <loop_pcg32_linear+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_pcg32_linear>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1148 <loop_pcg32_linear+0x38>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
call   1030 <ranged_random_pcg32_boundedrand@plt>
cltq
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <loop_pcg32_linear+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @loop_pcg32_linear(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %13, %6 ], [ 0, %3 ]
%8 = phi i64* [ %12, %6 ], [ %2, %3 ]
%9 = add i64 %7, %1
%10 = tail call i32 @ranged_random_pcg32_boundedrand(i64 %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %8, i64 1
store i64 %11, i64* %8
%13 = add nuw i64 %7, 1
%14 = icmp eq i64 %13, %0
br i1 %14, label %5, label %6
}
/* Variables and functions */
double ldexp(double, long);
double scalbln(double x, long n) { return ldexp(x, n); }


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

x86 assembly (clang, -O2):
<scalbln>:
jmp    1030 <ldexp@plt>

LLVM IR (-O0):
define double @scalbln(double %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
store double %0, double* %3
store i64 %1, i64* %4
%5 = load double, double* %3
%6 = load i64, i64* %4
%7 = call double @ldexp(double %5, i64 %6)
ret double %7
}

LLVM IR (-O2):
define double @scalbln(double %0, i64 %1) {
%3 = tail call double @ldexp(double %0, i64 %1)
ret double %3
}
void open_excalibur(void) {}


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

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

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

LLVM IR (-O2):
define void @open_excalibur() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeAddr(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<freeAddr>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeAddr(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
long _block_size_by_payload(long);
long round_up_2power(long);
long _normalize_block_size(long payload_size) {
  long blk_size = _block_size_by_payload(payload_size);
  blk_size = round_up_2power(blk_size);
  return blk_size;
}


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

x86 assembly (clang, -O2):
<_normalize_block_size>:
push   %rax
call   1030 <_block_size_by_payload@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <round_up_2power@plt>

LLVM IR (-O0):
define i64 @_normalize_block_size(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @_block_size_by_payload(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i64 @round_up_2power(i64 %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @_normalize_block_size(i64 %0) {
%2 = tail call i64 @_block_size_by_payload(i64 %0)
%3 = tail call i64 @round_up_2power(i64 %2)
ret i64 %3
}
double dmedian_ordered(const double *v, int len) {
  int rank = len / 2;
  if (len & 1) {
    return v[rank];
  }
  return (v[rank - 1] + v[rank]) / 2.0;
}


x86 assembly (clang, -O0):
<dmedian_ordered>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113f <dmedian_ordered+0x3f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116f <dmedian_ordered+0x6f>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xe9a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmedian_ordered>:
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
cltq
test   $0x1,%sil
jne    1125 <dmedian_ordered+0x25>
movsd  -0x8(%rdi,%rax,8),%xmm0
addsd  (%rdi,%rax,8),%xmm0
mulsd  0xedc(%rip),%xmm0
ret
movsd  (%rdi,%rax,8),%xmm0
ret

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

LLVM IR (-O2):
define double @dmedian_ordered(double* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = and i32 %1, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
br label %20
10: ; preds = %2
%11 = add nsw i32 %3, -1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %0, i64 %12
%14 = load double, double* %13
%15 = sext i32 %3 to i64
%16 = getelementptr inbounds double, double* %0, i64 %15
%17 = load double, double* %16
%18 = fadd double %14, %17
%19 = fmul double %18, 5.000000e-01
br label %20
20: ; preds = %10, %6
%21 = phi double [ %9, %6 ], [ %19, %10 ]
ret double %21
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
int main() {
  int a, b, c;
  a = 1;
  b = 2;
  c = 3;
  printf("%d\n\t%d  %d\n    %d   %d\t\b%d\n", a, b, c, a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
mov    -0x10(%rbp),%eax
lea    0xeb1(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3,(%rsp)
lea    0xee1(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x1,%r8d
mov    $0x2,%r9d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"%d\0A\09%d %d\0A %d %d\09\08%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 1, i32 2, i32 3)
ret i32 0
}
long long bit40() { return 0x0000010000000000LL; }


x86 assembly (clang, -O0):
<bit40>:
push   %rbp
mov    %rsp,%rbp
movabs $0x10000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit40>:
movabs $0x10000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit40() {
ret i64 1099511627776
}

LLVM IR (-O2):
define i64 @bit40() {
ret i64 1099511627776
}
int is_product_symbology(char *buf) {
  int result = 0;
  if (((unsigned char)*(buf + 2) * 0x100 + (unsigned char)*((buf + 2) + 1)) ==
      1)
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<is_product_symbology>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
add    %ecx,%eax
cmp    $0x1,%eax
jne    1134 <is_product_symbology+0x34>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_product_symbology>:
movzwl 0x2(%rdi),%ecx
shl    $0x10,%ecx
bswap  %ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_product_symbology(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = mul nsw i32 %7, 256
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = add nsw i32 %8, %13
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %1
store i32 1, i32* %3
br label %17
17: ; preds = %16, %1
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_product_symbology(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = or i32 %5, %8
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
scalar_t__ tolower(int);
int char_ci_ge(int c1, int c2) { return tolower(c1) >= tolower(c2); }


x86 assembly (clang, -O0):
<char_ci_ge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <tolower@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <tolower@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_ci_ge>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <tolower@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <tolower@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setge  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @char_ci_ge(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 = call i64 @tolower(i32 %5)
%7 = load i32, i32* %4
%8 = call i64 @tolower(i32 %7)
%9 = icmp sge i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @char_ci_ge(i32 %0, i32 %1) {
%3 = tail call i64 @tolower(i32 %0)
%4 = tail call i64 @tolower(i32 %1)
%5 = icmp sge i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char hex_val(int);
int dec_to_hex(int n, char hex[]) {
  int helper, i;
  helper = n;
  for (i = 0; helper; i++) {
    hex[i] = hex_val(helper % 16);
    helper = helper / 16;
  }
  return 0;
}


x86 assembly (clang, -O0):
<dec_to_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1171 <dec_to_hex+0x61>
mov    -0x14(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <hex_val@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112c <dec_to_hex+0x1c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_to_hex>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     1149 <dec_to_hex+0x39>
mov    %rsi,%rbx
nopl   0x0(%rax,%rax,1)
lea    0xf(%rdi),%r14d
test   %edi,%edi
mov    %edi,%ebp
cmovs  %r14d,%ebp
mov    %ebp,%eax
and    $0xfffffff0,%eax
sub    %eax,%edi
call   1030 <hex_val@plt>
mov    %al,(%rbx)
sar    $0x4,%ebp
add    $0x1,%rbx
mov    %ebp,%edi
cmp    $0x1e,%r14d
ja     1120 <dec_to_hex+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @dec_to_hex(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = phi i32 [ %10, %4 ], [ %0, %2 ]
%7 = srem i32 %6, 16
%8 = tail call signext i8 @hex_val(i32 %7)
%9 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 %8, i8* %9
%10 = sdiv i32 %6, 16
%11 = add nuw i64 %5, 1
%12 = add i32 %6, 15
%13 = icmp ult i32 %12, 31
br i1 %13, label %14, label %4
14: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
double mkPosInf();
double mkNegInf(void) { return -mkPosInf(); }


x86 assembly (clang, -O0):
<mkNegInf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mkPosInf@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkNegInf>:
push   %rax
xor    %eax,%eax
call   1030 <mkPosInf@plt>
xorps  0xee1(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mkNegInf() {
%1 = call double (...) @mkPosInf()
%2 = fneg double %1
ret double %2
}

LLVM IR (-O2):
define double @mkNegInf() {
%1 = tail call double (...) @mkPosInf()
%2 = fneg double %1
ret double %2
}
int lseek(int fildes, int offset, int whence) { return -1; }


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

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

LLVM IR (-O0):
define i32 @lseek(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 -1
}

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
ret i32 -1
}
int main(void) { int a = 1 / 0; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/);
void block_sigint() {
  sigset_t set;
  sigemptyset(&set);
  sigaddset(&set, SIGINT);
  sigprocmask(SIG_BLOCK, &set, 0);
}


x86 assembly (clang, -O0):
<block_sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_sigint>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_BLOCK = global i32 0
define void @block_sigint() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGINT
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_BLOCK
%6 = call i32 @sigprocmask(i32 %5, i32* %1, i32 0)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_BLOCK = global i32 0
define void @block_sigint() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGINT
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_BLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %1, i32 0)
ret void
}
int test_imm_92uint8_mem(unsigned char *val) {
  return ((*val) & (-0x92 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_92uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff6e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_92uint8_mem>:
testb  $0x6e,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_92uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 110
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void wbTime_stop(int timer_number, const char *message) {}


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

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

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

LLVM IR (-O2):
define void @wbTime_stop(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ ehnlc_isgraph(int);
int ehnlc_isprint(int c) {
  return ((c == ' ') || ehnlc_isgraph(c)) ? 16384 : 0;
}


x86 assembly (clang, -O0):
<ehnlc_isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113c <ehnlc_isprint+0x2c>
mov    -0x4(%rbp),%edi
call   1030 <ehnlc_isgraph@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x4000,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehnlc_isprint>:
mov    $0x4000,%eax
cmp    $0x20,%edi
je     1132 <ehnlc_isprint+0x22>
push   %rax
call   1030 <ehnlc_isgraph@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
shl    $0xe,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @ehnlc_isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @ehnlc_isgraph(i32 %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ true, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 16384, i32 0
ret i32 %12
}

LLVM IR (-O2):
define i32 @ehnlc_isprint(i32 %0) {
%2 = icmp eq i32 %0, 32
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @ehnlc_isgraph(i32 %0)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 0, i32 16384
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 16384, %1 ], [ %6, %3 ]
ret i32 %8
}
int test_imm_8Duint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x8D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Duint64_highword_mem>:
testb  $0x8d,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Duint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 605590388736
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void _backlight_off(void) { (*(volatile unsigned long *)0x80000300) &= ~0x40; }


x86 assembly (clang, -O0):
<_backlight_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80000300,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffbf,%rcx
mov    $0x80000300,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_backlight_off>:
mov    $0x80000300,%eax
andq   $0xffffffffffffffbf,(%rax)
ret

LLVM IR (-O0):
define void @_backlight_off() {
%1 = load volatile i64, i64* inttoptr (i64 2147484416 to i64*)
%2 = and i64 %1, -65
store volatile i64 %2, i64* inttoptr (i64 2147484416 to i64*)
ret void
}

LLVM IR (-O2):
define void @_backlight_off() {
%1 = load volatile i64, i64* inttoptr (i64 2147484416 to i64*)
%2 = and i64 %1, -65
store volatile i64 %2, i64* inttoptr (i64 2147484416 to i64*)
ret void
}
void gdk_window_thaw_updates() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_thaw_updates() {
ret void
}
/* Variables and functions */
int __stopwin();
int reset_shell_mode(void) { return __stopwin(); }


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

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

LLVM IR (-O0):
define i32 @reset_shell_mode() {
%1 = call i32 (...) @__stopwin()
ret i32 %1
}

LLVM IR (-O2):
define i32 @reset_shell_mode() {
%1 = tail call i32 (...) @__stopwin()
ret i32 %1
}