	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_try_usb_xfer
_pci_xhci_try_usb_xfer:                 ## @pci_xhci_try_usb_xfer
	.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
	movl	%r9d, %r12d
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %edi
	movq	_XHCI_ST_EPCTX_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	movl	$7, %edx
	xorl	%ecx, %ecx
	callq	_FIELD_REPLACE
	movl	%eax, (%rbx)
	movl	$0, -44(%rbp)
	movq	(%r15), %r15
	movq	%r15, %rdi
	callq	_USB_DATA_XFER_LOCK
	movq	8(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movl	(%r14), %edi
	testb	$1, %r12b
	jne	LBB0_2
## %bb.3:
	movq	_USB_XFER_OUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_USB_XFER_IN@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %edx
	movl	%r12d, %ecx
	shrl	$31, %ecx
	addl	%r12d, %ecx
	sarl	%ecx
	movq	%r15, %rsi
	callq	*%rax
	movl	%eax, %r13d
	movq	_USB_ERR_CANCELLED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_7
## %bb.5:
	movq	(%r15), %rdi
	shlq	$2, %rdi
	addq	8(%r15), %rdi
	callq	_USB_DATA_GET_ERRCODE
	movq	_USB_NAK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.6:
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_11
LBB0_7:
	leaq	-44(%rbp), %r8
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	callq	_pci_xhci_xfer_complete
	movl	%eax, %r13d
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_10
## %bb.8:
	cmpl	$0, -44(%rbp)
	je	LBB0_10
## %bb.9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_xhci_assert_interrupt
LBB0_10:
	movq	%r15, %rdi
	callq	_USB_DATA_XFER_RESET
LBB0_11:
	movq	%r15, %rdi
	callq	_USB_DATA_XFER_UNLOCK
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_ST_EPCTX_RUNNING,4,2      ## @XHCI_ST_EPCTX_RUNNING
	.comm	_USB_XFER_IN,4,2                ## @USB_XFER_IN
	.comm	_USB_XFER_OUT,4,2               ## @USB_XFER_OUT
	.comm	_USB_ERR_CANCELLED,4,2          ## @USB_ERR_CANCELLED
	.comm	_USB_NAK,8,3                    ## @USB_NAK
	.comm	_XHCI_TRB_ERROR_SUCCESS,4,2     ## @XHCI_TRB_ERROR_SUCCESS
	.no_dead_strip	_pci_xhci_try_usb_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_try_usb_xfer
_pci_xhci_try_usb_xfer:                 ; @pci_xhci_try_usb_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x5
	mov	x22, x4
	mov	x19, x3
	mov	x24, x2
	mov	x23, x1
	mov	x20, x0
	ldr	w0, [x3]
Lloh0:
	adrp	x8, _XHCI_ST_EPCTX_RUNNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XHCI_ST_EPCTX_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #7
	mov	w3, #0
	bl	_FIELD_REPLACE
	str	w0, [x19]
	str	wzr, [sp, #12]
	ldr	x19, [x24]
	mov	x0, x19
	bl	_USB_DATA_XFER_LOCK
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x23]
Lloh3:
	adrp	x9, _USB_XFER_IN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _USB_XFER_IN@GOTPAGEOFF]
Lloh5:
	adrp	x10, _USB_XFER_OUT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _USB_XFER_OUT@GOTPAGEOFF]
	tst	w21, #0x1
	csel	x9, x10, x9, eq
	ldr	w2, [x9]
	cmp	w21, #0
	cinc	w9, w21, lt
	asr	w3, w9, #1
	mov	x1, x19
	blr	x8
Lloh7:
	adrp	x8, _USB_ERR_CANCELLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _USB_ERR_CANCELLED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	mov	x23, x0
	ldp	x9, x8, [x19]
	add	x0, x8, x9, lsl #2
	bl	_USB_DATA_GET_ERRCODE
Lloh10:
	adrp	x8, _USB_NAK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _USB_NAK@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	x0, x8
	csel	w21, w9, w23, eq
	b	LBB0_7
LBB0_3:
	mov	w21, #0
	b	LBB0_7
LBB0_4:
	add	x4, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	bl	_pci_xhci_xfer_complete
	mov	x21, x0
Lloh16:
	adrp	x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	cmp	w0, w8
	ccmp	w9, #0, #4, eq
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_pci_xhci_assert_interrupt
LBB0_6:
	mov	x0, x19
	bl	_USB_DATA_XFER_RESET
LBB0_7:
	mov	x0, x19
	bl	_USB_DATA_XFER_UNLOCK
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_ST_EPCTX_RUNNING,4,2      ; @XHCI_ST_EPCTX_RUNNING
	.comm	_USB_XFER_IN,4,2                ; @USB_XFER_IN
	.comm	_USB_XFER_OUT,4,2               ; @USB_XFER_OUT
	.comm	_USB_ERR_CANCELLED,4,2          ; @USB_ERR_CANCELLED
	.comm	_USB_NAK,8,3                    ; @USB_NAK
	.comm	_XHCI_TRB_ERROR_SUCCESS,4,2     ; @XHCI_TRB_ERROR_SUCCESS
	.no_dead_strip	_pci_xhci_try_usb_xfer
.subsections_via_symbols
