xunge/DecIR huggingface dataset:
zputhex(c) register int c;
{
  static char digits[] = "0123456789abcdef";
  putchar(digits[(c & 0xF0) >> 4] & 0377);
  putchar(digits[(c)&0xF] & 0377);
}


x86 assembly (clang, -O0):
<zputhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
movslq %eax,%rcx
lea    0x2f00(%rip),%rax
movsbl (%rax,%rcx,1),%edi
and    $0xff,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0x2edf(%rip),%rax
movsbl (%rax,%rcx,1),%edi
and    $0xff,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zputhex>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x4,%eax
and    $0xf,%eax
lea    0xedb(%rip),%r14
movzbl (%rax,%r14,1),%edi
xor    %eax,%eax
call   1030 <putchar@plt>
and    $0xf,%ebx
movzbl (%rbx,%r14,1),%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@zputhex.digits = internal global [17 x i8] c"0123456789abcdef\00"
define i32 @zputhex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 240
%6 = ashr i32 %5, 4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @zputhex.digits, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = and i32 %10, 255
%12 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %11)
%13 = load i32, i32* %3
%14 = and i32 %13, 15
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [17 x i8], [17 x i8]* @zputhex.digits, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = and i32 %18, 255
%20 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %19)
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@zputhex.digits = internal unnamed_addr constant [17 x i8] c"0123456789abcdef\00"
define i32 @zputhex(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 15
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [17 x i8], [17 x i8]* @zputhex.digits, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %7)
%9 = and i32 %0, 15
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [17 x i8], [17 x i8]* @zputhex.digits, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %13)
ret i32 undef
}
int uart1TxEmpty(void) {
  return ((*((volatile unsigned char *)0xE0010014)) & ((1 << 5) | (1 << 6))) ==
         ((1 << 5) | (1 << 6));
}


