#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 */
scalar_t__ floor(double);
int /*<<< orphan*/ metersToFeetAndInches(double, unsigned int *, double *);
int /*<<< orphan*/ printf(char *, int, ...);
int main(int argc, const char *argv[]) {
  double meters = 3.0;
  unsigned int feet;
  double inches;
  metersToFeetAndInches(meters, &feet, &inches);
  printf("%.1f meters is equal to %d feet and %.1f inches.\n", meters, feet,
         inches);
  printf("%d\n", (int)floor(3.8));
  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)
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    -0x1c(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1050 <metersToFeetAndInches@plt>
cvttsd2si -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
movsd  -0x28(%rbp),%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe78(%rip),%xmm0
call   1040 <floor@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movsd  0xec4(%rip),%xmm0
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1050 <metersToFeetAndInches@plt>
mov    0xc(%rsp),%edx
movsd  0x10(%rsp),%xmm0
lea    0xeb4(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe98(%rip),%xmm0
call   1040 <floor@plt>
lea    0xec6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"%.1f meters is equal to %d feet and %.1f inches.\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca i32
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 3.000000e+00, double* %6
%9 = load double, double* %6
%10 = call i32 @metersToFeetAndInches(double %9, i32* %7, double* %8)
%11 = load double, double* %6
%12 = fptosi double %11 to i32
%13 = load i32, i32* %7
%14 = load double, double* %8
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, double %14)
%16 = call i64 @floor(double 3.800000e+00)
%17 = trunc i64 %16 to i32
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"%.1f meters is equal to %d feet and %.1f inches.\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca double
%5 = bitcast i32* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 @metersToFeetAndInches(double 3.000000e+00, i32* %3, double* %4)
%8 = load i32, i32* %3
%9 = load double, double* %4
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 3, i32 %8, double %9)
%11 = call i64 @floor(double 3.800000e+00)
%12 = trunc i64 %11 to i32
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}