	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nodemgr_check_irm_capability
_nodemgr_check_irm_capability:          ## @nodemgr_check_irm_capability
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_hpsb_disable_irm@GOTPCREL(%rip), %rax
	movl	$1, %ebx
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	cmpq	$0, 8(%rdi)
	jne	LBB0_7
## %bb.2:
	movl	%esi, %r15d
	movq	_LOCAL_BUS@GOTPCREL(%rip), %rax
	movl	(%r14), %r12d
	orl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_get_hpsb_generation
	movq	_CSR_REGISTER_BASE@GOTPCREL(%rip), %rdx
	movq	_CSR_BROADCAST_CHANNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	leaq	-36(%rbp), %r8
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	$4, %r9d
	callq	_hpsb_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movl	-36(%rbp), %edi
	callq	_be32_to_cpu
	testl	%eax, %eax
	js	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_HPSB_DEBUG
	cmpl	$5, %r15d
	jl	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_HPSB_DEBUG
	jmp	LBB0_7
LBB0_6:
	movl	4(%r14), %edi
	callq	_NODEID_TO_NODE
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$-1, %edx
	callq	_hpsb_send_phy_config
	movq	_LONG_RESET_FORCE_ROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hpsb_reset_bus
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hpsb_disable_irm,8,3           ## @hpsb_disable_irm
	.comm	_LOCAL_BUS,4,2                  ## @LOCAL_BUS
	.comm	_CSR_REGISTER_BASE,4,2          ## @CSR_REGISTER_BASE
	.comm	_CSR_BROADCAST_CHANNEL,4,2      ## @CSR_BROADCAST_CHANNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Current remote IRM is not 1394a-2000 compliant, resetting..."

L_.str.1:                               ## @.str.1
	.asciz	"Stopping reset loop for IRM sanity"

	.comm	_LONG_RESET_FORCE_ROOT,4,2      ## @LONG_RESET_FORCE_ROOT
	.no_dead_strip	_nodemgr_check_irm_capability
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nodemgr_check_irm_capability
_nodemgr_check_irm_capability:          ; @nodemgr_check_irm_capability
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _hpsb_disable_irm@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hpsb_disable_irm@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
LBB0_2:
	mov	w0, #1
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
	add	sp, sp, #64
	ret
LBB0_4:
	mov	x20, x1
Lloh3:
	adrp	x8, _LOCAL_BUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LOCAL_BUS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w21, w9, w8
	mov	x0, x19
	bl	_get_hpsb_generation
	mov	x2, x0
Lloh6:
	adrp	x8, _CSR_REGISTER_BASE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CSR_REGISTER_BASE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CSR_BROADCAST_CHANNEL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CSR_BROADCAST_CHANNEL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x4, sp, #12
	mov	x0, x19
	mov	x1, x21
	mov	w5, #4
	bl	_hpsb_read
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldr	w0, [sp, #12]
	bl	_be32_to_cpu
	tbnz	w0, #31, LBB0_2
LBB0_6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPSB_DEBUG
	cmp	w20, #5
	b.lt	LBB0_8
; %bb.7:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_HPSB_DEBUG
	b	LBB0_2
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_NODEID_TO_NODE
	mov	x1, x0
	mov	x0, x19
	mov	w2, #-1
	bl	_hpsb_send_phy_config
Lloh16:
	adrp	x8, _LONG_RESET_FORCE_ROOT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LONG_RESET_FORCE_ROOT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hpsb_reset_bus
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_hpsb_disable_irm,8,3           ; @hpsb_disable_irm
	.comm	_LOCAL_BUS,4,2                  ; @LOCAL_BUS
	.comm	_CSR_REGISTER_BASE,4,2          ; @CSR_REGISTER_BASE
	.comm	_CSR_BROADCAST_CHANNEL,4,2      ; @CSR_BROADCAST_CHANNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Current remote IRM is not 1394a-2000 compliant, resetting..."

l_.str.1:                               ; @.str.1
	.asciz	"Stopping reset loop for IRM sanity"

	.comm	_LONG_RESET_FORCE_ROOT,4,2      ; @LONG_RESET_FORCE_ROOT
	.no_dead_strip	_nodemgr_check_irm_capability
.subsections_via_symbols
