	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_wrb_cmd_hdr_prepare
_be_wrb_cmd_hdr_prepare:                ## @be_wrb_cmd_hdr_prepare
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r15
	movl	%ecx, %r12d
	movq	%rdi, %rbx
	movq	%rdx, 24(%rdi)
	movq	%rsi, 16(%rdi)
	leal	-32(%r12), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	movq	$0, (%rbx)
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fill_wrb_tags
	movl	%r12d, (%r15)
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	_MCC_WRB_SGE_CNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$1, %eax
	movq	_MCC_WRB_SGE_CNT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 4(%r15)
	movq	%r15, %rdi
	callq	_nonembedded_sgl
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_upper_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%rbx)
	movl	(%r14), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	movl	4(%r14), %edi
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
	jmp	LBB0_3
LBB0_2:
	movq	_MCC_WRB_EMBEDDED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r15)
LBB0_3:
	movq	%r15, %rdi
	movl	$8, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_be_dws_cpu_to_le               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MCC_WRB_SGE_CNT_MASK,4,2       ## @MCC_WRB_SGE_CNT_MASK
	.comm	_MCC_WRB_SGE_CNT_SHIFT,4,2      ## @MCC_WRB_SGE_CNT_SHIFT
	.comm	_MCC_WRB_EMBEDDED_MASK,4,2      ## @MCC_WRB_EMBEDDED_MASK
	.no_dead_strip	_be_wrb_cmd_hdr_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_wrb_cmd_hdr_prepare
_be_wrb_cmd_hdr_prepare:                ; @be_wrb_cmd_hdr_prepare
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x5
	mov	x19, x4
	mov	x21, x3
	mov	x22, x0
	stp	x1, x2, [x0, #16]
	sub	w0, w3, #32
	bl	_cpu_to_le32
	stp	xzr, x0, [x22]
	mov	x0, x19
	mov	x1, x22
	bl	_fill_wrb_tags
	str	w21, [x19]
	cbz	x20, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MCC_WRB_SGE_CNT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCC_WRB_SGE_CNT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MCC_WRB_SGE_CNT_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MCC_WRB_SGE_CNT_SHIFT@GOTPAGEOFF]
	and	w8, w8, #0x1
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_nonembedded_sgl
	mov	x21, x0
	ldr	w0, [x20]
	bl	_upper_32_bits
	bl	_cpu_to_le32
	str	x0, [x21, #16]
	ldr	w0, [x20]
	bl	_cpu_to_le32
	str	x0, [x21, #8]
	ldr	w0, [x20, #4]
	bl	_cpu_to_le32
	str	x0, [x21]
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _MCC_WRB_EMBEDDED_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MCC_WRB_EMBEDDED_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_3:
	mov	x0, x19
	mov	w1, #8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_be_dws_cpu_to_le
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MCC_WRB_SGE_CNT_MASK,4,2       ; @MCC_WRB_SGE_CNT_MASK
	.comm	_MCC_WRB_SGE_CNT_SHIFT,4,2      ; @MCC_WRB_SGE_CNT_SHIFT
	.comm	_MCC_WRB_EMBEDDED_MASK,4,2      ; @MCC_WRB_EMBEDDED_MASK
	.no_dead_strip	_be_wrb_cmd_hdr_prepare
.subsections_via_symbols
