	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_iovec                  ## -- Begin function prepare_iovec
	.p2align	4, 0x90
_prepare_iovec:                         ## @prepare_iovec
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	-44(%rbp), %rdi
	movq	%rcx, %rsi
	callq	_nbit_set
	testl	%r14d, %r14d
	jle	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	leaq	-44(%rbp), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_nbit_ready_bytes
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	movl	%eax, (%r15,%r14,8)
	movq	%r12, %rdi
	callq	_nbit_get_ptr
	movl	%eax, 4(%r15,%r14,8)
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nbit_advance
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	sete	%dil
	callq	_assert
	addl	%ebx, %r13d
	incq	%r14
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_3
## %bb.5:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
LBB0_6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
LBB0_7:
	movl	%r14d, (%rbx)
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_iovec                  ; -- Begin function prepare_iovec
	.p2align	2
_prepare_iovec:                         ; @prepare_iovec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	add	x0, sp, #12
	mov	x1, x3
	bl	_nbit_set
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
	mov	w20, #0
	add	x24, x22, #4
	mov	w22, w21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_nbit_ready_bytes
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	stur	w0, [x24, #-4]
	add	x0, sp, #12
	bl	_nbit_get_ptr
	str	w0, [x24], #8
	add	x0, sp, #12
	mov	x1, x21
	bl	_nbit_advance
	cmp	w0, w21
	cset	w0, eq
	bl	_assert
	add	w20, w21, w20
	add	x23, x23, #1
	cmp	x22, x23
	b.ne	LBB0_2
; %bb.4:
	mov	x23, x22
	b	LBB0_6
LBB0_5:
	mov	w23, #0
	mov	w20, #0
LBB0_6:
	str	w23, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
