	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function archive_write_zip_data
_archive_write_zip_data:                ## @archive_write_zip_data
	.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, %rbx
	movq	8(%rdi), %r13
	movq	(%r13), %rax
	cmpq	%rdx, %rax
	cmovlq	%rax, %rbx
	addq	%rbx, 8(%r13)
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_ZIP_ENTRY_FLAG_ENCRYPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r13)
	je	LBB0_9
## %bb.2:
	movl	20(%r13), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_7
## %bb.3:
	cmpl	$0, 28(%r13)
	jne	LBB0_9
## %bb.4:
	movq	%r15, %rdi
	callq	_init_winzip_aes_encryption
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.5:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 28(%r13)
	cmpl	$131, 36(%r13)
	je	LBB0_10
LBB0_28:
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %eax
	jmp	LBB0_30
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_30
LBB0_7:
	cmpl	$130, %eax
	jne	LBB0_9
## %bb.8:
	cmpl	$0, 24(%r13)
	je	LBB0_26
LBB0_9:
	cmpl	$131, 36(%r13)
	jne	LBB0_28
LBB0_10:
	movl	24(%r13), %eax
	testl	%eax, %eax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_12
## %bb.11:
	cmpl	$0, 28(%r13)
	je	LBB0_20
LBB0_12:
	leaq	(%r14,%rbx), %r12
	cmpq	%r14, %r12
	jbe	LBB0_22
## %bb.13:
	leaq	136(%r13), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	132(%r13), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	128(%r13), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:
	movl	%r12d, %edx
	subl	%r14d, %edx
	movq	40(%r13), %rcx
	movq	48(%r13), %r8
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_trad_enc_encrypt_update
	movq	%rax, %rdx
	movq	%rax, -48(%rbp)
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:
	movq	48(%r13), %rax
	movq	%rax, -48(%rbp)
	movl	%r12d, %edx
	subl	%r14d, %edx
	movq	40(%r13), %rcx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	leaq	-48(%rbp), %r8
	callq	_archive_encrypto_aes_ctr_update
	testl	%eax, %eax
	js	LBB0_31
## %bb.16:
	movq	40(%r13), %rsi
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_archive_hmac_sha1_update
	movq	-48(%rbp), %rdx
LBB0_17:
	movq	40(%r13), %rsi
	movq	%r15, %rdi
	callq	___archive_write_output
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.18:
	movq	-48(%rbp), %rax
	movdqu	56(%r13), %xmm0
	movq	%rax, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 56(%r13)
	addq	%rax, %r14
	cmpq	%r12, %r14
	jae	LBB0_22
## %bb.19:
	movl	24(%r13), %eax
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_15
LBB0_20:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	___archive_write_output
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.21:
	movdqu	56(%r13), %xmm0
	movq	%rbx, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 56(%r13)
LBB0_22:
	subq	%rbx, (%r13)
	cmpl	$0, 28(%r13)
	je	LBB0_24
## %bb.23:
	movq	72(%r13), %rax
	movq	_AES_VENDOR_AE_2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_25
LBB0_24:
	movl	80(%r13), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	*88(%r13)
	movl	%eax, 80(%r13)
LBB0_25:
	movl	%ebx, %eax
LBB0_30:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	%r15, %rdi
	callq	_init_traditional_pkware_encryption
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.27:
	movl	$1, 24(%r13)
	cmpl	$131, 36(%r13)
	je	LBB0_10
	jmp	LBB0_28
LBB0_31:
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_ZIP_ENTRY_FLAG_ENCRYPTED,4,2   ## @ZIP_ENTRY_FLAG_ENCRYPTED
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.comm	_ARCHIVE_ERRNO_MISC,4,2         ## @ARCHIVE_ERRNO_MISC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to encrypt file"

	.comm	_ARCHIVE_FAILED,4,2             ## @ARCHIVE_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Invalid ZIP compression type"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_AES_VENDOR_AE_2,8,3            ## @AES_VENDOR_AE_2
	.comm	_Z_NO_FLUSH,4,2                 ## @Z_NO_FLUSH
	.comm	_Z_STREAM_ERROR,4,2             ## @Z_STREAM_ERROR
	.no_dead_strip	_archive_write_zip_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function archive_write_zip_data
