xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void disarm_signal_handler() {
  signal(SIGTERM, SIG_DFL);
  signal(SIGINT, SIG_DFL);
}


x86 assembly (clang, -O0):
<disarm_signal_handler>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disarm_signal_handler>:
push   %rbx
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rbx
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
@SIG_DFL = global i32 0
@SIGINT = global i32 0
define void @disarm_signal_handler() {
%1 = load i32, i32* @SIGTERM
%2 = load i32, i32* @SIG_DFL
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGINT
%5 = load i32, i32* @SIG_DFL
%6 = call i32 @signal(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@SIG_DFL = global i32 0
@SIGINT = global i32 0
define void @disarm_signal_handler() {
%1 = load i32, i32* @SIGTERM
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGINT
%5 = load i32, i32* @SIG_DFL
%6 = tail call i32 @signal(i32 %4, i32 %5)
ret void
}
/* Type definitions */
typedef int ptrdiff_t;

/* Variables and functions */
unsigned char *lmsc_mk_aligned_ptr(unsigned char *up, size_t alnmnt) {
  size_t msk;
  ptrdiff_t dff;
  msk = alnmnt - 1;
  dff = (ptrdiff_t)up & (ptrdiff_t)msk;
  if (dff == (ptrdiff_t)0) {
    return up;
  }
  return up + (ptrdiff_t)alnmnt - dff;
}


x86 assembly (clang, -O0):
<lmsc_mk_aligned_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
and    %ecx,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    113c <lmsc_mk_aligned_ptr+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115a <lmsc_mk_aligned_ptr+0x5a>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq %ecx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmsc_mk_aligned_ptr>:
lea    -0x1(%rsi),%ecx
and    %edi,%ecx
movslq %esi,%rax
add    %rdi,%rax
movslq %ecx,%rcx
sub    %rcx,%rax
test   %ecx,%ecx
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @lmsc_mk_aligned_ptr(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = trunc i64 %1 to i32
%6 = add i32 %5, -1
%7 = and i32 %6, %4
%8 = icmp eq i32 %7, 0
%9 = shl i64 %1, 32
%10 = ashr exact i64 %9, 32
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = sext i32 %7 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = select i1 %8, i8* %0, i8* %14
ret i8* %15
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
scalar_t__ cctools_list_length(struct list *);
int cctools_list_size(struct list *list) {
  return (int)cctools_list_length(list);
}


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

x86 assembly (clang, -O2):
<cctools_list_size>:
jmp    1030 <cctools_list_length@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define i32 @cctools_list_size(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = call i64 @cctools_list_length(%struct.list* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
%struct.list = type { i32 }
define i32 @cctools_list_size(%struct.list* %0) {
%2 = tail call i64 @cctools_list_length(%struct.list* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int *tozero(int *x) {
  x[0] = 1;
  x[1] = 0;
  return x;
}


x86 assembly (clang, -O0):
<tozero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tozero>:
mov    %rdi,%rax
movq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define i32* @tozero(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 1, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 0, i32* %6
%7 = load i32*, i32** %2
ret i32* %7
}

LLVM IR (-O2):
define i32* @tozero(i32* returned writeonly %0) {
store i32 1, i32* %0
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 0, i32* %2
ret i32* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ crc_offset_from_whence(int, size_t);
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ xwrite(int, void *, size_t);
ssize_t write_whence_crc(int fd, void *crc_buffer, size_t data_len,
                         int whence) {
  off_t offset = crc_offset_from_whence(whence, data_len);
  lseek(fd, offset, SEEK_SET);
  return xwrite(fd, crc_buffer, data_len / 512 * 4);
}


x86 assembly (clang, -O0):
<write_whence_crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <crc_offset_from_whence@plt>
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
call   1040 <lseek@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shr    $0x9,%rdx
shl    $0x2,%rdx
call   1030 <xwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_whence_crc>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %ecx,%edi
mov    %rdx,%rsi
call   1050 <crc_offset_from_whence@plt>
mov    0x2e93(%rip),%rcx
mov    (%rcx),%edx
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <lseek@plt>
shr    $0x7,%rbx
and    $0xfffffffffffffffc,%rbx
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <xwrite@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @write_whence_crc(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%10 = load i32, i32* %8
%11 = load i64, i64* %7
%12 = call i32 @crc_offset_from_whence(i32 %10, i64 %11)
store i32 %12, i32* %9
%13 = load i32, i32* %5
%14 = load i32, i32* %9
%15 = load i32, i32* @SEEK_SET
%16 = call i32 @lseek(i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %5
%18 = load i8*, i8** %6
%19 = load i64, i64* %7
%20 = udiv i64 %19, 512
%21 = mul i64 %20, 4
%22 = call i32 @xwrite(i32 %17, i8* %18, i64 %21)
ret i32 %22
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @write_whence_crc(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @crc_offset_from_whence(i32 %3, i64 %2)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @lseek(i32 %0, i32 %5, i32 %6)
%8 = lshr i64 %2, 7
%9 = and i64 %8, 144115188075855868
%10 = tail call i32 @xwrite(i32 %0, i8* %1, i64 %9)
ret i32 %10
}
void chipUnInit(void) {}


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

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

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

LLVM IR (-O2):
define void @chipUnInit() {
ret void
}
/* Variables and functions */
int ENOTSUP;
int /*<<< orphan*/ assert(char const *);
int smaunch_set_default_fs_key(const char *key) {
  assert(key);
  (void)key;
  return -ENOTSUP;
}


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

x86 assembly (clang, -O2):
<smaunch_set_default_fs_key>:
push   %rax
call   1030 <assert@plt>
mov    0x2ecb(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
define i32 @smaunch_set_default_fs_key(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @ENOTSUP
%7 = sub nsw i32 0, %6
ret i32 %7
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
define i32 @smaunch_set_default_fs_key(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i32, i32* @ENOTSUP
%4 = sub nsw i32 0, %3
ret i32 %4
}
__attribute__((no, noclone)) unsigned __int128 t171_5mul(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, (unsigned __int128)(3), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t171_5mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    $0x3,%ecx
mul    %rcx
mov    %rax,%rsi
mov    -0x50(%rbp),%rax
seto   %dl
mov    %dl,-0x41(%rbp)
mul    %rcx
mov    %rax,%rcx
mov    -0x41(%rbp),%al
add    %rsi,%rdx
setb   %sil
or     %sil,%al
mov    %rcx,-0x40(%rbp)
mov    %rdx,-0x38(%rbp)
test   $0x1,%al
jne    1179 <t171_5mul+0x69>
jmp    1180 <t171_5mul+0x70>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t171_5mul>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    $0x3,%esi
mul    %rsi
mov    %rax,%rcx
mov    %rdi,%rax
seto   %dil
mul    %rsi
mov    %rax,%r14
mov    %rdx,%rbx
add    %rcx,%rbx
setb   %al
or     %dil,%al
cmp    $0x1,%al
jne    1146 <t171_5mul+0x36>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t171_5mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %11, i128 3)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t171_5mul(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %6, i128 3)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
scalar_t__ isdigit(char);
char getTop(char s) {
  if (isdigit(s)) {
    return 1;
  }
  return s;
}


x86 assembly (clang, -O0):
<getTop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     113a <getTop+0x2a>
movb   $0x1,-0x1(%rbp)
jmp    1140 <getTop+0x30>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTop>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
mov    $0x1,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @getTop(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isdigit(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 1, i8* %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* %2
br label %10
10: ; preds = %8, %7
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @getTop(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8 %0, i8 1
ret i8 %4
}
int swf5wrap() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @swf5wrap() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void pf6() { printf("Function Test 6\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Function Test 6\0A\00"
define void @pf6() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Function Test 6\00"
define void @pf6() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dstev_(char *, int *, double *, double *, double *, int *,
                          double *, int *);
void DSTEV(char JOBZ, int N, double *D, double *E, double *vec, int LDA,
           double *W, int INFO) {
  dstev_(&JOBZ, &N, D, E, vec, &LDA, W, &INFO);
}


x86 assembly (clang, -O0):
<DSTEV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dil,%al
mov    0x18(%rbp),%edi
mov    0x10(%rbp),%rdi
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    0x10(%rbp),%r10
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x24(%rbp),%r9
lea    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dstev_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DSTEV>:
sub    $0x18,%rsp
mov    0x20(%rsp),%r10
mov    %dil,0xf(%rsp)
mov    %esi,0x14(%rsp)
mov    %r9d,0x10(%rsp)
lea    0x28(%rsp),%rax
lea    0xf(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%r9
push   %rax
push   %r10
call   1030 <dstev_@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @DSTEV(i8 signext %0, i32 %1, double* %2, double* %3, double* %4, i32 %5, double* %6, i32 %7) {
%9 = alloca i8
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca double*
%16 = alloca i32
store i8 %0, i8* %9
store i32 %1, i32* %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store i32 %5, i32* %14
store double* %6, double** %15
store i32 %7, i32* %16
%17 = load double*, double** %11
%18 = load double*, double** %12
%19 = load double*, double** %13
%20 = load double*, double** %15
%21 = call i32 @dstev_(i8* %9, i32* %10, double* %17, double* %18, double* %19, i32* %14, double* %20, i32* %16)
ret void
}

LLVM IR (-O2):
define void @DSTEV(i8 signext %0, i32 %1, double* %2, double* %3, double* %4, i32 %5, double* %6, i32 %7) {
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8 %0, i8* %9
store i32 %1, i32* %10
store i32 %5, i32* %11
store i32 %7, i32* %12
%13 = call i32 @dstev_(i8* %9, i32* %10, double* %2, double* %3, double* %4, i32* %11, double* %6, i32* %12)
ret void
}
long __syscall2(long n, long a1, long a2) {
  unsigned long ret;
  __asm__ __volatile__("syscall"
                       : "=a"(ret)
                       : "a"(n), "D"(a1), "S"(a2)
                       : "rcx", "r11", "memory");
  return ret;
}


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

x86 assembly (clang, -O2):
<__syscall2>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
syscall
ret

LLVM IR (-O0):
define i64 @__syscall2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %8, i64 %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
ret i64 %12
}

LLVM IR (-O2):
define i64 @__syscall2(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int main(void) {
  while (1) {
    loop();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <loop@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <loop@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @loop()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @loop()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
inc() { ol("INX H"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"INX H\00"
define i32 @inc() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"INX H\00"
define i32 @inc() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int ld_bge_cr1(long double a1) { return (__builtin_isgreaterequal(100, a1)); }


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

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

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

LLVM IR (-O2):
define i32 @ld_bge_cr1(x86_fp80 %0) {
%2 = fcmp ole x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
void __attribute__((no)) _thread_created_hook(pid_t thread_id) {}


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

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

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

LLVM IR (-O2):
define void @_thread_created_hook(i32 %0) {
ret void
}
const char *pl_get_type(void) {
  static const char *const type = "sock";
  return type;
}


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

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

LLVM IR (-O0):
@pl_get_type.type = internal constant i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
@.str = [5 x i8] c"sock\00"
define i8* @pl_get_type() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"sock\00"
define i8* @pl_get_type() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void *);
void EC_GROUP_free(void *p) { __coverity_free__(p); }


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

x86 assembly (clang, -O2):
<EC_GROUP_free>:
jmp    1030 <__coverity_free__@plt>

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

LLVM IR (-O2):
define void @EC_GROUP_free(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
ret void
}
/* Type definitions */
struct resist_config_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ resist_free(struct resist_config_t *);
void resist_config_free(struct resist_config_t *cfg) { resist_free(cfg); }


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

x86 assembly (clang, -O2):
<resist_config_free>:
jmp    1030 <resist_free@plt>

LLVM IR (-O0):
%struct.resist_config_t = type { i32 }
define void @resist_config_free(%struct.resist_config_t* %0) {
%2 = alloca %struct.resist_config_t*
store %struct.resist_config_t* %0, %struct.resist_config_t** %2
%3 = load %struct.resist_config_t*, %struct.resist_config_t** %2
%4 = call i32 @resist_free(%struct.resist_config_t* %3)
ret void
}

LLVM IR (-O2):
%struct.resist_config_t = type { i32 }
define void @resist_config_free(%struct.resist_config_t* %0) {
%2 = tail call i32 @resist_free(%struct.resist_config_t* %0)
ret void
}
void ___assert() { return; }


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

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

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

LLVM IR (-O2):
define void @___assert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ test();
void this_is_a_function_with_a_much_longer_name_than_the_others(const char *s) {
  printf("this_is_a_function_with_a_much_longer_name_than_the_others(%s)\n", s);
  test();
}


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

x86 assembly (clang, -O2):
<this_is_a_function_with_a_much_longer_name_than_the_others>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test@plt>

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

LLVM IR (-O2):
@.str = [64 x i8] c"this_is_a_function_with_a_much_longer_name_than_the_others(%s)\0A\00"
define void @this_is_a_function_with_a_much_longer_name_than_the_others(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @test()
ret void
}
/* Variables and functions */
int *spiralOrder(int **, int, int);
int main(int argc, char *argv[]) {
  int *matrix[100] = {0};
  int line1[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  matrix[0] = line1;
  int *ret = spiralOrder(matrix, 1, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x370,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x330(%rbp),%rdi
xor    %esi,%esi
mov    $0x320,%edx
call   1030 <memset@plt>
lea    -0x360(%rbp),%rdi
lea    0xe96(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x360(%rbp),%rax
mov    %rax,-0x330(%rbp)
lea    -0x330(%rbp),%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1040 <spiralOrder@plt>
mov    %rax,-0x368(%rbp)
xor    %eax,%eax
add    $0x370,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x350,%rsp
lea    0x30(%rsp),%rbx
mov    $0x320,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    0xedd(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rax
mov    %rax,0x30(%rsp)
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1040 <spiralOrder@plt>
xor    %eax,%eax
add    $0x350,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.line1 = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i32*]
%4 = alloca [10 x i32]
%5 = bitcast [100 x i32*]* %3 to i8*
%6 = bitcast [10 x i32]* %4 to i8*
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%8 = getelementptr inbounds [100 x i32*], [100 x i32*]* %3, i64 0, i64 0
store i32* %7, i32** %8
%9 = call i32* @spiralOrder(i32** %8, i32 1, i32 10)
ret i32 0
}
/* Variables and functions */
unsigned long hjstrlen(const char *src) {
  if (src == NULL) {
    return 0;
  }
  unsigned long length = 0;
  while (*src++ != '\0') {
    length++;
  }
  return length;
}


x86 assembly (clang, -O0):
<hjstrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <hjstrlen+0x20>
movq   $0x0,-0x8(%rbp)
jmp    115c <hjstrlen+0x5c>
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1154 <hjstrlen+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <hjstrlen+0x28>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hjstrlen>:
test   %rdi,%rdi
je     111f <hjstrlen+0x1f>
cmpb   $0x0,(%rdi)
je     111f <hjstrlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <hjstrlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hjstrlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add i64 %7, 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %10, %6 ]
ret i64 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef char wchar_t;

/* Variables and functions */
scalar_t__ wcschr(char const *, int /*<<< orphan*/);
int iswspace(wint_t wc) {
  static const wchar_t spaces[] = {
      ' ',    '\t',   '\n',   '\r',   11,     12,     0x0085, 0x2000,
      0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2008, 0x2009,
      0x200a, 0x2028, 0x2029, 0x205f, 0x3000, 0};
  return wc && wcschr(spaces, wc);
}


x86 assembly (clang, -O0):
<iswspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1143 <iswspace+0x33>
mov    -0x4(%rbp),%esi
lea    0xecc(%rip),%rdi
call   1030 <wcschr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswspace>:
test   %edi,%edi
je     1133 <iswspace+0x23>
push   %rax
mov    %edi,%esi
lea    0xee2(%rip),%rdi
call   1030 <wcschr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@iswspace.spaces = internal constant [22 x i8] c" \09\0A\0D\0B\0C\85\00\01\02\03\04\05\06\08\09\0A()_\00\00"
define i32 @iswspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @wcschr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @iswspace.spaces, i64 0, i64 0), i32 %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@iswspace.spaces = internal constant [22 x i8] c" \09\0A\0D\0B\0C\85\00\01\02\03\04\05\06\08\09\0A()_\00\00"
define i32 @iswspace(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @wcschr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @iswspace.spaces, i64 0, i64 0), i32 %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
float nvRadToDegf(float r) { return r * 180.0f / 3.14159265358979323846f; }


x86 assembly (clang, -O0):
<nvRadToDegf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvRadToDegf>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @nvRadToDegf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = fdiv float %4, 0x400921FB60000000
ret float %5
}

LLVM IR (-O2):
define float @nvRadToDegf(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = fdiv float %2, 0x400921FB60000000
ret float %3
}
void free_inet6(struct in6_addr *net) {}


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

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

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

LLVM IR (-O2):
%struct.in6_addr = type opaque
define void @free_inet6(%struct.in6_addr* nocapture %0) {
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef void FILE;

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
void *fopen(char const *, char const *);
scalar_t__ stat(char const *, struct stat *);
FILE *Sys_FOpen(const char *ospath, const char *mode) {
  struct stat buf;
  if (stat(ospath, &buf) == 0 && S_ISDIR(buf.st_mode))
    return ((void *)0);
  return fopen(ospath, mode);
}


x86 assembly (clang, -O0):
<Sys_FOpen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1176 <Sys_FOpen+0x46>
mov    -0x20(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1176 <Sys_FOpen+0x46>
movq   $0x0,-0x8(%rbp)
jmp    1187 <Sys_FOpen+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_FOpen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
je     1154 <Sys_FOpen+0x24>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <fopen@plt>
jmp    1163 <Sys_FOpen+0x33>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
test   %rax,%rax
je     1147 <Sys_FOpen+0x17>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i8* @Sys_FOpen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.stat
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i64 @stat(i8* %7, %struct.stat* %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i64 @S_ISDIR(i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i8* null, i8** %3
br label %20
16: ; preds = %10, %2
%17 = load i8*, i8** %4
%18 = load i8*, i8** %5
%19 = call i8* @fopen(i8* %17, i8* %18)
store i8* %19, i8** %3
br label %20
20: ; preds = %16, %15
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define noalias i8* @Sys_FOpen(i8* %0, i8* nocapture %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = call i64 @stat(i8* %0, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISDIR(i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7, %2
%13 = call i8* @fopen(i8* %0, i8* %1)
br label %14
14: ; preds = %7, %12
%15 = phi i8* [ %13, %12 ], [ null, %7 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ f(double);
int main() {
  int i;
  for (i = 0; i < 100; i++)
    f(7.6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    114b <main+0x3b>
movsd  0xec8(%rip),%xmm0
call   1030 <f@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
movsd  0xed8(%rip),%xmm0
call   1030 <f@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @f(double 7.600000e+00)
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @f(double 7.600000e+00)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void gtk_size_group_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_size_group_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ malloc(int);
int main() {
  int *r;
  int y;
  r = (int *)malloc(4);
  *r = 5;
  y = *r;
  assert(y >= 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
movl   $0x5,(%rax)
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 5, i32* %6
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp sge i32 %9, 10
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 5, i32* %2
%3 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ fget(char *, int);
int fgetn() {
  char chain[64];
  fget(chain, 64);
  return atoi(chain);
}


x86 assembly (clang, -O0):
<fgetn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
mov    $0x40,%esi
call   1030 <fget@plt>
lea    -0x40(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetn>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1030 <fget@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fgetn() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i32 @fget(i8* %2, i32 64)
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%5 = call i32 @atoi(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fgetn() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i32 @fget(i8* %2, i32 64)
%4 = call i32 @atoi(i8* %2)
ret i32 %4
}
void tarjeta_init(void) {}


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

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

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

LLVM IR (-O2):
define void @tarjeta_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ B(int *);
void A(int *p) { B(p); }


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

x86 assembly (clang, -O2):
<A>:
jmp    1030 <B@plt>

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

LLVM IR (-O2):
define void @A(i32* %0) {
%2 = tail call i32 @B(i32* %0)
ret void
}
int test_imm_25int64_midword_reg(long long val) {
  return ((val >> 16) & (0x25 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_25int64_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, 37
%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_25int64_midword_reg(i64 %0) {
%2 = and i64 %0, 2424832
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void handle_POLL(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_POLL(i32 %0) {
ret void
}
void omap4_cm_base_init(void) {}


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

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

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

LLVM IR (-O2):
define void @omap4_cm_base_init() {
ret void
}
const char *plugin_api_ngettext(const char *single, const char *plural,
                                int count) {
  (void)single;
  (void)count;
  return (plural);
}


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

x86 assembly (clang, -O2):
<plugin_api_ngettext>:
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @plugin_api_ngettext(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** %4
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
define i8* @plugin_api_ngettext(i8* nocapture readnone %0, i8* readnone returned %1, i32 %2) {
ret i8* %1
}
/* Variables and functions */
short check_fixed(long);
short add_fixed(short x, short y) { return check_fixed((long)x + (long)y); }


x86 assembly (clang, -O0):
<add_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswq -0x2(%rbp),%rdi
movswq -0x4(%rbp),%rax
add    %rax,%rdi
call   1030 <check_fixed@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_fixed>:
movslq %edi,%rax
movslq %esi,%rdi
add    %rax,%rdi
jmp    1030 <check_fixed@plt>

LLVM IR (-O0):
define signext i16 @add_fixed(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i64
%7 = load i16, i16* %4
%8 = sext i16 %7 to i64
%9 = add nsw i64 %6, %8
%10 = call signext i16 @check_fixed(i64 %9)
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @add_fixed(i16 signext %0, i16 signext %1) {
%3 = sext i16 %0 to i64
%4 = sext i16 %1 to i64
%5 = add nsw i64 %4, %3
%6 = tail call signext i16 @check_fixed(i64 %5)
ret i16 %6
}
int rr(int v1, int v2, int r) { return (r % (v1 - v2)) + v1; }


x86 assembly (clang, -O0):
<rr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rr>:
mov    %edx,%eax
mov    %edi,%ecx
sub    %esi,%ecx
cltd
idiv   %ecx
lea    (%rdx,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @rr(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = sub nsw i32 %8, %9
%11 = srem i32 %7, %10
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rr(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %1
%5 = srem i32 %2, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}