	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_find_stream
_pci_xhci_find_stream:                  ## @pci_xhci_find_stream
	.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
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movl	4(%rsi), %edi
	callq	_XHCI_EPCTX_0_MAXP_STREAMS_GET
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_XHCI_STREAMS_MAX@GOTPCREL(%rip), %rax
	movq	_XHCI_TRB_ERROR_INVALID_SID@GOTPCREL(%rip), %r14
	cmpq	(%rax), %rbx
	jg	LBB0_8
## %bb.3:
	movl	4(%r13), %edi
	callq	_XHCI_EPCTX_0_LSA_GET
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_XHCI_TRB_ERROR_STREAM_TYPE@GOTPCREL(%rip), %r14
	cmpq	%r15, %rbx
	jl	LBB0_8
## %bb.6:
	movl	(%r13), %esi
	andl	$-16, %esi
	movq	%r12, %rdi
	callq	_XHCI_GADDR
	movq	%rax, %rbx
	movl	(%rax,%r15,4), %edi
	callq	_XHCI_SCTX_0_SCT_GET
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	(%rbx,%r15,4), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %r14
	jmp	LBB0_8
LBB0_1:
	movq	_XHCI_TRB_ERROR_TRB@GOTPCREL(%rip), %r14
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTF
LBB0_8:
	movq	(%r14), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_TRB_ERROR_TRB,8,3         ## @XHCI_TRB_ERROR_TRB
	.comm	_XHCI_STREAMS_MAX,8,3           ## @XHCI_STREAMS_MAX
	.comm	_XHCI_TRB_ERROR_INVALID_SID,8,3 ## @XHCI_TRB_ERROR_INVALID_SID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pci_xhci: find_stream; LSA bit not set\r\n"

	.comm	_XHCI_TRB_ERROR_STREAM_TYPE,8,3 ## @XHCI_TRB_ERROR_STREAM_TYPE
	.comm	_XHCI_TRB_ERROR_SUCCESS,8,3     ## @XHCI_TRB_ERROR_SUCCESS
	.no_dead_strip	_pci_xhci_find_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_find_stream
_pci_xhci_find_stream:                  ; @pci_xhci_find_stream
	.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, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x1, #4]
	bl	_XHCI_EPCTX_0_MAXP_STREAMS_GET
	cbz	x0, LBB0_6
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x8, _XHCI_STREAMS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XHCI_STREAMS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.gt	LBB0_9
; %bb.2:
	ldr	w0, [x22, #4]
	bl	_XHCI_EPCTX_0_LSA_GET
	cbz	x0, LBB0_8
; %bb.3:
	cmp	x23, x20
	b.lt	LBB0_7
; %bb.4:
	ldr	w8, [x22]
	and	w1, w8, #0xfffffff0
	mov	x0, x21
	bl	_XHCI_GADDR
	add	x20, x0, x20, lsl #2
	ldr	w0, [x20]
	bl	_XHCI_SCTX_0_SCT_GET
	cbz	w0, LBB0_7
; %bb.5:
	str	x20, [x19]
Lloh3:
	adrp	x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x8, _XHCI_TRB_ERROR_TRB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XHCI_TRB_ERROR_TRB@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh7:
	adrp	x8, _XHCI_TRB_ERROR_STREAM_TYPE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _XHCI_TRB_ERROR_STREAM_TYPE@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTF
LBB0_9:
Lloh11:
	adrp	x8, _XHCI_TRB_ERROR_INVALID_SID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XHCI_TRB_ERROR_INVALID_SID@GOTPAGEOFF]
LBB0_10:
	ldr	x0, [x8]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_TRB_ERROR_TRB,8,3         ; @XHCI_TRB_ERROR_TRB
	.comm	_XHCI_STREAMS_MAX,8,3           ; @XHCI_STREAMS_MAX
	.comm	_XHCI_TRB_ERROR_INVALID_SID,8,3 ; @XHCI_TRB_ERROR_INVALID_SID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pci_xhci: find_stream; LSA bit not set\r\n"

	.comm	_XHCI_TRB_ERROR_STREAM_TYPE,8,3 ; @XHCI_TRB_ERROR_STREAM_TYPE
	.comm	_XHCI_TRB_ERROR_SUCCESS,8,3     ; @XHCI_TRB_ERROR_SUCCESS
	.no_dead_strip	_pci_xhci_find_stream
.subsections_via_symbols
