xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int __u16;

/* Variables and functions */
__u16 min_ata_std(__u16 major) {
  if (major <= 4)
    return 1;
  if (major == 5)
    return 2;
  if (major <= 7)
    return 3;
  return 4;
}


x86 assembly (clang, -O0):
<min_ata_std>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     111d <min_ata_std+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1150 <min_ata_std+0x50>
cmpl   $0x5,-0x8(%rbp)
jne    1133 <min_ata_std+0x33>
movl   $0x2,-0x4(%rbp)
jmp    1150 <min_ata_std+0x50>
cmpl   $0x7,-0x8(%rbp)
jg     1149 <min_ata_std+0x49>
movl   $0x3,-0x4(%rbp)
jmp    1150 <min_ata_std+0x50>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_ata_std>:
mov    $0x1,%eax
cmp    $0x5,%edi
jl     111c <min_ata_std+0x1c>
mov    $0x2,%eax
je     111c <min_ata_std+0x1c>
cmp    $0x8,%edi
mov    $0x4,%eax
sbb    $0x0,%eax
ret

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

LLVM IR (-O2):
define i32 @min_ata_std(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp eq i32 %0, 5
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 8
%7 = select i1 %6, i32 3, i32 4
br label %8
8: ; preds = %5, %3, %1
%9 = phi i32 [ 1, %1 ], [ 2, %3 ], [ %7, %5 ]
ret i32 %9
}
/* Variables and functions */
void *malloc(size_t);
void *CaptureWrapper_New(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<CaptureWrapper_New>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @CaptureWrapper_New(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @CaptureWrapper_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ pawns_able_to_capture_west(int, int, int);
void pawns_able_to_capture_west_test(void **state) {
  assert_int_equal(0x0000000010000000ul,
                   pawns_able_to_capture_west(0x0000000018000000ul,
                                              0x0000100800000000ul, 0));
  assert_int_equal(0x0000000800000000ul,
                   pawns_able_to_capture_west(0x00E3140800000000ul,
                                              0x000000000C10E300ul, 1));
}


x86 assembly (clang, -O0):
<pawns_able_to_capture_west_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x18000000,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <pawns_able_to_capture_west@plt>
mov    %eax,%esi
mov    $0x10000000,%edi
call   1040 <assert_int_equal@plt>
xor    %edi,%edi
mov    $0xc10e300,%esi
mov    $0x1,%edx
call   1030 <pawns_able_to_capture_west@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pawns_able_to_capture_west_test>:
push   %rax
mov    $0x18000000,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <pawns_able_to_capture_west@plt>
mov    $0x10000000,%edi
mov    %eax,%esi
call   1040 <assert_int_equal@plt>
xor    %edi,%edi
mov    $0xc10e300,%esi
mov    $0x1,%edx
call   1030 <pawns_able_to_capture_west@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @pawns_able_to_capture_west_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @pawns_able_to_capture_west(i32 402653184, i32 0, i32 0)
%4 = call i32 @assert_int_equal(i32 268435456, i32 %3)
%5 = call i32 @pawns_able_to_capture_west(i32 0, i32 202433280, i32 1)
%6 = call i32 @assert_int_equal(i32 0, i32 %5)
ret void
}

LLVM IR (-O2):
define void @pawns_able_to_capture_west_test(i8** nocapture readnone %0) {
%2 = tail call i32 @pawns_able_to_capture_west(i32 402653184, i32 0, i32 0)
%3 = tail call i32 @assert_int_equal(i32 268435456, i32 %2)
%4 = tail call i32 @pawns_able_to_capture_west(i32 0, i32 202433280, i32 1)
%5 = tail call i32 @assert_int_equal(i32 0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
void cleanup_module(void) { printk("Goodbye Cruel World!\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Goodbye Cruel World!\0A\00"
define void @cleanup_module() {
%1 = call i32 @printk(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Goodbye Cruel World!\0A\00"
define void @cleanup_module() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ast_sockaddr {
  int dummy;
};

/* Variables and functions */
char *ast_sockaddr_stringify_fmt(struct ast_sockaddr const *, int);
char *ast_sockaddr_stringify_host_remote(const struct ast_sockaddr *addr) {
  return ast_sockaddr_stringify_fmt(addr, (((1 << 0) | (1 << 2)) | (1 << 3)));
}


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

x86 assembly (clang, -O2):
<ast_sockaddr_stringify_host_remote>:
mov    $0xd,%esi
jmp    1030 <ast_sockaddr_stringify_fmt@plt>

LLVM IR (-O0):
%struct.ast_sockaddr = type { i32 }
define i8* @ast_sockaddr_stringify_host_remote(%struct.ast_sockaddr* %0) {
%2 = alloca %struct.ast_sockaddr*
store %struct.ast_sockaddr* %0, %struct.ast_sockaddr** %2
%3 = load %struct.ast_sockaddr*, %struct.ast_sockaddr** %2
%4 = call i8* @ast_sockaddr_stringify_fmt(%struct.ast_sockaddr* %3, i32 13)
ret i8* %4
}

LLVM IR (-O2):
%struct.ast_sockaddr = type { i32 }
define i8* @ast_sockaddr_stringify_host_remote(%struct.ast_sockaddr* %0) {
%2 = tail call i8* @ast_sockaddr_stringify_fmt(%struct.ast_sockaddr* %0, i32 13)
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ __uid_t;
typedef int /*<<< orphan*/ __gid_t;
struct TYPE_2__ {
  int /*<<< orphan*/ pw_gid;
};

/* Variables and functions */
TYPE_1__ *getpwuid(int /*<<< orphan*/);
__gid_t get_pw_gid(__uid_t uid) { return getpwuid(uid)->pw_gid; }


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

x86 assembly (clang, -O2):
<get_pw_gid>:
push   %rax
call   1030 <getpwuid@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define i32 @get_pw_gid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.TYPE_2__* @getpwuid(i32 %3)
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32 }
define i32 @get_pw_gid(i32 %0) {
%2 = tail call %struct.TYPE_2__* @getpwuid(i32 %0)
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i64 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
double fabs(double);
double tanh(double);
double inverse_kosambi(double d) { return 0.5 * tanh(fabs(d) / 50.0); }


x86 assembly (clang, -O0):
<inverse_kosambi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xee7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xed3(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <tanh@plt>
movaps %xmm0,%xmm1
movsd  0xeb7(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse_kosambi>:
push   %rax
andpd  0xee7(%rip),%xmm0
divsd  0xeef(%rip),%xmm0
call   1030 <tanh@plt>
mulsd  0xeea(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @inverse_kosambi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fabs.f64(double %3)
%5 = fdiv double %4, 5.000000e+01
%6 = call double @tanh(double %5)
%7 = fmul double 5.000000e-01, %6
ret double %7
}

LLVM IR (-O2):
define double @inverse_kosambi(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fdiv double %2, 5.000000e+01
%4 = tail call double @tanh(double %3)
%5 = fmul double %4, 5.000000e-01
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_hello(int signo) { printf("hello world!\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
define void @my_hello(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"hello world!\00"
define void @my_hello(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rd_2dim_slice(int *, int, int, int, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
void rd_2dim(int *array, int dim1, int dim2, int shift1, int shift2) {
  rd_2dim_slice(array, dim1, dim2, shift1, shift2, 0, 0);
}


x86 assembly (clang, -O0):
<rd_2dim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
call   1030 <rd_2dim_slice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_2dim>:
push   %rax
movl   $0x0,(%rsp)
xor    %r9d,%r9d
call   1030 <rd_2dim_slice@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @rd_2dim(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @rd_2dim_slice(i32* %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @rd_2dim(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @rd_2dim_slice(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const);
void print_characters(const char *s_ptr) {
  for (; *s_ptr != '\0'; s_ptr++)
    printf("%c", *s_ptr);
}


x86 assembly (clang, -O0):
<print_characters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <print_characters+0x40>
mov    -0x8(%rbp),%rax
lea    0xec9(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <print_characters+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_characters>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <print_characters+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed8(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <print_characters+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @print_characters(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %12, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
br label %12
12: ; preds = %8
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @print_characters(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ getegid();
int /*<<< orphan*/ geteuid();
scalar_t__ lchown(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  uid_t uid = geteuid();
  gid_t gid = getegid();
  if (0 > lchown("its.not.the.same", uid, gid))
    return EXIT_FAILURE;
  else
    return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <geteuid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getegid@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea0(%rip),%rdi
call   1040 <lchown@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1184 <main+0x54>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1190 <main+0x60>
mov    0x2e4d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <geteuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getegid@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <lchown@plt>
test   %rax,%rax
jns    115f <main+0x2f>
mov    0x2e83(%rip),%rax
jmp    1166 <main+0x36>
mov    0x2e72(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"its.not.the.same\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @geteuid()
store i32 %4, i32* %2
%5 = call i32 (...) @getegid()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i64 @lchown(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = icmp sgt i64 0, %8
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = load i32, i32* @EXIT_FAILURE
store i32 %11, i32* %1
br label %14
12: ; preds = %0
%13 = load i32, i32* @EXIT_SUCCESS
store i32 %13, i32* %1
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [17 x i8] c"its.not.the.same\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @geteuid()
%2 = tail call i32 (...) @getegid()
%3 = tail call i64 @lchown(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = icmp slt i64 %3, 0
%5 = load i32, i32* @EXIT_FAILURE
%6 = load i32, i32* @EXIT_SUCCESS
%7 = select i1 %4, i32 %5, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int listen(int, int);
int /*<<< orphan*/ perror(char *);
void ListenSocketOrDie(int fd, int backlog) {
  if (listen(fd, backlog) == -1) {
    perror("listen");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<ListenSocketOrDie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <listen@plt>
cmp    $0xffffffff,%eax
jne    1168 <ListenSocketOrDie+0x38>
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ListenSocketOrDie>:
push   %rax
call   1030 <listen@plt>
cmp    $0xffffffff,%eax
je     113d <ListenSocketOrDie+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"listen\00"
define void @ListenSocketOrDie(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @listen(i32 %5, i32 %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"listen\00"
define void @ListenSocketOrDie(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
float kill_denormal(float);
float fsub_native(float a, float b) { return kill_denormal(a - b); }


x86 assembly (clang, -O0):
<fsub_native>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <kill_denormal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsub_native>:
subss  %xmm1,%xmm0
jmp    1030 <kill_denormal@plt>

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

LLVM IR (-O2):
define float @fsub_native(float %0, float %1) {
%3 = fsub float %0, %1
%4 = tail call float @kill_denormal(float %3)
ret float %4
}
/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_short(short const k1, short const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_short>:
xor    %eax,%eax
cmp    %si,%di
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_short(i16 signext %0, i16 signext %1) {
%3 = icmp eq i16 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int bpf__apply_obj_config(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bpf__apply_obj_config() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main(void) {
  unsigned int a = __VERIFIER_nondet_uint();
  __VERIFIER_assert(a == 1);
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,%ebx
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <__VERIFIER_assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assert(i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @__VERIFIER_assert(i32 %3)
ret i32 %1
}
void INT_Excep_PERIB_INTB192(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB192() {
ret void
}
long long internal_round_l(long long value) { return value; }


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

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

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

LLVM IR (-O2):
define i64 @internal_round_l(i64 returned %0) {
ret i64 %0
}
void pid_ns_release_proc(struct pid_namespace *ns) {}


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

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

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

LLVM IR (-O2):
%struct.pid_namespace = type opaque
define void @pid_ns_release_proc(%struct.pid_namespace* nocapture %0) {
ret void
}
/* Variables and functions */
long long strtoull(char const *, char **, int);
long long int strtoll(const char *restrict cp, char **restrict endp, int base) {
  if (*cp == '-')
    return -strtoull(cp + 1, endp, base);
  return strtoull(cp, endp, base);
}


x86 assembly (clang, -O0):
<strtoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1158 <strtoll+0x48>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strtoull@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    116c <strtoll+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strtoull@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoll>:
push   %rax
cmpb   $0x2d,(%rdi)
jne    1124 <strtoll+0x14>
add    $0x1,%rdi
call   1030 <strtoull@plt>
neg    %rax
pop    %rcx
ret
pop    %rax
jmp    1030 <strtoull@plt>

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

LLVM IR (-O2):
define i64 @strtoll(i8* noalias %0, i8** noalias nocapture %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i64 @strtoull(i8* %7, i8** %1, i32 %2)
%9 = sub nsw i64 0, %8
br label %12
10: ; preds = %3
%11 = tail call i64 @strtoull(i8* %0, i8** %1, i32 %2)
br label %12
12: ; preds = %10, %6
%13 = phi i64 [ %9, %6 ], [ %11, %10 ]
ret i64 %13
}
/* Variables and functions */
int get_index(char *);
int timlib_get_index(char *s) { return get_index(s); }


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

x86 assembly (clang, -O2):
<timlib_get_index>:
jmp    1030 <get_index@plt>

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

LLVM IR (-O2):
define i32 @timlib_get_index(i8* %0) {
%2 = tail call i32 @get_index(i8* %0)
ret i32 %2
}
/* Variables and functions */
bool nrf53_errata_117(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_117() {
ret i32 0
}
void check_logfs_je_spillout(void) { ; }


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

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

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

LLVM IR (-O2):
define void @check_logfs_je_spillout() {
ret void
}
/* Variables and functions */
bool UT32_MUL_OVFCHK(unsigned int a, unsigned int b) {
  return (a > 0 && b > 0 && a > 0xFFFFFFFFU / b);
}


x86 assembly (clang, -O0):
<UT32_MUL_OVFCHK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jbe    1145 <UT32_MUL_OVFCHK+0x45>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jbe    1145 <UT32_MUL_OVFCHK+0x45>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0xffffffff,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UT32_MUL_OVFCHK>:
mov    %esi,%eax
xor    %ecx,%ecx
mul    %edi
seto   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @UT32_MUL_OVFCHK(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 ugt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ugt i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = udiv i32 -1, %12
%14 = icmp ugt i32 %11, %13
br label %15
15: ; preds = %10, %7, %2
%16 = phi i1 [ false, %7 ], [ false, %2 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @UT32_MUL_OVFCHK(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %1, i32 %0)
%4 = extractvalue { i32, i1 } %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ path;

/* Variables and functions */
int PATH_MAX;
int /*<<< orphan*/ *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, char *);
void print_pwd() {
  char path[PATH_MAX];
  if (getcwd(path, sizeof(path) - 1) != NULL) {
    printf("PWD: %s\n", path);
  }
}


x86 assembly (clang, -O0):
<print_pwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x18(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x10(%rbp)
sub    $0x1,%rax
mov    %eax,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%rax
je     1179 <print_pwd+0x59>
mov    -0x18(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pwd>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rbx
mov    %rbx,%rsp
lea    -0x1(%rax),%esi
mov    %rbx,%rdi
call   1040 <getcwd@plt>
test   %rax,%rax
je     1162 <print_pwd+0x42>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
@.str = [9 x i8] c"PWD: %s\0A\00"
define void @print_pwd() {
%1 = alloca i8*
%2 = alloca i64
%3 = load i32, i32* @PATH_MAX
%4 = zext i32 %3 to i64
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %1
%6 = alloca i8, i64 %4
store i64 %4, i64* %2
%7 = sub i64 %4, 1
%8 = trunc i64 %7 to i32
%9 = call i32* @getcwd(i8* %6, i32 %8)
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %13
13: ; preds = %11, %0
%14 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
@.str = [9 x i8] c"PWD: %s\0A\00"
define void @print_pwd() {
%1 = load i32, i32* @PATH_MAX
%2 = zext i32 %1 to i64
%3 = alloca i8, i64 %2
%4 = add i32 %1, -1
%5 = call i32* @getcwd(i8* %3, i32 %4)
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %9
9: ; preds = %7, %0
ret void
}
void SleepMethod(unsigned long aDuration) {}


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

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

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

LLVM IR (-O2):
define void @SleepMethod(i64 %0) {
ret void
}
/* Variables and functions */
scalar_t__ test_add();
int run_tests() {
  int num_failures = 0;
  if (test_add() != 0)
    num_failures++;
  return num_failures;
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_add@plt>
cmp    $0x0,%rax
je     1139 <run_tests+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rax
xor    %eax,%eax
call   1030 <test_add@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @run_tests() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_add()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
br label %7
7: ; preds = %4, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @run_tests() {
%1 = tail call i64 (...) @test_add()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_socket(int socket) { close(socket); }


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

x86 assembly (clang, -O2):
<close_socket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @close_socket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void initTimer() {}


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

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

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

LLVM IR (-O2):
define void @initTimer() {
ret void
}
/* Variables and functions */
int cpuid_simple(int);
scalar_t__ cpuid_support_extended(int);
int cpuinfo_has_e3dnow() {
  return cpuid_support_extended(0x80000001) &&
         (cpuid_simple(0x80000001) & 0x40000000);
}


x86 assembly (clang, -O0):
<cpuinfo_has_e3dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80000001,%edi
call   1040 <cpuid_support_extended@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     115c <cpuinfo_has_e3dnow+0x3c>
mov    $0x80000001,%edi
call   1030 <cpuid_simple@plt>
and    $0x40000000,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuinfo_has_e3dnow>:
push   %rax
mov    $0x80000001,%edi
call   1040 <cpuid_support_extended@plt>
test   %rax,%rax
je     1142 <cpuinfo_has_e3dnow+0x22>
mov    $0x80000001,%edi
call   1030 <cpuid_simple@plt>
shr    $0x1e,%eax
and    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cpuinfo_has_e3dnow() {
%1 = call i64 @cpuid_support_extended(i32 -2147483647)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 @cpuid_simple(i32 -2147483647)
%5 = and i32 %4, 1073741824
%6 = icmp ne i32 %5, 0
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @cpuinfo_has_e3dnow() {
%1 = tail call i64 @cpuid_support_extended(i32 -2147483647)
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @cpuid_simple(i32 -2147483647)
%5 = lshr i32 %4, 30
%6 = and i32 %5, 1
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ parser_get_next_line_impl(int /*<<< orphan*/ *, char **,
                                             size_t *, unsigned int *);
__attribute__((unused)) ssize_t parser_get_next_line(FILE *fp, char **linep,
                                                     size_t *linecap,
                                                     unsigned *linenum) {
  return (parser_get_next_line_impl(fp, linep, linecap, linenum));
}


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

x86 assembly (clang, -O2):
<parser_get_next_line>:
jmp    1030 <parser_get_next_line_impl@plt>

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

LLVM IR (-O2):
define i32 @parser_get_next_line(i32* %0, i8** %1, i64* %2, i32* %3) {
%5 = tail call i32 @parser_get_next_line_impl(i32* %0, i8** %1, i64* %2, i32* %3)
ret i32 %5
}
unsigned int hash(char *string) {
  unsigned int index = 0;
  int count;
  for (count = 0; string[count] != '\0' && count < 15; count++)
    index = (index << 1) ^ string[count];
  return index & (16384 - 1);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     113a <hash+0x3a>
cmpl   $0xf,-0x10(%rbp)
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114a <hash+0x4a>
jmp    116f <hash+0x6f>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hash+0x16>
mov    -0xc(%rbp),%eax
and    $0x3fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%dl
test   %dl,%dl
je     1133 <hash+0x33>
xor    %ecx,%ecx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsbl %dl,%edx
add    %eax,%eax
xor    %edx,%eax
movzbl 0x1(%rdi,%rcx,1),%edx
test   %dl,%dl
je     112d <hash+0x2d>
lea    0x1(%rcx),%rsi
cmp    $0xe,%rcx
mov    %rsi,%rcx
jb     1110 <hash+0x10>
and    $0x3fff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = shl i32 %7, 1
%10 = xor i32 %9, %8
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
%15 = icmp ult i64 %5, 14
%16 = select i1 %14, i1 %15, i1 false
br i1 %16, label %4, label %17
17: ; preds = %4
%18 = and i32 %10, 16383
br label %19
19: ; preds = %17, %1
%20 = phi i32 [ 0, %1 ], [ %18, %17 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *s) {
  fprintf(stderr, "%s\n", s);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void CyBle_ScpsInit(void) {}


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

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

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

LLVM IR (-O2):
define void @CyBle_ScpsInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char const *, char const);
char *strpbrk(const char *s, const char *charset) {
  for (; *s != '\0'; s++)
    if (strchr(charset, *s) != NULL)
      return (char *)s;
  return NULL;
}


x86 assembly (clang, -O0):
<strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116d <strpbrk+0x5d>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1157 <strpbrk+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <strpbrk+0x65>
jmp    115c <strpbrk+0x4c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <strpbrk+0x10>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpbrk>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     113c <strpbrk+0x2c>
mov    %rsi,%r14
mov    %rdi,%rbx
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
jne    113e <strpbrk+0x2e>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strpbrk+0x10>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strpbrk(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = tail call i32* @strchr(i8* %1, i8 signext %6)
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %7, %5 ]
ret i8* %15
}
/* Variables and functions */
scalar_t__ suffix(char const *, char *);
int utf_8_locale(const char *locale) {
  if (!locale)
    return 0;
  return suffix(locale, ".utf8") || suffix(locale, ".UTF-8");
}


x86 assembly (clang, -O0):
<utf_8_locale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <utf_8_locale+0x23>
movl   $0x0,-0x4(%rbp)
jmp    117a <utf_8_locale+0x6a>
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <suffix@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    116f <utf_8_locale+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1030 <suffix@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf_8_locale>:
push   %rbx
test   %rdi,%rdi
je     1134 <utf_8_locale+0x24>
mov    %rdi,%rbx
lea    0xee0(%rip),%rsi
call   1030 <suffix@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <utf_8_locale+0x28>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <suffix@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c".utf8\00"
@.str.1 = [7 x i8] c".UTF-8\00"
define i32 @utf_8_locale(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %18
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @suffix(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = call i64 @suffix(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ true, %7 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [6 x i8] c".utf8\00"
@.str.1 = [7 x i8] c".UTF-8\00"
define i32 @utf_8_locale(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @suffix(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 @suffix(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %3, %6, %1
%11 = phi i32 [ 0, %1 ], [ 1, %3 ], [ %9, %6 ]
ret i32 %11
}
void test3() { printf("%d", "s"); }


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

x86 assembly (clang, -O2):
<test3>:
lea    0xee9(%rip),%rdi
lea    0xee5(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"s\00"
define void @test3() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}