	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_eint_do_init               ## -- Begin function mtk_eint_do_init
	.p2align	4, 0x90
_mtk_eint_do_init:                      ## @mtk_eint_do_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	%rdi, %r15
	cmpq	$0, 48(%rdi)
	jne	LBB0_2
## %bb.1:
	movq	_mtk_generic_eint_regs@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r15)
LBB0_2:
	movq	8(%r15), %rax
	movq	16(%r15), %rdi
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	$1, %edx
	callq	_devm_kcalloc
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	8(%r15), %rax
	movq	16(%r15), %rdi
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	$1, %edx
	callq	_devm_kcalloc
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	8(%r15), %rax
	movq	16(%r15), %rdi
	movl	4(%rax), %esi
	movl	(%rbx), %ecx
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movl	(%rcx), %edi
	movl	4(%rax), %esi
	movq	_irq_domain_simple_ops@GOTPCREL(%rip), %rdx
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	callq	_irq_domain_add_linear
	movl	%eax, 4(%r15)
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	movq	%r15, %rdi
	callq	_mtk_eint_hw_init
	movq	8(%r15), %rax
	cmpl	$0, 4(%rax)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	movq	_handle_level_irq@GOTPCREL(%rip), %r13
	movq	_mtk_eint_irq_chip@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %edi
	movl	%ebx, %esi
	callq	_irq_create_mapping
	movl	%eax, %r12d
	movl	(%r13), %edx
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_irq_set_chip_and_handler
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_irq_set_chip_data
	incl	%ebx
	movq	8(%r15), %rax
	cmpl	4(%rax), %ebx
	jl	LBB0_8
LBB0_9:
	movl	(%r15), %edi
	movq	_mtk_eint_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_irq_set_chained_handler_and_data
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_11:
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_mtk_generic_eint_regs,4,2      ## @mtk_generic_eint_regs
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_irq_domain_simple_ops,4,2      ## @irq_domain_simple_ops
	.comm	_mtk_eint_irq_chip,4,2          ## @mtk_eint_irq_chip
	.comm	_handle_level_irq,4,2           ## @handle_level_irq
	.comm	_mtk_eint_irq_handler,4,2       ## @mtk_eint_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_eint_do_init               ; -- Begin function mtk_eint_do_init
	.p2align	2
_mtk_eint_do_init:                      ; @mtk_eint_do_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x8, [x0, #48]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _mtk_generic_eint_regs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mtk_generic_eint_regs@GOTPAGEOFF]
	str	x8, [x19, #48]
LBB0_2:
	ldp	x8, x0, [x19, #8]
	ldr	w1, [x8]
Lloh2:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x20]
	mov	w2, #1
	bl	_devm_kcalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_10
; %bb.3:
	ldp	x8, x0, [x19, #8]
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	w2, #1
	bl	_devm_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_10
; %bb.4:
	ldp	x8, x0, [x19, #8]
	ldr	w1, [x8, #4]
	ldr	w3, [x20]
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.5:
	ldp	x9, x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x9, #4]
Lloh4:
	adrp	x2, _irq_domain_simple_ops@GOTPAGE
Lloh5:
	ldr	x2, [x2, _irq_domain_simple_ops@GOTPAGEOFF]
	mov	x3, #0
	bl	_irq_domain_add_linear
	str	w0, [x19, #4]
	cbz	w0, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_mtk_eint_hw_init
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	w20, #0
Lloh6:
	adrp	x23, _handle_level_irq@GOTPAGE
Lloh7:
	ldr	x23, [x23, _handle_level_irq@GOTPAGEOFF]
Lloh8:
	adrp	x21, _mtk_eint_irq_chip@GOTPAGE
Lloh9:
	ldr	x21, [x21, _mtk_eint_irq_chip@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	mov	x1, x20
	bl	_irq_create_mapping
	mov	x22, x0
	ldr	w2, [x23]
	mov	x1, x21
	bl	_irq_set_chip_and_handler
	mov	x0, x22
	mov	x1, x19
	bl	_irq_set_chip_data
	add	w20, w20, #1
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	cmp	w20, w8
	b.lt	LBB0_8
LBB0_9:
	ldr	w0, [x19]
Lloh10:
	adrp	x8, _mtk_eint_irq_handler@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mtk_eint_irq_handler@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_irq_set_chained_handler_and_data
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_mtk_generic_eint_regs,4,2      ; @mtk_generic_eint_regs
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_irq_domain_simple_ops,4,2      ; @irq_domain_simple_ops
	.comm	_mtk_eint_irq_chip,4,2          ; @mtk_eint_irq_chip
	.comm	_handle_level_irq,4,2           ; @handle_level_irq
	.comm	_mtk_eint_irq_handler,4,2       ; @mtk_eint_irq_handler
.subsections_via_symbols
