xunge/DecIR huggingface dataset:
void midi_ctrl_init(void) {}


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

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

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

LLVM IR (-O2):
define void @midi_ctrl_init() {
ret void
}
int _gettimeofday(struct timeval *tv, struct timezone *tz) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EVP_MD_CTX_md_data(int /*<<< orphan*/ *);
int SHA1_Update(int /*<<< orphan*/, void const *, size_t);
int update(EVP_MD_CTX *ctx, const void *data, size_t count) {
  return SHA1_Update(EVP_MD_CTX_md_data(ctx), data, count);
}


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

x86 assembly (clang, -O2):
<update>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <EVP_MD_CTX_md_data@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <SHA1_Update@plt>

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

LLVM IR (-O2):
define i32 @update(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @EVP_MD_CTX_md_data(i32* %0)
%5 = tail call i32 @SHA1_Update(i32 %4, i8* %1, i64 %2)
ret i32 %5
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_sha384(int akm) {
  return !!(akm & (BIT(17) | BIT(24) | BIT(19) | BIT(21)));
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_sha384>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x11,%edi
call   1030 <BIT@plt>
mov    %eax,-0x14(%rbp)
mov    $0x18,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x13,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x15,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_sha384>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x11,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x18,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    $0x13,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x15,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
or     %ebx,%eax
xor    %ecx,%ecx
test   %r14d,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_sha384(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 17)
%5 = call i32 @BIT(i32 24)
%6 = or i32 %4, %5
%7 = call i32 @BIT(i32 19)
%8 = or i32 %6, %7
%9 = call i32 @BIT(i32 21)
%10 = or i32 %8, %9
%11 = and i32 %3, %10
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_sha384(i32 %0) {
%2 = tail call i32 @BIT(i32 17)
%3 = tail call i32 @BIT(i32 24)
%4 = or i32 %3, %2
%5 = tail call i32 @BIT(i32 19)
%6 = or i32 %4, %5
%7 = tail call i32 @BIT(i32 21)
%8 = or i32 %6, %7
%9 = and i32 %8, %0
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
int acpi_lid_open(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @acpi_lid_open() {
ret i32 1
}

LLVM IR (-O2):
define i32 @acpi_lid_open() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, char *, int);
void write_str(unsigned char *data, int offset, char *buffer, int buffer_len) {
  memcpy(data + offset, buffer, buffer_len);
}


x86 assembly (clang, -O0):
<write_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_str>:
movslq %esi,%rax
add    %rax,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @write_str(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i32 @memcpy(i8* %6, i8* %2, i32 %3)
ret void
}
/* Variables and functions */
short udivmodhi4(short, short, int);
short __umodhi3(short a, short b) { return udivmodhi4(a, b, 1); }


x86 assembly (clang, -O0):
<__umodhi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    $0x1,%edx
movswl %ax,%edi
movswl -0x4(%rbp),%esi
call   1030 <udivmodhi4@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__umodhi3>:
mov    $0x1,%edx
jmp    1030 <udivmodhi4@plt>

LLVM IR (-O0):
define signext i16 @__umodhi3(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 = load i16, i16* %4
%7 = call signext i16 @udivmodhi4(i16 signext %5, i16 signext %6, i32 1)
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @__umodhi3(i16 signext %0, i16 signext %1) {
%3 = tail call signext i16 @udivmodhi4(i16 signext %0, i16 signext %1, i32 1)
ret i16 %3
}
const char *Format_Name(void) { return "Format"; }


x86 assembly (clang, -O0):
<Format_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Format_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Format\00"
define i8* @Format_Name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"Format\00"
define i8* @Format_Name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct sip_msg {
  int dummy;
};

/* Variables and functions */
int sl_reply_error(struct sip_msg *);
int w_sl_reply_error(struct sip_msg *msg, char *str, char *str2) {
  return sl_reply_error(msg);
}


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

x86 assembly (clang, -O2):
<w_sl_reply_error>:
jmp    1030 <sl_reply_error@plt>

LLVM IR (-O0):
%struct.sip_msg = type { i32 }
define i32 @w_sl_reply_error(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sip_msg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sip_msg* %0, %struct.sip_msg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.sip_msg*, %struct.sip_msg** %4
%8 = call i32 @sl_reply_error(%struct.sip_msg* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.sip_msg = type { i32 }
define i32 @w_sl_reply_error(%struct.sip_msg* %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @sl_reply_error(%struct.sip_msg* %0)
ret i32 %4
}
int copy(char a[], char b[]) {
  int i;
  i = 0;
  for (i = 0; a[i] > 0; i = i + 1)
    b[i] = a[i];
  b[i] = 0;
  return i;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jle    1153 <copy+0x53>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <copy+0x1a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
jle    1120 <copy+0x20>
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rsi,%rax,1)
movzbl 0x1(%rdi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jg     1110 <copy+0x10>
mov    %eax,%ecx
movb   $0x0,(%rsi,%rcx,1)
ret

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

LLVM IR (-O2):
define i32 @copy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp sgt i8 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp sgt i8 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %5
%14 = trunc i64 %9 to i32
br label %15
15: ; preds = %13, %2
%16 = phi i32 [ 0, %2 ], [ %14, %13 ]
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %1, i64 %17
store i8 0, i8* %18
ret i32 %16
}
/* Variables and functions */
int strcmp(char *, char *);
int string_test(const void *a, const void *b) {
  if (!a || !b)
    return (-1);
  return (strcmp((char *)a, (char *)b));
}


x86 assembly (clang, -O0):
<string_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <string_test+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <string_test+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1152 <string_test+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_test>:
test   %rdi,%rdi
je     111f <string_test+0xf>
test   %rsi,%rsi
je     111f <string_test+0xf>
jmp    1030 <strcmp@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @string_test(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
void XIconifyWindow() {}


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

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

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

LLVM IR (-O2):
define void @XIconifyWindow() {
ret void
}
/* Variables and functions */
int dup2(int, int);
int duplicate_handle_2(int old_handle, int new_handle) {
  return dup2(old_handle, new_handle);
}


x86 assembly (clang, -O0):
<duplicate_handle_2>:
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 <dup2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duplicate_handle_2>:
jmp    1030 <dup2@plt>

LLVM IR (-O0):
define i32 @duplicate_handle_2(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 @dup2(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @duplicate_handle_2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
ret i32 %3
}
void SteamAPI_ISteamMatchmakingServers_CancelQuery(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmakingServers_CancelQuery>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingServers_CancelQuery = [46 x i8] c"SteamAPI_ISteamMatchmakingServers_CancelQuery\00"
define void @SteamAPI_ISteamMatchmakingServers_CancelQuery(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @__func__.SteamAPI_ISteamMatchmakingServers_CancelQuery, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingServers_CancelQuery = [46 x i8] c"SteamAPI_ISteamMatchmakingServers_CancelQuery\00"
define void @SteamAPI_ISteamMatchmakingServers_CancelQuery(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @__func__.SteamAPI_ISteamMatchmakingServers_CancelQuery, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double ceil(double);
double test3(double x) { return ceil(x); }


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

x86 assembly (clang, -O2):
<test3>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @test3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.ceil.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @test3(double %0) {
%2 = tail call double @llvm.ceil.f64(double %0)
ret double %2
}
int hashCode(unsigned key) { return key % 1000000; }


x86 assembly (clang, -O0):
<hashCode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashCode>:
mov    %edi,%eax
mov    %edi,%ecx
imul   $0x431bde83,%rcx,%rcx
shr    $0x32,%rcx
imul   $0xf4240,%ecx,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hashCode(i32 %0) {
%2 = urem i32 %0, 1000000
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ XCreateWindowEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XCreateWindowEvent(void) {
  XCreateWindowEvent *_p =
      (XCreateWindowEvent *)malloc(sizeof(XCreateWindowEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XCreateWindowEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XCreateWindowEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XCreateWindowEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XCreateWindowEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XCreateWindowEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XCreateWindowEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int /*<<< orphan*/ map2check_non_det_int();
uint map2check_non_det_uint() { return (uint)map2check_non_det_int(); }


x86 assembly (clang, -O0):
<map2check_non_det_uint>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <map2check_non_det_int@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @map2check_non_det_uint() {
%1 = call i32 (...) @map2check_non_det_int()
ret i32 %1
}

LLVM IR (-O2):
define i32 @map2check_non_det_uint() {
%1 = tail call i32 (...) @map2check_non_det_int()
ret i32 %1
}
void test_ar_2_SHRT(void *d, short n) {
  if (0x7fff - 2 <= n && n <= 0x7fff - 1)
    n = 0x7fff - 3;
  __builtin_memset(d, 0, n);
}


x86 assembly (clang, -O0):
<test_ar_2_SHRT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%ecx
mov    $0x7ffd,%eax
cmp    %ecx,%eax
jg     1149 <test_ar_2_SHRT+0x39>
movswl -0xa(%rbp),%eax
cmp    $0x7ffe,%eax
jg     1149 <test_ar_2_SHRT+0x39>
movw   $0x7ffc,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movswq -0xa(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ar_2_SHRT>:
lea    -0x7ffd(%rsi),%eax
cmp    $0x2,%ax
mov    $0x7ffc,%eax
cmovae %esi,%eax
movslq %eax,%rdx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @test_ar_2_SHRT(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = icmp sle i32 32765, %6
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i16, i16* %4
%10 = sext i16 %9 to i32
%11 = icmp sle i32 %10, 32766
br i1 %11, label %12, label %13
12: ; preds = %8
store i16 32764, i16* %4
br label %13
13: ; preds = %12, %8, %2
%14 = load i8*, i8** %3
%15 = load i16, i16* %4
%16 = sext i16 %15 to i64
ret void
}

LLVM IR (-O2):
define void @test_ar_2_SHRT(i8* nocapture writeonly %0, i16 signext %1) {
%3 = add i16 %1, -32765
%4 = icmp ult i16 %3, 2
%5 = select i1 %4, i16 32764, i16 %1
%6 = sext i16 %5 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %6, i1 false)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read_msg(int, int /*<<< orphan*/ *);
ssize_t read_msg_length(void) { return read_msg(-1, NULL); }


x86 assembly (clang, -O0):
<read_msg_length>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <read_msg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_msg_length>:
mov    $0xffffffff,%edi
xor    %esi,%esi
jmp    1030 <read_msg@plt>

LLVM IR (-O0):
define i32 @read_msg_length() {
%1 = call i32 @read_msg(i32 -1, i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @read_msg_length() {
%1 = tail call i32 @read_msg(i32 -1, i32* null)
ret i32 %1
}
void restore_xattrs() {}


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

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

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

LLVM IR (-O2):
define void @restore_xattrs() {
ret void
}
int getpid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getpid() {
ret i32 0
}
int isPrime(int x, int knownPrimes[], int numberOfKnownPrimes) {
  int ret = 1;
  int i;
  for (i = 0; i < numberOfKnownPrimes; i++) {
    if (x % knownPrimes[i] == 0) {
      ret = 0;
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115f <isPrime+0x5f>
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rsi
cltd
idivl  (%rcx,%rsi,4)
cmp    $0x0,%edx
jne    114c <isPrime+0x4c>
movl   $0x0,-0x18(%rbp)
jmp    115f <isPrime+0x5f>
jmp    1151 <isPrime+0x51>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111c <isPrime+0x1c>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
mov    $0x1,%r8d
test   %edx,%edx
jle    1134 <isPrime+0x34>
mov    %edi,%r9d
mov    %edx,%ecx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r9d,%eax
cltd
idivl  (%rsi,%rdi,4)
test   %edx,%edx
je     1138 <isPrime+0x38>
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    1120 <isPrime+0x20>
mov    %r8d,%eax
ret
xor    %r8d,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %16
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %15, %6
br i1 %8, label %16, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %15, %7 ]
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = srem i32 %0, %12
%14 = icmp eq i32 %13, 0
%15 = add nuw nsw i64 %10, 1
br i1 %14, label %16, label %7
16: ; preds = %7, %9, %3
%17 = phi i32 [ 1, %3 ], [ 0, %9 ], [ 1, %7 ]
ret i32 %17
}
void InitKeymaps(void) {}


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

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

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

LLVM IR (-O2):
define void @InitKeymaps() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Probando...\n..1\n...2\n....3\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [27 x i8] c"Probando...\0A..1\0A...2\0A....3\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void foo_2_2_1_2_1_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_1_2_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xcb() {
  Assert_real((iscntrl(203) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1020, ("iscntrl should be 0 for 0xcb"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xcb\00"
define void @t_iscntrl_0xcb() {
%1 = tail call i64 @iscntrl(i32 203)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int f2() {
  int a = 2;
  printf("f2 %d\n", a);
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"f2 %d\0A\00"
define i32 @f2() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 undef
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMREB_set(void) { return U_WMRCORENONE_set("U_WMREB"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMREB\00"
define i8* @U_WMREB_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMREB\00"
define i8* @U_WMREB_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int);
void die(char *msg) {
  error(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @error(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @die(i8* %0) {
%2 = tail call i32 @error(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void(libclut_model_yuv_to_ydbdr)(double u, double v, double *db, double *dr) {
  do {
    *(db) = 3069 * (u) / 1000;
    *(dr) = -2169 * (v) / 1000;
  } while (0);
}


x86 assembly (clang, -O0):
<libclut_model_yuv_to_ydbdr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xef2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xec9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<libclut_model_yuv_to_ydbdr>:
mulsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rdi)
mulsd  0xef0(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi)
ret

LLVM IR (-O0):
define void @libclut_model_yuv_to_ydbdr(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
br label %9
9: ; preds = %4
%10 = load double, double* %5
%11 = fmul double 3.069000e+03, %10
%12 = fdiv double %11, 1.000000e+03
%13 = load double*, double** %7
store double %12, double* %13
%14 = load double, double* %6
%15 = fmul double -2.169000e+03, %14
%16 = fdiv double %15, 1.000000e+03
%17 = load double*, double** %8
store double %16, double* %17
br label %18
18: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @libclut_model_yuv_to_ydbdr(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %0, 3.069000e+03
%6 = fdiv double %5, 1.000000e+03
store double %6, double* %2
%7 = fmul double %1, -2.169000e+03
%8 = fdiv double %7, 1.000000e+03
store double %8, double* %3
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ test_add_check();
scalar_t__ test_create_delete();
int main(void) {
  if (test_create_delete() != 0 || test_add_check() != 0)
    return EXIT_FAILURE;
  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 <test_create_delete@plt>
cmp    $0x0,%rax
jne    1151 <main+0x31>
mov    $0x0,%al
call   1040 <test_add_check@plt>
cmp    $0x0,%rax
je     1162 <main+0x42>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <main+0x4e>
mov    0x2e6f(%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   %rax
xor    %eax,%eax
call   1030 <test_create_delete@plt>
test   %rax,%rax
jne    1142 <main+0x22>
xor    %eax,%eax
call   1040 <test_add_check@plt>
test   %rax,%rax
jne    1142 <main+0x22>
mov    0x2e98(%rip),%rax
jmp    1149 <main+0x29>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_create_delete()
%3 = icmp ne i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call i64 (...) @test_add_check()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4, %0
%8 = load i32, i32* @EXIT_FAILURE
store i32 %8, i32* %1
br label %11
9: ; preds = %4
%10 = load i32, i32* @EXIT_SUCCESS
store i32 %10, i32* %1
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @test_create_delete()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @test_add_check()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32* @EXIT_SUCCESS, i32* @EXIT_FAILURE
br label %7
7: ; preds = %3, %0
%8 = phi i32* [ @EXIT_FAILURE, %0 ], [ %6, %3 ]
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ RF_reset();
int /*<<< orphan*/ enable_interrupt();
int /*<<< orphan*/ init_ZIGBEE_basic();
int /*<<< orphan*/ set_CCA_mode(int);
int /*<<< orphan*/ set_RSSI_mode(int);
int /*<<< orphan*/ set_channel(int);
void init_ZIGBEE_nonbeacon() {
  init_ZIGBEE_basic();
  set_CCA_mode(1);
  set_RSSI_mode(2);
  enable_interrupt();
  set_channel(11);
  RF_reset();
}


x86 assembly (clang, -O0):
<init_ZIGBEE_nonbeacon>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <init_ZIGBEE_basic@plt>
mov    $0x1,%edi
call   1030 <set_CCA_mode@plt>
mov    $0x2,%edi
call   1070 <set_RSSI_mode@plt>
mov    $0x0,%al
call   1050 <enable_interrupt@plt>
mov    $0xb,%edi
call   1080 <set_channel@plt>
mov    $0x0,%al
call   1040 <RF_reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_ZIGBEE_nonbeacon>:
push   %rax
xor    %eax,%eax
call   1060 <init_ZIGBEE_basic@plt>
mov    $0x1,%edi
call   1030 <set_CCA_mode@plt>
mov    $0x2,%edi
call   1070 <set_RSSI_mode@plt>
xor    %eax,%eax
call   1050 <enable_interrupt@plt>
mov    $0xb,%edi
call   1080 <set_channel@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <RF_reset@plt>

LLVM IR (-O0):
define void @init_ZIGBEE_nonbeacon() {
%1 = call i32 (...) @init_ZIGBEE_basic()
%2 = call i32 @set_CCA_mode(i32 1)
%3 = call i32 @set_RSSI_mode(i32 2)
%4 = call i32 (...) @enable_interrupt()
%5 = call i32 @set_channel(i32 11)
%6 = call i32 (...) @RF_reset()
ret void
}

LLVM IR (-O2):
define void @init_ZIGBEE_nonbeacon() {
%1 = tail call i32 (...) @init_ZIGBEE_basic()
%2 = tail call i32 @set_CCA_mode(i32 1)
%3 = tail call i32 @set_RSSI_mode(i32 2)
%4 = tail call i32 (...) @enable_interrupt()
%5 = tail call i32 @set_channel(i32 11)
%6 = tail call i32 (...) @RF_reset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ nw_span(int);
void nw_span_test(void **state) {
  assert_int_equal(nw_span(0x80ul), 0x0102040810204080ul ^ 0x80ul);
}


x86 assembly (clang, -O0):
<nw_span_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x80,%edi
call   1040 <nw_span@plt>
mov    %eax,%edi
mov    $0x10204000,%esi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nw_span_test>:
push   %rax
mov    $0x80,%edi
call   1040 <nw_span@plt>
mov    %eax,%edi
mov    $0x10204000,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @nw_span_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @nw_span(i32 128)
%4 = call i32 @assert_int_equal(i32 %3, i32 270548992)
ret void
}

LLVM IR (-O2):
define void @nw_span_test(i8** nocapture readnone %0) {
%2 = tail call i32 @nw_span(i32 128)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 270548992)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *bin) {
  fprintf(stderr, "Usage: %s [-c] <path>\n", bin);
  exit(1);
}


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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s [-c] <path>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
__attribute__((weak, section(".after_vectors"))) void NMI_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<NMI_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <NMI_Handler+0x9>
jmp    1109 <NMI_Handler+0x9>

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

LLVM IR (-O0):
define weak void @NMI_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @NMI_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_CIPHER_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ *);
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) {
  EVP_CIPHER_CTX_cleanup(ctx);
  OPENSSL_free(ctx);
}


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

x86 assembly (clang, -O2):
<EVP_CIPHER_CTX_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <EVP_CIPHER_CTX_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <OPENSSL_free@plt>

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_free(i32* %0) {
%2 = tail call i32 @EVP_CIPHER_CTX_cleanup(i32* %0)
%3 = tail call i32 @OPENSSL_free(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int rstreq(const char *s1, const char *s2) { return (strcmp(s1, s2) == 0); }


x86 assembly (clang, -O0):
<rstreq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rstreq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @rstreq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Rfree(void *, char *);
void Test5(void) {
  Rfree(((void *)0x12345678),
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/"
        "rmalloc/rtest.c"
        ":"
        "258");
}


x86 assembly (clang, -O0):
<Test5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12345678,%edi
lea    0xee0(%rip),%rsi
call   1030 <Rfree@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Test5>:
lea    0xee9(%rip),%rsi
mov    $0x12345678,%edi
jmp    1030 <Rfree@plt>

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/rmalloc/rtest.c:258\00"
define void @Test5() {
%1 = call i32 @Rfree(i8* inttoptr (i64 305419896 to i8*), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Tathar/roclick/refs/heads/master/src/rmalloc/rtest.c:258\00"
define void @Test5() {
%1 = tail call i32 @Rfree(i8* inttoptr (i64 305419896 to i8*), i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
ssize_t flu_index(const char *s, size_t off, char c) {
  for (size_t i = off;; ++i) {
    char cc = s[i];
    if (cc == '\0')
      break;
    if (cc == c)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<flu_index>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x0,%eax
jne    1139 <flu_index+0x39>
jmp    116c <flu_index+0x6c>
movsbl -0x29(%rbp),%eax
movsbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
jne    1156 <flu_index+0x56>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <flu_index+0x74>
jmp    115b <flu_index+0x5b>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1119 <flu_index+0x19>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flu_index>:
movzbl (%rdi,%rsi,1),%eax
cmp    %dl,%al
cmove  %rsi,%rcx
test   %al,%al
je     1116 <flu_index+0x16>
add    $0x1,%rsi
cmp    %dl,%al
jne    1100 <flu_index>
cmp    $0x1,%al
sbb    %rax,%rax
or     %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @flu_index(i8* nocapture %0, i64 %1, i8 signext %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ %1, %3 ], [ %13, %4 ]
%6 = phi i64 [ undef, %3 ], [ %11, %4 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %5
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
%10 = icmp eq i8 %8, %2
%11 = select i1 %10, i64 %5, i64 %6
%12 = or i1 %9, %10
%13 = add i64 %5, 1
br i1 %12, label %14, label %4
14: ; preds = %4
%15 = select i1 %9, i64 -1, i64 %11
ret i64 %15
}
/* Variables and functions */
int de_feat_get_num_chns(unsigned int);
int bsp_disp_feat_get_num_channels(unsigned int disp) {
  return de_feat_get_num_chns(disp);
}


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

x86 assembly (clang, -O2):
<bsp_disp_feat_get_num_channels>:
jmp    1030 <de_feat_get_num_chns@plt>

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

LLVM IR (-O2):
define i32 @bsp_disp_feat_get_num_channels(i32 %0) {
%2 = tail call i32 @de_feat_get_num_chns(i32 %0)
ret i32 %2
}
void TextSetEncoding(char *encoding) {}


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

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

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

LLVM IR (-O2):
define void @TextSetEncoding(i8* nocapture %0) {
ret void
}