	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_context_free              ## -- Begin function ocxl_context_free
	.p2align	4, 0x90
_ocxl_context_free:                     ## @ocxl_context_free
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rdi
	decl	8(%rdi)
	addq	$4, %rdi
	movl	12(%rbx), %esi
	callq	_idr_remove
	movq	(%rbx), %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_ocxl_afu_irq_free_all
	leaq	8(%rbx), %rdi
	callq	_idr_destroy
	movq	(%rbx), %rdi
	callq	_ocxl_afu_put
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_context_free              ; -- Begin function ocxl_context_free
	.p2align	2
_ocxl_context_free:                     ; @ocxl_context_free
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0]
	bl	_mutex_lock
	ldr	x8, [x19]
	ldr	w9, [x8, #8]
	sub	w9, w9, #1
	str	w9, [x8, #8]
	add	x0, x8, #4
	ldr	w1, [x19, #12]
	bl	_idr_remove
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_ocxl_afu_irq_free_all
	add	x0, x19, #8
	bl	_idr_destroy
	ldr	x0, [x19]
	bl	_ocxl_afu_put
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
