#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char time;
  float Hand_hour, Hour, Hand_minute, Minute, Angle_between;
  while (1) {
    scanf("%f", &Hour);
    scanf("%c", &time);
    scanf("%f", &Minute);
    Hand_hour = 30 * Hour;
    Hand_minute = 5.5 * Minute;
    if (!Hand_hour && !Hand_minute)
      break;
    if (Hand_hour > Hand_minute)
      Angle_between = Hand_hour - Hand_minute;
    else
      Angle_between = Hand_minute - Hand_hour;
    if (Angle_between > 180)
      Angle_between = 360 - Angle_between;
    printf("%.3f\n", Angle_between);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe9b(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11c8 <main+0xa8>
jp     11c8 <main+0xa8>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11c8 <main+0xa8>
jp     11c8 <main+0xa8>
jmp    1238 <main+0x118>
movss  -0xc(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11eb <main+0xcb>
movss  -0xc(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    11fa <main+0xda>
movss  -0x14(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  0xe05(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1222 <main+0x102>
movss  0xdf8(%rip),%xmm0
subss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    0xdec(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
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    0xedb(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec8(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
mulss  0xe8c(%rip),%xmm0
movss  0x10(%rsp),%xmm1
mulss  0xe82(%rip),%xmm1
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    1197 <main+0x77>
jp     1197 <main+0x77>
ucomiss %xmm2,%xmm1
jne    1197 <main+0x77>
jnp    126a <main+0x14a>
lea    0xe78(%rip),%r14
lea    0xe6b(%rip),%rbx
lea    0x14(%rsp),%r15
lea    0xe62(%rip),%r12
lea    0xf(%rsp),%r13
lea    0x10(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
movaps %xmm1,%xmm3
subss  %xmm0,%xmm3
cmpltss %xmm0,%xmm1
andps  %xmm1,%xmm2
andnps %xmm3,%xmm1
orps   %xmm2,%xmm1
movss  0xe24(%rip),%xmm2
subss  %xmm1,%xmm2
movss  0xe1c(%rip),%xmm0
cmpltss %xmm1,%xmm0
andps  %xmm0,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
xorps  %xmm2,%xmm2
movss  0x14(%rsp),%xmm0
mulss  0xdc2(%rip),%xmm0
movss  0x10(%rsp),%xmm1
mulss  0xdb8(%rip),%xmm1
ucomiss %xmm2,%xmm0
jne    11c0 <main+0xa0>
jp     11c0 <main+0xa0>
ucomiss %xmm2,%xmm1
jne    11c0 <main+0xa0>
jp     11c0 <main+0xa0>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
br label %8
8: ; preds = %0, %42
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%12 = load float, float* %4
%13 = fmul float 3.000000e+01, %12
store float %13, float* %3
%14 = load float, float* %6
%15 = fpext float %14 to double
%16 = fmul double 5.500000e+00, %15
%17 = fptrunc double %16 to float
store float %17, float* %5
%18 = load float, float* %3
%19 = fcmp une float %18, 0.000000e+00
br i1 %19, label %24, label %20
20: ; preds = %8
%21 = load float, float* %5
%22 = fcmp une float %21, 0.000000e+00
br i1 %22, label %24, label %23
23: ; preds = %20
br label %45
24: ; preds = %20, %8
%25 = load float, float* %3
%26 = load float, float* %5
%27 = fcmp ogt float %25, %26
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = load float, float* %3
%30 = load float, float* %5
%31 = fsub float %29, %30
store float %31, float* %7
br label %36
32: ; preds = %24
%33 = load float, float* %5
%34 = load float, float* %3
%35 = fsub float %33, %34
store float %35, float* %7
br label %36
36: ; preds = %32, %28
%37 = load float, float* %7
%38 = fcmp ogt float %37, 1.800000e+02
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = load float, float* %7
%41 = fsub float 3.600000e+02, %40
store float %41, float* %7
br label %42
42: ; preds = %39, %36
%43 = load float, float* %7
%44 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %43)
br label %8
45: ; preds = %23
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %2 to i8*
%5 = bitcast float* %3 to i8*
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%9 = load float, float* %2
%10 = fmul float %9, 3.000000e+01
%11 = load float, float* %3
%12 = fmul float %11, 5.500000e+00
%13 = fcmp une float %10, 0.000000e+00
%14 = fcmp une float %12, 0.000000e+00
%15 = select i1 %13, i1 true, i1 %14
br i1 %15, label %16, label %37
16: ; preds = %0, %16
%17 = phi float [ %33, %16 ], [ %12, %0 ]
%18 = phi float [ %31, %16 ], [ %10, %0 ]
%19 = fcmp ogt float %18, %17
%20 = fsub float %18, %17
%21 = fsub float %17, %18
%22 = select i1 %19, float %20, float %21
%23 = fcmp ogt float %22, 1.800000e+02
%24 = fsub float 3.600000e+02, %22
%25 = select i1 %23, float %24, float %22
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %25)
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%30 = load float, float* %2
%31 = fmul float %30, 3.000000e+01
%32 = load float, float* %3
%33 = fmul float %32, 5.500000e+00
%34 = fcmp une float %31, 0.000000e+00
%35 = fcmp une float %33, 0.000000e+00
%36 = select i1 %34, i1 true, i1 %35
br i1 %36, label %16, label %37
37: ; preds = %16, %0
ret i32 0
}