	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_pic_attach
_aml8726_pic_attach:                    ## @aml8726_pic_attach
	.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	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r12
	movq	_aml8726_pic_sc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movl	%r14d, 4(%r12)
	movq	_aml8726_pic_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_AML_PIC_NCNTRLS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_AML_PIC_0_FIRQ_SEL@GOTPCREL(%rip), %r14
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AML_PIC_0_MASK_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_CSR_WRITE_4
	movq	_AML_PIC_0_STAT_CLR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	movl	$-1, %edx
	callq	_CSR_WRITE_4
	movq	(%r14), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_CSR_WRITE_4
	incq	%r13
	movslq	(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_5
LBB0_6:
	movq	_aml8726_pic_eoi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_arm_post_filter@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_aml8726_pic_sc@GOTPCREL(%rip), %rax
	movq	%r12, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_aml8726_pic_sc,8,3             ## @aml8726_pic_sc
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_aml8726_pic_spec,4,2           ## @aml8726_pic_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources for device\n"

	.comm	_AML_PIC_NCNTRLS,4,2            ## @AML_PIC_NCNTRLS
	.comm	_AML_PIC_0_MASK_REG,8,3         ## @AML_PIC_0_MASK_REG
	.comm	_AML_PIC_0_STAT_CLR_REG,8,3     ## @AML_PIC_0_STAT_CLR_REG
	.comm	_AML_PIC_0_FIRQ_SEL,8,3         ## @AML_PIC_0_FIRQ_SEL
	.comm	_aml8726_pic_eoi,4,2            ## @aml8726_pic_eoi
	.comm	_arm_post_filter,4,2            ## @arm_post_filter
	.no_dead_strip	_aml8726_pic_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_pic_attach
_aml8726_pic_attach:                    ; @aml8726_pic_attach
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	bl	_device_get_softc
Lloh0:
	adrp	x21, _aml8726_pic_sc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _aml8726_pic_sc@GOTPAGEOFF]
	ldr	x8, [x21]
	cbnz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	str	w20, [x0, #4]
Lloh2:
	adrp	x8, _aml8726_pic_spec@GOTPAGE
Lloh3:
	ldr	x8, [x8, _aml8726_pic_spec@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x0]
	mov	x0, x20
	bl	_bus_alloc_resources
	cbz	x0, LBB0_5
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
LBB0_3:
Lloh7:
	adrp	x8, _ENXIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh10:
	adrp	x20, _AML_PIC_NCNTRLS@GOTPAGE
Lloh11:
	ldr	x20, [x20, _AML_PIC_NCNTRLS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x22, #0
	mov	x23, #0
Lloh12:
	adrp	x24, _AML_PIC_0_MASK_REG@GOTPAGE
Lloh13:
	ldr	x24, [x24, _AML_PIC_0_MASK_REG@GOTPAGEOFF]
Lloh14:
	adrp	x25, _AML_PIC_0_STAT_CLR_REG@GOTPAGE
Lloh15:
	ldr	x25, [x25, _AML_PIC_0_STAT_CLR_REG@GOTPAGEOFF]
Lloh16:
	adrp	x26, _AML_PIC_0_FIRQ_SEL@GOTPAGE
Lloh17:
	ldr	x26, [x26, _AML_PIC_0_FIRQ_SEL@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x1, x22, x8
	mov	x0, x19
	mov	w2, #0
	bl	_CSR_WRITE_4
	ldr	x8, [x25]
	add	x1, x22, x8
	mov	x0, x19
	mov	w2, #-1
	bl	_CSR_WRITE_4
	ldr	x8, [x26]
	add	x1, x22, x8
	mov	x0, x19
	mov	w2, #0
	bl	_CSR_WRITE_4
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x22, x22, #16
	cmp	x23, x8
	b.lt	LBB0_7
LBB0_8:
	mov	w0, #0
Lloh18:
	adrp	x8, _aml8726_pic_eoi@GOTPAGE
Lloh19:
	ldr	x8, [x8, _aml8726_pic_eoi@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _arm_post_filter@GOTPAGE
Lloh22:
	ldr	x9, [x9, _arm_post_filter@GOTPAGEOFF]
Lloh23:
	str	w8, [x9]
	str	x19, [x21]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_aml8726_pic_sc,8,3             ; @aml8726_pic_sc
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_aml8726_pic_spec,4,2           ; @aml8726_pic_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources for device\n"

	.comm	_AML_PIC_NCNTRLS,4,2            ; @AML_PIC_NCNTRLS
	.comm	_AML_PIC_0_MASK_REG,8,3         ; @AML_PIC_0_MASK_REG
	.comm	_AML_PIC_0_STAT_CLR_REG,8,3     ; @AML_PIC_0_STAT_CLR_REG
	.comm	_AML_PIC_0_FIRQ_SEL,8,3         ; @AML_PIC_0_FIRQ_SEL
	.comm	_aml8726_pic_eoi,4,2            ; @aml8726_pic_eoi
	.comm	_arm_post_filter,4,2            ; @arm_post_filter
	.no_dead_strip	_aml8726_pic_attach
.subsections_via_symbols
