	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsp_reg_write
_fsp_reg_write:                         ## @fsp_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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_ps2_begin_command
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_13
## %bb.1:
	movl	%r15d, %edi
	callq	_fsp_test_invert_cmd
	movl	%eax, %r13d
	movzbl	%al, %eax
	cmpl	%r15d, %eax
	jne	LBB0_2
## %bb.3:
	movl	%r15d, %edi
	callq	_fsp_test_swap_cmd
	movl	%eax, %r13d
	movzbl	%al, %eax
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	cmpl	%r15d, %eax
	jne	LBB0_4
## %bb.5:
	movl	$85, %esi
	jmp	LBB0_6
LBB0_2:
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$116, %esi
	jmp	LBB0_6
LBB0_4:
	movl	$119, %esi
LBB0_6:
	callq	_ps2_sendbyte
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movzbl	%r13b, %esi
	movq	%rbx, %rdi
	callq	_ps2_sendbyte
	movq	_FSP_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$243, %esi
	callq	_ps2_sendbyte
	testq	%rax, %rax
	js	LBB0_13
## %bb.7:
	movl	%r14d, %edi
	callq	_fsp_test_invert_cmd
	movl	%eax, %r12d
	movzbl	%al, %eax
	cmpl	%r14d, %eax
	jne	LBB0_8
## %bb.9:
	movl	%r14d, %edi
	callq	_fsp_test_swap_cmd
	movl	%eax, %r12d
	movzbl	%al, %eax
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	cmpl	%r14d, %eax
	jne	LBB0_10
## %bb.11:
	movl	$51, %esi
	jmp	LBB0_12
LBB0_8:
	movq	_FSP_CMD_TIMEOUT2@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$71, %esi
	jmp	LBB0_12
LBB0_10:
	movl	$68, %esi
LBB0_12:
	callq	_ps2_sendbyte
	movl	(%r13), %edx
	movzbl	%r12b, %esi
	movq	%rbx, %rdi
	callq	_ps2_sendbyte
	xorl	%r12d, %r12d
LBB0_13:
	movq	%rbx, %rdi
	callq	_ps2_end_command
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	callq	_psmouse_dbg
	movl	%r12d, %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 REG: 0x%02x to 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_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_reg_write
_fsp_reg_write:                         ; @fsp_reg_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_ps2_begin_command
Lloh0:
	adrp	x24, _FSP_CMD_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FSP_CMD_TIMEOUT@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_10
; %bb.1:
	mov	x0, x20
	bl	_fsp_test_invert_cmd
Lloh2:
	adrp	x23, _FSP_CMD_TIMEOUT2@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FSP_CMD_TIMEOUT2@GOTPAGEOFF]
	cmp	w0, w20
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_fsp_test_swap_cmd
	mov	x22, x0
	ldr	w2, [x23]
	cmp	w0, w20
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x21
	mov	w1, #85
	b	LBB0_6
LBB0_4:
	mov	x22, x0
	ldr	w2, [x23]
	mov	x0, x21
	mov	w1, #116
	b	LBB0_6
LBB0_5:
	mov	x0, x21
	mov	w1, #119
LBB0_6:
	bl	_ps2_sendbyte
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x22
	bl	_ps2_sendbyte
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #243
	bl	_ps2_sendbyte
	tbnz	x0, #63, LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_fsp_test_invert_cmd
	cmp	w0, w19
	b.ne	LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_fsp_test_swap_cmd
	mov	x22, x0
	ldr	w2, [x23]
	cmp	w0, w19
	b.ne	LBB0_12
; %bb.9:
	mov	x0, x21
	mov	w1, #51
	b	LBB0_13
LBB0_10:
	mov	w22, #-1
	b	LBB0_14
LBB0_11:
	mov	x22, x0
	ldr	w2, [x23]
	mov	x0, x21
	mov	w1, #71
	b	LBB0_13
LBB0_12:
	mov	x0, x21
	mov	w1, #68
LBB0_13:
	bl	_ps2_sendbyte
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x22
	bl	_ps2_sendbyte
	mov	w22, #0
LBB0_14:
	mov	x0, x21
	bl	_ps2_end_command
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x22
	bl	_psmouse_dbg
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 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 REG: 0x%02x to 0x%02x (rc = %d)\n"

	.no_dead_strip	_fsp_reg_write
.subsections_via_symbols
