#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, int);
void printCelsiusAndFahrMySelf() {
  int min = 0;
  int max = 300;
  int step = 20;
  int fahr = min;
  while (fahr <= max) {
    int celsius = (fahr - 32) * 5 / 9;
    printf("%d\t%d\n", fahr, celsius);
    fahr += step;
  }
}


x86 assembly (clang, -O0):
<printCelsiusAndFahrMySelf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x12c,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1173 <printCelsiusAndFahrMySelf+0x63>
mov    -0x10(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <printCelsiusAndFahrMySelf+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCelsiusAndFahrMySelf>:
push   %r15
push   %r14
push   %rbx
mov    $0xffffffec,%ebx
mov    $0xff60,%r15w
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
add    $0x14,%ebx
movswl %r15w,%eax
imul   $0x1c72,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
movswl %ax,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x64,%r15d
cmp    $0x119,%ebx
jb     1130 <printCelsiusAndFahrMySelf+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\09%d\0A\00"
define void @printCelsiusAndFahrMySelf() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 300, i32* %2
store i32 20, i32* %3
%6 = load i32, i32* %1
store i32 %6, i32* %4
br label %7
7: ; preds = %11, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %2
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 32
%14 = mul nsw i32 %13, 5
%15 = sdiv i32 %14, 9
store i32 %15, i32* %5
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17)
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %20, %19
store i32 %21, i32* %4
br label %7
22: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define void @printCelsiusAndFahrMySelf() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = trunc i32 %2 to i16
%4 = mul nuw nsw i16 %3, 5
%5 = add nsw i16 %4, -160
%6 = sdiv i16 %5, 9
%7 = sext i16 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %7)
%9 = add nuw nsw i32 %2, 20
%10 = icmp ult i32 %2, 281
br i1 %10, label %1, label %11
11: ; preds = %1
ret void
}