	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_xfer_complete
_pci_xhci_xfer_complete:                ## @pci_xhci_xfer_complete
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	%rdx, %rsi
	callq	_XHCI_SLOTDEV_PTR
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	leaq	(,%r14,4), %r15
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movq	(%rax), %rax
	addq	%r15, %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_pci_xhci_get_dev_ctx
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	(%r14), %r15
	movq	%r15, -144(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	cmpq	$0, 8(%r12)
	jle	LBB0_13
## %bb.1:
	movl	(%r12), %edx
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cltd
	movq	_USB_MAX_XFER_BLOCKS@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cmpq	$0, 8(%r12)
	jle	LBB0_13
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r12), %rax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rbx
	leaq	(,%rbx,8), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rax,%rcx), %rsi
	movq	%rsi, -88(%rbp)
	movq	%r13, %rdi
	callq	_XHCI_GADDR
	movq	%rax, %r14
	movq	(%rax), %rdi
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	callq	_XHCI_TRB_3_TYPE_GET
	movq	_XHCI_TRB_3_IOC_BIT@GOTPCREL(%rip), %r15
	movslq	(%r15), %rax
	xorl	%edi, %edi
	andq	(%r14), %rax
	setne	%dil
	callq	_DPRINTF
	movq	16(%r12), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 24(%rax,%rcx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	decq	8(%r12)
	leaq	(%rbx,%rbx,4), %rbx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	16(%rax,%rbx,8), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rcx
	andq	$-2, %rcx
	movslq	(%rax,%rbx,8), %rdx
	orq	%rdx, %rcx
	movq	%rcx, (%r14)
	movl	8(%rax,%rbx,8), %r9d
	movl	12(%rax,%rbx,8), %r8d
	movl	%edx, (%rsp)
	movq	%r13, %rdi
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	callq	_pci_xhci_update_ep_ring
	movq	(%r14), %rax
	movslq	(%r15), %rcx
	testq	%rcx, %rax
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_XHCI_TRB_ERROR_SHORT_PKT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_XHCI_TRB_3_ISP_BIT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	testq	%rcx, %rax
	je	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%esi, %r15d
	movl	%esi, %edi
	callq	_XHCI_TRB_2_ERROR_SET
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%r12), %rax
	movl	4(%rax,%rbx,8), %edi
	callq	_XHCI_TRB_2_REM_SET
	orq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rax, -96(%rbp)
	movq	_XHCI_TRB_EVENT_TRANSFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XHCI_TRB_3_TYPE_SET
	movl	%eax, %ebx
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_XHCI_TRB_3_SLOT_SET
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_XHCI_TRB_3_EP_SET
	orl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	orl	%ebx, %eax
	cltq
	movq	%rax, -104(%rbp)
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	callq	_XHCI_TRB_3_TYPE_GET
	movq	_XHCI_TRB_TYPE_EVENT_DATA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_DPRINTF
	movq	16(%r14), %rax
	movq	%rax, -88(%rbp)
	andl	$1048575, %ebx                  ## imm = 0xFFFFF
	movl	%r15d, %edi
	callq	_XHCI_TRB_2_ERROR_SET
	orq	%rbx, %rax
	movq	%rax, -96(%rbp)
	movq	_XHCI_TRB_3_ED_BIT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	orq	%rax, -104(%rbp)
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	%r13, %rdi
	leaq	-104(%rbp), %rsi
	xorl	%edx, %edx
	callq	_pci_xhci_insert_event
	movl	%eax, %esi
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cltd
	movq	_USB_MAX_XFER_BLOCKS@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cmpq	$0, 8(%r12)
	jg	LBB0_2
	jmp	LBB0_13
LBB0_4:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movl	-60(%rbp), %esi                 ## 4-byte Reload
LBB0_13:
	movl	%esi, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_TRB_ERROR_SUCCESS,4,2     ## @XHCI_TRB_ERROR_SUCCESS
	.comm	_XHCI_TRB_3_IOC_BIT,4,2         ## @XHCI_TRB_3_IOC_BIT
	.comm	_XHCI_TRB_ERROR_SHORT_PKT,4,2   ## @XHCI_TRB_ERROR_SHORT_PKT
	.comm	_XHCI_TRB_3_ISP_BIT,4,2         ## @XHCI_TRB_3_ISP_BIT
	.comm	_USB_MAX_XFER_BLOCKS,4,2        ## @USB_MAX_XFER_BLOCKS
	.comm	_XHCI_TRB_EVENT_TRANSFER,4,2    ## @XHCI_TRB_EVENT_TRANSFER
	.comm	_XHCI_TRB_TYPE_EVENT_DATA,8,3   ## @XHCI_TRB_TYPE_EVENT_DATA
	.comm	_XHCI_TRB_3_ED_BIT,4,2          ## @XHCI_TRB_3_ED_BIT
	.no_dead_strip	_pci_xhci_xfer_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_xfer_complete
