#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_us(double, double);
void convert_values_weight_us(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 / 1000 * 2.2046 * 16;
  *sec_conv_value += main_conv_decimal_extracted;
  output_values_weight_us(*main_conv_value, *sec_conv_value);
}


x86 assembly (clang, -O0):
<convert_values_weight_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xecc(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
lea    -0x20(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xea9(%rip),%xmm1
divsd  %xmm1,%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
mulsd  %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_us@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @convert_values_weight_us(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 = fmul 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 = fdiv 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.000000e+03
%20 = fmul double %19, 2.204600e+00
%21 = fmul double %20, 1.600000e+01
%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_us(double %28, double %30)
ret void
}

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