	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsl2772_write_event_value
_tsl2772_write_event_value:             ## @tsl2772_write_event_value
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	16(%rbp), %r14d
	callq	_iio_priv
	movq	%rax, %rcx
	cmpl	$129, %ebx
	je	LBB0_11
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %ebx
	jne	LBB0_17
## %bb.2:
	movl	(%r13), %edx
	movq	_IIO_INTENSITY@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_7
## %bb.3:
	cmpl	$131, %r12d
	je	LBB0_6
## %bb.4:
	cmpl	$130, %r12d
	jne	LBB0_17
## %bb.5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rcx)
	jmp	LBB0_16
LBB0_11:
	movl	(%r13), %esi
	movq	_IIO_INTENSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%eax, %eax
	cmpl	%edi, %esi
	sete	%al
	movl	$256, %ebx                      ## imm = 0x100
	subl	32(%rcx,%rax,4), %ebx
	movq	_tsl2772_int_time_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rdx
	movq	(%rax,%rdx,8), %rdx
	imull	$1000000, -44(%rbp), %eax       ## 4-byte Folded Reload
                                        ## imm = 0xF4240
	imull	12(%rdx), %ebx
	addl	%r14d, %eax
	cltd
	idivl	%ebx
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%edi, %esi
	jne	LBB0_15
## %bb.12:
	cmpl	$4, %eax
	jl	LBB0_14
## %bb.13:
	movl	%eax, %edx
	movl	$3435973837, %eax               ## imm = 0xCCCCCCCD
	imulq	%rdx, %rax
	shrq	$34, %rax
	addl	$3, %eax
LBB0_14:
	movl	%eax, 24(%rcx)
	jmp	LBB0_16
LBB0_7:
	cmpl	$131, %r12d
	je	LBB0_10
## %bb.8:
	cmpl	$130, %r12d
	jne	LBB0_17
## %bb.9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%rcx)
	jmp	LBB0_16
LBB0_17:
	testl	%eax, %eax
	jle	LBB0_16
## %bb.18:
	negl	%eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%eax, 28(%rcx)
	jmp	LBB0_16
LBB0_6:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%rcx)
	jmp	LBB0_16
LBB0_10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%rcx)
LBB0_16:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tsl2772_invoke_change          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IIO_INTENSITY,4,2              ## @IIO_INTENSITY
	.comm	_tsl2772_int_time_avail,8,3     ## @tsl2772_int_time_avail
	.no_dead_strip	_tsl2772_write_event_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsl2772_write_event_value
_tsl2772_write_event_value:             ; @tsl2772_write_event_value
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x6
	mov	x20, x5
	mov	x24, x4
	mov	x21, x3
	mov	x23, x1
	mov	x19, x0
	bl	_iio_priv
	cmp	w24, #129
	b.eq	LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w24, #128
	b.ne	LBB0_11
; %bb.2:
	ldr	w9, [x23]
Lloh3:
	adrp	x10, _IIO_INTENSITY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IIO_INTENSITY@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_8
; %bb.3:
	cmp	w21, #131
	b.eq	LBB0_14
; %bb.4:
	cmp	w21, #130
	b.ne	LBB0_11
; %bb.5:
	str	w20, [x0, #8]
	b	LBB0_16
LBB0_6:
	ldr	w9, [x23]
Lloh6:
	adrp	x8, _IIO_INTENSITY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_INTENSITY@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x8]
	cmp	w9, w10
	mov	w8, #32
	mov	w11, #36
	csel	x8, x11, x8, eq
	ldr	w8, [x0, x8]
	mov	w11, #256
	sub	w8, w11, w8
	mov	w11, #16960
	movk	w11, #15, lsl #16
	madd	w11, w20, w11, w22
Lloh9:
	adrp	x12, _tsl2772_int_time_avail@GOTPAGE
Lloh10:
	ldr	x12, [x12, _tsl2772_int_time_avail@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
	ldr	x13, [x0]
	ldr	x12, [x12, x13, lsl #3]
	ldr	w12, [x12, #12]
	mul	w8, w12, w8
	sdiv	w8, w11, w8
	cmp	w9, w10
	b.ne	LBB0_13
; %bb.7:
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x9, w8, w9
	lsr	x9, x9, #34
	add	w9, w9, #3
	cmp	w8, #4
	csel	w8, w8, w9, lt
	str	w8, [x0, #24]
	b	LBB0_16
LBB0_8:
	cmp	w21, #131
	b.eq	LBB0_15
; %bb.9:
	cmp	w21, #130
	b.ne	LBB0_11
; %bb.10:
	str	w20, [x0, #16]
	b	LBB0_16
LBB0_11:
	cmp	w8, #0
	b.le	LBB0_16
; %bb.12:
	neg	w0, w8
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	str	w8, [x0, #28]
	b	LBB0_16
LBB0_14:
	str	w20, [x0, #12]
	b	LBB0_16
LBB0_15:
	str	w20, [x0, #20]
LBB0_16:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_tsl2772_invoke_change
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IIO_INTENSITY,4,2              ; @IIO_INTENSITY
	.comm	_tsl2772_int_time_avail,8,3     ; @tsl2772_int_time_avail
	.no_dead_strip	_tsl2772_write_event_value
.subsections_via_symbols
