xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ kprintf(char *, int);
void isrHandle23() { kprintf("ISR %d.\n", 23); }


x86 assembly (clang, -O0):
<isrHandle23>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x17,%esi
call   1030 <kprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isrHandle23>:
lea    0xee9(%rip),%rdi
mov    $0x17,%esi
jmp    1030 <kprintf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"ISR %d.\0A\00"
define void @isrHandle23() {
%1 = call i32 @kprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 23)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"ISR %d.\0A\00"
define void @isrHandle23() {
%1 = tail call i32 @kprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 23)
ret void
}
int get_Nframes(buffsize, pad, step)
long buffsize;
int pad, step;
{
  if (buffsize < pad)
    return (0);
  else
    return ((buffsize - pad) / step);
}


x86 assembly (clang, -O0):
<get_Nframes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmp    %rcx,%rax
jge    112b <get_Nframes+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1142 <get_Nframes+0x42>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
sub    %rcx,%rax
movslq -0x18(%rbp),%rcx
cqto
idiv   %rcx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_Nframes>:
mov    %edx,%ecx
movslq %esi,%rdx
xor    %eax,%eax
cmp    %rdi,%rdx
jg     1126 <get_Nframes+0x26>
sub    %rdx,%rdi
movslq %ecx,%rsi
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1127 <get_Nframes+0x27>
mov    %rdi,%rax
cqto
idiv   %rsi
ret
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
ret

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

LLVM IR (-O2):
define i32 @get_Nframes(i64 %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = icmp sgt i64 %4, %0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = sub nsw i64 %0, %4
%8 = sext i32 %2 to i64
%9 = sdiv i64 %7, %8
%10 = trunc i64 %9 to i32
br label %11
11: ; preds = %3, %6
%12 = phi i32 [ %10, %6 ], [ 0, %3 ]
ret i32 %12
}
void imx_ssi_ac97_cold_reset(struct snd_ac97 *ac97) {}


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

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

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

