	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_pcie_subsys_powerup
_mtk_pcie_subsys_powerup:               ## @mtk_pcie_subsys_powerup
	.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	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_to_platform_device
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	callq	_platform_get_resource_byname
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	8(%rbx), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	addl	(%rax), %ecx
	je	LBB0_8
## %bb.4:
	movq	$0, (%rbx)
LBB0_5:
	movq	%r14, %rdi
	callq	_pm_runtime_enable
	movq	%r14, %rdi
	callq	_pm_runtime_get_sync
	movq	(%rbx), %rdi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_pm_runtime_put_sync
	movq	%r14, %rdi
	callq	_pm_runtime_disable
	jmp	LBB0_8
LBB0_6:
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"subsys"

L_.str.1:                               ## @.str.1
	.asciz	"failed to map shared register\n"

L_.str.2:                               ## @.str.2
	.asciz	"free_ck"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.3:                               ## @.str.3
	.asciz	"failed to enable free_ck\n"

	.no_dead_strip	_mtk_pcie_subsys_powerup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_pcie_subsys_powerup
_mtk_pcie_subsys_powerup:               ; @mtk_pcie_subsys_powerup
	.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
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_to_platform_device
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_platform_get_resource_byname
	cbz	x0, LBB0_3
; %bb.1:
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #8]
	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:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x0, [x20]
	bl	_PTR_ERR
	mov	x21, x0
Lloh9:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_8
; %bb.5:
	str	xzr, [x20]
LBB0_6:
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	bl	_pm_runtime_get_sync
	ldr	x0, [x20]
	bl	_clk_prepare_enable
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.7:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x19
	bl	_pm_runtime_put_sync
	mov	x0, x19
	bl	_pm_runtime_disable
LBB0_8:
	mov	x0, x21
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"subsys"

l_.str.1:                               ; @.str.1
	.asciz	"failed to map shared register\n"

l_.str.2:                               ; @.str.2
	.asciz	"free_ck"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.3:                               ; @.str.3
	.asciz	"failed to enable free_ck\n"

	.no_dead_strip	_mtk_pcie_subsys_powerup
.subsections_via_symbols
