// File: DoubleString[P]RtConverter/src/Rnxbrd/BroadcastEphUtils.cpp
// Function: bamboo::BroadcastEphUtils::glsrkf4(double, double*, bamboo::GLSEPH&)
void BroadcastEphUtils::glsrkf4(double h, double* x, GLSEPH& eph){
	int i, j;
	double coef[4], xj[6], acc[6], funct[6];
	coef[0] = h / 2;
	coef[1] = h / 2;
	coef[2] = h;
	coef[3] = h;
	for (i = 0; i < 6; i++)
		xj[i] = x[i];
	glsfright(xj, acc, eph);
	for (i = 0; i < 6; i++)
		funct[i] = xj[i];
	for (j = 0; j < 3; j++) {
		for (i = 0; i < 6; i++) {
			xj[i] = x[i] + coef[j] * acc[i];
			funct[i] = funct[i] + coef[j + 1] * acc[i] / 3.0;
		}
		glsfright(xj, acc, eph);
	}
	for (i = 0; i < 6; i++)
		x[i] = funct[i] + h * acc[i] / 6.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0x6abc(%rip), %xmm1     # 0xbd750
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0x6aa6(%rip), %xmm1     # 0xbd750
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0xb6cf6
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq -0x24(%rbp), %rax
movsd %xmm0, -0x80(%rbp,%rax,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb6cce
movq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xb7360
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0xb6d40
movslq -0x24(%rbp), %rax
movsd -0x80(%rbp,%rax,8), %xmm0
movslq -0x24(%rbp), %rax
movsd %xmm0, -0xe0(%rbp,%rax,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb6d18
movl $0x0, -0x28(%rbp)
cmpl $0x3, -0x28(%rbp)
jge 0xb6e14
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0xb6deb
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq -0x28(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm0
movslq -0x24(%rbp), %rax
movsd -0xb0(%rbp,%rax,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq -0x24(%rbp), %rax
movsd %xmm0, -0x80(%rbp,%rax,8)
movslq -0x24(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm0
movl -0x28(%rbp), %eax
addl $0x1, %eax
cltq
movsd -0x50(%rbp,%rax,8), %xmm1
movslq -0x24(%rbp), %rax
mulsd -0xb0(%rbp,%rax,8), %xmm1
movsd 0x6070(%rip), %xmm2     # 0xbce38
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movslq -0x24(%rbp), %rax
movsd %xmm0, -0xe0(%rbp,%rax,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb6d58
movq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xb7360
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb6d47
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0xb6e68
movslq -0x24(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm0
movsd -0x10(%rbp), %xmm1
movslq -0x24(%rbp), %rax
mulsd -0xb0(%rbp,%rax,8), %xmm1
movsd 0x6128(%rip), %xmm2     # 0xbcf70
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb6e1b
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)