	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_init_ep
_pci_xhci_init_ep:                      ## @pci_xhci_init_ep
	.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	%rdi, %r12
	movq	8(%rdi), %r15
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movslq	%esi, %rbx
	movl	4(%r14,%rbx,8), %edi
	callq	_XHCI_EPCTX_0_MAXP_STREAMS_GET
	testl	%eax, %eax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_4
## %bb.1:
	movl	%eax, %r13d
	movq	%r13, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_DPRINTF
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rbx,2), %r14
	shlq	$4, %r14
	xorl	%edi, %edi
	cmpq	$0, 40(%r15,%r14)
	sete	%dil
	callq	_assert
	movl	(%r12), %edi
	movq	_XHCI_EPCTX_2_TR_DQ_PTR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	andl	(%rax,%rbx,8), %esi
	callq	_XHCI_GADDR
	movq	%rax, %r12
	movq	%rax, 32(%r15,%r14)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, 40(%r15,%r14)
	movl	(%r12), %edi
	movq	_XHCI_SCTX_0_TR_DQ_PTR_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	andl	%edi, %ecx
	movl	%ecx, (%rax)
	callq	_XHCI_SCTX_0_DCS_GET
	movq	40(%r15,%r14), %rcx
	movl	%eax, 4(%rcx)
	cmpl	$1, %ebx
	je	LBB0_5
## %bb.2:
	addq	%r15, %r14
	addq	$40, %r14
	decq	%r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%r14), %rax
	movl	4(%rax,%rbx,4), %edi
	movl	(%r12), %eax
	andl	%edi, %eax
	movl	%eax, 8(%rcx,%rbx,8)
	callq	_XHCI_SCTX_0_DCS_GET
	movq	(%r14), %rcx
	movl	%eax, 12(%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_3
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_DPRINTF
	movl	(%r14,%rbx,8), %edi
	movq	_XHCI_EPCTX_2_TR_DQ_PTR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	leaq	(%rbx,%rbx,2), %rbx
	shlq	$4, %rbx
	movl	%eax, (%r15,%rbx)
	callq	_XHCI_EPCTX_2_DCS_GET
	movl	%eax, 16(%r15,%rbx)
	movl	(%r12), %edi
	movl	(%r15,%rbx), %esi
	callq	_XHCI_GADDR
	movq	%rax, 24(%r15,%rbx)
	movslq	16(%r15,%rbx), %rdi
	callq	_DPRINTF
LBB0_5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rax,2), %rax
	shlq	$4, %rax
	cmpq	$0, 8(%r15,%rax)
	je	LBB0_7
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	(%r15,%rax), %rbx
	addq	$8, %rbx
	movl	$4, %edi
	callq	_malloc
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_USB_DATA_XFER_INIT             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_EPCTX_2_TR_DQ_PTR_MASK,4,2 ## @XHCI_EPCTX_2_TR_DQ_PTR_MASK
	.comm	_XHCI_SCTX_0_TR_DQ_PTR_MASK,4,2 ## @XHCI_SCTX_0_TR_DQ_PTR_MASK
	.no_dead_strip	_pci_xhci_init_ep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_init_ep
_pci_xhci_init_ep:                      ; @pci_xhci_init_ep
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x21, x0
	ldp	x23, x8, [x0, #8]
	ldr	x8, [x8]
	sxtw	x19, w1
	add	x26, x8, w1, sxtw #3
	ldr	w0, [x26, #4]
	bl	_XHCI_EPCTX_0_MAXP_STREAMS_GET
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x22, x0
	mov	w20, w0
	mov	x0, x20
	bl	_DPRINTF
	mov	w8, #48
	madd	x24, x19, x8, x23
	mov	x25, x24
	ldr	x8, [x25, #40]!
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x21]
	ldr	w8, [x26]
Lloh0:
	adrp	x9, _XHCI_EPCTX_2_TR_DQ_PTR_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XHCI_EPCTX_2_TR_DQ_PTR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w1, w9, w8
	bl	_XHCI_GADDR
	mov	x21, x0
	str	x0, [x24, #32]!
	mov	x0, x22
	mov	w1, #4
	bl	_calloc
	str	x0, [x25]
	ldr	w8, [x21]
Lloh3:
	adrp	x21, _XHCI_SCTX_0_TR_DQ_PTR_MASK@GOTPAGE
Lloh4:
	ldr	x21, [x21, _XHCI_SCTX_0_TR_DQ_PTR_MASK@GOTPAGEOFF]
	ldr	w9, [x21]
	and	w9, w9, w8
	str	w9, [x0]
	mov	x0, x8
	bl	_XHCI_SCTX_0_DCS_GET
	ldr	x8, [x25]
	str	w0, [x8, #4]
	cmp	w22, #1
	b.eq	LBB0_5
; %bb.2:
	mov	x22, #0
	mov	w26, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	ldr	w0, [x9, x26, lsl #2]
	ldr	w9, [x21]
	and	w9, w9, w0
	add	x8, x8, x22
	str	w9, [x8, #8]
	bl	_XHCI_SCTX_0_DCS_GET
	ldr	x8, [x25]
	add	x9, x8, x22
	str	w0, [x9, #12]
	add	x26, x26, #1
	add	x22, x22, #8
	cmp	x20, x26
	b.ne	LBB0_3
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_DPRINTF
Lloh5:
	adrp	x8, _XHCI_EPCTX_2_TR_DQ_PTR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XHCI_EPCTX_2_TR_DQ_PTR_MASK@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w0
	mov	w9, #48
	madd	x20, x19, x9, x23
	str	w8, [x20]
	bl	_XHCI_EPCTX_2_DCS_GET
	str	w0, [x20, #16]
	ldr	w0, [x21]
	ldr	w1, [x20]
	bl	_XHCI_GADDR
	str	x0, [x20, #24]
	ldrsw	x0, [x20, #16]
	bl	_DPRINTF
LBB0_5:
	mov	w8, #48
	madd	x19, x19, x8, x23
	ldr	x8, [x19, #8]!
	cbz	x8, LBB0_7
; %bb.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
LBB0_7:
	mov	w0, #4
	bl	_malloc
	str	x0, [x19]
	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
	b	_USB_DATA_XFER_INIT
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_EPCTX_2_TR_DQ_PTR_MASK,4,2 ; @XHCI_EPCTX_2_TR_DQ_PTR_MASK
	.comm	_XHCI_SCTX_0_TR_DQ_PTR_MASK,4,2 ; @XHCI_SCTX_0_TR_DQ_PTR_MASK
	.no_dead_strip	_pci_xhci_init_ep
.subsections_via_symbols
