	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sensor_set_light_freq
_sensor_set_light_freq:                 ## @sensor_set_light_freq
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpl	$50, %r15d
	je	LBB0_3
## %bb.1:
	cmpl	$60, %r15d
	jne	LBB0_2
LBB0_3:
	movl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$8, %eax
	ja	LBB0_8
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$5, %edi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_EPERM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_5:
	xorl	%eax, %eax
	xorl	%edx, %edx
	cmpl	$60, %r15d
	setne	%dl
	movl	$172, %ebx
	cmovel	%eax, %ebx
	shll	$7, %edx
	movq	%r14, %rdi
	movl	$42, %esi
	movl	$128, %ecx
	callq	_i2c_w_mask
	movq	%r14, %rdi
	movl	$43, %esi
	movl	%ebx, %edx
	callq	_i2c_w
	movq	%r14, %rdi
	movl	$118, %esi
	movl	$1, %edx
	movl	$1, %ecx
	jmp	LBB0_11
LBB0_6:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	cmpl	$60, %r15d
	setne	%bl
	sete	%dl
	shll	$7, %edx
	orl	$40, %edx
	movq	%r14, %rdi
	movl	$43, %esi
	callq	_i2c_w
	shll	$5, %ebx
	orl	$132, %ebx
	movq	%r14, %rdi
	movl	$42, %esi
	movl	%ebx, %edx
	callq	_i2c_w
	jmp	LBB0_12
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	xorl	%edx, %edx
	cmpl	$60, %r15d
	setne	%dl
	movl	$172, %ebx
	cmovel	%eax, %ebx
	shll	$7, %edx
	movq	%r14, %rdi
	movl	$42, %esi
	movl	$128, %ecx
	callq	_i2c_w_mask
	movq	%r14, %rdi
	movl	$43, %esi
	movl	%ebx, %edx
	callq	_i2c_w
	movq	%r14, %rdi
	movl	$19, %esi
	movl	$16, %edx
	movl	$16, %ecx
	callq	_i2c_w_mask
	movq	%r14, %rdi
	movl	$19, %esi
	xorl	%edx, %edx
	movl	$16, %ecx
LBB0_11:
	callq	_i2c_w_mask
LBB0_12:
	movl	%r15d, 4(%r14)
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_10
	.long	L0_0_set_6
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d Hz"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid light freq (%d Hz)"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Unsupported with this sensor"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.3:                               ## @.str.3
	.asciz	"Sensor not supported for set_light_freq"

	.no_dead_strip	_sensor_set_light_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sensor_set_light_freq
_sensor_set_light_freq:                 ; @sensor_set_light_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	str	x19, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
	cmp	w19, #50
	b.eq	LBB0_2
; %bb.1:
	cmp	w19, #60
	b.ne	LBB0_5
LBB0_2:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #8
	b.hi	LBB0_10
; %bb.3:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #5
	bl	_PDEBUG
Lloh6:
	adrp	x8, _EPERM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_8:
	cmp	w19, #60
	cset	w8, ne
	lsl	w2, w8, #7
	mov	w8, #172
	csel	w21, wzr, w8, eq
	mov	x0, x20
	mov	w1, #42
	mov	w3, #128
	bl	_i2c_w_mask
	mov	x0, x20
	mov	w1, #43
	mov	x2, x21
	bl	_i2c_w
	mov	x0, x20
	mov	w1, #118
	mov	w2, #1
	mov	w3, #1
	b	LBB0_12
LBB0_9:
	mov	w8, #40
	mov	w9, #168
	cmp	w19, #60
	csel	w2, w9, w8, eq
	mov	w8, #164
	mov	w9, #132
	csel	w21, w9, w8, eq
	mov	x0, x20
	mov	w1, #43
	bl	_i2c_w
	mov	x0, x20
	mov	w1, #42
	mov	x2, x21
	bl	_i2c_w
	b	LBB0_13
LBB0_10:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_11:
	cmp	w19, #60
	cset	w8, ne
	lsl	w2, w8, #7
	mov	w8, #172
	csel	w21, wzr, w8, eq
	mov	x0, x20
	mov	w1, #42
	mov	w3, #128
	bl	_i2c_w_mask
	mov	x0, x20
	mov	w1, #43
	mov	x2, x21
	bl	_i2c_w
	mov	x0, x20
	mov	w1, #19
	mov	w2, #16
	mov	w3, #16
	bl	_i2c_w_mask
	mov	x0, x20
	mov	w1, #19
	mov	w2, #0
	mov	w3, #16
LBB0_12:
	bl	_i2c_w_mask
LBB0_13:
	mov	w0, #0
	str	w19, [x20, #4]
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d Hz"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid light freq (%d Hz)"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Unsupported with this sensor"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.3:                               ; @.str.3
	.asciz	"Sensor not supported for set_light_freq"

	.no_dead_strip	_sensor_set_light_freq
.subsections_via_symbols
