	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcs3472_write_event
_tcs3472_write_event:                   ## @tcs3472_write_event
	.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, %r12d
	movl	%r8d, %ebx
	movl	%ecx, %r13d
	callq	_iio_priv
	movq	%rax, %r15
	movq	%rax, %r14
	addq	$12, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$129, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_5
## %bb.2:
	cmpl	$130, %r13d
	je	LBB0_12
## %bb.3:
	cmpl	$131, %r13d
	jne	LBB0_5
## %bb.4:
	movl	%r13d, %ebx
	movq	_TCS3472_AILT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_18
LBB0_6:
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rax
	imull	(%rax), %r12d
	movq	_tcs3472_intr_pers@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	movl	$1, %ebx
	cmpl	$3, %eax
	jl	LBB0_10
## %bb.7:
	addl	16(%rbp), %r12d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$256, %eax                      ## imm = 0x100
	subl	20(%r15), %eax
	movq	(%r13), %rdi
	imull	(%rdi,%rbx,4), %eax
	imull	$2400, %eax, %eax               ## imm = 0x960
	cmpl	%eax, %r12d
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	decl	%eax
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_10:
	movl	16(%r15), %edi
	movq	_TCS3472_PERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.11:
	movl	%ebx, 8(%r15)
	jmp	LBB0_17
LBB0_12:
	movl	%r13d, %ebx
	movq	_TCS3472_AIHT@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movl	16(%r15), %edi
	movl	%r12d, %edx
	callq	_i2c_smbus_write_word_data
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	cmpl	$130, %ebx
	jne	LBB0_16
## %bb.15:
	movl	%r12d, (%r15)
	jmp	LBB0_17
LBB0_16:
	movl	%r12d, 4(%r15)
LBB0_17:
	xorl	%r13d, %r13d
LBB0_18:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCS3472_AIHT,4,2               ## @TCS3472_AIHT
	.comm	_TCS3472_AILT,4,2               ## @TCS3472_AILT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
	.comm	_tcs3472_intr_pers,8,3          ## @tcs3472_intr_pers
	.comm	_TCS3472_PERS,4,2               ## @TCS3472_PERS
	.no_dead_strip	_tcs3472_write_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcs3472_write_event
_tcs3472_write_event:                   ; @tcs3472_write_event
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x6
	mov	x21, x5
	mov	x24, x4
	mov	x22, x3
	bl	_iio_priv
	mov	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_mutex_lock
	cmp	w24, #129
	b.eq	LBB0_6
; %bb.1:
	cmp	w24, #128
	b.ne	LBB0_5
; %bb.2:
	cmp	w22, #130
	b.eq	LBB0_13
; %bb.3:
	cmp	w22, #131
	b.ne	LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _TCS3472_AILT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCS3472_AILT@GOTPAGEOFF]
	b	LBB0_14
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_18
LBB0_6:
Lloh5:
	adrp	x8, _USEC_PER_SEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USEC_PER_SEC@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
Lloh8:
	adrp	x22, _tcs3472_intr_pers@GOTPAGE
Lloh9:
	ldr	x22, [x22, _tcs3472_intr_pers@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #3
	b.lt	LBB0_10
; %bb.7:
	madd	w23, w24, w21, w23
	mov	w21, #1
	mov	w24, #256
	mov	w25, #2400
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #20]
	sub	w8, w24, w8
	ldr	x0, [x22]
	ldr	w9, [x0, x21, lsl #2]
	mul	w8, w8, w9
	mul	w8, w8, w25
	cmp	w23, w8
	b.le	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	sub	w8, w0, #1
	cmp	x21, w8, sxtw
	b.lt	LBB0_8
	b	LBB0_11
LBB0_10:
	mov	w21, #1
LBB0_11:
	ldr	w0, [x20, #16]
Lloh10:
	adrp	x8, _TCS3472_PERS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TCS3472_PERS@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_i2c_smbus_write_byte_data
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.12:
	str	w21, [x20, #8]
	b	LBB0_18
LBB0_13:
Lloh13:
	adrp	x8, _TCS3472_AIHT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TCS3472_AIHT@GOTPAGEOFF]
LBB0_14:
	ldr	w1, [x8]
	ldr	w0, [x20, #16]
	mov	x2, x21
	bl	_i2c_smbus_write_word_data
	mov	x23, x0
	cbnz	w0, LBB0_18
; %bb.15:
	cmp	w22, #130
	b.ne	LBB0_17
; %bb.16:
	mov	w23, #0
	str	w21, [x20]
	b	LBB0_18
LBB0_17:
	mov	w23, #0
	str	w21, [x20, #4]
LBB0_18:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_TCS3472_AIHT,4,2               ; @TCS3472_AIHT
	.comm	_TCS3472_AILT,4,2               ; @TCS3472_AILT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
	.comm	_tcs3472_intr_pers,8,3          ; @tcs3472_intr_pers
	.comm	_TCS3472_PERS,4,2               ; @TCS3472_PERS
	.no_dead_strip	_tcs3472_write_event
.subsections_via_symbols