LLVM IR (-O2):
%struct.snd_ac97 = type opaque
define void @imx_ssi_ac97_cold_reset(%struct.snd_ac97* nocapture %0) {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void vlogical_imm_orminus1_int32_t(int32_t *dst, int count) {
  for (int i = 0; i < count; i++)
    dst[i] = dst[i] | -1;
}


x86 assembly (clang, -O0):
<vlogical_imm_orminus1_int32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1145 <vlogical_imm_orminus1_int32_t+0x45>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
or     $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <vlogical_imm_orminus1_int32_t+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlogical_imm_orminus1_int32_t>:
test   %esi,%esi
jle    1129 <vlogical_imm_orminus1_int32_t+0x19>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @vlogical_imm_orminus1_int32_t(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
int cairo_code_draw_powerButton_get_height() { return 64; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_powerButton_get_height() {
ret i32 64
}

LLVM IR (-O2):
define i32 @cairo_code_draw_powerButton_get_height() {
ret i32 64
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void after_join_func(void) { printf("finished\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"finished\00"
define void @after_join_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void output(char **ar, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d. %s\n", i, ar[i]);
  }
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <output+0x4b>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <output+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <output+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <output+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d. %s\0A\00"
define void @output(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ msg(int, char *);
uint32_t drive_get_drive_status(void) {
  msg(0x100, "drive_get_drive_status called\n");
  exit(1);
}


x86 assembly (clang, -O0):
<drive_get_drive_status>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%edi
lea    0xed0(%rip),%rsi
call   1040 <msg@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<drive_get_drive_status>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x100,%edi
call   1040 <msg@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"drive_get_drive_status called\0A\00"
define i32 @drive_get_drive_status() {
%1 = call i32 @msg(i32 256, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"drive_get_drive_status called\0A\00"
define i32 @drive_get_drive_status() {
%1 = tail call i32 @msg(i32 256, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
char *strip_post_ws(char *str) {
  char *p;
  p = (str + strlen(str));
  while (isspace(*--p)) {
    *p = '\0';
  }
  return (p);
}


x86 assembly (clang, -O0):
<strip_post_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     117b <strip_post_ws+0x5b>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    114d <strip_post_ws+0x2d>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_post_ws>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
lea    (%r14,%rax,1),%rbx
add    $0xffffffffffffffff,%rbx
movsbl -0x1(%r14,%rax,1),%edi
nopl   0x0(%rax)
call   1040 <isspace@plt>
test   %rax,%rax
je     1157 <strip_post_ws+0x37>
movb   $0x0,(%rbx)
movsbl -0x1(%rbx),%edi
add    $0xffffffffffffffff,%rbx
jmp    1140 <strip_post_ws+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strip_post_ws(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = load i8, i8* %5
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %1, %9
%10 = phi i8* [ %11, %9 ], [ %5, %1 ]
store i8 0, i8* %10
%11 = getelementptr inbounds i8, i8* %10, i64 -1
%12 = load i8, i8* %11
%13 = tail call i64 @isspace(i8 signext %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %9
15: ; preds = %9, %1
%16 = phi i8* [ %5, %1 ], [ %11, %9 ]
ret i8* %16
}
void foo_1_1_1_2_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_2_2_1_1_1() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int next(FILE *in, int *linenoptr) {
  int res = getc(in);
  if (res == '\n')
    *linenoptr += 1;
  return res;
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jne    1141 <next+0x31>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
push   %rbx
mov    %rsi,%rbx
call   1030 <getc@plt>
cmp    $0xa,%eax
jne    1121 <next+0x11>
addl   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @next(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 @getc(i32* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
store i32 %13, i32* %11
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @next(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @getc(i32* %0)
%4 = icmp eq i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %8
8: ; preds = %5, %2
ret i32 %3
}
int are_equal_uint(const void *a, const void *b) {
  return *(unsigned int *)a == *(unsigned int *)b;
}


x86 assembly (clang, -O0):
<are_equal_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_equal_uint>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @are_equal_uint(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @are_equal_uint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int rodrigo(int a) { return a + 6; }


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

x86 assembly (clang, -O2):
<rodrigo>:
lea    0x6(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rodrigo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 6
ret i32 %4
}

LLVM IR (-O2):
define i32 @rodrigo(i32 %0) {
%2 = add nsw i32 %0, 6
ret i32 %2
}
void ff_hevc_put_hevc_bi_epel_h32_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h32_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void d_free(void *x) { free(x); }


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

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

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

LLVM IR (-O2):
define void @d_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ble_evt_system_endpoint_watermark_rx(
    const struct ble_msg_system_endpoint_watermark_rx_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_system_endpoint_watermark_rx_evt_t = type opaque
define void @ble_evt_system_endpoint_watermark_rx(%struct.ble_msg_system_endpoint_watermark_rx_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int is_line(char *str) {
  int i;
  if (str == NULL)
    return (0);
  i = -1;
  while (str[++i] != '\0') {
    if (str[i] == '\n') {
      return (i + 1);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<is_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <is_line+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1172 <is_line+0x72>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116b <is_line+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1166 <is_line+0x66>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <is_line+0x72>
jmp    1126 <is_line+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_line>:
test   %rdi,%rdi
je     1122 <is_line+0x22>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1122 <is_line+0x22>
add    $0x1,%rax
cmp    $0xa,%cl
jne    1110 <is_line+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_line(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ -1, %1 ]
%5 = add nsw i64 %4, 1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %3 [
i8 0, label %11
i8 10, label %8
]
8: ; preds = %3
%9 = trunc i64 %4 to i32
%10 = add nsw i32 %9, 2
br label %11
11: ; preds = %3, %1, %8
%12 = phi i32 [ %10, %8 ], [ 0, %1 ], [ 0, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void char_ptrs_clear(char **ptrs, int length) {
  int i;
  for (i = 0; i < length; i++) {
    memset(ptrs[i], 0, 1024);
  }
}


x86 assembly (clang, -O0):
<char_ptrs_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <char_ptrs_clear+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <char_ptrs_clear+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_ptrs_clear>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1149 <char_ptrs_clear+0x39>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1030 <memset@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <char_ptrs_clear+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @char_ptrs_clear(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @memset(i8* %9, i32 0, i32 1024)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(unsigned char *, size_t, int, int /*<<< orphan*/ *);
int snapshot_write_byte_array(FILE *f, unsigned char *data, unsigned int num) {
  if (num > 0 && fwrite(data, (size_t)num, 1, f) < 1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<snapshot_write_byte_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jbe    1159 <snapshot_write_byte_array+0x49>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%eax
mov    %eax,%esi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fwrite@plt>
cmp    $0x1,%eax
jge    1159 <snapshot_write_byte_array+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <snapshot_write_byte_array+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snapshot_write_byte_array>:
test   %edx,%edx
je     1133 <snapshot_write_byte_array+0x23>
push   %rax
mov    %rdi,%rcx
mov    %edx,%eax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x1,%edx
call   1030 <fwrite@plt>
test   %eax,%eax
lea    0x8(%rsp),%rsp
jle    1136 <snapshot_write_byte_array+0x26>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @snapshot_write_byte_array(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
%7 = tail call i32 @fwrite(i8* %1, i64 %6, i32 1, i32* %0)
%8 = icmp slt i32 %7, 1
br i1 %8, label %10, label %9
9: ; preds = %5, %3
br label %10
10: ; preds = %5, %9
%11 = phi i32 [ 0, %9 ], [ -1, %5 ]
ret i32 %11
}
/* Variables and functions */
int merge(int);
int main() {
  int a, b;
  b = merge(a);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <merge@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @merge(i32 undef)
ret i32 0
}
unsigned long gu1_get_max_supported_pixel_clock(void) { return 157500; }


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

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

LLVM IR (-O0):
define i64 @gu1_get_max_supported_pixel_clock() {
ret i64 157500
}

LLVM IR (-O2):
define i64 @gu1_get_max_supported_pixel_clock() {
ret i64 157500
}
void nop_pause(void) { __asm volatile("pause" : :); }


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

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

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

LLVM IR (-O2):
define void @nop_pause() {
tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, char *);
int sscanf(char *, char *, int *);
int str2int(char *str) {
  int n;
  if (sscanf(str, "%i", &n) != 1)
    die("str2int error: \'%s\'\n", str);
  return (n);
}


x86 assembly (clang, -O0):
<str2int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sscanf@plt>
cmp    $0x1,%eax
je     1159 <str2int+0x39>
mov    -0x8(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1040 <die@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2int>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xed1(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1030 <sscanf@plt>
cmp    $0x1,%eax
je     114d <str2int+0x2d>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1040 <die@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [21 x i8] c"str2int error: '%s'\0A\00"
define i32 @str2int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [21 x i8] c"str2int error: '%s'\0A\00"
define i32 @str2int(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
ret i32 %9
}
/* Variables and functions */
scalar_t__ _ccp_bdos(int, int);
int /*<<< orphan*/ _puts(char *);
void _ccp_era(void) {
  if (_ccp_bdos(19, 0x005C))
    _puts("\r\nNo file");
}


x86 assembly (clang, -O0):
<_ccp_era>:
push   %rbp
mov    %rsp,%rbp
mov    $0x13,%edi
mov    $0x5c,%esi
call   1040 <_ccp_bdos@plt>
cmp    $0x0,%rax
je     1149 <_ccp_era+0x29>
lea    0xebc(%rip),%rdi
call   1030 <_puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ccp_era>:
push   %rax
mov    $0x13,%edi
mov    $0x5c,%esi
call   1040 <_ccp_bdos@plt>
test   %rax,%rax
je     1142 <_ccp_era+0x22>
lea    0xec4(%rip),%rdi
pop    %rax
jmp    1030 <_puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\0D\0ANo file\00"
define void @_ccp_era() {
%1 = call i64 @_ccp_bdos(i32 19, i32 92)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @_puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\0D\0ANo file\00"
define void @_ccp_era() {
%1 = tail call i64 @_ccp_bdos(i32 19, i32 92)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @_puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
int fun1155() { return 1155; }


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

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

LLVM IR (-O0):
define i32 @fun1155() {
ret i32 1155
}

LLVM IR (-O2):
define i32 @fun1155() {
ret i32 1155
}
short __infer_nondet_short() {
  short ret;
  return ret;
}


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

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

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

LLVM IR (-O2):
define signext i16 @__infer_nondet_short() {
ret i16 undef
}
/* Variables and functions */
float ldexp(float, long);
float scalblnf(float x, long n) { return ldexp(x, n); }


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

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

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

LLVM IR (-O2):
define float @scalblnf(float %0, i64 %1) {
%3 = tail call float @ldexp(float %0, i64 %1)
ret float %3
}
int bfd_translate2event(int st) {
  int ret;
  switch (st) {
  case 0:
    ret = 0;
    break;
  case 1:
    ret = 1;
    break;
  case 2:
    ret = 2;
    break;
  case 3:
    ret = 3;
    break;
  default:
    ret = 8;
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<bfd_translate2event>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     115c <bfd_translate2event+0x5c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8(%rbp)
jmp    1163 <bfd_translate2event+0x63>
movl   $0x1,-0x8(%rbp)
jmp    1163 <bfd_translate2event+0x63>
movl   $0x2,-0x8(%rbp)
jmp    1163 <bfd_translate2event+0x63>
movl   $0x3,-0x8(%rbp)
jmp    1163 <bfd_translate2event+0x63>
movl   $0x8,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfd_translate2event>:
cmp    $0x4,%edi
mov    $0x8,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @bfd_translate2event(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i32 0, i32* %3
br label %10
6: ; preds = %1
store i32 1, i32* %3
br label %10
7: ; preds = %1
store i32 2, i32* %3
br label %10
8: ; preds = %1
store i32 3, i32* %3
br label %10
9: ; preds = %1
store i32 8, i32* %3
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @bfd_translate2event(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = select i1 %2, i32 %0, i32 8
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ PTRACE_TRACEME;
int /*<<< orphan*/ SIGSTOP;
int /*<<< orphan*/ execve(char *, char **, char **);
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ptrace(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void child(char *argv[], char *envp[]) {
  ptrace(PTRACE_TRACEME, 0, NULL, NULL);
  kill(getpid(), SIGSTOP);
  execve(argv[0], argv, envp);
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1060 <ptrace@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2e61(%rip),%rax
mov    (%rax),%esi
call   1050 <kill@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <execve@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1060 <ptrace@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2e6c(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1050 <kill@plt>
mov    (%rbx),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <execve@plt>

LLVM IR (-O0):
@PTRACE_TRACEME = global i32 0
@SIGSTOP = global i32 0
define void @child(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @PTRACE_TRACEME
%6 = call i32 @ptrace(i32 %5, i32 0, i32* null, i32* null)
%7 = call i32 (...) @getpid()
%8 = load i32, i32* @SIGSTOP
%9 = call i32 @kill(i32 %7, i32 %8)
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %3
%14 = load i8**, i8*** %4
%15 = call i32 @execve(i8* %12, i8** %13, i8** %14)
ret void
}

LLVM IR (-O2):
@PTRACE_TRACEME = global i32 0
@SIGSTOP = global i32 0
define void @child(i8** %0, i8** %1) {
%3 = load i32, i32* @PTRACE_TRACEME
%4 = tail call i32 @ptrace(i32 %3, i32 0, i32* null, i32* null)
%5 = tail call i32 (...) @getpid()
%6 = load i32, i32* @SIGSTOP
%7 = tail call i32 @kill(i32 %5, i32 %6)
%8 = load i8*, i8** %0
%9 = tail call i32 @execve(i8* %8, i8** %0, i8** %1)
ret void
}
int ti_ln_start(double const *options) {
  (void)options;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @ti_ln_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @ti_ln_start(double* nocapture readnone %0) {
ret i32 0
}
int HelpItem23(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem23() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MapFile(char *);
int /*<<< orphan*/ TellFile(int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *);
TellXRefFile() {
  char name[4096];
  extern char *SourceName();
  sprintf(name, "%s.nst", SourceName());
  TellFile(MapFile(name));
}


x86 assembly (clang, -O0):
<TellXRefFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
lea    -0x1010(%rbp),%rax
mov    %rax,-0x1018(%rbp)
mov    $0x0,%al
call   1040 <SourceName@plt>
mov    -0x1018(%rbp),%rdi
mov    %rax,%rdx
lea    0xe8f(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x1010(%rbp),%rdi
call   1030 <MapFile@plt>
mov    %eax,%edi
call   1060 <TellFile@plt>
mov    -0x4(%rbp),%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TellXRefFile>:
push   %rbx
sub    $0x1000,%rsp
xor    %eax,%eax
call   1040 <SourceName@plt>
lea    0xeaa(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <MapFile@plt>
mov    %eax,%edi
call   1060 <TellFile@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s.nst\00"
define i32 @TellXRefFile() {
%1 = alloca i32
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i8* (...) @SourceName()
%5 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%7 = call i32 @MapFile(i8* %6)
%8 = call i32 @TellFile(i32 %7)
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s.nst\00"
define i32 @TellXRefFile() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = tail call i8* (...) @SourceName()
%4 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @MapFile(i8* %2)
%6 = call i32 @TellFile(i32 %5)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ init_backward_pawn_masks();
int /*<<< orphan*/ init_fwd_masks();
int /*<<< orphan*/ init_ka_masks();
int /*<<< orphan*/ init_passer_masks();
int /*<<< orphan*/ init_pawn_hash();
int /*<<< orphan*/ init_pawn_shelter_masks();
void init_eval(void) {
  init_fwd_masks();
  init_pawn_shelter_masks();
  init_passer_masks();
  init_backward_pawn_masks();
  init_ka_masks();
  init_pawn_hash();
}


x86 assembly (clang, -O0):
<init_eval>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init_fwd_masks@plt>
mov    $0x0,%al
call   1080 <init_pawn_shelter_masks@plt>
mov    $0x0,%al
call   1070 <init_passer_masks@plt>
mov    $0x0,%al
call   1060 <init_backward_pawn_masks@plt>
mov    $0x0,%al
call   1040 <init_ka_masks@plt>
mov    $0x0,%al
call   1050 <init_pawn_hash@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_eval>:
push   %rax
xor    %eax,%eax
call   1030 <init_fwd_masks@plt>
xor    %eax,%eax
call   1080 <init_pawn_shelter_masks@plt>
xor    %eax,%eax
call   1070 <init_passer_masks@plt>
xor    %eax,%eax
call   1060 <init_backward_pawn_masks@plt>
xor    %eax,%eax
call   1040 <init_ka_masks@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <init_pawn_hash@plt>

LLVM IR (-O0):
define void @init_eval() {
%1 = call i32 (...) @init_fwd_masks()
%2 = call i32 (...) @init_pawn_shelter_masks()
%3 = call i32 (...) @init_passer_masks()
%4 = call i32 (...) @init_backward_pawn_masks()
%5 = call i32 (...) @init_ka_masks()
%6 = call i32 (...) @init_pawn_hash()
ret void
}

LLVM IR (-O2):
define void @init_eval() {
%1 = tail call i32 (...) @init_fwd_masks()
%2 = tail call i32 (...) @init_pawn_shelter_masks()
%3 = tail call i32 (...) @init_passer_masks()
%4 = tail call i32 (...) @init_backward_pawn_masks()
%5 = tail call i32 (...) @init_ka_masks()
%6 = tail call i32 (...) @init_pawn_hash()
ret void
}
int fun_stub_in_release_so(int x, int y) { return x + y; }


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

x86 assembly (clang, -O2):
<fun_stub_in_release_so>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @fun_stub_in_release_so(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ log_stderr(char *);
void usage() {
  log_stderr("999 Usage:\n");
  log_stderr("999   ducc_ling <-v> <-u user> [-q] [-a] [-w workingdir] [-f "
             "filepath] -- program_name [program args]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"999 Usage:\0A\00"
@.str.1 = [103 x i8] c"999 ducc_ling <-v> <-u user> [-q] [-a] [-w workingdir] [-f filepath] -- program_name [program args]\0A\00"
define void @usage() {
%1 = call i32 @log_stderr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @log_stderr(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"999 Usage:\0A\00"
@.str.1 = [103 x i8] c"999 ducc_ling <-v> <-u user> [-q] [-a] [-w workingdir] [-f filepath] -- program_name [program args]\0A\00"
define void @usage() {
%1 = tail call i32 @log_stderr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @log_stderr(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_boo_doc_comments() {
  test_parser_verify_parse(
      test_parser_sourcefile("boo", "\"\"\"\\ndoc comment\n\"\"\""), "boo", "",
      "\"\"\"\\ndoc comment\n\"\"\"", 0);
}


x86 assembly (clang, -O0):
<test_boo_doc_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xed1(%rip),%rdx
lea    0xeb6(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_boo_doc_comments>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
lea    0xed2(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xed4(%rip),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rcx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"boo\00"
@.str.1 = [21 x i8] c"\22\22\22\\ndoc comment\0A\22\22\22\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_boo_doc_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"boo\00"
@.str.1 = [21 x i8] c"\22\22\22\\ndoc comment\0A\22\22\22\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_boo_doc_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReleaseFreeMaster(int);
int /*<<< orphan*/ free(char *);
void DisposePtr(char *thisPtr) {
  int *master;
  int i;
  if (!thisPtr)
    return;
  master = (int *)(thisPtr - 4);
  i = *master;
  ReleaseFreeMaster(i);
  free((char *)master);
}


x86 assembly (clang, -O0):
<DisposePtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <DisposePtr+0x1c>
jmp    1162 <DisposePtr+0x42>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <ReleaseFreeMaster@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisposePtr>:
test   %rdi,%rdi
je     113e <DisposePtr+0x1e>
push   %rbx
mov    %rdi,%rbx
mov    -0x4(%rdi),%edi
add    $0xfffffffffffffffc,%rbx
call   1040 <ReleaseFreeMaster@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @DisposePtr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -4
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @ReleaseFreeMaster(i32 %6)
%8 = tail call i32 @free(i8* %4)
br label %9
9: ; preds = %1, %3
ret void
}
int guider_get_errpoint(struct guider *guider, struct ccd_frame *fr) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.guider = type opaque
%struct.ccd_frame = type opaque
define i32 @guider_get_errpoint(%struct.guider* %0, %struct.ccd_frame* %1) {
%3 = alloca %struct.guider*
%4 = alloca %struct.ccd_frame*
store %struct.guider* %0, %struct.guider** %3
store %struct.ccd_frame* %1, %struct.ccd_frame** %4
ret i32 0
}

LLVM IR (-O2):
%struct.guider = type opaque
%struct.ccd_frame = type opaque
define i32 @guider_get_errpoint(%struct.guider* nocapture readnone %0, %struct.ccd_frame* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t __be64_to_cpu(uint64_t val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @__be64_to_cpu(i32 returned %0) {
ret i32 %0
}