xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_alm(int signo) {
  printf("sig_alm\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"sig_alm\00"
define void @sig_alm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t b64_get_ascii_wc(size_t b64_wc) {
  size_t ascii_bc = b64_wc * 6;
  if (ascii_bc % 8)
    ascii_bc += (8 - (ascii_bc % 8));
  return ascii_bc / 8;
}


x86 assembly (clang, -O0):
<b64_get_ascii_wc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0x6,-0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
cmp    $0x0,%rax
je     113b <b64_get_ascii_wc+0x3b>
mov    -0x10(%rbp),%rcx
and    $0x7,%rcx
mov    $0x8,%eax
sub    %rcx,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_get_ascii_wc>:
add    %rdi,%rdi
lea    (%rdi,%rdi,2),%rcx
mov    %ecx,%edx
and    $0x6,%edx
mov    $0x8,%eax
sub    %rdx,%rax
test   %rdx,%rdx
cmove  %rdx,%rax
add    %rcx,%rax
shr    $0x3,%rax
ret

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

LLVM IR (-O2):
define i64 @b64_get_ascii_wc(i64 %0) {
%2 = mul i64 %0, 6
%3 = and i64 %2, 6
%4 = icmp eq i64 %3, 0
%5 = sub nuw nsw i64 8, %3
%6 = select i1 %4, i64 0, i64 %5
%7 = add i64 %6, %2
%8 = lshr i64 %7, 3
ret i64 %8
}
I0AX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (22 <= (((short *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
movswl (%rax,%rcx,2),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1145 <I0AX1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <I0AX1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0AX1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmpw   $0x16,0xa98ac7(%rcx,%rcx,1)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @I0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = icmp sgt i16 %9, 21
%11 = zext i1 %10 to i32
ret i32 %11
}
int _testfunc_deref_pointer(int *pi) { return *pi; }


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

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

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

LLVM IR (-O2):
define i32 @_testfunc_deref_pointer(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int omp_get_num_threads();
int /*<<< orphan*/ printf(char *, int);
int print_threads(void) {
  int lock = 0;
#pragma omp parallel shared(lock)
  {
#pragma omp critical
    {
      if (lock != 1) {
        printf("%d", omp_get_num_threads());
        lock = 1;
      }
    }
  }
}


x86 assembly (clang, -O0):
<print_threads>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1155 <print_threads+0x35>
mov    $0x0,%al
call   1040 <omp_get_num_threads@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_threads>:
push   %rax
xor    %eax,%eax
call   1040 <omp_get_num_threads@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @print_threads() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 (...) @omp_get_num_threads()
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 1, i32* %2
br label %8
8: ; preds = %5, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @print_threads() {
%1 = tail call i32 (...) @omp_get_num_threads()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 undef
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void AVRCP_ResponseSink_AVTransport_SetAVTransportURI(
    struct UPnPService *Service, int ErrorCode, void *User) {
  printf("AVRCP_ Invoke Response: "
         "AVTransport/SetAVTransportURI[ErrorCode:%d]()\r\n",
         ErrorCode);
}


x86 assembly (clang, -O0):
<AVRCP_ResponseSink_AVTransport_SetAVTransportURI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [72 x i8] c"AVRCP_ Invoke Response: AVTransport/SetAVTransportURI[ErrorCode:%d]()\0D\0A\00"
define void @AVRCP_ResponseSink_AVTransport_SetAVTransportURI(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [72 x i8] c"AVRCP_ Invoke Response: AVTransport/SetAVTransportURI[ErrorCode:%d]()\0D\0A\00"
define void @AVRCP_ResponseSink_AVTransport_SetAVTransportURI(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int f(int var1, int var2) {
  int y = var1 + var2;
  y = y + 2;
  return y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rsi,1),%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = add i32 %0, 2
%4 = add i32 %3, %1
ret i32 %4
}
/* Type definitions */
struct babel_route {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ change_route_metric(struct babel_route *, unsigned short,
                                       unsigned short, int /*<<< orphan*/);
void retract_route(struct babel_route *route) {
  change_route_metric(route, ((unsigned short)(~0)), ((unsigned short)(~0)), 0);
}


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

x86 assembly (clang, -O2):
<retract_route>:
mov    $0xffff,%esi
mov    $0xffff,%edx
xor    %ecx,%ecx
jmp    1030 <change_route_metric@plt>

LLVM IR (-O0):
%struct.babel_route = type { i32 }
define void @retract_route(%struct.babel_route* %0) {
%2 = alloca %struct.babel_route*
store %struct.babel_route* %0, %struct.babel_route** %2
%3 = load %struct.babel_route*, %struct.babel_route** %2
%4 = call i32 @change_route_metric(%struct.babel_route* %3, i16 zeroext -1, i16 zeroext -1, i32 0)
ret void
}

LLVM IR (-O2):
%struct.babel_route = type { i32 }
define void @retract_route(%struct.babel_route* %0) {
%2 = tail call i32 @change_route_metric(%struct.babel_route* %0, i16 zeroext -1, i16 zeroext -1, i32 0)
ret void
}
void __ompc_task_body_start() {}


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

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

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

LLVM IR (-O2):
define void @__ompc_task_body_start() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ o_s(char *);
int /*<<< orphan*/ printv(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void fails(char *str, char *s) {
  printv("ERR: %% failed with: %%\n", o_s(str), o_s(s));
  exit(1);
}


x86 assembly (clang, -O0):
<fails>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <o_s@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <o_s@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe9f(%rip),%rdi
call   1030 <printv@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fails>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <o_s@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <o_s@plt>
lea    0xeb4(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printv@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"ERR: %% failed with: %%\0A\00"
define void @fails(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @o_s(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @o_s(i8* %7)
%9 = call i32 @printv(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"ERR: %% failed with: %%\0A\00"
define void @fails(i8* %0, i8* %1) {
%3 = tail call i32 @o_s(i8* %0)
%4 = tail call i32 @o_s(i8* %1)
%5 = tail call i32 @printv(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gfarm_timeval_normalize(struct timeval *);
void gfarm_timeval_sub(struct timeval *t1, const struct timeval *t2) {
  t1->tv_sec -= t2->tv_sec;
  t1->tv_usec -= t2->tv_usec;
  gfarm_timeval_normalize(t1);
}


x86 assembly (clang, -O0):
<gfarm_timeval_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <gfarm_timeval_normalize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfarm_timeval_sub>:
movdqu (%rsi),%xmm0
movdqu (%rdi),%xmm1
psubq  %xmm0,%xmm1
movdqu %xmm1,(%rdi)
jmp    1030 <gfarm_timeval_normalize@plt>

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define void @gfarm_timeval_sub(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = sub nsw i64 %10, %7
store i64 %11, i64* %9
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%14 = load i64, i64* %13
%15 = load %struct.timeval*, %struct.timeval** %3
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 0
%17 = load i64, i64* %16
%18 = sub nsw i64 %17, %14
store i64 %18, i64* %16
%19 = load %struct.timeval*, %struct.timeval** %3
%20 = call i32 @gfarm_timeval_normalize(%struct.timeval* %19)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define void @gfarm_timeval_sub(%struct.timeval* %0, %struct.timeval* nocapture %1) {
%3 = bitcast %struct.timeval* %1 to <2 x i64>*
%4 = load <2 x i64>, <2 x i64>* %3
%5 = bitcast %struct.timeval* %0 to <2 x i64>*
%6 = load <2 x i64>, <2 x i64>* %5
%7 = sub nsw <2 x i64> %6, %4
%8 = bitcast %struct.timeval* %0 to <2 x i64>*
store <2 x i64> %7, <2 x i64>* %8
%9 = tail call i32 @gfarm_timeval_normalize(%struct.timeval* %0)
ret void
}
void media_snd_stop_pipeline(struct snd_usb_substream *subs) {}


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

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

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

LLVM IR (-O2):
%struct.snd_usb_substream = type opaque
define void @media_snd_stop_pipeline(%struct.snd_usb_substream* nocapture %0) {
ret void
}
void d2i_RSAPublicKey_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_RSAPublicKey_bio() {
ret void
}
void __attribute__((regparm(2)))
Def_WRITEB(unsigned long adr, unsigned char data) {}


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

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

LLVM IR (-O0):
define void @Def_WRITEB(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
ret void
}

LLVM IR (-O2):
define void @Def_WRITEB(i64 %0, i8 zeroext %1) {
ret void
}
/* Variables and functions */
unsigned long __copy_from_user_ll_nocache_nozero(void *, void const *,
                                                 unsigned long);
__attribute__((always_)) __attribute__((always_)) unsigned long
__copy_from_user_inatomic_nocache(void *to, const void *from, unsigned long n) {
  return __copy_from_user_ll_nocache_nozero(to, from, n);
}


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

x86 assembly (clang, -O2):
<__copy_from_user_inatomic_nocache>:
jmp    1030 <__copy_from_user_ll_nocache_nozero@plt>

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

LLVM IR (-O2):
define i64 @__copy_from_user_inatomic_nocache(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @__copy_from_user_ll_nocache_nozero(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ solve(double **);
int main(int argc, char const *argv[]) {
  double coefficient[3][4] = {
      {3, 0.1, 0.2, 7.85}, {0.1, 7, 0.3, -19.3}, {0.3, 0.2, 10, 71.4}};
  solve(coefficient);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x60,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1030 <solve@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <solve@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.coefficient = [3 x [4 x double]] [[4 x double] [double 3.000000e+00, double 1.000000e-01, double 2.000000e-01, double 7.850000e+00], [4 x double] [double 1.000000e-01, double 7.000000e+00, double 3.000000e-01, double -1.930000e+01], [4 x double] [double 3.000000e-01, double 2.000000e-01, double 1.000000e+01, double 7.140000e+01]]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x [4 x double]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [3 x [4 x double]]* %6 to i8*
%8 = getelementptr inbounds [3 x [4 x double]], [3 x [4 x double]]* %6, i64 0, i64 0
%9 = bitcast [4 x double]* %8 to double**
%10 = call i32 @solve(double** %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.coefficient = [3 x [4 x double]] [[4 x double] [double 3.000000e+00, double 1.000000e-01, double 2.000000e-01, double 7.850000e+00], [4 x double] [double 1.000000e-01, double 7.000000e+00, double 3.000000e-01, double -1.930000e+01], [4 x double] [double 3.000000e-01, double 2.000000e-01, double 1.000000e+01, double 7.140000e+01]]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x [4 x double]]
%4 = bitcast [3 x [4 x double]]* %3 to i8*
%5 = bitcast [3 x [4 x double]]* %3 to double**
%6 = call i32 @solve(double** %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cdiStreamReadVar(int, int, int, float *, int *);
void streamReadVarF(int streamID, int varID, float *data, int *nmiss) {
  cdiStreamReadVar(streamID, varID, 2, data, nmiss);
}


x86 assembly (clang, -O0):
<streamReadVarF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x2,%edx
call   1030 <cdiStreamReadVar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streamReadVarF>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    $0x2,%edx
jmp    1030 <cdiStreamReadVar@plt>

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

LLVM IR (-O2):
define void @streamReadVarF(i32 %0, i32 %1, float* %2, i32* %3) {
%5 = tail call i32 @cdiStreamReadVar(i32 %0, i32 %1, i32 2, float* %2, i32* %3)
ret void
}
unsigned long _tga_write_get_pixel(unsigned char *ucp_will_encode,
                                   long l_samples_per_pixel) {
  unsigned long pixel;
  pixel = (unsigned long)*ucp_will_encode++;
  while ((long)1 < l_samples_per_pixel--) {
    pixel <<= 8;
    pixel |= (unsigned long)*ucp_will_encode++;
  }
  return pixel;
}


x86 assembly (clang, -O0):
<_tga_write_get_pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    $0x1,%eax
cmp    %rcx,%rax
jge    116a <_tga_write_get_pixel+0x6a>
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1122 <_tga_write_get_pixel+0x22>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tga_write_get_pixel>:
movzbl (%rdi),%eax
cmp    $0x2,%rsi
jl     1138 <_tga_write_get_pixel+0x38>
add    $0x1,%rdi
add    $0x1,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
shl    $0x8,%rax
movzbl (%rdi),%ecx
or     %rcx,%rax
add    $0x1,%rdi
add    $0xffffffffffffffff,%rsi
cmp    $0x2,%rsi
ja     1120 <_tga_write_get_pixel+0x20>
ret

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

LLVM IR (-O2):
define i64 @_tga_write_get_pixel(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i64
%5 = icmp sgt i64 %1, 1
br i1 %5, label %6, label %17
6: ; preds = %2, %6
%7 = phi i8* [ %10, %6 ], [ %0, %2 ]
%8 = phi i64 [ %15, %6 ], [ %4, %2 ]
%9 = phi i64 [ %11, %6 ], [ %1, %2 ]
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = add nsw i64 %9, -1
%12 = shl i64 %8, 8
%13 = load i8, i8* %10
%14 = zext i8 %13 to i64
%15 = or i64 %12, %14
%16 = icmp ugt i64 %9, 2
br i1 %16, label %6, label %17
17: ; preds = %6, %2
%18 = phi i64 [ %4, %2 ], [ %15, %6 ]
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char const *, int /*<<< orphan*/);
int open_file(const char *filename) {
  int fd;
  fd = open(filename, O_RDONLY);
  return fd;
}


x86 assembly (clang, -O0):
<open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @open_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @open_file(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
unsigned int mget2b(const uint8_t *data) {
  return data[1] | (data[0] * 0x0100);
}


x86 assembly (clang, -O0):
<mget2b>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mget2b>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mget2b(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 256
%10 = or i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @mget2b(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = load i32, i32* %0
%5 = shl nsw i32 %4, 8
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fizzbuzz2(int);
void test_numbers() { fizzbuzz2(31); }


x86 assembly (clang, -O0):
<test_numbers>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f,%edi
call   1030 <fizzbuzz2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_numbers>:
mov    $0x1f,%edi
jmp    1030 <fizzbuzz2@plt>

LLVM IR (-O0):
define void @test_numbers() {
%1 = call i32 @fizzbuzz2(i32 31)
ret void
}

LLVM IR (-O2):
define void @test_numbers() {
%1 = tail call i32 @fizzbuzz2(i32 31)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_27() {
  Assert_real((isqrt(27) == 5),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              140, ("Integer square root of 27 should be 5"));
}


x86 assembly (clang, -O0):
<t_sqrt_27>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <isqrt@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x8c,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_27>:
push   %rax
mov    $0x1b,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x8c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 27 should be 5\00"
define void @t_sqrt_27() {
%1 = call i32 @isqrt(i32 27)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 140, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 27 should be 5\00"
define void @t_sqrt_27() {
%1 = tail call i32 @isqrt(i32 27)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 140, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rlimit {
  int /*<<< orphan*/ rlim_max;
  int /*<<< orphan*/ rlim_cur;
};
typedef int /*<<< orphan*/ rlim_t;

/* Variables and functions */
int /*<<< orphan*/ error(int /*<<< orphan*/ *);
scalar_t__ setrlimit(int, struct rlimit *);
void setlimit(int resource, rlim_t n) {
  struct rlimit limit;
  limit.rlim_cur = limit.rlim_max = n;
  if (setrlimit(resource, &limit) < 0)
    error(NULL);
}


x86 assembly (clang, -O0):
<setlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <setrlimit@plt>
cmp    $0x0,%rax
jge    1156 <setlimit+0x36>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setlimit>:
push   %rax
mov    %esi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
call   1030 <setrlimit@plt>
test   %rax,%rax
js     1137 <setlimit+0x17>
pop    %rax
ret
xor    %edi,%edi
call   1040 <error@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.rlimit = type { i32, i32 }
define void @setlimit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.rlimit
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i32 0, i32 1
store i32 %6, i32* %8
%9 = load i32, i32* %3
%10 = call i64 @setrlimit(i32 %9, %struct.rlimit* %5)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @error(i32* null)
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i32, i32 }
define void @setlimit(i32 %0, i32 %1) {
%3 = alloca %struct.rlimit
%4 = bitcast %struct.rlimit* %3 to i8*
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %3, i64 0, i32 1
store i32 %1, i32* %6
%7 = call i64 @setrlimit(i32 %0, %struct.rlimit* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @error(i32* null)
br label %11
11: ; preds = %9, %2
ret void
}
void g_DUMMY_set_commandline(int win_id, char *command) {
  win_id = win_id;
  command = command;
}


x86 assembly (clang, -O0):
<g_DUMMY_set_commandline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @g_DUMMY_set_commandline(i32 %0, i8* nocapture %1) {
ret void
}
_Bool QuietGreaterEqual(double f1, double f2) {
  return __builtin_isgreaterequal(f1, f2);
}


x86 assembly (clang, -O0):
<QuietGreaterEqual>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietGreaterEqual>:
ucomisd %xmm1,%xmm0
setae  %al
ret

LLVM IR (-O0):
define zeroext i1 @QuietGreaterEqual(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oge double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietGreaterEqual(double %0, double %1) {
%3 = fcmp oge double %0, %1
ret i1 %3
}
int security_scaffolding_startup(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @security_scaffolding_startup() {
ret i32 0
}
double fabs(x)
double x;
{
  union {
    double d;
    short i[4];
  } u;
  u.d = x;
  u.i[0] &= 0x7fff;
  return (u.d);
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movswl -0x10(%rbp),%eax
and    $0x7fff,%eax
mov    %ax,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movsd  0xef8(%rip),%xmm1
andps  %xmm1,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { double }
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to [4 x i16]*
%7 = getelementptr inbounds [4 x i16], [4 x i16]* %6, i64 0, i64 0
%8 = load i16, i16* %7
%9 = sext i16 %8 to i32
%10 = and i32 %9, 32767
%11 = trunc i32 %10 to i16
store i16 %11, i16* %7
%12 = bitcast %union.anon* %3 to double*
%13 = load double, double* %12
ret double %13
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = bitcast double %0 to i64
%3 = and i64 %2, -32769
%4 = bitcast i64 %3 to double
ret double %4
}
void hwfunctions_cli() { asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @hwfunctions_cli() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int get_fpc();
int fegetround(void) { return get_fpc() & 3; }


x86 assembly (clang, -O0):
<fegetround>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_fpc@plt>
and    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fegetround>:
push   %rax
xor    %eax,%eax
call   1030 <get_fpc@plt>
and    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fegetround() {
%1 = call i32 (...) @get_fpc()
%2 = and i32 %1, 3
ret i32 %2
}

LLVM IR (-O2):
define i32 @fegetround() {
%1 = tail call i32 (...) @get_fpc()
%2 = and i32 %1, 3
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ apply_ehards(int);
int /*<<< orphan*/ apply_hhards(int);
int /*<<< orphan*/ apply_pmc();
int /*<<< orphan*/ get_e();
int /*<<< orphan*/ get_h();
int /*<<< orphan*/ update_mur();
void compute(int time_index) {
  get_h();
  apply_hhards(time_index);
  get_e();
  update_mur();
  apply_ehards(time_index);
  apply_pmc();
}


x86 assembly (clang, -O0):
<compute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <get_h@plt>
mov    -0x4(%rbp),%edi
call   1070 <apply_hhards@plt>
mov    $0x0,%al
call   1080 <get_e@plt>
mov    $0x0,%al
call   1040 <update_mur@plt>
mov    -0x4(%rbp),%edi
call   1030 <apply_ehards@plt>
mov    $0x0,%al
call   1060 <apply_pmc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <get_h@plt>
mov    %ebx,%edi
call   1070 <apply_hhards@plt>
xor    %eax,%eax
call   1080 <get_e@plt>
xor    %eax,%eax
call   1040 <update_mur@plt>
mov    %ebx,%edi
call   1030 <apply_ehards@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <apply_pmc@plt>

LLVM IR (-O0):
define void @compute(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @get_h()
%4 = load i32, i32* %2
%5 = call i32 @apply_hhards(i32 %4)
%6 = call i32 (...) @get_e()
%7 = call i32 (...) @update_mur()
%8 = load i32, i32* %2
%9 = call i32 @apply_ehards(i32 %8)
%10 = call i32 (...) @apply_pmc()
ret void
}

LLVM IR (-O2):
define void @compute(i32 %0) {
%2 = tail call i32 (...) @get_h()
%3 = tail call i32 @apply_hhards(i32 %0)
%4 = tail call i32 (...) @get_e()
%5 = tail call i32 (...) @update_mur()
%6 = tail call i32 @apply_ehards(i32 %0)
%7 = tail call i32 (...) @apply_pmc()
ret void
}
int mymul3(int x) { return x * 0x555; }


x86 assembly (clang, -O0):
<mymul3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x555,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymul3>:
imul   $0x555,%edi,%eax
ret

LLVM IR (-O0):
define i32 @mymul3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1365
ret i32 %4
}

LLVM IR (-O2):
define i32 @mymul3(i32 %0) {
%2 = mul nsw i32 %0, 1365
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void print_double(double x) { printf("%g", x); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%g\00"
define void @print_double(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
long long int pw(long long int a, long long int b) {
  long long int r;
  if (b == 0)
    return 1;
  r = pw(a, b / 2);
  r = (r * r) % 1000000007;
  if (b % 2)
    r = (r * a) % 1000000007;
  return r;
}


x86 assembly (clang, -O0):
<pw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1138 <pw+0x28>
movq   $0x1,-0x8(%rbp)
jmp    11a4 <pw+0x94>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rsi
call   1030 <pw@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    $0x3b9aca07,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     119c <pw+0x8c>
mov    -0x20(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    $0x3b9aca07,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pw>:
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     117f <pw+0x6f>
mov    %rsi,%rbx
mov    %rdi,%r14
shr    $0x3f,%rsi
add    %rbx,%rsi
sar    %rsi
call   1030 <pw@plt>
mov    %rax,%rcx
imul   %rax,%rcx
movabs $0x89705f3112a28fe5,%rsi
5f 70 89
mov    %rcx,%rax
mul    %rsi
shr    $0x1d,%rdx
imul   $0x3b9aca07,%rdx,%rax
sub    %rax,%rcx
test   $0x1,%bl
je     1184 <pw+0x74>
imul   %r14,%rcx
mov    %rcx,%rax
imul   %rsi
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x1d,%rdx
add    %rax,%rdx
imul   $0x3b9aca07,%rdx,%rax
sub    %rax,%rcx
jmp    1184 <pw+0x74>
mov    $0x1,%ecx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @pw(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i64 1, i64* %3
br label %29
10: ; preds = %2
%11 = load i64, i64* %4
%12 = load i64, i64* %5
%13 = sdiv i64 %12, 2
%14 = call i64 @pw(i64 %11, i64 %13)
store i64 %14, i64* %6
%15 = load i64, i64* %6
%16 = load i64, i64* %6
%17 = mul nsw i64 %15, %16
%18 = srem i64 %17, 1000000007
store i64 %18, i64* %6
%19 = load i64, i64* %5
%20 = srem i64 %19, 2
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %10
%23 = load i64, i64* %6
%24 = load i64, i64* %4
%25 = mul nsw i64 %23, %24
%26 = srem i64 %25, 1000000007
store i64 %26, i64* %6
br label %27
27: ; preds = %22, %10
%28 = load i64, i64* %6
store i64 %28, i64* %3
br label %29
29: ; preds = %27, %9
%30 = load i64, i64* %3
ret i64 %30
}

LLVM IR (-O2):
define i64 @pw(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = sdiv i64 %1, 2
%6 = tail call i64 @pw(i64 %0, i64 %5)
%7 = mul nsw i64 %6, %6
%8 = urem i64 %7, 1000000007
%9 = and i64 %1, 1
%10 = icmp eq i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %4
%12 = mul nsw i64 %8, %0
%13 = srem i64 %12, 1000000007
br label %14
14: ; preds = %4, %11, %2
%15 = phi i64 [ 1, %2 ], [ %13, %11 ], [ %8, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
int /*<<< orphan*/ set_bios_reset();
void hard_reset(void) {
  set_bios_reset();
  outb(0x0a, 0x0cf9);
  outb(0x0e, 0x0cf9);
}


x86 assembly (clang, -O0):
<hard_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <set_bios_reset@plt>
mov    $0xa,%edi
mov    $0xcf9,%esi
call   1030 <outb@plt>
mov    $0xe,%edi
mov    $0xcf9,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hard_reset>:
push   %rax
xor    %eax,%eax
call   1040 <set_bios_reset@plt>
mov    $0xa,%edi
mov    $0xcf9,%esi
call   1030 <outb@plt>
mov    $0xe,%edi
mov    $0xcf9,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @hard_reset() {
%1 = call i32 (...) @set_bios_reset()
%2 = call i32 @outb(i32 10, i32 3321)
%3 = call i32 @outb(i32 14, i32 3321)
ret void
}

LLVM IR (-O2):
define void @hard_reset() {
%1 = tail call i32 (...) @set_bios_reset()
%2 = tail call i32 @outb(i32 10, i32 3321)
%3 = tail call i32 @outb(i32 14, i32 3321)
ret void
}
cfree(s) void *s;
{ free(s); }


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

x86 assembly (clang, -O2):
<cfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define i32 @cfree(i8* nocapture %0) {
tail call void @free(i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_reg_onhold_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::reg_onhold (rtpp_stream_reg_onhold) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stream_reg_onhold_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stream_reg_onhold_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [89 x i8] c"Method rtpp_stream@%p::reg_onhold (rtpp_stream_reg_onhold) is invoked after destruction\0A\00"
define void @rtpp_stream_reg_onhold_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [89 x i8] c"Method rtpp_stream@%p::reg_onhold (rtpp_stream_reg_onhold) is invoked after destruction\0A\00"
define void @rtpp_stream_reg_onhold_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void g_assertion_message_expr(const char *domain, const char *file, int line,
                              const char *func, const char *expr) {
  abort();
}


x86 assembly (clang, -O0):
<g_assertion_message_expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
define void @g_assertion_message_expr(i8* %0, i8* %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @g_assertion_message_expr(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
%6 = tail call i32 (...) @abort()
unreachable
}
double eval_ceq(double x, double y) { return x == y; }


x86 assembly (clang, -O0):
<eval_ceq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_ceq>:
cmpeqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @eval_ceq(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @eval_ceq(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
R0AX1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ r0 = (((char *)11111111)[x1]); }


x86 assembly (clang, -O0):
<R0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,1),%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @R0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %17
%19 = load i8, i8* %18
store i8 %19, i8* %8
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @R0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
ret i32 undef
}