void grace_get_landscape_view_y_minimum_offset_and_increment(
    double *view_min_y, double *view_y_offset, double *view_y_increment,
    float starting_single_view_min_y, float starting_view_min_y,
    int graph_list_length) {
  if (graph_list_length == 1) {
    *view_min_y = starting_single_view_min_y;
    *view_y_increment = 0.0;
    *view_y_offset = 0.46;
  } else if (graph_list_length == 2) {
    *view_min_y = starting_view_min_y;
    *view_y_increment = 0.44;
    *view_y_offset = 0.375;
  } else if (graph_list_length == 3) {
    *view_min_y = starting_view_min_y;
    *view_y_increment = 0.30;
    *view_y_offset = 0.23;
  } else if (graph_list_length == 4) {
    *view_min_y = starting_view_min_y;
    *view_y_increment = 0.23;
    *view_y_offset = 0.16;
  } else if (graph_list_length == 5) {
    *view_min_y = starting_view_min_y;
    *view_y_increment = 0.175;
    *view_y_offset = 0.12;
  } else {
    *view_min_y = starting_view_min_y;
    *view_y_increment = 0.75 / (double)graph_list_length;
    *view_y_offset = 0.60 / (double)graph_list_length;
  }
}


x86 assembly (clang, -O0):
<grace_get_landscape_view_y_minimum_offset_and_increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  %xmm1,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    1158 <grace_get_landscape_view_y_minimum_offset_and_increment+0x58>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xef9(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    12af <grace_get_landscape_view_y_minimum_offset_and_increment+0x1af>
cmpl   $0x2,-0x24(%rbp)
jne    1198 <grace_get_landscape_view_y_minimum_offset_and_increment+0x98>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    12aa <grace_get_landscape_view_y_minimum_offset_and_increment+0x1aa>
cmpl   $0x3,-0x24(%rbp)
jne    11d8 <grace_get_landscape_view_y_minimum_offset_and_increment+0xd8>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe71(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe59(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    12a5 <grace_get_landscape_view_y_minimum_offset_and_increment+0x1a5>
cmpl   $0x4,-0x24(%rbp)
jne    1218 <grace_get_landscape_view_y_minimum_offset_and_increment+0x118>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe29(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe11(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    12a0 <grace_get_landscape_view_y_minimum_offset_and_increment+0x1a0>
cmpl   $0x5,-0x24(%rbp)
jne    1258 <grace_get_landscape_view_y_minimum_offset_and_increment+0x158>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xdd9(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xdc1(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    129b <grace_get_landscape_view_y_minimum_offset_and_increment+0x19b>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  0xd92(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  0xd71(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    12a0 <grace_get_landscape_view_y_minimum_offset_and_increment+0x1a0>
jmp    12a5 <grace_get_landscape_view_y_minimum_offset_and_increment+0x1a5>
jmp    12aa <grace_get_landscape_view_y_minimum_offset_and_increment+0x1aa>
jmp    12af <grace_get_landscape_view_y_minimum_offset_and_increment+0x1af>
pop    %rbp
ret

x86 assembly (clang, -O2):
<grace_get_landscape_view_y_minimum_offset_and_increment>:
lea    -0x1(%rcx),%eax
cmp    $0x4,%eax
ja     1134 <grace_get_landscape_view_y_minimum_offset_and_increment+0x34>
lea    0xf29(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rdi)
movq   $0x0,(%rdx)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,(%rdi)
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movsd  0xeda(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx)
movsd  0xed2(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi)
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,(%rdi)
movabs $0x3fdc28f5c28f5c29,%rax
28 dc 3f
mov    %rax,(%rdx)
movsd  0xe91(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,(%rdi)
movabs $0x3fd3333333333333,%rax
33 d3 3f
mov    %rax,(%rdx)
movsd  0xe64(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,(%rdi)
movabs $0x3fcd70a3d70a3d71,%rax
70 cd 3f
mov    %rax,(%rdx)
movsd  0xe37(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,(%rdi)
movabs $0x3fc6666666666666,%rax
66 c6 3f
mov    %rax,(%rdx)
movsd  0xe0a(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @grace_get_landscape_view_y_minimum_offset_and_increment(double* %0, double* %1, double* %2, float %3, float %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca float
%11 = alloca float
%12 = alloca i32
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store float %3, float* %10
store float %4, float* %11
store i32 %5, i32* %12
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %21
15: ; preds = %6
%16 = load float, float* %10
%17 = fpext float %16 to double
%18 = load double*, double** %7
store double %17, double* %18
%19 = load double*, double** %9
store double 0.000000e+00, double* %19
%20 = load double*, double** %8
store double 4.600000e-01, double* %20
br label %73
21: ; preds = %6
%22 = load i32, i32* %12
%23 = icmp eq i32 %22, 2
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load float, float* %11
%26 = fpext float %25 to double
%27 = load double*, double** %7
store double %26, double* %27
%28 = load double*, double** %9
store double 4.400000e-01, double* %28
%29 = load double*, double** %8
store double 3.750000e-01, double* %29
br label %72
30: ; preds = %21
%31 = load i32, i32* %12
%32 = icmp eq i32 %31, 3
br i1 %32, label %33, label %39
33: ; preds = %30
%34 = load float, float* %11
%35 = fpext float %34 to double
%36 = load double*, double** %7
store double %35, double* %36
%37 = load double*, double** %9
store double 3.000000e-01, double* %37
%38 = load double*, double** %8
store double 2.300000e-01, double* %38
br label %71
39: ; preds = %30
%40 = load i32, i32* %12
%41 = icmp eq i32 %40, 4
br i1 %41, label %42, label %48
42: ; preds = %39
%43 = load float, float* %11
%44 = fpext float %43 to double
%45 = load double*, double** %7
store double %44, double* %45
%46 = load double*, double** %9
store double 2.300000e-01, double* %46
%47 = load double*, double** %8
store double 1.600000e-01, double* %47
br label %70
48: ; preds = %39
%49 = load i32, i32* %12
%50 = icmp eq i32 %49, 5
br i1 %50, label %51, label %57
51: ; preds = %48
%52 = load float, float* %11
%53 = fpext float %52 to double
%54 = load double*, double** %7
store double %53, double* %54
%55 = load double*, double** %9
store double 1.750000e-01, double* %55
%56 = load double*, double** %8
store double 1.200000e-01, double* %56
br label %69
57: ; preds = %48
%58 = load float, float* %11
%59 = fpext float %58 to double
%60 = load double*, double** %7
store double %59, double* %60
%61 = load i32, i32* %12
%62 = sitofp i32 %61 to double
%63 = fdiv double 7.500000e-01, %62
%64 = load double*, double** %9
store double %63, double* %64
%65 = load i32, i32* %12
%66 = sitofp i32 %65 to double
%67 = fdiv double 6.000000e-01, %66
%68 = load double*, double** %8
store double %67, double* %68
br label %69
69: ; preds = %57, %51
br label %70
70: ; preds = %69, %42
br label %71
71: ; preds = %70, %33
br label %72
72: ; preds = %71, %24
br label %73
73: ; preds = %72, %15
ret void
}

LLVM IR (-O2):
define void @grace_get_landscape_view_y_minimum_offset_and_increment(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, float %3, float %4, i32 %5) {
switch i32 %5, label %17 [
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
]
7: ; preds = %6
%8 = fpext float %3 to double
store double %8, double* %0
store double 0.000000e+00, double* %2
br label %22
9: ; preds = %6
%10 = fpext float %4 to double
store double %10, double* %0
store double 4.400000e-01, double* %2
br label %22
11: ; preds = %6
%12 = fpext float %4 to double
store double %12, double* %0
store double 3.000000e-01, double* %2
br label %22
13: ; preds = %6
%14 = fpext float %4 to double
store double %14, double* %0
store double 2.300000e-01, double* %2
br label %22
15: ; preds = %6
%16 = fpext float %4 to double
store double %16, double* %0
store double 1.750000e-01, double* %2
br label %22
17: ; preds = %6
%18 = fpext float %4 to double
store double %18, double* %0
%19 = sitofp i32 %5 to double
%20 = fdiv double 7.500000e-01, %19
store double %20, double* %2
%21 = fdiv double 6.000000e-01, %19
br label %22
22: ; preds = %9, %13, %17, %15, %11, %7
%23 = phi double [ 3.750000e-01, %9 ], [ 1.600000e-01, %13 ], [ %21, %17 ], [ 1.200000e-01, %15 ], [ 2.300000e-01, %11 ], [ 4.600000e-01, %7 ]
store double %23, double* %1
ret void
}