	.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
	pushq	%rax
	.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, %r12
	movq	%rsi, %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	movq	_MAXDUMPPGS@GOTPCREL(%rip), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	imulq	(%rax), %rsi
	callq	_min
	movq	%rax, %r14
	testq	%rax, %rax
	movq	(%rbx), %rcx
	cmoveq	%rcx, %r14
	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	%r13, %r13
	je	LBB0_11
## %bb.5:
	testq	%r12, %r12
	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	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r12, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_14
## %bb.12:
	movq	%r12, %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	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_13
LBB0_15:
	movq	%r12, %rbx
	testq	%r13, %r13
	je	LBB0_17
## %bb.16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_blk_flush
	testl	%eax, %eax
	jne	LBB0_10
LBB0_17:
	testq	%r15, %r15
	jne	LBB0_20
## %bb.18:
	xorl	%eax, %eax
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%eax, %eax
	subq	%r12, %r15
	je	LBB0_10
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %r12
	movq	_fragsz@GOTPCREL(%rip), %rax
	subq	(%rax), %r12
	cmpq	%r15, %r12
	cmovaeq	%r15, %r12
	movq	_counter@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	addq	%r12, %rax
	movq	%rax, (%rcx)
	movq	_progress@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	subq	%r12, %rdi
	movq	%rdi, (%rcx)
	cmpq	$4194304, %rax                  ## imm = 0x400000
	jb	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_dumpsize@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_report_progress
	movq	_counter@GOTPCREL(%rip), %rax
	andq	$4194303, (%rax)                ## imm = 0x3FFFFF
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	_WD_LASTVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wdog_kern_pat
	testq	%r13, %r13
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	callq	_dump_append
	testl	%eax, %eax
	jne	LBB0_10
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=1
	addq	%r12, %r13
	jmp	LBB0_27
LBB0_25:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%rbx, %rdi
	callq	_PHYS_TO_DMAP
	movq	_dump_va@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_fragsz@GOTPCREL(%rip), %rax
	addq	%r12, (%rax)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_blk_flush
	testl	%eax, %eax
	jne	LBB0_10
## %bb.26:                              ##   in Loop: Header=BB0_20 Depth=1
	addq	%r12, %rbx
	xorl	%r13d, %r13d
LBB0_27:                                ##   in Loop: Header=BB0_20 Depth=1
	xorl	%eax, %eax
	callq	_cncheckc
	cmpl	$-1, %eax
	je	LBB0_19
## %bb.28:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpl	$3, %eax
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_20 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_19
LBB0_30:
	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 %#lx\n"

	.comm	_fragsz,8,3                     ## @fragsz
	.comm	_counter,8,3                    ## @counter
	.comm	_progress,8,3                   ## @progress
	.comm	_dumpsize,4,2                   ## @dumpsize
	.comm	_WD_LASTVAL,4,2                 ## @WD_LASTVAL
	.comm	_dump_va,8,3                    ## @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	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MAXDUMPPGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAXDUMPPGS@GOTPAGEOFF]
	ldr	w0, [x0]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x23]
	mul	x1, x9, x8
	bl	_min
	ldr	x8, [x23]
	cmp	x0, #0
	csel	x25, x8, x0, eq
	udiv	x9, x20, x8
	msub	x9, x9, x8, x20
	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	x22, LBB0_9
; %bb.3:
	cbz	x19, 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, x19, x8
	msub	x8, x9, x8, x19
	cbz	x8, LBB0_11
; %bb.10:
	str	x19, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	b	LBB0_6
LBB0_11:
	cbz	x22, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_blk_flush
	cbnz	w0, LBB0_8
LBB0_13:
	cbz	x20, LBB0_26
; %bb.14:
Lloh13:
	adrp	x26, _fragsz@GOTPAGE
Lloh14:
	ldr	x26, [x26, _fragsz@GOTPAGEOFF]
Lloh15:
	adrp	x27, _counter@GOTPAGE
Lloh16:
	ldr	x27, [x27, _counter@GOTPAGEOFF]
Lloh17:
	adrp	x28, _progress@GOTPAGE
Lloh18:
	ldr	x28, [x28, _progress@GOTPAGEOFF]
Lloh19:
	adrp	x23, _WD_LASTVAL@GOTPAGE
Lloh20:
	ldr	x23, [x23, _WD_LASTVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	w0, #0
	sub	x20, x20, x24
	cbz	x20, LBB0_8
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	sub	x8, x25, x8
	cmp	x8, x20
	csel	x24, x8, x20, lo
	ldr	x8, [x27]
	add	x8, x24, x8
	str	x8, [x27]
	ldr	x9, [x28]
	sub	x0, x9, x24
	str	x0, [x28]
	cmp	x8, #1024, lsl #12              ; =4194304
	b.lo	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh21:
	adrp	x8, _dumpsize@GOTPAGE
Lloh22:
	ldr	x8, [x8, _dumpsize@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_report_progress
	ldr	x8, [x27]
	and	x8, x8, #0x3fffff
	str	x8, [x27]
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w0, [x23]
	bl	_wdog_kern_pat
	cbz	x22, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	x3, x24
	bl	_dump_append
	cbnz	w0, LBB0_8
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x22, x22, x24
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x19
	bl	_PHYS_TO_DMAP
Lloh24:
	adrp	x8, _dump_va@GOTPAGE
Lloh25:
	ldr	x8, [x8, _dump_va@GOTPAGEOFF]
Lloh26:
	str	x0, [x8]
	ldr	x8, [x26]
	add	x8, x8, x24
	str	x8, [x26]
	mov	x0, x21
	bl	_blk_flush
	cbnz	w0, LBB0_8
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x22, #0
	add	x19, x24, x19
LBB0_23:                                ;   in Loop: Header=BB0_16 Depth=1
	bl	_cncheckc
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.24:                               ;   in Loop: Header=BB0_16 Depth=1
	cmp	w0, #3
	b.eq	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	b	LBB0_15
LBB0_26:
	mov	w0, #0
	b	LBB0_8
LBB0_27:
Lloh29:
	adrp	x8, _ECANCELED@GOTPAGE
Lloh30:
	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	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.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 %#lx\n"

	.comm	_fragsz,8,3                     ; @fragsz
	.comm	_counter,8,3                    ; @counter
	.comm	_progress,8,3                   ; @progress
	.comm	_dumpsize,4,2                   ; @dumpsize
	.comm	_WD_LASTVAL,4,2                 ; @WD_LASTVAL
	.comm	_dump_va,8,3                    ; @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
