	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openpic_common_attach          ## -- Begin function openpic_common_attach
	.p2align	4, 0x90
_openpic_common_attach:                 ## @openpic_common_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_device_get_softc
	movq	%rax, %r12
	movq	%r13, 80(%rax)
	leaq	72(%rax), %rdx
	movq	$0, 72(%rax)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_bus_alloc_resource_any
	movq	%rax, 56(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, %rdi
	callq	_rman_get_bustag
	movl	%eax, 68(%r12)
	movq	56(%r12), %rdi
	callq	_rman_get_bushandle
	movl	%eax, 64(%r12)
	movq	_OPENPIC_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_openpic_read
	movq	_OPENPIC_CONFIG_RESET@GOTPCREL(%rip), %r14
	orl	(%r14), %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_openpic_write
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_openpic_read
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	callq	_powerpc_sync
	movl	$100, %edi
	callq	_DELAY
	jmp	LBB0_4
LBB0_5:
	movq	$0, 48(%r12)
	movq	$0, 24(%r12)
	movq	%r13, %rdi
	callq	_device_get_parent
	movl	%eax, %edi
	movq	%r13, %rsi
	callq	_BUS_GET_RESOURCE_LIST
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_resource_list_find
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	48(%r12), %rdx
	movl	(%r15), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_bus_alloc_resource_any
	movq	%rax, 24(%r12)
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rcx
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_openpic_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rsi
	addq	$40, %rsi
	movq	%rsi, (%rsp)
	movq	%r13, %rdi
	movq	%rax, %rsi
	xorl	%r8d, %r8d
	movq	%r13, %r9
	callq	_bus_setup_intr
LBB0_8:
	movq	_OPENPIC_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_openpic_read
	orl	(%r14), %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_openpic_write
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_openpic_read
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_powerpc_sync
	movl	$100, %edi
	callq	_DELAY
	jmp	LBB0_10
LBB0_11:
	movq	_OPENPIC_FEATURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_openpic_read
	movq	_OPENPIC_FEATURE_VERSION_MASK@GOTPCREL(%rip), %rdx
	movl	%eax, %ecx
	andl	(%rdx), %ecx
	decl	%ecx
	cmpl	$2, %ecx
	ja	LBB0_12
## %bb.13:
	movslq	%ecx, %rcx
	leaq	l_reltable.openpic_common_attach(%rip), %rsi
	movslq	(%rsi,%rcx,4), %rdx
	addq	%rsi, %rdx
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_37
LBB0_12:
	leaq	L_.str.4(%rip), %rdx
LBB0_14:
	movq	%rdx, (%r12)
	movq	_OPENPIC_FEATURE_LAST_CPU_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%eax, %esi
	movq	_OPENPIC_FEATURE_LAST_CPU_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %esi
	leal	1(%rsi), %ebx
	movl	%ebx, 8(%r12)
	movq	_OPENPIC_FEATURE_LAST_IRQ_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	%eax, %edi
	movq	_OPENPIC_FEATURE_LAST_IRQ_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edi
	leal	1(%rdi), %r8d
	movl	%r8d, 12(%r12)
	cmpq	$0, 32(%r12)
	je	LBB0_16
## %bb.15:
	movl	%edi, 12(%r12)
	movl	%esi, 8(%r12)
	movl	%edi, %r8d
	movl	%esi, %ebx
LBB0_16:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.17:
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_18:
	movq	_OPENPIC_QUIRK_HIDDEN_IRQS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r12)
	je	LBB0_20
## %bb.19:
	movq	_OPENPIC_IRQMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_OPENPIC_NIPIS@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movl	%eax, 12(%r12)
LBB0_20:
	cmpl	$0, 8(%r12)
	je	LBB0_23
## %bb.21:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_OPENPIC_PCPU_TPR
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$15, %edx
	callq	_openpic_write
	incq	%rbx
	movslq	8(%r12), %rax
	cmpq	%rax, %rbx
	jb	LBB0_22
