	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_led_classdev_unregister        ## -- Begin function led_classdev_unregister
	.p2align	4, 0x90
_led_classdev_unregister:               ## @led_classdev_unregister
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	12(%rdi), %edi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_LED_UNREGISTERING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_led_stop_software_blink
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_led_set_brightness
	leaq	16(%rbx), %rdi
	callq	_flush_work
	movq	_LED_BRIGHT_HW_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_led_remove_brightness_hw_changed
LBB0_3:
	movl	12(%rbx), %edi
	callq	_device_unregister
	movq	_leds_list_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_down_write
	leaq	8(%rbx), %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_up_write
	addq	$4, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_destroy                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LED_UNREGISTERING,4,2          ## @LED_UNREGISTERING
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_LED_BRIGHT_HW_CHANGED,4,2      ## @LED_BRIGHT_HW_CHANGED
	.comm	_leds_list_lock,4,2             ## @leds_list_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_led_classdev_unregister        ; -- Begin function led_classdev_unregister
	.p2align	2
_led_classdev_unregister:               ; @led_classdev_unregister
	.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	w0, [x0, #12]
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh0:
	adrp	x8, _LED_UNREGISTERING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LED_UNREGISTERING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_led_stop_software_blink
Lloh3:
	adrp	x8, _LED_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LED_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_led_set_brightness
	add	x0, x19, #16
	bl	_flush_work
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _LED_BRIGHT_HW_CHANGED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LED_BRIGHT_HW_CHANGED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_led_remove_brightness_hw_changed
LBB0_4:
	ldr	w0, [x19, #12]
	bl	_device_unregister
Lloh9:
	adrp	x20, _leds_list_lock@GOTPAGE
Lloh10:
	ldr	x20, [x20, _leds_list_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_down_write
	add	x0, x19, #8
	bl	_list_del
	mov	x0, x20
	bl	_up_write
	add	x0, x19, #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_destroy
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LED_UNREGISTERING,4,2          ; @LED_UNREGISTERING
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_LED_BRIGHT_HW_CHANGED,4,2      ; @LED_BRIGHT_HW_CHANGED
	.comm	_leds_list_lock,4,2             ; @leds_list_lock
.subsections_via_symbols
