	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function leds_done
_leds_done:                             ## @leds_done
	.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	_leds_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_pending_led_start@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_pending_led_end@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_1
## %bb.4:
	movq	_leds_req_pending@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_leds_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_1:
	movq	_pending_devs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	(%rdx,%rcx,4), %rbx
	movq	_leds_pending@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	incq	%rcx
	xorl	%esi, %esi
	cmpq	$16, %rcx
	cmovbq	%rcx, %rsi
	movzbl	(%rdx,%rbx,4), %r14d
	movl	$0, (%rdx,%rbx,4)
	movq	%rsi, (%rax)
	movq	_leds_req_pending@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_leds_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	notl	%r14d
	movq	_KEYB_LEDREG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_ADB_WRITEREG
	movl	%r14d, (%rsp)
	movq	_led_request@GOTPCREL(%rip), %rdi
	leaq	_leds_done(%rip), %rsi
	xorl	%edx, %edx
	movl	$3, %ecx
	movl	%eax, %r8d
	movl	$255, %r9d
	callq	_adb_request
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_leds_lock,4,2                  ## @leds_lock
	.comm	_pending_led_start,8,3          ## @pending_led_start
	.comm	_pending_led_end,8,3            ## @pending_led_end
	.comm	_pending_devs,8,3               ## @pending_devs
	.comm	_leds_pending,8,3               ## @leds_pending
	.comm	_leds_req_pending,4,2           ## @leds_req_pending
	.comm	_led_request,4,2                ## @led_request
	.comm	_KEYB_LEDREG,4,2                ## @KEYB_LEDREG
	.no_dead_strip	_leds_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function leds_done
_leds_done:                             ; @leds_done
	.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
Lloh0:
	adrp	x0, _leds_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _leds_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _pending_led_start@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pending_led_start@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _pending_led_end@GOTPAGE
Lloh5:
	ldr	x10, [x10, _pending_led_end@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _leds_req_pending@GOTPAGE
Lloh8:
	ldr	x8, [x8, _leds_req_pending@GOTPAGEOFF]
Lloh9:
	str	wzr, [x8]
Lloh10:
	adrp	x0, _leds_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _leds_lock@GOTPAGEOFF]
	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	_spin_unlock_irqrestore
LBB0_2:
Lloh12:
	adrp	x10, _pending_devs@GOTPAGE
Lloh13:
	ldr	x10, [x10, _pending_devs@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	ldrsw	x19, [x10, x9, lsl #2]
Lloh15:
	adrp	x10, _leds_pending@GOTPAGE
Lloh16:
	ldr	x10, [x10, _leds_pending@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	lsl	x11, x19, #2
	ldrb	w20, [x10, x11]
	str	wzr, [x10, x11]
	add	x10, x9, #1
	cmp	x10, #16
	csinc	x9, xzr, x9, hs
	str	x9, [x8]
Lloh18:
	adrp	x8, _leds_req_pending@GOTPAGE
Lloh19:
	ldr	x8, [x8, _leds_req_pending@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
Lloh21:
	adrp	x0, _leds_lock@GOTPAGE
Lloh22:
	ldr	x0, [x0, _leds_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	cbz	w21, LBB0_4
; %bb.3:
	mvn	w20, w20
Lloh23:
	adrp	x8, _KEYB_LEDREG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _KEYB_LEDREG@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ADB_WRITEREG
	mov	x4, x0
Lloh26:
	adrp	x0, _led_request@GOTPAGE
Lloh27:
	ldr	x0, [x0, _led_request@GOTPAGEOFF]
Lloh28:
	adrp	x1, _leds_done@PAGE
Lloh29:
	add	x1, x1, _leds_done@PAGEOFF
	mov	w2, #0
	mov	w3, #3
	mov	w5, #255
	mov	x6, x20
	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	_adb_request
LBB0_4:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_leds_lock,4,2                  ; @leds_lock
	.comm	_pending_led_start,8,3          ; @pending_led_start
	.comm	_pending_led_end,8,3            ; @pending_led_end
	.comm	_pending_devs,8,3               ; @pending_devs
	.comm	_leds_pending,8,3               ; @leds_pending
	.comm	_leds_req_pending,4,2           ; @leds_req_pending
	.comm	_led_request,4,2                ; @led_request
	.comm	_KEYB_LEDREG,4,2                ; @KEYB_LEDREG
	.no_dead_strip	_leds_done
.subsections_via_symbols
