#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*/ convertDecimal2DegMin(double const, int *, double *);
scalar_t__ floor(double);
void convertDecimal2DegMinSec(const double dec, int *deg, int *min,
                              float *sec) {
  double decimalMin;
  convertDecimal2DegMin(dec, deg, &decimalMin);
  *min = (int)floor(decimalMin);
  *sec = (decimalMin - *min) / 0.01666666666666666667;
}


x86 assembly (clang, -O0):
<convertDecimal2DegMinSec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <convertDecimal2DegMin@plt>
movsd  -0x28(%rbp),%xmm0
call   1040 <floor@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertDecimal2DegMinSec>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <convertDecimal2DegMin@plt>
movsd  (%rsp),%xmm0
call   1040 <floor@plt>
mov    %eax,(%rbx)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0xeaa(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @convertDecimal2DegMinSec(double %0, i32* %1, i32* %2, float* %3) {
%5 = alloca double
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca float*
%9 = alloca double
store double %0, double* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store float* %3, float** %8
%10 = load double, double* %5
%11 = load i32*, i32** %6
%12 = call i32 @convertDecimal2DegMin(double %10, i32* %11, double* %9)
%13 = load double, double* %9
%14 = call i64 @floor(double %13)
%15 = trunc i64 %14 to i32
%16 = load i32*, i32** %7
store i32 %15, i32* %16
%17 = load double, double* %9
%18 = load i32*, i32** %7
%19 = load i32, i32* %18
%20 = sitofp i32 %19 to double
%21 = fsub double %17, %20
%22 = fdiv double %21, 0x3F91111111111111
%23 = fptrunc double %22 to float
%24 = load float*, float** %8
store float %23, float* %24
ret void
}

LLVM IR (-O2):
define void @convertDecimal2DegMinSec(double %0, i32* %1, i32* nocapture writeonly %2, float* nocapture writeonly %3) {
%5 = alloca double
%6 = bitcast double* %5 to i8*
%7 = call i32 @convertDecimal2DegMin(double %0, i32* %1, double* %5)
%8 = load double, double* %5
%9 = call i64 @floor(double %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %2
%11 = load double, double* %5
%12 = sitofp i32 %10 to double
%13 = fsub double %11, %12
%14 = fdiv double %13, 0x3F91111111111111
%15 = fptrunc double %14 to float
store float %15, float* %3
ret void
}