	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_image_copyout_zeroes           ## -- Begin function image_copyout_zeroes
	.p2align	4, 0x90
_image_copyout_zeroes:                  ## @image_copyout_zeroes
	.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	%rsi, %r15
	movl	%edi, %r14d
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_1
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_image_copyout_zeroes.zeroes(%rip), %rdx
	testq	%rdx, %rdx
	jne	LBB0_4
## %bb.2:
	movq	_secsz@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$1, %edi
	callq	_calloc
	movq	%rax, %rdx
	movq	%rax, _image_copyout_zeroes.zeroes(%rip)
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	testq	%r15, %r15
	je	LBB0_8
## %bb.5:
	movq	_secsz@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rbx
	cmpq	%rbx, %r15
	cmovbq	%r15, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_image_copyout_memory
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	subq	%rbx, %r15
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_image_copyout_zeroes.zeroes(%rip), %rdx
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_image_copyout_zeroes.zeroes,8,3 ## @image_copyout_zeroes.zeroes
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_secsz,8,3                      ## @secsz
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_image_copyout_zeroes           ; -- Begin function image_copyout_zeroes
	.p2align	2
_image_copyout_zeroes:                  ; @image_copyout_zeroes
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_lseek
	cmn	w0, #1
	b.eq	LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	adrp	x22, _image_copyout_zeroes.zeroes@PAGE
	ldr	x2, [x22, _image_copyout_zeroes.zeroes@PAGEOFF]
	cbnz	x2, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _secsz@GOTPAGE
Lloh4:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	mov	w0, #1
	bl	_calloc
	mov	x2, x0
	str	x0, [x22, _image_copyout_zeroes.zeroes@PAGEOFF]
	cbz	x0, LBB0_10
LBB0_5:
	cbz	x19, LBB0_1
; %bb.6:
Lloh6:
	adrp	x23, _secsz@GOTPAGE
Lloh7:
	ldr	x23, [x23, _secsz@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cmp	x19, x8
	csel	x21, x19, x8, lo
	mov	x0, x20
	mov	x1, x21
	bl	_image_copyout_memory
	cbnz	w0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	subs	x19, x19, x21
	b.eq	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x2, [x22, _image_copyout_zeroes.zeroes@PAGEOFF]
	b	LBB0_7
LBB0_10:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_image_copyout_zeroes.zeroes,8,3 ; @image_copyout_zeroes.zeroes
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_secsz,8,3                      ; @secsz
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
