	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_for_stepping_quirk
_check_for_stepping_quirk:              ## @check_for_stepping_quirk
	.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, %rbx
	callq	_read_brightness
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_brightness
LBB0_2:
	movq	%rbx, %rdi
	callq	_read_brightness
                                        ## kill: def $eax killed $eax def $rax
	xorl	%ecx, %ecx
	cmpl	$3, %eax
	setl	%cl
	leal	(%rax,%rcx,4), %r15d
	addl	$-2, %r15d
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_set_brightness
	movq	%rbx, %rdi
	callq	_read_brightness
	cmpl	%r15d, %eax
	je	LBB0_4
## %bb.3:
	movl	$1, (%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_brightness                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabled workaround for brightness stepping quirk\n"

	.no_dead_strip	_check_for_stepping_quirk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_for_stepping_quirk
_check_for_stepping_quirk:              ; @check_for_stepping_quirk
	.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
	bl	_read_brightness
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_set_brightness
LBB0_2:
	mov	x0, x19
	bl	_read_brightness
	cmp	w0, #2
	mov	w8, #-2
	cneg	w8, w8, le
	add	w21, w8, w0
	str	wzr, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_set_brightness
	mov	x0, x19
	bl	_read_brightness
	cmp	w0, w21
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_4:
	mov	x0, x19
	mov	x1, 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	_set_brightness
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabled workaround for brightness stepping quirk\n"

	.no_dead_strip	_check_for_stepping_quirk
.subsections_via_symbols
