	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_engine_free_util               ## -- Begin function engine_free_util
	.p2align	4, 0x90
_engine_free_util:                      ## @engine_free_util
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movq	_global_engine_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_CRYPTO_DOWN_REF
	jmp	LBB0_4
LBB0_3:
	movl	(%rbx), %eax
	decl	%eax
	movl	%eax, (%rbx)
	movl	%eax, -12(%rbp)
LBB0_4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_engine_ref_debug
	cmpl	$0, -12(%rbp)
	jg	LBB0_8
## %bb.5:
	setne	%al
	movzbl	%al, %edi
	callq	_REF_ASSERT_ISNT
	movq	%rbx, %rdi
	callq	_engine_pkey_meths_free
	movq	%rbx, %rdi
	callq	_engine_pkey_asn1_meths_free
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_7:
	movq	_CRYPTO_EX_INDEX_ENGINE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	callq	_CRYPTO_free_ex_data
	movq	%rbx, %rdi
	callq	_OPENSSL_free
LBB0_8:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_global_engine_lock,4,2         ## @global_engine_lock
	.comm	_CRYPTO_EX_INDEX_ENGINE,4,2     ## @CRYPTO_EX_INDEX_ENGINE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_engine_free_util               ; -- Begin function engine_free_util
	.p2align	2
_engine_free_util:                      ; @engine_free_util
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _global_engine_lock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _global_engine_lock@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #12
	mov	x0, x19
	bl	_CRYPTO_DOWN_REF
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	str	w8, [sp, #12]
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #-1
	bl	_engine_ref_debug
	ldr	w8, [sp, #12]
	cmp	w8, #0
	b.gt	LBB0_8
; %bb.5:
	cset	w0, ne
	bl	_REF_ASSERT_ISNT
	mov	x0, x19
	bl	_engine_pkey_meths_free
	mov	x0, x19
	bl	_engine_pkey_asn1_meths_free
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	blr	x8
LBB0_7:
Lloh3:
	adrp	x8, _CRYPTO_EX_INDEX_ENGINE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CRYPTO_EX_INDEX_ENGINE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x2, x19, #4
	mov	x1, x19
	bl	_CRYPTO_free_ex_data
	mov	x0, x19
	bl	_OPENSSL_free
LBB0_8:
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_global_engine_lock,4,2         ; @global_engine_lock
	.comm	_CRYPTO_EX_INDEX_ENGINE,4,2     ; @CRYPTO_EX_INDEX_ENGINE
.subsections_via_symbols
