#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 *fp, *cp;
  float fahr = 0.0, celsius = 0.0;
  int lower, upper, step;
  lower = 0;
  upper = 100;
  step = 20;
  fahr = lower;
  fp = &fahr;
  cp = &celsius;
  printf("%3s\t%6s\n", "Celsius", "Fahrenheit");
  printf("%3s\t%6s\n", "----------", "-------");
  while (celsius <= upper) {
    fahr = celsius * (9.0 / 5.0) + 32;
    printf("%3.0f\t%12.1f\n", *cp, *fp);
    celsius = celsius + step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x64,-0x28(%rbp)
movl   $0x14,-0x2c(%rbp)
cvtsi2ssl -0x24(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xeab(%rip),%rdi
lea    0xead(%rip),%rsi
lea    0xeae(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
lea    0xea4(%rip),%rsi
lea    0xea0(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm1
cvtsi2ssl -0x28(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1211 <main+0x101>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe46(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe42(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe45(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
cvtsi2ssl -0x2c(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    1196 <main+0x86>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf40(%rip),%rbx
lea    0xf42(%rip),%rsi
lea    0xf43(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf3d(%rip),%rsi
lea    0xf39(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf30(%rip),%rbx
movsd  0xea9(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe9c(%rip),%xmm0
movsd  0xe9c(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe92(%rip),%xmm0
movsd  0xe92(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe88(%rip),%xmm0
movsd  0xe88(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe7e(%rip),%xmm0
movsd  0xe7e(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe74(%rip),%xmm0
movsd  0xe74(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%3s\09%6s\0A\00"
@.str.1 = [8 x i8] c"Celsius\00"
@.str.2 = [11 x i8] c"Fahrenheit\00"
@.str.3 = [11 x i8] c"----------\00"
@.str.4 = [8 x i8] c"-------\00"
@.str.5 = [14 x i8] c"%3.0f\09%12.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float*
%3 = alloca float*
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store i32 0, i32* %6
store i32 100, i32* %7
store i32 20, i32* %8
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to float
store float %10, float* %4
store float* %4, float** %2
store float* %5, float** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %13
13: ; preds = %18, %0
%14 = load float, float* %5
%15 = load i32, i32* %7
%16 = sitofp i32 %15 to float
%17 = fcmp ole float %14, %16
br i1 %17, label %18, label %34
18: ; preds = %13
%19 = load float, float* %5
%20 = fpext float %19 to double
%21 = call double @llvm.fmuladd.f64(double %20, double 1.800000e+00, double 3.200000e+01)
%22 = fptrunc double %21 to float
store float %22, float* %4
%23 = load float*, float** %3
%24 = load float, float* %23
%25 = fpext float %24 to double
%26 = load float*, float** %2
%27 = load float, float* %26
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %25, double %28)
%30 = load float, float* %5
%31 = load i32, i32* %8
%32 = sitofp i32 %31 to float
%33 = fadd float %30, %32
store float %33, float* %5
br label %13
34: ; preds = %13
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [9 x i8] c"%3s\09%6s\0A\00"
@.str.1 = [8 x i8] c"Celsius\00"
@.str.2 = [11 x i8] c"Fahrenheit\00"
@.str.3 = [11 x i8] c"----------\00"
@.str.4 = [8 x i8] c"-------\00"
@.str.5 = [14 x i8] c"%3.0f\09%12.1f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double 0.000000e+00, double 3.200000e+01)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double 2.000000e+01, double 6.800000e+01)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double 4.000000e+01, double 1.040000e+02)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double 6.000000e+01, double 1.400000e+02)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double 8.000000e+01, double 1.760000e+02)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double 1.000000e+02, double 2.120000e+02)
ret i32 0
}