_archive_write_zip_data:                ; @archive_write_zip_data
	.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
	ldr	x26, [x0, #8]
	ldp	x8, x9, [x26]
	cmp	x8, x2
	csel	x19, x8, x2, lt
	add	x8, x9, x19
	str	x8, [x26, #8]
	cbz	x19, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x26, #16]
Lloh0:
	adrp	x9, _ZIP_ENTRY_FLAG_ENCRYPTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ZIP_ENTRY_FLAG_ENCRYPTED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.2:
	ldr	w8, [x26, #20]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_7
; %bb.3:
	ldr	w8, [x26, #28]
	cbnz	w8, LBB0_11
; %bb.4:
	mov	x0, x21
	bl	_init_winzip_aes_encryption
Lloh3:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.5:
	movi.2s	v0, #1
	stur	d0, [x26, #28]
	b	LBB0_11
LBB0_6:
	mov	w0, #0
	b	LBB0_29
LBB0_7:
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.8:
	ldr	w8, [x26, #24]
	cbnz	w8, LBB0_11
; %bb.9:
	mov	x0, x21
	bl	_init_traditional_pkware_encryption
Lloh6:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.10:
	mov	w8, #1
	str	w8, [x26, #24]
LBB0_11:
	ldr	w8, [x26, #36]
	cmp	w8, #131
	b.ne	LBB0_22
; %bb.12:
	ldr	w8, [x26, #24]
	cbnz	w8, LBB0_14
; %bb.13:
	ldr	w9, [x26, #28]
	cbz	w9, LBB0_23
LBB0_14:
	add	x27, x20, x19
	cmp	x27, x20
	b.ls	LBB0_25
; %bb.15:
	add	x22, x26, #136
	add	x23, x26, #132
	add	x24, x26, #128
Lloh9:
	adrp	x28, _ARCHIVE_OK@GOTPAGE
Lloh10:
	ldr	x28, [x28, _ARCHIVE_OK@GOTPAGEOFF]
	mov	x25, x20
	cbz	w8, LBB0_17
LBB0_16:
	sub	w2, w27, w25
	ldp	x3, x4, [x26, #40]
	mov	x0, x22
	mov	x1, x25
	bl	_trad_enc_encrypt_update
	mov	x2, x0
	str	x0, [sp, #8]
	b	LBB0_19
LBB0_17:
	ldp	x3, x8, [x26, #40]
	str	x8, [sp, #8]
	sub	w2, w27, w25
	add	x4, sp, #8
	mov	x0, x23
	mov	x1, x25
	bl	_archive_encrypto_aes_ctr_update
	tbnz	w0, #31, LBB0_30
; %bb.18:
	ldr	x1, [x26, #40]
	ldr	x2, [sp, #8]
	mov	x0, x24
	bl	_archive_hmac_sha1_update
	ldr	x2, [sp, #8]
LBB0_19:
	ldr	x1, [x26, #40]
	mov	x0, x21
	bl	___archive_write_output
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.20:
	ldr	x8, [sp, #8]
	ldur	q0, [x26, #56]
	dup.2d	v1, x8
	add.2d	v0, v0, v1
	stur	q0, [x26, #56]
	add	x25, x25, x8
	cmp	x25, x27
	b.hs	LBB0_25
; %bb.21:
	ldr	w8, [x26, #24]
	cbnz	w8, LBB0_16
	b	LBB0_17
LBB0_22:
Lloh11:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_archive_set_error
Lloh16:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	b	LBB0_29
LBB0_23:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	___archive_write_output
Lloh19:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.24:
	ldur	q0, [x26, #56]
	dup.2d	v1, x19
	add.2d	v0, v0, v1
	stur	q0, [x26, #56]
LBB0_25:
	ldr	x8, [x26]
	sub	x8, x8, x19
	str	x8, [x26]
	ldr	w8, [x26, #28]
	cbz	w8, LBB0_27
; %bb.26:
	ldr	x8, [x26, #72]
Lloh22:
	adrp	x9, _AES_VENDOR_AE_2@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AES_VENDOR_AE_2@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_28
LBB0_27:
	ldr	x8, [x26, #88]
	ldr	w0, [x26, #80]
	mov	x1, x20
	mov	x2, x19
	blr	x8
	str	w0, [x26, #80]
LBB0_28:
	mov	x0, x19
LBB0_29:
	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
LBB0_30:
Lloh25:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str@PAGE
Lloh29:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_archive_set_error
Lloh30:
	adrp	x8, _ARCHIVE_FAILED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ARCHIVE_FAILED@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	b	LBB0_29
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ZIP_ENTRY_FLAG_ENCRYPTED,4,2   ; @ZIP_ENTRY_FLAG_ENCRYPTED
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.comm	_ARCHIVE_ERRNO_MISC,4,2         ; @ARCHIVE_ERRNO_MISC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to encrypt file"

	.comm	_ARCHIVE_FAILED,4,2             ; @ARCHIVE_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Invalid ZIP compression type"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_AES_VENDOR_AE_2,8,3            ; @AES_VENDOR_AE_2
	.comm	_Z_NO_FLUSH,4,2                 ; @Z_NO_FLUSH
	.comm	_Z_STREAM_ERROR,4,2             ; @Z_STREAM_ERROR
	.no_dead_strip	_archive_write_zip_data
.subsections_via_symbols
