	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function image_copyin_mapped
_image_copyin_mapped:                   ## @image_copyin_mapped
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%esi, %edi
	xorl	%esi, %esi
	callq	_lseek
	cmpq	$-1, %rax
	je	LBB0_32
## %bb.1:
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_dup
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	jle	LBB0_28
## %bb.4:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	_secsz@GOTPCREL(%rip), %rcx
	movq	_image_swap_pgsz@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imulq	(%rcx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	_SEEK_HOLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_lseek
	movq	%rax, %r13
	cmpq	$-1, %rax
	cmoveq	%r12, %r13
	movq	_SEEK_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_lseek
	movq	%rax, %rsi
	cmpq	$-1, %rax
	cmoveq	%r12, %rsi
	movq	%r13, %rax
	xorq	%r12, %rax
	movq	%rsi, %rcx
	xorq	%r12, %rcx
	orq	%rax, %rcx
	cmoveq	%rbx, %rsi
	cmpq	%r13, %rbx
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r13, %rsi
	jle	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_secsz@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, %rdx
	negq	%rdx
	andq	%rsi, %rdx
	movq	%rdx, %rbx
	subq	%r14, %rbx
	movq	%rbx, %rax
	orq	%rcx, %rax
	movq	%rsi, %r12
	movq	%rdx, %r14
	shrq	$32, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rsi, %rbx
	jne	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rsi, %r13
	jle	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_secsz@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r13), %rax
	decq	%rax
	negq	%rbx
	andq	%rax, %rbx
	cmpq	%r14, %rbx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	jg	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	addq	%rax, %r15
	addq	%rbx, -56(%rbp)                 ## 8-byte Folded Spill
	addq	%rbx, %r14
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%r14, %rbx
	jle	LBB0_22
LBB0_15:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	subq	%r14, %rbx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rbx
	cmovgeq	%rax, %rbx
	movl	%r12d, %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	leaq	-104(%rbp), %rcx
	callq	_image_file_map
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%rax, %r13
	movq	-104(%rbp), %rsi
	addq	%rax, %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movl	%r12d, %r8d
	callq	_image_chunk_copyin
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_image_file_unmap
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	_secsz@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%edi, %edi
	callq	_assert
	xorl	%eax, %eax
	movq	%rbx, %rcx
	movq	%r14, %rbx
	jmp	LBB0_24
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	%rax, %r15
	movq	%r15, %rdi
	callq	_image_chunk_skipto
	addq	%rbx, -56(%rbp)                 ## 8-byte Folded Spill
	movq	%r14, %rbx
	movq	%r12, %rcx
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%eax, %eax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %r14
	movq	%rcx, %rbx
	cmpq	%r12, %rcx
	jl	LBB0_5
	jmp	LBB0_26
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_24
LBB0_32:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_image_copyin_stream            ## TAILCALL
LBB0_26:
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_28
## %bb.27:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movl	%ebx, %eax
	jmp	LBB0_31
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_31
LBB0_28:
	testq	%r14, %r14
	je	LBB0_30
## %bb.29:
	movq	%rax, (%r14)
LBB0_30:
	xorl	%eax, %eax
LBB0_31:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_errno,4,2                      ## @errno
	.comm	_secsz,8,3                      ## @secsz
	.comm	_image_swap_pgsz,8,3            ## @image_swap_pgsz
	.comm	_SEEK_HOLE,4,2                  ## @SEEK_HOLE
	.comm	_SEEK_DATA,4,2                  ## @SEEK_DATA
	.no_dead_strip	_image_copyin_mapped
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function image_copyin_mapped
_image_copyin_mapped:                   ; @image_copyin_mapped
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	x1, #0
	bl	_lseek
	cmn	x0, #1
	b.eq	LBB0_20
; %bb.1:
	mov	x26, x0
	mov	x0, x22
	bl	_dup
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.2:
	cmp	x26, #1
	b.lt	LBB0_22
; %bb.3:
	mov	x22, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x27, #0
	mov	x23, #0
	mov	x24, #0
Lloh3:
	adrp	x8, _secsz@GOTPAGE
Lloh4:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _image_swap_pgsz@GOTPAGE
Lloh7:
	ldr	x9, [x9, _image_swap_pgsz@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	mul	x19, x9, x8
	str	x26, [sp, #16]                  ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
Lloh9:
	adrp	x8, _SEEK_HOLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEEK_HOLE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x24
	bl	_lseek
	cmn	x0, #1
	csel	x28, x26, x0, eq
Lloh12:
	adrp	x8, _SEEK_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SEEK_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x24
	bl	_lseek
	cmn	x0, #1
	csel	x8, x26, x0, eq
	cmp	x8, x26
	ccmp	x28, x26, #0, eq
	csel	x21, x24, x8, eq
	cmp	x24, x28
	ccmp	x21, x28, #4, eq
	b.gt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x24, x21
	ccmp	x28, x21, #4, eq
	b.gt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #0
	bl	_assert
	mov	w25, #0
	b	LBB0_16
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x8, _secsz@GOTPAGE
Lloh16:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	neg	x9, x8
	and	x26, x21, x9
	sub	x23, x26, x23
	sdiv	x8, x23, x8
	add	x20, x8, x20
	mov	x0, x20
	bl	_image_chunk_skipto
	mov	x25, x0
	add	x27, x23, x27
	mov	x24, x21
	mov	x23, x26
	b	LBB0_15
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x8, _secsz@GOTPAGE
Lloh19:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x9, x28, x8
	sub	x9, x9, #1
	neg	x8, x8
	and	x21, x9, x8
	cmp	x21, x23
	b.gt	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
	mov	x24, x28
	mov	x23, x21
	b	LBB0_16
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=2
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w25, [x8]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
Lloh24:
	adrp	x8, _secsz@GOTPAGE
Lloh25:
	ldr	x8, [x8, _secsz@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	udiv	x8, x24, x8
	add	x20, x8, x20
	add	x27, x24, x27
	add	x23, x24, x23
	cmp	x21, x23
	b.le	LBB0_14
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	x8, x21, x23
	cmp	x8, x19
	csel	x24, x8, x19, lt
	add	x3, sp, #24
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_image_file_map
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x26, x0
	ldr	x8, [sp, #24]
	add	x1, x0, x8
	mov	x0, x20
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	bl	_image_chunk_copyin
	mov	x25, x0
	mov	x0, x26
	mov	x1, x24
	bl	_image_file_unmap
	b	LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x28
	mov	x23, x21
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w25, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x24, x26
	b.lt	LBB0_4
LBB0_18:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	cbz	w25, LBB0_23
; %bb.19:
	mov	x0, x22
	bl	_close
	b	LBB0_25
LBB0_20:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_image_copyin_stream
LBB0_21:
Lloh27:
	adrp	x8, _errno@GOTPAGE
Lloh28:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh29:
	ldr	w25, [x8]
	b	LBB0_25
LBB0_22:
	mov	x27, #0
LBB0_23:
	mov	w25, #0
	cbz	x19, LBB0_25
; %bb.24:
	str	x27, [x19]
LBB0_25:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_errno,4,2                      ; @errno
	.comm	_secsz,8,3                      ; @secsz
	.comm	_image_swap_pgsz,8,3            ; @image_swap_pgsz
	.comm	_SEEK_HOLE,4,2                  ; @SEEK_HOLE
	.comm	_SEEK_DATA,4,2                  ; @SEEK_DATA
	.no_dead_strip	_image_copyin_mapped
.subsections_via_symbols
