	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_winzip_aes_encryption
_init_winzip_aes_encryption:            ## @init_winzip_aes_encryption
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	%rsp, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r14
	movq	_MAX_DERIVED_KEY_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rdi
	callq	___archive_write_get_passphrase
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	movq	(%r14), %rax
	movq	_ENCRYPTION_WINZIP_AES128@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	setne	%bl
	movq	%r14, -144(%rbp)                ## 8-byte Spill
	leaq	8(,%rbx,8), %r14
	leaq	-128(%rbp), %rdi
	movq	%r14, %rsi
	callq	_archive_random
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.4:
	shlq	$4, %rbx
	addq	$16, %rbx
	movq	%r13, %rdi
	callq	_strlen
	leaq	(%rbx,%rbx), %r10
	movq	%r10, -152(%rbp)                ## 8-byte Spill
	orq	$2, %r10
	subq	$8, %rsp
	leaq	-128(%rbp), %rdx
	movq	%r13, %rdi
	movl	%eax, %esi
	movq	%r14, %rcx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movq	%r15, %r9
	pushq	%r10
	callq	_archive_pbkdf2_sha1
	addq	$16, %rsp
	movq	-144(%rbp), %rax                ## 8-byte Reload
	leaq	24(%rax), %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_archive_encrypto_aes_ctr_init
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_6
LBB0_1:
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_3:
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	movq	-144(%rbp), %rax                ## 8-byte Reload
	leaq	28(%rax), %rdi
	leaq	(%r15,%rbx,4), %rsi
	movq	%rbx, %rdx
	callq	_archive_hmac_sha1_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_archive_encrypto_aes_ctr_release
	movq	_ARCHIVE_ERRNO_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
LBB0_6:
	movq	%r12, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FAILED@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movq	-136(%rbp), %rbx                ## 8-byte Reload
LBB0_12:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	-144(%rbp), %r13                ## 8-byte Reload
	movq	-152(%rbp), %rdx                ## 8-byte Reload
	movl	(%r15,%rdx,4), %eax
	shlq	$2, %rdx
	leaq	(,%r14,4), %rcx
	movl	%eax, -128(%rbp,%r14,4)
	orq	$4, %rdx
	movl	(%r15,%rdx), %eax
	orq	$4, %rcx
	movl	%eax, -128(%rbp,%rcx)
	orq	$2, %r14
	leaq	-128(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	___archive_write_output
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	jne	LBB0_12
## %bb.11:
	movdqu	8(%r13), %xmm0
	movq	%r14, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 8(%r13)
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_DERIVED_KEY_BUF_SIZE,4,2   ## @MAX_DERIVED_KEY_BUF_SIZE
	.comm	_ARCHIVE_ERRNO_MISC,4,2         ## @ARCHIVE_ERRNO_MISC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Encryption needs passphrase"

	.comm	_ARCHIVE_FAILED,4,2             ## @ARCHIVE_FAILED
	.comm	_ENCRYPTION_WINZIP_AES128,8,3   ## @ENCRYPTION_WINZIP_AES128
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
L_.str.1:                               ## @.str.1
	.asciz	"Can't generate random number for encryption"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
L_.str.2:                               ## @.str.2
	.asciz	"Decryption is unsupported due to lack of crypto library"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to initialize HMAC-SHA1"

	.no_dead_strip	_init_winzip_aes_encryption
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_winzip_aes_encryption
_init_winzip_aes_encryption:            ; @init_winzip_aes_encryption
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #80
	mov	x19, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x25, [x0, #8]
Lloh3:
	adrp	x8, _MAX_DERIVED_KEY_BUF_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_DERIVED_KEY_BUF_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	___archive_write_get_passphrase
	cbz	x0, LBB0_4
; %bb.1:
	mov	x23, x0
	ldr	x8, [x25]
Lloh8:
	adrp	x9, _ENCRYPTION_WINZIP_AES128@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ENCRYPTION_WINZIP_AES128@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	mov	w10, #16
	mov	w11, #8
	cmp	x8, x9
	csel	x21, x11, x10, eq
	mov	w8, #32
	csel	x22, x10, x8, eq
	sub	x0, x29, #160
	mov	x1, x21
	bl	_archive_random
Lloh11:
	adrp	x26, _ARCHIVE_OK@GOTPAGE
Lloh12:
	ldr	x26, [x26, _ARCHIVE_OK@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x23
	bl	_strlen
	mov	x1, x0
	lsl	x27, x22, #1
	orr	x6, x27, #0x2
	sub	x2, x29, #160
	mov	x0, x23
	mov	x3, x21
	mov	w4, #1000
	mov	x5, x20
	bl	_archive_pbkdf2_sha1
	add	x23, x25, #24
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	bl	_archive_encrypto_aes_ctr_init
	cbz	w0, LBB0_10
; %bb.3:
Lloh13:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh18:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_archive_set_error
Lloh23:
	adrp	x8, _ARCHIVE_FAILED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ARCHIVE_FAILED@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh25:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str.1@PAGE
Lloh29:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
Lloh30:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	mov	sp, x24
	ldur	x8, [x29, #-88]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.9:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	add	x0, x25, #28
	add	x1, x20, x22, lsl #2
	mov	x2, x22
	bl	_archive_hmac_sha1_init
	cbz	w0, LBB0_12
; %bb.11:
	mov	x0, x23
	bl	_archive_encrypto_aes_ctr_release
Lloh35:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x2, l_.str.3@PAGE
Lloh39:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_12:
	lsl	x8, x27, #2
	lsl	x9, x21, #2
	ldr	d0, [x20, x8]
	sub	x8, x29, #160
	str	d0, [x8, x9]
	orr	x20, x21, #0x2
	sub	x1, x29, #160
	mov	x0, x19
	mov	x2, x20
	bl	___archive_write_output
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.13:
	ldur	q0, [x25, #8]
	dup.2d	v1, x20
	add.2d	v0, v0, v1
	stur	q0, [x25, #8]
	b	LBB0_8
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_DERIVED_KEY_BUF_SIZE,4,2   ; @MAX_DERIVED_KEY_BUF_SIZE
	.comm	_ARCHIVE_ERRNO_MISC,4,2         ; @ARCHIVE_ERRNO_MISC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Encryption needs passphrase"

	.comm	_ARCHIVE_FAILED,4,2             ; @ARCHIVE_FAILED
	.comm	_ENCRYPTION_WINZIP_AES128,8,3   ; @ENCRYPTION_WINZIP_AES128
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
l_.str.1:                               ; @.str.1
	.asciz	"Can't generate random number for encryption"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
l_.str.2:                               ; @.str.2
	.asciz	"Decryption is unsupported due to lack of crypto library"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to initialize HMAC-SHA1"

	.no_dead_strip	_init_winzip_aes_encryption
.subsections_via_symbols
