#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 *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main(void) {
  double dist, coms;
  scanf("%lf%lf", &dist, &coms);
  printf("%.1f miles per gallon\n", dist / coms);
  printf("%.1f liters per 100 km\n", coms * 3.785 / (100 * dist * 1.609));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
movsd  0xeaf(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe85(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeed(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xea0(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xe9a(%rip),%xmm1
mulsd  0xe9a(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [23 x i8] c"%.1f miles per gallon\0A\00"
@.str.2 = [24 x i8] c"%.1f liters per 100 km\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %2
%6 = load double, double* %3
%7 = fdiv double %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %7)
%9 = load double, double* %3
%10 = fmul double %9, 3.785000e+00
%11 = load double, double* %2
%12 = fmul double 1.000000e+02, %11
%13 = fmul double %12, 1.609000e+00
%14 = fdiv double %10, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [23 x i8] c"%.1f miles per gallon\0A\00"
@.str.2 = [24 x i8] c"%.1f liters per 100 km\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fdiv double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = load double, double* %2
%11 = fmul double %10, 3.785000e+00
%12 = load double, double* %1
%13 = fmul double %12, 1.000000e+02
%14 = fmul double %13, 1.609000e+00
%15 = fdiv double %11, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %15)
ret i32 0
}