	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_traditional_pkware_encryption
_init_traditional_pkware_encryption:    ## @init_traditional_pkware_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	$24, %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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_TRAD_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	(,%r13,4), %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r12, %rdi
	callq	___archive_write_get_passphrase
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	leal	-1(,%r13,4), %esi
	movq	%r15, %rdi
	callq	_archive_random
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	leaq	8(%r14), %r13
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rbx
	movq	_TRAD_HEADER_SIZE@GOTPCREL(%rip), %r14
	movl	%eax, %edx
	callq	_trad_enc_init
	movl	12(%rbx), %eax
	movslq	(%r14), %rdx
	movl	%eax, -4(%r15,%rdx,4)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	%edx, %r8d
	callq	_trad_enc_encrypt_update
	movl	(%r14), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	___archive_write_output
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.3:
	movl	(%r14), %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addl	%ecx, (%rdx)
	movl	(%r14), %ecx
	addl	%ecx, 4(%rdx)
	jmp	LBB0_7
LBB0_4:
	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
	jmp	LBB0_6
LBB0_5:
	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
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TRAD_HEADER_SIZE,4,2           ## @TRAD_HEADER_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	_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
	.no_dead_strip	_init_traditional_pkware_encryption
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_traditional_pkware_encryption
_init_traditional_pkware_encryption:    ; @init_traditional_pkware_encryption
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x24, [x0, #8]
Lloh3:
	adrp	x25, _TRAD_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _TRAD_HEADER_SIZE@GOTPAGEOFF]
	ldr	w23, [x25]
	lsl	x8, x23, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x20, x8, x12
	mov	sp, x20
	bl	___archive_write_get_passphrase
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	lsl	w8, w23, #2
	sub	w1, w8, #1
	mov	x0, x21
	bl	_archive_random
Lloh9:
	adrp	x26, _ARCHIVE_OK@GOTPAGE
Lloh10:
	ldr	x26, [x26, _ARCHIVE_OK@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.2:
	add	x23, x24, #8
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_trad_enc_init
	ldr	w8, [x24, #12]
	ldr	w2, [x25]
	sub	w9, w2, #1
	str	w8, [x21, w9, sxtw #2]
	mov	x0, x23
	mov	x1, x21
	mov	x3, x20
	mov	x4, x2
	bl	_trad_enc_encrypt_update
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x20
	bl	___archive_write_output
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x25]
	ldp	w9, w10, [x24]
	add	w8, w9, w8
	str	w8, [x24]
	ldr	w8, [x25]
	add	w8, w10, w8
	str	w8, [x24, #4]
	b	LBB0_7
LBB0_4:
Lloh11:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
Lloh16:
	adrp	x8, _ARCHIVE_FAILED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ARCHIVE_FAILED@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _ARCHIVE_ERRNO_MISC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ARCHIVE_ERRNO_MISC@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
Lloh23:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_TRAD_HEADER_SIZE,4,2           ; @TRAD_HEADER_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	_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
	.no_dead_strip	_init_traditional_pkware_encryption
.subsections_via_symbols
