	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_device_doorbell
_pci_xhci_device_doorbell:              ## @pci_xhci_device_doorbell
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rcx, %rdi
	callq	_DPRINTF
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	cmpq	%rbx, (%r12)
	jae	LBB0_4
LBB0_2:
	movq	%rbx, %rdi
LBB0_3:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPRINTF                        ## TAILCALL
LBB0_4:
	testq	%r13, %r13
	je	LBB0_10
## %bb.5:
	movq	_XHCI_MAX_ENDPOINTS@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jbe	LBB0_10
## %bb.6:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_XHCI_SLOTDEV_PTR
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_pci_xhci_get_dev_ctx
	testq	%rax, %rax
	je	LBB0_24
## %bb.7:
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %r14
	shlq	$4, %r14
	movslq	8(%rax,%r14), %rdi
	callq	_DPRINTF
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$0, (%rdi,%r14)
	je	LBB0_24
## %bb.8:
	leaq	(,%r13,4), %rsi
	addq	%r13, %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rsi,8), %rdx
	leaq	(%rdi,%r14), %rcx
	movq	32(%rax,%rsi,8), %rax
	cmpq	$0, (%rax)
	jle	LBB0_11
## %bb.9:
	movq	%r12, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %r8
	movq	%r13, %r9
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_xhci_try_usb_xfer          ## TAILCALL
LBB0_10:
	movq	%r13, %rdi
	jmp	LBB0_3
LBB0_11:
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rdi,%r14), %rax
	addq	$4, %rax
	movl	(%rax), %edi
	callq	_XHCI_EPCTX_0_MAXP_STREAMS_GET
	testq	%rax, %rax
	je	LBB0_17
## %bb.12:
	leaq	-65534(%r15), %rax
	cmpq	$2, %rax
	jb	LBB0_16
## %bb.13:
	testq	%r15, %r15
	je	LBB0_16
## %bb.14:
	movq	$0, -104(%rbp)
	leaq	-104(%rbp), %rcx
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_pci_xhci_find_stream
	cmpq	$0, -104(%rbp)
	je	LBB0_16
## %bb.15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rax,%rcx,8), %rax
	movq	%r15, %rcx
	shlq	$4, %rcx
	movl	(%rax,%rcx), %edx
	movq	8(%rax,%rcx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %esi
	andl	$-16, %esi
	movq	%r12, %rdi
	callq	_XHCI_GADDR
	movq	_XHCI_TRB_3_CYCLE_BIT@GOTPCREL(%rip), %rdx
	movq	%rax, %r14
	movl	(%rax), %ecx
	andl	(%rdx), %ecx
	jmp	LBB0_20
LBB0_16:
	movq	%r15, %rdi
LBB0_23:
	callq	_DPRINTF
LBB0_24:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	testq	%r15, %r15
	je	LBB0_19
## %bb.18:
	movq	%r15, %rdi
	jmp	LBB0_3
LBB0_19:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rax,%rdx,8), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rax,%rdx,8), %rcx
	movq	_XHCI_TRB_3_CYCLE_BIT@GOTPCREL(%rip), %rax
	movq	%rcx, %r14
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
LBB0_20:
	movslq	%ecx, %rdi
	callq	_DPRINTF
	movl	(%r14), %edi
	callq	_XHCI_TRB_3_TYPE_GET
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movq	%r12, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	movq	%rbx, %r9
	pushq	%r15
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%r13
	callq	_pci_xhci_handle_transfer
	addq	$32, %rsp
	jmp	LBB0_24
LBB0_22:
	movq	%r13, %rdi
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_MAX_ENDPOINTS,8,3         ## @XHCI_MAX_ENDPOINTS
	.comm	_XHCI_TRB_3_CYCLE_BIT,4,2       ## @XHCI_TRB_3_CYCLE_BIT
	.no_dead_strip	_pci_xhci_device_doorbell
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_device_doorbell
_pci_xhci_device_doorbell:              ; @pci_xhci_device_doorbell
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x3
	bl	_DPRINTF
	cbz	x20, LBB0_2
