xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ checking_free(char **);
void free_vec(char **vec) {
  if (vec) {
    char **p = vec;
    while (*p)
      checking_free(*p++);
    checking_free(vec);
  }
}


x86 assembly (clang, -O0):
<free_vec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1162 <free_vec+0x52>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1159 <free_vec+0x49>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rdi
call   1030 <checking_free@plt>
jmp    112f <free_vec+0x1f>
mov    -0x8(%rbp),%rdi
call   1030 <checking_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_vec>:
test   %rdi,%rdi
je     1150 <free_vec+0x40>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <free_vec+0x31>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
call   1030 <checking_free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_vec+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <checking_free@plt>
ret

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

LLVM IR (-O2):
define void @free_vec(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %12, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = bitcast i8* %7 to i8**
%11 = tail call i32 @checking_free(i8** %10)
%12 = load i8*, i8** %9
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = tail call i32 @checking_free(i8** %0)
br label %16
16: ; preds = %14, %1
ret void
}
/* Type definitions */
typedef scalar_t__ ulong;

/* Variables and functions */
scalar_t__ get_u32_msb(void const *);
int compare_table_tags(const void *pt1, const void *pt2) {
  ulong t1 = get_u32_msb(pt1), t2 = get_u32_msb(pt2);
  return (t1 < t2 ? -1 : t1 > t2 ? 1 : 0);
}


