	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	(%rdi), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_3
## %bb.1:
	movl	%eax, %ecx
	addl	$-130, %ecx
	cmpl	$1, %ecx
	ja	LBB0_12
## %bb.2:
	movaps	l___const.setbrightness.i2cOV+16(%rip), %xmm0
	movaps	%xmm0, -32(%rbp)
	movaps	l___const.setbrightness.i2cOV(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	_sensor_data@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -44(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -36(%rbp)
	leaq	-48(%rbp), %rsi
	jmp	LBB0_10
LBB0_3:
	movaps	l___const.setbrightness.i2cpbright+16(%rip), %xmm0
	movaps	%xmm0, -32(%rbp)
	movaps	l___const.setbrightness.i2cpbright(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	l___const.setbrightness.i2cpdoit+16(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	l___const.setbrightness.i2cpdoit(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	cmpl	$129, %eax
	jne	LBB0_5
## %bb.4:
	movl	$7, -40(%rbp)
	movl	$19, -72(%rbp)
LBB0_5:
	movl	4(%rbx), %eax
	cmpl	$126, %eax
	jg	LBB0_7
## %bb.6:
	movl	$1, -36(%rbp)
	movl	$127, %ecx
	subl	%eax, %ecx
	jmp	LBB0_8
LBB0_7:
	addl	$-127, %eax
	movl	%eax, %ecx
LBB0_8:
	movl	%ecx, -32(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_i2c_w
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	leaq	-80(%rbp), %rsi
LBB0_10:
	movq	%rbx, %rdi
	callq	_i2c_w
	testl	%eax, %eax
	jns	LBB0_12
LBB0_11:
	movq	_D_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.setbrightness.i2cOV
l___const.setbrightness.i2cOV:
	.long	160                             ## 0xa0
	.long	0                               ## 0x0
	.long	6                               ## 0x6
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	16                              ## 0x10

	.comm	_sensor_data,8,3                ## @sensor_data
	.p2align	4                               ## @__const.setbrightness.i2cpbright
l___const.setbrightness.i2cpbright:
	.long	176                             ## 0xb0
	.long	64                              ## 0x40
	.long	11                              ## 0xb
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	22                              ## 0x16

	.p2align	4                               ## @__const.setbrightness.i2cpdoit
l___const.setbrightness.i2cpdoit:
	.long	160                             ## 0xa0
	.long	64                              ## 0x40
	.long	17                              ## 0x11
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	22                              ## 0x16

	.comm	_D_ERR,4,2                      ## @D_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c error brightness"

	.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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w8, [x0]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_3
; %bb.1:
	sub	w9, w8, #130
	cmp	w9, #1
	b.hi	LBB0_12
; %bb.2:
Lloh3:
	adrp	x9, l___const.setbrightness.i2cOV@PAGE
Lloh4:
	add	x9, x9, l___const.setbrightness.i2cOV@PAGEOFF
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp, #32]
Lloh5:
	adrp	x9, _sensor_data@GOTPAGE
Lloh6:
	ldr	x9, [x9, _sensor_data@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	ldr	w9, [x19, #4]
	str	w8, [sp, #36]
	str	w9, [sp, #44]
	add	x1, sp, #32
	b	LBB0_10
LBB0_3:
Lloh8:
	adrp	x9, l___const.setbrightness.i2cpbright@PAGE
Lloh9:
	add	x9, x9, l___const.setbrightness.i2cpbright@PAGEOFF
	ldp	q0, q1, [x9]
Lloh10:
	adrp	x9, l___const.setbrightness.i2cpdoit@PAGE
Lloh11:
	add	x9, x9, l___const.setbrightness.i2cpdoit@PAGEOFF
	stp	q0, q1, [sp, #32]
	ldp	q0, q1, [x9]
	stp	q0, q1, [sp]
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #7
	str	w8, [sp, #40]
	mov	w8, #19
	str	w8, [sp, #8]
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #126
	b.gt	LBB0_7
; %bb.6:
	mov	w9, #1
	str	w9, [sp, #44]
	mov	w9, #127
	sub	w8, w9, w8
	b	LBB0_8
LBB0_7:
	sub	w8, w8, #127
LBB0_8:
	str	w8, [sp, #48]
	add	x1, sp, #32
	mov	x0, x19
	bl	_i2c_w
	tbnz	w0, #31, LBB0_11
; %bb.9:
	mov	x1, sp
LBB0_10:
	mov	x0, x19
	bl	_i2c_w
	tbz	w0, #31, LBB0_12
LBB0_11:
Lloh12:
	adrp	x8, _D_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _D_ERR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
LBB0_12:
	ldur	x8, [x29, #-24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.setbrightness.i2cOV
l___const.setbrightness.i2cOV:
	.long	160                             ; 0xa0
	.long	0                               ; 0x0
	.long	6                               ; 0x6
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	16                              ; 0x10

	.comm	_sensor_data,8,3                ; @sensor_data
	.p2align	2                               ; @__const.setbrightness.i2cpbright
l___const.setbrightness.i2cpbright:
	.long	176                             ; 0xb0
	.long	64                              ; 0x40
	.long	11                              ; 0xb
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	22                              ; 0x16

	.p2align	2                               ; @__const.setbrightness.i2cpdoit
l___const.setbrightness.i2cpdoit:
	.long	160                             ; 0xa0
	.long	64                              ; 0x40
	.long	17                              ; 0x11
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	22                              ; 0x16

	.comm	_D_ERR,4,2                      ; @D_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c error brightness"

	.no_dead_strip	_setbrightness
.subsections_via_symbols
