	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nodemgr_irm_write_bc
_nodemgr_irm_write_bc:                  ## @nodemgr_irm_write_bc
	.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	16(%rdi), %rax
	cmpl	$0, 12(%rax)
	je	LBB0_7
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	cmpl	%esi, (%rdi)
	jne	LBB0_7
## %bb.2:
	movq	8(%rbx), %rcx
	cmpq	(%rax), %rcx
	je	LBB0_7
## %bb.3:
	movq	_CSR_REGISTER_BASE@GOTPCREL(%rip), %rcx
	movq	_CSR_BROADCAST_CHANNEL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	orl	(%rcx), %r14d
	movl	8(%rax), %edi
	callq	_cpu_to_be32
	movl	%eax, %r12d
	movl	%eax, -40(%rbp)
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdi
	leaq	-36(%rbp), %r8
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	$4, %r9d
	callq	_hpsb_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	-36(%rbp), %r15d
	movl	$-2147483648, %edi              ## imm = 0x80000000
	callq	_cpu_to_be32
	testl	%r15d, %eax
	je	LBB0_7
## %bb.5:
	cmpl	%r12d, -36(%rbp)
	je	LBB0_7
## %bb.6:
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$4, %ecx
	callq	_hpsb_node_write
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR_REGISTER_BASE,4,2          ## @CSR_REGISTER_BASE
	.comm	_CSR_BROADCAST_CHANNEL,4,2      ## @CSR_BROADCAST_CHANNEL
	.no_dead_strip	_nodemgr_irm_write_bc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nodemgr_irm_write_bc
_nodemgr_irm_write_bc:                  ; @nodemgr_irm_write_bc
	.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
	ldr	x8, [x0, #16]
	ldr	w9, [x8, #12]
	cbz	w9, LBB0_7
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	w9, [x0]
	cmp	w9, w1
	b.ne	LBB0_7
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	x10, [x8]
	cmp	x9, x10
	b.eq	LBB0_7
; %bb.3:
Lloh0:
	adrp	x9, _CSR_REGISTER_BASE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CSR_REGISTER_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _CSR_BROADCAST_CHANNEL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CSR_BROADCAST_CHANNEL@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w20, w10, w9
	ldr	w0, [x8, #8]
	bl	_cpu_to_be32
	mov	x22, x0
	str	w0, [sp, #8]
	ldp	x1, x0, [x19, #8]
	add	x4, sp, #12
	mov	x2, x21
	mov	x3, x20
	mov	w5, #4
	bl	_hpsb_read
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w21, [sp, #12]
	mov	w0, #-2147483648
	bl	_cpu_to_be32
	tst	w0, w21
	b.eq	LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	cmp	w8, w22
	b.eq	LBB0_7
; %bb.6:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #4
	bl	_hpsb_node_write
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR_REGISTER_BASE,4,2          ; @CSR_REGISTER_BASE
	.comm	_CSR_BROADCAST_CHANNEL,4,2      ; @CSR_BROADCAST_CHANNEL
	.no_dead_strip	_nodemgr_irm_write_bc
.subsections_via_symbols
