	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkcs11_provider_finalize
_pkcs11_provider_finalize:              ## @pkcs11_provider_finalize
	.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	%rdi, %r15
	movl	40(%rdi), %edx
	movq	24(%rdi), %rcx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_debug
	cmpq	$0, 24(%r15)
	je	LBB0_10
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	movq	_CKR_OK@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	(%r15), %rbx
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r15), %rax
	callq	*8(%rax)
	cmpl	(%r12), %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_error
	jmp	LBB0_6
LBB0_7:
	leaq	16(%r15), %rbx
	movq	16(%r15), %rax
	xorl	%edi, %edi
	callq	*(%rax)
	movq	_CKR_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_error
LBB0_9:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movl	8(%r15), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dlclose                        ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pkcs11_provider_finalize: %p refcount %d valid %d"

	.comm	_CKR_OK,4,2                     ## @CKR_OK
L_.str.1:                               ## @.str.1
	.asciz	"C_CloseSession failed: %lu"

L_.str.2:                               ## @.str.2
	.asciz	"C_Finalize failed: %lu"

	.no_dead_strip	_pkcs11_provider_finalize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkcs11_provider_finalize
_pkcs11_provider_finalize:              ; @pkcs11_provider_finalize
	.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, x0
	ldr	w2, [x0, #40]
	ldr	x3, [x0, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_debug
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.1:
	ldr	x8, [x19]
Lloh2:
	adrp	x21, _CKR_OK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CKR_OK@GOTPAGEOFF]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x22, #0
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x8, [x19]
	cmp	x22, x8
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x0, [x8, x22, lsl #3]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	blr	x8
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	mov	x0, x20
	bl	_error
	b	LBB0_3
LBB0_7:
	mov	x20, x19
	ldr	x8, [x20, #16]!
	ldr	x8, [x8]
	mov	x0, #0
	blr	x8
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_error
LBB0_9:
	stp	xzr, xzr, [x20]
	ldr	w0, [x19, #8]
	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	_dlclose
LBB0_10:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pkcs11_provider_finalize: %p refcount %d valid %d"

	.comm	_CKR_OK,4,2                     ; @CKR_OK
l_.str.1:                               ; @.str.1
	.asciz	"C_CloseSession failed: %lu"

l_.str.2:                               ; @.str.2
	.asciz	"C_Finalize failed: %lu"

	.no_dead_strip	_pkcs11_provider_finalize
.subsections_via_symbols
