	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ativic32_irq_domain_map
_ativic32_irq_domain_map:               ## @ativic32_irq_domain_map
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	_NDS32_SR_INT_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___nds32__mfsr
	movq	%rax, %r12
	movl	%r14d, %edi
	callq	_irq_get_irq_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	%r15d, %edi
	callq	_BIT
	testq	%r12, %rax
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	cmoveq	_handle_level_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ativic32_chip@GOTPCREL(%rip), %rsi
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rbx
	cmoveq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rbx
	movl	%r14d, %edi
	callq	_irq_set_chip_and_handler
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_irqd_set_trigger_type
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NDS32_SR_INT_TRIGGER,4,2       ## @NDS32_SR_INT_TRIGGER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ativic32_chip,4,2              ## @ativic32_chip
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_handle_level_irq,4,2           ## @handle_level_irq
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.no_dead_strip	_ativic32_irq_domain_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ativic32_irq_domain_map
_ativic32_irq_domain_map:               ; @ativic32_irq_domain_map
	.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	x21, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _NDS32_SR_INT_TRIGGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NDS32_SR_INT_TRIGGER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	___nds32__mfsr
	mov	x22, x0
	mov	x0, x19
	bl	_irq_get_irq_data
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x0, x21
	bl	_BIT
Lloh3:
	adrp	x8, _handle_level_irq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _handle_level_irq@GOTPAGEOFF]
Lloh5:
	adrp	x9, _handle_edge_irq@GOTPAGE
Lloh6:
	ldr	x9, [x9, _handle_edge_irq@GOTPAGEOFF]
	tst	x0, x22
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
Lloh7:
	adrp	x1, _ativic32_chip@GOTPAGE
Lloh8:
	ldr	x1, [x1, _ativic32_chip@GOTPAGEOFF]
Lloh9:
	adrp	x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh11:
	adrp	x9, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
	csel	x21, x8, x9, eq
	mov	x0, x19
	bl	_irq_set_chip_and_handler
	ldr	w1, [x21]
	mov	x0, x20
	bl	_irqd_set_trigger_type
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NDS32_SR_INT_TRIGGER,4,2       ; @NDS32_SR_INT_TRIGGER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ativic32_chip,4,2              ; @ativic32_chip
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_handle_level_irq,4,2           ; @handle_level_irq
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.no_dead_strip	_ativic32_irq_domain_map
.subsections_via_symbols
