	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function blk_write
_blk_write:                             ## @blk_write
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rdi), %edi
	movq	_MAXDUMPPGS@GOTPCREL(%rip), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	imulq	(%rax), %rsi
	callq	_min
	testl	%eax, %eax
	movq	(%rbx), %rcx
	movl	%ecx, %esi
	cmovnel	%eax, %esi
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.1:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	testq	%rdx, %rdx
	je	LBB0_4
LBB0_2:
	leaq	L_str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_3:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_2
LBB0_4:
	testq	%r12, %r12
	je	LBB0_11
## %bb.5:
	testq	%r14, %r14
	je	LBB0_11
## %bb.6:
	leaq	L_str(%rip), %rdi
LBB0_7:
	callq	_puts
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_14
## %bb.12:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	testq	%rdx, %rdx
	je	LBB0_15
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_8
LBB0_14:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_13
LBB0_15:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	testq	%r12, %r12
	je	LBB0_17
## %bb.16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_blk_flush
	testl	%eax, %eax
	jne	LBB0_10
LBB0_17:
	testq	%r15, %r15
	je	LBB0_37
## %bb.18:
	movq	_fragsz@GOTPCREL(%rip), %rcx
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_counter@GOTPCREL(%rip), %rbx
	movq	_progress@GOTPCREL(%rip), %rsi
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%eax, %eax
	subq	%r13, %r15
	movq	_fragsz@GOTPCREL(%rip), %rcx
	movq	_counter@GOTPCREL(%rip), %rbx
	movq	_progress@GOTPCREL(%rip), %rsi
	je	LBB0_10
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_29 Depth 2
	movslq	(%rcx), %rax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	subq	%rax, %r13
	cmpq	%r13, %r15
	cmovbq	%r15, %r13
	movq	(%rbx), %rax
	addq	%r13, %rax
	movq	%rax, (%rbx)
	movq	(%rsi), %rdi
	subq	%r13, %rdi
	movq	%rdi, (%rsi)
	cmpq	$16777216, %rax                 ## imm = 0x1000000
	jb	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_dumpsize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_report_progress
	andq	$16777215, (%rbx)               ## imm = 0xFFFFFF
	movq	_progress@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	_wdog_next@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jg	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_WD_LASTVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wdog_kern_pat
	movq	_wdog_next@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	_WDOG_DUMP_INTERVAL@GOTPCREL(%rip), %rdx
	subq	(%rdx), %rax
	movl	$0, %edx
	cmovleq	%rdx, %rax
	movq	%rax, (%rcx)
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=1
	testq	%r12, %r12
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	xorl	%edx, %edx
	movq	%r13, %rcx
	callq	_dump_append
	testl	%eax, %eax
	jne	LBB0_10
## %bb.26:                              ##   in Loop: Header=BB0_20 Depth=1
	addq	%r13, %r12
	jmp	LBB0_34
LBB0_27:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	movq	%r14, %r8
	movq	_fragsz@GOTPCREL(%rip), %r15
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movq	_dump_va@GOTPCREL(%rip), %r12
	je	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_20 Depth=1
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addq	%r8, %rdi
	movl	(%r15), %esi
	addl	%ebx, %esi
	movq	%rcx, %r13
	movzbl	(%rcx), %ecx
	sarl	%cl, %esi
	movq	%r8, %r14
	callq	_pmap_kenter_temporary
	movq	%r14, %r8
	movq	%r13, %rcx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, (%r12)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movslq	%ebx, %rdi
	cmpq	%rdi, %r13
	ja	LBB0_29
LBB0_30:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	(%r15), %eax
	addl	%r13d, %eax
	movl	%eax, (%r15)
	addq	%r13, %r8
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%r8, %r14
	jne	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_blk_flush
	testl	%eax, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_10
## %bb.32:                              ##   in Loop: Header=BB0_20 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_34
LBB0_33:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%r12d, %r12d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%eax, %eax
	callq	_cncheckc
	cmpl	$-1, %eax
	je	LBB0_19
## %bb.35:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpl	$3, %eax
	je	LBB0_38
