// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_fpa_data
static void prv_parse_fpa_data(subtilis_arm_ass_context_t *c,
			       subtilis_arm_instr_type_t itype,
			       subtilis_arm_ccode_type_t ccode,
			       subtilis_fpa_rounding_t rnd, size_t size,
			       bool dyadic, subtilis_error_t *err)
{
	subtilis_fpa_data_instr_t *datai;
	subtilis_arm_instr_t *instr;
	const char *tbuf;

	instr = subtilis_arm_section_add_instr(c->arm_s, itype, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	datai = &instr->operands.fpa_data;

	datai->dest = prv_get_fpa_reg(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	tbuf = subtilis_token_get_text(c->t);
	if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) || (strcmp(tbuf, ","))) {
		subtilis_error_set_expected(err, ",", tbuf, c->l->stream->name,
					    c->l->line);
		return;
	}

	if (dyadic) {
		datai->op1 = prv_get_fpa_reg(c, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		tbuf = subtilis_token_get_text(c->t);
		if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) ||
		    (strcmp(tbuf, ","))) {
			subtilis_error_set_expected(
			    err, ",", tbuf, c->l->stream->name, c->l->line);
			return;
		}
	}

	datai->immediate = prv_get_fpa_op2(c, &datai->op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	datai->ccode = ccode;
	datai->rounding = rnd;
	datai->size = size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r14d
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movl %edx, %r15d
movq %rdi, %r13
movq 0x50(%rsp), %rbx
movq (%rdi), %rdi
movq %rbx, %rdx
callq 0x4f73a
cmpl $0x0, (%rbx)
jne 0x66c0c
movq %rax, %r12
movq %r13, %rdi
movq %rbx, %rsi
callq 0x66d2b
movq %rax, 0x18(%r12)
cmpl $0x0, (%rbx)
je 0x66c1b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r13), %rdi
callq 0x12ad0
movq %rax, %rcx
movq 0x10(%r13), %rax
cmpl $0x2, (%rax)
jne 0x66c4d
leaq 0xc961(%rip), %rsi      # 0x73598
movq %rcx, %rdi
movq %rcx, 0x8(%rsp)
callq 0x12160
movq 0x8(%rsp), %rcx
testl %eax, %eax
je 0x66c80
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x100b0(%rip), %rax     # 0x76d10
leaq 0xc931(%rip), %rdx      # 0x73598
movq %rbx, %rdi
movl $0x1d, %esi
pushq $0x87a                  # imm = 0x87A
pushq %rax
callq 0x1442a
addq $0x28, %rsp
jmp 0x66c10
testb %r14b, %r14b
je 0x66cf2
movq %r13, %rdi
movq %rbx, %rsi
callq 0x66d2b
movq %rax, 0x20(%r12)
cmpl $0x0, (%rbx)
jne 0x66c0c
movq 0x10(%r13), %rdi
callq 0x12ad0
movq %rax, %r14
movq 0x10(%r13), %rax
cmpl $0x2, (%rax)
jne 0x66cc6
leaq 0xc8de(%rip), %rsi      # 0x73598
movq %r14, %rdi
callq 0x12160
testl %eax, %eax
je 0x66cf2
movq 0x8(%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x10037(%rip), %rax     # 0x76d10
leaq 0xc8b8(%rip), %rdx      # 0x73598
movq %rbx, %rdi
movl $0x1d, %esi
movq %r14, %rcx
pushq $0x887                  # imm = 0x887
jmp 0x66c74
movq %r12, %rsi
addq $0x30, %rsi
movq %r13, %rdi
movq %rbx, %rdx
callq 0x66db4
movb %al, 0x28(%r12)
cmpl $0x0, (%rbx)
jne 0x66c0c
movl %r15d, 0x8(%r12)
movl %ebp, 0xc(%r12)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r12)
jmp 0x66c0c