	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Encrypt_InitKey           ## -- Begin function HPDF_Encrypt_InitKey
	.p2align	4, 0x90
_HPDF_Encrypt_InitKey:                  ## @HPDF_Encrypt_InitKey
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movslq	%r15d, %rax
	movq	(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movl	%eax, %edx
	sarl	$8, %edx
	movslq	%edx, %rdx
	movq	16(%rbx), %rsi
	movq	%rdx, 8(%rsi,%rcx,8)
	sarl	$16, %eax
	cltq
	movq	16(%rbx), %rdx
	movq	%rax, 16(%rdx,%rcx,8)
	movslq	%r14d, %rdi
	movq	16(%rbx), %rax
	movq	%rdi, 24(%rax,%rcx,8)
	movl	%edi, %eax
	sarl	$8, %eax
	cltq
	movq	16(%rbx), %rdx
	movq	%rax, 32(%rdx,%rcx,8)
	callq	_HPDF_PTRACE
	leaq	-28(%rbp), %r14
	movq	%r14, %rdi
	callq	_HPDF_MD5Init
	movq	(%rbx), %rdx
	movq	16(%rbx), %rsi
	addq	$5, %rdx
	movq	%r14, %rdi
	callq	_HPDF_MD5Update
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	callq	_HPDF_MD5Final
	movq	(%rbx), %rdx
	addq	$5, %rdx
	movq	_HPDF_ENCRYPT_KEY_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovaeq	%rax, %rdx
	movl	8(%rbx), %esi
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_ARC4Init
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_Encrypt_Init\n"

	.comm	_HPDF_ENCRYPT_KEY_MAX,8,3       ## @HPDF_ENCRYPT_KEY_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Encrypt_InitKey           ; -- Begin function HPDF_Encrypt_InitKey
	.p2align	2
_HPDF_Encrypt_InitKey:                  ; @HPDF_Encrypt_InitKey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	sxtw	x8, w21
	ldr	x9, [x19, #16]
	ldr	x10, [x19]
	lsl	x10, x10, #3
	str	x8, [x9, x10]
	sbfx	x8, x21, #8, #24
	ldr	x9, [x19, #16]
	add	x9, x10, x9
	str	x8, [x9, #8]
	sbfx	x8, x21, #16, #16
	ldr	x9, [x19, #16]
	add	x9, x10, x9
	str	x8, [x9, #16]
	sxtw	x0, w20
	ldr	x8, [x19, #16]
	add	x8, x10, x8
	str	x0, [x8, #24]
	sbfx	x8, x20, #8, #24
	ldr	x9, [x19, #16]
	add	x9, x10, x9
	str	x8, [x9, #32]
	bl	_HPDF_PTRACE
	add	x0, sp, #12
	bl	_HPDF_MD5Init
	ldr	x1, [x19, #16]
	ldr	x8, [x19]
	add	x2, x8, #5
	add	x0, sp, #12
	bl	_HPDF_MD5Update
	ldr	w0, [x19, #8]
	add	x1, sp, #12
	bl	_HPDF_MD5Final
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _HPDF_ENCRYPT_KEY_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HPDF_ENCRYPT_KEY_MAX@GOTPAGEOFF]
	add	x8, x8, #5
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x2, x8, x9, lo
	add	x0, x19, #12
	ldr	w1, [x19, #8]
	bl	_ARC4Init
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Encrypt_Init\n"

	.comm	_HPDF_ENCRYPT_KEY_MAX,8,3       ; @HPDF_ENCRYPT_KEY_MAX
.subsections_via_symbols