; %bb.1:
	ldr	x8, [x22]
	cmp	x8, x20
	b.hs	LBB0_4
LBB0_2:
	mov	x0, x20
LBB0_3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_DPRINTF
LBB0_4:
	cbz	x19, LBB0_10
; %bb.5:
Lloh0:
	adrp	x8, _XHCI_MAX_ENDPOINTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XHCI_MAX_ENDPOINTS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ls	LBB0_10
; %bb.6:
	mov	x0, x22
	mov	x1, x20
	bl	_XHCI_SLOTDEV_PTR
	mov	x23, x0
	ldr	x27, [x0]
	mov	x0, x22
	mov	x1, x20
	bl	_pci_xhci_get_dev_ctx
	cbz	x0, LBB0_18
; %bb.7:
	ldr	x8, [x0]
	add	x24, x8, x19, lsl #4
	ldrsw	x0, [x24, #8]
	bl	_DPRINTF
	ldr	w8, [x24]
	cbz	w8, LBB0_18
; %bb.8:
	mov	w8, #40
	madd	x25, x19, x8, x27
	mov	w8, #40
	madd	x8, x19, x8, x27
	ldr	x8, [x8, #32]
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x24
	mov	x4, x20
	mov	x5, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_pci_xhci_try_usb_xfer
LBB0_10:
	mov	x0, x19
	b	LBB0_3
LBB0_11:
	add	x8, x24, #4
	ldr	w0, [x8]
	bl	_XHCI_EPCTX_0_MAXP_STREAMS_GET
	cbz	x0, LBB0_19
; %bb.12:
	mov	x8, #-65534
	add	x8, x21, x8
	cmp	x8, #2
	b.lo	LBB0_16
; %bb.13:
	cbz	x21, LBB0_16
; %bb.14:
	str	xzr, [sp, #24]
	add	x3, sp, #24
	mov	x0, x22
	mov	x1, x24
	mov	x2, x21
	bl	_pci_xhci_find_stream
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_16
; %bb.15:
	mov	w8, #40
	madd	x8, x19, x8, x27
	ldr	x8, [x8, #24]
	add	x8, x8, x21, lsl #4
	ldr	w26, [x8]
	ldr	x28, [x8, #8]
	and	w1, w26, #0xfffffff0
	mov	x0, x22
	bl	_XHCI_GADDR
	mov	x27, x0
Lloh3:
	adrp	x8, _XHCI_TRB_3_CYCLE_BIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XHCI_TRB_3_CYCLE_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x0]
	b	LBB0_22
LBB0_16:
	mov	x0, x21
LBB0_17:
	bl	_DPRINTF
LBB0_18:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_19:
	cbz	x21, LBB0_21
; %bb.20:
	mov	x0, x21
	b	LBB0_3
LBB0_21:
	ldr	w26, [x25]
	mov	w8, #40
	madd	x8, x19, x8, x27
	ldp	x28, x27, [x8, #8]
Lloh6:
	adrp	x8, _XHCI_TRB_3_CYCLE_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XHCI_TRB_3_CYCLE_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x27]
LBB0_22:
	and	w8, w9, w8
	sxtw	x0, w8
	bl	_DPRINTF
	ldr	w0, [x27]
	bl	_XHCI_TRB_3_TYPE_GET
	cbz	x0, LBB0_24
; %bb.23:
	stp	x28, x21, [sp]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x24
	mov	x4, x27
	mov	x5, x20
	mov	x6, x19
	mov	x7, x26
	bl	_pci_xhci_handle_transfer
	b	LBB0_18
LBB0_24:
	mov	x0, x19
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_MAX_ENDPOINTS,8,3         ; @XHCI_MAX_ENDPOINTS
	.comm	_XHCI_TRB_3_CYCLE_BIT,4,2       ; @XHCI_TRB_3_CYCLE_BIT
	.no_dead_strip	_pci_xhci_device_doorbell
.subsections_via_symbols
