	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_crypto_decrypt           ## -- Begin function hx509_crypto_decrypt
	.p2align	4, 0x90
_hx509_crypto_decrypt:                  ## @hx509_crypto_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r8)
	movq	16(%rdi), %rax
	movq	_CIPHER_WEAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ALLOW_WEAK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_16
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.3:
	movl	4(%r12), %edi
	callq	_EVP_CIPHER_iv_length
	cmpl	8(%rbx), %eax
	jl	LBB0_18
## %bb.4:
	cmpq	$0, 8(%r12)
	je	LBB0_18
## %bb.5:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	jmp	LBB0_8
LBB0_6:
	cmpq	$0, 8(%r12)
	je	LBB0_18
## %bb.7:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
LBB0_8:
	xorl	%eax, %eax
	callq	_EVP_CIPHER_CTX_new
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	movq	%rax, %r13
	movl	4(%r12), %esi
	movq	8(%r12), %rcx
	movq	%rax, %rdi
	xorl	%edx, %edx
	movq	%rbx, %r8
	xorl	%r9d, %r9d
	callq	_EVP_CipherInit_ex
	cmpl	$1, %eax
	jne	LBB0_17
## %bb.10:
	movq	%r15, 8(%r14)
	movq	%r15, %rdi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_19
## %bb.11:
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_EVP_Cipher
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_free
	cmpl	$1, %ebx
	jne	LBB0_18
## %bb.12:
	movq	_PADDING_PKCS7@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.13:
	movl	4(%r12), %edi
	callq	_EVP_CIPHER_block_size
	cmpl	$2, %eax
	jl	LBB0_22
## %bb.14:
	movl	4(%r12), %edi
	callq	_EVP_CIPHER_block_size
	movq	(%r14), %rdi
	movq	8(%r14), %rdx
	cmpl	%edx, %eax
	jle	LBB0_23
LBB0_15:
	movq	_HX509_CMS_PADDING_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testq	%rdi, %rdi
	jne	LBB0_25
	jmp	LBB0_26
LBB0_16:
	movq	_HX509_CRYPTO_ALGORITHM_BEST_BEFORE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_17:
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_free
LBB0_18:
	movq	_HX509_CRYPTO_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_19:
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_free
	movq	$0, 8(%r14)
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %r15d
LBB0_22:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movzbl	-1(%rdx,%rdi), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_27
## %bb.24:
	movq	_HX509_CMS_PADDING_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_25:
	callq	_free
LBB0_26:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	jmp	LBB0_22
LBB0_27:
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, 8(%r14)
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.28:
	leaq	(%rdx,%rdi), %rax
	decq	%rax
	xorl	%edx, %edx
	xorl	%r15d, %r15d
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	cmpb	%cl, (%rax,%rdx)
	jne	LBB0_15
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	decq	%rdx
	movl	%ecx, %esi
	addl	%edx, %esi
	jne	LBB0_29
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_CIPHER_WEAK,4,2                ## @CIPHER_WEAK
	.comm	_ALLOW_WEAK,4,2                 ## @ALLOW_WEAK
	.comm	_HX509_CRYPTO_ALGORITHM_BEST_BEFORE,4,2 ## @HX509_CRYPTO_ALGORITHM_BEST_BEFORE
	.comm	_HX509_CRYPTO_INTERNAL_ERROR,4,2 ## @HX509_CRYPTO_INTERNAL_ERROR
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PADDING_PKCS7,4,2              ## @PADDING_PKCS7
	.comm	_HX509_CMS_PADDING_ERROR,4,2    ## @HX509_CMS_PADDING_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_crypto_decrypt           ; -- Begin function hx509_crypto_decrypt
	.p2align	2
_hx509_crypto_decrypt:                  ; @hx509_crypto_decrypt
	.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	x19, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	stp	xzr, xzr, [x4]
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _CIPHER_WEAK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CIPHER_WEAK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _ALLOW_WEAK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ALLOW_WEAK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_2:
	cbz	x23, LBB0_6
