#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*/ printf(char *, int, int, double);
int scanf(char *, int *, int *, int *);
int main(void) {
  int a, b, c, kase = 0;
  while (scanf("%d %d %d", &a, &b, &c) == 3) {
    if (a == 0 && b == 0 && c == 0)
      break;
    printf("Case %d: %.*lf\n", ++kase, c, (double)a / b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
cmp    $0x3,%eax
jne    11a5 <main+0x85>
cmpl   $0x0,-0x8(%rbp)
jne    117a <main+0x5a>
cmpl   $0x0,-0xc(%rbp)
jne    117a <main+0x5a>
cmpl   $0x0,-0x10(%rbp)
jne    117a <main+0x5a>
jmp    11a5 <main+0x85>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%edx
cvtsi2sdl -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
cmp    $0x3,%eax
jne    11cd <main+0xad>
mov    $0x1,%ebx
lea    0xeaf(%rip),%r14
lea    0xe9f(%rip),%r15
lea    0x14(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0xc(%rsp),%rbp
jmp    11b5 <main+0x95>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
divsd  %xmm1,%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
call   1040 <scanf@plt>
add    $0x1,%ebx
cmp    $0x3,%eax
jne    11cd <main+0xad>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%edx
test   %eax,%eax
jne    1180 <main+0x60>
test   %ecx,%ecx
jne    1180 <main+0x60>
test   %edx,%edx
jne    1180 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [16 x i8] c"Case %d: %.*lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
br label %6
6: ; preds = %19, %0
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %29
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
br label %29
19: ; preds = %15, %12, %9
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
%22 = load i32, i32* %4
%23 = load i32, i32* %2
%24 = sitofp i32 %23 to double
%25 = load i32, i32* %3
%26 = sitofp i32 %25 to double
%27 = fdiv double %24, %26
%28 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %22, double %27)
br label %6
29: ; preds = %18, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [16 x i8] c"Case %d: %.*lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %27
9: ; preds = %0, %19
%10 = phi i32 [ %20, %19 ], [ 0, %0 ]
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 0
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 0
%15 = select i1 %12, i1 %14, i1 false
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 0
%18 = select i1 %15, i1 %17, i1 false
br i1 %18, label %27, label %19
19: ; preds = %9
%20 = add nuw nsw i32 %10, 1
%21 = sitofp i32 %11 to double
%22 = sitofp i32 %13 to double
%23 = fdiv double %21, %22
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %16, double %23)
%25 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%26 = icmp eq i32 %25, 3
br i1 %26, label %9, label %27
27: ; preds = %19, %9, %0
ret i32 0
}