	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl190_intc_attach
_pl190_intc_attach:                     ## @pl190_intc_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, %r15
	movl	%r14d, (%rax)
	leaq	24(%rax), %rbx
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	_MTX_SPIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mtx_init
	movl	$0, -44(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_VICINTSELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_INTC_VIC_WRITE_4
	movq	_VICINTENCLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_INTC_VIC_WRITE_4
	movq	_VICPERIPHID@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	$12, %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	movl	%eax, %ebx
	movq	(%r13), %rsi
	addq	$8, %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	movl	%eax, %r12d
	movq	(%r13), %rsi
	addq	$4, %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	shll	$24, %ebx
	movzbl	%r12b, %ecx
	shll	$16, %ecx
	orl	%ebx, %ecx
	shll	$8, %eax
	movzwl	%ax, %ebx
	orl	%ecx, %ebx
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	movzbl	%al, %edx
	orl	%ebx, %edx
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_VICPRIMECELLID@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	$12, %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	movl	%eax, %ebx
	movq	(%r13), %rsi
	addq	$8, %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	movl	%eax, %r12d
	movq	(%r13), %rsi
	addq	$4, %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	shll	$24, %ebx
	movzbl	%r12b, %ecx
	shll	$16, %ecx
	orl	%ebx, %ecx
	shll	$8, %eax
	movzwl	%ax, %ebx
	orl	%ecx, %ebx
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_INTC_VIC_READ_4
	movzbl	%al, %edx
	orl	%ebx, %edx
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	8(%r15), %r12
	movl	(%r15), %edi
	callq	_device_get_nameunit
	movq	%rax, %r14
	movq	_VIC_NIRQS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.3:
	addq	$4, %r12
	xorl	%ebx, %ebx
	leaq	L_.str.4(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -4(%r12)
	movl	(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movq	%r13, %rcx
	movq	%r14, %r8
	movl	%ebx, %r9d
	callq	_intr_isrc_register
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	_VIC_NIRQS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %r12
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movl	(%r15), %edi
	callq	_ofw_bus_get_node
	movl	%eax, %edi
	callq	_OF_xref_from_node
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_intr_pic_register
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	(%r15), %edi
	movq	_pl190_intc_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	callq	_intr_pic_claim_root
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pl190"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"Error: could not allocate memory resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_VICINTSELECT,4,2               ## @VICINTSELECT
	.comm	_VICINTENCLEAR,4,2              ## @VICINTENCLEAR
	.comm	_VICPERIPHID,8,3                ## @VICPERIPHID
L_.str.2:                               ## @.str.2
	.asciz	"Peripheral ID: %08x\n"

	.comm	_VICPRIMECELLID,8,3             ## @VICPRIMECELLID
L_.str.3:                               ## @.str.3
	.asciz	"PrimeCell ID: %08x\n"

	.comm	_VIC_NIRQS,4,2                  ## @VIC_NIRQS
L_.str.4:                               ## @.str.4
	.asciz	"%s,%u"

	.comm	_pl190_intc_intr,4,2            ## @pl190_intc_intr
	.no_dead_strip	_pl190_intc_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl190_intc_attach
_pl190_intc_attach:                     ; @pl190_intc_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w20, [x0]
	add	x21, x0, #24
	mov	x0, x20
	bl	_device_get_nameunit
	mov	x1, x0
Lloh0:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_mtx_init
	str	wzr, [sp, #12]
Lloh5:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_bus_alloc_resource_any
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.1:
Lloh11:
	adrp	x8, _VICINTSELECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VICINTSELECT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_INTC_VIC_WRITE_4
Lloh14:
	adrp	x8, _VICINTENCLEAR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VICINTENCLEAR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_INTC_VIC_WRITE_4
Lloh17:
	adrp	x23, _VICPERIPHID@GOTPAGE
Lloh18:
	ldr	x23, [x23, _VICPERIPHID@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x1, x8, #12
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	mov	x21, x0
	ldr	x8, [x23]
	add	x1, x8, #8
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	mov	x22, x0
	ldr	x8, [x23]
	add	x1, x8, #4
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	ubfiz	w22, w22, #16, #8
	bfi	w22, w21, #24, #8
	bfi	w22, w0, #8, #8
	ldr	x1, [x23]
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	bfxil	w22, w0, #0, #8
	str	x22, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh21:
	adrp	x23, _VICPRIMECELLID@GOTPAGE
Lloh22:
	ldr	x23, [x23, _VICPRIMECELLID@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x1, x8, #12
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	mov	x21, x0
	ldr	x8, [x23]
	add	x1, x8, #8
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	mov	x22, x0
	ldr	x8, [x23]
	add	x1, x8, #4
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	ubfiz	w22, w22, #16, #8
	bfi	w22, w21, #24, #8
	bfi	w22, w0, #8, #8
	ldr	x1, [x23]
	mov	x0, x19
	bl	_INTC_VIC_READ_4
	bfxil	w22, w0, #0, #8
	str	x22, [sp]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	ldr	x22, [x19, #8]
	ldr	w0, [x19]
	bl	_device_get_nameunit
Lloh25:
	adrp	x24, _VIC_NIRQS@GOTPAGE
Lloh26:
	ldr	x24, [x24, _VIC_NIRQS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x21, #0
	add	x22, x22, #4
Lloh27:
	adrp	x23, l_.str.4@PAGE
Lloh28:
	add	x23, x23, l_.str.4@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	stur	w21, [x22, #-4]
	ldr	w1, [x19]
	mov	x0, x22
	mov	w2, #0
	mov	x3, x23
	mov	x4, x20
	mov	x5, x21
	bl	_intr_isrc_register
	cbnz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x24]
	add	x22, x22, #8
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_5:
	ldr	w0, [x19]
	bl	_ofw_bus_get_node
	bl	_OF_xref_from_node
	mov	x20, x0
	ldr	w0, [x19]
	mov	x1, x20
	bl	_intr_pic_register
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w0, [x19]
Lloh29:
	adrp	x8, _pl190_intc_intr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _pl190_intc_intr@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x1, x20
	mov	x3, x19
	mov	w4, #0
	bl	_intr_pic_claim_root
	b	LBB0_9
LBB0_7:
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_device_printf
LBB0_8:
Lloh34:
	adrp	x8, _ENXIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pl190"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"Error: could not allocate memory resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_VICINTSELECT,4,2               ; @VICINTSELECT
	.comm	_VICINTENCLEAR,4,2              ; @VICINTENCLEAR
	.comm	_VICPERIPHID,8,3                ; @VICPERIPHID
l_.str.2:                               ; @.str.2
	.asciz	"Peripheral ID: %08x\n"

	.comm	_VICPRIMECELLID,8,3             ; @VICPRIMECELLID
l_.str.3:                               ; @.str.3
	.asciz	"PrimeCell ID: %08x\n"

	.comm	_VIC_NIRQS,4,2                  ; @VIC_NIRQS
l_.str.4:                               ; @.str.4
	.asciz	"%s,%u"

	.comm	_pl190_intc_intr,4,2            ; @pl190_intc_intr
	.no_dead_strip	_pl190_intc_attach
.subsections_via_symbols
