	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bwrite_ylist_sublist_first_pass
_bwrite_ylist_sublist_first_pass:       ## @bwrite_ylist_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, -52(%rbp)                 ## 4-byte Spill
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movl	%r8d, %r12d
	subl	%ecx, %r12d
	cmpl	$2, %r12d
	jge	LBB0_1
LBB0_6:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movl	$1, %eax
	subl	%r8d, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r14d, %r8d
	callq	_bwrite_ylist_sublist_first_pass
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movl	%r8d, %r12d
	subl	%r14d, %r12d
	movl	%r14d, %r15d
	cmpl	$1, %r12d
	jle	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	leal	(%r15,%r8), %r14d
	sarl	%r14d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r8d, %edx
	callq	_get_doc_id
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_get_doc_id
	movl	%r14d, %ebx
	subl	%r15d, %ebx
	addl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_get_doc_id
	subl	%ebx, %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addl	%r14d, %ecx
	addl	%ecx, %r13d
	subl	%ebx, %r13d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	callq	_bwrite_interpolative_encode_value
	movslq	%r14d, %rax
	movslq	(%rbx,%rax,4), %rcx
	leaq	(,%rcx,4), %rsi
	addq	%r13, %rsi
	movl	4(%rbx,%rax,4), %edx
	subl	%ecx, %edx
	movq	%r15, %rdi
	callq	_bwrite_coordinates_list
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	cmpl	%r9d, %r12d
	jl	LBB0_4
## %bb.3:                               ##   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, -88(%rbp)                 ## 8-byte Spill
	leaq	1(%rbx), %rax
	movq	%rax, (%r12)
	movq	%r15, %rdi
	callq	_bwrite_get_bits_written
	movl	%eax, %r13d
	movq	%r12, (%rsp)
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r14d, %r8d
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	callq	_bwrite_ylist_sublist_first_pass
	movq	%r15, %rdi
	callq	_bwrite_get_bits_written
                                        ## kill: def $eax killed $eax def $rax
	subl	%r13d, %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rbx,4)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leal	1(%rax), %esi
	movq	%r15, %rdi
	callq	_bwrite_gamma_code
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bwrite_ylist_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_ylist_sublist_first_pass
_bwrite_ylist_sublist_first_pass:       ; @bwrite_ylist_sublist_first_pass
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	w5, [sp, #12]                   ; 4-byte Folded Spill
	sub	w28, w4, w3
	cmp	w28, #2
	b.ge	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	mov	x19, x6
	mov	x21, x4
	mov	x26, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	mov	w8, #1
	sub	w8, w8, w4
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x26
	mov	x4, x25
	mov	x5, x20
	mov	x6, x19
	bl	_bwrite_ylist_sublist_first_pass
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	w28, w21, w25
	mov	x26, x25
	cmp	w28, #1
	b.le	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w26, w21
	asr	w25, w8, #1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_get_doc_id
	mov	x27, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x26
	bl	_get_doc_id
	sub	w8, w25, w26
	add	w20, w0, w8
	mov	x0, x23
	mov	x1, x22
	mov	x2, x25
	bl	_get_doc_id
	sub	w1, w0, w20
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	add	w8, w8, w25
	add	w8, w8, w27
	sub	w2, w8, w20
	mov	x0, x24
	bl	_bwrite_interpolative_encode_value
	add	x8, x22, w25, sxtw #2
	ldp	w9, w8, [x8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x1, x23, x9, lsl #2
	sub	w2, w8, w9
	mov	x0, x24
	bl	_bwrite_coordinates_list
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w28, w20
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x8, x9, [x19]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #16]
	str	x8, [sp]                        ; 8-byte Folded Spill
	ldr	x28, [x19]
	add	x8, x28, #1
	str	x8, [x19]
	mov	x0, x24
	bl	_bwrite_get_bits_written
	mov	x27, x0
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x26
	mov	x4, x25
	mov	x5, x20
	mov	x6, x19
	bl	_bwrite_ylist_sublist_first_pass
	mov	x0, x24
	bl	_bwrite_get_bits_written
	sub	w8, w0, w27
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	w8, [x9, x28, lsl #2]
	add	w1, w8, #1
	mov	x0, x24
	bl	_bwrite_gamma_code
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bwrite_ylist_sublist_first_pass
.subsections_via_symbols
