	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function openpic_cpcht_attach
_openpic_cpcht_attach:                  ## @openpic_cpcht_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
	movq	%rdi, %r15
	callq	_ofw_bus_get_node
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_openpic_common_attach
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	callq	_device_get_softc
	movq	_MTX_SPIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_INTR_TRIGGER_LEVEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_INTR_POLARITY_LOW@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_openpic_config
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_openpic_config
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_openpic_config
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_openpic_config
	movl	$4, %ebx
	movq	_INTR_TRIGGER_EDGE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_openpic_config
	incl	%ebx
	cmpl	$124, %ebx
	jne	LBB0_2
## %bb.3:
	movq	_root_pic@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	%r15, (%rcx)
	jne	LBB0_5
## %bb.4:
	movq	_cpcht_msipic@GOTPCREL(%rip), %rcx
	movl	%r14d, (%rcx)
LBB0_5:
	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	"htpic"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
	.comm	_INTR_TRIGGER_LEVEL,4,2         ## @INTR_TRIGGER_LEVEL
	.comm	_INTR_POLARITY_LOW,4,2          ## @INTR_POLARITY_LOW
	.comm	_INTR_TRIGGER_EDGE,4,2          ## @INTR_TRIGGER_EDGE
	.comm	_root_pic,8,3                   ## @root_pic
	.comm	_cpcht_msipic,4,2               ## @cpcht_msipic
	.no_dead_strip	_openpic_cpcht_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function openpic_cpcht_attach
_openpic_cpcht_attach:                  ; @openpic_cpcht_attach
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	bl	_ofw_bus_get_node
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_openpic_common_attach
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_device_get_softc
Lloh0:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
Lloh5:
	adrp	x21, _INTR_TRIGGER_LEVEL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _INTR_TRIGGER_LEVEL@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh7:
	adrp	x22, _INTR_POLARITY_LOW@GOTPAGE
Lloh8:
	ldr	x22, [x22, _INTR_POLARITY_LOW@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #0
	bl	_openpic_config
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #1
	bl	_openpic_config
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #2
	bl	_openpic_config
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w1, #3
	bl	_openpic_config
	mov	w21, #4
Lloh9:
	adrp	x23, _INTR_TRIGGER_EDGE@GOTPAGE
Lloh10:
	ldr	x23, [x23, _INTR_TRIGGER_EDGE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23]
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_openpic_config
	add	w21, w21, #1
	cmp	w21, #124
	b.ne	LBB0_2
; %bb.3:
Lloh11:
	adrp	x8, _root_pic@GOTPAGE
Lloh12:
	ldr	x8, [x8, _root_pic@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
Lloh14:
	adrp	x8, _cpcht_msipic@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cpcht_msipic@GOTPAGEOFF]
Lloh16:
	str	w20, [x8]
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"htpic"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
	.comm	_INTR_TRIGGER_LEVEL,4,2         ; @INTR_TRIGGER_LEVEL
	.comm	_INTR_POLARITY_LOW,4,2          ; @INTR_POLARITY_LOW
	.comm	_INTR_TRIGGER_EDGE,4,2          ; @INTR_TRIGGER_EDGE
	.comm	_root_pic,8,3                   ; @root_pic
	.comm	_cpcht_msipic,4,2               ; @cpcht_msipic
	.no_dead_strip	_openpic_cpcht_attach
.subsections_via_symbols
