	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function um_remove_card
_um_remove_card:                        ## @um_remove_card
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_find_card_in_list
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_diva_user_mode_idi_remove_adapter
	movq	_ll_lock@GOTPCREL(%rip), %r14
	leaq	L_.str.1(%rip), %r15
	leaq	-36(%rbp), %r12
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_diva_os_enter_spin_lock
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_list_del
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_diva_os_leave_spin_lock
	movslq	(%rbx), %rdi
	callq	_DBG_LOG
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_diva_os_free
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DBG_ERR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot find card to remove"

	.comm	_ll_lock,4,2                    ## @ll_lock
L_.str.1:                               ## @.str.1
	.asciz	"remove card"

	.no_dead_strip	_um_remove_card
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function um_remove_card
_um_remove_card:                        ; @um_remove_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	bl	_find_card_in_list
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	bl	_diva_user_mode_idi_remove_adapter
Lloh0:
	adrp	x20, _ll_lock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ll_lock@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str.1@PAGE
Lloh3:
	add	x21, x21, l_.str.1@PAGEOFF
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_diva_os_enter_spin_lock
	add	x0, x19, #4
	bl	_list_del
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_diva_os_leave_spin_lock
	ldrsw	x0, [x19]
	bl	_DBG_LOG
	mov	w0, #0
	mov	x1, x19
	bl	_diva_os_free
	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
	add	sp, sp, #64
	ret
LBB0_2:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	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
	add	sp, sp, #64
	b	_DBG_ERR
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot find card to remove"

	.comm	_ll_lock,4,2                    ; @ll_lock
l_.str.1:                               ; @.str.1
	.asciz	"remove card"

	.no_dead_strip	_um_remove_card
.subsections_via_symbols
