	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fw_core_remove_descriptor      ## -- Begin function fw_core_remove_descriptor
	.p2align	4, 0x90
_fw_core_remove_descriptor:             ## @fw_core_remove_descriptor
	.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	_card_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	leaq	8(%rbx), %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_required_space
	movq	_config_rom_length@GOTPCREL(%rip), %rcx
	subl	%eax, (%rcx)
	movq	_descriptor_count@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	-1(%rcx), %edx
	movl	%edx, (%rax)
	cmpq	$0, (%rbx)
	jle	LBB0_2
## %bb.1:
	addl	$-2, %ecx
	movl	%ecx, (%rax)
LBB0_2:
	xorl	%eax, %eax
	callq	_update_config_roms
	movq	_card_mutex@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_card_mutex,4,2                 ## @card_mutex
	.comm	_config_rom_length,4,2          ## @config_rom_length
	.comm	_descriptor_count,4,2           ## @descriptor_count
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fw_core_remove_descriptor      ; -- Begin function fw_core_remove_descriptor
	.p2align	2
_fw_core_remove_descriptor:             ; @fw_core_remove_descriptor
	.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
Lloh0:
	adrp	x0, _card_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _card_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	add	x0, x19, #8
	bl	_list_del
	mov	x0, x19
	bl	_required_space
Lloh2:
	adrp	x9, _config_rom_length@GOTPAGE
Lloh3:
	ldr	x9, [x9, _config_rom_length@GOTPAGEOFF]
	ldr	w8, [x9]
	sub	w10, w8, w0
Lloh4:
	adrp	x8, _descriptor_count@GOTPAGE
Lloh5:
	ldr	x8, [x8, _descriptor_count@GOTPAGEOFF]
	str	w10, [x9]
	ldr	w9, [x8]
	sub	w10, w9, #1
	str	w10, [x8]
	ldr	x10, [x19]
	cmp	x10, #1
	b.lt	LBB0_2
; %bb.1:
	sub	w9, w9, #2
	str	w9, [x8]
LBB0_2:
	bl	_update_config_roms
Lloh6:
	adrp	x0, _card_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _card_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_card_mutex,4,2                 ; @card_mutex
	.comm	_config_rom_length,4,2          ; @config_rom_length
	.comm	_descriptor_count,4,2           ; @descriptor_count
.subsections_via_symbols