LBB0_23:
	cmpl	$0, 12(%r12)
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_24
## %bb.38:
	xorl	%r13d, %r13d
	movq	_OPENPIC_SENSE_LEVEL@GOTPCREL(%rip), %r14
	movq	_OPENPIC_PRIORITY_SHIFT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movq	_OPENPIC_IMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%r13d, %eax
	movq	_OPENPIC_POLARITY_NEGATIVE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	(%r14), %eax
	movzbl	(%r15), %ecx
	movl	$8, %ebx
	shll	%cl, %ebx
	orl	%eax, %ebx
	movq	%r13, %rdi
	callq	_OPENPIC_SRC_VECTOR
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_openpic_write
	movslq	12(%r12), %rax
	incq	%r13
	cmpq	%rax, %r13
	jb	LBB0_39
	jmp	LBB0_25
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	movq	_OPENPIC_NIPIS@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_29
## %bb.26:
	movq	_OPENPIC_PRIORITY_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$15, %ebx
	shll	%cl, %ebx
	movq	_OPENPIC_IMASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	orl	%eax, %ebx
	xorl	%edi, %edi
	callq	_OPENPIC_IPI_VECTOR
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_openpic_write
	cmpq	$2, (%r15)
	jb	LBB0_29
## %bb.27:
	movl	$1, %r13d
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	12(%r12), %eax
	movq	_OPENPIC_PRIORITY_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movl	$15, %ebx
	shll	%cl, %ebx
	addl	%r14d, %eax
	movq	_OPENPIC_IMASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	orl	%eax, %ebx
	movq	%r13, %rdi
	callq	_OPENPIC_IPI_VECTOR
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_openpic_write
	incq	%r13
	incl	%r14d
	cmpq	(%r15), %r13
	jb	LBB0_28
LBB0_29:
	movq	%r15, %r13
	movq	_OPENPIC_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_openpic_read
	movq	_OPENPIC_CONFIG_8259_PASSTHRU_DISABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_openpic_write
	cmpl	$0, 12(%r12)
	je	LBB0_30
## %bb.42:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_OPENPIC_IDEST
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_openpic_write
	incq	%rbx
	movslq	12(%r12), %rax
	cmpq	%rax, %rbx
	jb	LBB0_43
## %bb.40:
	testl	%eax, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_41
## %bb.44:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_OPENPIC_PCPU_IACK
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_openpic_read
	xorl	%edi, %edi
	callq	_OPENPIC_PCPU_EOI
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_openpic_write
	incq	%rbx
	movslq	12(%r12), %rax
	cmpq	%rax, %rbx
	jb	LBB0_45
	jmp	LBB0_31
LBB0_30:
	xorl	%eax, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_31:
	cmpl	$0, 8(%r12)
	je	LBB0_35
LBB0_32:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_OPENPIC_PCPU_TPR
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_openpic_write
	incq	%rbx
	movslq	8(%r12), %rax
	cmpq	%rax, %rbx
	jb	LBB0_33
## %bb.34:
	movl	12(%r12), %eax
LBB0_35:
	movslq	%eax, %rdx
	movq	(%r13), %rcx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_powerpc_register_pic
	xorl	%eax, %eax
	cmpq	$0, 24(%r12)
	jne	LBB0_37
## %bb.36:
	movq	_root_pic@GOTPCREL(%rip), %rcx
	movq	%r14, (%rcx)
LBB0_37:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	xorl	%eax, %eax
	cmpl	$0, 8(%r12)
	jne	LBB0_32
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not alloc mem resource!\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_OPENPIC_CONFIG,4,2             ## @OPENPIC_CONFIG
	.comm	_OPENPIC_CONFIG_RESET,4,2       ## @OPENPIC_CONFIG_RESET
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_openpic_intr,4,2               ## @openpic_intr
	.comm	_OPENPIC_FEATURE,4,2            ## @OPENPIC_FEATURE
	.comm	_OPENPIC_FEATURE_VERSION_MASK,4,2 ## @OPENPIC_FEATURE_VERSION_MASK
L_.str.1:                               ## @.str.1
	.asciz	"1.0"

L_.str.2:                               ## @.str.2
	.asciz	"1.2"

L_.str.3:                               ## @.str.3
	.asciz	"1.3"