_pci_xhci_xfer_complete:                ; @pci_xhci_xfer_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x4
	mov	x27, x3
	mov	x19, x2
	mov	x21, x1
	mov	x23, x0
	mov	x1, x2
	bl	_XHCI_SLOTDEV_PTR
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	ldr	x20, [x0]
	mov	x0, x23
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	mov	x1, x19
	bl	_pci_xhci_get_dev_ctx
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x9]
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	str	wzr, [x22]
	ldr	x9, [x21, #8]
	cmp	x9, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x28, #0
	lsl	x9, x27, #2
	add	x10, x20, x9
	add	x8, x8, x9
	stp	x8, x10, [sp, #32]              ; 16-byte Folded Spill
	ldr	w25, [x21]
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	mov	w9, #1
	str	w9, [x8]
	add	x1, sp, #56
	mov	x0, x23
	mov	w2, #0
	bl	_pci_xhci_insert_event
	mov	x26, x0
Lloh3:
	adrp	x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_11
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w25, #1
Lloh6:
	adrp	x9, _USB_MAX_XFER_BLOCKS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_MAX_XFER_BLOCKS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w25, w10, w9, w8
	ldr	x8, [x21, #8]
	cmp	x8, #0
	b.le	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	sxtw	x22, w25
	add	x9, x22, w25, sxtw #2
	lsl	x27, x9, #3
	add	x8, x8, x27
	ldr	x1, [x8, #32]
	str	x1, [sp, #72]
	mov	x0, x23
	bl	_XHCI_GADDR
	mov	x20, x0
	ldr	x19, [x0]
	mov	x0, x19
	bl	_XHCI_TRB_3_TYPE_GET
	ldr	x8, [x20]
Lloh9:
	adrp	x24, _XHCI_TRB_3_IOC_BIT@GOTPAGE
Lloh10:
	ldr	x24, [x24, _XHCI_TRB_3_IOC_BIT@GOTPAGEOFF]
	ldrsw	x9, [x24]
	tst	x8, x9
	cset	w0, ne
	bl	_DPRINTF
	ldr	x8, [x21, #16]
	add	x9, x8, x27
	ldr	w9, [x9, #24]
	cbz	w9, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #8]
	sub	x9, x9, #1
	str	x9, [x21, #8]
	mov	w9, #40
	madd	x8, x22, x9, x8
	ldr	x9, [x8, #16]
	add	x28, x9, x28
	ldr	x9, [x20]
	and	x9, x9, #0xfffffffffffffffe
	ldrsw	x6, [x8]
	orr	x9, x9, x6
	str	x9, [x20]
	ldp	w5, w4, [x8, #8]
	mov	x0, x23
	ldp	x2, x1, [sp, #40]               ; 16-byte Folded Reload
	ldr	x3, [sp, #32]                   ; 8-byte Folded Reload
                                        ; kill: def $w6 killed $w6 killed $x6
	bl	_pci_xhci_update_ep_ring
	ldr	x8, [x20]
	ldrsw	x9, [x24]
	tst	x8, x9
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x9, _XHCI_TRB_ERROR_SHORT_PKT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _XHCI_TRB_ERROR_SHORT_PKT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w26, w9
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x9, _XHCI_TRB_3_ISP_BIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _XHCI_TRB_3_ISP_BIT@GOTPAGEOFF]
Lloh16:
	ldrsw	x9, [x9]
	tst	x8, x9
	b.eq	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x26
	mov	x0, x26
	bl	_XHCI_TRB_2_ERROR_SET
	mov	x26, x0
	ldr	x8, [x21, #16]
	mov	w9, #40
	madd	x8, x22, x9, x8
	ldr	w0, [x8, #4]
	bl	_XHCI_TRB_2_REM_SET
	orr	x8, x0, x26
	str	x8, [sp, #64]
Lloh17:
	adrp	x8, _XHCI_TRB_EVENT_TRANSFER@GOTPAGE
Lloh18:
	ldr	x8, [x8, _XHCI_TRB_EVENT_TRANSFER@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_XHCI_TRB_3_TYPE_SET
	mov	x22, x0
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_XHCI_TRB_3_SLOT_SET
	orr	w22, w0, w22
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_XHCI_TRB_3_EP_SET
	orr	w8, w22, w0
	sxtw	x8, w8
	str	x8, [sp, #56]
	mov	x0, x19
	bl	_XHCI_TRB_3_TYPE_GET
Lloh20:
	adrp	x8, _XHCI_TRB_TYPE_EVENT_DATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _XHCI_TRB_TYPE_EVENT_DATA@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x28
	bl	_DPRINTF
	ldr	x8, [x20, #16]
	str	x8, [sp, #72]
	and	x19, x28, #0xfffff
	mov	x0, x24
	bl	_XHCI_TRB_2_ERROR_SET
	mov	x28, #0
	orr	x8, x0, x19
Lloh23:
	adrp	x9, _XHCI_TRB_3_ED_BIT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _XHCI_TRB_3_ED_BIT@GOTPAGEOFF]
Lloh25:
	ldrsw	x9, [x9]
	ldr	x10, [sp, #56]
	orr	x9, x10, x9
	stp	x9, x8, [sp, #56]
	b	LBB0_2
LBB0_10:
	str	w25, [x21]
LBB0_11:
	mov	x0, x26
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_TRB_ERROR_SUCCESS,4,2     ; @XHCI_TRB_ERROR_SUCCESS
	.comm	_XHCI_TRB_3_IOC_BIT,4,2         ; @XHCI_TRB_3_IOC_BIT
	.comm	_XHCI_TRB_ERROR_SHORT_PKT,4,2   ; @XHCI_TRB_ERROR_SHORT_PKT
	.comm	_XHCI_TRB_3_ISP_BIT,4,2         ; @XHCI_TRB_3_ISP_BIT
	.comm	_USB_MAX_XFER_BLOCKS,4,2        ; @USB_MAX_XFER_BLOCKS
	.comm	_XHCI_TRB_EVENT_TRANSFER,4,2    ; @XHCI_TRB_EVENT_TRANSFER
	.comm	_XHCI_TRB_TYPE_EVENT_DATA,8,3   ; @XHCI_TRB_TYPE_EVENT_DATA
	.comm	_XHCI_TRB_3_ED_BIT,4,2          ; @XHCI_TRB_3_ED_BIT
	.no_dead_strip	_pci_xhci_xfer_complete
.subsections_via_symbols
