	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msc_iter_block_advance
_msc_iter_block_advance:                ## @msc_iter_block_advance
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	$0, 32(%rdi)
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%rbx), %rdi
	cmpq	8(%rbx), %rdi
	jne	LBB0_6
## %bb.2:
	decq	%rax
	movq	%rax, 16(%rbx)
	jne	LBB0_6
	jmp	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	callq	_msc_iter_bdesc
	movl	%eax, %edi
	callq	_msc_block_last_written
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:
	movq	(%rbx), %rdi
LBB0_6:
	callq	_sg_is_last
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	24(%rbx), %edi
	callq	_msc_win_base_sg
	jmp	LBB0_9
LBB0_8:
	movq	(%rbx), %rdi
	callq	_sg_next
LBB0_9:
	movq	%rax, (%rbx)
	cmpq	$0, 16(%rbx)
	jne	LBB0_11
## %bb.10:
	cmpq	8(%rbx), %rax
	jne	LBB0_11
LBB0_3:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_msc_iter_win_advance           ## TAILCALL
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_msc_iter_block_advance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msc_iter_block_advance
_msc_iter_block_advance:                ; @msc_iter_block_advance
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	xzr, [x0, #32]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.1:
	ldp	x0, x9, [x19]
	cmp	x0, x9
	b.ne	LBB0_3
; %bb.2:
	subs	x8, x8, #1
	str	x8, [x19, #16]
	b.eq	LBB0_10
LBB0_3:
	bl	_sg_is_last
	cbz	x0, LBB0_7
LBB0_4:
	ldr	w0, [x19, #24]
	bl	_msc_win_base_sg
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_msc_iter_bdesc
	bl	_msc_block_last_written
	cbnz	x0, LBB0_10
; %bb.6:
	ldr	x0, [x19]
	bl	_sg_is_last
	cbnz	x0, LBB0_4
LBB0_7:
	ldr	x0, [x19]
	bl	_sg_next
LBB0_8:
	str	x0, [x19]
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_11
; %bb.9:
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.ne	LBB0_11
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_msc_iter_win_advance
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_msc_iter_block_advance
.subsections_via_symbols
