#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 */
float RBR_ipowdist(int *, int *, int, int);
float sqrt(float);
float RBR_r_max_pep(int *Ro, int **coords, int ncoords, char *seq,
                    int PRECISION, int DIST_POWER) {
  int i, j;
  float R, distsq, dist;
  for (i = 0; i < ncoords; ++i) {
    distsq = RBR_ipowdist(coords[i], Ro, PRECISION, DIST_POWER);
    dist = sqrt(distsq);
    if (dist > R) {
      R = dist;
    }
  }
  return R;
}


x86 assembly (clang, -O0):
<RBR_r_max_pep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ad <RBR_r_max_pep+0x8d>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
call   1030 <RBR_ipowdist@plt>
movss  %xmm0,-0x38(%rbp)
movss  -0x38(%rbp),%xmm0
call   1040 <sqrt@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
ucomiss -0x34(%rbp),%xmm0
jbe    119a <RBR_r_max_pep+0x7a>
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    119f <RBR_r_max_pep+0x7f>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1146 <RBR_r_max_pep+0x26>
movss  -0x34(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RBR_r_max_pep>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    118b <RBR_r_max_pep+0x6b>
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %rsi,%r12
mov    %rdi,%r13
mov    %edx,%ebx
xor    %ebp,%ebp
jmp    116a <RBR_r_max_pep+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1040 <sqrt@plt>
maxss  0x4(%rsp),%xmm0
add    $0x1,%rbp
movss  %xmm0,0x4(%rsp)
cmp    %rbp,%rbx
je     118b <RBR_r_max_pep+0x6b>
mov    (%r12,%rbp,8),%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <RBR_ipowdist@plt>
ucomiss 0xe7d(%rip),%xmm0
jb     1150 <RBR_r_max_pep+0x30>
sqrtss %xmm0,%xmm0
jmp    1155 <RBR_r_max_pep+0x35>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define float @RBR_r_max_pep(i32* %0, i32** %1, i32 %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32**
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca float
%17 = alloca float
store i32* %0, i32** %7
store i32** %1, i32*** %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32 0, i32* %13
br label %18
18: ; preds = %40, %6
%19 = load i32, i32* %13
%20 = load i32, i32* %9
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %43
22: ; preds = %18
%23 = load i32**, i32*** %8
%24 = load i32, i32* %13
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32*, i32** %23, i64 %25
%27 = load i32*, i32** %26
%28 = load i32*, i32** %7
%29 = load i32, i32* %11
%30 = load i32, i32* %12
%31 = call float @RBR_ipowdist(i32* %27, i32* %28, i32 %29, i32 %30)
store float %31, float* %16
%32 = load float, float* %16
%33 = call float @sqrt(float %32)
store float %33, float* %17
%34 = load float, float* %17
%35 = load float, float* %15
%36 = fcmp ogt float %34, %35
br i1 %36, label %37, label %39
37: ; preds = %22
%38 = load float, float* %17
store float %38, float* %15
br label %39
39: ; preds = %37, %22
br label %40
40: ; preds = %39
%41 = load i32, i32* %13
%42 = add nsw i32 %41, 1
store i32 %42, i32* %13
br label %18
43: ; preds = %18
%44 = load float, float* %15
ret float %44
}

LLVM IR (-O2):
define float @RBR_r_max_pep(i32* %0, i32** nocapture %1, i32 %2, i8* nocapture readnone %3, i32 %4, i32 %5) {
%7 = icmp sgt i32 %2, 0
br i1 %7, label %8, label %21
8: ; preds = %6
%9 = zext i32 %2 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %19, %10 ]
%12 = phi float [ undef, %8 ], [ %18, %10 ]
%13 = getelementptr inbounds i32*, i32** %1, i64 %11
%14 = load i32*, i32** %13
%15 = tail call float @RBR_ipowdist(i32* %14, i32* %0, i32 %4, i32 %5)
%16 = tail call float @sqrt(float %15)
%17 = fcmp ogt float %16, %12
%18 = select i1 %17, float %16, float %12
%19 = add nuw nsw i64 %11, 1
%20 = icmp eq i64 %19, %9
br i1 %20, label %21, label %10
21: ; preds = %10, %6
%22 = phi float [ undef, %6 ], [ %18, %10 ]
ret float %22
}