	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function image_copyout_file
_image_copyout_file:                    ## @image_copyout_file
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	%rcx, %r12
	movq	%rsi, %rbx
	movq	_secsz@GOTPCREL(%rip), %rax
	movq	_image_swap_pgsz@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imulq	(%rax), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %rbx
	cmovbq	%rbx, %r14
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	movq	%r14, %rdx
	leaq	-64(%rbp), %rcx
	callq	_image_file_map
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	-64(%rbp), %rdx
	addq	%rax, %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	callq	_image_copyout_memory
	movl	%eax, %r15d
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_image_file_unmap
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r14, %r12
	subq	%r14, %rbx
	jne	LBB0_2
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_5:
	movl	%r15d, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_secsz,8,3                      ## @secsz
	.comm	_image_swap_pgsz,8,3            ## @image_swap_pgsz
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_image_copyout_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function image_copyout_file
_image_copyout_file:                    ; @image_copyout_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x1, LBB0_5
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _secsz@GOTPAGE
Lloh1:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _image_swap_pgsz@GOTPAGE
Lloh4:
	ldr	x9, [x9, _image_swap_pgsz@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mul	x26, x9, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x21, x26
	csel	x23, x21, x26, lo
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_image_file_map
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	ldr	x8, [sp, #8]
	add	x2, x0, x8
	mov	x0, x22
	mov	x1, x23
	bl	_image_copyout_memory
	mov	x24, x0
	mov	x0, x25
	mov	x1, x23
	bl	_image_file_unmap
	cbnz	w24, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x23, x19
	subs	x21, x21, x23
	b.ne	LBB0_2
LBB0_5:
	mov	w24, #0
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
LBB0_7:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_secsz,8,3                      ; @secsz
	.comm	_image_swap_pgsz,8,3            ; @image_swap_pgsz
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_image_copyout_file
.subsections_via_symbols