L_.str.4:                               ## @.str.4
	.asciz	"unknown"

	.comm	_OPENPIC_FEATURE_LAST_CPU_MASK,4,2 ## @OPENPIC_FEATURE_LAST_CPU_MASK
	.comm	_OPENPIC_FEATURE_LAST_CPU_SHIFT,4,2 ## @OPENPIC_FEATURE_LAST_CPU_SHIFT
	.comm	_OPENPIC_FEATURE_LAST_IRQ_MASK,4,2 ## @OPENPIC_FEATURE_LAST_IRQ_MASK
	.comm	_OPENPIC_FEATURE_LAST_IRQ_SHIFT,4,2 ## @OPENPIC_FEATURE_LAST_IRQ_SHIFT
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.5:                               ## @.str.5
	.asciz	"Version %s, supports %d CPUs and %d irqs\n"

	.comm	_OPENPIC_QUIRK_HIDDEN_IRQS,4,2  ## @OPENPIC_QUIRK_HIDDEN_IRQS
	.comm	_OPENPIC_IRQMAX,8,3             ## @OPENPIC_IRQMAX
	.comm	_OPENPIC_NIPIS,8,3              ## @OPENPIC_NIPIS
	.comm	_OPENPIC_IMASK,4,2              ## @OPENPIC_IMASK
	.comm	_OPENPIC_POLARITY_NEGATIVE,4,2  ## @OPENPIC_POLARITY_NEGATIVE
	.comm	_OPENPIC_SENSE_LEVEL,4,2        ## @OPENPIC_SENSE_LEVEL
	.comm	_OPENPIC_PRIORITY_SHIFT,4,2     ## @OPENPIC_PRIORITY_SHIFT
	.comm	_OPENPIC_CONFIG_8259_PASSTHRU_DISABLE,4,2 ## @OPENPIC_CONFIG_8259_PASSTHRU_DISABLE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_root_pic,8,3                   ## @root_pic
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.openpic_common_attach
l_reltable.openpic_common_attach:
	.long	L_.str.1-l_reltable.openpic_common_attach
	.long	L_.str.2-l_reltable.openpic_common_attach
	.long	L_.str.3-l_reltable.openpic_common_attach

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openpic_common_attach          ; -- Begin function openpic_common_attach
	.p2align	2
