	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_EncryptDict_Prepare       ## -- Begin function HPDF_EncryptDict_Prepare
	.p2align	4, 0x90
_HPDF_EncryptDict_Prepare:              ## @HPDF_EncryptDict_Prepare
	.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	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movslq	8(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_HPDF_EncryptDict_CreateID
	movq	%r14, %rdi
	callq	_HPDF_Encrypt_CreateOwnerKey
	movq	%r14, %rdi
	callq	_HPDF_Encrypt_CreateEncryptionKey
	movq	%r14, %rdi
	callq	_HPDF_Encrypt_CreateUserKey
	movl	4(%r12), %edi
	movl	20(%r14), %esi
	movq	_HPDF_PASSWD_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_HPDF_Binary_New
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_HPDF_Dict_Add
	movq	%rax, %rbx
	movq	_HPDF_OK@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.2:
	movl	4(%r12), %edi
	movl	16(%r14), %esi
	movl	(%r15), %edx
	callq	_HPDF_Binary_New
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_HPDF_Dict_Add
	movq	%rax, %rbx
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	callq	_HPDF_Dict_AddName
	movq	%rax, %r15
	addq	%rbx, %r15
	movq	(%r14), %rax
	movq	_HPDF_ENCRYPT_R2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_HPDF_Dict_AddNumber
	movq	%rax, %rbx
	addq	%r15, %rbx
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	jmp	LBB0_8
LBB0_6:
	movq	_HPDF_ENCRYPT_R3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_HPDF_Dict_AddNumber
	movq	%rax, %rbx
	addq	%r15, %rbx
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	callq	_HPDF_Dict_AddNumber
	addq	%rbx, %rax
	movq	%rax, %rbx
	movl	8(%r14), %edx
	shll	$3, %edx
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
LBB0_8:
	callq	_HPDF_Dict_AddNumber
	movq	%rax, %r15
	addq	%rbx, %r15
LBB0_9:
	movl	12(%r14), %edx
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rdi
	callq	_HPDF_Dict_AddNumber
	movq	%rax, %rbx
	addq	%r15, %rbx
	cmpq	(%r13), %rbx
	jne	LBB0_11
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r12), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_Error_GetCode             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_EncryptDict_Prepare\n"

	.comm	_HPDF_PASSWD_LEN,4,2            ## @HPDF_PASSWD_LEN
L_.str.1:                               ## @.str.1
	.asciz	"O"

	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
L_.str.2:                               ## @.str.2
	.asciz	"U"

L_.str.3:                               ## @.str.3
	.asciz	"Filter"

L_.str.4:                               ## @.str.4
	.asciz	"Standard"

	.comm	_HPDF_ENCRYPT_R2,8,3            ## @HPDF_ENCRYPT_R2
L_.str.5:                               ## @.str.5
	.asciz	"V"

L_.str.6:                               ## @.str.6
	.asciz	"R"

	.comm	_HPDF_ENCRYPT_R3,8,3            ## @HPDF_ENCRYPT_R3
L_.str.7:                               ## @.str.7
	.asciz	"Length"

L_.str.8:                               ## @.str.8
	.asciz	"P"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_EncryptDict_Prepare       ; -- Begin function HPDF_EncryptDict_Prepare
	.p2align	2
_HPDF_EncryptDict_Prepare:              ; @HPDF_EncryptDict_Prepare
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldrsw	x20, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_HPDF_EncryptDict_CreateID
	mov	x0, x20
	bl	_HPDF_Encrypt_CreateOwnerKey
	mov	x0, x20
	bl	_HPDF_Encrypt_CreateEncryptionKey
	mov	x0, x20
	bl	_HPDF_Encrypt_CreateUserKey
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #20]
Lloh2:
	adrp	x23, _HPDF_PASSWD_LEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _HPDF_PASSWD_LEN@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_HPDF_Binary_New
	cbz	w0, LBB0_11
; %bb.1:
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_Add
	mov	x21, x0
Lloh6:
	adrp	x22, _HPDF_OK@GOTPAGE
Lloh7:
	ldr	x22, [x22, _HPDF_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.2:
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #16]
	ldr	w2, [x23]
	bl	_HPDF_Binary_New
	cbz	w0, LBB0_11
; %bb.3:
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_Add
	mov	x21, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.4:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh12:
	adrp	x2, l_.str.4@PAGE
Lloh13:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_AddName
	add	x21, x0, x21
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _HPDF_ENCRYPT_R2@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HPDF_ENCRYPT_R2@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_HPDF_Dict_AddNumber
	add	x21, x0, x21
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	b	LBB0_8
LBB0_6:
Lloh21:
	adrp	x9, _HPDF_ENCRYPT_R3@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HPDF_ENCRYPT_R3@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	bl	_HPDF_Dict_AddNumber
	add	x21, x0, x21
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	w2, #3
	bl	_HPDF_Dict_AddNumber
	add	x21, x21, x0
	ldr	w8, [x20, #8]
	lsl	w2, w8, #3
Lloh28:
	adrp	x1, l_.str.7@PAGE
Lloh29:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
LBB0_8:
	bl	_HPDF_Dict_AddNumber
	add	x21, x21, x0
LBB0_9:
	ldr	w2, [x20, #12]
Lloh30:
	adrp	x1, l_.str.8@PAGE
Lloh31:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_AddNumber
	ldr	x8, [x22]
	add	x21, x0, x21
	cmp	x21, x8
	b.ne	LBB0_11
LBB0_10:
	mov	x0, x21
	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_11:
	ldr	w0, [x19]
	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
	b	_HPDF_Error_GetCode
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_EncryptDict_Prepare\n"

	.comm	_HPDF_PASSWD_LEN,4,2            ; @HPDF_PASSWD_LEN
l_.str.1:                               ; @.str.1
	.asciz	"O"

	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
l_.str.2:                               ; @.str.2
	.asciz	"U"

l_.str.3:                               ; @.str.3
	.asciz	"Filter"

l_.str.4:                               ; @.str.4
	.asciz	"Standard"

	.comm	_HPDF_ENCRYPT_R2,8,3            ; @HPDF_ENCRYPT_R2
l_.str.5:                               ; @.str.5
	.asciz	"V"

l_.str.6:                               ; @.str.6
	.asciz	"R"

	.comm	_HPDF_ENCRYPT_R3,8,3            ; @HPDF_ENCRYPT_R3
l_.str.7:                               ; @.str.7
	.asciz	"Length"

l_.str.8:                               ; @.str.8
	.asciz	"P"

.subsections_via_symbols
