#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 a, b, i, s;
  char w, x, y, z;
  scanf("%c%c%c%c", &w, &x, &y, &z);
  scanf("%lf %lf %lf", &a, &b, &s);
  if (w == 'C') {
    printf("   C  ->    F\n");
    for (i = a; i <= b + 0.01; i += s)
      printf("%5.1lf -> %5.1lf\n", i, (9 * i / 5 + 32));
  }
  if (w == 'F') {
    printf("   F  ->    C\n");
    for (i = a; i <= b + 0.01; i += s)
      printf("%5.1lf -> %5.1lf\n", i, ((i - 32) * 5 / 9));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x29(%rbp),%rsi
lea    -0x2a(%rbp),%rdx
lea    -0x2b(%rbp),%rcx
lea    -0x2c(%rbp),%r8
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x28(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x29(%rbp),%eax
cmp    $0x43,%eax
jne    11f9 <main+0xd9>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  0xe67(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11f4 <main+0xd4>
movsd  -0x20(%rbp),%xmm0
movsd  0xe53(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xe4e(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xe4a(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xe6b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    118c <main+0x6c>
jmp    11f9 <main+0xd9>
movsbl -0x29(%rbp),%eax
cmp    $0x46,%eax
jne    128f <main+0x16f>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  0xdd5(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     128a <main+0x16a>
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xdcc(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xdb8(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xda4(%rip),%xmm2
divsd  %xmm2,%xmm1
lea    0xdd5(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    121e <main+0xfe>
jmp    128f <main+0x16f>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xeec(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x17(%rsp),%rdx
lea    0x16(%rsp),%rcx
lea    0x15(%rsp),%r8
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xed3(%rip),%rdi
lea    0x28(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x20(%rsp),%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x7(%rsp),%al
cmp    $0x43,%al
jne    1208 <main+0xd8>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
addsd  0xe60(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1204 <main+0xd4>
lea    0xe90(%rip),%rbx
nopl   (%rax)
movsd  %xmm1,0x8(%rsp)
movsd  0x8(%rsp),%xmm1
mulsd  0xe44(%rip),%xmm1
divsd  0xe44(%rip),%xmm1
addsd  0xe44(%rip),%xmm1
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0x20(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
addsd  0xe02(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    11b0 <main+0x80>
mov    0x7(%rsp),%al
cmp    $0x46,%al
jne    1294 <main+0x164>
lea    0xe38(%rip),%rdi
call   1030 <puts@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
addsd  0xdd0(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1294 <main+0x164>
lea    0xe00(%rip),%rbx
nopl   (%rax)
movsd  %xmm1,0x8(%rsp)
movsd  0x8(%rsp),%xmm1
addsd  0xdcc(%rip),%xmm1
mulsd  0xdb4(%rip),%xmm1
divsd  0xda4(%rip),%xmm1
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0x20(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
addsd  0xd72(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1240 <main+0x110>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

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