#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_weight_metric(double, double);
void convert_values_weight_metric(double *main_conv_value,
                                  double *sec_conv_value) {
  double main_conv_decimal_extracted, main_conv_decimal_int;
  *main_conv_value /= 2.2046;
  main_conv_decimal_extracted = modf(*main_conv_value, &main_conv_decimal_int);
  main_conv_decimal_extracted *= 1000;
  *main_conv_value = main_conv_decimal_int;
  *sec_conv_value = *sec_conv_value / 16 / 2.2046 * 1000;
  *sec_conv_value += main_conv_decimal_extracted;
  output_values_weight_metric(*main_conv_value, *sec_conv_value);
}


x86 assembly (clang, -O0):
<convert_values_weight_metric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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  0xe6f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe5b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1040 <output_values_weight_metric@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_values_weight_metric>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
divsd  0xeca(%rip),%xmm0
movsd  %xmm0,(%rdi)
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  0xebe(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  (%rsp),%xmm1
movsd  %xmm1,(%rbx)
movsd  (%r14),%xmm1
mulsd  0xeac(%rip),%xmm1
divsd  0xe94(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
movsd  (%rbx),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <output_values_weight_metric@plt>

LLVM IR (-O0):
define void @convert_values_weight_metric(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%7 = load double*, double** %3
%8 = load double, double* %7
%9 = fdiv double %8, 2.204600e+00
store double %9, double* %7
%10 = load double*, double** %3
%11 = load double, double* %10
%12 = call double @modf(double %11, double* %6)
store double %12, double* %5
%13 = load double, double* %5
%14 = fmul double %13, 1.000000e+03
store double %14, double* %5
%15 = load double, double* %6
%16 = load double*, double** %3
store double %15, double* %16
%17 = load double*, double** %4
%18 = load double, double* %17
%19 = fdiv double %18, 1.600000e+01
%20 = fdiv double %19, 2.204600e+00
%21 = fmul double %20, 1.000000e+03
%22 = load double*, double** %4
store double %21, double* %22
%23 = load double, double* %5
%24 = load double*, double** %4
%25 = load double, double* %24
%26 = fadd double %25, %23
store double %26, double* %24
%27 = load double*, double** %3
%28 = load double, double* %27
%29 = load double*, double** %4
%30 = load double, double* %29
%31 = call i32 @output_values_weight_metric(double %28, double %30)
ret void
}

LLVM IR (-O2):
define void @convert_values_weight_metric(double* nocapture %0, double* nocapture %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = load double, double* %0
%6 = fdiv double %5, 2.204600e+00
store double %6, double* %0
%7 = call double @modf(double %6, double* %3)
%8 = fmul double %7, 1.000000e+03
%9 = load double, double* %3
store double %9, double* %0
%10 = load double, double* %1
%11 = fmul double %10, 6.250000e-02
%12 = fdiv double %11, 2.204600e+00
%13 = fmul double %12, 1.000000e+03
%14 = fadd double %8, %13
store double %14, double* %1
%15 = load double, double* %0
%16 = tail call i32 @output_values_weight_metric(double %15, double %14)
ret void
}