	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cypress_send_ext_cmd
_cypress_send_ext_cmd:                  ## @cypress_send_ext_cmd
	.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, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_CYTP_PS2_CMD_TRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%esi, %edi
	callq	_DECODE_CMD_AA
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_DECODE_CMD_BB
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_DECODE_CMD_CC
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_DECODE_CMD_DD
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r12d, %r9d
	callq	_psmouse_dbg
	incl	%r13d
	movq	_PSMOUSE_CMD_SETRES@GOTPCREL(%rip), %r14
	movzbl	%bl, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	decl	%r13d
	cmpl	$1, %r13d
	jle	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DECODE_CMD_DD
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_cypress_ps2_ext_cmd
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DECODE_CMD_CC
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_cypress_ps2_ext_cmd
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DECODE_CMD_BB
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_cypress_ps2_ext_cmd
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	_DECODE_CMD_AA
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_cypress_ps2_ext_cmd
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_cypress_ps2_read_cmd_status
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_cypress_verify_cmd_state
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CYTP_PS2_CMD_TRIES,4,2         ## @CYTP_PS2_CMD_TRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send extension cmd 0x%02x, [%d %d %d %d]\n"

	.comm	_PSMOUSE_CMD_SETRES,4,2         ## @PSMOUSE_CMD_SETRES
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_cypress_send_ext_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cypress_send_ext_cmd
_cypress_send_ext_cmd:                  ; @cypress_send_ext_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _CYTP_PS2_CMD_TRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CYTP_PS2_CMD_TRIES@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	mov	x0, x1
	bl	_DECODE_CMD_AA
	mov	x22, x0
	mov	x0, x20
	bl	_DECODE_CMD_BB
	mov	x23, x0
	mov	x0, x20
	bl	_DECODE_CMD_CC
	mov	x24, x0
	mov	x0, x20
	bl	_DECODE_CMD_DD
	mov	x6, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_psmouse_dbg
	add	w23, w25, #1
Lloh5:
	adrp	x24, _PSMOUSE_CMD_SETRES@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PSMOUSE_CMD_SETRES@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w23, w23, #1
	cmp	w23, #1
	b.le	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x24]
	mov	x0, x20
	bl	_DECODE_CMD_DD
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_cypress_ps2_ext_cmd
	ldr	w22, [x24]
	mov	x0, x20
	bl	_DECODE_CMD_CC
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_cypress_ps2_ext_cmd
	ldr	w22, [x24]
	mov	x0, x20
	bl	_DECODE_CMD_BB
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_cypress_ps2_ext_cmd
	ldr	w22, [x24]
	mov	x0, x20
	bl	_DECODE_CMD_AA
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_cypress_ps2_ext_cmd
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_cypress_ps2_read_cmd_status
	cbnz	w0, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_cypress_verify_cmd_state
	cbz	x0, LBB0_1
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CYTP_PS2_CMD_TRIES,4,2         ; @CYTP_PS2_CMD_TRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send extension cmd 0x%02x, [%d %d %d %d]\n"

	.comm	_PSMOUSE_CMD_SETRES,4,2         ; @PSMOUSE_CMD_SETRES
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_cypress_send_ext_cmd
.subsections_via_symbols
