	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxnas_pcie_probe
_oxnas_pcie_probe:                      ## @oxnas_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	%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, %r14
	movq	(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 24(%rax)
	movl	$1, (%rax)
	movq	%rax, %rdi
	addq	$20, %rdi
	callq	_spin_lock_init
	leaq	L_.str(%rip), %rdi
	callq	_syscon_regmap_lookup_by_compatible
	movl	%eax, 16(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.18:
	movl	16(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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_17
LBB0_3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_oxnas_pcie_init_res
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_4
LBB0_17:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%rbx), %r12
	testq	%r12, %r12
	js	LBB0_7
## %bb.5:
	movq	_GPIOF_DIR_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_dev_name
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_gpio_request_one
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	movq	8(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_17
LBB0_7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_oxnas_pcie_map_registers
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_oxnas_pcie_shared_init
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_12
LBB0_9:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.10:
	callq	_gpio_free
	jmp	LBB0_17
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_oxnas_pcie_init_hw
	cmpl	$0, (%rbx)
	je	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	callq	_oxnas_pcie_link_up
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %eax
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
LBB0_16:
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_dev_info
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_oxnas_pcie_enable
	xorl	%r12d, %r12d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"oxsemi,ox820-sys-ctrl"

	.comm	_GPIOF_DIR_IN,4,2               ## @GPIOF_DIR_IN
L_.str.1:                               ## @.str.1
	.asciz	"cannot request gpio pin %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"cannot map registers\n"

L_.str.3:                               ## @.str.3
	.asciz	"link up\n"

L_.str.4:                               ## @.str.4
	.asciz	"link down\n"

	.no_dead_strip	_oxnas_pcie_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxnas_pcie_probe
_oxnas_pcie_probe:                      ; @oxnas_pcie_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #24]
	mov	w8, #1
	str	w8, [x0], #20
	bl	_spin_lock_init
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_syscon_regmap_lookup_by_compatible
	str	w0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x20, #16]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_oxnas_pcie_init_res
	mov	x22, x0
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	ldr	x22, [x20, #8]
	tbnz	x22, #63, LBB0_9
; %bb.7:
Lloh8:
	adrp	x8, _GPIOF_DIR_IN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPIOF_DIR_IN@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_dev_name
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_gpio_request_one
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_oxnas_pcie_map_registers
	cbz	w0, LBB0_11
; %bb.10:
	mov	x22, x0
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_oxnas_pcie_shared_init
	mov	x22, x0
	cbz	w0, LBB0_14
LBB0_12:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.13:
	bl	_gpio_free
	b	LBB0_5
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_oxnas_pcie_init_hw
	ldr	w8, [x20]
	cbz	w8, LBB0_17
; %bb.15:
	mov	x0, x20
	bl	_oxnas_pcie_link_up
	cbz	x0, LBB0_17
; %bb.16:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w8, #1
	b	LBB0_18
LBB0_17:
	mov	w8, #0
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_18:
	str	w8, [x20]
	mov	x0, x19
	bl	_dev_info
	mov	x0, x19
	mov	x1, x20
	bl	_oxnas_pcie_enable
	mov	w22, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"oxsemi,ox820-sys-ctrl"

	.comm	_GPIOF_DIR_IN,4,2               ; @GPIOF_DIR_IN
l_.str.1:                               ; @.str.1
	.asciz	"cannot request gpio pin %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"cannot map registers\n"

l_.str.3:                               ; @.str.3
	.asciz	"link up\n"

l_.str.4:                               ; @.str.4
	.asciz	"link down\n"

	.no_dead_strip	_oxnas_pcie_probe
.subsections_via_symbols
