	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_build_eint                 ## -- Begin function mtk_build_eint
	.p2align	4, 0x90
_mtk_build_eint:                        ## @mtk_build_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rsi), %r15
	movq	_CONFIG_EINT_MTK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_bool
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movl	16(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_platform_get_resource_byname
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	(%r14), %rcx
	movl	%eax, 36(%rcx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movq	(%r14), %rax
	movl	36(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_irq_of_parse_and_map
	movq	(%r14), %rdi
	movl	%eax, 32(%rdi)
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.15:
	movq	%r12, 24(%rdi)
	movq	%rax, 16(%rdi)
	movq	%r14, 8(%rdi)
	movq	_mtk_eint_xt@GOTPCREL(%rip), %rax
	movq	%rax, (%rdi)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtk_eint_do_init               ## TAILCALL
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_EINT_MTK,4,2            ## @CONFIG_EINT_MTK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"interrupt-controller"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"eint"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to get eint resource\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mtk_eint_xt,4,2                ## @mtk_eint_xt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_build_eint                 ; -- Begin function mtk_build_eint
	.p2align	2
_mtk_build_eint:                        ; @mtk_build_eint
	.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, x1
	mov	x19, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x8, _CONFIG_EINT_MTK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_EINT_MTK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_10
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	cbz	w0, LBB0_8
; %bb.2:
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_platform_get_resource_byname
	cbz	x0, LBB0_7
; %bb.4:
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	ldr	x8, [x19]
	str	w0, [x8, #36]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.5:
	ldr	x8, [x19]
	ldr	w0, [x8, #36]
	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_6:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_8:
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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_11:
	mov	x0, x21
	mov	w1, #0
	bl	_irq_of_parse_and_map
	mov	x8, x0
	ldr	x0, [x19]
	str	w8, [x0, #32]
	cbz	w8, LBB0_14
; %bb.12:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.13:
	stp	x8, x20, [x0, #16]
Lloh19:
	adrp	x8, _mtk_eint_xt@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mtk_eint_xt@GOTPAGEOFF]
	stp	x8, x19, [x0]
	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	_mtk_eint_do_init
LBB0_14:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_EINT_MTK,4,2            ; @CONFIG_EINT_MTK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"interrupt-controller"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"eint"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to get eint resource\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mtk_eint_xt,4,2                ; @mtk_eint_xt
.subsections_via_symbols
