#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 */
struct fitpars {
  int dummy;
};

/* Variables and functions */
float sqrt(double);
float getdel(int i, struct fitpars *fpar, double c) {
  if (i == 1 || i == 2)
    return (sqrt(c));
  if (i == 3)
    return (sqrt(c));
  if (i >= 4 && i <= 8)
    return (sqrt(c));
  if (i == 9)
    return (sqrt(c));
  if (i == 10.)
    return (sqrt(c));
}


x86 assembly (clang, -O0):
<getdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1138 <getdel+0x28>
cmpl   $0x2,-0x8(%rbp)
jne    114c <getdel+0x3c>
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11dc <getdel+0xcc>
cmpl   $0x3,-0x8(%rbp)
jne    116a <getdel+0x5a>
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11dc <getdel+0xcc>
cmpl   $0x4,-0x8(%rbp)
jl     1192 <getdel+0x82>
cmpl   $0x8,-0x8(%rbp)
jg     1192 <getdel+0x82>
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11dc <getdel+0xcc>
cmpl   $0x9,-0x8(%rbp)
jne    11b0 <getdel+0xa0>
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11dc <getdel+0xcc>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe43(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11dc <getdel+0xcc>
jp     11dc <getdel+0xcc>
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdel>:
add    $0xffffffff,%edi
cmp    $0x9,%edi
ja     111d <getdel+0xd>
jmp    1030 <sqrt@plt>
ret

LLVM IR (-O0):
%struct.fitpars = type { i32 }
define float @getdel(i32 %0, %struct.fitpars* %1, double %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca %struct.fitpars*
%7 = alloca double
store i32 %0, i32* %5
store %struct.fitpars* %1, %struct.fitpars** %6
store double %2, double* %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %10, %3
%14 = load double, double* %7
%15 = call float @sqrt(double %14)
store float %15, float* %4
br label %44
16: ; preds = %10
%17 = load i32, i32* %5
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load double, double* %7
%21 = call float @sqrt(double %20)
store float %21, float* %4
br label %44
22: ; preds = %16
%23 = load i32, i32* %5
%24 = icmp sge i32 %23, 4
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = load i32, i32* %5
%27 = icmp sle i32 %26, 8
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load double, double* %7
%30 = call float @sqrt(double %29)
store float %30, float* %4
br label %44
31: ; preds = %25, %22
%32 = load i32, i32* %5
%33 = icmp eq i32 %32, 9
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load double, double* %7
%36 = call float @sqrt(double %35)
store float %36, float* %4
br label %44
37: ; preds = %31
%38 = load i32, i32* %5
%39 = sitofp i32 %38 to double
%40 = fcmp oeq double %39, 1.000000e+01
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = load double, double* %7
%43 = call float @sqrt(double %42)
store float %43, float* %4
br label %44
44: ; preds = %13, %19, %28, %34, %41, %37
%45 = load float, float* %4
ret float %45
}

LLVM IR (-O2):
%struct.fitpars = type { i32 }
define float @getdel(i32 %0, %struct.fitpars* nocapture readnone %1, double %2) {
%4 = add i32 %0, -1
%5 = icmp ult i32 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call float @sqrt(double %2)
br label %8
8: ; preds = %3, %6
%9 = phi float [ %7, %6 ], [ undef, %3 ]
ret float %9
}