	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hrowpic_attach
_hrowpic_attach:                        ## @hrowpic_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, %rbx
	movl	%r14d, 24(%rax)
	leaq	16(%rax), %rdx
	movq	$0, 16(%rax)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	callq	_rman_get_bustag
	movl	%eax, 12(%rbx)
	movq	(%rbx), %rdi
	callq	_rman_get_bushandle
	movl	%eax, 8(%rbx)
	movq	_HPIC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HPIC_PRIMARY@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_hrowpic_write_reg
	movq	_HPIC_CLEAR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$-1, %ecx
	callq	_hrowpic_write_reg
	movq	_HPIC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HPIC_SECONDARY@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_hrowpic_write_reg
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$-1, %ecx
	callq	_hrowpic_write_reg
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	$64, %edx
	xorl	%ecx, %ecx
	callq	_powerpc_register_pic
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_HPIC_ENABLE,4,2                ## @HPIC_ENABLE
	.comm	_HPIC_PRIMARY,4,2               ## @HPIC_PRIMARY
	.comm	_HPIC_CLEAR,4,2                 ## @HPIC_CLEAR
	.comm	_HPIC_SECONDARY,4,2             ## @HPIC_SECONDARY
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_hrowpic_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hrowpic_attach
_hrowpic_attach:                        ; @hrowpic_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	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #24]
	mov	x2, x0
	str	xzr, [x2, #16]!
Lloh0:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_rman_get_bustag
	str	w0, [x20, #12]
	ldr	x0, [x20]
	bl	_rman_get_bushandle
	str	w0, [x20, #8]
Lloh6:
	adrp	x21, _HPIC_ENABLE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _HPIC_ENABLE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh8:
	adrp	x22, _HPIC_PRIMARY@GOTPAGE
Lloh9:
	ldr	x22, [x22, _HPIC_PRIMARY@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #0
	bl	_hrowpic_write_reg
Lloh10:
	adrp	x23, _HPIC_CLEAR@GOTPAGE
Lloh11:
	ldr	x23, [x23, _HPIC_CLEAR@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #-1
	bl	_hrowpic_write_reg
	ldr	w1, [x21]
Lloh12:
	adrp	x21, _HPIC_SECONDARY@GOTPAGE
Lloh13:
	ldr	x21, [x21, _HPIC_SECONDARY@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x20
	mov	w3, #0
	bl	_hrowpic_write_reg
	ldr	w1, [x23]
	ldr	w2, [x21]
	mov	x0, x20
	mov	w3, #-1
	bl	_hrowpic_write_reg
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x1, x0
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w2, #64
	mov	w3, #0
	bl	_powerpc_register_pic
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh19:
	adrp	x8, _ENXIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
LBB0_3:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.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	_HPIC_ENABLE,4,2                ; @HPIC_ENABLE
	.comm	_HPIC_PRIMARY,4,2               ; @HPIC_PRIMARY
	.comm	_HPIC_CLEAR,4,2                 ; @HPIC_CLEAR
	.comm	_HPIC_SECONDARY,4,2             ; @HPIC_SECONDARY
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_hrowpic_attach
.subsections_via_symbols