_openpic_common_attach:                 ; @openpic_common_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x28, x1
	mov	x20, x0
	bl	_device_get_softc
	mov	x21, x0
	str	x20, [x0, #80]
	mov	x2, x0
	str	xzr, [x2, #72]!
Lloh0:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x25, _RF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x0, x20
	bl	_bus_alloc_resource_any
	str	x0, [x21, #56]
	cbz	x0, LBB0_12
; %bb.1:
	bl	_rman_get_bustag
	str	w0, [x21, #68]
	ldr	x0, [x21, #56]
	bl	_rman_get_bushandle
	str	w0, [x21, #64]
Lloh5:
	adrp	x24, _OPENPIC_CONFIG@GOTPAGE
Lloh6:
	ldr	x24, [x24, _OPENPIC_CONFIG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_read
Lloh7:
	adrp	x23, _OPENPIC_CONFIG_RESET@GOTPAGE
Lloh8:
	ldr	x23, [x23, _OPENPIC_CONFIG_RESET@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w2, w8, w0
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_write
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_read
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_powerpc_sync
	mov	w0, #100
	bl	_DELAY
	b	LBB0_2
LBB0_4:
	mov	x22, x21
	str	xzr, [x22, #48]!
	stur	xzr, [x22, #-24]
	mov	x0, x20
	bl	_device_get_parent
	mov	x1, x20
	bl	_BUS_GET_RESOURCE_LIST
	cbz	x0, LBB0_7
; %bb.5:
Lloh9:
	adrp	x19, _SYS_RES_IRQ@GOTPAGE
Lloh10:
	ldr	x19, [x19, _SYS_RES_IRQ@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	w2, #0
	bl	_resource_list_find
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w1, [x19]
	ldr	w3, [x25]
	mov	x0, x20
	mov	x2, x22
	bl	_bus_alloc_resource_any
	mov	x1, x0
	str	x0, [x21, #24]
Lloh11:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh17:
	adrp	x8, _openpic_intr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _openpic_intr@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	add	x6, x21, #40
	mov	x0, x20
	mov	x4, #0
	mov	x5, x20
	bl	_bus_setup_intr
LBB0_7:
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_read
	ldr	w8, [x23]
	orr	w2, w8, w0
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_write
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_read
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_powerpc_sync
	mov	w0, #100
	bl	_DELAY
	b	LBB0_8
LBB0_10:
Lloh20:
	adrp	x8, _OPENPIC_FEATURE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OPENPIC_FEATURE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_openpic_read
Lloh23:
	adrp	x8, _OPENPIC_FEATURE_VERSION_MASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OPENPIC_FEATURE_VERSION_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #1
	cmp	w8, #2
	b.hi	LBB0_13
; %bb.11:
Lloh26:
	adrp	x9, l_switch.table.openpic_common_attach@PAGE
Lloh27:
	add	x9, x9, l_switch.table.openpic_common_attach@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_14
LBB0_12:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh30:
	adrp	x8, _ENXIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	b	LBB0_45
LBB0_13:
Lloh33:
	adrp	x8, l_.str.4@PAGE
Lloh34:
	add	x8, x8, l_.str.4@PAGEOFF
LBB0_14:
	str	x8, [x21]
Lloh35:
	adrp	x9, _OPENPIC_FEATURE_LAST_CPU_MASK@GOTPAGE
Lloh36:
	ldr	x9, [x9, _OPENPIC_FEATURE_LAST_CPU_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	and	w9, w9, w0
Lloh38:
	adrp	x10, _OPENPIC_FEATURE_LAST_CPU_SHIFT@GOTPAGE
Lloh39:
	ldr	x10, [x10, _OPENPIC_FEATURE_LAST_CPU_SHIFT@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	asr	w11, w9, w10
	add	w9, w11, #1
Lloh41:
	adrp	x10, _OPENPIC_FEATURE_LAST_IRQ_MASK@GOTPAGE
Lloh42:
	ldr	x10, [x10, _OPENPIC_FEATURE_LAST_IRQ_MASK@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	and	w10, w10, w0
Lloh44:
	adrp	x12, _OPENPIC_FEATURE_LAST_IRQ_SHIFT@GOTPAGE
Lloh45:
	ldr	x12, [x12, _OPENPIC_FEATURE_LAST_IRQ_SHIFT@GOTPAGEOFF]
Lloh46:
	ldr	w12, [x12]
	asr	w12, w10, w12
	add	w10, w12, #1
	stp	w9, w10, [x21, #8]
	ldr	x13, [x21, #32]
	cbz	x13, LBB0_16
; %bb.15:
	stp	w11, w12, [x21, #8]
	mov	x10, x12
	mov	x9, x11
LBB0_16:
Lloh47:
	adrp	x11, _bootverbose@GOTPAGE
Lloh48:
	ldr	x11, [x11, _bootverbose@GOTPAGEOFF]
Lloh49:
	ldr	x11, [x11]
	cbz	x11, LBB0_18
; %bb.17:
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh50:
	adrp	x1, l_.str.5@PAGE
Lloh51:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_device_printf
LBB0_18:
	ldr	w8, [x21, #16]
Lloh52:
	adrp	x9, _OPENPIC_QUIRK_HIDDEN_IRQS@GOTPAGE
Lloh53:
	ldr	x9, [x9, _OPENPIC_QUIRK_HIDDEN_IRQS@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
Lloh55:
	adrp	x25, _OPENPIC_NIPIS@GOTPAGE
Lloh56:
	ldr	x25, [x25, _OPENPIC_NIPIS@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.19:
Lloh57:
	adrp	x8, _OPENPIC_IRQMAX@GOTPAGE
Lloh58:
	ldr	x8, [x8, _OPENPIC_IRQMAX@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	ldr	w9, [x25]
	sub	w8, w8, w9
	str	w8, [x21, #12]
LBB0_20:
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_23
; %bb.21:
	mov	x22, #0
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_OPENPIC_PCPU_TPR
	mov	x1, x0
	mov	x0, x21
	mov	w2, #15
	bl	_openpic_write
	add	x22, x22, #1
	ldrsw	x8, [x21, #8]
	cmp	x22, x8
	b.lo	LBB0_22
LBB0_23:
	ldr	w8, [x21, #12]
Lloh60:
	adrp	x26, _OPENPIC_IMASK@GOTPAGE
Lloh61:
	ldr	x26, [x26, _OPENPIC_IMASK@GOTPAGEOFF]
Lloh62:
	adrp	x27, _OPENPIC_PRIORITY_SHIFT@GOTPAGE
Lloh63:
	ldr	x27, [x27, _OPENPIC_PRIORITY_SHIFT@GOTPAGEOFF]
	str	x20, [sp, #40]                  ; 8-byte Folded Spill
	str	w28, [sp, #36]                  ; 4-byte Folded Spill
	cbz	w8, LBB0_26
; %bb.24:
	mov	x22, #0
Lloh64:
	adrp	x20, _OPENPIC_POLARITY_NEGATIVE@GOTPAGE
Lloh65:
	ldr	x20, [x20, _OPENPIC_POLARITY_NEGATIVE@GOTPAGEOFF]
Lloh66:
	adrp	x28, _OPENPIC_SENSE_LEVEL@GOTPAGE
Lloh67:
	ldr	x28, [x28, _OPENPIC_SENSE_LEVEL@GOTPAGEOFF]
	mov	w19, #8
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	orr	w8, w8, w22
	ldr	w9, [x20]
	orr	w8, w8, w9
	ldr	w9, [x28]
	orr	w8, w8, w9
	ldr	w9, [x27]
	lsl	w9, w19, w9
	orr	w23, w8, w9
	mov	x0, x22
	bl	_OPENPIC_SRC_VECTOR
	mov	x1, x0
	mov	x0, x21
	mov	x2, x23
	bl	_openpic_write
	ldrsw	x8, [x21, #12]
	add	x22, x22, #1
	cmp	x22, x8
	b.lo	LBB0_25
LBB0_26:
	ldr	x9, [x25]
	cbz	x9, LBB0_30
; %bb.27:
	ldr	w9, [x26]
	ldr	w10, [x27]
	mov	w28, #15
	lsl	w10, w28, w10
	orr	w9, w10, w9
	orr	w22, w9, w8
	mov	x0, #0
	bl	_OPENPIC_IPI_VECTOR
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	bl	_openpic_write
	ldr	x8, [x25]
	cmp	x8, #2
	b.lo	LBB0_30
; %bb.28:
	mov	w20, #1
	mov	w22, #1
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, #12]
	ldr	w9, [x26]
	ldr	w10, [x27]
	lsl	w10, w28, w10
	orr	w9, w10, w9
	add	w8, w20, w8
	orr	w23, w9, w8
	mov	x0, x22
	bl	_OPENPIC_IPI_VECTOR
	mov	x1, x0
	mov	x0, x21
	mov	x2, x23
	bl	_openpic_write
	add	x22, x22, #1
	ldr	x8, [x25]
	add	w20, w20, #1
	cmp	x22, x8
	b.lo	LBB0_29
LBB0_30:
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_read
Lloh68:
	adrp	x8, _OPENPIC_CONFIG_8259_PASSTHRU_DISABLE@GOTPAGE
Lloh69:
	ldr	x8, [x8, _OPENPIC_CONFIG_8259_PASSTHRU_DISABLE@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x24]
	mov	x0, x21
	bl	_openpic_write
	ldr	w8, [x21, #12]
	cbz	w8, LBB0_38
; %bb.31:
	mov	x22, #0
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_OPENPIC_IDEST
	mov	x1, x0
	mov	x0, x21
	mov	w2, #1
	bl	_openpic_write
	add	x22, x22, #1
	ldrsw	x8, [x21, #12]
	cmp	x22, x8
	b.lo	LBB0_32
; %bb.33:
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w23, [sp, #36]                  ; 4-byte Folded Reload
	cbz	w8, LBB0_37
; %bb.34:
	mov	x19, #0
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_OPENPIC_PCPU_IACK
	mov	x1, x0
	mov	x0, x21
	bl	_openpic_read
	mov	w0, #0
	bl	_OPENPIC_PCPU_EOI
	mov	x1, x0
	mov	x0, x21
	mov	w2, #0
	bl	_openpic_write
	add	x19, x19, #1
	ldrsw	x8, [x21, #12]
	cmp	x19, x8
	b.lo	LBB0_35
; %bb.36:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_37:
	ldr	w9, [x21, #8]
	cbnz	w9, LBB0_39
	b	LBB0_42
LBB0_38:
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w23, [sp, #36]                  ; 4-byte Folded Reload
	ldr	w9, [x21, #8]
	cbz	w9, LBB0_42
LBB0_39:
	mov	x22, #0
LBB0_40:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_OPENPIC_PCPU_TPR
	mov	x1, x0
	mov	x0, x21
	mov	w2, #0
	bl	_openpic_write
	add	x22, x22, #1
	ldrsw	x8, [x21, #8]
	cmp	x22, x8
	b.lo	LBB0_40
; %bb.41:
	ldr	w8, [x21, #12]
LBB0_42:
	sxtw	x2, w8
	ldr	x3, [x25]
Lloh71:
	adrp	x8, _FALSE@GOTPAGE
Lloh72:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh73:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_powerpc_register_pic
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_44
; %bb.43:
	mov	w0, #0
	b	LBB0_45
LBB0_44:
	mov	w0, #0
Lloh74:
	adrp	x8, _root_pic@GOTPAGE
Lloh75:
	ldr	x8, [x8, _root_pic@GOTPAGEOFF]
Lloh76:
	str	x20, [x8]
LBB0_45:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotStr	Lloh74, Lloh75, Lloh76
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not alloc mem resource!\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_OPENPIC_CONFIG,4,2             ; @OPENPIC_CONFIG
	.comm	_OPENPIC_CONFIG_RESET,4,2       ; @OPENPIC_CONFIG_RESET
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_openpic_intr,4,2               ; @openpic_intr
	.comm	_OPENPIC_FEATURE,4,2            ; @OPENPIC_FEATURE
	.comm	_OPENPIC_FEATURE_VERSION_MASK,4,2 ; @OPENPIC_FEATURE_VERSION_MASK
l_.str.1:                               ; @.str.1
	.asciz	"1.0"

l_.str.2:                               ; @.str.2
	.asciz	"1.2"

l_.str.3:                               ; @.str.3
	.asciz	"1.3"

l_.str.4:                               ; @.str.4
	.asciz	"unknown"

	.comm	_OPENPIC_FEATURE_LAST_CPU_MASK,4,2 ; @OPENPIC_FEATURE_LAST_CPU_MASK
	.comm	_OPENPIC_FEATURE_LAST_CPU_SHIFT,4,2 ; @OPENPIC_FEATURE_LAST_CPU_SHIFT
	.comm	_OPENPIC_FEATURE_LAST_IRQ_MASK,4,2 ; @OPENPIC_FEATURE_LAST_IRQ_MASK
	.comm	_OPENPIC_FEATURE_LAST_IRQ_SHIFT,4,2 ; @OPENPIC_FEATURE_LAST_IRQ_SHIFT
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.5:                               ; @.str.5
	.asciz	"Version %s, supports %d CPUs and %d irqs\n"

	.comm	_OPENPIC_QUIRK_HIDDEN_IRQS,4,2  ; @OPENPIC_QUIRK_HIDDEN_IRQS
	.comm	_OPENPIC_IRQMAX,8,3             ; @OPENPIC_IRQMAX
	.comm	_OPENPIC_NIPIS,8,3              ; @OPENPIC_NIPIS
	.comm	_OPENPIC_IMASK,4,2              ; @OPENPIC_IMASK
	.comm	_OPENPIC_POLARITY_NEGATIVE,4,2  ; @OPENPIC_POLARITY_NEGATIVE
	.comm	_OPENPIC_SENSE_LEVEL,4,2        ; @OPENPIC_SENSE_LEVEL
	.comm	_OPENPIC_PRIORITY_SHIFT,4,2     ; @OPENPIC_PRIORITY_SHIFT
	.comm	_OPENPIC_CONFIG_8259_PASSTHRU_DISABLE,4,2 ; @OPENPIC_CONFIG_8259_PASSTHRU_DISABLE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_root_pic,8,3                   ; @root_pic
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.openpic_common_attach
l_switch.table.openpic_common_attach:
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3

.subsections_via_symbols
