#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 */
typedef int /*<<< orphan*/ total;

/* Variables and functions */
int /*<<< orphan*/ memset(unsigned long long *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, double, unsigned long long);
scalar_t__ scanf(char *, double *);
main() {
  unsigned long long total[6200];
  int i, j, k, l, m;
  int V[] = {2000, 1000, 400, 200, 100, 40, 20, 10, 4, 2, 1};
  memset(total, 0, sizeof(total));
  total[0] = 1;
  for (i = 10; i >= 0; i--)
    for (j = 1; j <= 6000; j++)
      if (j >= V[i])
        total[j] += total[j - V[i]];
  double in;
  while (scanf("%lf", &in)) {
    if (in < 1e-6)
      break;
    int s = (int)(in * 20);
    printf("%6.2lf%17llu\n", in, total[s]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc220,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc210(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
lea    -0xc1d0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc1c0,%edx
call   1040 <memset@plt>
movq   $0x1,-0xc1d0(%rbp)
movl   $0xa,-0xc1d4(%rbp)
cmpl   $0x0,-0xc1d4(%rbp)
jl     123a <main+0xfa>
movl   $0x1,-0xc1d8(%rbp)
cmpl   $0x1770,-0xc1d8(%rbp)
jg     1221 <main+0xe1>
mov    -0xc1d8(%rbp),%eax
movslq -0xc1d4(%rbp),%rcx
cmp    -0xc210(%rbp,%rcx,4),%eax
jl     1208 <main+0xc8>
mov    -0xc1d8(%rbp),%eax
movslq -0xc1d4(%rbp),%rcx
sub    -0xc210(%rbp,%rcx,4),%eax
cltq
mov    -0xc1d0(%rbp,%rax,8),%rcx
ff
movslq -0xc1d8(%rbp),%rax
add    -0xc1d0(%rbp,%rax,8),%rcx
ff
mov    %rcx,-0xc1d0(%rbp,%rax,8)
ff
jmp    120d <main+0xcd>
mov    -0xc1d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc1d8(%rbp)
jmp    11a9 <main+0x69>
jmp    1226 <main+0xe6>
mov    -0xc1d4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc1d4(%rbp)
jmp    1192 <main+0x52>
jmp    123f <main+0xff>
lea    0xdf6(%rip),%rdi
lea    -0xc218(%rbp),%rsi
call   1060 <scanf@plt>
cmp    $0x0,%rax
je     12b9 <main+0x179>
movsd  0xd9c(%rip),%xmm0
ucomisd -0xc218(%rbp),%xmm0
ff
jbe    1277 <main+0x137>
jmp    12b9 <main+0x179>
movsd  0xd89(%rip),%xmm0
mulsd  -0xc218(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0xc21c(%rbp)
movsd  -0xc218(%rbp),%xmm0
ff
movslq -0xc21c(%rbp),%rax
mov    -0xc1d0(%rbp,%rax,8),%rsi
ff
lea    0xd91(%rip),%rdi
call   1030 <printf@plt>
jmp    123f <main+0xff>
xor    %eax,%eax
add    $0xc220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xc1d0,%rsp
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0xc1c0,%edx
call   1040 <memset@plt>
movq   $0x1,0x10(%rsp)
mov    $0xa,%eax
lea    0x18(%rsp),%r8
lea    0xea9(%rip),%r9
jmp    1176 <main+0x46>
nopl   0x0(%rax)
sub    $0x1,%rax
jb     11c3 <main+0x93>
movslq (%r9,%rax,4),%rsi
lea    0x0(,%rsi,8),%rcx
mov    %r8,%rdi
sub    %rcx,%rdi
mov    $0x1,%ecx
jmp    11a0 <main+0x70>
nop
add    $0x1,%rbx
mov    %rbx,%rcx
cmp    $0x1771,%rbx
je     1170 <main+0x40>
cmp    %rsi,%rcx
jl     11af <main+0x7f>
mov    -0x8(%rdi,%rcx,8),%rbx
add    %rbx,0x10(%rsp,%rcx,8)
lea    0x1(%rcx),%rbx
cmp    %rsi,%rbx
jl     1190 <main+0x60>
mov    (%rdi,%rcx,8),%rdx
add    %rdx,0x18(%rsp,%rcx,8)
jmp    1190 <main+0x60>
lea    0xe72(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
test   %rax,%rax
je     1243 <main+0x113>
movsd  0x8(%rsp),%xmm0
movsd  0xe19(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1243 <main+0x113>
lea    0xe4c(%rip),%r14
lea    0xe41(%rip),%r15
lea    0x8(%rsp),%rbx
movapd %xmm0,%xmm1
mulsd  0xdfc(%rip),%xmm1
cvttsd2si %xmm1,%eax
cltq
mov    0x10(%rsp,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
test   %rax,%rax
je     1243 <main+0x113>
movsd  0x8(%rsp),%xmm0
movsd  0xdc3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1200 <main+0xd0>
xor    %eax,%eax
add    $0xc1d0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.V = [11 x i32] [i32 2000, i32 1000, i32 400, i32 200, i32 100, i32 40, i32 20, i32 10, i32 4, i32 2, i32 1]
@.str = [4 x i8] c"%lf\00"
@.str.1 = [14 x i8] c"%6.2lf%17llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6200 x i64]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [11 x i32]
%9 = alloca double
%10 = alloca i32
store i32 0, i32* %1
%11 = bitcast [11 x i32]* %8 to i8*
%12 = getelementptr inbounds [6200 x i64], [6200 x i64]* %2, i64 0, i64 0
%13 = call i32 @memset(i64* %12, i32 0, i32 49600)
%14 = getelementptr inbounds [6200 x i64], [6200 x i64]* %2, i64 0, i64 0
store i64 1, i64* %14
store i32 10, i32* %3
br label %15
15: ; preds = %49, %0
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 0
br i1 %17, label %18, label %52
18: ; preds = %15
store i32 1, i32* %4
br label %19
19: ; preds = %45, %18
%20 = load i32, i32* %4
%21 = icmp sle i32 %20, 6000
br i1 %21, label %22, label %48
22: ; preds = %19
%23 = load i32, i32* %4
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [11 x i32], [11 x i32]* %8, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = icmp sge i32 %23, %27
br i1 %28, label %29, label %44
29: ; preds = %22
%30 = load i32, i32* %4
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [11 x i32], [11 x i32]* %8, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = sub nsw i32 %30, %34
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [6200 x i64], [6200 x i64]* %2, i64 0, i64 %36
%38 = load i64, i64* %37
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [6200 x i64], [6200 x i64]* %2, i64 0, i64 %40
%42 = load i64, i64* %41
%43 = add i64 %42, %38
store i64 %43, i64* %41
br label %44
44: ; preds = %29, %22
br label %45
45: ; preds = %44
%46 = load i32, i32* %4
%47 = add nsw i32 %46, 1
store i32 %47, i32* %4
br label %19
48: ; preds = %19
br label %49
49: ; preds = %48
%50 = load i32, i32* %3
%51 = add nsw i32 %50, -1
store i32 %51, i32* %3
br label %15
52: ; preds = %15
br label %53
53: ; preds = %60, %52
%54 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %9)
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %70
56: ; preds = %53
%57 = load double, double* %9
%58 = fcmp olt double %57, 0x3EB0C6F7A0B5ED8D
br i1 %58, label %59, label %60
59: ; preds = %56
br label %70
60: ; preds = %56
%61 = load double, double* %9
%62 = fmul double %61, 2.000000e+01
%63 = fptosi double %62 to i32
store i32 %63, i32* %10
%64 = load double, double* %9
%65 = load i32, i32* %10
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [6200 x i64], [6200 x i64]* %2, i64 0, i64 %66
%68 = load i64, i64* %67
%69 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %64, i64 %68)
br label %53
70: ; preds = %59, %53
ret i32 0
}

LLVM IR (-O2):
@__const.main.V = [11 x i32] [i32 2000, i32 1000, i32 400, i32 200, i32 100, i32 40, i32 20, i32 10, i32 4, i32 2, i32 1]
@.str = [4 x i8] c"%lf\00"
@.str.1 = [14 x i8] c"%6.2lf%17llu\0A\00"
define i32 @main() {
%1 = alloca [6200 x i64]
%2 = alloca double
%3 = bitcast [6200 x i64]* %1 to i8*
%4 = getelementptr inbounds [6200 x i64], [6200 x i64]* %1, i64 0, i64 0
%5 = call i32 @memset(i64* %4, i32 0, i32 49600)
store i64 1, i64* %4
br label %6
6: ; preds = %0, %34
%7 = phi i64 [ 10, %0 ], [ %35, %34 ]
%8 = getelementptr inbounds [11 x i32], [11 x i32]* @__const.main.V, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
br label %11
11: ; preds = %31, %6
%12 = phi i64 [ 1, %6 ], [ %32, %31 ]
%13 = icmp slt i64 %12, %10
br i1 %13, label %21, label %14
14: ; preds = %11
%15 = sub nsw i64 %12, %10
%16 = getelementptr inbounds [6200 x i64], [6200 x i64]* %1, i64 0, i64 %15
%17 = load i64, i64* %16
%18 = getelementptr inbounds [6200 x i64], [6200 x i64]* %1, i64 0, i64 %12
%19 = load i64, i64* %18
%20 = add i64 %19, %17
store i64 %20, i64* %18
br label %21
21: ; preds = %11, %14
%22 = add nuw nsw i64 %12, 1
%23 = icmp slt i64 %22, %10
br i1 %23, label %31, label %24
24: ; preds = %21
%25 = sub nsw i64 %22, %10
%26 = getelementptr inbounds [6200 x i64], [6200 x i64]* %1, i64 0, i64 %25
%27 = load i64, i64* %26
%28 = getelementptr inbounds [6200 x i64], [6200 x i64]* %1, i64 0, i64 %22
%29 = load i64, i64* %28
%30 = add i64 %29, %27
store i64 %30, i64* %28
br label %31
31: ; preds = %24, %21
%32 = add nuw nsw i64 %12, 2
%33 = icmp eq i64 %32, 6001
br i1 %33, label %34, label %11
34: ; preds = %31
%35 = add nsw i64 %7, -1
%36 = icmp eq i64 %7, 0
br i1 %36, label %37, label %6
37: ; preds = %34
%38 = bitcast double* %2 to i8*
%39 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%40 = icmp eq i64 %39, 0
%41 = load double, double* %2
%42 = fcmp olt double %41, 0x3EB0C6F7A0B5ED8D
%43 = select i1 %40, i1 true, i1 %42
br i1 %43, label %57, label %44
44: ; preds = %37, %44
%45 = phi double [ %54, %44 ], [ %41, %37 ]
%46 = fmul double %45, 2.000000e+01
%47 = fptosi double %46 to i32
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [6200 x i64], [6200 x i64]* %1, i64 0, i64 %48
%50 = load i64, i64* %49
%51 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %45, i64 %50)
%52 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%53 = icmp eq i64 %52, 0
%54 = load double, double* %2
%55 = fcmp olt double %54, 0x3EB0C6F7A0B5ED8D
%56 = select i1 %53, i1 true, i1 %55
br i1 %56, label %57, label %44
57: ; preds = %44, %37
ret i32 0
}