	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parport_remove_port            ## -- Begin function parport_remove_port
	.p2align	4, 0x90
_parport_remove_port:                   ## @parport_remove_port
	.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	_registration_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_detach_driver_chain
	movq	_dead_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_parportlist_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	leaq	8(%rbx), %rdi
	callq	_list_del_init
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	addq	$8, %rdi
	callq	_list_del_init
	movq	(%rbx), %rax
LBB0_2:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	addq	$8, %rdi
	callq	_list_del_init
LBB0_4:
	movq	_parportlist_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	_registration_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_parport_proc_unregister
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_parport_put_port
	movq	(%rbx), %rax
LBB0_6:
	movq	8(%rax), %rdi
	addq	$8, %rsp
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	popq	%rbx
	popq	%rbp
	jmp	_parport_put_port               ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_registration_lock,4,2          ## @registration_lock
	.comm	_dead_ops,4,2                   ## @dead_ops
	.comm	_parportlist_lock,4,2           ## @parportlist_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parport_remove_port            ; -- Begin function parport_remove_port
	.p2align	2
_parport_remove_port:                   ; @parport_remove_port
	.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, _registration_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _registration_lock@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x19
	bl	_detach_driver_chain
Lloh2:
	adrp	x8, _dead_ops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dead_ops@GOTPAGEOFF]
	str	x8, [x19, #16]
Lloh4:
	adrp	x0, _parportlist_lock@GOTPAGE
Lloh5:
	ldr	x0, [x0, _parportlist_lock@GOTPAGEOFF]
	bl	_spin_lock
	add	x0, x19, #8
	bl	_list_del_init
	ldr	x8, [x19]
	ldr	x9, [x8]
	cbz	x9, LBB0_2
; %bb.1:
	add	x0, x9, #8
	bl	_list_del_init
	ldr	x8, [x19]
LBB0_2:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.3:
	add	x0, x8, #8
	bl	_list_del_init
LBB0_4:
Lloh6:
	adrp	x0, _parportlist_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _parportlist_lock@GOTPAGEOFF]
	bl	_spin_unlock
Lloh8:
	adrp	x0, _registration_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _registration_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_parport_proc_unregister
	ldr	x8, [x19]
	ldr	x0, [x8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_parport_put_port
	ldr	x8, [x19]
LBB0_6:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_parport_put_port
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_registration_lock,4,2          ; @registration_lock
	.comm	_dead_ops,4,2                   ; @dead_ops
	.comm	_parportlist_lock,4,2           ; @parportlist_lock
.subsections_via_symbols
