	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__zip_file_replace              ## -- Begin function _zip_file_replace
	.p2align	4, 0x90
__zip_file_replace:                     ## @_zip_file_replace
	.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
	movl	%r8d, %r12d
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_ZIP_IS_RDONLY
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	addq	$16, %r14
	movq	_ZIP_ER_RDONLY@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	__zip_error_set
	movl	$-1, %ebx
	jmp	LBB0_20
LBB0_3:
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ZIP_UINT64_MAX@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_9
## %bb.4:
	movq	_ZIP_FL_OVERWRITE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	__zip_name_locate
	cmpl	$-1, %eax
	jne	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	callq	__zip_add_entry
	testl	%eax, %eax
	js	LBB0_7
LBB0_8:
	movslq	%eax, %r15
LBB0_9:
	testq	%r13, %r13
	je	LBB0_13
## %bb.10:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	callq	__zip_set_name
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movl	$-1, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	cmpq	%r12, (%r14)
	je	LBB0_20
## %bb.12:
	leaq	(%r15,%r15,2), %rdi
	shlq	$3, %rdi
	addq	8(%r14), %rdi
	callq	__zip_entry_finalize
	movq	%r12, (%r14)
	jmp	LBB0_20
LBB0_13:
	movq	%rbx, %r12
	leaq	(,%r15,8), %rax
	leaq	(%rax,%rax,2), %rbx
	movq	8(%r14), %rdi
	addq	%rbx, %rdi
	callq	__zip_unchange_data
	movq	8(%r14), %rcx
	movq	16(%rcx,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.14:
	leaq	(%r15,%r15,2), %rbx
	movq	8(%rcx,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	(%rax), %edx
	movq	_ZIP_DIRENT_COMP_METHOD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%edx, %esi
	jne	LBB0_19
	jmp	LBB0_18
LBB0_16:
	callq	__zip_dirent_clone
	movq	8(%r14), %rcx
	movq	%rax, 8(%rcx,%rbx,8)
	testq	%rax, %rax
	je	LBB0_21
## %bb.17:
	movq	_ZIP_DIRENT_COMP_METHOD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%rax), %edx
LBB0_18:
	orl	%esi, %edx
	movq	_ZIP_CM_REPLACED_DEFAULT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 4(%rax)
	movl	%edx, (%rax)
LBB0_19:
	leaq	(%r15,%r15,2), %rax
	movq	%r12, (%rcx,%rax,8)
	movl	%r15d, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$-1, %ebx
	jmp	LBB0_20
LBB0_21:
	addq	$16, %r14
	movq	_ZIP_ER_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_ZIP_ER_RDONLY,4,2              ## @ZIP_ER_RDONLY
	.comm	_ZIP_UINT64_MAX,8,3             ## @ZIP_UINT64_MAX
	.comm	_ZIP_FL_OVERWRITE,4,2           ## @ZIP_FL_OVERWRITE
	.comm	_ZIP_DIRENT_COMP_METHOD,4,2     ## @ZIP_DIRENT_COMP_METHOD
	.comm	_ZIP_ER_MEMORY,4,2              ## @ZIP_ER_MEMORY
	.comm	_ZIP_CM_REPLACED_DEFAULT,4,2    ## @ZIP_CM_REPLACED_DEFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__zip_file_replace              ; -- Begin function _zip_file_replace
	.p2align	2
__zip_file_replace:                     ; @_zip_file_replace
	.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	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	bl	_ZIP_IS_RDONLY
	cbz	x0, LBB0_3
; %bb.1:
	add	x0, x21, #16
Lloh0:
	adrp	x8, _ZIP_ER_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ZIP_ER_RDONLY@GOTPAGEOFF]
LBB0_2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	__zip_error_set
	mov	w20, #-1
	b	LBB0_20
LBB0_3:
	ldr	x24, [x21]
Lloh2:
	adrp	x8, _ZIP_UINT64_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ZIP_UINT64_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_8
; %bb.4:
Lloh5:
	adrp	x8, _ZIP_FL_OVERWRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ZIP_FL_OVERWRITE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	mov	x3, #0
	bl	__zip_name_locate
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.ne	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	__zip_add_entry
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_11
LBB0_7:
	sxtw	x20, w0
LBB0_8:
	cbz	x23, LBB0_12
; %bb.9:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	__zip_set_name
	cbz	x0, LBB0_12
; %bb.10:
	ldr	x8, [x21]
	cmp	x8, x24
	b.ne	LBB0_15
LBB0_11:
	mov	w20, #-1
	b	LBB0_20
LBB0_12:
	ldr	x8, [x21, #8]
	add	x9, x20, x20, lsl #1
	lsl	x22, x9, #3
	add	x0, x8, x22
	bl	__zip_unchange_data
	ldr	x9, [x21, #8]
	add	x8, x9, x22
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_19
; %bb.13:
	mov	w10, #24
	madd	x10, x20, x10, x9
	ldr	x0, [x10, #8]
	cbz	x0, LBB0_16
; %bb.14:
	ldr	w8, [x0]
Lloh8:
	adrp	x10, _ZIP_DIRENT_COMP_METHOD@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ZIP_DIRENT_COMP_METHOD@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w8
	b.ne	LBB0_19
	b	LBB0_18
LBB0_15:
	ldr	x8, [x21, #8]
	mov	w9, #24
	madd	x0, x20, x9, x8
	bl	__zip_entry_finalize
	str	x24, [x21]
	mov	w20, #-1
	b	LBB0_20
LBB0_16:
	mov	x0, x8
	bl	__zip_dirent_clone
	ldr	x9, [x21, #8]
	mov	w8, #24
	madd	x8, x20, x8, x9
	str	x0, [x8, #8]
	cbz	x0, LBB0_21
; %bb.17:
Lloh11:
	adrp	x8, _ZIP_DIRENT_COMP_METHOD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ZIP_DIRENT_COMP_METHOD@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x8]
	ldr	w8, [x0]
LBB0_18:
Lloh14:
	adrp	x11, _ZIP_CM_REPLACED_DEFAULT@GOTPAGE
Lloh15:
	ldr	x11, [x11, _ZIP_CM_REPLACED_DEFAULT@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	orr	w8, w8, w10
	stp	w8, w11, [x0]
LBB0_19:
	mov	w8, #24
	mul	x8, x20, x8
	str	x19, [x9, x8]
LBB0_20:
	mov	x0, x20
	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_21:
	add	x0, x21, #16
Lloh17:
	adrp	x8, _ZIP_ER_MEMORY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ZIP_ER_MEMORY@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ZIP_ER_RDONLY,4,2              ; @ZIP_ER_RDONLY
	.comm	_ZIP_UINT64_MAX,8,3             ; @ZIP_UINT64_MAX
	.comm	_ZIP_FL_OVERWRITE,4,2           ; @ZIP_FL_OVERWRITE
	.comm	_ZIP_DIRENT_COMP_METHOD,4,2     ; @ZIP_DIRENT_COMP_METHOD
	.comm	_ZIP_ER_MEMORY,4,2              ; @ZIP_ER_MEMORY
	.comm	_ZIP_CM_REPLACED_DEFAULT,4,2    ; @ZIP_CM_REPLACED_DEFAULT
.subsections_via_symbols
