	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function advk_pcie_probe
_advk_pcie_probe:                       ## @advk_pcie_probe
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$16, %esi
	callq	_devm_pci_alloc_host_bridge
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_pci_host_bridge_priv
	movq	%rax, %r14
	movq	%rbx, 8(%rax)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.15:
	movl	4(%r14), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	_advk_pcie_irq_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rsi
	movq	_IRQF_NO_THREAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	leaq	L_.str(%rip), %r8
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_advk_pcie_parse_request_of_pci_ranges
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_8:
	movq	%r14, %rdi
	callq	_advk_pcie_setup_hw
	movq	%r14, %rdi
	callq	_advk_sw_pci_bridge_init
	movq	%r14, %rdi
	callq	_advk_pcie_init_irq_domain
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%rbx, %rdi
	callq	_dev_err
LBB0_14:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	callq	_advk_pcie_init_msi_irq_domain
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_advk_pcie_remove_irq_domain
	jmp	LBB0_14
LBB0_12:
	movq	%r15, %rsi
	addq	$40, %rsi
	movq	%r14, %rdi
	callq	_list_splice_init
	movq	%rbx, 32(%r15)
	movq	%r14, 24(%r15)
	movq	$0, 16(%r15)
	movq	_advk_pcie_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	_of_irq_parse_and_map_pci@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_pci_common_swizzle@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_pci_host_probe
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_advk_pcie_remove_msi_irq_domain
	movq	%r14, %rdi
	callq	_advk_pcie_remove_irq_domain
	movl	%ebx, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_advk_pcie_irq_handler,4,2      ## @advk_pcie_irq_handler
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_IRQF_NO_THREAD,4,2             ## @IRQF_NO_THREAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"advk-pcie"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to register interrupt\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to parse resources\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to initialize irq\n"

	.comm	_advk_pcie_ops,4,2              ## @advk_pcie_ops
	.comm	_of_irq_parse_and_map_pci,4,2   ## @of_irq_parse_and_map_pci
	.comm	_pci_common_swizzle,4,2         ## @pci_common_swizzle
	.no_dead_strip	_advk_pcie_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function advk_pcie_probe
_advk_pcie_probe:                       ; @advk_pcie_probe
	.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, x0
	mov	w1, #16
	bl	_devm_pci_alloc_host_bridge
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	bl	_pci_host_bridge_priv
	mov	x19, x0
	str	x20, [x0, #8]
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	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
	b	_PTR_ERR
LBB0_3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_4:
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	mov	x1, x0
Lloh6:
	adrp	x8, _advk_pcie_irq_handler@GOTPAGE
Lloh7:
	ldr	x8, [x8, _advk_pcie_irq_handler@GOTPAGEOFF]
Lloh8:
	adrp	x9, _IRQF_SHARED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IRQF_SHARED@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	ldr	w8, [x9]
Lloh12:
	adrp	x9, _IRQF_NO_THREAD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IRQF_NO_THREAD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh15:
	adrp	x4, l_.str@PAGE
Lloh16:
	add	x4, x4, l_.str@PAGEOFF
	mov	x0, x20
	mov	x5, x19
	bl	_devm_request_irq
	cbz	w0, LBB0_6
; %bb.5:
	mov	x22, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	mov	x0, x19
	bl	_advk_pcie_parse_request_of_pci_ranges
	cbz	w0, LBB0_8
; %bb.7:
	mov	x22, x0
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_advk_pcie_setup_hw
	mov	x0, x19
	bl	_advk_sw_pci_bridge_init
	mov	x0, x19
	bl	_advk_pcie_init_irq_domain
	cbz	w0, LBB0_12
; %bb.9:
	mov	x22, x0
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
LBB0_11:
	mov	x0, x22
	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
LBB0_12:
	mov	x0, x19
	bl	_advk_pcie_init_msi_irq_domain
	cbz	w0, LBB0_15
; %bb.13:
	mov	x22, x0
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_14:
	mov	x0, x19
	bl	_advk_pcie_remove_irq_domain
	b	LBB0_11
LBB0_15:
	add	x1, x21, #40
	mov	x0, x19
	bl	_list_splice_init
	stp	x19, x20, [x21, #24]
Lloh25:
	adrp	x8, _advk_pcie_ops@GOTPAGE
Lloh26:
	ldr	x8, [x8, _advk_pcie_ops@GOTPAGEOFF]
	stp	x8, xzr, [x21, #8]
Lloh27:
	adrp	x8, _of_irq_parse_and_map_pci@GOTPAGE
Lloh28:
	ldr	x8, [x8, _of_irq_parse_and_map_pci@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _pci_common_swizzle@GOTPAGE
Lloh31:
	ldr	x9, [x9, _pci_common_swizzle@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	stp	w9, w8, [x21]
	mov	x0, x21
	bl	_pci_host_probe
	tbnz	w0, #31, LBB0_17
; %bb.16:
	mov	w22, #0
	b	LBB0_11
LBB0_17:
	mov	x22, x0
	mov	x0, x19
	bl	_advk_pcie_remove_msi_irq_domain
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_advk_pcie_irq_handler,4,2      ; @advk_pcie_irq_handler
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_IRQF_NO_THREAD,4,2             ; @IRQF_NO_THREAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"advk-pcie"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to register interrupt\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to parse resources\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to initialize irq\n"

	.comm	_advk_pcie_ops,4,2              ; @advk_pcie_ops
	.comm	_of_irq_parse_and_map_pci,4,2   ; @of_irq_parse_and_map_pci
	.comm	_pci_common_swizzle,4,2         ; @pci_common_swizzle
	.no_dead_strip	_advk_pcie_probe
.subsections_via_symbols
