	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteDataChunks                ## -- Begin function WriteDataChunks
	.p2align	4, 0x90
_WriteDataChunks:                       ## @WriteDataChunks
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	movq	%rsi, %r14
	cmpl	$2, (%rsi)
	jl	LBB0_14
## %bb.2:
	movl	(%r13), %edi
	shll	$3, %edi
	callq	_pg_malloc
	movq	%rax, %r15
	movq	8(%r13), %rcx
	movq	8(%rcx), %rax
	cmpq	%rcx, %rax
	je	LBB0_13
## %bb.3:
	movq	_REQ_DATA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rax), %rax
	cmpq	%rcx, %rax
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 4(%rax)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%edx, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%r12d, %rcx
	incl	%r12d
	movq	%rax, (%r15,%rcx,8)
	movq	8(%r13), %rcx
	jmp	LBB0_7
LBB0_14:
	movq	8(%r13), %rax
	movq	8(%rax), %rbx
	cmpq	%rax, %rbx
	je	LBB0_20
## %bb.15:
	movq	_REQ_DATA@GOTPCREL(%rip), %r14
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%rbx), %rbx
	cmpq	%rax, %rbx
	je	LBB0_20
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 4(%rbx)
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	(%r14), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_WriteDataChunksForTocEntry
	movq	8(%r13), %rax
	jmp	LBB0_19
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$2, %r12d
	jl	LBB0_10
## %bb.9:
	movq	_TocEntrySizeCompare@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$8, %edx
	callq	_qsort
	jmp	LBB0_11
LBB0_10:
	cmpl	$1, %r12d
	movl	$1, %r12d
	jne	LBB0_13
LBB0_11:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rdx
	movq	_ACT_DUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mark_dump_job_done@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%r9d, %r9d
	callq	_DispatchJobForTocEntry
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_12
LBB0_13:
	movq	%r15, %rdi
	callq	_pg_free
	movq	_WFW_ALL_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WaitForWorkers                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REQ_DATA,4,2                   ## @REQ_DATA
	.comm	_TocEntrySizeCompare,4,2        ## @TocEntrySizeCompare
	.comm	_ACT_DUMP,4,2                   ## @ACT_DUMP
	.comm	_mark_dump_job_done,4,2         ## @mark_dump_job_done
	.comm	_WFW_ALL_IDLE,4,2               ## @WFW_ALL_IDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteDataChunks                ; -- Begin function WriteDataChunks
	.p2align	2
_WriteDataChunks:                       ; @WriteDataChunks
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	cbz	x1, LBB0_8
; %bb.1:
	mov	x20, x1
	ldr	w8, [x1]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.2:
	ldr	w8, [x19]
	lsl	w0, w8, #3
	bl	_pg_malloc
	mov	x21, x0
	ldr	x9, [x19, #8]
	ldr	x8, [x9, #8]
	cmp	x8, x9
	b.eq	LBB0_20
; %bb.3:
	mov	w22, #0
Lloh0:
	adrp	x10, _REQ_DATA@GOTPAGE
Lloh1:
	ldr	x10, [x10, _REQ_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8, #8]
	cmp	x8, x9
	b.eq	LBB0_15
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8, #4]
	cbz	w11, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w11, [x8]
	tst	w10, w11
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x8, [x21, w22, sxtw #3]
	add	w22, w22, #1
	ldr	x9, [x19, #8]
	b	LBB0_4
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x20, [x8, #8]
	cmp	x20, x8
	b.eq	LBB0_14
; %bb.9:
Lloh3:
	adrp	x21, _REQ_DATA@GOTPAGE
Lloh4:
	ldr	x21, [x21, _REQ_DATA@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x20, [x20, #8]
	cmp	x20, x8
	b.eq	LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20, #4]
	cbz	w9, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x20]
	ldr	w10, [x21]
	tst	w10, w9
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_WriteDataChunksForTocEntry
	ldr	x8, [x19, #8]
	b	LBB0_10
LBB0_14:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	cmp	w22, #2
	b.lt	LBB0_17
; %bb.16:
Lloh5:
	adrp	x8, _TocEntrySizeCompare@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TocEntrySizeCompare@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #8
	bl	_qsort
	b	LBB0_18
LBB0_17:
	cmp	w22, #1
	b.ne	LBB0_20
LBB0_18:
Lloh8:
	adrp	x23, _ACT_DUMP@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ACT_DUMP@GOTPAGEOFF]
Lloh10:
	adrp	x24, _mark_dump_job_done@GOTPAGE
Lloh11:
	ldr	x24, [x24, _mark_dump_job_done@GOTPAGEOFF]
	mov	x25, x21
	mov	w22, w22
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x25], #8
	ldr	w3, [x23]
	ldr	w4, [x24]
	mov	x0, x19
	mov	x1, x20
	mov	x5, #0
	bl	_DispatchJobForTocEntry
	subs	x22, x22, #1
	b.ne	LBB0_19
LBB0_20:
	mov	x0, x21
	bl	_pg_free
Lloh12:
	adrp	x8, _WFW_ALL_IDLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WFW_ALL_IDLE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, 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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_WaitForWorkers
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_REQ_DATA,4,2                   ; @REQ_DATA
	.comm	_TocEntrySizeCompare,4,2        ; @TocEntrySizeCompare
	.comm	_ACT_DUMP,4,2                   ; @ACT_DUMP
	.comm	_mark_dump_job_done,4,2         ; @mark_dump_job_done
	.comm	_WFW_ALL_IDLE,4,2               ; @WFW_ALL_IDLE
.subsections_via_symbols
