xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  fputs("usage: mkpass [ -c INFO ] PASSWORD\n", stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"usage: mkpass [ -c INFO ] PASSWORD\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [36 x i8] c"usage: mkpass [ -c INFO ] PASSWORD\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int getdigit(long double *val, int *cnt) {
  int digit;
  long double d;
  if ((*cnt)++ >= 20)
    return '0';
  digit = (int)*val;
  d = digit;
  digit += '0';
  *val = (*val - d) * 10.0;
  return digit;
}


x86 assembly (clang, -O0):
<getdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    (%rcx),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,(%rcx)
cmp    $0x14,%eax
jl     112e <getdigit+0x2e>
movl   $0x30,-0x4(%rbp)
jmp    1183 <getdigit+0x83>
mov    -0x10(%rbp),%rax
fldt   (%rax)
fnstcw -0x3a(%rbp)
movzwl -0x3a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x3c(%rbp)
fldcw  -0x3c(%rbp)
fistpl -0x38(%rbp)
fldcw  -0x3a(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
fildl  -0x34(%rbp)
fstpt  -0x30(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fldt   -0x30(%rbp)
fsubrp %st,%st(1)
flds   0xe87(%rip)
fmulp  %st,%st(1)
fstpt  (%rax)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdigit>:
mov    (%rsi),%ecx
lea    0x1(%rcx),%eax
mov    %eax,(%rsi)
mov    $0x30,%eax
cmp    $0x13,%ecx
jg     1149 <getdigit+0x49>
fldt   (%rdi)
fnstcw -0xc(%rsp)
movzwl -0xc(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0xa(%rsp)
fldcw  -0xa(%rsp)
fistl  -0x8(%rsp)
fldcw  -0xc(%rsp)
mov    -0x8(%rsp),%eax
mov    %eax,-0x4(%rsp)
fisubl -0x4(%rsp)
add    $0x30,%eax
fmuls  0xeb9(%rip)
fstpt  (%rdi)
ret

LLVM IR (-O0):
define i32 @getdigit(x86_fp80* %0, i32* %1) {
%3 = alloca i32
%4 = alloca x86_fp80*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %4
store i32* %1, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = icmp sge i32 %9, 20
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 48, i32* %3
br label %28
13: ; preds = %2
%14 = load x86_fp80*, x86_fp80** %4
%15 = load x86_fp80, x86_fp80* %14
%16 = fptosi x86_fp80 %15 to i32
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = sitofp i32 %17 to x86_fp80
store x86_fp80 %18, x86_fp80* %7
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 48
store i32 %20, i32* %6
%21 = load x86_fp80*, x86_fp80** %4
%22 = load x86_fp80, x86_fp80* %21
%23 = load x86_fp80, x86_fp80* %7
%24 = fsub x86_fp80 %22, %23
%25 = fmul x86_fp80 %24, 0xK4002A000000000000000
%26 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %25, x86_fp80* %26
%27 = load i32, i32* %6
store i32 %27, i32* %3
br label %28
28: ; preds = %13, %12
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @getdigit(x86_fp80* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = icmp sgt i32 %3, 19
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = load x86_fp80, x86_fp80* %0
%8 = fptosi x86_fp80 %7 to i32
%9 = sitofp i32 %8 to x86_fp80
%10 = add nsw i32 %8, 48
%11 = fsub x86_fp80 %7, %9
%12 = fmul x86_fp80 %11, 0xK4002A000000000000000
store x86_fp80 %12, x86_fp80* %0
br label %13
13: ; preds = %2, %6
%14 = phi i32 [ %10, %6 ], [ 48, %2 ]
ret i32 %14
}
write_cpa() {}


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

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

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

LLVM IR (-O2):
define i32 @write_cpa() {
ret i32 undef
}
void zylonite_pxa320_init(void) {
  if (cpu_is_pxa320()) {
    panic("%s: PXA320 not supported\n", __func__);
  }
}


x86 assembly (clang, -O0):
<zylonite_pxa320_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cpu_is_pxa320@plt>
cmp    $0x0,%eax
je     1149 <zylonite_pxa320_init+0x29>
lea    0xec5(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1040 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zylonite_pxa320_init>:
push   %rax
xor    %eax,%eax
call   1030 <cpu_is_pxa320@plt>
test   %eax,%eax
je     1142 <zylonite_pxa320_init+0x22>
lea    0xecd(%rip),%rdi
lea    0xee0(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1040 <panic@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%s: PXA320 not supported\0A\00"
@__func__.zylonite_pxa320_init = [21 x i8] c"zylonite_pxa320_init\00"
define void @zylonite_pxa320_init() {
%1 = call i32 (...) @cpu_is_pxa320()
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @panic to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.zylonite_pxa320_init, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s: PXA320 not supported\0A\00"
@__func__.zylonite_pxa320_init = [21 x i8] c"zylonite_pxa320_init\00"
define void @zylonite_pxa320_init() {
%1 = tail call i32 (...) @cpu_is_pxa320()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @panic to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.zylonite_pxa320_init, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int puts(const char *s) {
  while (*s)
    putchar(*s++);
  return 0;
}


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

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

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

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

/* Variables and functions */
int pixel_satd_wxh(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *, int, int,
                   int);
int pixel_satd_4x8(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                   int i_stride_pix2) {
  return pixel_satd_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 4, 8);
}


x86 assembly (clang, -O0):
<pixel_satd_4x8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x4,%r8d
mov    $0x8,%r9d
call   1030 <pixel_satd_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_satd_4x8>:
mov    $0x4,%r8d
mov    $0x8,%r9d
jmp    1030 <pixel_satd_wxh@plt>

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

LLVM IR (-O2):
define i32 @pixel_satd_4x8(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_satd_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 4, i32 8)
ret i32 %5
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int f_yellow() { return fputs("[33m", stdout); }


x86 assembly (clang, -O0):
<f_yellow>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_yellow>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[33m\00"
@stdout = global i32 0
define i32 @f_yellow() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[33m\00"
@stdout = global i32 0
define i32 @f_yellow() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
void *ft_bzero(void *b, size_t len) {
  size_t i;
  i = 0;
  while (i < len) {
    ((unsigned char *)b)[i] = '\0';
    i++;
  }
  return (b);
}


x86 assembly (clang, -O0):
<ft_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113f <ft_bzero+0x3f>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <ft_bzero+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_bzero>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     1126 <ft_bzero+0x16>
mov    %rsi,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_bzero(i8* returned writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ PicoCStatusHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void PicoCStatusUpdated() { UAVObjUpdated(PicoCStatusHandle()); }


x86 assembly (clang, -O0):
<PicoCStatusUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PicoCStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PicoCStatusUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <PicoCStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @PicoCStatusUpdated() {
%1 = call i32 (...) @PicoCStatusHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PicoCStatusUpdated() {
%1 = tail call i32 (...) @PicoCStatusHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int openFH(char *inFile, FILE *fh, char *type) {
  if ((fh = fopen(inFile, type)) == NULL) {
    perror("Error: Failed to open file.\n");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<openFH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1175 <openFH+0x45>
lea    0xe9a(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFH>:
push   %rax
mov    %rdx,%rsi
call   1030 <fopen@plt>
test   %rax,%rax
je     1142 <openFH+0x12>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Error: Failed to open file.\0A\00"
define i32 @openFH(i8* %0, i32* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %6
%9 = call i32* @fopen(i8* %7, i8* %8)
store i32* %9, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Error: Failed to open file.\0A\00"
define i32 @openFH(i8* nocapture %0, i32* nocapture readnone %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %0, i8* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 0
}
/* Variables and functions */
int FUNC3(int, int, int);
int FUNC2(int b, int c) { return 20 + FUNC3(2, b, c); }


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

x86 assembly (clang, -O2):
<FUNC2>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
mov    $0x2,%edi
call   1030 <FUNC3@plt>
add    $0x14,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @FUNC2(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 @FUNC3(i32 2, i32 %5, i32 %6)
%8 = add nsw i32 20, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @FUNC2(i32 %0, i32 %1) {
%3 = tail call i32 @FUNC3(i32 2, i32 %0, i32 %1)
%4 = add nsw i32 %3, 20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pkey_disable_set(int, int);
void pkey_access_deny(int pkey) { pkey_disable_set(pkey, 0x1); }


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

x86 assembly (clang, -O2):
<pkey_access_deny>:
mov    $0x1,%esi
jmp    1030 <pkey_disable_set@plt>

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

LLVM IR (-O2):
define void @pkey_access_deny(i32 %0) {
%2 = tail call i32 @pkey_disable_set(i32 %0, i32 1)
ret void
}
int toascii(int ch) { return (ch & 0x7F); }


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

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

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

LLVM IR (-O2):
define i32 @toascii(i32 %0) {
%2 = and i32 %0, 127
ret i32 %2
}
int main() {
  int n = 7348;
  int m = 43;
  for (;;) {
    n *= m;
    m %= n | 1;
  }
  return m;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1cb4,-0x8(%rbp)
movl   $0x2b,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
or     $0x1,%ecx
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
jmp    1119 <main+0x19>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 7348, i32* %2
store i32 43, i32* %3
br label %4
4: ; preds = %4, %0
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = or i32 %8, 1
%10 = load i32, i32* %3
%11 = srem i32 %10, %9
store i32 %11, i32* %3
br label %4
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
double derivada(double x) { return (1.0 / x); }


x86 assembly (clang, -O0):
<derivada>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<derivada>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @derivada(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
ret double %4
}

LLVM IR (-O2):
define double @derivada(double %0) {
%2 = fdiv double 1.000000e+00, %0
ret double %2
}
int vga_cons_close(__attribute__((unused)) void *private) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vga_cons_close(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ check_long(long *, long *, char *);
void check_long__(long *x, long *y, char *ret) { check_long(x, y, ret); }


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

x86 assembly (clang, -O2):
<check_long__>:
jmp    1030 <check_long@plt>

LLVM IR (-O0):
define void @check_long__(i64* %0, i64* %1, i8* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i8*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i8* %2, i8** %6
%7 = load i64*, i64** %4
%8 = load i64*, i64** %5
%9 = load i8*, i8** %6
%10 = call i32 @check_long(i64* %7, i64* %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @check_long__(i64* %0, i64* %1, i8* %2) {
%4 = tail call i32 @check_long(i64* %0, i64* %1, i8* %2)
ret void
}
int get_aac_max_bitrate(long sample_rate) {
  return (int)(6144.0 * (float)sample_rate / (float)1024 + .5);
}


x86 assembly (clang, -O0):
<get_aac_max_bitrate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2ssq -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xef6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_aac_max_bitrate>:
cvtsi2ss %rdi,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeef(%rip),%xmm0
mulsd  0xeef(%rip),%xmm0
addsd  0xeef(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @get_aac_max_bitrate(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to float
%5 = fpext float %4 to double
%6 = fmul double 6.144000e+03, %5
%7 = fdiv double %6, 1.024000e+03
%8 = fadd double %7, 5.000000e-01
%9 = fptosi double %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @get_aac_max_bitrate(i64 %0) {
%2 = sitofp i64 %0 to float
%3 = fpext float %2 to double
%4 = fmul double %3, 6.144000e+03
%5 = fmul double %4, 0x3F50000000000000
%6 = fadd double %5, 5.000000e-01
%7 = fptosi double %6 to i32
ret i32 %7
}
int fior(int a, int b) {
  int tmp;
  a = __builtin_bswap32(a);
  tmp = a != 0;
  return tmp;
}


x86 assembly (clang, -O0):
<fior>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
bswap  %eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fior>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @fior(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @llvm.bswap.i32(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @fior(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int g(int /*<<< orphan*/, int);
int h(int x) { return g(f(x), x); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1040 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbx
mov    %edi,%ebx
call   1030 <f@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <g@plt>

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = tail call i32 @f(i32 %0)
%3 = tail call i32 @g(i32 %2, i32 %0)
ret i32 %3
}
void AKSC_Decomp8972(void) {}


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

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

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

LLVM IR (-O2):
define void @AKSC_Decomp8972() {
ret void
}
long long int gcd(long long int x, long long int y) {
  long long int r;
  while (y != 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113a <gcd+0x3a>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    110c <gcd+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <gcd+0x35>
mov    %rsi,%rdx
jmp    111d <gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <gcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = srem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}
int test_imm_48uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x48 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_48uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 72
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void prefetch_for_read(const void *address) { __builtin_prefetch(address, 0); }


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

x86 assembly (clang, -O2):
<prefetch_for_read>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch_for_read(i8* nocapture %0) {
tail call void @llvm.prefetch.p0i8(i8* %0, i32 0, i32 3, i32 1)
ret void
}
void nn_xsub_out(__attribute__((unused)) struct nn_sockbase *self,
                 __attribute__((unused)) struct nn_pipe *pipe) {}


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

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

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

LLVM IR (-O2):
%struct.nn_sockbase = type opaque
%struct.nn_pipe = type opaque
define void @nn_xsub_out(%struct.nn_sockbase* nocapture %0, %struct.nn_pipe* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EKFConfigurationHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void EKFConfigurationLogging() { UAVObjLogging(EKFConfigurationHandle()); }


x86 assembly (clang, -O0):
<EKFConfigurationLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <EKFConfigurationHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EKFConfigurationLogging>:
push   %rax
xor    %eax,%eax
call   1040 <EKFConfigurationHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @EKFConfigurationLogging() {
%1 = call i32 (...) @EKFConfigurationHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @EKFConfigurationLogging() {
%1 = tail call i32 (...) @EKFConfigurationHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("%d Args\n", argc);
  printf("%s\n", argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d Args\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
/* Variables and functions */
scalar_t__ sd_listen_fds(int /*<<< orphan*/);
int /*<<< orphan*/ warnx(char *, char *, char *);
void warn_systemd_ignored_option(char *opt, char *arg) {
  if (sd_listen_fds(0) > 0) {
    warnx("inherited listen fd; ignoring option: %s %s", opt, arg);
  }
}


x86 assembly (clang, -O0):
<warn_systemd_ignored_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <sd_listen_fds@plt>
cmp    $0x0,%rax
jle    1155 <warn_systemd_ignored_option+0x35>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb0(%rip),%rdi
call   1030 <warnx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn_systemd_ignored_option>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <sd_listen_fds@plt>
test   %rax,%rax
jle    114f <warn_systemd_ignored_option+0x2f>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <warnx@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [44 x i8] c"inherited listen fd; ignoring option: %s %s\00"
define void @warn_systemd_ignored_option(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i64 @sd_listen_fds(i32 0)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @warnx(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"inherited listen fd; ignoring option: %s %s\00"
define void @warn_systemd_ignored_option(i8* %0, i8* %1) {
%3 = tail call i64 @sd_listen_fds(i32 0)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @warnx(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
int numeric(char c) {
  c = c & 127;
  return ((c >= '0') && (c <= '9'));
}


x86 assembly (clang, -O0):
<numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x7f,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1133 <numeric+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numeric>:
and    $0x7f,%dil
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @numeric(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 127
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 48
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %10, %1
%15 = phi i1 [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @numeric(i8 signext %0) {
%2 = and i8 %0, 127
%3 = add nsw i8 %2, -48
%4 = icmp ult i8 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
void RGBAToUVRow_C() {}


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

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

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

LLVM IR (-O2):
define void @RGBAToUVRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fail(char *msg) {
  fprintf(stderr, "Failure: %s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<fail>:
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):
<fail>:
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 = [13 x i8] c"Failure: %s\0A\00"
define void @fail(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 ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"Failure: %s\0A\00"
define void @fail(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int rename(const char *oldpath, const char *newpath) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(oldpath);
  (void)(newpath);
  return -1;
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.rename = [7 x i8] c"rename\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @rename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.rename, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
ret i32 -1
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.rename = [7 x i8] c"rename\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @rename(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.rename, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i32 -1
}
unsigned hash(char *key) {
  unsigned hashval;
  for (hashval = 0; *key != '\0'; ++key) {
    hashval = *key + 31 * hashval;
  }
  return hashval % 199;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0xc7,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113f <hash+0x3f>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x5254e78f,%rcx,%rcx
shr    $0x26,%rcx
imul   $0xc7,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 199
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
char *strrchr(const char *src, int cmp) {
  char *ret = 0;
  do {
    if (*src == (char)cmp)
      ret = (char *)src;
  } while (*src++);
  return ret;
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1130 <strrchr+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1135 <strrchr+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    1113 <strrchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
movsbl %sil,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsbl (%rdi),%edx
cmp    %edx,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %edx,%edx
jne    1110 <strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
br label %5
5: ; preds = %5, %2
%6 = phi i8* [ %0, %2 ], [ %12, %5 ]
%7 = phi i8* [ null, %2 ], [ %11, %5 ]
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %4, %9
%11 = select i1 %10, i8* %6, i8* %7
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = icmp eq i8 %8, 0
br i1 %13, label %14, label %5
14: ; preds = %5
ret i8* %11
}
void change_process_title_init(char **argv) {}


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

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

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

LLVM IR (-O2):
define void @change_process_title_init(i8** nocapture %0) {
ret void
}
/* Type definitions */
struct fix_tag_classifier {
  int dummy;
};

/* Variables and functions */
const struct fix_tag_classifier *
get_group_classifier_in_UndSecAltIDGrp(size_t __tag) {
  (void)__tag;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.fix_tag_classifier = type { i32 }
define %struct.fix_tag_classifier* @get_group_classifier_in_UndSecAltIDGrp(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret %struct.fix_tag_classifier* null
}

LLVM IR (-O2):
%struct.fix_tag_classifier = type { i32 }
define noalias %struct.fix_tag_classifier* @get_group_classifier_in_UndSecAltIDGrp(i64 %0) {
ret %struct.fix_tag_classifier* null
}
float libglitch_wrap(float x) {
  x = x - (int)x + 1;
  return x - (int)x;
}


x86 assembly (clang, -O0):
<libglitch_wrap>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  0xedd(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<libglitch_wrap>:
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
addss  0xeed(%rip),%xmm0
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @libglitch_wrap(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
%7 = fsub float %3, %6
%8 = fadd float %7, 1.000000e+00
store float %8, float* %2
%9 = load float, float* %2
%10 = load float, float* %2
%11 = fptosi float %10 to i32
%12 = sitofp i32 %11 to float
%13 = fsub float %9, %12
ret float %13
}

LLVM IR (-O2):
define float @libglitch_wrap(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
%5 = fadd float %4, 1.000000e+00
%6 = fptosi float %5 to i32
%7 = sitofp i32 %6 to float
%8 = fsub float %5, %7
ret float %8
}
/* Type definitions */
typedef int /*<<< orphan*/ number;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  float number;
  printf("A float is %zu bytes\n", sizeof(number));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"A float is %zu bytes\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"A float is %zu bytes\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int baumcrypt_helper1(char const *, char const *, unsigned char *, int);
int baumcrypt_encrypt(const char *name_in, const char *name_out,
                      unsigned char *key) {
  return baumcrypt_helper1(name_in, name_out, key, 1);
}


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

x86 assembly (clang, -O2):
<baumcrypt_encrypt>:
mov    $0x1,%ecx
jmp    1030 <baumcrypt_helper1@plt>

LLVM IR (-O0):
define i32 @baumcrypt_encrypt(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** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @baumcrypt_helper1(i8* %7, i8* %8, i8* %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @baumcrypt_encrypt(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @baumcrypt_helper1(i8* %0, i8* %1, i8* %2, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ db_printf1(char *, int);
void db_send_bp_hit(int bpnum) { db_printf1("*DEBUG*:B:H:%i\n", bpnum); }


x86 assembly (clang, -O0):
<db_send_bp_hit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <db_printf1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_send_bp_hit>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <db_printf1@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"*DEBUG*:B:H:%i\0A\00"
define void @db_send_bp_hit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @db_printf1(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"*DEBUG*:B:H:%i\0A\00"
define void @db_send_bp_hit(i32 %0) {
%2 = tail call i32 @db_printf1(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}