	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsp_page_reg_write
_fsp_page_reg_write:                    ## @fsp_page_reg_write
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_ps2_begin_command
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	$56, %esi
	callq	_ps2_sendbyte
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	$136, %esi
	callq	_ps2_sendbyte
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	%r14d, %edi
	callq	_fsp_test_invert_cmd
	movl	%eax, %r15d
	movzbl	%al, %eax
	cmpl	%r14d, %eax
	jne	LBB0_5
## %bb.6:
	movl	%r14d, %edi
	callq	_fsp_test_swap_cmd
	movl	%eax, %r15d
	movzbl	%al, %eax
	movl	(%r13), %edx
	movq	%r12, %rdi
	cmpl	%r14d, %eax
	jne	LBB0_7
## %bb.8:
	movl	$51, %esi
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_10
LBB0_3:
	movl	$-1, %ebx
	jmp	LBB0_11
LBB0_5:
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	$71, %esi
	jmp	LBB0_9
LBB0_7:
	movl	$68, %esi
LBB0_9:
	callq	_ps2_sendbyte
	movl	(%r13), %edx
	movzbl	%r15b, %esi
	movq	%r12, %rdi
	callq	_ps2_sendbyte
	xorl	%ebx, %ebx
LBB0_10:
	movq	%r12, %rdi
	callq	_ps2_end_command
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_dev_dbg
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WRITE PAGE REG: to 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_page_reg_write
.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_write
_fsp_page_reg_write:                    ; @fsp_page_reg_write
	.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, x1
	mov	x20, x0
	bl	_ps2_begin_command
Lloh0:
	adrp	x21, _FSP_CMD_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FSP_CMD_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_5
; %bb.1:
Lloh2:
	adrp	x22, _FSP_CMD_TIMEOUT2@GOTPAGE
Lloh3:
	ldr	x22, [x22, _FSP_CMD_TIMEOUT2@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #56
	bl	_ps2_sendbyte
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #136
	bl	_ps2_sendbyte
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_fsp_test_invert_cmd
	cmp	w0, w19
	b.ne	LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_fsp_test_swap_cmd
	mov	x21, x0
	ldr	w2, [x22]
	cmp	w0, w19
	b.ne	LBB0_8
; %bb.4:
	mov	x0, x20
	mov	w1, #51
	b	LBB0_9
LBB0_5:
	mov	w21, #-1
	b	LBB0_10
LBB0_6:
	mov	w21, #-1
	b	LBB0_11
LBB0_7:
	mov	x21, x0
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #71
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	mov	w1, #68
LBB0_9:
	bl	_ps2_sendbyte
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_ps2_sendbyte
	mov	w21, #0
LBB0_10:
	mov	x0, x20
	bl	_ps2_end_command
	ldr	x0, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	bl	_dev_dbg
LBB0_11:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FSP_CMD_TIMEOUT,4,2            ; @FSP_CMD_TIMEOUT
	.comm	_FSP_CMD_TIMEOUT2,4,2           ; @FSP_CMD_TIMEOUT2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WRITE PAGE REG: to 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_page_reg_write
.subsections_via_symbols
