#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*/ SetPointSize(int);
double setBlockSize(int resolution) {
  double BSize;
  int size;
  if (resolution == 50) {
    BSize = 0.0558;
    size = 1;
  } else if (resolution == 100) {
    BSize = 0.115;
    size = 2;
  } else if (resolution == 200) {
    BSize = 0.23;
    size = 4;
  } else if (resolution == 350) {
    BSize = 0.46;
    size = 8;
  } else if (resolution == 500) {
    BSize = 0.92;
    size = 14;
  }
  SetPointSize(size);
  return (BSize);
}


x86 assembly (clang, -O0):
<setBlockSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jne    113e <setBlockSize+0x2e>
movsd  0xef3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    11e2 <setBlockSize+0xd2>
cmpl   $0x64,-0x4(%rbp)
jne    1161 <setBlockSize+0x51>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
jmp    11dd <setBlockSize+0xcd>
cmpl   $0xc8,-0x4(%rbp)
jne    1187 <setBlockSize+0x77>
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
jmp    11d8 <setBlockSize+0xc8>
cmpl   $0x15e,-0x4(%rbp)
jne    11ad <setBlockSize+0x9d>
movsd  0xe6c(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
jmp    11d3 <setBlockSize+0xc3>
cmpl   $0x1f4,-0x4(%rbp)
jne    11ce <setBlockSize+0xbe>
movsd  0xe3e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0xe,-0x14(%rbp)
jmp    11d3 <setBlockSize+0xc3>
jmp    11d8 <setBlockSize+0xc8>
jmp    11dd <setBlockSize+0xcd>
jmp    11e2 <setBlockSize+0xd2>
mov    -0x14(%rbp),%edi
call   1030 <SetPointSize@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBlockSize>:
push   %rax
mov    %edi,%eax
mov    $0x1,%edi
movsd  0xee0(%rip),%xmm0
cmp    $0x15d,%eax
jg     1142 <setBlockSize+0x32>
cmp    $0x64,%eax
je     115f <setBlockSize+0x4f>
cmp    $0xc8,%eax
jne    117b <setBlockSize+0x6b>
mov    $0x4,%edi
movsd  0xed0(%rip),%xmm0
jmp    117b <setBlockSize+0x6b>
cmp    $0x15e,%eax
je     116e <setBlockSize+0x5e>
cmp    $0x1f4,%eax
jne    117b <setBlockSize+0x6b>
mov    $0xe,%edi
movsd  0xec3(%rip),%xmm0
jmp    117b <setBlockSize+0x6b>
mov    $0x2,%edi
movsd  0xeac(%rip),%xmm0
jmp    117b <setBlockSize+0x6b>
mov    $0x8,%edi
movsd  0xe8d(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <SetPointSize@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @setBlockSize(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 50
br i1 %6, label %7, label %8
7: ; preds = %1
store double 5.580000e-02, double* %3
store i32 1, i32* %4
br label %28
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 100
br i1 %10, label %11, label %12
11: ; preds = %8
store double 1.150000e-01, double* %3
store i32 2, i32* %4
br label %27
12: ; preds = %8
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 200
br i1 %14, label %15, label %16
15: ; preds = %12
store double 2.300000e-01, double* %3
store i32 4, i32* %4
br label %26
16: ; preds = %12
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 350
br i1 %18, label %19, label %20
19: ; preds = %16
store double 4.600000e-01, double* %3
store i32 8, i32* %4
br label %25
20: ; preds = %16
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 500
br i1 %22, label %23, label %24
23: ; preds = %20
store double 9.200000e-01, double* %3
store i32 14, i32* %4
br label %24
24: ; preds = %23, %20
br label %25
25: ; preds = %24, %19
br label %26
26: ; preds = %25, %15
br label %27
27: ; preds = %26, %11
br label %28
28: ; preds = %27, %7
%29 = load i32, i32* %4
%30 = call i32 @SetPointSize(i32 %29)
%31 = load double, double* %3
ret double %31
}

LLVM IR (-O2):
define double @setBlockSize(i32 %0) {
switch i32 %0, label %6 [
i32 500, label %5
i32 100, label %2
i32 200, label %3
i32 350, label %4
]
2: ; preds = %1
br label %6
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %2, %4, %5, %3
%7 = phi double [ 1.150000e-01, %2 ], [ 2.300000e-01, %3 ], [ 4.600000e-01, %4 ], [ 9.200000e-01, %5 ], [ 5.580000e-02, %1 ]
%8 = phi i32 [ 2, %2 ], [ 4, %3 ], [ 8, %4 ], [ 14, %5 ], [ 1, %1 ]
%9 = tail call i32 @SetPointSize(i32 %8)
ret double %7
}