#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 *, ...);
main() {
  float c, f;
  int max = 100, min = -100, step = 20;
  printf("摄氏温度-华氏温度转换表\n");
  c = min;
  while (c < max) {
    f = c * (9.0 / 5.0) + 32;
    c = c + step;
    printf("%3.1f\t%3.1f\n", c, f);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x10(%rbp)
movl   $0xffffff9c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvtsi2ssl -0x14(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11c1 <main+0xb1>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe7f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    114c <main+0x3c>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5c(%rip),%rbx
movsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xeba(%rip),%xmm0
movsd  0xeba(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xeb0(%rip),%xmm0
movsd  0xeb0(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xea6(%rip),%xmm0
mov    %rbx,%rdi
movsd  0xe8b(%rip),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe94(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe87(%rip),%xmm0
movsd  0xe87(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe7d(%rip),%xmm0
movsd  0xe7d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe73(%rip),%xmm0
movsd  0xe73(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe69(%rip),%xmm0
movsd  0xe69(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe5f(%rip),%xmm0
movsd  0xe5f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"\E6\91\84\E6\B0\8F\E6\B8\A9\E5\BA\A6-\E5\8D\8E\E6\B0\8F\E6\B8\A9\E5\BA\A6\E8\BD\AC\E6\8D\A2\E8\A1\A8\0A\00"
@.str.1 = [13 x i8] c"%3.1f\09%3.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %4
store i32 -100, i32* %5
store i32 20, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %5
%9 = sitofp i32 %8 to float
store float %9, float* %2
br label %10
10: ; preds = %15, %0
%11 = load float, float* %2
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to float
%14 = fcmp olt float %11, %13
br i1 %14, label %15, label %29
15: ; preds = %10
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = call double @llvm.fmuladd.f64(double %17, double 1.800000e+00, double 3.200000e+01)
%19 = fptrunc double %18 to float
store float %19, float* %3
%20 = load float, float* %2
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to float
%23 = fadd float %20, %22
store float %23, float* %2
%24 = load float, float* %2
%25 = fpext float %24 to double
%26 = load float, float* %3
%27 = fpext float %26 to double
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %25, double %27)
br label %10
29: ; preds = %10
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"%3.1f\09%3.1f\0A\00"
@str = [35 x i8] c"\E6\91\84\E6\B0\8F\E6\B8\A9\E5\BA\A6-\E5\8D\8E\E6\B0\8F\E6\B8\A9\E5\BA\A6\E8\BD\AC\E6\8D\A2\E8\A1\A8\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double -8.000000e+01, double -1.480000e+02)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double -6.000000e+01, double -1.120000e+02)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double -4.000000e+01, double -7.600000e+01)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double -2.000000e+01, double -4.000000e+01)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double 0.000000e+00, double -4.000000e+00)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+01, double 3.200000e+01)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double 4.000000e+01, double 6.800000e+01)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double 6.000000e+01, double 1.040000e+02)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double 8.000000e+01, double 1.400000e+02)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+02, double 1.760000e+02)
ret i32 0
}