; %bb.3:
	ldr	w0, [x20, #4]
	bl	_EVP_CIPHER_iv_length
	ldr	w8, [x23, #8]
	cmp	w0, w8
	b.lt	LBB0_17
; %bb.4:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_17
; %bb.5:
	ldr	x24, [x23]
	bl	_EVP_CIPHER_CTX_new
	cbnz	x0, LBB0_8
	b	LBB0_19
LBB0_6:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_17
; %bb.7:
	mov	x24, #0
	bl	_EVP_CIPHER_CTX_new
	cbz	x0, LBB0_19
LBB0_8:
	mov	x23, x0
	ldr	w1, [x20, #4]
	ldr	x3, [x20, #8]
	mov	x2, #0
	mov	x4, x24
	mov	w5, #0
	bl	_EVP_CipherInit_ex
	cmp	w0, #1
	b.ne	LBB0_16
; %bb.9:
	str	x21, [x19, #8]
	mov	x0, x21
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_18
; %bb.10:
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	mov	x3, x21
	bl	_EVP_Cipher
	mov	x21, x0
	mov	x0, x23
	bl	_EVP_CIPHER_CTX_free
	cmp	w21, #1
	b.ne	LBB0_17
; %bb.11:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _PADDING_PKCS7@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PADDING_PKCS7@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_30
; %bb.12:
	ldr	w0, [x20, #4]
	bl	_EVP_CIPHER_block_size
	cmp	w0, #2
	b.lt	LBB0_30
; %bb.13:
	ldr	w0, [x20, #4]
	bl	_EVP_CIPHER_block_size
	mov	x8, x0
	ldp	x0, x11, [x19]
	cmp	w8, w11
	b.le	LBB0_22
LBB0_14:
Lloh9:
	adrp	x8, _HX509_CMS_PADDING_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HX509_CMS_PADDING_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	cbnz	x0, LBB0_24
	b	LBB0_25
LBB0_15:
Lloh12:
	adrp	x8, _HX509_CRYPTO_ALGORITHM_BEST_BEFORE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HX509_CRYPTO_ALGORITHM_BEST_BEFORE@GOTPAGEOFF]
	b	LBB0_20
LBB0_16:
	mov	x0, x23
	bl	_EVP_CIPHER_CTX_free
LBB0_17:
Lloh14:
	adrp	x8, _HX509_CRYPTO_INTERNAL_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HX509_CRYPTO_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_20
LBB0_18:
	mov	x0, x23
	bl	_EVP_CIPHER_CTX_free
	str	xzr, [x19, #8]
LBB0_19:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_20:
	ldr	w20, [x8]
LBB0_21:
	mov	x0, x20
	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_22:
	add	x9, x11, x0
	ldrb	w10, [x9, #-1]!
	cmp	w8, w10
	b.ge	LBB0_26
; %bb.23:
Lloh18:
	adrp	x8, _HX509_CMS_PADDING_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HX509_CMS_PADDING_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
LBB0_24:
	bl	_free
LBB0_25:
	stp	xzr, xzr, [x19]
	b	LBB0_21
LBB0_26:
	sub	x8, x11, x10
	str	x8, [x19, #8]
	cbz	w10, LBB0_30
; %bb.27:
	mov	x8, #0
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x9, x8]
	cmp	w11, w10
	b.ne	LBB0_14
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	w20, #0
	sub	x8, x8, #1
	cmn	w10, w8
	b.ne	LBB0_28
	b	LBB0_21
LBB0_30:
	mov	w20, #0
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CIPHER_WEAK,4,2                ; @CIPHER_WEAK
	.comm	_ALLOW_WEAK,4,2                 ; @ALLOW_WEAK
	.comm	_HX509_CRYPTO_ALGORITHM_BEST_BEFORE,4,2 ; @HX509_CRYPTO_ALGORITHM_BEST_BEFORE
	.comm	_HX509_CRYPTO_INTERNAL_ERROR,4,2 ; @HX509_CRYPTO_INTERNAL_ERROR
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PADDING_PKCS7,4,2              ; @PADDING_PKCS7
	.comm	_HX509_CMS_PADDING_ERROR,4,2    ; @HX509_CMS_PADDING_ERROR
.subsections_via_symbols