x86 assembly (clang, -O0):
<uart1TxEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0010014,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x60,%eax
cmp    $0x60,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart1TxEmpty>:
mov    $0xe0010014,%eax
mov    (%rax),%cl
not    %cl
xor    %eax,%eax
test   $0x60,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @uart1TxEmpty() {
%1 = load volatile i8, i8* inttoptr (i64 3758161940 to i8*)
%2 = zext i8 %1 to i32
%3 = and i32 %2, 96
%4 = icmp eq i32 %3, 96
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @uart1TxEmpty() {
%1 = load volatile i8, i8* inttoptr (i64 3758161940 to i8*)
%2 = and i8 %1, 96
%3 = icmp eq i8 %2, 96
%4 = zext i1 %3 to i32
ret i32 %4
}
void sysfs_remove_link(struct kobject *k, char *name) { ; }


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

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

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

LLVM IR (-O2):
%struct.kobject = type opaque
define void @sysfs_remove_link(%struct.kobject* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_strlist_cmp(struct Cyc_List_List *,
                                         struct Cyc_List_List *);
int Cyc_Absyn_varlist_cmp(struct Cyc_List_List *vs1,
                          struct Cyc_List_List *vs2) {
  if ((int)vs1 == (int)vs2)
    return 0;
  return ({ Cyc_Absyn_strlist_cmp(vs1, vs2); });
}


x86 assembly (clang, -O0):
<Cyc_Absyn_varlist_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    %ecx,%eax
jne    113c <Cyc_Absyn_varlist_cmp+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1152 <Cyc_Absyn_varlist_cmp+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <Cyc_Absyn_strlist_cmp@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_varlist_cmp>:
cmp    %esi,%edi
jne    1117 <Cyc_Absyn_varlist_cmp+0x7>
xor    %eax,%eax
ret
jmp    1030 <Cyc_Absyn_strlist_cmp@plt>

LLVM IR (-O0):
%struct.Cyc_List_List = type { i32 }
define i32 @Cyc_Absyn_varlist_cmp(%struct.Cyc_List_List* %0, %struct.Cyc_List_List* %1) {
%3 = alloca i32
%4 = alloca %struct.Cyc_List_List*
%5 = alloca %struct.Cyc_List_List*
%6 = alloca i32
store %struct.Cyc_List_List* %0, %struct.Cyc_List_List** %4
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %5
%7 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%8 = ptrtoint %struct.Cyc_List_List* %7 to i32
%9 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %5
%10 = ptrtoint %struct.Cyc_List_List* %9 to i32
%11 = icmp eq i32 %8, %10
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %18
13: ; preds = %2
%14 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%15 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %5
%16 = call i32 @Cyc_Absyn_strlist_cmp(%struct.Cyc_List_List* %14, %struct.Cyc_List_List* %15)
store i32 %16, i32* %6
%17 = load i32, i32* %6
store i32 %17, i32* %3
br label %18
18: ; preds = %13, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.Cyc_List_List = type { i32 }
define i32 @Cyc_Absyn_varlist_cmp(%struct.Cyc_List_List* %0, %struct.Cyc_List_List* %1) {
%3 = ptrtoint %struct.Cyc_List_List* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint %struct.Cyc_List_List* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp eq i32 %4, %6
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @Cyc_Absyn_strlist_cmp(%struct.Cyc_List_List* %0, %struct.Cyc_List_List* %1)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, char const *, size_t);
void bgen_memfread(void *restrict dst, char const *restrict *src, size_t n) {
  memcpy(dst, *src, n);
  *src = *src + n;
}


x86 assembly (clang, -O0):
<bgen_memfread>:
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),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgen_memfread>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    (%rsi),%rsi
call   1030 <memcpy@plt>
add    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @bgen_memfread(i8* noalias %0, i8** %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i64
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** %8
%10 = load i64, i64* %6
%11 = call i32 @memcpy(i8* %7, i8* %9, i64 %10)
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i64, i64* %6
%15 = getelementptr inbounds i8, i8* %13, i64 %14
%16 = load i8**, i8*** %5
store i8* %15, i8** %16
ret void
}

LLVM IR (-O2):
define void @bgen_memfread(i8* noalias %0, i8** nocapture %1, i64 %2) {
%4 = load i8*, i8** %1
%5 = tail call i32 @memcpy(i8* %0, i8* %4, i64 %2)
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 %2
store i8* %7, i8** %1
ret void
}
/* Variables and functions */
void *calloc(int, unsigned int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stderr;
void *Calloc(unsigned n) {
  void *p;
  if (!(p = calloc(4, n))) {
    fprintf(stderr, "Calloc(%d) failed.\n", n);
    fflush(stderr);
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<Calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1196 <Calloc+0x56>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe87(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calloc>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x4,%edi
mov    %ebx,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     115f <Calloc+0x1f>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e7a(%rip),%r14
mov    (%r14),%edi
lea    0xe90(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    (%r14),%edi
call   1050 <fflush@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Calloc(%d) failed.\0A\00"
define i8* @Calloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @calloc(i32 4, i32 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %14, label %7
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* %2
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fflush(i32 %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Calloc(%d) failed.\0A\00"
define noalias i8* @Calloc(i32 %0) {
%2 = tail call i8* @calloc(i32 4, i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int isalpha(char c) {
  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
}


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <isalpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <isalpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <isalpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isalpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 122
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isalpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
int lowbit(int x) { return x & (-x); }


x86 assembly (clang, -O0):
<lowbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lowbit(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t l2cap_event_connection_parameter_update_request_get_latencey(
    const uint8_t *event) {
  return little_endian_read_16(event, 8);
}


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

x86 assembly (clang, -O2):
<l2cap_event_connection_parameter_update_request_get_latencey>:
mov    $0x8,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @l2cap_event_connection_parameter_update_request_get_latencey(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 8)
ret i32 %2
}
/* Variables and functions */
int diminuto_ipcl_packet_consumer_generic(char const *, char *);
int diminuto_ipcl_packet_consumer(const char *path) {
  return diminuto_ipcl_packet_consumer_generic(path, "");
}


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

x86 assembly (clang, -O2):
<diminuto_ipcl_packet_consumer>:
lea    0xee9(%rip),%rsi
jmp    1030 <diminuto_ipcl_packet_consumer_generic@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @diminuto_ipcl_packet_consumer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @diminuto_ipcl_packet_consumer_generic(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @diminuto_ipcl_packet_consumer(i8* %0) {
%2 = tail call i32 @diminuto_ipcl_packet_consumer_generic(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *,
                           int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void err_sys(const char *fmt, ...) {
  va_list ap;
  fprintf(stderr, fmt, ap);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
define void @err_sys(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = call i32 @fprintf(i32 %4, i8* %5, i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @err_sys(i8* %0, ...) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0, i32 undef)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void g_arith_dummy(void *s, void *d, void *o) { *((float *)o) = 1.0; }


x86 assembly (clang, -O0):
<g_arith_dummy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  0xee4(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_arith_dummy>:
movl   $0x3f800000,(%rdx)
ret

LLVM IR (-O0):
define void @g_arith_dummy(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** %6
%8 = bitcast i8* %7 to float*
store float 1.000000e+00, float* %8
ret void
}

LLVM IR (-O2):
define void @g_arith_dummy(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to float*
store float 1.000000e+00, float* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int fcntl(int fd __attribute__((unused)), int cmd __attribute__((unused)),
          ...) {
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<fcntl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcntl>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EACCES = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @EACCES
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EACCES = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = load i32, i32* @EACCES
store i32 %3, i32* @errno
ret i32 -1
}
__attribute__((always_)) void pm_runtime_allow(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @pm_runtime_allow(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("-i     <input path>    the raw file path for generate idx\n"
         "-o     <output path>   generated idx file path\n"
         "-h                     help\n"
         "-s                     string keys\n"
         "-l     <label>         idx label\n"
         "-n     <key num>       just for string keys,you must specify the num "
         "for string keys\n"
         "-t     <idx type>      0:the idx key is integer,idx with binary "
         "search. 1:idx key is string, idx with hash\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [394 x i8] c"-i <input path> the raw file path for generate idx\0A-o <output path> generated idx file path\0A-h help\0A-s string keys\0A-l <label> idx label\0A-n <key num> just for string keys,you must specify the num for string keys\0A-t <idx type> 0:the idx key is integer,idx with binary search. 1:idx key is string, idx with hash\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [393 x i8] c"-i <input path> the raw file path for generate idx\0A-o <output path> generated idx file path\0A-h help\0A-s string keys\0A-l <label> idx label\0A-n <key num> just for string keys,you must specify the num for string keys\0A-t <idx type> 0:the idx key is integer,idx with binary search. 1:idx key is string, idx with hash\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([393 x i8], [393 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Debleft(char *);
int /*<<< orphan*/ Debright(char *);
void Deblank(char *s) {
  Debleft(s);
  Debright(s);
}


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

x86 assembly (clang, -O2):
<Deblank>:
push   %rbx
mov    %rdi,%rbx
call   1040 <Debleft@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <Debright@plt>

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

LLVM IR (-O2):
define void @Deblank(i8* %0) {
%2 = tail call i32 @Debleft(i8* %0)
%3 = tail call i32 @Debright(i8* %0)
ret void
}
int ld_bun_rc1(long double a1) { return (__builtin_isunordered(a1, 100)); }


x86 assembly (clang, -O0):
<ld_bun_rc1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fucomip %st(0),%st
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_bun_rc1>:
fldt   0x8(%rsp)
xor    %eax,%eax
fucomip %st(0),%st
setp   %al
ret

LLVM IR (-O0):
define i32 @ld_bun_rc1(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp uno x86_fp80 %3, 0xK4005C800000000000000
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ld_bun_rc1(x86_fp80 %0) {
%2 = fcmp uno x86_fp80 %0, 0xK00000000000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ jni_overhead_end();
int /*<<< orphan*/ jni_overhead_start();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  int i;
  for (i = 0; i < 1000000; i++) {
    jni_overhead_start();
    printf("%ld\n", jni_overhead_end());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xf4240,-0x8(%rbp)
jge    117d <main+0x4d>
mov    $0x0,%al
call   1050 <jni_overhead_start@plt>
mov    $0x0,%al
call   1040 <jni_overhead_end@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xf4240,%ebp
lea    0xec1(%rip),%rbx
nop
xor    %eax,%eax
call   1050 <jni_overhead_start@plt>
xor    %eax,%eax
call   1040 <jni_overhead_end@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1140 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @jni_overhead_start()
%4 = tail call i32 (...) @jni_overhead_end()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 1000000
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t uint32_byteswap(uint32_t crc) {
  return (((crc & 0x000000ff) << 24) | ((crc & 0x0000ff00) << 8) |
          ((crc & 0x00ff0000) >> 8) | ((crc & 0xff000000) >> 24));
}


x86 assembly (clang, -O0):
<uint32_byteswap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @uint32_byteswap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @uint32_byteswap(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Ae0Cg2(int /*<<< orphan*/, unsigned long volatile *,
                          unsigned int, unsigned int);
__attribute__((no)) void __attribute__((stdcall, regparm(3)))
BucKo(volatile unsigned long *RdZoN, unsigned kKiv65, unsigned vgKFx2) {
  Ae0Cg2(0, RdZoN, kKiv65, vgKFx2);
}


x86 assembly (clang, -O0):
<BucKo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %edi,%edi
call   1030 <Ae0Cg2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BucKo>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <Ae0Cg2@plt>

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

LLVM IR (-O2):
define void @BucKo(i64* %0, i32 %1, i32 %2) {
%4 = tail call i32 @Ae0Cg2(i32 0, i64* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yogrt_set_interval1(int);
int iyogrt_set_interval1_(int *seconds) {
  yogrt_set_interval1(*seconds);
  return *seconds;
}


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

x86 assembly (clang, -O2):
<iyogrt_set_interval1_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <yogrt_set_interval1@plt>
mov    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @iyogrt_set_interval1_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @yogrt_set_interval1(i32 %2)
%4 = load i32, i32* %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void terminate(const char *message) {
  fputs(message, stderr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<terminate>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @terminate(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @terminate(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
size_t _getNameLength(uint8_t *buffer, size_t length) {
  int offset = 6;
  uint16_t len =
      ((uint16_t)(buffer[offset]) << 8) | (uint16_t)(buffer[offset + 1]);
  return (size_t)len;
}


x86 assembly (clang, -O0):
<_getNameLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x6,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    -0x14(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,8),%rcx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getNameLength>:
mov    0x30(%rdi),%eax
shl    $0x8,%eax
or     0x38(%rdi),%eax
cltq
ret

LLVM IR (-O0):
define i64 @_getNameLength(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64* %0, i64** %3
store i64 %1, i64* %4
store i32 6, i32* %5
%7 = load i64*, i64** %3
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %7, i64 %9
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = load i64*, i64** %3
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i64, i64* %14, i64 %17
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = or i32 %13, %20
store i32 %21, i32* %6
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
ret i64 %23
}

LLVM IR (-O2):
define i64 @_getNameLength(i64* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 6
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = shl i32 %5, 8
%7 = getelementptr inbounds i64, i64* %0, i64 7
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = or i32 %6, %9
%11 = sext i32 %10 to i64
ret i64 %11
}
void const_func(const int a) {}


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

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

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

LLVM IR (-O2):
define void @const_func(i32 %0) {
ret void
}
/* Type definitions */
struct soap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ soap_set_logfile(struct soap *, int /*<<< orphan*/,
                                    char const *);
void soap_set_recv_logfile(struct soap *soap, const char *logfile) {
  soap_set_logfile(soap, 0, logfile);
}


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

x86 assembly (clang, -O2):
<soap_set_recv_logfile>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <soap_set_logfile@plt>

LLVM IR (-O0):
%struct.soap = type { i32 }
define void @soap_set_recv_logfile(%struct.soap* %0, i8* %1) {
%3 = alloca %struct.soap*
%4 = alloca i8*
store %struct.soap* %0, %struct.soap** %3
store i8* %1, i8** %4
%5 = load %struct.soap*, %struct.soap** %3
%6 = load i8*, i8** %4
%7 = call i32 @soap_set_logfile(%struct.soap* %5, i32 0, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.soap = type { i32 }
define void @soap_set_recv_logfile(%struct.soap* %0, i8* %1) {
%3 = tail call i32 @soap_set_logfile(%struct.soap* %0, i32 0, i8* %1)
ret void
}
/* Type definitions */
struct Bot {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void on_cp_chat_recv(struct Bot *self, char *chat, char *username, char *msg) {
  ((void)(self));
  printf("[#%s] [%s] %s\n", chat, username, msg);
}


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

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

LLVM IR (-O0):
%struct.Bot = type { i32 }
@.str = [15 x i8] c"[#%s] [%s] %s\0A\00"
define void @on_cp_chat_recv(%struct.Bot* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Bot*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Bot* %0, %struct.Bot** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.Bot*, %struct.Bot** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
%struct.Bot = type { i32 }
@.str = [15 x i8] c"[#%s] [%s] %s\0A\00"
define void @on_cp_chat_recv(%struct.Bot* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
int *ext_func(int *p) { return p; }


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

x86 assembly (clang, -O2):
<ext_func>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32* @ext_func(i32* readnone returned %0) {
ret i32* %0
}
int variable_test_bit(int nr, volatile const unsigned long *addr) {
  int oldbit;
  asm volatile("bt %2,%1\n\t"
               "sbb %0,%0"
               : "=r"(oldbit)
               : "m"(*(unsigned long *)addr), "Ir"(nr));
  return oldbit;
}


x86 assembly (clang, -O0):
<variable_test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
bt     %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<variable_test_bit>:
bt     %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @variable_test_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = load i32, i32* %3
%8 = call i32 asm sideeffect "bt $2,$1\0A\09sbb $0,$0", "=r,*m,Ir,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @variable_test_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm sideeffect "bt $2,$1\0A\09sbb $0,$0", "=r,*m,Ir,~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0)
ret i32 %3
}
int default_hash_func(void *key, int size) {
  return (int)(((long)key / 32) % size);
}


x86 assembly (clang, -O0):
<default_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x20,%ecx
cqto
idiv   %rcx
movslq -0xc(%rbp),%rcx
cqto
idiv   %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_hash_func>:
lea    0x1f(%rdi),%rax
test   %rdi,%rdi
cmovns %rdi,%rax
sar    $0x5,%rax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1127 <default_hash_func+0x27>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @default_hash_func(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = sdiv i64 %6, 32
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = srem i64 %7, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @default_hash_func(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = sdiv i64 %3, 32
%5 = sext i32 %1 to i64
%6 = srem i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ glBitmap(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/, int, int,
                            int /*<<< orphan*/ *);
int /*<<< orphan*/ glWindowPos2i(int, int);
void set_pos(int x, int y) {
  if (x < 0 || y < 0) {
    glWindowPos2i(0, 0);
    glBitmap(0, 0, 0, 0, x, y, NULL);
  } else {
    glWindowPos2i(x, y);
  }
}


x86 assembly (clang, -O0):
<set_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1142 <set_pos+0x22>
cmpl   $0x0,-0x8(%rbp)
jge    116f <set_pos+0x4f>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <glWindowPos2i@plt>
mov    -0x4(%rbp),%r8d
mov    -0x8(%rbp),%r9d
xor    %ecx,%ecx
xor    %eax,%eax
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
movq   $0x0,(%rsp)
call   1030 <glBitmap@plt>
jmp    117a <set_pos+0x5a>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <glWindowPos2i@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pos>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%eax
or     %edi,%eax
js     113c <set_pos+0x1c>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <glWindowPos2i@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <glWindowPos2i@plt>
movq   $0x0,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
mov    %ebx,%r9d
call   1030 <glBitmap@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @set_pos(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 = icmp slt i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7, %2
%11 = call i32 @glWindowPos2i(i32 0, i32 0)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @glBitmap(i32 0, i32 0, i32 0, i32 0, i32 %12, i32 %13, i32* null)
br label %19
15: ; preds = %7
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = call i32 @glWindowPos2i(i32 %16, i32 %17)
br label %19
19: ; preds = %15, %10
ret void
}

LLVM IR (-O2):
define void @set_pos(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp sgt i32 %3, -1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @glWindowPos2i(i32 0, i32 0)
%7 = tail call i32 @glBitmap(i32 0, i32 0, i32 0, i32 0, i32 %0, i32 %1, i32* null)
br label %10
8: ; preds = %2
%9 = tail call i32 @glWindowPos2i(i32 %0, i32 %1)
br label %10
10: ; preds = %8, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ A_UNDERLINE;
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ wattroff(int /*<<< orphan*/ *, int /*<<< orphan*/);
void after_url(WINDOW *win) {
  wattroff(win, COLOR_PAIR(3));
  wattroff(win, A_UNDERLINE);
}


x86 assembly (clang, -O0):
<after_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x3,%edi
call   1030 <COLOR_PAIR@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <wattroff@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
call   1040 <wattroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<after_url>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%edi
call   1030 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <wattroff@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <wattroff@plt>

LLVM IR (-O0):
@A_UNDERLINE = global i32 0
define void @after_url(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @COLOR_PAIR(i32 3)
%5 = call i32 @wattroff(i32* %3, i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* @A_UNDERLINE
%8 = call i32 @wattroff(i32* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@A_UNDERLINE = global i32 0
define void @after_url(i32* %0) {
%2 = tail call i32 @COLOR_PAIR(i32 3)
%3 = tail call i32 @wattroff(i32* %0, i32 %2)
%4 = load i32, i32* @A_UNDERLINE
%5 = tail call i32 @wattroff(i32* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_help(void) {
  printf("Lossy speed tester usage: \n");
  printf("        -l [loops] -p [lossy phi] -n [zipf N] -a [zipf alpha]\n");
  printf(
      "        -t [running seconds] -v \"show results\" -r [output period]\n");
  printf("        -h \"show help\"\n");
}


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

x86 assembly (clang, -O2):
<show_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Lossy speed tester usage: \0A\00"
@.str.1 = [63 x i8] c" -l [loops] -p [lossy phi] -n [zipf N] -a [zipf alpha]\0A\00"
@.str.2 = [67 x i8] c" -t [running seconds] -v \22show results\22 -r [output period]\0A\00"
@.str.3 = [24 x i8] c" -h \22show help\22\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Lossy speed tester usage: \00"
@str.4 = [62 x i8] c" -l [loops] -p [lossy phi] -n [zipf N] -a [zipf alpha]\00"
@str.5 = [66 x i8] c" -t [running seconds] -v \22show results\22 -r [output period]\00"
@str.6 = [23 x i8] c" -h \22show help\22\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
ret void
}
void RGB24ToJ400() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @RGB24ToJ400() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rte_constant_bswap32(uint32_t x) {
  return ((x & 0x000000ffUL) << 24) | ((x & 0x0000ff00UL) << 8) |
         ((x & 0x00ff0000UL) >> 8) | ((x & 0xff000000UL) >> 24);
}


x86 assembly (clang, -O0):
<rte_constant_bswap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
and    $0xff,%rax
shl    $0x18,%rax
movslq -0x4(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff0000,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000,%rdx
and    %rdx,%rcx
shr    $0x18,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rte_constant_bswap32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 255
%6 = shl i64 %5, 24
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = and i64 %8, 65280
%10 = shl i64 %9, 8
%11 = or i64 %6, %10
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = and i64 %13, 16711680
%15 = lshr i64 %14, 8
%16 = or i64 %11, %15
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = and i64 %18, 4278190080
%20 = lshr i64 %19, 24
%21 = or i64 %16, %20
%22 = trunc i64 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @rte_constant_bswap32(i32 %0) {
%2 = call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
struct timespec {
  int dummy;
};
struct aiocb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int aio_suspend(const struct aiocb *const list[], int nent,
                const struct timespec *timeout) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<aio_suspend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aio_suspend>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.aiocb = type { i32 }
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @aio_suspend(%struct.aiocb** %0, i32 %1, %struct.timespec* %2) {
%4 = alloca %struct.aiocb**
%5 = alloca i32
%6 = alloca %struct.timespec*
store %struct.aiocb** %0, %struct.aiocb*** %4
store i32 %1, i32* %5
store %struct.timespec* %2, %struct.timespec** %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
%struct.aiocb = type { i32 }
%struct.timespec = type { i32 }
@ENOSYS = global i32 0
define i32 @aio_suspend(%struct.aiocb** nocapture readnone %0, i32 %1, %struct.timespec* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void GoToColumn(int column) { printf("\e[u\e[%iC", column); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[u\1B[%iC\00"
define void @GoToColumn(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}