	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__hx509_pbe_decrypt             ## -- Begin function _hx509_pbe_decrypt
	.p2align	4, 0x90
__hx509_pbe_decrypt:                    ## @_hx509_pbe_decrypt
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movl	%esi, %r14d
	movl	%edi, %r15d
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	leaq	4(%r12), %rdi
	leaq	-56(%rbp), %rsi
	leaq	-136(%rbp), %rdx
	leaq	-128(%rbp), %rcx
	callq	_find_string2key
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	-56(%rbp), %rdi
	callq	_EVP_CIPHER_key_length
	movl	%eax, -80(%rbp)
	movl	%eax, %edi
	callq	_malloc
	movq	%rax, -88(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	-56(%rbp), %rdi
	callq	_EVP_CIPHER_iv_length
	movl	%eax, -64(%rbp)
	movl	%eax, %edi
	callq	_malloc
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movl	%r14d, %edi
	callq	__hx509_lock_get_passwords
	movq	%rax, %r14
	movl	(%rax), %eax
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	xorl	%r13d, %r13d
	leaq	-72(%rbp), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rcx
	cmpq	%rcx, %r13
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%r13,8), %rsi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%eax
	cltq
	cmpq	%rax, %r13
	movl	$0, %esi
	leaq	L_.str.1(%rip), %rax
	cmovbq	%rax, %rsi
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	leaq	-88(%rbp), %r8
	movq	%rbx, %r9
	pushq	-136(%rbp)
	pushq	-112(%rbp)                      ## 8-byte Folded Reload
	callq	*-128(%rbp)
	addq	$16, %rsp
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-48(%rbp), %edi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movl	8(%rax), %edx
	movq	%rbx, %rcx
	movq	-104(%rbp), %r8                 ## 8-byte Reload
	callq	_hx509_crypto_decrypt
	movl	%eax, %r15d
	movl	-48(%rbp), %edi
	callq	_hx509_crypto_destroy
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	movslq	(%r14), %rax
	movq	%rax, %rcx
	incq	%rcx
	cmpq	%rcx, %r13
	jb	LBB0_8
## %bb.14:
	movl	%r15d, %r12d
	cmpq	$0, -88(%rbp)
	jne	LBB0_16
	jmp	LBB0_17
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r15d, %edi
	callq	_hx509_clear_error_string
	cmpq	$0, -88(%rbp)
	jne	LBB0_16
	jmp	LBB0_17
LBB0_1:
	movq	_HX509_ALG_NOT_SUPP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_hx509_set_error_string
	movl	(%rbx), %r12d
LBB0_15:
	cmpq	$0, -88(%rbp)
	je	LBB0_17
LBB0_16:
	leaq	-88(%rbp), %rdi
	callq	_der_free_octet_string
LBB0_17:
	cmpq	$0, -72(%rbp)
	je	LBB0_19
## %bb.18:
	leaq	-72(%rbp), %rdi
	callq	_der_free_octet_string
LBB0_19:
	movl	%r12d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_HX509_CRYPTO_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpq	$0, -88(%rbp)
	jne	LBB0_16
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_HX509_ALG_NOT_SUPP,4,2         ## @HX509_ALG_NOT_SUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"String to key algorithm not supported"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HX509_CRYPTO_INTERNAL_ERROR,4,2 ## @HX509_CRYPTO_INTERNAL_ERROR
L_.str.1:                               ## @.str.1
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__hx509_pbe_decrypt             ; -- Begin function _hx509_pbe_decrypt
	.p2align	2
__hx509_pbe_decrypt:                    ; @_hx509_pbe_decrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x20
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x0, x22, #4
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #8
	bl	_find_string2key
	cbz	x0, LBB0_13
; %bb.1:
	mov	x23, x0
	ldr	x0, [sp, #24]
	bl	_EVP_CIPHER_key_length
	str	w0, [sp, #56]
	bl	_malloc
	str	x0, [sp, #48]
	cbz	x0, LBB0_12
; %bb.2:
	ldr	x0, [sp, #24]
	bl	_EVP_CIPHER_iv_length
	str	w0, [sp, #40]
	bl	_malloc
	str	x0, [sp, #32]
	cbz	x0, LBB0_12
; %bb.3:
	mov	x0, x24
	bl	__hx509_lock_get_passwords
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_19
; %bb.4:
	mov	x24, x0
	mov	x27, #0
Lloh0:
	adrp	x28, l_.str.1@PAGE
Lloh1:
	add	x28, x28, l_.str.1@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, w8, sxtw
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x24, #8]
	ldr	x1, [x8, x27, lsl #3]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w8, #1
	cmp	x27, w8, sxtw
	csel	x1, x28, xzr, lo
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	x8, x7, [sp, #8]
	ldr	w2, [x22]
	add	x3, sp, #4
	add	x4, sp, #48
	add	x5, sp, #32
	mov	x0, x19
	mov	x6, x23
	blr	x8
	mov	x25, x0
	cbnz	w0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #4]
	ldr	x1, [x21]
	ldr	w2, [x21, #8]
	add	x3, sp, #32
	mov	x4, x20
	bl	_hx509_crypto_decrypt
	mov	x26, x0
	ldr	w0, [sp, #4]
	bl	_hx509_crypto_destroy
	cbz	w26, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x24]
	add	x9, x8, #1
	cmp	x27, x9
	b.lo	LBB0_5
; %bb.11:
	mov	x25, x26
	ldr	x8, [sp, #48]
	cbnz	x8, LBB0_15
	b	LBB0_16
LBB0_12:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
	mov	x0, x19
	bl	_hx509_clear_error_string
	ldr	x8, [sp, #48]
	cbnz	x8, LBB0_15
	b	LBB0_16
LBB0_13:
Lloh5:
	adrp	x20, _HX509_ALG_NOT_SUPP@GOTPAGE
Lloh6:
	ldr	x20, [x20, _HX509_ALG_NOT_SUPP@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	w25, [x20]
LBB0_14:
	ldr	x8, [sp, #48]
	cbz	x8, LBB0_16
LBB0_15:
	add	x0, sp, #48
	bl	_der_free_octet_string
LBB0_16:
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_18
; %bb.17:
	add	x0, sp, #32
	bl	_der_free_octet_string
LBB0_18:
	mov	x0, x25
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_19:
Lloh9:
	adrp	x8, _HX509_CRYPTO_INTERNAL_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HX509_CRYPTO_INTERNAL_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w25, [x8]
	ldr	x8, [sp, #48]
	cbnz	x8, LBB0_15
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HX509_ALG_NOT_SUPP,4,2         ; @HX509_ALG_NOT_SUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"String to key algorithm not supported"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HX509_CRYPTO_INTERNAL_ERROR,4,2 ; @HX509_CRYPTO_INTERNAL_ERROR
l_.str.1:                               ; @.str.1
	.space	1

.subsections_via_symbols
