#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double fahrenheight, celsius;
  double result;
  printf("Please enter the fahrenheight value to convert: ");
  scanf("%d", &fahrenheight);
  result = (fahrenheight - 32) * (5 / 9);
  celsius = result;
  printf("Your celsius value is: ", celsius);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm1
addsd  0xea5(%rip),%xmm1
xorpd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
lea    0xed2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Please enter the fahrenheight value to convert: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Your celsius value is: \00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double* %1)
%6 = load double, double* %1
%7 = fsub double %6, 3.200000e+01
%8 = fmul double %7, 0.000000e+00
store double %8, double* %3
%9 = load double, double* %3
store double %9, double* %2
%10 = load double, double* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %10)
%12 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"Please enter the fahrenheight value to convert: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Your celsius value is: \00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fadd double %5, -3.200000e+01
%7 = fmul double %6, 0.000000e+00
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %7)
%9 = call i32 (...) @getchar()
ret i32 0
}