	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_pctrl_init                 ## -- Begin function mtk_pctrl_init
	.p2align	4, 0x90
_mtk_pctrl_init:                        ## @mtk_pctrl_init
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rdi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$104, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_of_find_property
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %rdi
	callq	_syscon_node_to_regmap
	movq	%rax, 96(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	96(%r14), %rdi
	jmp	LBB0_13
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_8:
	testq	%r15, %r15
	je	LBB0_16
## %bb.9:
	movq	%r15, 96(%r14)
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rax, %rdi
	callq	_syscon_node_to_regmap
	movq	%rax, 88(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	88(%r14), %rdi
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r14)
	movq	%r12, %rdi
	callq	_mtk_pctrl_build_state
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_16:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_17:
	movq	8(%r14), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.18:
	movq	%rax, %rbx
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_21
## %bb.19:
	movq	8(%rax), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx,4), %esi
	movl	%esi, (%rbx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_20
LBB0_21:
	movq	%r12, %rdi
	callq	_dev_name
	movq	%r14, %rsi
	addq	$24, %rsi
	movq	%rax, 72(%r14)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r14)
	movq	%rbx, 56(%r14)
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	_mtk_pconf_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r14)
	movq	_mtk_pctrl_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r14)
	movq	_mtk_pmx_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r14)
	movq	%r12, 80(%r14)
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_devm_pinctrl_register
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	16(%r14), %rdi
	jmp	LBB0_13
LBB0_23:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	movq	_mtk_gpio_chip@GOTPCREL(%rip), %rcx
	movq	16(%rcx), %rdx
	movq	%rdx, 16(%rax)
	movups	(%rcx), %xmm0
	movups	%xmm0, (%rax)
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	%r12, %rdi
	callq	_dev_name
	movq	(%r14), %rdi
	movq	%rax, 16(%rdi)
	movq	%r12, 8(%rdi)
	movl	$-1, 4(%rdi)
	movq	%r14, %rsi
	callq	_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_30
## %bb.25:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_26:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_27:
	xorl	%ebx, %ebx
LBB0_28:
	subl	(%rax), %ebx
LBB0_29:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	movq	(%r14), %r15
	movq	%r12, %rdi
	callq	_dev_name
	movq	8(%r14), %rcx
	movl	(%rcx), %r8d
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gpiochip_add_pin_range
	testl	%eax, %eax
	je	LBB0_32
## %bb.31:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %r15d
	jmp	LBB0_33
LBB0_32:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mtk_eint_init
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_29
LBB0_33:
	movq	(%r14), %rdi
	callq	_gpiochip_remove
	movl	%r15d, %ebx
	jmp	LBB0_29
	.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	"pins-are-numbered"

L_.str.1:                               ## @.str.1
	.asciz	"only support pins-are-numbered format\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"mediatek,pctl-regmap"

L_.str.3:                               ## @.str.3
	.asciz	"Pinctrl node has not register regmap.\n"

L_.str.4:                               ## @.str.4
	.asciz	"build state failed: %d\n"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_mtk_pconf_ops,4,2              ## @mtk_pconf_ops
	.comm	_mtk_pctrl_ops,4,2              ## @mtk_pctrl_ops
	.comm	_mtk_pmx_ops,4,2                ## @mtk_pmx_ops
L_.str.5:                               ## @.str.5
	.asciz	"couldn't register pinctrl driver\n"

	.comm	_mtk_gpio_chip,24,3             ## @mtk_gpio_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_pctrl_init                 ; -- Begin function mtk_pctrl_init
	.p2align	2
_mtk_pctrl_init:                        ; @mtk_pctrl_init
	.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	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #104
	bl	_devm_kzalloc
	cbz	x0, LBB0_27
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, #0
	bl	_of_find_property
	cbz	x0, LBB0_5
