// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_possible_fpa
static void prv_parse_possible_fpa(subtilis_arm_ass_context_t *c,
				   subtilis_arm_instr_type_t itype,
				   const char *tbuf, const char *flags,
				   size_t flags_len, subtilis_error_t *err)
{
	size_t i;
	subtilis_arm_ccode_type_t ccode = SUBTILIS_ARM_CCODE_AL;
	subtilis_fpa_rounding_t rnd = SUBTILIS_FPA_ROUNDING_NEAREST;
	size_t size = 0;
	size_t ptr = 0;

	/*
	 * TODO: Need to do LFM/SFM/WFC/RFC.
	 */

	if (flags_len >= 2) {
		for (i = 0; i < sizeof(condition_codes) / sizeof(const char *);
		     i++)
			if ((flags[ptr] == condition_codes[i][0]) &&
			    (flags[ptr + 1] == condition_codes[i][1]))
				break;

		if (i < sizeof(condition_codes) / sizeof(const char *)) {
			ptr += 2;
			ccode = (subtilis_arm_ccode_type_t)i;
		}
	}

	if (itype != SUBTILIS_FPA_INSTR_FIX &&
	    itype != SUBTILIS_FPA_INSTR_RFS &&
	    itype != SUBTILIS_FPA_INSTR_WFS &&
	    itype != SUBTILIS_FPA_INSTR_CMF &&
	    itype != SUBTILIS_FPA_INSTR_CNF &&
	    itype != SUBTILIS_FPA_INSTR_CMFE &&
	    itype != SUBTILIS_FPA_INSTR_CNFE) {
		if (ptr == flags_len) {
			prv_parse_label(c, tbuf, err);
			return;
		}

		switch (flags[ptr]) {
		case 'S':
			size = 4;
			break;
		case 'D':
			size = 8;
			break;
		case 'E':
			size = 12;
			break;
		default:
			prv_parse_label(c, tbuf, err);
			return;
		}

		/*
		 * The fast versions of multiply and divide only work
		 * on floats.
		 */

		if (((itype == SUBTILIS_FPA_INSTR_FML) ||
		     (itype == SUBTILIS_FPA_INSTR_FDV) ||
		     (itype == SUBTILIS_FPA_INSTR_FRD)) &&
		    size != 4) {
			prv_parse_label(c, tbuf, err);
			return;
		}

		ptr++;
	}

	if (ptr == flags_len) {
		prv_parse_fpa_instruction(c, tbuf, itype, ccode, rnd, size,
					  err);
		return;
	}

	if (itype == SUBTILIS_FPA_INSTR_LDF ||
	    itype == SUBTILIS_FPA_INSTR_STF) {
		prv_parse_label(c, tbuf, err);
		return;
	}

	if (ptr + 1 > flags_len) {
		prv_parse_label(c, tbuf, err);
		return;
	}

	switch (flags[ptr]) {
	case 'P':
		rnd = SUBTILIS_FPA_ROUNDING_PLUS_INFINITY;
		break;
	case 'M':
		rnd = SUBTILIS_FPA_ROUNDING_MINUS_INFINITY;
		break;
	case 'Z':
		rnd = SUBTILIS_FPA_ROUNDING_ZERO;
		break;
	default:
		prv_parse_label(c, tbuf, err);
		return;
	}

	prv_parse_fpa_instruction(c, tbuf, itype, ccode, rnd, size, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0xe, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x2, -0x28(%rbp)
jb 0x934fb
movq $0x0, -0x38(%rbp)
cmpq $0x10, -0x38(%rbp)
jae 0x934df
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rdx
leaq 0x3d1d2(%rip), %rcx     # 0xd0670
movq (%rcx,%rdx,8), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x934cf
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
movq -0x38(%rbp), %rdx
leaq 0x3d1af(%rip), %rcx     # 0xd0670
movq (%rcx,%rdx,8), %rcx
movsbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jne 0x934cf
jmp 0x934df
jmp 0x934d1
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x93480
cmpq $0x10, -0x38(%rbp)
jae 0x934f9
movq -0x50(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0x3c(%rbp)
jmp 0x934fb
cmpl $0x3f, -0xc(%rbp)
je 0x935fa
cmpl $0x45, -0xc(%rbp)
je 0x935fa
cmpl $0x44, -0xc(%rbp)
je 0x935fa
cmpl $0x40, -0xc(%rbp)
je 0x935fa
cmpl $0x41, -0xc(%rbp)
je 0x935fa
cmpl $0x42, -0xc(%rbp)
je 0x935fa
cmpl $0x43, -0xc(%rbp)
je 0x935fa
movq -0x50(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x93561
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x93220
jmp 0x936ea
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x54(%rbp)
subl $0x44, %eax
je 0x93595
jmp 0x93577
movl -0x54(%rbp), %eax
subl $0x45, %eax
je 0x9359f
jmp 0x93581
movl -0x54(%rbp), %eax
subl $0x53, %eax
jne 0x935a9
jmp 0x9358b
movq $0x4, -0x48(%rbp)
jmp 0x935bf
movq $0x8, -0x48(%rbp)
jmp 0x935bf
movq $0xc, -0x48(%rbp)
jmp 0x935bf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x93220
jmp 0x936ea
cmpl $0x2c, -0xc(%rbp)
je 0x935d1
cmpl $0x2d, -0xc(%rbp)
je 0x935d1
cmpl $0x2e, -0xc(%rbp)
jne 0x935ee
cmpq $0x4, -0x48(%rbp)
je 0x935ee
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x93220
jmp 0x936ea
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x9362c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x3c(%rbp), %ecx
movl -0x40(%rbp), %r8d
movq -0x48(%rbp), %r9
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0x93a20
jmp 0x936ea
cmpl $0x1e, -0xc(%rbp)
je 0x93638
cmpl $0x1f, -0xc(%rbp)
jne 0x9364e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x93220
jmp 0x936ea
movq -0x50(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
jbe 0x9366f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x93220
jmp 0x936ea
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x58(%rbp)
subl $0x4d, %eax
je 0x936a2
jmp 0x93685
movl -0x58(%rbp), %eax
subl $0x50, %eax
je 0x93699
jmp 0x9368f
movl -0x58(%rbp), %eax
subl $0x5a, %eax
je 0x936ab
jmp 0x936b4
movl $0x1, -0x40(%rbp)
jmp 0x936c7
movl $0x2, -0x40(%rbp)
jmp 0x936c7
movl $0x3, -0x40(%rbp)
jmp 0x936c7
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x93220
jmp 0x936ea
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x3c(%rbp), %ecx
movl -0x40(%rbp), %r8d
movq -0x48(%rbp), %r9
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0x93a20
addq $0x60, %rsp
popq %rbp
retq