## %bb.36:                              ##   in Loop: Header=BB0_20 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_19
LBB0_37:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_38:
	movq	_ECANCELED@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXDUMPPGS,8,3                 ## @MAXDUMPPGS
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"address not page aligned %p\n"

	.comm	_fragsz,4,2                     ## @fragsz
	.comm	_counter,8,3                    ## @counter
	.comm	_progress,8,3                   ## @progress
	.comm	_dumpsize,4,2                   ## @dumpsize
	.comm	_wdog_next,8,3                  ## @wdog_next
	.comm	_WD_LASTVAL,4,2                 ## @WD_LASTVAL
	.comm	_WDOG_DUMP_INTERVAL,8,3         ## @WDOG_DUMP_INTERVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_dump_va,4,2                    ## @dump_va
	.comm	_ECANCELED,4,2                  ## @ECANCELED
L_.str.3:                               ## @.str.3
	.asciz	" (CTRL-C to abort) "

L_str:                                  ## @str
	.asciz	"cant have both va and pa!"

L_str.4:                                ## @str.4
	.asciz	"size not page aligned"

	.no_dead_strip	_blk_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function blk_write
_blk_write:                             ; @blk_write
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MAXDUMPPGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAXDUMPPGS@GOTPAGEOFF]
	ldr	w0, [x0]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x25]
	mul	x1, x9, x8
	bl	_min
	ldr	x8, [x25]
	cmp	w0, #0
	csel	w26, w8, w0, eq
	udiv	x9, x19, x8
	msub	x9, x9, x8, x19
	cbz	x9, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_str.4@PAGE
Lloh6:
	add	x0, x0, l_str.4@PAGEOFF
	b	LBB0_5
LBB0_2:
	cbz	x23, LBB0_9
; %bb.3:
	cbz	x20, LBB0_9
; %bb.4:
Lloh7:
	adrp	x0, l_str@PAGE
Lloh8:
	add	x0, x0, l_str@PAGEOFF
LBB0_5:
	bl	_puts
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	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_9:
	udiv	x9, x20, x8
	msub	x8, x9, x8, x20
	cbz	x8, LBB0_11
; %bb.10:
	str	x23, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	b	LBB0_6
LBB0_11:
	cbz	x23, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_blk_flush
	cbnz	w0, LBB0_8
LBB0_13:
	cbz	x19, LBB0_32
; %bb.14:
Lloh13:
	adrp	x27, _fragsz@GOTPAGE
Lloh14:
	ldr	x27, [x27, _fragsz@GOTPAGEOFF]
	sxtw	x8, w26
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh15:
	adrp	x10, _counter@GOTPAGE
Lloh16:
	ldr	x10, [x10, _counter@GOTPAGEOFF]
Lloh17:
	adrp	x11, _progress@GOTPAGE
Lloh18:
	ldr	x11, [x11, _progress@GOTPAGEOFF]
Lloh19:
	adrp	x28, _PAGE_SHIFT@GOTPAGE
Lloh20:
	ldr	x28, [x28, _PAGE_SHIFT@GOTPAGEOFF]
Lloh21:
	adrp	x22, _dump_va@GOTPAGE
