	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_cmd_address_device
_pci_xhci_cmd_address_device:           ## @pci_xhci_cmd_address_device
	.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	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdx), %esi
	andl	$-16, %esi
	callq	_XHCI_GADDR
	movq	%rax, %r13
	movq	16(%rax), %r12
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movslq	40(%r12), %rdi
	callq	_DPRINTF
	cmpq	$0, (%r13)
	jne	LBB0_5
## %bb.1:
	movl	8(%r13), %eax
	notl	%eax
	testb	$3, %al
	jne	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_pci_xhci_get_dev_ctx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movslq	(%rax), %rdi
	callq	_DPRINTF
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_XHCI_SLOTDEV_PTR
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, 24(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movl	4(%rbx), %edi
	callq	*%rax
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:
	addq	$24, %r13
	addq	$32, %r12
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	_XHCI_ST_SLCTX_ADDRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XHCI_SCTX_3_SLOT_STATE_SET
	movl	%eax, %r13d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_XHCI_SCTX_3_DEV_ADDR_SET
	orl	%r13d, %eax
	movl	%eax, (%r15)
	movq	32(%r15), %rdi
	addq	$32, %rdi
	movq	%r12, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	32(%r15), %r15
	movl	36(%r15), %r12d
	andl	$-8, %r12d
	movq	_XHCI_ST_EPCTX_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XHCI_EPCTX_0_EPSTATE_SET
	orl	%r12d, %eax
	movl	%eax, 36(%r15)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pci_xhci_init_ep
	movq	_XHCI_ST_ADDRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movslq	40(%r15), %rdi
	callq	_DPRINTF
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_DPRINTF
	movq	_XHCI_TRB_ERROR_TRB@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_XHCI_TRB_ERROR_ENDP_NOT_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_TRB_ERROR_SUCCESS,4,2     ## @XHCI_TRB_ERROR_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"pci_xhci: address device, input ctl invalid\r\n"

	.comm	_XHCI_TRB_ERROR_TRB,4,2         ## @XHCI_TRB_ERROR_TRB
	.comm	_XHCI_TRB_ERROR_ENDP_NOT_ON,4,2 ## @XHCI_TRB_ERROR_ENDP_NOT_ON
	.comm	_XHCI_ST_SLCTX_ADDRESSED,4,2    ## @XHCI_ST_SLCTX_ADDRESSED
	.comm	_XHCI_ST_EPCTX_RUNNING,4,2      ## @XHCI_ST_EPCTX_RUNNING
	.comm	_XHCI_ST_ADDRESSED,4,2          ## @XHCI_ST_ADDRESSED
	.no_dead_strip	_pci_xhci_cmd_address_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_cmd_address_device
_pci_xhci_cmd_address_device:           ; @pci_xhci_cmd_address_device
	.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	x20, x1
	mov	x21, x0
	ldr	w8, [x2]
	and	w1, w8, #0xfffffff0
	bl	_XHCI_GADDR
	mov	x23, x0
	ldr	x24, [x0, #16]
Lloh0:
	adrp	x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldrsw	x0, [x24, #40]
	bl	_DPRINTF
	ldr	x8, [x23]
	cbnz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x23, #8]
	mvn	w8, w8
	tst	w8, #0x3
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	bl	_pci_xhci_get_dev_ctx
	mov	x22, x0
	ldrsw	x0, [x0]
	bl	_DPRINTF
	mov	x0, x21
	mov	x1, x20
	bl	_XHCI_SLOTDEV_PTR
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	str	w20, [x21, #24]
	str	x22, [x21, #16]
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w0, [x21, #4]
	blr	x8
	tbnz	x0, #63, LBB0_8
; %bb.4:
	add	x1, x23, #24
	add	x23, x24, #32
	mov	x0, x22
	mov	w2, #32
	bl	_memcpy
Lloh3:
	adrp	x8, _XHCI_ST_SLCTX_ADDRESSED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XHCI_ST_SLCTX_ADDRESSED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_XHCI_SCTX_3_SLOT_STATE_SET
	mov	x24, x0
	mov	x0, x20
	bl	_XHCI_SCTX_3_DEV_ADDR_SET
	orr	w8, w0, w24
	str	w8, [x22]
	ldr	x8, [x22, #32]
	add	x0, x8, #32
	mov	x1, x23
	mov	w2, #32
	bl	_memcpy
	ldr	x20, [x22, #32]
	ldr	w8, [x20, #36]
	and	w22, w8, #0xfffffff8
Lloh6:
	adrp	x8, _XHCI_ST_EPCTX_RUNNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XHCI_ST_EPCTX_RUNNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_XHCI_EPCTX_0_EPSTATE_SET
	orr	w8, w0, w22
	str	w8, [x20, #36]
	mov	x0, x21
	mov	w1, #1
	bl	_pci_xhci_init_ep
Lloh9:
	adrp	x8, _XHCI_ST_ADDRESSED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XHCI_ST_ADDRESSED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x21]
	ldrsw	x0, [x20, #40]
	bl	_DPRINTF
	b	LBB0_7
LBB0_5:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTF
Lloh14:
	adrp	x8, _XHCI_TRB_ERROR_TRB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _XHCI_TRB_ERROR_TRB@GOTPAGEOFF]
LBB0_6:
	ldr	w19, [x8]
LBB0_7:
	mov	x0, x19
	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
LBB0_8:
Lloh16:
	adrp	x8, _XHCI_TRB_ERROR_ENDP_NOT_ON@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XHCI_TRB_ERROR_ENDP_NOT_ON@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_TRB_ERROR_SUCCESS,4,2     ; @XHCI_TRB_ERROR_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"pci_xhci: address device, input ctl invalid\r\n"

	.comm	_XHCI_TRB_ERROR_TRB,4,2         ; @XHCI_TRB_ERROR_TRB
	.comm	_XHCI_TRB_ERROR_ENDP_NOT_ON,4,2 ; @XHCI_TRB_ERROR_ENDP_NOT_ON
	.comm	_XHCI_ST_SLCTX_ADDRESSED,4,2    ; @XHCI_ST_SLCTX_ADDRESSED
	.comm	_XHCI_ST_EPCTX_RUNNING,4,2      ; @XHCI_ST_EPCTX_RUNNING
	.comm	_XHCI_ST_ADDRESSED,4,2          ; @XHCI_ST_ADDRESSED
	.no_dead_strip	_pci_xhci_cmd_address_device
.subsections_via_symbols
