	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_EncryptDict_SetPassword   ## -- Begin function HPDF_EncryptDict_SetPassword
	.p2align	4, 0x90
_HPDF_EncryptDict_SetPassword:          ## @HPDF_EncryptDict_SetPassword
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movslq	4(%rdi), %r12
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_HPDF_StrLen
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_HPDF_StrCmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movl	4(%r12), %esi
	movq	%rbx, %rdi
	callq	_HPDF_PadOrTrancatePasswd
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_HPDF_PadOrTrancatePasswd
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r15), %edi
	movq	_HPDF_ENCRYPT_INVALID_PASSWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_SetError                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_EncryptDict_SetPassword\n"

	.comm	_HPDF_ENCRYPT_INVALID_PASSWORD,4,2 ## @HPDF_ENCRYPT_INVALID_PASSWORD
	.comm	_HPDF_OK,4,2                    ## @HPDF_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_EncryptDict_SetPassword   ; -- Begin function HPDF_EncryptDict_SetPassword
	.p2align	2
_HPDF_EncryptDict_SetPassword:          ; @HPDF_EncryptDict_SetPassword
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldrsw	x22, [x0, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	mov	x0, x20
	mov	w1, #2
	bl	_HPDF_StrLen
	cbz	x0, LBB0_5
; %bb.1:
	cbz	x20, LBB0_4
; %bb.2:
	cbz	x19, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_HPDF_StrCmp
	cbz	x0, LBB0_5
LBB0_4:
	ldr	w1, [x22, #4]
	mov	x0, x20
	bl	_HPDF_PadOrTrancatePasswd
	ldr	w1, [x22]
	mov	x0, x19
	bl	_HPDF_PadOrTrancatePasswd
Lloh2:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _HPDF_ENCRYPT_INVALID_PASSWORD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HPDF_ENCRYPT_INVALID_PASSWORD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_HPDF_SetError
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_EncryptDict_SetPassword\n"

	.comm	_HPDF_ENCRYPT_INVALID_PASSWORD,4,2 ; @HPDF_ENCRYPT_INVALID_PASSWORD
	.comm	_HPDF_OK,4,2                    ; @HPDF_OK
.subsections_via_symbols
