	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_sysirq_domain_alloc
_mtk_sysirq_domain_alloc:               ## @mtk_sysirq_domain_alloc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movups	(%rcx), %xmm0
	movaps	%xmm0, -64(%rbp)
	cmpl	$3, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	8(%rcx), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %r12
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	je	LBB0_6
## %bb.4:
	movq	8(%rax), %rbx
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	_mtk_sysirq_chip@GOTPCREL(%rip), %r13
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %r8d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	movq	%r13, %rcx
	callq	_irq_domain_set_hwirq_and_chip
	incl	%r14d
	incq	%rbx
	decq	%r15
	jne	LBB0_5
LBB0_6:
	movq	(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	leaq	-64(%rbp), %rcx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_irq_domain_alloc_irqs_parent
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mtk_sysirq_chip,4,2            ## @mtk_sysirq_chip
	.no_dead_strip	_mtk_sysirq_domain_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_sysirq_domain_alloc
_mtk_sysirq_domain_alloc:               ; @mtk_sysirq_domain_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	q0, [x3]
	str	q0, [sp]
	ldr	w8, [x3]
	cmp	w8, #3
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x3, #8]
	ldr	x9, [x8]
	cbz	x9, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	cbz	w2, LBB0_7
; %bb.5:
	ldr	x22, [x8, #8]
	mov	w25, w19
Lloh3:
	adrp	x23, _mtk_sysirq_chip@GOTPAGE
Lloh4:
	ldr	x23, [x23, _mtk_sysirq_chip@GOTPAGEOFF]
	mov	x24, x20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w4, [x21, #8]
	mov	x0, x21
	mov	x1, x24
	mov	x2, x22
	mov	x3, x23
	bl	_irq_domain_set_hwirq_and_chip
	add	w24, w24, #1
	add	x22, x22, #1
	subs	x25, x25, #1
	b.ne	LBB0_6
LBB0_7:
	ldr	x8, [x21]
	ldr	w8, [x8]
	str	w8, [sp, #4]
	mov	x3, sp
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_irq_domain_alloc_irqs_parent
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mtk_sysirq_chip,4,2            ; @mtk_sysirq_chip
	.no_dead_strip	_mtk_sysirq_domain_alloc
.subsections_via_symbols
