#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 */
double modf(double, double *);
int /*<<< orphan*/ output_values_length_us(double, double);
void convert_values_length_us(double *main_conv_value, double *sec_conv_value) {
  double main_conv_decimal_extracted, main_conv_decimal_int,
      sec_conv_decimal_extracted, sec_conv_decimal_int;
  *main_conv_value /= 0.3048;
  main_conv_decimal_extracted = modf(*main_conv_value, &main_conv_decimal_int);
  main_conv_decimal_extracted *= 12;
  *main_conv_value = main_conv_decimal_int;
  *sec_conv_value = *sec_conv_value / 100 * 12 / 0.3048;
  *sec_conv_value += main_conv_decimal_extracted;
  if (*sec_conv_value >= 12) {
    *sec_conv_value /= 12;
    sec_conv_decimal_extracted = modf(*sec_conv_value, &sec_conv_decimal_int);
    *main_conv_value += sec_conv_decimal_int;
    *sec_conv_value = sec_conv_decimal_extracted;
  }
  output_values_length_us(*main_conv_value, *sec_conv_value);
}


x86 assembly (clang, -O0):
<convert_values_length_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xec8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
lea    -0x20(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe9a(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe83(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe67(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe63(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe2e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1228 <convert_values_length_us+0x108>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe14(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
lea    -0x30(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1040 <output_values_length_us@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_values_length_us>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
divsd  0xec7(%rip),%xmm0
movsd  %xmm0,(%rdi)
lea    0x10(%rsp),%rdi
call   1030 <modf@plt>
movsd  0xeb9(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,(%rbx)
movsd  (%r14),%xmm1
divsd  0xea6(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  0xe8a(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
ucomisd %xmm2,%xmm1
jb     11b7 <convert_values_length_us+0x97>
divsd  0xe7b(%rip),%xmm1
movsd  %xmm1,(%r14)
lea    0x8(%rsp),%rdi
movapd %xmm1,%xmm0
call   1030 <modf@plt>
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,(%rbx)
movsd  %xmm1,(%r14)
movsd  (%rbx),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
jmp    1040 <output_values_length_us@plt>

LLVM IR (-O0):
define void @convert_values_length_us(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%9 = load double*, double** %3
%10 = load double, double* %9
%11 = fdiv double %10, 3.048000e-01
store double %11, double* %9
%12 = load double*, double** %3
%13 = load double, double* %12
%14 = call double @modf(double %13, double* %6)
store double %14, double* %5
%15 = load double, double* %5
%16 = fmul double %15, 1.200000e+01
store double %16, double* %5
%17 = load double, double* %6
%18 = load double*, double** %3
store double %17, double* %18
%19 = load double*, double** %4
%20 = load double, double* %19
%21 = fdiv double %20, 1.000000e+02
%22 = fmul double %21, 1.200000e+01
%23 = fdiv double %22, 3.048000e-01
%24 = load double*, double** %4
store double %23, double* %24
%25 = load double, double* %5
%26 = load double*, double** %4
%27 = load double, double* %26
%28 = fadd double %27, %25
store double %28, double* %26
%29 = load double*, double** %4
%30 = load double, double* %29
%31 = fcmp oge double %30, 1.200000e+01
br i1 %31, label %32, label %45
32: ; preds = %2
%33 = load double*, double** %4
%34 = load double, double* %33
%35 = fdiv double %34, 1.200000e+01
store double %35, double* %33
%36 = load double*, double** %4
%37 = load double, double* %36
%38 = call double @modf(double %37, double* %8)
store double %38, double* %7
%39 = load double, double* %8
%40 = load double*, double** %3
%41 = load double, double* %40
%42 = fadd double %41, %39
store double %42, double* %40
%43 = load double, double* %7
%44 = load double*, double** %4
store double %43, double* %44
br label %45
45: ; preds = %32, %2
%46 = load double*, double** %3
%47 = load double, double* %46
%48 = load double*, double** %4
%49 = load double, double* %48
%50 = call i32 @output_values_length_us(double %47, double %49)
ret void
}

LLVM IR (-O2):
define void @convert_values_length_us(double* nocapture %0, double* nocapture %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = load double, double* %0
%8 = fdiv double %7, 3.048000e-01
store double %8, double* %0
%9 = call double @modf(double %8, double* %3)
%10 = fmul double %9, 1.200000e+01
%11 = load double, double* %3
store double %11, double* %0
%12 = load double, double* %1
%13 = fdiv double %12, 1.000000e+02
%14 = fmul double %13, 1.200000e+01
%15 = fdiv double %14, 3.048000e-01
%16 = fadd double %10, %15
store double %16, double* %1
%17 = fcmp ult double %16, 1.200000e+01
br i1 %17, label %24, label %18
18: ; preds = %2
%19 = fdiv double %16, 1.200000e+01
store double %19, double* %1
%20 = call double @modf(double %19, double* %4)
%21 = load double, double* %4
%22 = load double, double* %0
%23 = fadd double %21, %22
store double %23, double* %0
store double %20, double* %1
br label %24
24: ; preds = %18, %2
%25 = phi double [ %20, %18 ], [ %16, %2 ]
%26 = load double, double* %0
%27 = tail call i32 @output_values_length_us(double %26, double %25)
ret void
}