	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function image_copyin_stream
_image_copyin_stream:                   ## @image_copyin_stream
	.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	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%edi, %r12d
	movq	_secsz@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_image_swap_pgsz@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r14
	imulq	%rax, %r14
	xorl	%ebx, %ebx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	js	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_image_file_unmap
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r14d, %rax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	addq	%rax, %rbx
	movq	_secsz@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	(%r14,%rcx), %eax
	decl	%eax
	cltd
	idivl	%ecx
	addl	%eax, %r12d
	testl	%r14d, %r14d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_10
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_image_swap_alloc
	cmpq	$-1, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	_image_swap_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	leaq	-64(%rbp), %rcx
	callq	_image_file_map
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r13
	movq	-64(%rbp), %rsi
	addq	%rax, %rsi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rdx
	callq	_read
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rsi
	addq	%r13, %rsi
	movq	_image_swap_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r12d, %edi
	movl	%r14d, %edx
	movq	%r15, %rcx
	callq	_image_chunk_copyin
	movl	%eax, %r15d
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_image_file_unmap
	testl	%r15d, %r15d
	je	LBB0_9
	jmp	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_8
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_12
LBB0_10:
	xorl	%r15d, %r15d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, (%rax)
LBB0_12:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_secsz,4,2                      ## @secsz
	.comm	_image_swap_pgsz,4,2            ## @image_swap_pgsz
	.comm	_errno,4,2                      ## @errno
	.comm	_image_swap_fd,4,2              ## @image_swap_fd
	.no_dead_strip	_image_copyin_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function image_copyin_stream
_image_copyin_stream:                   ; @image_copyin_stream
	.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
	str	x2, [sp]                        ; 8-byte Folded Spill
	mov	x20, x1
	mov	x21, x0
	mov	x26, #0
Lloh0:
	adrp	x27, _secsz@GOTPAGE
Lloh1:
	ldr	x27, [x27, _secsz@GOTPAGEOFF]
	ldrsw	x8, [x27]
Lloh2:
	adrp	x9, _image_swap_pgsz@GOTPAGE
Lloh3:
	ldr	x9, [x9, _image_swap_pgsz@GOTPAGEOFF]
Lloh4:
	ldrsw	x9, [x9]
	mul	x22, x9, x8
Lloh5:
	adrp	x19, _image_swap_fd@GOTPAGE
Lloh6:
	ldr	x19, [x19, _image_swap_fd@GOTPAGEOFF]
Lloh7:
	adrp	x28, _errno@GOTPAGE
Lloh8:
	ldr	x28, [x28, _errno@GOTPAGEOFF]
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	tbnz	w23, #31, LBB0_9
; %bb.2:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x22
	bl	_image_file_unmap
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, w23, sxtw
	ldr	w8, [x27]
	add	w9, w23, w8
	sub	w9, w9, #1
	sdiv	w8, w9, w8
	add	w21, w8, w21
	cmp	w23, #0
	b.le	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_image_swap_alloc
	cmn	x0, #1
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	ldr	w0, [x19]
	add	x3, sp, #8
	mov	x1, x25
	mov	x2, x22
	bl	_image_file_map
	cbz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	ldr	x8, [sp, #8]
	add	x1, x0, x8
	mov	x0, x20
	mov	x2, x22
	bl	_read
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
	add	x1, x24, x8
	ldr	w4, [x19]
	mov	x0, x21
	mov	x2, x23
	mov	x3, x25
	bl	_image_chunk_copyin
	mov	x25, x0
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x22
	bl	_image_file_unmap
	cbz	w25, LBB0_3
	b	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w25, [x28]
	b	LBB0_8
LBB0_10:
	ldr	w25, [x28]
	b	LBB0_14
LBB0_11:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cbz	x8, LBB0_13
; %bb.12:
	mov	w25, #0
	str	x26, [x8]
	b	LBB0_14
LBB0_13:
	mov	w25, #0
LBB0_14:
	mov	x0, x25
	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
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_secsz,4,2                      ; @secsz
	.comm	_image_swap_pgsz,4,2            ; @image_swap_pgsz
	.comm	_errno,4,2                      ; @errno
	.comm	_image_swap_fd,4,2              ; @image_swap_fd
	.no_dead_strip	_image_copyin_stream
.subsections_via_symbols
