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


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

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

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

LLVM IR (-O2):
define void @gtk_label_get_type() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=401 REPO_URL=heads/android-4.4 "
         "REVISION=-26a7b89 CHANGED_REVISION=26a7b89 CHANGE_DATE=2015-05-10 "
         "13:43:09 +0530 BUILD_DATE=Sun May 10 14:00:00 IST 2015 BUILD=debug "
         "TARGET_PLATFORM= MALI_PLATFORM= KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=24 USING_UMP= USING_PROFILING= "
         "USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 "
         "USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1";
}


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

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

LLVM IR (-O0):
@.str = [401 x i8] c"malidrv: API_VERSION=401 REPO_URL=heads/android-4.4 REVISION=-26a7b89 CHANGED_REVISION=26a7b89 CHANGE_DATE=2015-05-10 13:43:09 +0530 BUILD_DATE=Sun May 10 14:00:00 IST 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=24 USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [401 x i8] c"malidrv: API_VERSION=401 REPO_URL=heads/android-4.4 REVISION=-26a7b89 CHANGED_REVISION=26a7b89 CHANGE_DATE=2015-05-10 13:43:09 +0530 BUILD_DATE=Sun May 10 14:00:00 IST 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=24 USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ bios_printf(int, char *);
void int18_panic_msg() { bios_printf((2 | 4 | 1), "INT18: BOOT FAILURE\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"INT18: BOOT FAILURE\0A\00"
define void @int18_panic_msg() {
%1 = call i32 @bios_printf(i32 7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"INT18: BOOT FAILURE\0A\00"
define void @int18_panic_msg() {
%1 = tail call i32 @bios_printf(i32 7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ subsets_sum(int, int *, int);
int main(int argc, char *argv[]) {
  int w[] = {1, 2, 3, 4, 5, 6, 7};
  int W = 6;
  subsets_sum(7, w, W);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed2(%rip),%eax
mov    %eax,-0x18(%rbp)
movl   $0x6,-0x34(%rbp)
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    $0x7,%edi
call   1030 <subsets_sum@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x7,%edi
mov    $0x6,%edx
call   1030 <subsets_sum@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.w = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [7 x i32]
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast [7 x i32]* %5 to i8*
store i32 6, i32* %6
%8 = getelementptr inbounds [7 x i32], [7 x i32]* %5, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 @subsets_sum(i32 7, i32* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.w = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [7 x i32]
%4 = bitcast [7 x i32]* %3 to i8*
%5 = getelementptr inbounds [7 x i32], [7 x i32]* %3, i64 0, i64 0
%6 = call i32 @subsets_sum(i32 7, i32* %5, i32 6)
ret i32 0
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t abs_fun_int8_t(int8_t a) {
  int8_t mask = a >> 7;
  return (a + mask) ^ mask;
}


x86 assembly (clang, -O0):
<abs_fun_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_fun_int8_t>:
mov    %edi,%ecx
sar    $0x7,%ecx
lea    (%rdi,%rcx,1),%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @abs_fun_int8_t(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 7
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = xor i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @abs_fun_int8_t(i32 %0) {
%2 = ashr i32 %0, 7
%3 = add nsw i32 %2, %0
%4 = xor i32 %3, %2
ret i32 %4
}
int tls13_server_message_hash_recv(struct tls13_ctx *ctx) { return 1; }


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

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

LLVM IR (-O0):
%struct.tls13_ctx = type opaque
define i32 @tls13_server_message_hash_recv(%struct.tls13_ctx* %0) {
%2 = alloca %struct.tls13_ctx*
store %struct.tls13_ctx* %0, %struct.tls13_ctx** %2
ret i32 1
}

LLVM IR (-O2):
%struct.tls13_ctx = type opaque
define i32 @tls13_server_message_hash_recv(%struct.tls13_ctx* nocapture readnone %0) {
ret i32 1
}
void UTF8_getc(void) {}


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

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

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

LLVM IR (-O2):
define void @UTF8_getc() {
ret void
}
double Sign(double X) { return X >= 0. ? 1.0 : -1.0; }


x86 assembly (clang, -O0):
<Sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeea(%rip),%xmm3
movsd  0xeea(%rip),%xmm2
xorps  %xmm0,%xmm0
cmplesd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sign>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @Sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 1.000000e+00, double -1.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @Sign(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e+00, double -1.000000e+00
ret double %3
}
/* Variables and functions */
bool isempty(const char *s) { return s == NULL || s[0] == '\0'; }


x86 assembly (clang, -O0):
<isempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <isempty+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isempty>:
test   %rdi,%rdi
je     110e <isempty+0xe>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isempty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br label %11
11: ; preds = %5, %1
%12 = phi i1 [ true, %1 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @isempty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ LCD_FillRect(int, int, int, int, int);
void _gui_draw_background(int x, int y, int w, int h) {
  LCD_FillRect(x, y, w, h, 0x0);
}


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

x86 assembly (clang, -O2):
<_gui_draw_background>:
xor    %r8d,%r8d
jmp    1030 <LCD_FillRect@plt>

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

LLVM IR (-O2):
define void @_gui_draw_background(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @LCD_FillRect(i32 %0, i32 %1, i32 %2, i32 %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sq_iterator_impl(void (*)(int *));
void sq_iterator(void (*fn)(int *x)) { sq_iterator_impl(fn); }


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

x86 assembly (clang, -O2):
<sq_iterator>:
jmp    1030 <sq_iterator_impl@plt>

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

LLVM IR (-O2):
define void @sq_iterator(void (i32*)* %0) {
%2 = tail call i32 @sq_iterator_impl(void (i32*)* %0)
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main(void) { printf("EOF: %i\n", EOF); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"EOF: %i\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"EOF: %i\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isspace(int);
bool isstring(int chr) {
  return chr && !isspace(chr) && chr != '=' && chr != '#';
}


x86 assembly (clang, -O0):
<isstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115b <isstring+0x4b>
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    115b <isstring+0x4b>
xor    %eax,%eax
cmpl   $0x3d,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115b <isstring+0x4b>
cmpl   $0x23,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isstring>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
test   %edi,%edi
je     1131 <isstring+0x21>
mov    %edi,%ebp
call   1030 <isspace@plt>
cmp    $0x3d,%ebp
je     1131 <isstring+0x21>
test   %eax,%eax
jne    1131 <isstring+0x21>
xor    %ebx,%ebx
cmp    $0x23,%ebp
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isstring(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @isspace(i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 61
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 35
br label %15
15: ; preds = %12, %9, %5, %1
%16 = phi i1 [ false, %9 ], [ false, %5 ], [ false, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @isstring(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @isspace(i32 %0)
%5 = icmp eq i32 %4, 0
%6 = icmp ne i32 %0, 61
%7 = and i1 %6, %5
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = icmp ne i32 %0, 35
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %8, %3, %1
%12 = phi i32 [ 0, %3 ], [ 0, %1 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
char *nt_malloc(scalar_t__);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *nt_concat(char *s1, char *s2) {
  char *result = nt_malloc(strlen(s1) + strlen(s2) + 1);
  strcpy(result, s1);
  strcat(result, s2);
  return result;
}


x86 assembly (clang, -O0):
<nt_concat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1050 <nt_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nt_concat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x1,%rdi
call   1050 <nt_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @nt_concat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 1
%12 = call i8* @nt_malloc(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %5
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @nt_concat(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i8* @nt_malloc(i64 %6)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
%9 = tail call i32 @strcat(i8* %7, i8* %1)
ret i8* %7
}
int test_imm_B1uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xB1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B1uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 760209211392
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEifnull(int, int /*<<< orphan*/ *);
void code_ifnull(int label) { appendCODE(makeCODEifnull(label, NULL)); }


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

x86 assembly (clang, -O2):
<code_ifnull>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEifnull@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_ifnull(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEifnull(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_ifnull(i32 %0) {
%2 = tail call i32 @makeCODEifnull(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
__attribute__((visibility("hidden"))) int get_return_code(void) { return 1; }


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

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

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

LLVM IR (-O2):
define hidden i32 @get_return_code() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
FILE *openFileToAppend(const char *name) {
  FILE *file = fopen(name, "a");
  if (!file)
    fprintf(stderr, "Problem with file '%s' during opening to append.\n", name);
  return file;
}


x86 assembly (clang, -O0):
<openFileToAppend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1164 <openFileToAppend+0x44>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFileToAppend>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1153 <openFileToAppend+0x33>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
mov    %r14,%rdx
call   1030 <fprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@stderr = global i32 0
@.str.1 = [50 x i8] c"Problem with file '%s' during opening to append.\0A\00"
define i32* @openFileToAppend(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %1
%13 = load i32*, i32** %3
ret i32* %13
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@stderr = global i32 0
@.str.1 = [50 x i8] c"Problem with file '%s' during opening to append.\0A\00"
define noalias i32* @openFileToAppend(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %4, %1
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  if (num > 100)
    printf("YES");
  if (num >= 0 && num <= 100)
    printf("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x8(%rbp)
jle    1155 <main+0x35>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1175 <main+0x55>
cmpl   $0x64,-0x8(%rbp)
jg     1175 <main+0x55>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x65,%eax
jl     114b <main+0x2b>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x64,%eax
ja     115c <main+0x3c>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 100
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 100
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %11, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 100
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %1
br label %9
9: ; preds = %6, %0
%10 = phi i32 [ %8, %6 ], [ %4, %0 ]
%11 = icmp ult i32 %10, 101
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
ret i32 0
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRDC_set(void) { return U_WMRCORENONE_set("U_WMRDC"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRDC\00"
define i8* @U_WMRDC_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_WMRDC\00"
define i8* @U_WMRDC_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
}
int main() {
  union {
    int a;
    char b;
  } c;
  c.a = 1;
  return (c.b == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Type definitions */
struct tipc_msg {
  int dummy;
};

/* Variables and functions */
int msg_bits(struct tipc_msg *, int /*<<< orphan*/, int, int);
int msg_dest_droppable(struct tipc_msg *m) { return msg_bits(m, 0, 19, 1); }


x86 assembly (clang, -O0):
<msg_dest_droppable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x13,%edx
mov    $0x1,%ecx
call   1030 <msg_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_dest_droppable>:
xor    %esi,%esi
mov    $0x13,%edx
mov    $0x1,%ecx
jmp    1030 <msg_bits@plt>

LLVM IR (-O0):
%struct.tipc_msg = type { i32 }
define i32 @msg_dest_droppable(%struct.tipc_msg* %0) {
%2 = alloca %struct.tipc_msg*
store %struct.tipc_msg* %0, %struct.tipc_msg** %2
%3 = load %struct.tipc_msg*, %struct.tipc_msg** %2
%4 = call i32 @msg_bits(%struct.tipc_msg* %3, i32 0, i32 19, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.tipc_msg = type { i32 }
define i32 @msg_dest_droppable(%struct.tipc_msg* %0) {
%2 = tail call i32 @msg_bits(%struct.tipc_msg* %0, i32 0, i32 19, i32 1)
ret i32 %2
}
long cmp(const char *a, const char *b) {
  if (a < b)
    return -1;
  if (a > b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1127 <cmp+0x27>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    114a <cmp+0x4a>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1142 <cmp+0x42>
movq   $0x1,-0x8(%rbp)
jmp    114a <cmp+0x4a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
seta   %cl
mov    $0xffffffffffffffff,%rax
cmovae %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @cmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ugt i8* %0, %1
%5 = zext i1 %4 to i64
%6 = select i1 %3, i64 -1, i64 %5
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ffpmsg(char *);
int compress2file_from_mem(char *inmemptr, size_t inmemsize, FILE *outdiskfile,
                           size_t *filesize, int *status) {
  if (*status > 0)
    return (*status);
  ffpmsg("This non-GNU version of CFITSIO does not support compressed files");
  return (*status = 413);
}


x86 assembly (clang, -O0):
<compress2file_from_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1147 <compress2file_from_mem+0x37>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <compress2file_from_mem+0x54>
lea    0xeb2(%rip),%rdi
call   1030 <ffpmsg@plt>
mov    -0x30(%rbp),%rax
movl   $0x19d,(%rax)
movl   $0x19d,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress2file_from_mem>:
push   %rbx
mov    (%r8),%eax
test   %eax,%eax
jle    111a <compress2file_from_mem+0xa>
pop    %rbx
ret
mov    %r8,%rbx
lea    0xedc(%rip),%rdi
call   1030 <ffpmsg@plt>
movl   $0x19d,(%rbx)
mov    $0x19d,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [66 x i8] c"This non-GNU version of CFITSIO does not support compressed files\00"
define i32 @compress2file_from_mem(i8* %0, i64 %1, i32* %2, i64* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32*
%10 = alloca i64*
%11 = alloca i32*
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32* %2, i32** %9
store i64* %3, i64** %10
store i32* %4, i32** %11
%12 = load i32*, i32** %11
%13 = load i32, i32* %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %5
%16 = load i32*, i32** %11
%17 = load i32, i32* %16
store i32 %17, i32* %6
br label %21
18: ; preds = %5
%19 = call i32 @ffpmsg(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%20 = load i32*, i32** %11
store i32 413, i32* %20
store i32 413, i32* %6
br label %21
21: ; preds = %18, %15
%22 = load i32, i32* %6
ret i32 %22
}

LLVM IR (-O2):
@.str = [66 x i8] c"This non-GNU version of CFITSIO does not support compressed files\00"
define i32 @compress2file_from_mem(i8* nocapture readnone %0, i64 %1, i32* nocapture readnone %2, i64* nocapture readnone %3, i32* nocapture %4) {
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @ffpmsg(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
store i32 413, i32* %4
br label %10
10: ; preds = %5, %8
%11 = phi i32 [ 413, %8 ], [ %6, %5 ]
ret i32 %11
}
int test_imm_DAint16_reg(short val) {
  return ((val) & (0xDA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DAint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xda,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DAint16_reg>:
test   $0xda,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DAint16_reg(i16 signext %0) {
%2 = and i16 %0, 218
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int getpagesize();
__attribute__((__weak__, __always___)) int softboundcets_getpagesize(void) {
  return getpagesize();
}


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

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

LLVM IR (-O0):
define weak i32 @softboundcets_getpagesize() {
%1 = call i32 (...) @getpagesize()
ret i32 %1
}

LLVM IR (-O2):
define weak i32 @softboundcets_getpagesize() {
%1 = tail call i32 (...) @getpagesize()
ret i32 %1
}
/* Type definitions */
struct ibv_cq {
  int dummy;
};
struct ibv_context {
  int dummy;
};
struct ibv_comp_channel {
  int dummy;
};

/* Variables and functions */
struct ibv_cq *ibv_create_cq(struct ibv_context *, int, void *,
                             struct ibv_comp_channel *, int);
struct ibv_cq *mlx4_glue_create_cq(struct ibv_context *context, int cqe,
                                   void *cq_context,
                                   struct ibv_comp_channel *channel,
                                   int comp_vector) {
  return ibv_create_cq(context, cqe, cq_context, channel, comp_vector);
}


x86 assembly (clang, -O0):
<mlx4_glue_create_cq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <ibv_create_cq@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlx4_glue_create_cq>:
jmp    1030 <ibv_create_cq@plt>

LLVM IR (-O0):
%struct.ibv_cq = type { i32 }
%struct.ibv_context = type { i32 }
%struct.ibv_comp_channel = type { i32 }
define %struct.ibv_cq* @mlx4_glue_create_cq(%struct.ibv_context* %0, i32 %1, i8* %2, %struct.ibv_comp_channel* %3, i32 %4) {
%6 = alloca %struct.ibv_context*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca %struct.ibv_comp_channel*
%10 = alloca i32
store %struct.ibv_context* %0, %struct.ibv_context** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store %struct.ibv_comp_channel* %3, %struct.ibv_comp_channel** %9
store i32 %4, i32* %10
%11 = load %struct.ibv_context*, %struct.ibv_context** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load %struct.ibv_comp_channel*, %struct.ibv_comp_channel** %9
%15 = load i32, i32* %10
%16 = call %struct.ibv_cq* @ibv_create_cq(%struct.ibv_context* %11, i32 %12, i8* %13, %struct.ibv_comp_channel* %14, i32 %15)
ret %struct.ibv_cq* %16
}

LLVM IR (-O2):
%struct.ibv_cq = type { i32 }
%struct.ibv_context = type { i32 }
%struct.ibv_comp_channel = type { i32 }
define %struct.ibv_cq* @mlx4_glue_create_cq(%struct.ibv_context* %0, i32 %1, i8* %2, %struct.ibv_comp_channel* %3, i32 %4) {
%6 = tail call %struct.ibv_cq* @ibv_create_cq(%struct.ibv_context* %0, i32 %1, i8* %2, %struct.ibv_comp_channel* %3, i32 %4)
ret %struct.ibv_cq* %6
}
int main(int argc, char **argv) {
  long double x = 1.48734 + (long double)argc;
  return (int)__builtin_rintl(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
fildl  -0x28(%rbp)
fldl   0xecb(%rip)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <rintl@plt>
fld    %st(0)
fstp   %st(0)
fnstcw -0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x2c(%rbp)
fldcw  -0x2c(%rbp)
fistpl -0x24(%rbp)
fldcw  -0x2a(%rbp)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    %edi,0x20(%rsp)
fildl  0x20(%rsp)
faddl  0xede(%rip)
fstpt  (%rsp)
call   1030 <rintl@plt>
fnstcw 0x1c(%rsp)
movzwl 0x1c(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x1e(%rsp)
fldcw  0x1e(%rsp)
fistpl 0x24(%rsp)
fldcw  0x1c(%rsp)
mov    0x24(%rsp),%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to x86_fp80
%9 = fadd x86_fp80 0xK3FFFBE612839042D9000, %8
store x86_fp80 %9, x86_fp80* %6
%10 = load x86_fp80, x86_fp80* %6
%11 = call x86_fp80 @llvm.rint.f80(x86_fp80 %10)
%12 = fptosi x86_fp80 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = sitofp i32 %0 to x86_fp80
%4 = fadd x86_fp80 %3, 0xK3FFFBE612839042D9000
%5 = tail call x86_fp80 @llvm.rint.f80(x86_fp80 %4)
%6 = fptosi x86_fp80 %5 to i32
ret i32 %6
}
void test6(void) {
  int *p = __builtin_malloc(sizeof(int) * 4);
  if (p == (void *)0)
    __builtin_abort();
  if (p)
    __builtin_free(p);
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1156 <test6+0x26>
call   1040 <abort@plt>
cmpq   $0x0,-0x8(%rbp)
je     116a <test6+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test6() {
%1 = alloca i32*
%2 = call i8* @malloc(i64 16)
%3 = bitcast i8* %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 %7
6: ; preds = %0
unreachable
7: ; preds = %0
%8 = load i32*, i32** %1
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32*, i32** %1
%12 = bitcast i32* %11 to i8*
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @test6() {
ret void
}
/* Variables and functions */
int GET32(int);
void uart_flush_rx_fifo(void) {
  while (1) {
    if (GET32((0x20201000 + 0x18)) & 0x10)
      break;
    GET32((0x20201000 + 0x00));
  }
}


x86 assembly (clang, -O0):
<uart_flush_rx_fifo>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <uart_flush_rx_fifo+0x9>
mov    $0x20201018,%edi
call   1030 <GET32@plt>
and    $0x10,%eax
cmp    $0x0,%eax
je     1134 <uart_flush_rx_fifo+0x24>
jmp    1143 <uart_flush_rx_fifo+0x33>
mov    $0x20201000,%edi
call   1030 <GET32@plt>
jmp    1119 <uart_flush_rx_fifo+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_flush_rx_fifo>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20201018,%edi
call   1030 <GET32@plt>
test   $0x10,%al
jne    113a <uart_flush_rx_fifo+0x2a>
mov    $0x20201000,%edi
call   1030 <GET32@plt>
jmp    1120 <uart_flush_rx_fifo+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @uart_flush_rx_fifo() {
br label %1
1: ; preds = %0, %6
%2 = call i32 @GET32(i32 538972184)
%3 = and i32 %2, 16
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = call i32 @GET32(i32 538972160)
br label %1
8: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @uart_flush_rx_fifo() {
%1 = tail call i32 @GET32(i32 538972184)
%2 = and i32 %1, 16
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = tail call i32 @GET32(i32 538972160)
%6 = tail call i32 @GET32(i32 538972184)
%7 = and i32 %6, 16
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %0
ret void
}
int fnear(float x, float y) {
  float t = x - y;
  return t == 0 || x / t > 1000000.0;
}


x86 assembly (clang, -O0):
<fnear>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jne    113e <fnear+0x3e>
jp     113e <fnear+0x3e>
jmp    115e <fnear+0x5e>
movss  -0x4(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeac(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnear>:
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
mov    $0x1,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm2
jne    1117 <fnear+0x17>
jp     1117 <fnear+0x17>
ret
divss  %xmm2,%xmm0
xor    %eax,%eax
ucomiss 0xedc(%rip),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @fnear(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fsub float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = fcmp oeq float %9, 0.000000e+00
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load float, float* %3
%13 = load float, float* %5
%14 = fdiv float %12, %13
%15 = fpext float %14 to double
%16 = fcmp ogt double %15, 1.000000e+06
br label %17
17: ; preds = %11, %2
%18 = phi i1 [ true, %2 ], [ %16, %11 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @fnear(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fcmp oeq float %3, 0.000000e+00
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = fdiv float %0, %3
%7 = fcmp ogt float %6, 1.000000e+06
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xca() {
  Assert_real((isprint(202) == 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_isprint.c",
              1015, ("isprint should be 0 for 0xca"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xca>:
push   %rax
mov    $0xca,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f7,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xca\00"
define void @t_isprint_0xca() {
%1 = call i64 @isprint(i32 202)
%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 1015, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xca\00"
define void @t_isprint_0xca() {
%1 = tail call i64 @isprint(i32 202)
%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 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct gkc_summary {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double, double);
double gkc_query(struct gkc_summary *, double);
int /*<<< orphan*/ stderr;
void print_query(struct gkc_summary *s, double q) {
  double v = gkc_query(s, q);
  fprintf(stderr, "queried: %.02f, found: %.02f\n", q, v);
}


x86 assembly (clang, -O0):
<print_query>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1040 <gkc_query@plt>
movsd  %xmm0,-0x18(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_query>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <gkc_query@plt>
movaps %xmm0,%xmm1
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.gkc_summary = type { i32 }
@stderr = global i32 0
@.str = [30 x i8] c"queried: %.02f, found: %.02f\0A\00"
define void @print_query(%struct.gkc_summary* %0, double %1) {
%3 = alloca %struct.gkc_summary*
%4 = alloca double
%5 = alloca double
store %struct.gkc_summary* %0, %struct.gkc_summary** %3
store double %1, double* %4
%6 = load %struct.gkc_summary*, %struct.gkc_summary** %3
%7 = load double, double* %4
%8 = call double @gkc_query(%struct.gkc_summary* %6, double %7)
store double %8, double* %5
%9 = load i32, i32* @stderr
%10 = load double, double* %4
%11 = load double, double* %5
%12 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double %10, double %11)
ret void
}

LLVM IR (-O2):
%struct.gkc_summary = type { i32 }
@stderr = global i32 0
@.str = [30 x i8] c"queried: %.02f, found: %.02f\0A\00"
define void @print_query(%struct.gkc_summary* %0, double %1) {
%3 = tail call double @gkc_query(%struct.gkc_summary* %0, double %1)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double %1, double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close23456() {
  close(2);
  close(3);
  close(4);
  close(5);
  close(6);
}


x86 assembly (clang, -O0):
<close23456>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <close@plt>
mov    $0x3,%edi
call   1030 <close@plt>
mov    $0x4,%edi
call   1030 <close@plt>
mov    $0x5,%edi
call   1030 <close@plt>
mov    $0x6,%edi
call   1030 <close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<close23456>:
push   %rax
mov    $0x2,%edi
call   1030 <close@plt>
mov    $0x3,%edi
call   1030 <close@plt>
mov    $0x4,%edi
call   1030 <close@plt>
mov    $0x5,%edi
call   1030 <close@plt>
mov    $0x6,%edi
pop    %rax
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @close23456() {
%1 = call i32 @close(i32 2)
%2 = call i32 @close(i32 3)
%3 = call i32 @close(i32 4)
%4 = call i32 @close(i32 5)
%5 = call i32 @close(i32 6)
ret void
}

LLVM IR (-O2):
define void @close23456() {
%1 = tail call i32 @close(i32 2)
%2 = tail call i32 @close(i32 3)
%3 = tail call i32 @close(i32 4)
%4 = tail call i32 @close(i32 5)
%5 = tail call i32 @close(i32 6)
ret void
}