	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps2_host_send                  ## -- Begin function ps2_host_send
	.p2align	4, 0x90
_ps2_host_send:                         ## @ps2_host_send
	.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	%edi, %r12d
	movq	_PS2_ERR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ps2_error@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_inhibit
	movl	$100, %edi
	callq	_wait_us
	xorl	%eax, %eax
	callq	_data_lo
	xorl	%eax, %eax
	callq	_clock_hi
	movq	_clock_lo@GOTPCREL(%rip), %rdi
	movl	$10000, %esi                    ## imm = 0x2710
	movl	$10, %edx
	callq	_WAIT
	movl	$1, %r14d
	movq	_clock_hi@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_data_lo
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movl	$50, %esi
	movl	$2, %edx
	callq	_WAIT
	movq	_clock_lo@GOTPCREL(%rip), %rdi
	movl	$50, %esi
	movl	$3, %edx
	callq	_WAIT
	incl	%ebx
	cmpl	$8, %ebx
	je	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$15, %edi
	callq	_wait_us
	btl	%ebx, %r12d
	jae	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	sete	%r13b
	xorl	%eax, %eax
	callq	_data_hi
	movl	%r13d, %r14d
	jmp	LBB0_4
LBB0_5:
	movl	$15, %edi
	callq	_wait_us
	xorl	%eax, %eax
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	callq	_data_hi
	jmp	LBB0_8
LBB0_7:
	callq	_data_lo
LBB0_8:
	movq	_clock_hi@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	movl	$50, %esi
	movl	$4, %edx
	callq	_WAIT
	movq	_clock_lo@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movl	$50, %esi
	movl	$5, %edx
	callq	_WAIT
	movl	$15, %edi
	callq	_wait_us
	xorl	%eax, %eax
	callq	_data_hi
	movq	_data_hi@GOTPCREL(%rip), %r15
	movq	_data_lo@GOTPCREL(%rip), %rdi
	movl	$50, %esi
	movl	$6, %edx
	callq	_WAIT
	movq	%rbx, %rdi
	movl	$50, %esi
	movl	$7, %edx
	callq	_WAIT
	movq	%r14, %rdi
	movl	$50, %esi
	movl	$8, %edx
	callq	_WAIT
	movq	%r15, %rdi
	movl	$50, %esi
	movl	$9, %edx
	callq	_WAIT
	xorl	%eax, %eax
	callq	_inhibit
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ps2_host_recv_response         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PS2_ERR_NONE,4,2               ## @PS2_ERR_NONE
	.comm	_ps2_error,4,2                  ## @ps2_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ps2_host_send                  ; -- Begin function ps2_host_send
	.p2align	2
_ps2_host_send:                         ; @ps2_host_send
	.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, x0
Lloh0:
	adrp	x8, _PS2_ERR_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS2_ERR_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ps2_error@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ps2_error@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	bl	_inhibit
	mov	w0, #100
	bl	_wait_us
	bl	_data_lo
	bl	_clock_hi
Lloh6:
	adrp	x20, _clock_lo@GOTPAGE
Lloh7:
	ldr	x20, [x20, _clock_lo@GOTPAGEOFF]
	mov	x0, x20
	mov	w1, #10000
	mov	w2, #10
	bl	_WAIT
	mov	w23, #0
	mov	w22, #1
Lloh8:
	adrp	x21, _clock_hi@GOTPAGE
Lloh9:
	ldr	x21, [x21, _clock_hi@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_data_lo
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	w1, #50
	mov	w2, #2
	bl	_WAIT
	mov	x0, x20
	mov	w1, #50
	mov	w2, #3
	bl	_WAIT
	add	w23, w23, #1
	cmp	w23, #8
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #15
	bl	_wait_us
	lsr	w8, w19, w23
	tbz	w8, #0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w22, #0
	cset	w22, eq
	bl	_data_hi
	b	LBB0_2
LBB0_5:
	mov	w0, #15
	bl	_wait_us
	cbz	w22, LBB0_7
; %bb.6:
	bl	_data_hi
	b	LBB0_8
LBB0_7:
	bl	_data_lo
LBB0_8:
Lloh10:
	adrp	x19, _clock_hi@GOTPAGE
Lloh11:
	ldr	x19, [x19, _clock_hi@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #50
	mov	w2, #4
	bl	_WAIT
Lloh12:
	adrp	x20, _clock_lo@GOTPAGE
Lloh13:
	ldr	x20, [x20, _clock_lo@GOTPAGEOFF]
	mov	x0, x20
	mov	w1, #50
	mov	w2, #5
	bl	_WAIT
	mov	w0, #15
	bl	_wait_us
	bl	_data_hi
Lloh14:
	adrp	x21, _data_hi@GOTPAGE
Lloh15:
	ldr	x21, [x21, _data_hi@GOTPAGEOFF]
Lloh16:
	adrp	x0, _data_lo@GOTPAGE
Lloh17:
	ldr	x0, [x0, _data_lo@GOTPAGEOFF]
	mov	w1, #50
	mov	w2, #6
	bl	_WAIT
	mov	x0, x20
	mov	w1, #50
	mov	w2, #7
	bl	_WAIT
	mov	x0, x19
	mov	w1, #50
	mov	w2, #8
	bl	_WAIT
	mov	x0, x21
	mov	w1, #50
	mov	w2, #9
	bl	_WAIT
	bl	_inhibit
	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
	b	_ps2_host_recv_response
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PS2_ERR_NONE,4,2               ; @PS2_ERR_NONE
	.comm	_ps2_error,4,2                  ; @ps2_error
.subsections_via_symbols
