	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setbrightness
_setbrightness:                         ## @setbrightness
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	_CAM_TYPE_VGA@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%eax, %eax
	cmpq	%r12, %r15
	sete	%al
	leal	7(,%rax,4), %esi
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	callq	_sensor_write1
	cmpq	$0, 8(%r14)
	je	LBB0_5
LBB0_4:
	movl	%ebx, %eax
	leaq	_setbrightness.quick_clix_table(%rip), %rcx
	movl	(%rcx,%rax,4), %ebx
LBB0_5:
	xorl	%eax, %eax
	cmpq	%r12, %r15
	sete	%al
	leal	8(,%rax,4), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sensor_write1                  ## TAILCALL
LBB0_2:
	movl	$1, %edx
	callq	_sensor_write1
	movl	$257, %eax                      ## imm = 0x101
	subl	%ebx, %eax
	movl	%eax, %ebx
	cmpq	$0, 8(%r14)
	jne	LBB0_4
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @setbrightness.quick_clix_table
_setbrightness.quick_clix_table:
	.long	0                               ## 0x0
	.long	4                               ## 0x4
	.long	8                               ## 0x8
	.long	12                              ## 0xc
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	5                               ## 0x5
	.long	6                               ## 0x6
	.long	9                               ## 0x9
	.long	7                               ## 0x7
	.long	10                              ## 0xa
	.long	13                              ## 0xd
	.long	11                              ## 0xb
	.long	14                              ## 0xe
	.long	15                              ## 0xf

	.comm	_CAM_TYPE_VGA,8,3               ## @CAM_TYPE_VGA
	.no_dead_strip	_setbrightness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setbrightness
_setbrightness:                         ; @setbrightness
	.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, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _CAM_TYPE_VGA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAM_TYPE_VGA@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cmp	x21, x22
	mov	w8, #7
	mov	w9, #11
	csel	w1, w9, w8, eq
	cmp	w19, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w2, #0
	bl	_sensor_write1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _setbrightness.quick_clix_table@PAGE
Lloh4:
	add	x8, x8, _setbrightness.quick_clix_table@PAGEOFF
	ldr	w19, [x8, w19, uxtw #2]
LBB0_3:
	cmp	x21, x22
	mov	w8, #8
	mov	w9, #12
	csel	w1, w9, w8, eq
	mov	x0, x20
	mov	x2, 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	_sensor_write1
LBB0_4:
	mov	w2, #1
	bl	_sensor_write1
	mov	w8, #257
	sub	w19, w8, w19
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @setbrightness.quick_clix_table
_setbrightness.quick_clix_table:
	.long	0                               ; 0x0
	.long	4                               ; 0x4
	.long	8                               ; 0x8
	.long	12                              ; 0xc
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	5                               ; 0x5
	.long	6                               ; 0x6
	.long	9                               ; 0x9
	.long	7                               ; 0x7
	.long	10                              ; 0xa
	.long	13                              ; 0xd
	.long	11                              ; 0xb
	.long	14                              ; 0xe
	.long	15                              ; 0xf

	.comm	_CAM_TYPE_VGA,8,3               ; @CAM_TYPE_VGA
	.no_dead_strip	_setbrightness
.subsections_via_symbols
