	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_xhci_portregs_read
_pci_xhci_portregs_read:                ## @pci_xhci_portregs_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leal	-1008(%rsi), %edx
	leal	-993(%rsi), %ecx
	testl	%edx, %edx
	cmovnsl	%edx, %ecx
	movl	%ecx, %edx
	sarl	$4, %edx
	movq	_XHCI_MAX_DEVS@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	jle	LBB0_3
## %bb.5:
	movslq	%edx, %rdi
	callq	_DPRINTF
	movl	$3, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_XHCI_PS_SPEED_SET              ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	andl	$-16, %ecx
	negl	%ecx
	addl	%esi, %ecx
	addl	$-1008, %ecx                    ## imm = 0xFC10
	movslq	%edx, %rdx
	leaq	(%rax,%rdx,4), %r14
	movslq	%ecx, %rbx
	andq	$-4, %rbx
	movslq	(%rbx,%r14), %rdi
	callq	_DPRINTF
	movl	(%rbx,%r14), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XHCI_MAX_DEVS,4,2              ## @XHCI_MAX_DEVS
	.no_dead_strip	_pci_xhci_portregs_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_xhci_portregs_read
_pci_xhci_portregs_read:                ; @pci_xhci_portregs_read
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	sub	w9, w1, #1008
	add	w10, w9, #15
	cmp	w9, #0
	csel	w10, w10, w9, lt
	asr	w10, w10, #4
Lloh0:
	adrp	x11, _XHCI_MAX_DEVS@GOTPAGE
Lloh1:
	ldr	x11, [x11, _XHCI_MAX_DEVS@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	cmp	w10, w11
	b.le	LBB0_4
; %bb.2:
	sxtw	x0, w10
	bl	_DPRINTF
	mov	w0, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_XHCI_PS_SPEED_SET
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	sub	w9, w9, w10, lsl #4
	add	x19, x8, w10, sxtw #2
	sxtw	x8, w9
	and	x20, x8, #0xfffffffffffffffc
	ldrsw	x0, [x19, x20]
	bl	_DPRINTF
	ldr	w0, [x19, x20]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XHCI_MAX_DEVS,4,2              ; @XHCI_MAX_DEVS
	.no_dead_strip	_pci_xhci_portregs_read
.subsections_via_symbols