Lloh22:
	ldr	x22, [x22, _dump_va@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	w0, #0
	sub	x19, x19, x24
Lloh23:
	adrp	x10, _counter@GOTPAGE
Lloh24:
	ldr	x10, [x10, _counter@GOTPAGEOFF]
Lloh25:
	adrp	x11, _progress@GOTPAGE
Lloh26:
	ldr	x11, [x11, _progress@GOTPAGEOFF]
	cbz	x19, LBB0_8
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_25 Depth 2
	ldrsw	x8, [x27]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	sub	x8, x9, x8
	cmp	x19, x8
	csel	x24, x19, x8, lo
	ldr	x8, [x10]
	add	x8, x24, x8
	str	x8, [x10]
	ldr	x9, [x11]
	sub	x0, x9, x24
	str	x0, [x11]
	lsr	x8, x8, #24
	cbz	x8, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh27:
	adrp	x8, _dumpsize@GOTPAGE
Lloh28:
	ldr	x8, [x8, _dumpsize@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_report_progress
Lloh30:
	adrp	x9, _counter@GOTPAGE
Lloh31:
	ldr	x9, [x9, _counter@GOTPAGEOFF]
	ldr	x8, [x9]
	and	x8, x8, #0xffffff
	str	x8, [x9]
Lloh32:
	adrp	x8, _progress@GOTPAGE
Lloh33:
	ldr	x8, [x8, _progress@GOTPAGEOFF]
Lloh34:
	ldr	x0, [x8]
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
Lloh35:
	adrp	x8, _wdog_next@GOTPAGE
Lloh36:
	ldr	x8, [x8, _wdog_next@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	cmp	x0, x8
	b.gt	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh38:
	adrp	x8, _WD_LASTVAL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _WD_LASTVAL@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_wdog_kern_pat
Lloh41:
	adrp	x10, _wdog_next@GOTPAGE
Lloh42:
	ldr	x10, [x10, _wdog_next@GOTPAGEOFF]
	ldr	x8, [x10]
Lloh43:
	adrp	x9, _WDOG_DUMP_INTERVAL@GOTPAGE
Lloh44:
	ldr	x9, [x9, _WDOG_DUMP_INTERVAL@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	subs	x8, x8, x9
	csel	x8, x8, xzr, gt
	str	x8, [x10]
LBB0_20:                                ;   in Loop: Header=BB0_16 Depth=1
	cbz	x23, LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x21
	mov	x1, x23
	mov	w2, #0
	mov	x3, x24
	bl	_dump_append
	cbnz	w0, LBB0_8
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x23, x23, x24
	b	LBB0_29
LBB0_23:                                ;   in Loop: Header=BB0_16 Depth=1
	cbz	x24, LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x8, #0
	mov	w23, #0
LBB0_25:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, x8, x20
	ldr	w8, [x27]
	add	w8, w8, w23
	ldr	w9, [x28]
	asr	w1, w8, w9
	bl	_pmap_kenter_temporary
	str	w0, [x22]
	ldr	w8, [x25]
	add	w23, w23, w8
	sxtw	x8, w23
	cmp	x24, x8
	b.hi	LBB0_25
LBB0_26:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x27]
	add	w8, w8, w24
	cmp	w8, w26
	str	w8, [x27]
	add	x20, x24, x20
	b.ne	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x21
	bl	_blk_flush
	cbnz	w0, LBB0_8
LBB0_28:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x23, #0
LBB0_29:                                ;   in Loop: Header=BB0_16 Depth=1
	bl	_cncheckc
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.30:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w0, #3
	b.eq	LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh46:
	adrp	x0, l_.str.3@PAGE
Lloh47:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	b	LBB0_15
LBB0_32:
	mov	w0, #0
	b	LBB0_8
LBB0_33:
Lloh48:
	adrp	x8, _ECANCELED@GOTPAGE
Lloh49:
	ldr	x8, [x8, _ECANCELED@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXDUMPPGS,8,3                 ; @MAXDUMPPGS
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"address not page aligned %p\n"

	.comm	_fragsz,4,2                     ; @fragsz
	.comm	_counter,8,3                    ; @counter
	.comm	_progress,8,3                   ; @progress
	.comm	_dumpsize,4,2                   ; @dumpsize
	.comm	_wdog_next,8,3                  ; @wdog_next
	.comm	_WD_LASTVAL,4,2                 ; @WD_LASTVAL
	.comm	_WDOG_DUMP_INTERVAL,8,3         ; @WDOG_DUMP_INTERVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_dump_va,4,2                    ; @dump_va
	.comm	_ECANCELED,4,2                  ; @ECANCELED
l_.str.3:                               ; @.str.3
	.asciz	" (CTRL-C to abort) "

l_str:                                  ; @str
	.asciz	"cant have both va and pa!"

l_str.4:                                ; @str.4
	.asciz	"size not page aligned"

	.no_dead_strip	_blk_write
.subsections_via_symbols
