	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function upstream_bridge_distance
_upstream_bridge_distance:              ## @upstream_bridge_distance
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	___upstream_bridge_distance
	movl	%eax, %r15d
	movq	_PCI_P2PDMA_MAP_THRU_HOST_BRIDGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_host_bridge_whitelist
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_PCI_P2PDMA_MAP_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_3:
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_map_types_idx
	movl	%eax, %r14d
	movl	%r15d, %edi
	callq	_xa_mk_value
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_xa_store
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_P2PDMA_MAP_THRU_HOST_BRIDGE,4,2 ## @PCI_P2PDMA_MAP_THRU_HOST_BRIDGE
	.comm	_PCI_P2PDMA_MAP_NOT_SUPPORTED,4,2 ## @PCI_P2PDMA_MAP_NOT_SUPPORTED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_upstream_bridge_distance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function upstream_bridge_distance
_upstream_bridge_distance:              ; @upstream_bridge_distance
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x21, x0
	bl	___upstream_bridge_distance
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_P2PDMA_MAP_THRU_HOST_BRIDGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_P2PDMA_MAP_THRU_HOST_BRIDGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_host_bridge_whitelist
Lloh3:
	adrp	x8, _PCI_P2PDMA_MAP_NOT_SUPPORTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_P2PDMA_MAP_NOT_SUPPORTED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w19, w8, w19, eq
LBB0_2:
	ldr	x21, [x21]
	cbz	x21, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_map_types_idx
	mov	x20, x0
	mov	x0, x19
	bl	_xa_mk_value
	mov	x2, x0
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_xa_store
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_P2PDMA_MAP_THRU_HOST_BRIDGE,4,2 ; @PCI_P2PDMA_MAP_THRU_HOST_BRIDGE
	.comm	_PCI_P2PDMA_MAP_NOT_SUPPORTED,4,2 ; @PCI_P2PDMA_MAP_NOT_SUPPORTED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_upstream_bridge_distance
.subsections_via_symbols
