#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int cels, fahr;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  cels = lower;
  printf("摄氏温度--华氏温度\n");
  while (cels <= upper) {
    fahr = cels * 9 / 5 + 32;
    printf("%3d %6d\n", cels, fahr);
    cels += step;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x12c,-0x20(%rbp)
movl   $0x14,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     118f <main+0x7f>
imul   $0x9,-0x14(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
add    $0x20,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114f <main+0x3f>
mov    0x2e4a(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffec,%ebx
mov    $0x20,%ebp
lea    0xebf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x14,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x24,%ebp
cmp    $0x119,%ebx
jb     1150 <main+0x30>
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 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\0A\00"
@.str.1 = [9 x i8] c"%3d %6d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 300, i32* %9
store i32 20, i32* %10
%11 = load i32, i32* %8
store i32 %11, i32* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %17, %2
%14 = load i32, i32* %6
%15 = load i32, i32* %9
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %28
17: ; preds = %13
%18 = load i32, i32* %6
%19 = mul nsw i32 %18, 9
%20 = sdiv i32 %19, 5
%21 = add nsw i32 %20, 32
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23)
%25 = load i32, i32* %10
%26 = load i32, i32* %6
%27 = add nsw i32 %26, %25
store i32 %27, i32* %6
br label %13
28: ; preds = %13
%29 = load i32, i32* @EXIT_SUCCESS
ret i32 %29
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%3d %6d\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [27 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\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
%5 = phi i32 [ 0, %2 ], [ %12, %4 ]
%6 = trunc i32 %5 to i16
%7 = mul nuw nsw i16 %6, 9
%8 = udiv i16 %7, 5
%9 = add nuw nsw i16 %8, 32
%10 = zext i16 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %10)
%12 = add nuw nsw i32 %5, 20
%13 = icmp ult i32 %5, 281
br i1 %13, label %4, label %14
14: ; preds = %4
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}