	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_acpi_optimize_delay
_pci_acpi_optimize_delay:               ## @pci_acpi_optimize_delay
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_pci_find_host_bridge
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	$0, (%r14)
LBB0_2:
	movq	_FUNCTION_DELAY_DSM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_pci_acpi_dsm_guid@GOTPCREL(%rip), %rsi
	movl	%ebx, %edi
	movl	$3, %edx
	xorl	%r8d, %r8d
	callq	_acpi_evaluate_dsm
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	(%rax), %rcx
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.4:
	cmpl	$5, %ecx
	jne	LBB0_11
## %bb.5:
	movq	8(%rax), %rdx
	movq	(%rdx), %rsi
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_8
## %bb.6:
	movslq	%esi, %rsi
	imulq	$274877907, %rsi, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rdi
	shrq	$63, %rdi
	sarq	$38, %rsi
	addl	%edi, %esi
	movq	_PCI_PM_D3COLD_WAIT@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jge	LBB0_8
## %bb.7:
	movl	%esi, (%r14)
LBB0_8:
	cmpq	%rcx, 48(%rdx)
	jne	LBB0_11
## %bb.9:
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movq	_PCI_PM_D3_WAIT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_11
## %bb.10:
	movl	%ecx, 4(%r14)
LBB0_11:
	movq	%rax, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ACPI_FREE                      ## TAILCALL
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pci_acpi_dsm_guid,4,2          ## @pci_acpi_dsm_guid
	.comm	_FUNCTION_DELAY_DSM,4,2         ## @FUNCTION_DELAY_DSM
	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_PCI_PM_D3COLD_WAIT,4,2         ## @PCI_PM_D3COLD_WAIT
	.comm	_PCI_PM_D3_WAIT,4,2             ## @PCI_PM_D3_WAIT
	.no_dead_strip	_pci_acpi_optimize_delay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_acpi_optimize_delay
_pci_acpi_optimize_delay:               ; @pci_acpi_optimize_delay
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_pci_find_host_bridge
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	str	wzr, [x19]
LBB0_2:
Lloh0:
	adrp	x8, _FUNCTION_DELAY_DSM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FUNCTION_DELAY_DSM@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x1, _pci_acpi_dsm_guid@GOTPAGE
Lloh4:
	ldr	x1, [x1, _pci_acpi_dsm_guid@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #3
	mov	x4, #0
	bl	_acpi_evaluate_dsm
	cbz	x0, LBB0_11
; %bb.3:
	ldr	x8, [x0]
Lloh5:
	adrp	x9, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w8, #5, #0, eq
	b.ne	LBB0_10
; %bb.4:
	ldr	x9, [x0, #8]
	ldr	x10, [x9]
Lloh8:
	adrp	x8, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x10, x8
	b.ne	LBB0_7
; %bb.5:
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	smull	x10, w10, w11
	lsr	x11, x10, #63
	asr	x10, x10, #38
Lloh11:
	adrp	x12, _PCI_PM_D3COLD_WAIT@GOTPAGE
Lloh12:
	ldr	x12, [x12, _PCI_PM_D3COLD_WAIT@GOTPAGEOFF]
Lloh13:
	ldr	w12, [x12]
	add	w10, w10, w11
	cmp	w10, w12
	b.ge	LBB0_7
; %bb.6:
	str	w10, [x19]
LBB0_7:
	ldr	x9, [x9, #48]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
Lloh14:
	adrp	x10, _PCI_PM_D3_WAIT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _PCI_PM_D3_WAIT@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	add	w8, w8, w9
	cmp	w8, w10
	b.ge	LBB0_10
; %bb.9:
	str	w8, [x19, #4]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ACPI_FREE
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_pci_acpi_dsm_guid,4,2          ; @pci_acpi_dsm_guid
	.comm	_FUNCTION_DELAY_DSM,4,2         ; @FUNCTION_DELAY_DSM
	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_PCI_PM_D3COLD_WAIT,4,2         ; @PCI_PM_D3COLD_WAIT
	.comm	_PCI_PM_D3_WAIT,4,2             ; @PCI_PM_D3_WAIT
	.no_dead_strip	_pci_acpi_optimize_delay
.subsections_via_symbols
