	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wb_write_out
_wb_write_out:                          ## @wb_write_out
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	movslq	(%r12), %rax
	movl	$8, %ebx
	subq	%rax, %rbx
	movq	_LOGICAL_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r14
	jmp	LBB0_3
LBB0_1:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r14d
LBB0_3:
	movq	_WB_TO_STREAM@GOTPCREL(%rip), %rax
	movq	8(%r12), %rcx
	movq	32(%r12), %rsi
	subq	%r14, %rbx
	cmpq	(%rax), %rcx
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdx
	callq	___archive_write_output
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdx
	callq	_write_to_temp
LBB0_6:
	movl	%eax, %r15d
	movq	16(%r12), %rax
	addq	%rbx, %rax
	movq	%rax, 16(%r12)
	cmpq	24(%r12), %rax
	jle	LBB0_8
## %bb.7:
	movq	%rax, 24(%r12)
LBB0_8:
	movl	$8, (%r12)
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movl	$8, %eax
	subl	%r14d, %eax
	movl	%eax, (%r12)
	movq	32(%r12), %rdi
	addq	%rdi, %rbx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_memmove
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOGICAL_BLOCK_SIZE,8,3         ## @LOGICAL_BLOCK_SIZE
	.comm	_WB_TO_STREAM,8,3               ## @WB_TO_STREAM
	.no_dead_strip	_wb_write_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wb_write_out
_wb_write_out:                          ; @wb_write_out
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x21, [x0]
	ldrsw	x8, [x21]
	mov	w9, #8
	sub	x22, x9, x8
Lloh0:
	adrp	x8, _LOGICAL_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOGICAL_BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	udiv	x9, x22, x8
	mul	x19, x9, x8
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _WB_TO_STREAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WB_TO_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x1, [x21, #32]
	mov	x2, x19
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	___archive_write_output
	b	LBB0_3
LBB0_2:
	bl	_write_to_temp
LBB0_3:
	mov	x20, x0
	sub	x2, x22, x19
	ldp	x8, x9, [x21, #16]
	add	x8, x8, x19
	cmp	x8, x9
	str	x8, [x21, #16]
	b.le	LBB0_5
; %bb.4:
	str	x8, [x21, #24]
LBB0_5:
	mov	w8, #8
	str	w8, [x21]
	cbz	x2, LBB0_7
; %bb.6:
	sub	w8, w8, w2
	str	w8, [x21]
	ldr	x0, [x21, #32]
	add	x1, x19, x0
	bl	_memmove
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LOGICAL_BLOCK_SIZE,8,3         ; @LOGICAL_BLOCK_SIZE
	.comm	_WB_TO_STREAM,8,3               ; @WB_TO_STREAM
	.no_dead_strip	_wb_write_out
.subsections_via_symbols
