	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function disable_device
_disable_device:                        ## @disable_device
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	addq	$8, %rdi
	callq	_refcount_read
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	_devices_rwsem@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_down_write
	movl	4(%r14), %esi
	movq	_DEVICE_REGISTERED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_devices@GOTPCREL(%rip), %rdi
	callq	_xa_clear_mark
	movq	%rbx, %rdi
	callq	_up_write
	movq	_clients_rwsem@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_down_read
	movq	_highest_client_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_up_read
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	decq	%rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_remove_client_context
	addq	$-1, %rbx
	jb	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_ib_device_put
	movq	%r14, %rdi
	callq	_wait_for_completion
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_remove_compat_devs             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_devices_rwsem,4,2              ## @devices_rwsem
	.comm	_devices,4,2                    ## @devices
	.comm	_DEVICE_REGISTERED,4,2          ## @DEVICE_REGISTERED
	.comm	_clients_rwsem,4,2              ## @clients_rwsem
	.comm	_highest_client_id,8,3          ## @highest_client_id
	.no_dead_strip	_disable_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function disable_device
_disable_device:                        ; @disable_device
	.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
	add	x0, x0, #8
	bl	_refcount_read
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh0:
	adrp	x20, _devices_rwsem@GOTPAGE
Lloh1:
	ldr	x20, [x20, _devices_rwsem@GOTPAGEOFF]
	mov	x0, x20
	bl	_down_write
	ldr	w1, [x19, #4]
Lloh2:
	adrp	x8, _DEVICE_REGISTERED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DEVICE_REGISTERED@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x0, _devices@GOTPAGE
Lloh6:
	ldr	x0, [x0, _devices@GOTPAGEOFF]
	bl	_xa_clear_mark
	mov	x0, x20
	bl	_up_write
Lloh7:
	adrp	x20, _clients_rwsem@GOTPAGE
Lloh8:
	ldr	x20, [x20, _clients_rwsem@GOTPAGEOFF]
	mov	x0, x20
	bl	_down_read
Lloh9:
	adrp	x8, _highest_client_id@GOTPAGE
Lloh10:
	ldr	x8, [x8, _highest_client_id@GOTPAGEOFF]
Lloh11:
	ldr	x21, [x8]
	mov	x0, x20
	bl	_up_read
	cbz	x21, LBB0_3
; %bb.1:
	sub	x20, x21, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_remove_client_context
	sub	x20, x20, #1
	cmn	x20, #1
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_ib_device_put
	mov	x0, x19
	bl	_wait_for_completion
	mov	x0, x19
	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	_remove_compat_devs
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_devices_rwsem,4,2              ; @devices_rwsem
	.comm	_devices,4,2                    ; @devices
	.comm	_DEVICE_REGISTERED,4,2          ; @DEVICE_REGISTERED
	.comm	_clients_rwsem,4,2              ; @clients_rwsem
	.comm	_highest_client_id,8,3          ; @highest_client_id
	.no_dead_strip	_disable_device
.subsections_via_symbols
