xunge/DecIR huggingface dataset:
void gf8mul_00111001(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm6\n"
                       "\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm6, %xmm5\n"
                       "\tpxor    %xmm6, %xmm3\n"
                       "\tpxor    %xmm5, %xmm4\n"
                       "\tpxor    %xmm5, %xmm2\n"
                       "\tpxor    %xmm4, %xmm3\n"
                       "\tpxor    %xmm4, %xmm1\n"
                       "\tpxor    %xmm3, %xmm2\n"
                       "\tpxor    %xmm3, %xmm0\n"
                       "\tpxor    %xmm2, %xmm7\n"
                       "\tpxor    %xmm2, %xmm6\n"
                       "\tpxor    %xmm2, %xmm5\n"
                       "\tpxor    %xmm1, %xmm6\n"
                       "\tpxor    %xmm1, %xmm5\n"
                       "\tpxor    %xmm1, %xmm4\n"
                       "\tpxor    %xmm0, %xmm5\n"
                       "\tpxor    %xmm0, %xmm4\n"
                       "\tpxor    %xmm0, %xmm3\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm4
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm3
pxor   %xmm5,%xmm4
pxor   %xmm5,%xmm2
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm1
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm0
pxor   %xmm2,%xmm7
pxor   %xmm2,%xmm6
pxor   %xmm2,%xmm5
pxor   %xmm1,%xmm6
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm4
pxor   %xmm0,%xmm3
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm4
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm3
pxor   %xmm5,%xmm4
pxor   %xmm5,%xmm2
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm1
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm0
pxor   %xmm2,%xmm7
pxor   %xmm2,%xmm6
pxor   %xmm2,%xmm5
pxor   %xmm1,%xmm6
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm4
pxor   %xmm0,%xmm3
ret

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

LLVM IR (-O2):
define void @gf8mul_00111001() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm6\0A\09pxor %xmm7, %xmm4\0A\09pxor %xmm6, %xmm5\0A\09pxor %xmm6, %xmm3\0A\09pxor %xmm5, %xmm4\0A\09pxor %xmm5, %xmm2\0A\09pxor %xmm4, %xmm3\0A\09pxor %xmm4, %xmm1\0A\09pxor %xmm3, %xmm2\0A\09pxor %xmm3, %xmm0\0A\09pxor %xmm2, %xmm7\0A\09pxor %xmm2, %xmm6\0A\09pxor %xmm2, %xmm5\0A\09pxor %xmm1, %xmm6\0A\09pxor %xmm1, %xmm5\0A\09pxor %xmm1, %xmm4\0A\09pxor %xmm0, %xmm5\0A\09pxor %xmm0, %xmm4\0A\09pxor %xmm0, %xmm3\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xc7() {
  Assert_real((iscntrl(199) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1000, ("iscntrl should be 0 for 0xc7"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xc7>:
push   %rax
mov    $0xc7,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e8,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc7\00"
define void @t_iscntrl_0xc7() {
%1 = tail call i64 @iscntrl(i32 199)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1000, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int mx_log_print(char *msg, size_t len) {
  do {
    free((msg));
    (msg) = NULL;
  } while (0);
  return len;
}


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

x86 assembly (clang, -O2):
<mx_log_print>:
push   %rbx
mov    %rsi,%rbx
call   1030 <free@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mx_log_print(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
store i8* null, i8** %3
br label %8
8: ; preds = %5
%9 = load i64, i64* %4
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mx_log_print(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
%4 = trunc i64 %1 to i32
ret i32 %4
}
char *eat(char *s, int (*p)(int), int r) {
  while (*s != '\0' && p(*s) == r)
    s++;
  return s;
}


x86 assembly (clang, -O0):
<eat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     113e <eat+0x3e>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%edi
call   *%rax
cmp    -0x14(%rbp),%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114e <eat+0x4e>
jmp    115f <eat+0x5f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <eat+0x13>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <eat+0x36>
mov    %edx,%r14d
mov    %rsi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   *%rbp
cmp    %r14d,%eax
jne    1136 <eat+0x36>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <eat+0x20>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @eat(i8* %0, i32 (i32)* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32 (i32)*
%6 = alloca i32
store i8* %0, i8** %4
store i32 (i32)* %1, i32 (i32)** %5
store i32 %2, i32* %6
br label %7
7: ; preds = %22, %3
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %7
%13 = load i32 (i32)*, i32 (i32)** %5
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 %13(i32 %16)
%18 = load i32, i32* %6
%19 = icmp eq i32 %17, %18
br label %20
20: ; preds = %12, %7
%21 = phi i1 [ false, %7 ], [ %19, %12 ]
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %7
25: ; preds = %20
%26 = load i8*, i8** %4
ret i8* %26
}

LLVM IR (-O2):
define i8* @eat(i8* %0, i32 (i32)* nocapture %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3, %12
%7 = phi i8 [ %14, %12 ], [ %4, %3 ]
%8 = phi i8* [ %13, %12 ], [ %0, %3 ]
%9 = sext i8 %7 to i32
%10 = tail call i32 %1(i32 %9)
%11 = icmp eq i32 %10, %2
br i1 %11, label %12, label %16
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %12, %3
%17 = phi i8* [ %0, %3 ], [ %13, %12 ], [ %8, %6 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int sys_debug(const char *str) {
  printf("%s", str);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @sys_debug(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @sys_debug(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
void clean_exit(sig) int sig;
{
  sig = sig;
  clean_up("interrupted by user");
}


x86 assembly (clang, -O0):
<clean_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <clean_up@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_exit>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <clean_up@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"interrupted by user\00"
define void @clean_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @clean_up to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"interrupted by user\00"
define void @clean_exit(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @clean_up to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
void fakeClConnectionStarted(void) {}


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

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

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

LLVM IR (-O2):
define void @fakeClConnectionStarted() {
ret void
}
/* Variables and functions */
int auditwarnlog(char **);
int audit_warn_hard(char *filename) {
  char *args[3];
  args[0] = "hard";
  args[1] = filename;
  args[2] = NULL;
  return (auditwarnlog(args));
}


x86 assembly (clang, -O0):
<audit_warn_hard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <auditwarnlog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_warn_hard>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
mov    %rdi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <auditwarnlog@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"hard\00"
define i32 @audit_warn_hard(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8*]
store i8* %0, i8** %2
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 1
store i8* %5, i8** %6
%7 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 2
store i8* null, i8** %7
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%9 = call i32 @auditwarnlog(i8** %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"hard\00"
define i32 @audit_warn_hard(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
store i8* %0, i8** %5
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 2
store i8* null, i8** %6
%7 = call i32 @auditwarnlog(i8** %4)
ret i32 %7
}
int base64_encode_size(int s) { return (int)(((s + 2) / 3) * 4 + 1); }


x86 assembly (clang, -O0):
<base64_encode_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encode_size>:
add    $0x2,%edi
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    0x1(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @base64_encode_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
%5 = sdiv i32 %4, 3
%6 = mul nsw i32 %5, 4
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @base64_encode_size(i32 %0) {
%2 = add nsw i32 %0, 2
%3 = sdiv i32 %2, 3
%4 = shl nsw i32 %3, 2
%5 = or i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void ircbot_error(char *errmess) {
  fprintf(stderr, "%s", errmess);
  exit(1);
}


x86 assembly (clang, -O0):
<ircbot_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ircbot_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @ircbot_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @ircbot_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned int ilog2(unsigned int x) {
  unsigned int ans = 0;
  while (x >>= 1)
    ans++;
  return ans;
}


x86 assembly (clang, -O0):
<ilog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <ilog2+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ilog2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <ilog2+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <ilog2+0x10>
ret

LLVM IR (-O0):
define i32 @ilog2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
store i32 %6, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @ilog2(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
i(int *p) { return p == (1 - 1); }


x86 assembly (clang, -O0):
<i>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @i(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @i(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
int main(void) {
#pragma acc kernels
  { __builtin_abort(); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
call   1030 <abort@plt>

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

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

LLVM IR (-O2):
define i32 @main() {
tail call void @abort()
unreachable
}
double h_blend(double u, double q) {
  double u2 = u * u;
  return (u * (q + u * (2 * q + u2 * (-2 * q - u * q))));
}


x86 assembly (clang, -O0):
<h_blend>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm6
movsd  -0x8(%rbp),%xmm5
mulsd  -0x10(%rbp),%xmm5
movq   %xmm5,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm5
addsd  %xmm6,%xmm6
subsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
addsd  %xmm3,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_blend>:
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movsd  0xee8(%rip),%xmm4
mulsd  %xmm1,%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm4
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
addsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @h_blend(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fmul double %6, %7
store double %8, double* %5
%9 = load double, double* %3
%10 = load double, double* %4
%11 = load double, double* %3
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %4
%15 = load double, double* %3
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %14, double %18)
%20 = fmul double %13, %19
%21 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %12, double %20)
%22 = call double @llvm.fmuladd.f64(double %11, double %21, double %10)
%23 = fmul double %9, %22
ret double %23
}

LLVM IR (-O2):
define double @h_blend(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fneg double %0
%5 = fmul double %4, %1
%6 = tail call double @llvm.fmuladd.f64(double %1, double -2.000000e+00, double %5)
%7 = fmul double %3, %6
%8 = tail call double @llvm.fmuladd.f64(double %1, double 2.000000e+00, double %7)
%9 = tail call double @llvm.fmuladd.f64(double %0, double %8, double %1)
%10 = fmul double %9, %0
ret double %10
}
int ft_ceil(double n) {
  if (n == (double)(int)n)
    return ((int)n);
  return (((int)n) + 1);
}


x86 assembly (clang, -O0):
<ft_ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1134 <ft_ceil+0x34>
jp     1134 <ft_ceil+0x34>
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <ft_ceil+0x3f>
cvttsd2si -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ceil>:
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rcx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_ceil(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = fcmp oeq double %4, %7
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load double, double* %3
%11 = fptosi double %10 to i32
store i32 %11, i32* %2
br label %16
12: ; preds = %1
%13 = load double, double* %3
%14 = fptosi double %13 to i32
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %16
16: ; preds = %12, %9
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @ft_ceil(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp une double %3, %0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int atoi(char *);
int int_from_cstr(char *str) {
  int ret = atoi(str);
  return ret;
}


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

x86 assembly (clang, -O2):
<int_from_cstr>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @int_from_cstr(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
/* Variables and functions */
int glp_main(int, char const **);
int _glp_lpx_main(int argc, const char *argv[]) { return glp_main(argc, argv); }


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

x86 assembly (clang, -O2):
<_glp_lpx_main>:
jmp    1030 <glp_main@plt>

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

LLVM IR (-O2):
define i32 @_glp_lpx_main(i32 %0, i8** %1) {
%3 = tail call i32 @glp_main(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void *calloc(size_t, size_t);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long);
int /*<<< orphan*/ stderr;
void *mcalloc(size_t nmemb, size_t size) {
  void *alloc;
  alloc = calloc(nmemb, size);
  if (!alloc) {
    fprintf(stderr, "CRITICAL: Can't allocate memory (%ld bytes).\n",
            (long int)nmemb * size);
    _exit(70);
    return NULL;
  } else
    return alloc;
}


x86 assembly (clang, -O0):
<mcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1184 <mcalloc+0x54>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
lea    0xe8b(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x46,%edi
call   1030 <_exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <calloc@plt>
test   %rax,%rax
je     114c <mcalloc+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
imul   %rbx,%r14
lea    0xea0(%rip),%rsi
mov    %r14,%rdx
call   1050 <fprintf@plt>
mov    $0x46,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"CRITICAL: Can't allocate memory (%ld bytes).\0A\00"
define i8* @mcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %18, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = mul i64 %13, %14
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i64 %15)
%17 = call i32 @_exit(i32 70)
unreachable
18: ; preds = %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"CRITICAL: Can't allocate memory (%ld bytes).\0A\00"
define noalias i8* @mcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = mul i64 %1, %0
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = tail call i32 @_exit(i32 70)
unreachable
10: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, long);
__attribute__((__stdcall__)) long signal_handle(int signo, long retval) {
  printf("__signo=%d, retval=%x\n", signo, retval);
  return retval;
}


x86 assembly (clang, -O0):
<signal_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handle>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"__signo=%d, retval=%x\0A\00"
define i64 @signal_handle(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %6)
%8 = load i64, i64* %4
ret i64 %8
}

LLVM IR (-O2):
@.str = [23 x i8] c"__signo=%d, retval=%x\0A\00"
define i64 @signal_handle(i32 %0, i64 returned %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %1)
ret i64 %1
}
/* Type definitions */
struct timespec {
  int member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
int waitms(int ms) {
  struct timespec requested = {0, ms * 1e6};
  struct timespec remaining;
  nanosleep(&requested, &remaining);
  return ms;
}


x86 assembly (clang, -O0):
<waitms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <nanosleep@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitms>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
cvtsi2sd %edi,%xmm0
mulsd  0xedd(%rip),%xmm0
movl   $0x0,(%rsp)
cvttsd2si %xmm0,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
call   1030 <nanosleep@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define i32 @waitms(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
store i32 %0, i32* %2
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 0, i32* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.000000e+06
%10 = fptosi double %9 to i32
store i32 %10, i32* %6
%11 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @waitms(i32 returned %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 0, i32* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%7 = sitofp i32 %0 to double
%8 = fmul double %7, 1.000000e+06
%9 = fptosi double %8 to i32
store i32 %9, i32* %6
%10 = bitcast %struct.timespec* %3 to i8*
%11 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret i32 %0
}
int right(int symbol) {
  symbol &= 15;
  symbol += '0';
  if (symbol > '9')
    symbol += 7;
  return symbol;
}


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x39,-0x4(%rbp)
jle    112c <right+0x2c>
mov    -0x4(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
and    $0xf,%edi
lea    0x30(%rdi),%ecx
lea    0x37(%rdi),%eax
cmp    $0x3a,%ecx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @right(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 48
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 7
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = and i32 %0, 15
%3 = or i32 %2, 48
%4 = icmp ugt i32 %3, 57
%5 = add nuw nsw i32 %2, 55
%6 = select i1 %4, i32 %5, i32 %3
ret i32 %6
}
void ceph_fscache_file_set_cookie(struct inode *inode, struct file *filp) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
%struct.file = type opaque
define void @ceph_fscache_file_set_cookie(%struct.inode* nocapture %0, %struct.file* nocapture %1) {
ret void
}
/* Variables and functions */
int Q_strncasecmp(char *, char *, int);
int Q_stricmp(char *s1, char *s2) { return Q_strncasecmp(s1, s2, 99999); }


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

x86 assembly (clang, -O2):
<Q_stricmp>:
mov    $0x1869f,%edx
jmp    1030 <Q_strncasecmp@plt>

LLVM IR (-O0):
define i32 @Q_stricmp(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 = call i32 @Q_strncasecmp(i8* %5, i8* %6, i32 99999)
ret i32 %7
}

LLVM IR (-O2):
define i32 @Q_stricmp(i8* %0, i8* %1) {
%3 = tail call i32 @Q_strncasecmp(i8* %0, i8* %1, i32 99999)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t djb2(const char *s) {
  uint32_t hash = 5381;
  int c;
  while (c = *s++)
    hash = ((hash << 5) + hash) + (uint8_t)c;
  return hash;
}


x86 assembly (clang, -O0):
<djb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1141 <djb2+0x41>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <djb2+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <djb2+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <djb2+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @djb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 33
%11 = add nsw i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
scalar_t__ xisblank(int);
int xisspace(int c) {
  return (xisblank(c) || c == (int)'\n' || c == (int)'\r' || c == (int)'\f' ||
          c == (int)'\v');
}


x86 assembly (clang, -O0):
<xisspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <xisblank@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116c <xisspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116c <xisspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116c <xisspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116c <xisspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisspace>:
push   %rbx
mov    %edi,%ebx
call   1030 <xisblank@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <xisspace+0x17>
pop    %rbx
ret
cmp    $0xd,%ebx
ja     1136 <xisspace+0x26>
mov    $0x3400,%ecx
bt     %ebx,%ecx
jb     1125 <xisspace+0x15>
xor    %eax,%eax
cmp    $0xb,%ebx
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @xisspace(i32 %0) {
%2 = tail call i64 @xisblank(i32 %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 13, label %9
i32 12, label %9
i32 10, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 11
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ], [ 1, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ point(int, int, int /*<<< orphan*/);
void lpoint(int x, int y) { point(x, y, 0); }


x86 assembly (clang, -O0):
<lpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <point@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lpoint>:
xor    %edx,%edx
jmp    1030 <point@plt>

LLVM IR (-O0):
define void @lpoint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @point(i32 %5, i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @lpoint(i32 %0, i32 %1) {
%3 = tail call i32 @point(i32 %0, i32 %1, i32 0)
ret void
}
/* Variables and functions */
char *notImplemented();
char *serverPause(char *timeout, char *unused1, char *unused2) {
  (void)(unused1);
  (void)(unused2);
  return notImplemented();
}


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

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

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

LLVM IR (-O2):
define i8* @serverPause(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i8* (...) @notImplemented()
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void printUsage() {
  fprintf(stdout, "Usage: swpeo <element size> <file 1> <file 2> ...\n");
}


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

x86 assembly (clang, -O2):
<printUsage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [51 x i8] c"Usage: swpeo <element size> <file 1> <file 2> ...\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [51 x i8] c"Usage: swpeo <element size> <file 1> <file 2> ...\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int /*<<< orphan*/ strsignal(int /*<<< orphan*/);
int main() {
  puts(strsignal(SIGPIPE));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <strsignal@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1040 <strsignal@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGPIPE = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGPIPE
%3 = call i32 @strsignal(i32 %2)
%4 = call i32 @puts(i32 %3)
ret i32 0
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGPIPE
%2 = tail call i32 @strsignal(i32 %1)
%3 = tail call i32 @puts(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int string_isoneof(char *string, char **strings) {
  while (*strings) {
    if (!strcmp(string, *strings))
      return 1;
    strings++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<string_isoneof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1164 <string_isoneof+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1153 <string_isoneof+0x43>
movl   $0x1,-0x4(%rbp)
jmp    116b <string_isoneof+0x5b>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1120 <string_isoneof+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_isoneof>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rsi
xor    %r14d,%r14d
test   %rsi,%rsi
je     1150 <string_isoneof+0x40>
mov    %rdi,%rbp
add    $0x8,%rbx
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114a <string_isoneof+0x3a>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <string_isoneof+0x20>
jmp    1150 <string_isoneof+0x40>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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

/* Variables and functions */
int __bpf_ipv6_hash(struct sock_fprog *, int);
int bpf_novlan_ipv6_hash(struct sock_fprog *fprog) {
  return __bpf_ipv6_hash(fprog, false);
}


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

x86 assembly (clang, -O2):
<bpf_novlan_ipv6_hash>:
xor    %esi,%esi
jmp    1030 <__bpf_ipv6_hash@plt>

LLVM IR (-O0):
%struct.sock_fprog = type { i32 }
define i32 @bpf_novlan_ipv6_hash(%struct.sock_fprog* %0) {
%2 = alloca %struct.sock_fprog*
store %struct.sock_fprog* %0, %struct.sock_fprog** %2
%3 = load %struct.sock_fprog*, %struct.sock_fprog** %2
%4 = call i32 @__bpf_ipv6_hash(%struct.sock_fprog* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.sock_fprog = type { i32 }
define i32 @bpf_novlan_ipv6_hash(%struct.sock_fprog* %0) {
%2 = tail call i32 @__bpf_ipv6_hash(%struct.sock_fprog* %0, i32 0)
ret i32 %2
}
int rl_possible_completions(ignore, invoking_key)
int ignore __attribute__((unused)), invoking_key __attribute__((unused));
{ return (rl_complete_internal('?')); }


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

x86 assembly (clang, -O2):
<rl_possible_completions>:
mov    $0x3f,%edi
xor    %eax,%eax
jmp    1030 <rl_complete_internal@plt>

LLVM IR (-O0):
define i32 @rl_possible_completions(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i32, ...) bitcast (i32 (...)* @rl_complete_internal to i32 (i32, ...)*)(i32 63)
ret i32 %5
}

LLVM IR (-O2):
define i32 @rl_possible_completions(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @rl_complete_internal to i32 (i32, ...)*)(i32 63)
ret i32 %3
}
/* Variables and functions */
scalar_t__ isdigit(char);
scalar_t__ isxdigit(char);
char tolower(char);
char hex(char v) {
  if (isdigit(v))
    return v - '0';
  else if (isxdigit(v))
    return tolower(v) - 'a' + 10;
  else
    return 0;
}


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1160 <hex+0x30>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1191 <hex+0x61>
movsbl -0x2(%rbp),%edi
call   1050 <isxdigit@plt>
cmp    $0x0,%rax
je     118d <hex+0x5d>
movsbl -0x2(%rbp),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    1191 <hex+0x61>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1142 <hex+0x12>
lea    -0x30(%rbx),%eax
pop    %rbx
ret
movsbl %bl,%ebx
mov    %ebx,%edi
call   1050 <isxdigit@plt>
test   %rax,%rax
je     115c <hex+0x2c>
mov    %ebx,%edi
call   1040 <tolower@plt>
add    $0xa9,%al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @hex(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add i8 %0, -48
br label %12
6: ; preds = %1
%7 = tail call i64 @isxdigit(i8 signext %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = tail call signext i8 @tolower(i8 signext %0)
%11 = add i8 %10, -87
br label %12
12: ; preds = %6, %9, %4
%13 = phi i8 [ %5, %4 ], [ %11, %9 ], [ 0, %6 ]
ret i8 %13
}
const double small() { return 1.0e-6; }


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

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

LLVM IR (-O0):
define double @small() {
ret double 0x3EB0C6F7A0B5ED8D
}

LLVM IR (-O2):
define double @small() {
ret double 0x3EB0C6F7A0B5ED8D
}