// File: DoubleString[P]eph_converter/src/Broadcast.cpp
// Function: BroadcastEphUtils::glsrkf4(double, double*, 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 0x7ebc(%rip), %xmm1     # 0x17d50
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0x7ea6(%rip), %xmm1     # 0x17d50
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 0xfef6
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 0xfece
movq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10560
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0xff40
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 0xff18
movl $0x0, -0x28(%rbp)
cmpl $0x3, -0x28(%rbp)
jge 0x10014
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0xffeb
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 0x7db8(%rip), %xmm2     # 0x17d80
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 0xff58
movq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x10560
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xff47
movl $0x0, -0x24(%rbp)
cmpl $0x6, -0x24(%rbp)
jge 0x10068
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 0x7cd0(%rip), %xmm2     # 0x17d18
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 0x1001b
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)