xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ bios_printf(int, char *, int /*<<< orphan*/);
void print_cdromboot_failure(uint16_t code) {
  bios_printf(4, "CDROM boot failure code : %04x\n", code);
  return;
}


x86 assembly (clang, -O0):
<print_cdromboot_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x4,%edi
lea    0xed6(%rip),%rsi
call   1030 <bios_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_cdromboot_failure>:
mov    %edi,%edx
lea    0xee7(%rip),%rsi
mov    $0x4,%edi
jmp    1030 <bios_printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"CDROM boot failure code : %04x\0A\00"
define void @print_cdromboot_failure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bios_printf(i32 4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"CDROM boot failure code : %04x\0A\00"
define void @print_cdromboot_failure(i32 %0) {
%2 = tail call i32 @bios_printf(i32 4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int set_apcli_basic(int radio) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_apcli_basic(i32 %0) {
ret i32 0
}
int heb_is_leap_year(const int year) {
  static const int leap_map[19] = {1, 0, 0, 1, 0, 0, 1, 0, 1, 0,
                                   0, 1, 0, 0, 1, 0, 0, 1, 0};
  return leap_map[year % 19];
}


x86 assembly (clang, -O0):
<heb_is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x13,%ecx
cltd
idiv   %ecx
movslq %edx,%rcx
lea    0xee4(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<heb_is_leap_year>:
movslq %edi,%rax
imul   $0x6bca1af3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%edx
lea    (%rcx,%rdx,2),%ecx
sub    %ecx,%eax
cltq
lea    0xed8(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@heb_is_leap_year.leap_map = internal constant [19 x i32] [i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0]
define i32 @heb_is_leap_year(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 19
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [19 x i32], [19 x i32]* @heb_is_leap_year.leap_map, i64 0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
@heb_is_leap_year.leap_map = internal unnamed_addr constant [19 x i32] [i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0]
define i32 @heb_is_leap_year(i32 %0) {
%2 = srem i32 %0, 19
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [19 x i32], [19 x i32]* @heb_is_leap_year.leap_map, i64 0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
int AMCTimingEvent_Remove(struct AMCTimingEvent *timeEvent) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.AMCTimingEvent = type opaque
define i32 @AMCTimingEvent_Remove(%struct.AMCTimingEvent* nocapture readnone %0) {
ret i32 -1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long subwindow;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
void set_XCrossingEvent_subwindow(void *_p, unsigned long _v) {
  ((XCrossingEvent *)_p)->subwindow = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XCrossingEvent_subwindow>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XCrossingEvent_subwindow(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XCrossingEvent_subwindow(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void audiohw_stop(void) {
  (*(volatile unsigned short *)(0x38)) = (0x01),
                             (*(volatile unsigned short *)(0x39)) &= 0xFFFE;
}


x86 assembly (clang, -O0):
<audiohw_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%eax
movw   $0x1,(%rax)
mov    $0x39,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    $0xfffe,%eax
mov    %ax,%cx
mov    $0x39,%eax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<audiohw_stop>:
movw   $0x1,0x38
andw   $0xfffe,0x39
ret

LLVM IR (-O0):
define void @audiohw_stop() {
store volatile i16 1, i16* inttoptr (i64 56 to i16*)
%1 = load volatile i16, i16* inttoptr (i64 57 to i16*)
%2 = zext i16 %1 to i32
%3 = and i32 %2, 65534
%4 = trunc i32 %3 to i16
store volatile i16 %4, i16* inttoptr (i64 57 to i16*)
ret void
}

LLVM IR (-O2):
define void @audiohw_stop() {
store volatile i16 1, i16* inttoptr (i64 56 to i16*)
%1 = load volatile i16, i16* inttoptr (i64 57 to i16*)
%2 = and i16 %1, -2
store volatile i16 %2, i16* inttoptr (i64 57 to i16*)
ret void
}
long long st_minll(long long x, long long y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<st_minll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <st_minll+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <st_minll+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_minll>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @st_minll(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @st_minll(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", invert(512, 8, 9));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x200,%edi
mov    $0x8,%esi
mov    $0x9,%edx
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x200,%edi
mov    $0x8,%esi
mov    $0x9,%edx
call   1030 <invert@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 512, i32 8, i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
unsigned xrop3_131_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~S;
  stk3 = D | stk4;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_131_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_131_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
mov    %ecx,%esi
not    %esi
mov    %esi,%eax
or     $0xff,%eax
and    %edx,%eax
xor    %ecx,%eax
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_131_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %5
%27 = load i32, i32* %11
%28 = or i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %7
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = xor i32 %35, -1
store i32 %36, i32* %8
%37 = load i32, i32* %8
%38 = load i32, i32* %6
%39 = xor i32 %38, -1
%40 = and i32 %37, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_131_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, -1
%8 = or i32 %7, 255
%9 = and i32 %6, %8
%10 = xor i32 %4, %9
%11 = xor i32 %10, -1
%12 = and i32 %11, %7
%13 = or i32 %12, %3
ret i32 %13
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void DESLengthSet(uint32_t ui32Base, uint32_t ui32Length) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000024))) = ui32Length;
}


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

x86 assembly (clang, -O2):
<DESLengthSet>:
mov    %rsi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @DESLengthSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 36
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @DESLengthSet(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 36
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fmt;

/* Variables and functions */
int rb_scan_args_trail_idx(char const *);
int rb_scan_args_n_trail(const char *fmt) {
  const int idx = rb_scan_args_trail_idx(fmt);
  return (((unsigned char)((fmt[idx]) - '0') < 10) ? fmt[idx] - '0' : 0);
}


x86 assembly (clang, -O0):
<rb_scan_args_n_trail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rb_scan_args_trail_idx@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
movzbl %al,%eax
cmp    $0xa,%eax
jge    115a <rb_scan_args_n_trail+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
mov    %eax,-0x10(%rbp)
jmp    1164 <rb_scan_args_n_trail+0x54>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1164 <rb_scan_args_n_trail+0x54>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_scan_args_n_trail>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rb_scan_args_trail_idx@plt>
cltq
movsbl (%rbx,%rax,1),%ecx
add    $0xffffffd0,%ecx
mov    %ecx,%edx
and    $0xfe,%edx
xor    %eax,%eax
cmp    $0xa,%edx
cmovb  %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rb_scan_args_n_trail(i8* %0) {
%2 = tail call i32 @rb_scan_args_trail_idx(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, -48
%8 = and i32 %7, 254
%9 = icmp ult i32 %8, 10
%10 = select i1 %9, i32 %7, i32 0
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ do_cmd_options();
int /*<<< orphan*/ do_cmd_redraw();
void do_cmd_xxx_options(void) {
  do_cmd_options();
  do_cmd_redraw();
}


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

x86 assembly (clang, -O2):
<do_cmd_xxx_options>:
push   %rax
xor    %eax,%eax
call   1040 <do_cmd_options@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_cmd_redraw@plt>

LLVM IR (-O0):
define void @do_cmd_xxx_options() {
%1 = call i32 (...) @do_cmd_options()
%2 = call i32 (...) @do_cmd_redraw()
ret void
}

LLVM IR (-O2):
define void @do_cmd_xxx_options() {
%1 = tail call i32 (...) @do_cmd_options()
%2 = tail call i32 (...) @do_cmd_redraw()
ret void
}
int tegra_set_wake_gpio(unsigned int wake, int gpio) { return 0; }


x86 assembly (clang, -O0):
<tegra_set_wake_gpio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @tegra_set_wake_gpio(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @tegra_set_wake_gpio(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int pkey_size_gost(const EVP_PKEY *pk) { return 64; }


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

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

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

LLVM IR (-O2):
define i32 @pkey_size_gost(i32* nocapture readnone %0) {
ret i32 64
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_container_to_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(4, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_container_to_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x4,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_container_to_start_system>:
mov    $0x4,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_container_to_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 4, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_container_to_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 4, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct stat {
  int /*<<< orphan*/ st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char const *, struct stat *);
uint64_t get_filesize(const char *filename) {
  struct stat buf;
  stat(filename, &buf);
  return buf.st_size;
}


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

x86 assembly (clang, -O2):
<get_filesize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_filesize(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
void oauth_free_array(int *argcp, char ***argvp) {
  int i = 0;
  while (i < (*argcp)) {
    free((*argvp)[i++]);
  }
  free(*argvp);
}


x86 assembly (clang, -O0):
<oauth_free_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1159 <oauth_free_array+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1127 <oauth_free_array+0x17>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oauth_free_array>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
cmpl   $0x0,(%rdi)
jle    1148 <oauth_free_array+0x38>
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14),%rax
mov    (%rax,%rbx,8),%rdi
add    $0x1,%rbx
call   1030 <free@plt>
movslq (%r15),%rax
cmp    %rax,%rbx
jl     1130 <oauth_free_array+0x20>
mov    (%r14),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @oauth_free_array(i32* nocapture %0, i8*** nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ 0, %2 ]
%7 = load i8**, i8*** %1
%8 = add nuw nsw i64 %6, 1
%9 = getelementptr inbounds i8*, i8** %7, i64 %6
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = load i32, i32* %0
%12 = sext i32 %11 to i64
%13 = icmp slt i64 %8, %12
br i1 %13, label %5, label %14
14: ; preds = %5, %2
%15 = bitcast i8*** %1 to i8**
%16 = load i8*, i8** %15
tail call void @free(i8* %16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgstorsw(int n) { lgen("%s\t%%rax,%c%d", "movq", n); }


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

x86 assembly (clang, -O2):
<cgstorsw>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s\09%%rax,%c%d\00"
@.str.1 = [5 x i8] c"movq\00"
define void @cgstorsw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s\09%%rax,%c%d\00"
@.str.1 = [5 x i8] c"movq\00"
define void @cgstorsw(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_CRL_it;
X509_CRL *d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) {
  return (X509_CRL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_CRL_it);
}


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

x86 assembly (clang, -O2):
<d2i_X509_CRL>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@X509_CRL_it = global i32 0
define i32* @d2i_X509_CRL(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @X509_CRL_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@X509_CRL_it = global i32 0
define i32* @d2i_X509_CRL(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @X509_CRL_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_string(char *);
int /*<<< orphan*/ output_with_tab(char *);
void gen_call(char *sname) {
  output_with_tab("call ");
  output_string(sname);
  newline();
}


x86 assembly (clang, -O0):
<gen_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    -0x8(%rbp),%rdi
call   1040 <output_string@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_call>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    %rbx,%rdi
call   1040 <output_string@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"call \00"
define void @gen_call(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @output_string(i8* %4)
%6 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"call \00"
define void @gen_call(i8* %0) {
%2 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @output_string(i8* %0)
%4 = tail call i32 (...) @newline()
ret void
}
int rek(int N) {
  if (N == 1)
    return 1;
  return rek(N - 1) + (1 + 2 * (N - 1));
}


x86 assembly (clang, -O0):
<rek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <rek+0x21>
movl   $0x1,-0x4(%rbp)
jmp    114d <rek+0x3d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <rek@plt>
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rek>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1127 <rek+0x27>
lea    -0x2(%rdi),%ecx
lea    (%rdi,%rdi,1),%eax
add    $0xfffffffd,%eax
imul   %ecx,%eax
lea    (%rax,%rdi,2),%eax
add    $0xfffffffd,%edi
imul   %ecx,%edi
or     $0x1,%edi
sub    %edi,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @rek(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add i32 %0, -2
%5 = shl i32 %0, 1
%6 = add i32 %5, -3
%7 = mul i32 %4, %6
%8 = add i32 %7, %5
%9 = add i32 %0, -3
%10 = mul i32 %4, %9
%11 = or i32 %10, 1
%12 = sub i32 %8, %11
%13 = add i32 %12, 1
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 1, %1 ], [ %13, %3 ]
ret i32 %15
}
void uart_init() {}


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

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

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

LLVM IR (-O2):
define void @uart_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/, int /*<<< orphan*/);
void sigchld_handler(int sig) {
  while (waitpid(-1, 0, WNOHANG) > 0) {
  }
}


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    113f <sigchld_handler+0x2f>
jmp    111b <sigchld_handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigchld_handler>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <sigchld_handler+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32 0, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sigchld_handler(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32 0, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Type definitions */
struct buff {
  int dummy;
};

/* Variables and functions */
int buff_copy_from(struct buff *, void *, size_t);
int deserialize_bytes(struct buff *buf, void *val, size_t len) {
  return buff_copy_from(buf, val, len);
}


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

x86 assembly (clang, -O2):
<deserialize_bytes>:
jmp    1030 <buff_copy_from@plt>

LLVM IR (-O0):
%struct.buff = type { i32 }
define i32 @deserialize_bytes(%struct.buff* %0, i8* %1, i64 %2) {
%4 = alloca %struct.buff*
%5 = alloca i8*
%6 = alloca i64
store %struct.buff* %0, %struct.buff** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.buff*, %struct.buff** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @buff_copy_from(%struct.buff* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.buff = type { i32 }
define i32 @deserialize_bytes(%struct.buff* %0, i8* %1, i64 %2) {
%4 = tail call i32 @buff_copy_from(%struct.buff* %0, i8* %1, i64 %2)
ret i32 %4
}
void INT_Excep_SCI0_RXI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI0_RXI0() {
ret void
}
unsigned short bytes2ushort(char *bytes) {
  return ((unsigned char)bytes[0] << 8) + (unsigned char)bytes[1];
}


x86 assembly (clang, -O0):
<bytes2ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes2ushort>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @bytes2ushort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add nsw i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @bytes2ushort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Variables and functions */
double fmax(double, double);
double lrelu(double x) { return fmax(x, x * .01); }


x86 assembly (clang, -O0):
<lrelu>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm3
movsd  0xeea(%rip),%xmm2
mulsd  -0x8(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordsd %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
maxsd  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrelu>:
movsd  0xef8(%rip),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm0,%xmm1
cmpunordsd %xmm0,%xmm1
movapd %xmm1,%xmm3
andpd  %xmm2,%xmm3
maxsd  %xmm0,%xmm2
andnpd %xmm2,%xmm1
orpd   %xmm3,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @lrelu(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 1.000000e-02
%6 = call double @llvm.maxnum.f64(double %3, double %5)
ret double %6
}

LLVM IR (-O2):
define double @lrelu(double %0) {
%2 = fmul double %0, 1.000000e-02
%3 = tail call double @llvm.maxnum.f64(double %0, double %2)
ret double %3
}
int chararg_foo(const char *str) {
  int i;
  for (i = 0; str[i] != '\0'; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<chararg_foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <chararg_foo+0x37>
jmp    1129 <chararg_foo+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <chararg_foo+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chararg_foo>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <chararg_foo+0x10>
ret

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

LLVM IR (-O2):
define i32 @chararg_foo(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void gtk_paint_tab() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_tab() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeChar(int /*<<< orphan*/);
void writeString(char *str) {
  if (!str)
    str = "<NULL>";
  while (*str)
    writeChar(*str++);
}


x86 assembly (clang, -O0):
<writeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1132 <writeString+0x22>
lea    0xed2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1137 <writeString+0x27>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <writeString+0x50>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <writeChar@plt>
jmp    1137 <writeString+0x27>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeString>:
push   %rbx
test   %rdi,%rdi
lea    0xee5(%rip),%rbx
cmovne %rdi,%rbx
mov    (%rbx),%al
test   %al,%al
je     1143 <writeString+0x33>
add    $0x1,%rbx
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <writeChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <writeString+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"<NULL>\00"
define void @writeString(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %12, %6 ], [ %4, %1 ]
%8 = phi i8* [ %9, %6 ], [ %3, %1 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %7 to i32
%11 = tail call i32 @writeChar(i32 %10)
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %1
ret void
}
/* Variables and functions */
bool fspath_is_socket(const char path[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @fspath_is_socket(i8* nocapture readnone %0) {
ret i32 0
}
void gtk_text_view_set_wrap_mode() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_set_wrap_mode() {
ret void
}
/* Variables and functions */
scalar_t__ islower(char);
char toupper(char);
void upper(char *s) {
  while (*s != '\0') {
    if (islower(*s))
      *s = toupper(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1177 <upper+0x57>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1166 <upper+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <upper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1155 <upper+0x35>
mov    %rdi,%rbx
jmp    113c <upper+0x1c>
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1155 <upper+0x35>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1130 <upper+0x10>
movsbl (%rbx),%edi
call   1040 <toupper@plt>
mov    %al,(%rbx)
jmp    1130 <upper+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @upper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i64 @islower(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = tail call signext i8 @toupper(i8 signext %10)
store i8 %11, i8* %6
br label %12
12: ; preds = %9, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main() {
  int i, a;
  a = 30;
#pragma omp parallel for firstprivate(a) lastprivate(a) num_threads(2)         \
    schedule(static)
  for (i = 0; i < 10; i++)
    a = a + i;
  if (a != 65)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114e <main+0x3e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x41,-0xc(%rbp)
je     115f <main+0x4f>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %8, %9
store i32 %10, i32* %3
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 65
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int setegid(gid_t gid) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setegid(i32 %0) {
ret i32 0
}
/* Variables and functions */
bool nrf91_errata_4(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_4() {
ret i32 0
}
void gdev_vsched_fifo_replenish_compute(struct gdev_device *gdev) {}


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

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

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

LLVM IR (-O2):
%struct.gdev_device = type opaque
define void @gdev_vsched_fifo_replenish_compute(%struct.gdev_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
DumpPlcffnd() {
  printf("\n\n\n****************  FOOTNOTE TABLES  ***************\n");
  printf("****************  NOT IMPLEMENTED  ***************\n\n");
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"\0A\0A\0A**************** FOOTNOTE TABLES ***************\0A\00"
@.str.1 = [53 x i8] c"**************** NOT IMPLEMENTED ***************\0A\0A\00"
define i32 @DumpPlcffnd() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [54 x i8] c"\0A\0A\0A**************** FOOTNOTE TABLES ***************\00"
@str.2 = [52 x i8] c"**************** NOT IMPLEMENTED ***************\0A\00"
define i32 @DumpPlcffnd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.2, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ dropbear_exit(char *, char const *, int, char const *);
void fail_assert(const char *expr, const char *file, int line) {
  dropbear_exit("Failed assertion (%s:%d): `%s'", file, line, expr);
}


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

x86 assembly (clang, -O2):
<fail_assert>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
jmp    1030 <dropbear_exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Failed assertion (%s:%d): `%s'\00"
define void @fail_assert(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @dropbear_exit(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Failed assertion (%s:%d): `%s'\00"
define void @fail_assert(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @dropbear_exit(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
ret void
}
int __attribute__((no, noclone)) j(int a, int b) {
  return (b * a) * (0x7fffffff / 2 + 1);
}


x86 assembly (clang, -O0):
<j>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
shl    $0x1e,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<j>:
mov    %edi,%eax
imul   %esi,%eax
shl    $0x1e,%eax
ret

LLVM IR (-O0):
define i32 @j(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 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
%8 = mul nsw i32 %7, 1073741824
ret i32 %8
}

LLVM IR (-O2):
define i32 @j(i32 %0, i32 %1) {
%3 = shl i32 %0, 30
%4 = mul i32 %3, %1
ret i32 %4
}