#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 /*<<< orphan*/ scanf(char *, double *);
int main(int argc, char *argv[]) {
  double feet = 0.0;
  double inch = 0.0;
  double yd = 0.0;
  printf("Please input the distance(feet) : ");
  scanf("%lf", &feet);
  inch = feet / 12;
  yd = feet / 12 / 3;
  printf("%.2f feet is %.2f inches\n", feet, inch);
  printf("%.2f feet is %.2f yd\n", feet, yd);
  return 0;
}


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)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xe8f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe79(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe65(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe82(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xe84(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm1
divsd  0xea2(%rip),%xmm1
movapd %xmm1,%xmm2
divsd  0xe9e(%rip),%xmm2
movsd  %xmm2,0x10(%rsp)
lea    0xec0(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xec6(%rip),%rdi
movsd  0x10(%rsp),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Please input the distance(feet) : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [26 x i8] c"%.2f feet is %.2f inches\0A\00"
@.str.3 = [22 x i8] c"%.2f feet is %.2f yd\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
%11 = load double, double* %6
%12 = fdiv double %11, 1.200000e+01
store double %12, double* %7
%13 = load double, double* %6
%14 = fdiv double %13, 1.200000e+01
%15 = fdiv double %14, 3.000000e+00
store double %15, double* %8
%16 = load double, double* %6
%17 = load double, double* %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), double %16, double %17)
%19 = load double, double* %6
%20 = load double, double* %8
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %19, double %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Please input the distance(feet) : \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [26 x i8] c"%.2f feet is %.2f inches\0A\00"
@.str.3 = [22 x i8] c"%.2f feet is %.2f yd\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%7 = load double, double* %3
%8 = fdiv double %7, 1.200000e+01
%9 = fdiv double %8, 3.000000e+00
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), double %7, double %8)
%11 = load double, double* %3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %11, double %9)
ret i32 0
}