; %bb.2:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_6
; %bb.3:
	bl	_syscon_node_to_regmap
	str	x0, [x20, #96]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x0, [x20, #96]
	b	LBB0_11
LBB0_5:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_6:
	cbz	x23, LBB0_14
; %bb.7:
	str	x23, [x20, #96]
LBB0_8:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	w2, #1
	bl	_of_parse_phandle
	cbz	x0, LBB0_12
; %bb.9:
	bl	_syscon_node_to_regmap
	str	x0, [x20, #88]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
	ldr	x0, [x20, #88]
LBB0_11:
	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_12:
	str	x21, [x20, #8]
	mov	x0, x19
	bl	_mtk_pctrl_build_state
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_17
; %bb.13:
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_15:
	mov	x0, x19
	bl	_dev_err
LBB0_16:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_28
LBB0_17:
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	ldr	w3, [x24]
	mov	x0, x19
	mov	w2, #4
	bl	_devm_kcalloc
	cbz	x0, LBB0_27
; %bb.18:
	mov	x21, x0
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_21
; %bb.19:
	mov	x9, #0
	ldr	x10, [x8, #8]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	lsl	x11, x9, #2
	ldr	w12, [x10, x11]
	str	w12, [x21, x11]
	add	x9, x9, #1
	ldrsw	x11, [x8]
	cmp	x9, x11
	b.lt	LBB0_20
LBB0_21:
	mov	x0, x19
	bl	_dev_name
Lloh16:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20, #64]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	mov	x1, x20
	str	w8, [x1, #24]!
Lloh19:
	adrp	x8, _mtk_pconf_ops@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mtk_pconf_ops@GOTPAGEOFF]
	stp	x8, x21, [x20, #48]
Lloh21:
	adrp	x8, _mtk_pctrl_ops@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mtk_pctrl_ops@GOTPAGEOFF]
Lloh23:
	adrp	x9, _mtk_pmx_ops@GOTPAGE
Lloh24:
	ldr	x9, [x9, _mtk_pmx_ops@GOTPAGEOFF]
	stp	x9, x8, [x20, #32]
	stp	x0, x19, [x20, #72]
	mov	x0, x19
	mov	x2, x20
	bl	_devm_pinctrl_register
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_23
; %bb.22:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #16]
	b	LBB0_11
LBB0_23:
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #24
	bl	_devm_kzalloc
	str	x0, [x20]
	cbz	x0, LBB0_27
; %bb.24:
Lloh27:
	adrp	x8, _mtk_gpio_chip@GOTPAGE
Lloh28:
	ldr	x8, [x8, _mtk_gpio_chip@GOTPAGEOFF]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [x0, #16]
	str	q0, [x0]
	ldp	x9, x8, [x20]
	ldr	w8, [x8]
	str	w8, [x9]
	mov	x0, x19
	bl	_dev_name
	ldr	x8, [x20]
	stp	x19, x0, [x8, #8]
	mov	w9, #-1
	str	w9, [x8, #4]
	mov	x0, x8
	mov	x1, x20
	bl	_gpiochip_add_data
	cbnz	w0, LBB0_16
; %bb.25:
	ldr	x21, [x20]
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
	ldr	x8, [x20, #8]
	ldr	w4, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	bl	_gpiochip_add_pin_range
	cbz	w0, LBB0_30
; %bb.26:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_31
LBB0_27:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_28:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_29:
	mov	x0, x19
	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_30:
	mov	x0, x20
	mov	x1, x19
	bl	_mtk_eint_init
	mov	x19, x0
	cbz	w0, LBB0_29
LBB0_31:
	ldr	x0, [x20]
	bl	_gpiochip_remove
	b	LBB0_29
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.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	"pins-are-numbered"

l_.str.1:                               ; @.str.1
	.asciz	"only support pins-are-numbered format\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"mediatek,pctl-regmap"

l_.str.3:                               ; @.str.3
	.asciz	"Pinctrl node has not register regmap.\n"

l_.str.4:                               ; @.str.4
	.asciz	"build state failed: %d\n"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_mtk_pconf_ops,4,2              ; @mtk_pconf_ops
	.comm	_mtk_pctrl_ops,4,2              ; @mtk_pctrl_ops
	.comm	_mtk_pmx_ops,4,2                ; @mtk_pmx_ops
l_.str.5:                               ; @.str.5
	.asciz	"couldn't register pinctrl driver\n"

	.comm	_mtk_gpio_chip,24,3             ; @mtk_gpio_chip
.subsections_via_symbols
