	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flexrm_enqueue_desc
_flexrm_enqueue_desc:                   ## @flexrm_enqueue_desc
	.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
	subl	%edi, %esi
	jle	LBB0_8
## %bb.1:
	movq	%r9, %r14
	movq	%r8, %rbx
	movl	%ecx, %r15d
	movl	%edx, %r9d
	movq	24(%rbp), %r12
	movq	16(%rbp), %r13
	movq	_HEADER_BDCOUNT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_2
LBB0_5:
	movq	(%rbx), %rdi
	movl	%r15d, %esi
	callq	_flexrm_write_desc
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	addq	$4, %rdi
	cmpq	%r12, %rdi
	cmoveq	%r13, %rdi
	movq	%rdi, (%rbx)
	callq	_flexrm_is_next_table_desc
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	cmpl	$0, (%r14)
	sete	%al
	movl	%eax, (%r14)
	jmp	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r14), %edx
	xorl	%eax, %eax
	testl	%edx, %edx
	sete	%al
	xorl	%r8d, %r8d
	testl	%edi, %edi
	sete	%r8b
	cmovnel	%edx, %eax
	xorl	%edx, %edx
	cmpl	%ecx, %esi
	setle	%dl
	cmovll	%esi, %ecx
	movl	%eax, %edi
	movl	%r8d, %esi
	xorl	%r8d, %r8d
	callq	_flexrm_header_desc
	movq	(%rbx), %rdi
	movl	%eax, %esi
	callq	_flexrm_write_desc
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	addq	$4, %rdi
	cmpq	%r12, %rdi
	cmoveq	%r13, %rdi
	movq	%rdi, (%rbx)
	callq	_flexrm_is_next_table_desc
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	cmpl	$0, (%r14)
	sete	%al
	movl	%eax, (%r14)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_HEADER_BDCOUNT_MAX,4,2         ## @HEADER_BDCOUNT_MAX
	.no_dead_strip	_flexrm_enqueue_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flexrm_enqueue_desc
_flexrm_enqueue_desc:                   ; @flexrm_enqueue_desc
	.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
	subs	w8, w1, w0
	b.le	LBB0_5
; %bb.1:
	mov	x19, x7
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
Lloh0:
	adrp	x9, _HEADER_BDCOUNT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HEADER_BDCOUNT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w10, w0, w9
	msub	w10, w10, w9, w0
	cbz	w10, LBB0_6
LBB0_2:
	ldr	x0, [x22]
	mov	x1, x23
	bl	_flexrm_write_desc
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x8, #4
	cmp	x8, x19
	csel	x0, x20, x8, eq
	str	x0, [x22]
	bl	_flexrm_is_next_table_desc
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x21]
	b	LBB0_3
LBB0_5:
	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
LBB0_6:
	mov	x5, x2
	ldr	w10, [x21]
	cmp	w10, #0
	cset	w11, eq
	cmp	w0, #0
	csel	w0, w11, w10, eq
	cset	w1, eq
	cmp	w8, w9
	csel	w3, w8, w9, lt
	cset	w2, le
	mov	w4, #0
	bl	_flexrm_header_desc
	mov	x1, x0
	ldr	x0, [x22]
	bl	_flexrm_write_desc
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x8, #4
	cmp	x8, x19
	csel	x0, x20, x8, eq
	str	x0, [x22]
	bl	_flexrm_is_next_table_desc
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x21]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HEADER_BDCOUNT_MAX,4,2         ; @HEADER_BDCOUNT_MAX
	.no_dead_strip	_flexrm_enqueue_desc
.subsections_via_symbols
