	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_xt_set_gpio_as_eint
_mtk_xt_set_gpio_as_eint:               ## @mtk_xt_set_gpio_as_eint
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-20(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	callq	_mtk_xt_get_gpio_n
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	-20(%rbp), %ecx
	leaq	(%rax,%rcx,4), %r14
	movq	_PINCTRL_PIN_REG_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	(%rax,%rcx,4), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mtk_hw_set_value
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	_PINCTRL_PIN_REG_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MTK_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mtk_hw_set_value
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_PINCTRL_PIN_REG_SMT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MTK_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mtk_hw_set_value
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_6
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PINCTRL_PIN_REG_MODE,4,2       ## @PINCTRL_PIN_REG_MODE
	.comm	_PINCTRL_PIN_REG_DIR,4,2        ## @PINCTRL_PIN_REG_DIR
	.comm	_MTK_INPUT,4,2                  ## @MTK_INPUT
	.comm	_PINCTRL_PIN_REG_SMT,4,2        ## @PINCTRL_PIN_REG_SMT
	.comm	_MTK_ENABLE,4,2                 ## @MTK_ENABLE
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_mtk_xt_set_gpio_as_eint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_xt_set_gpio_as_eint
_mtk_xt_set_gpio_as_eint:               ; @mtk_xt_set_gpio_as_eint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x2, sp, #4
	add	x3, sp, #8
	bl	_mtk_xt_get_gpio_n
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [sp, #4]
	add	x20, x8, x9, lsl #2
Lloh0:
	adrp	x8, _PINCTRL_PIN_REG_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PINCTRL_PIN_REG_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_hw_set_value
	cbnz	w0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _PINCTRL_PIN_REG_DIR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PINCTRL_PIN_REG_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _MTK_INPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MTK_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_hw_set_value
	cbnz	w0, LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _PINCTRL_PIN_REG_SMT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PINCTRL_PIN_REG_SMT@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _MTK_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MTK_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_hw_set_value
	cbz	w0, LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PINCTRL_PIN_REG_MODE,4,2       ; @PINCTRL_PIN_REG_MODE
	.comm	_PINCTRL_PIN_REG_DIR,4,2        ; @PINCTRL_PIN_REG_DIR
	.comm	_MTK_INPUT,4,2                  ; @MTK_INPUT
	.comm	_PINCTRL_PIN_REG_SMT,4,2        ; @PINCTRL_PIN_REG_SMT
	.comm	_MTK_ENABLE,4,2                 ; @MTK_ENABLE
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_mtk_xt_set_gpio_as_eint
.subsections_via_symbols
