	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bwrite_mlist_sublist_first_pass
_bwrite_mlist_sublist_first_pass:       ## @bwrite_mlist_sublist_first_pass
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%r8d, %ebx
	subl	%ecx, %ebx
	cmpl	$2, %ebx
	jge	LBB0_1
LBB0_8:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%ecx, %r14d
	movq	%rsi, %r12
	movslq	%r8d, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	$1, %eax
	subl	%r8d, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	movl	%eax, %r9d
	movl	24(%rbp), %eax
	pushq	%rax
	pushq	16(%rbp)
	callq	_bwrite_mlist_sublist_first_pass
	addq	$16, %rsp
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movl	%r8d, %ebx
	subl	%r15d, %ebx
	movl	%r15d, %r14d
	cmpl	$1, %ebx
	jle	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r14,%r8), %r15d
	sarl	%r15d
	movslq	%r14d, %rax
	movl	%r15d, %ecx
	subl	%eax, %ecx
	addl	(%r12,%rax,4), %ecx
	movslq	%r15d, %r13
	movl	(%r12,%r13,4), %esi
	subl	%ecx, %esi
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leal	(%rax,%r15), %edx
	movq	-112(%rbp), %rax                ## 8-byte Reload
	addl	(%r12,%rax,4), %edx
	subl	%ecx, %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_bwrite_interpolative_encode_value
	movl	24(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r13,4), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_bwrite_gamma_code
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %ebx
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbp), %r12
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	8(%r12), %rax
	setb	%dil
	callq	_assert
	movq	(%r12), %rbx
	movq	16(%r12), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	1(%rbx), %rax
	movq	%rax, (%r12)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_bwrite_get_bits_written
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movl	24(%rbp), %eax
	pushq	%rax
	pushq	%r12
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	callq	_bwrite_mlist_sublist_first_pass
	addq	$16, %rsp
	movq	%r13, %rdi
	callq	_bwrite_get_bits_written
                                        ## kill: def $eax killed $eax def $rax
	subl	-68(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rbx,4)
	leal	1(%rax), %esi
	movq	%r13, %rdi
	callq	_bwrite_gamma_code
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bwrite_mlist_sublist_first_pass
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bwrite_mlist_sublist_first_pass
_bwrite_mlist_sublist_first_pass:       ; @bwrite_mlist_sublist_first_pass
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x2, [sp, #40]                   ; 8-byte Folded Spill
	sub	w28, w4, w3
	cmp	w28, #2
	b.ge	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_2:
	mov	x19, x7
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x27, x3
	mov	x24, x1
	mov	x25, x0
	sxtw	x8, w22
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	mov	w8, #1
	sub	w8, w8, w4
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	mov	x1, x24
	ldr	x2, [sp, #40]                   ; 8-byte Folded Reload
	mov	x3, x27
	mov	x4, x26
	mov	x5, x21
	mov	x6, x20
	mov	x7, x19
	bl	_bwrite_mlist_sublist_first_pass
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	w28, w22, w26
	mov	x27, x23
	cmp	w28, #1
	b.le	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w27, w22
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w9, [x24, x9, lsl #2]
	asr	w23, w8, #1
	ldr	w10, [x24, w27, sxtw #2]
	sub	w11, w23, w27
	add	w10, w10, w11
	sbfx	x26, x8, #1, #31
	ldr	w8, [x24, w23, sxtw #2]
	sub	w1, w8, w10
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w8, w8, w23
	add	w8, w8, w9
	sub	w2, w8, w10
	mov	x0, x25
	bl	_bwrite_interpolative_encode_value
	cbz	w19, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w28, w21
	b.lt	LBB0_3
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w1, [x8, x26, lsl #2]
	mov	x0, x25
	bl	_bwrite_gamma_code
	cmp	w28, w21
	b.lt	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	x8, x9, [x20]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldr	x8, [x20, #16]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	mov	x22, x21
	ldr	x21, [x20]
	add	x8, x21, #1
	str	x8, [x20]
	mov	x0, x25
	bl	_bwrite_get_bits_written
	mov	x28, x0
	mov	x0, x25
	mov	x1, x24
	ldr	x2, [sp, #40]                   ; 8-byte Folded Reload
	mov	x3, x27
	mov	x4, x26
	mov	x5, x22
	mov	x6, x20
	mov	x7, x19
	bl	_bwrite_mlist_sublist_first_pass
	mov	x0, x25
	bl	_bwrite_get_bits_written
	sub	w8, w0, w28
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	str	w8, [x9, x21, lsl #2]
	mov	x21, x22
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	add	w1, w8, #1
	mov	x0, x25
	bl	_bwrite_gamma_code
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bwrite_mlist_sublist_first_pass
.subsections_via_symbols
