#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*/ print_eight(double, double);
int /*<<< orphan*/ print_five(double, double);
int /*<<< orphan*/ print_four(double, double);
int /*<<< orphan*/ print_nine(double, double);
int /*<<< orphan*/ print_one(double, double);
int /*<<< orphan*/ print_seven(double, double);
int /*<<< orphan*/ print_six(double, double);
int /*<<< orphan*/ print_ten(double, double);
int /*<<< orphan*/ print_three(double, double);
int /*<<< orphan*/ print_two(double, double);
int /*<<< orphan*/ print_zero(double, double);
void print_label(int posn, double bordersize, int digit) {
  double y = ((17.5 + bordersize + 0.375) - ((posn + 1) * 1.375));
  switch (digit) {
  case 0:
    print_zero(bordersize, y);
    break;
  case 1:
    print_one(bordersize, y);
    break;
  case 2:
    print_two(bordersize, y);
    break;
  case 3:
    print_three(bordersize, y);
    break;
  case 4:
    print_four(bordersize, y);
    break;
  case 5:
    print_five(bordersize, y);
    break;
  case 6:
    print_six(bordersize, y);
    break;
  case 7:
    print_seven(bordersize, y);
    break;
  case 8:
    print_eight(bordersize, y);
    break;
  case 9:
    print_nine(bordersize, y);
    break;
  case 10:
    print_ten(bordersize, y);
    break;
  }
}


x86 assembly (clang, -O0):
<print_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe30(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe2c(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe1e(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0xa,%rax
ja     12fb <print_label+0x14b>
mov    -0x28(%rbp),%rax
lea    0xdfd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1040 <print_zero@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10a0 <print_one@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10d0 <print_two@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1060 <print_three@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1080 <print_four@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10b0 <print_five@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1090 <print_six@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1050 <print_seven@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10c0 <print_eight@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <print_nine@plt>
jmp    12fb <print_label+0x14b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1070 <print_ten@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_label>:
cmp    $0xa,%esi
ja     11f3 <print_label+0x43>
movsd  0xe43(%rip),%xmm2
addsd  %xmm0,%xmm2
addsd  0xe3f(%rip),%xmm2
add    $0x1,%edi
cvtsi2sd %edi,%xmm1
mulsd  0xe38(%rip),%xmm1
addsd  %xmm2,%xmm1
mov    %esi,%eax
lea    0xe33(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1040 <print_zero@plt>
ret
jmp    10a0 <print_one@plt>
jmp    10d0 <print_two@plt>
jmp    1060 <print_three@plt>
jmp    1080 <print_four@plt>
jmp    10b0 <print_five@plt>
jmp    1090 <print_six@plt>
jmp    1050 <print_seven@plt>
jmp    10c0 <print_eight@plt>
jmp    1030 <print_nine@plt>
jmp    1070 <print_ten@plt>

LLVM IR (-O0):
define void @print_label(i32 %0, double %1, i32 %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
%7 = alloca double
store i32 %0, i32* %4
store double %1, double* %5
store i32 %2, i32* %6
%8 = load double, double* %5
%9 = fadd double 1.750000e+01, %8
%10 = fadd double %9, 3.750000e-01
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
%13 = sitofp i32 %12 to double
%14 = fneg double %13
%15 = call double @llvm.fmuladd.f64(double %14, double 1.375000e+00, double %10)
store double %15, double* %7
%16 = load i32, i32* %6
switch i32 %16, label %61 [
i32 0, label %17
i32 1, label %21
i32 2, label %25
i32 3, label %29
i32 4, label %33
i32 5, label %37
i32 6, label %41
i32 7, label %45
i32 8, label %49
i32 9, label %53
i32 10, label %57
]
17: ; preds = %3
%18 = load double, double* %5
%19 = load double, double* %7
%20 = call i32 @print_zero(double %18, double %19)
br label %61
21: ; preds = %3
%22 = load double, double* %5
%23 = load double, double* %7
%24 = call i32 @print_one(double %22, double %23)
br label %61
25: ; preds = %3
%26 = load double, double* %5
%27 = load double, double* %7
%28 = call i32 @print_two(double %26, double %27)
br label %61
29: ; preds = %3
%30 = load double, double* %5
%31 = load double, double* %7
%32 = call i32 @print_three(double %30, double %31)
br label %61
33: ; preds = %3
%34 = load double, double* %5
%35 = load double, double* %7
%36 = call i32 @print_four(double %34, double %35)
br label %61
37: ; preds = %3
%38 = load double, double* %5
%39 = load double, double* %7
%40 = call i32 @print_five(double %38, double %39)
br label %61
41: ; preds = %3
%42 = load double, double* %5
%43 = load double, double* %7
%44 = call i32 @print_six(double %42, double %43)
br label %61
45: ; preds = %3
%46 = load double, double* %5
%47 = load double, double* %7
%48 = call i32 @print_seven(double %46, double %47)
br label %61
49: ; preds = %3
%50 = load double, double* %5
%51 = load double, double* %7
%52 = call i32 @print_eight(double %50, double %51)
br label %61
53: ; preds = %3
%54 = load double, double* %5
%55 = load double, double* %7
%56 = call i32 @print_nine(double %54, double %55)
br label %61
57: ; preds = %3
%58 = load double, double* %5
%59 = load double, double* %7
%60 = call i32 @print_ten(double %58, double %59)
br label %61
61: ; preds = %3, %57, %53, %49, %45, %41, %37, %33, %29, %25, %21, %17
ret void
}

LLVM IR (-O2):
define void @print_label(i32 %0, double %1, i32 %2) {
%4 = fadd double %1, 1.750000e+01
%5 = fadd double %4, 3.750000e-01
%6 = add nsw i32 %0, 1
%7 = sitofp i32 %6 to double
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 1.375000e+00, double %5)
switch i32 %2, label %32 [
i32 0, label %10
i32 1, label %12
i32 2, label %14
i32 3, label %16
i32 4, label %18
i32 5, label %20
i32 6, label %22
i32 7, label %24
i32 8, label %26
i32 9, label %28
i32 10, label %30
]
10: ; preds = %3
%11 = tail call i32 @print_zero(double %1, double %9)
br label %32
12: ; preds = %3
%13 = tail call i32 @print_one(double %1, double %9)
br label %32
14: ; preds = %3
%15 = tail call i32 @print_two(double %1, double %9)
br label %32
16: ; preds = %3
%17 = tail call i32 @print_three(double %1, double %9)
br label %32
18: ; preds = %3
%19 = tail call i32 @print_four(double %1, double %9)
br label %32
20: ; preds = %3
%21 = tail call i32 @print_five(double %1, double %9)
br label %32
22: ; preds = %3
%23 = tail call i32 @print_six(double %1, double %9)
br label %32
24: ; preds = %3
%25 = tail call i32 @print_seven(double %1, double %9)
br label %32
26: ; preds = %3
%27 = tail call i32 @print_eight(double %1, double %9)
br label %32
28: ; preds = %3
%29 = tail call i32 @print_nine(double %1, double %9)
br label %32
30: ; preds = %3
%31 = tail call i32 @print_ten(double %1, double %9)
br label %32
32: ; preds = %3, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10
ret void
}