	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsp_page_reg_read
_fsp_page_reg_read:                     ## @fsp_page_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_PSMOUSE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_ps2_command
	movq	_PSMOUSE_CMD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_psmouse_set_state
	movq	%rbx, %rdi
	callq	_ps2_begin_command
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	movl	$-1, %r15d
	testq	%rax, %rax
	js	LBB0_4
## %bb.1:
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$102, %esi
	callq	_ps2_sendbyte
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$136, %esi
	callq	_ps2_sendbyte
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	testq	%rax, %rax
	js	LBB0_4
## %bb.2:
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$131, %esi
	callq	_ps2_sendbyte
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$136, %esi
	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
	jne	LBB0_4
## %bb.3:
	movzbl	-41(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%r15d, %r15d
LBB0_4:
	movq	%rbx, %rdi
	callq	_ps2_end_command
	movq	_PSMOUSE_CMD_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	movq	_PSMOUSE_ACTIVATED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_psmouse_set_state
	movq	(%rbx), %rdi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	callq	_dev_dbg
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_DISABLE,4,2        ## @PSMOUSE_CMD_DISABLE
	.comm	_PSMOUSE_CMD_MODE,4,2           ## @PSMOUSE_CMD_MODE
	.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
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ## @PSMOUSE_CMD_ENABLE
	.comm	_PSMOUSE_ACTIVATED,4,2          ## @PSMOUSE_ACTIVATED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"READ PAGE REG: 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_page_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_page_reg_read
_fsp_page_reg_read:                     ; @fsp_page_reg_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PSMOUSE_CMD_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_CMD_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_ps2_command
Lloh3:
	adrp	x8, _PSMOUSE_CMD_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSMOUSE_CMD_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_psmouse_set_state
	mov	x0, x20
	bl	_ps2_begin_command
Lloh6:
	adrp	x22, _FSP_CMD_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _FSP_CMD_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_3
; %bb.1:
Lloh8:
	adrp	x21, _FSP_CMD_TIMEOUT2@GOTPAGE
Lloh9:
	ldr	x21, [x21, _FSP_CMD_TIMEOUT2@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #102
	bl	_ps2_sendbyte
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #136
	bl	_ps2_sendbyte
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_3
; %bb.2:
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #131
	bl	_ps2_sendbyte
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #136
	bl	_ps2_sendbyte
Lloh10:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x1, sp, #13
	mov	x0, x20
	bl	___ps2_command
	cbz	x0, LBB0_5
LBB0_3:
	mov	w21, #-1
LBB0_4:
	mov	x0, x20
	bl	_ps2_end_command
Lloh13:
	adrp	x8, _PSMOUSE_CMD_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PSMOUSE_CMD_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_ps2_command
Lloh16:
	adrp	x8, _PSMOUSE_ACTIVATED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PSMOUSE_ACTIVATED@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_psmouse_set_state
	ldr	x0, [x20]
	ldr	w2, [x19]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_dev_dbg
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	mov	w21, #0
	ldrb	w8, [sp, #15]
	str	w8, [x19]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_DISABLE,4,2        ; @PSMOUSE_CMD_DISABLE
	.comm	_PSMOUSE_CMD_MODE,4,2           ; @PSMOUSE_CMD_MODE
	.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
	.comm	_PSMOUSE_CMD_ENABLE,4,2         ; @PSMOUSE_CMD_ENABLE
	.comm	_PSMOUSE_ACTIVATED,4,2          ; @PSMOUSE_ACTIVATED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"READ PAGE REG: 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_page_reg_read
.subsections_via_symbols
