	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_usbcmd_write
_pci_xhci_usbcmd_write:                 ## @pci_xhci_usbcmd_write
	.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	%rdi, %r15
	movq	_XHCI_CMD_RS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%esi, %eax
	je	LBB0_16
## %bb.1:
	movl	(%r15), %ecx
	movl	%ecx, %r14d
	orl	%eax, %r14d
	movl	%r14d, (%r15)
	movq	_XHCI_STS_HCH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	4(%r15), %edx
	movq	_XHCI_STS_PCD@GOTPCREL(%rip), %rdi
	orl	(%rdi), %edx
	movl	%edx, 4(%r15)
	testl	%eax, %ecx
	je	LBB0_3
## %bb.2:
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_16:
	notl	%eax
	andl	(%r15), %eax
	movl	%eax, (%r15)
	movq	_XHCI_STS_HCH@GOTPCREL(%rip), %rcx
	movl	4(%r15), %edx
	orl	(%rcx), %edx
	movq	_XHCI_STS_PCD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%edx, %ecx
	movl	%ecx, 4(%r15)
	xorl	%r13d, %r13d
	movl	%eax, %r14d
	jmp	LBB0_11
LBB0_3:
	movq	_XHCI_MAX_DEVS@GOTPCREL(%rip), %rax
	movb	$1, %r13b
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.4:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax), %edi
	callq	_XHCI_PS_PLS_SET
	orl	%eax, (%rbx)
	movq	_XHCI_TRB_ERROR_SUCCESS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	_XHCI_TRB_EVENT_PORT_STS_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_pci_xhci_set_evtrb
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_pci_xhci_insert_event
	cmpq	(%rbx), %rax
	jne	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_XHCI_MAX_DEVS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r13d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_XHCI_DEVINST_PTR
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r14
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_XHCI_PORTREG_PTR
	movq	%rax, %rbx
	movq	_XHCI_PS_CCS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_XHCI_PS_CSC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	_XHCI_PS_PLS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	(%r14), %rax
	cmpl	$2, (%rax)
	movq	_UPS_PORT_LS_U0@GOTPCREL(%rip), %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_UPS_PORT_LS_POLL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_10:
	movl	(%r15), %r14d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_XHCI_CMD_RS@GOTPCREL(%rip), %rbx
	movb	$1, %r13b
LBB0_11:
	andl	(%rbx), %r14d
	orl	%esi, %r14d
	movq	_XHCI_CMD_HCRST@GOTPCREL(%rip), %rbx
	testl	%r14d, (%rbx)
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_pci_xhci_reset
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_13:
	movq	_XHCI_CMD_CSS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_XHCI_CMD_CRS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testb	%r13b, %r13b
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_pci_xhci_assert_interrupt
LBB0_15:
	orl	%r12d, %ebx
	notl	%ebx
	andl	%ebx, %r14d
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_CMD_RS,4,2                ## @XHCI_CMD_RS
	.comm	_XHCI_STS_HCH,4,2               ## @XHCI_STS_HCH
	.comm	_XHCI_STS_PCD,4,2               ## @XHCI_STS_PCD
	.comm	_XHCI_MAX_DEVS,4,2              ## @XHCI_MAX_DEVS
	.comm	_XHCI_PS_CSC,4,2                ## @XHCI_PS_CSC
	.comm	_XHCI_PS_CCS,4,2                ## @XHCI_PS_CCS
	.comm	_XHCI_PS_PLS_MASK,4,2           ## @XHCI_PS_PLS_MASK
	.comm	_UPS_PORT_LS_POLL,4,2           ## @UPS_PORT_LS_POLL
	.comm	_UPS_PORT_LS_U0,4,2             ## @UPS_PORT_LS_U0
	.comm	_XHCI_TRB_ERROR_SUCCESS,8,3     ## @XHCI_TRB_ERROR_SUCCESS
	.comm	_XHCI_TRB_EVENT_PORT_STS_CHANGE,4,2 ## @XHCI_TRB_EVENT_PORT_STS_CHANGE
	.comm	_XHCI_CMD_HCRST,4,2             ## @XHCI_CMD_HCRST
	.comm	_XHCI_CMD_CSS,4,2               ## @XHCI_CMD_CSS
	.comm	_XHCI_CMD_CRS,4,2               ## @XHCI_CMD_CRS
	.no_dead_strip	_pci_xhci_usbcmd_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_usbcmd_write
_pci_xhci_usbcmd_write:                 ; @pci_xhci_usbcmd_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x13, _XHCI_CMD_RS@GOTPAGE
Lloh1:
	ldr	x13, [x13, _XHCI_CMD_RS@GOTPAGEOFF]
	ldr	w9, [x13]
	tst	w9, w1
	b.eq	LBB0_3
; %bb.1:
	ldp	w10, w11, [x19]
	orr	w8, w10, w9
	str	w8, [x19]
Lloh2:
	adrp	x12, _XHCI_STS_HCH@GOTPAGE
Lloh3:
	ldr	x12, [x12, _XHCI_STS_HCH@GOTPAGEOFF]
Lloh4:
	ldr	w12, [x12]
	bic	w11, w11, w12
Lloh5:
	adrp	x12, _XHCI_STS_PCD@GOTPAGE
