	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcs3472_write_event_config
_tcs3472_write_event_config:            ## @tcs3472_write_event_config
	.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	%r8d, %r14d
	callq	_iio_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	4(%rbx), %r15d
	movq	_TCS3472_ENABLE_AIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	notl	%eax
	andl	%r15d, %eax
	orl	%r15d, %edx
	testl	%r14d, %r14d
	cmovel	%eax, %edx
	movl	%edx, 4(%rbx)
	xorl	%r14d, %r14d
	cmpl	%edx, %r15d
	je	LBB0_3
## %bb.1:
	movl	8(%rbx), %edi
	movq	_TCS3472_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%r15d, 4(%rbx)
	movl	%eax, %r14d
LBB0_3:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCS3472_ENABLE_AIEN,4,2        ## @TCS3472_ENABLE_AIEN
	.comm	_TCS3472_ENABLE,4,2             ## @TCS3472_ENABLE
	.no_dead_strip	_tcs3472_write_event_config
.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_config
_tcs3472_write_event_config:            ; @tcs3472_write_event_config
	.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	x20, x4
	bl	_iio_priv
	mov	x19, x0
	bl	_mutex_lock
	ldr	w21, [x19, #4]
Lloh0:
	adrp	x8, _TCS3472_ENABLE_AIEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCS3472_ENABLE_AIEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w9, w21, w8
	orr	w8, w8, w21
	cmp	w20, #0
	csel	w2, w9, w8, eq
	str	w2, [x19, #4]
	cmp	w21, w2
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_4
LBB0_2:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _TCS3472_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TCS3472_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_i2c_smbus_write_byte_data
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	str	w21, [x19, #4]
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TCS3472_ENABLE_AIEN,4,2        ; @TCS3472_ENABLE_AIEN
	.comm	_TCS3472_ENABLE,4,2             ; @TCS3472_ENABLE
	.no_dead_strip	_tcs3472_write_event_config
.subsections_via_symbols
