	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsp_reg_read
_fsp_reg_read:                          ## @fsp_reg_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_psmouse_deactivate
	movq	%rbx, %rdi
	callq	_ps2_begin_command
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_11
## %bb.1:
	movl	%r14d, %r12d
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$102, %esi
	callq	_ps2_sendbyte
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$136, %esi
	callq	_ps2_sendbyte
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	movl	%r12d, %edi
	callq	_fsp_test_invert_cmd
	movl	%eax, %r13d
	movzbl	%al, %eax
	cmpl	%r12d, %eax
	jne	LBB0_4
## %bb.5:
	movl	%r14d, %edi
	callq	_fsp_test_swap_cmd
	movl	%eax, %r13d
	movzbl	%al, %eax
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%r14d, %eax
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %r15
	movl	$-1, %r12d
	movq	%rbx, %rdi
	jne	LBB0_6
## %bb.7:
	movl	$102, %esi
	jmp	LBB0_8
LBB0_2:
	movl	%r12d, %r14d
	movl	$-1, %r12d
	jmp	LBB0_11
LBB0_4:
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$104, %esi
	callq	_ps2_sendbyte
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %r15
	movl	$-1, %r12d
	jmp	LBB0_9
LBB0_6:
	movl	$204, %esi
LBB0_8:
	callq	_ps2_sendbyte
LBB0_9:
	movl	(%r15), %edx
	movzbl	%r13b, %esi
	movq	%rbx, %rdi
	callq	_ps2_sendbyte
	movq	_PSMOUSE_CMD_GETINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-43(%rbp), %rsi
	movq	%rbx, %rdi
	callq	___ps2_command
	testq	%rax, %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	js	LBB0_11
## %bb.10:
	movzbl	-41(%rbp), %eax
	movl	%eax, (%r13)
	xorl	%r12d, %r12d
LBB0_11:
	movq	%rbx, %rdi
	callq	_ps2_end_command
	movq	%rbx, %rdi
	callq	_psmouse_activate
	movl	(%r13), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%r12d, %r8d
	callq	_psmouse_dbg
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSP_CMD_TIMEOUT,4,2            ## @FSP_CMD_TIMEOUT
	.comm	_FSP_CMD_TIMEOUT2,4,2           ## @FSP_CMD_TIMEOUT2
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ## @PSMOUSE_CMD_GETINFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"READ REG: 0x%02x is 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_reg_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsp_reg_read
_fsp_reg_read:                          ; @fsp_reg_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_psmouse_deactivate
	mov	x0, x20
	bl	_ps2_begin_command
Lloh0:
	adrp	x23, _FSP_CMD_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _FSP_CMD_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_9
; %bb.1:
Lloh2:
	adrp	x24, _FSP_CMD_TIMEOUT2@GOTPAGE
Lloh3:
	ldr	x24, [x24, _FSP_CMD_TIMEOUT2@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #102
	bl	_ps2_sendbyte
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #136
	bl	_ps2_sendbyte
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_9
; %bb.2:
	mov	x0, x19
	bl	_fsp_test_invert_cmd
	cmp	w0, w19
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_fsp_test_swap_cmd
	mov	x22, x0
	ldr	w2, [x24]
	cmp	w0, w19
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x20
	mov	w1, #102
	b	LBB0_7
LBB0_5:
	mov	x22, x0
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #104
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	mov	w1, #204
LBB0_7:
	bl	_ps2_sendbyte
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x22
	bl	_ps2_sendbyte
Lloh4:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	add	x1, sp, #13
	mov	x0, x20
	bl	___ps2_command
	tbnz	x0, #63, LBB0_9
; %bb.8:
	mov	w22, #0
	ldrb	w8, [sp, #15]
	str	w8, [x21]
	b	LBB0_10
LBB0_9:
	mov	w22, #-1
LBB0_10:
	mov	x0, x20
	bl	_ps2_end_command
	mov	x0, x20
	bl	_psmouse_activate
	ldr	w3, [x21]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x4, x22
	bl	_psmouse_dbg
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FSP_CMD_TIMEOUT,4,2            ; @FSP_CMD_TIMEOUT
	.comm	_FSP_CMD_TIMEOUT2,4,2           ; @FSP_CMD_TIMEOUT2
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ; @PSMOUSE_CMD_GETINFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"READ REG: 0x%02x is 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_reg_read
.subsections_via_symbols