Lloh6:
	ldr	x12, [x12, _XHCI_STS_PCD@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
	orr	w11, w12, w11
	str	w11, [x19, #4]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.2:
	mov	w21, #0
	b	LBB0_11
LBB0_3:
	mov	w21, #0
	ldp	w8, w10, [x19]
	bic	w8, w8, w9
	str	w8, [x19]
Lloh8:
	adrp	x9, _XHCI_STS_HCH@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XHCI_STS_HCH@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w9, w10, w9
Lloh11:
	adrp	x10, _XHCI_STS_PCD@GOTPAGE
Lloh12:
	ldr	x10, [x10, _XHCI_STS_PCD@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	bic	w9, w9, w10
	str	w9, [x19, #4]
	b	LBB0_11
LBB0_4:
Lloh14:
	adrp	x25, _XHCI_MAX_DEVS@GOTPAGE
Lloh15:
	ldr	x25, [x25, _XHCI_MAX_DEVS@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.5:
	mov	w26, #0
Lloh16:
	adrp	x28, _UPS_PORT_LS_U0@GOTPAGE
Lloh17:
	ldr	x28, [x28, _UPS_PORT_LS_U0@GOTPAGEOFF]
Lloh18:
	adrp	x24, _XHCI_TRB_ERROR_SUCCESS@GOTPAGE
Lloh19:
	ldr	x24, [x24, _XHCI_TRB_ERROR_SUCCESS@GOTPAGEOFF]
Lloh20:
	adrp	x27, _XHCI_TRB_EVENT_PORT_STS_CHANGE@GOTPAGE
Lloh21:
	ldr	x27, [x27, _XHCI_TRB_EVENT_PORT_STS_CHANGE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25]
	add	w26, w26, #1
	cmp	w26, w8
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w26, #1
	mov	x0, x19
	mov	x1, x21
	bl	_XHCI_DEVINST_PTR
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_XHCI_PORTREG_PTR
	mov	x23, x0
Lloh22:
	adrp	x8, _XHCI_PS_CSC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _XHCI_PS_CSC@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _XHCI_PS_CCS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _XHCI_PS_CCS@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x0]
	orr	w8, w8, w9
	str	w8, [x0]
Lloh28:
	adrp	x9, _XHCI_PS_PLS_MASK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _XHCI_PS_PLS_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x0]
	ldr	x8, [x22]
	ldr	w8, [x8]
	cmp	w8, #2
Lloh31:
	adrp	x8, _UPS_PORT_LS_POLL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _UPS_PORT_LS_POLL@GOTPAGEOFF]
	csel	x8, x8, x28, eq
	ldr	w0, [x8]
	bl	_XHCI_PS_PLS_SET
	ldr	w8, [x23]
	orr	w8, w8, w0
	str	w8, [x23]
	ldr	x2, [x24]
	ldr	w3, [x27]
	add	x0, sp, #8
	mov	x1, x21
	bl	_pci_xhci_set_evtrb
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_pci_xhci_insert_event
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_6
LBB0_9:
	ldr	w8, [x19]
	mov	w21, #1
Lloh33:
	adrp	x13, _XHCI_CMD_RS@GOTPAGE
Lloh34:
	ldr	x13, [x13, _XHCI_CMD_RS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	mov	w21, #1
LBB0_11:
	ldr	w9, [x13]
	and	w8, w9, w8
	orr	w20, w8, w20
Lloh35:
	adrp	x22, _XHCI_CMD_HCRST@GOTPAGE
Lloh36:
	ldr	x22, [x22, _XHCI_CMD_HCRST@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w20, w8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_pci_xhci_reset
	ldr	w8, [x22]
	bic	w20, w20, w8
LBB0_13:
Lloh37:
	adrp	x8, _XHCI_CMD_CSS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _XHCI_CMD_CSS@GOTPAGEOFF]
Lloh39:
	ldr	w22, [x8]
Lloh40:
	adrp	x8, _XHCI_CMD_CRS@GOTPAGE
Lloh41:
	ldr	x8, [x8, _XHCI_CMD_CRS@GOTPAGEOFF]
Lloh42:
	ldr	w23, [x8]
	cbz	w21, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_pci_xhci_assert_interrupt
LBB0_15:
	orr	w8, w23, w22
	bic	w0, w20, w8
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_CMD_RS,4,2                ; @XHCI_CMD_RS
	.comm	_XHCI_STS_HCH,4,2               ; @XHCI_STS_HCH
	.comm	_XHCI_STS_PCD,4,2               ; @XHCI_STS_PCD
	.comm	_XHCI_MAX_DEVS,4,2              ; @XHCI_MAX_DEVS
	.comm	_XHCI_PS_CSC,4,2                ; @XHCI_PS_CSC
	.comm	_XHCI_PS_CCS,4,2                ; @XHCI_PS_CCS
	.comm	_XHCI_PS_PLS_MASK,4,2           ; @XHCI_PS_PLS_MASK
	.comm	_UPS_PORT_LS_POLL,4,2           ; @UPS_PORT_LS_POLL
	.comm	_UPS_PORT_LS_U0,4,2             ; @UPS_PORT_LS_U0
	.comm	_XHCI_TRB_ERROR_SUCCESS,8,3     ; @XHCI_TRB_ERROR_SUCCESS
	.comm	_XHCI_TRB_EVENT_PORT_STS_CHANGE,4,2 ; @XHCI_TRB_EVENT_PORT_STS_CHANGE
	.comm	_XHCI_CMD_HCRST,4,2             ; @XHCI_CMD_HCRST
	.comm	_XHCI_CMD_CSS,4,2               ; @XHCI_CMD_CSS
	.comm	_XHCI_CMD_CRS,4,2               ; @XHCI_CMD_CRS
	.no_dead_strip	_pci_xhci_usbcmd_write
.subsections_via_symbols
