#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 /*<<< orphan*/ scanf(char *, ...);
int main() {
  double h, l, a, b, d;
  char c, f;
  scanf("%c->%c", &c, &f);
  scanf("%lf%lf%lf", &l, &h, &a);
  if (c == 'C' && f == 'F') {
    printf("   C  ->    F\n");
    for (; l <= h + 0.01; l = l + a) {
      b = 9 * l / 5 + 32;
      printf("%5.1lf ->%6.1lf\n", l, b);
    }
  } else {
    printf("   F  ->    C\n");
    for (; l <= h + 0.01; l = l + a) {
      b = (l - 32) * 5 / 9;
      printf("%5.1lf ->%6.1lf\n", l, b);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x31(%rbp),%rsi
lea    -0x32(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xedb(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x31(%rbp),%eax
cmp    $0x43,%eax
jne    11fe <main+0xde>
movsbl -0x32(%rbp),%eax
cmp    $0x46,%eax
jne    11fe <main+0xde>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe6c(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11f9 <main+0xd9>
movsd  0xe5d(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe58(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe54(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xe62(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1187 <main+0x67>
jmp    1287 <main+0x167>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xde7(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1282 <main+0x162>
movsd  -0x18(%rbp),%xmm0
movsd  0xde3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdcf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdbb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xdd9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    120c <main+0xec>
jmp    1287 <main+0x167>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xeec(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xedb(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x18(%rsp),%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
cmpb   $0x43,0x7(%rsp)
jne    120e <main+0xde>
cmpb   $0x46,0x6(%rsp)
jne    120e <main+0xde>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  0xe60(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     128c <main+0x15c>
lea    0xe88(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm1
mulsd  0xe4c(%rip),%xmm1
divsd  0xe3c(%rip),%xmm1
addsd  0xe44(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm1
addsd  0xdfa(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11c0 <main+0x90>
jmp    128c <main+0x15c>
lea    0xe35(%rip),%rdi
call   1030 <puts@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  0xdd2(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     128c <main+0x15c>
lea    0xdfe(%rip),%rbx
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm1
addsd  0xdbc(%rip),%xmm1
mulsd  0xdbc(%rip),%xmm1
divsd  0xdbc(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm1
addsd  0xd7a(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1240 <main+0x110>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%c->%c\00"
@.str.1 = [10 x i8] c"%lf%lf%lf\00"
@.str.2 = [15 x i8] c" C -> F\0A\00"
@.str.3 = [17 x i8] c"%5.1lf ->%6.1lf\0A\00"
@.str.4 = [15 x i8] c" F -> C\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i8
%8 = alloca i8
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double* %3, double* %2, double* %4)
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 67
br i1 %13, label %14, label %38
14: ; preds = %0
%15 = load i8, i8* %8
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 70
br i1 %17, label %18, label %38
18: ; preds = %14
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %33, %18
%21 = load double, double* %3
%22 = load double, double* %2
%23 = fadd double %22, 1.000000e-02
%24 = fcmp ole double %21, %23
br i1 %24, label %25, label %37
25: ; preds = %20
%26 = load double, double* %3
%27 = fmul double 9.000000e+00, %26
%28 = fdiv double %27, 5.000000e+00
%29 = fadd double %28, 3.200000e+01
store double %29, double* %5
%30 = load double, double* %3
%31 = load double, double* %5
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %30, double %31)
br label %33
33: ; preds = %25
%34 = load double, double* %3
%35 = load double, double* %4
%36 = fadd double %34, %35
store double %36, double* %3
br label %20
37: ; preds = %20
br label %58
38: ; preds = %14, %0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %53, %38
%41 = load double, double* %3
%42 = load double, double* %2
%43 = fadd double %42, 1.000000e-02
%44 = fcmp ole double %41, %43
br i1 %44, label %45, label %57
45: ; preds = %40
%46 = load double, double* %3
%47 = fsub double %46, 3.200000e+01
%48 = fmul double %47, 5.000000e+00
%49 = fdiv double %48, 9.000000e+00
store double %49, double* %5
%50 = load double, double* %3
%51 = load double, double* %5
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %50, double %51)
br label %53
53: ; preds = %45
%54 = load double, double* %3
%55 = load double, double* %4
%56 = fadd double %54, %55
store double %56, double* %3
br label %40
57: ; preds = %40
br label %58
58: ; preds = %57, %37
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c->%c\00"
@.str.1 = [10 x i8] c"%lf%lf%lf\00"
@.str.3 = [17 x i8] c"%5.1lf ->%6.1lf\0A\00"
@str = [14 x i8] c" F -> C\00"
@str.5 = [14 x i8] c" C -> F\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca i8
%5 = alloca i8
%6 = bitcast double* %1 to i8*
%7 = bitcast double* %2 to i8*
%8 = bitcast double* %3 to i8*
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %1, double* %3)
%11 = load i8, i8* %4
%12 = icmp eq i8 %11, 67
%13 = load i8, i8* %5
%14 = icmp eq i8 %13, 70
%15 = select i1 %12, i1 %14, i1 false
br i1 %15, label %16, label %34
16: ; preds = %0
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.5, i64 0, i64 0))
%18 = load double, double* %2
%19 = load double, double* %1
%20 = fadd double %19, 1.000000e-02
%21 = fcmp ugt double %18, %20
br i1 %21, label %52, label %22
22: ; preds = %16, %22
%23 = phi double [ %30, %22 ], [ %18, %16 ]
%24 = fmul double %23, 9.000000e+00
%25 = fdiv double %24, 5.000000e+00
%26 = fadd double %25, 3.200000e+01
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %23, double %26)
%28 = load double, double* %2
%29 = load double, double* %3
%30 = fadd double %28, %29
store double %30, double* %2
%31 = load double, double* %1
%32 = fadd double %31, 1.000000e-02
%33 = fcmp ugt double %30, %32
br i1 %33, label %52, label %22
34: ; preds = %0
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%36 = load double, double* %2
%37 = load double, double* %1
%38 = fadd double %37, 1.000000e-02
%39 = fcmp ugt double %36, %38
br i1 %39, label %52, label %40
40: ; preds = %34, %40
%41 = phi double [ %48, %40 ], [ %36, %34 ]
%42 = fadd double %41, -3.200000e+01
%43 = fmul double %42, 5.000000e+00
%44 = fdiv double %43, 9.000000e+00
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %41, double %44)
%46 = load double, double* %2
%47 = load double, double* %3
%48 = fadd double %46, %47
store double %48, double* %2
%49 = load double, double* %1
%50 = fadd double %49, 1.000000e-02
%51 = fcmp ugt double %48, %50
br i1 %51, label %52, label %40
52: ; preds = %40, %22, %34, %16
ret i32 0
}