	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fm801_gp_cooked_read
_fm801_gp_cooked_read:                  ## @fm801_gp_cooked_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	addq	$2, %rdi
	callq	_inw
	movzwl	%ax, %eax
	movl	%eax, %ecx
	shrl	$14, %ecx
	xorl	$3, %ecx
	movl	%eax, %edx
	shll	$5, %edx
	andl	$262112, %edx                   ## imm = 0x3FFE0
	cmpw	$-1, %ax
	movl	$-1, %r12d
	cmovel	%r12d, %edx
	movl	%ecx, (%r15)
	movl	%edx, (%r14)
	movq	(%rbx), %rdi
	addq	$4, %rdi
	callq	_inw
                                        ## kill: def $ax killed $ax def $eax
	movl	%eax, %ecx
	andl	$8191, %ecx                     ## imm = 0x1FFF
	shll	$5, %ecx
	cmpw	$-1, %ax
	cmovel	%r12d, %ecx
	movl	%ecx, 4(%r14)
	movq	(%rbx), %rdi
	addq	$6, %rdi
	callq	_inw
	movzwl	%ax, %eax
	movl	%eax, %ecx
	shrl	$12, %ecx
	notl	%ecx
	andl	$12, %ecx
	orl	%ecx, (%r15)
	movl	%eax, %ecx
	shll	$5, %ecx
	andl	$262112, %ecx                   ## imm = 0x3FFE0
	cmpw	$-1, %ax
	cmovel	%r12d, %ecx
	movl	%ecx, 8(%r14)
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_inw
                                        ## kill: def $ax killed $ax def $eax
	movl	%eax, %ecx
	andl	$8191, %ecx                     ## imm = 0x1FFF
	shll	$5, %ecx
	cmpw	$-1, %ax
	cmovel	%r12d, %ecx
	movl	%ecx, 12(%r14)
	movq	(%rbx), %rsi
	movl	$255, %edi
	callq	_outw
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_fm801_gp_cooked_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fm801_gp_cooked_read
_fm801_gp_cooked_read:                  ; @fm801_gp_cooked_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
	add	x0, x8, #2
	bl	_inw
	lsr	w8, w0, #14
	eor	w8, w8, #0x3
	str	w8, [x19]
	ubfiz	w8, w0, #5, #13
	mov	w22, #65535
	cmp	w0, w22
	csinv	w8, w8, wzr, ne
	str	w8, [x20]
	ldr	x8, [x21]
	add	x0, x8, #4
	bl	_inw
	and	w8, w0, #0x1fff
	lsl	w8, w8, #5
	cmp	w0, w22
	csinv	w8, w8, wzr, ne
	str	w8, [x20, #4]
	ldr	x8, [x21]
	add	x0, x8, #6
	bl	_inw
	mov	w8, #12
	bic	w8, w8, w0, lsr #12
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	ubfiz	w8, w0, #5, #13
	cmp	w0, w22
	csinv	w8, w8, wzr, ne
	str	w8, [x20, #8]
	ldr	x8, [x21]
	add	x0, x8, #8
	bl	_inw
	and	w8, w0, #0x1fff
	lsl	w8, w8, #5
	cmp	w0, w22
	csinv	w8, w8, wzr, ne
	str	w8, [x20, #12]
	ldr	x1, [x21]
	mov	w0, #255
	bl	_outw
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_fm801_gp_cooked_read
.subsections_via_symbols