x86 assembly (clang, -O0):
<compare_table_tags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_u32_msb@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <get_u32_msb@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1155 <compare_table_tags+0x45>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    116d <compare_table_tags+0x5d>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_table_tags>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <get_u32_msb@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <get_u32_msb@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @compare_table_tags(i8* %0, i8* %1) {
%3 = tail call i64 @get_u32_msb(i8* %0)
%4 = tail call i64 @get_u32_msb(i8* %1)
%5 = icmp slt i64 %3, %4
%6 = icmp sgt i64 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
size_t chars_in_str(const char s[], char c) {
  size_t char_count = 0;
  while (*s != '\0') {
    if (*s++ == c) {
      char_count++;
    }
  }
  return char_count;
}


x86 assembly (clang, -O0):
<chars_in_str>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <chars_in_str+0x55>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1150 <chars_in_str+0x50>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1116 <chars_in_str+0x16>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chars_in_str>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <chars_in_str+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <chars_in_str+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @chars_in_str(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i64 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = icmp eq i8 %6, %1
%11 = zext i1 %10 to i64
%12 = add i64 %7, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 0, %2 ], [ %12, %5 ]
ret i64 %16
}
/* Type definitions */
struct usb_hcd {
  int dummy;
};
struct ohci_hcd {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
struct usb_hcd *dev_get_drvdata(struct device *);
struct ohci_hcd *hcd_to_ohci(struct usb_hcd *);
struct ohci_hcd *dev_to_ohci(struct device *dev) {
  struct usb_hcd *hcd = dev_get_drvdata(dev);
  return hcd_to_ohci(hcd);
}


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

x86 assembly (clang, -O2):
<dev_to_ohci>:
push   %rax
call   1030 <dev_get_drvdata@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <hcd_to_ohci@plt>

LLVM IR (-O0):
%struct.ohci_hcd = type { i32 }
%struct.device = type { i32 }
%struct.usb_hcd = type { i32 }
define %struct.ohci_hcd* @dev_to_ohci(%struct.device* %0) {
%2 = alloca %struct.device*
%3 = alloca %struct.usb_hcd*
store %struct.device* %0, %struct.device** %2
%4 = load %struct.device*, %struct.device** %2
%5 = call %struct.usb_hcd* @dev_get_drvdata(%struct.device* %4)
store %struct.usb_hcd* %5, %struct.usb_hcd** %3
%6 = load %struct.usb_hcd*, %struct.usb_hcd** %3
%7 = call %struct.ohci_hcd* @hcd_to_ohci(%struct.usb_hcd* %6)
ret %struct.ohci_hcd* %7
}

LLVM IR (-O2):
%struct.ohci_hcd = type { i32 }
%struct.device = type { i32 }
%struct.usb_hcd = type { i32 }
define %struct.ohci_hcd* @dev_to_ohci(%struct.device* %0) {
%2 = tail call %struct.usb_hcd* @dev_get_drvdata(%struct.device* %0)
%3 = tail call %struct.ohci_hcd* @hcd_to_ohci(%struct.usb_hcd* %2)
ret %struct.ohci_hcd* %3
}
void gtk_clipboard_set_can_store() {}


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

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

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

LLVM IR (-O2):
define void @gtk_clipboard_set_can_store() {
ret void
}
void gdk_display_supports_selection_notification() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_supports_selection_notification() {
ret void
}
int getint(const char **p) {
  unsigned x;
  for (x = 0; **p - '0' < 10U; (*p)++)
    x = **p - '0' + 10 * x;
  return x;
}


x86 assembly (clang, -O0):
<getint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
cmp    $0xa,%eax
jae    114e <getint+0x4e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    110f <getint+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getint>:
mov    (%rdi),%rcx
movsbl (%rcx),%edx
add    $0xffffffd0,%edx
xor    %eax,%eax
cmp    $0x9,%edx
ja     1138 <getint+0x38>
add    $0x1,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
lea    (%rdx,%rax,2),%eax
mov    %rcx,(%rdi)
movsbl (%rcx),%edx
add    $0xffffffd0,%edx
add    $0x1,%rcx
cmp    $0xa,%edx
jb     1120 <getint+0x20>
ret

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

LLVM IR (-O2):
define i32 @getint(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -48
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %18
7: ; preds = %1, %7
%8 = phi i32 [ %16, %7 ], [ %5, %1 ]
%9 = phi i8* [ %13, %7 ], [ %2, %1 ]
%10 = phi i32 [ %12, %7 ], [ 0, %1 ]
%11 = mul i32 %10, 10
%12 = add i32 %8, %11
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %13, i8** %0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %15, -48
%17 = icmp ult i32 %16, 10
br i1 %17, label %7, label %18
18: ; preds = %7, %1
%19 = phi i32 [ 0, %1 ], [ %12, %7 ]
ret i32 %19
}
/* Type definitions */
struct socket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ user_flush_rx(struct socket *);
int /*<<< orphan*/ user_flush_tx(struct socket *);
void user_flush_rx_tx(struct socket *sock) {
  user_flush_rx(sock);
  user_flush_tx(sock);
}


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

x86 assembly (clang, -O2):
<user_flush_rx_tx>:
push   %rbx
mov    %rdi,%rbx
call   1030 <user_flush_rx@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <user_flush_tx@plt>

LLVM IR (-O0):
%struct.socket = type { i32 }
define void @user_flush_rx_tx(%struct.socket* %0) {
%2 = alloca %struct.socket*
store %struct.socket* %0, %struct.socket** %2
%3 = load %struct.socket*, %struct.socket** %2
%4 = call i32 @user_flush_rx(%struct.socket* %3)
%5 = load %struct.socket*, %struct.socket** %2
%6 = call i32 @user_flush_tx(%struct.socket* %5)
ret void
}

LLVM IR (-O2):
%struct.socket = type { i32 }
define void @user_flush_rx_tx(%struct.socket* %0) {
%2 = tail call i32 @user_flush_rx(%struct.socket* %0)
%3 = tail call i32 @user_flush_tx(%struct.socket* %0)
ret void
}
/* Variables and functions */
float __nv_asinf(float);
float asinf(float __a) { return __nv_asinf(__a); }


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

x86 assembly (clang, -O2):
<asinf>:
jmp    1030 <__nv_asinf@plt>

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

LLVM IR (-O2):
define float @asinf(float %0) {
%2 = tail call float @__nv_asinf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__16__IO__clr();
void SharedAnalogDeviceP__1__EnablePin__clr(void) {
  HplAtm128GeneralIOPinP__16__IO__clr();
}


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

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

LLVM IR (-O0):
define void @SharedAnalogDeviceP__1__EnablePin__clr() {
%1 = call i32 (...) @HplAtm128GeneralIOPinP__16__IO__clr()
ret void
}

LLVM IR (-O2):
define void @SharedAnalogDeviceP__1__EnablePin__clr() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__16__IO__clr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf("Usage: %s [OPTION]...\n"
         "Manage bind(2) access rules.\n"
         "\n"
         "  -s, --set[=FILE]   Read and set new rules (see bindprivs.conf(5) "
         "for details)\n"
         "  -f, --flush        Flush rules\n"
         "  -l, --list         List rules\n"
         "  -u, --unload       Prepare module for removing from memory\n"
         "\n"
         "  -h, --help         Give this help list\n"
         "  -V, --version      Print program version\n"
         "\n"
         "The default filename is "
         "/etc/bindprivs.conf"
         ".\n",
         name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [390 x i8] c"Usage: %s [OPTION]...\0AManage bind(2) access rules.\0A\0A -s, --set[=FILE] Read and set new rules (see bindprivs.conf(5) for details)\0A -f, --flush Flush rules\0A -l, --list List rules\0A -u, --unload Prepare module for removing from memory\0A\0A -h, --help Give this help list\0A -V, --version Print program version\0A\0AThe default filename is /etc/bindprivs.conf.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([390 x i8], [390 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [390 x i8] c"Usage: %s [OPTION]...\0AManage bind(2) access rules.\0A\0A -s, --set[=FILE] Read and set new rules (see bindprivs.conf(5) for details)\0A -f, --flush Flush rules\0A -l, --list List rules\0A -u, --unload Prepare module for removing from memory\0A\0A -h, --help Give this help list\0A -V, --version Print program version\0A\0AThe default filename is /etc/bindprivs.conf.\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([390 x i8], [390 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_58int64_midword_reg(long long val) {
  return ((val >> 16) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x58,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_58int64_midword_reg>:
test   $0x580000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_58int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 88
%6 = icmp ne i64 %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_58int64_midword_reg(i64 %0) {
%2 = and i64 %0, 5767168
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int f();
int g();
int f5() {
  int a = 42;
  int b = 35;
  a = f();
  b = f();
  if (f() == g())
    return a;
  return 0;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2a,-0x8(%rbp)
movl   $0x23,-0xc(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <g@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jne    1173 <f5+0x53>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <f5+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
xor    %eax,%eax
call   1030 <f@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
call   1030 <f@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <g@plt>
cmp    %eax,%ebp
cmovne %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f5() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 42, i32* %2
store i32 35, i32* %3
%4 = call i32 (...) @f()
store i32 %4, i32* %2
%5 = call i32 (...) @f()
store i32 %5, i32* %3
%6 = call i32 (...) @f()
%7 = call i32 (...) @g()
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = load i32, i32* %2
store i32 %10, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @f5() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @f()
%3 = tail call i32 (...) @f()
%4 = tail call i32 (...) @g()
%5 = icmp eq i32 %3, %4
%6 = select i1 %5, i32 %1, i32 0
ret i32 %6
}
/* Variables and functions */
int atoi(char *);
int hashpjw(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  if (argc != 3) {
    return -1;
  }
  printf("%d\n", (hashpjw(argv[2]) % atoi(argv[1])));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     115c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1196 <main+0x66>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <hashpjw@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%eax
cmp    $0x3,%edi
jne    1171 <main+0x41>
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x10(%rsi),%rdi
call   1040 <hashpjw@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
lea    0xe9e(%rip),%rdi
mov    %edx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @hashpjw(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = srem i32 %7, %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %2, %4
%14 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help() {
  printf("Here is your help");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Here is your help\00"
define i32 @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Here is your help\00"
define i32 @help() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void ExttPermAuxTable(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ memset(void *, int, int);
int sigfillset(sigset_t *set) {
  if (set == NULL) {
    errno = -EINVAL;
    return -1;
  }
  memset((void *)set, 0xFF, sizeof(sigset_t));
  return 0;
}


x86 assembly (clang, -O0):
<sigfillset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <sigfillset+0x37>
xor    %ecx,%ecx
mov    0x2ea8(%rip),%rax
sub    (%rax),%ecx
mov    0x2ea7(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <sigfillset+0x51>
mov    -0x10(%rbp),%rdi
mov    $0xff,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigfillset>:
push   %rax
test   %rdi,%rdi
je     1129 <sigfillset+0x19>
mov    $0xff,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea8(%rip),%rax
xor    %ecx,%ecx
sub    (%rax),%ecx
mov    0x2ea5(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigfillset(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
store i32 %8, i32* @errno
store i32 -1, i32* %2
br label %13
9: ; preds = %1
%10 = load i32*, i32** %3
%11 = bitcast i32* %10 to i8*
%12 = call i32 @memset(i8* %11, i32 255, i32 4)
store i32 0, i32* %2
br label %13
13: ; preds = %9, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigfillset(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
store i32 %5, i32* @errno
br label %9
6: ; preds = %1
%7 = bitcast i32* %0 to i8*
%8 = tail call i32 @memset(i8* %7, i32 255, i32 4)
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ -1, %3 ], [ 0, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ stderr;
void *xmalloc0(size_t s) {
  void *new = (void *)malloc(s);
  if (!new)
    fprintf(stderr, "mplib: Memory exhausted: Could not allocate %d bytes\n",
            s);
  else
    memset(new, 0, s);
  return new;
}


x86 assembly (clang, -O0):
<xmalloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1172 <xmalloc0+0x42>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1040 <fprintf@plt>
jmp    1181 <xmalloc0+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc0>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1153 <xmalloc0+0x23>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
jmp    116b <xmalloc0+0x3b>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"mplib: Memory exhausted: Could not allocate %d bytes\0A\00"
define i8* @xmalloc0(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i64, i64* %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %17
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i64, i64* %2
%16 = call i32 @memset(i8* %14, i32 0, i64 %15)
br label %17
17: ; preds = %13, %9
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"mplib: Memory exhausted: Could not allocate %d bytes\0A\00"
define i8* @xmalloc0(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %10
8: ; preds = %1
%9 = tail call i32 @memset(i8* %3, i32 0, i64 %0)
br label %10
10: ; preds = %8, %5
ret i8* %3
}
void *trie_identity1(const char *key, void *data, void *arg) {
  (void)key;
  (void)data;
  return arg;
}


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

x86 assembly (clang, -O2):
<trie_identity1>:
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i8* @trie_identity1(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i8* %9
}

LLVM IR (-O2):
define i8* @trie_identity1(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* readnone returned %2) {
ret i8* %2
}
void ff_hevcdsp_init_arm() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevcdsp_init_arm() {
ret void
}
signed smax(signed a, signed b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<smax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <smax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <smax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @smax(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @smax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
struct flub {
  int dummy;
};

/* Variables and functions */
unsigned long flub_yoink_compact(struct flub *);
unsigned long flub_error_get_compact(struct flub *flub) {
  return flub_yoink_compact(flub);
}


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

x86 assembly (clang, -O2):
<flub_error_get_compact>:
jmp    1030 <flub_yoink_compact@plt>

LLVM IR (-O0):
%struct.flub = type { i32 }
define i64 @flub_error_get_compact(%struct.flub* %0) {
%2 = alloca %struct.flub*
store %struct.flub* %0, %struct.flub** %2
%3 = load %struct.flub*, %struct.flub** %2
%4 = call i64 @flub_yoink_compact(%struct.flub* %3)
ret i64 %4
}

LLVM IR (-O2):
%struct.flub = type { i32 }
define i64 @flub_error_get_compact(%struct.flub* %0) {
%2 = tail call i64 @flub_yoink_compact(%struct.flub* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(void const *, void const *);
unsigned int arikkei_string_equal(const void *l, const void *r) {
  return !strcmp(l, r);
}


x86 assembly (clang, -O0):
<arikkei_string_equal>:
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,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @arikkei_string_equal(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 i32 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @arikkei_string_equal(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
float dot2_c(float v0[2], float v1[2]) {
  float r;
  r = v0[0] * v1[0];
  r += v0[1] * v1[1];
  return r;
}


x86 assembly (clang, -O0):
<dot2_c>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm2
movss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot2_c>:
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @dot2_c(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 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %4
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = fmul float %8, %11
store float %12, float* %5
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = load float*, float** %4
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float, float* %5
%20 = call float @llvm.fmuladd.f32(float %15, float %18, float %19)
store float %20, float* %5
%21 = load float, float* %5
ret float %21
}

LLVM IR (-O2):
define float @dot2_c(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fmul float %3, %4
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = tail call float @llvm.fmuladd.f32(float %7, float %9, float %5)
ret float %10
}
/* Variables and functions */
char *_strset(char *, int);
char *strset(char *str, int value) { return _strset(str, value); }


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

x86 assembly (clang, -O2):
<strset>:
jmp    1030 <_strset@plt>

LLVM IR (-O0):
define i8* @strset(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @_strset(i8* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @strset(i8* %0, i32 %1) {
%3 = tail call i8* @_strset(i8* %0, i32 %1)
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef int int8_t;

/* Variables and functions */
void mcnet_write_int8(uint8_t *out, int8_t in) { out[0] = ((in >> 0) & 0xFF); }


x86 assembly (clang, -O0):
<mcnet_write_int8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcnet_write_int8>:
movzbl %sil,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @mcnet_write_int8(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 0
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @mcnet_write_int8(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
store i32 %3, i32* %0
ret void
}
void av_stream_get_parser() {}


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

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

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

LLVM IR (-O2):
define void @av_stream_get_parser() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char);
void putchar(char c) { uart_putc(c); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <uart_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
jmp    1030 <uart_putc@plt>

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

LLVM IR (-O2):
define void @putchar(i8 signext %0) {
%2 = tail call i32 @uart_putc(i8 signext %0)
ret void
}
void revert(int a[], int len) {
  if (len <= 1)
    return;
  revert(a + 1, len - 2);
  int tmp;
  tmp = a[0];
  a[0] = a[len - 1];
  a[len - 1] = tmp;
}


x86 assembly (clang, -O0):
<revert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     112e <revert+0x1e>
jmp    1173 <revert+0x63>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
sub    $0x2,%esi
call   1030 <revert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revert>:
cmp    $0x1,%esi
jle    1142 <revert+0x32>
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
add    $0x4,%rdi
lea    -0x2(%rbx),%esi
call   1030 <revert@plt>
mov    (%r14),%eax
add    $0xffffffff,%ebx
mov    (%r14,%rbx,4),%ecx
mov    %ecx,(%r14)
mov    %eax,(%r14,%rbx,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @revert(i32* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %4, label %5
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = add nsw i32 %1, -2
tail call void @revert(i32* %6, i32 %7)
%8 = load i32, i32* %0
%9 = add nsw i32 %1, -1
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %0
store i32 %8, i32* %11
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ storm_free(void *);
int Finalize(void *self) {
  storm_free(self);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @Finalize(i8* %0) {
%2 = tail call i32 @storm_free(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_longlong_p(long long *addr, long long value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_longlong_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_longlong_p(i64* nocapture readnone %0, i64 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ __builtin_tbegin(int /*<<< orphan*/);
int /*<<< orphan*/ __builtin_tend();
void __attribute__((no)) foo(int a) {
  if (a == 42)
    return;
  if (__builtin_tbegin(0) == 0)
    __builtin_tend();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2a,-0x4(%rbp)
jne    113a <foo+0x1a>
jmp    1152 <foo+0x32>
xor    %edi,%edi
call   1030 <__builtin_tbegin@plt>
cmp    $0x0,%rax
jne    1152 <foo+0x32>
mov    $0x0,%al
call   1040 <__builtin_tend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x2a,%edi
je     1137 <foo+0x17>
push   %rax
xor    %edi,%edi
call   1030 <__builtin_tbegin@plt>
test   %rax,%rax
lea    0x8(%rsp),%rsp
je     1138 <foo+0x18>
ret
xor    %eax,%eax
jmp    1040 <__builtin_tend@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 42
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = call i64 @__builtin_tbegin(i32 0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @__builtin_tend()
br label %11
11: ; preds = %5, %9, %6
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp eq i32 %0, 42
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @__builtin_tbegin(i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @__builtin_tend()
br label %8
8: ; preds = %1, %6, %3
ret void
}
int ld_le_cr2(long double a1) { return !(((100) <= (a1))); }


x86 assembly (clang, -O0):
<ld_le_cr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_le_cr2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ld_le_cr2(x86_fp80 %0) {
%2 = fcmp ult x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
int nDigits(int number) {
  int i = 0;
  while (number > 0) {
    number = number / 10;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<nDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1134 <nDigits+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <nDigits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nDigits>:
xor    %eax,%eax
test   %edi,%edi
jle    1124 <nDigits+0x24>
mov    $0xcccccccd,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <nDigits+0x10>
ret

LLVM IR (-O0):
define i32 @nDigits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 10
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @nDigits(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printSpaces(int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<printSpaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <printSpaces+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printSpaces+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSpaces>:
push   %rbx
test   %edi,%edi
jle    112f <printSpaces+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printSpaces+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printSpaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 32)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}