#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ jit_tmp_copy(double *, int, double *);
int jit_tmp_f0(const double **arg, double **res, long long int *iw, double *w,
               void *mem) {
  double *r;
  const double *s, *x;
  jit_tmp_copy(*arg++, 1, w);
  x = w;
  w += 1;
  jit_tmp_copy(*arg++, 1, w);
  s = w;
  w += 1;
  r = w;
  w += 1;
  r[0] = x[0];
  while (r[0] < s[0]) {
    r[0] *= r[0];
  }
  jit_tmp_copy(r, 1, *res++);
  return 0;
}


x86 assembly (clang, -O0):
<jit_tmp_f0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x1,%esi
call   1030 <jit_tmp_copy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x1,%esi
call   1030 <jit_tmp_copy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    11eb <jit_tmp_f0+0xdb>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    11b8 <jit_tmp_f0+0xa8>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rdx
mov    $0x1,%esi
call   1030 <jit_tmp_copy@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jit_tmp_f0>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%rdi
mov    $0x1,%esi
mov    %rcx,%rdx
call   1030 <jit_tmp_copy@plt>
lea    0x8(%rbx),%rdx
mov    0x8(%r15),%rdi
mov    $0x1,%esi
call   1030 <jit_tmp_copy@plt>
lea    0x10(%rbx),%rdi
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
ucomisd %xmm0,%xmm1
jbe    116a <jit_tmp_f0+0x5a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mulsd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
ja     1160 <jit_tmp_f0+0x50>
movsd  %xmm0,(%rdi)
mov    (%r14),%rdx
mov    $0x1,%esi
call   1030 <jit_tmp_copy@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @jit_tmp_f0(double** %0, double** %1, i64* %2, double* %3, i8* %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i64*
%9 = alloca double*
%10 = alloca i8*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
store double** %0, double*** %6
store double** %1, double*** %7
store i64* %2, i64** %8
store double* %3, double** %9
store i8* %4, i8** %10
%14 = load double**, double*** %6
%15 = getelementptr inbounds double*, double** %14, i32 1
store double** %15, double*** %6
%16 = load double*, double** %14
%17 = load double*, double** %9
%18 = call i32 @jit_tmp_copy(double* %16, i32 1, double* %17)
%19 = load double*, double** %9
store double* %19, double** %13
%20 = load double*, double** %9
%21 = getelementptr inbounds double, double* %20, i64 1
store double* %21, double** %9
%22 = load double**, double*** %6
%23 = getelementptr inbounds double*, double** %22, i32 1
store double** %23, double*** %6
%24 = load double*, double** %22
%25 = load double*, double** %9
%26 = call i32 @jit_tmp_copy(double* %24, i32 1, double* %25)
%27 = load double*, double** %9
store double* %27, double** %12
%28 = load double*, double** %9
%29 = getelementptr inbounds double, double* %28, i64 1
store double* %29, double** %9
%30 = load double*, double** %9
store double* %30, double** %11
%31 = load double*, double** %9
%32 = getelementptr inbounds double, double* %31, i64 1
store double* %32, double** %9
%33 = load double*, double** %13
%34 = getelementptr inbounds double, double* %33, i64 0
%35 = load double, double* %34
%36 = load double*, double** %11
%37 = getelementptr inbounds double, double* %36, i64 0
store double %35, double* %37
br label %38
38: ; preds = %46, %5
%39 = load double*, double** %11
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = load double*, double** %12
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = fcmp olt double %41, %44
br i1 %45, label %46, label %54
46: ; preds = %38
%47 = load double*, double** %11
%48 = getelementptr inbounds double, double* %47, i64 0
%49 = load double, double* %48
%50 = load double*, double** %11
%51 = getelementptr inbounds double, double* %50, i64 0
%52 = load double, double* %51
%53 = fmul double %52, %49
store double %53, double* %51
br label %38
54: ; preds = %38
%55 = load double*, double** %11
%56 = load double**, double*** %7
%57 = getelementptr inbounds double*, double** %56, i32 1
store double** %57, double*** %7
%58 = load double*, double** %56
%59 = call i32 @jit_tmp_copy(double* %55, i32 1, double* %58)
ret i32 0
}

LLVM IR (-O2):
define i32 @jit_tmp_f0(double** nocapture %0, double** nocapture %1, i64* nocapture readnone %2, double* %3, i8* nocapture readnone %4) {
%6 = getelementptr inbounds double*, double** %0, i64 1
%7 = load double*, double** %0
%8 = tail call i32 @jit_tmp_copy(double* %7, i32 1, double* %3)
%9 = getelementptr inbounds double, double* %3, i64 1
%10 = load double*, double** %6
%11 = tail call i32 @jit_tmp_copy(double* %10, i32 1, double* %9)
%12 = getelementptr inbounds double, double* %3, i64 2
%13 = load double, double* %3
%14 = load double, double* %9
%15 = fcmp olt double %13, %14
br i1 %15, label %16, label %20
16: ; preds = %5, %16
%17 = phi double [ %18, %16 ], [ %13, %5 ]
%18 = fmul double %17, %17
%19 = fcmp olt double %18, %14
br i1 %19, label %16, label %20
20: ; preds = %16, %5
%21 = phi double [ %13, %5 ], [ %18, %16 ]
store double %21, double* %12
%22 = load double*, double** %1
%23 = tail call i32 @jit_tmp_copy(double* %12, i32 1, double* %22)
ret i32 0
}