	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsl2563_write_thresh
_tsl2563_write_thresh:                  ## @tsl2563_write_thresh
	.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, %ebx
	movl	%ecx, %r14d
	callq	_iio_priv
	movq	%rax, %r12
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_TSL2563_REG_HIGHLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TSL2563_REG_LOWLOW@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	12(%r12), %edi
	movq	_TSL2563_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%r13d, %esi
	movzbl	%bl, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%ebx, %ecx
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	12(%r12), %edi
	incl	%r13d
	movq	_TSL2563_CMD@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movzbl	%ch, %edx
	movl	%r13d, %esi
	movl	%ecx, %r13d
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	xorl	%eax, %eax
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	setne	%al
	movl	%r13d, (%r12,%rax,4)
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_TSL2563_REG_HIGHLOW,4,2        ## @TSL2563_REG_HIGHLOW
	.comm	_TSL2563_REG_LOWLOW,4,2         ## @TSL2563_REG_LOWLOW
	.comm	_TSL2563_CMD,4,2                ## @TSL2563_CMD
	.no_dead_strip	_tsl2563_write_thresh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsl2563_write_thresh
_tsl2563_write_thresh:                  ; @tsl2563_write_thresh
	.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	x19, x5
	mov	x20, x3
	bl	_iio_priv
	mov	x21, x0
Lloh0:
	adrp	x24, _IIO_EV_DIR_RISING@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IIO_EV_DIR_RISING@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x9, _TSL2563_REG_HIGHLOW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TSL2563_REG_HIGHLOW@GOTPAGEOFF]
Lloh4:
	adrp	x10, _TSL2563_REG_LOWLOW@GOTPAGE
Lloh5:
	ldr	x10, [x10, _TSL2563_REG_LOWLOW@GOTPAGEOFF]
	cmp	w8, w20
	csel	x8, x9, x10, eq
	ldr	w25, [x8]
	add	x22, x0, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w0, [x21, #12]
Lloh6:
	adrp	x26, _TSL2563_CMD@GOTPAGE
Lloh7:
	ldr	x26, [x26, _TSL2563_CMD@GOTPAGEOFF]
	ldr	w8, [x26]
	orr	w1, w8, w25
	and	w2, w19, #0xff
	bl	_i2c_smbus_write_byte_data
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21, #12]
	ldr	w8, [x26]
	add	w9, w25, #1
	orr	w1, w8, w9
	ubfx	w2, w19, #8, #8
	bl	_i2c_smbus_write_byte_data
	mov	x23, x0
	ldr	w8, [x24]
	cmp	w8, w20
	cset	w8, ne
	str	w19, [x21, w8, uxtw #2]
LBB0_2:
	mov	x0, x22
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_TSL2563_REG_HIGHLOW,4,2        ; @TSL2563_REG_HIGHLOW
	.comm	_TSL2563_REG_LOWLOW,4,2         ; @TSL2563_REG_LOWLOW
	.comm	_TSL2563_CMD,4,2                ; @TSL2563_CMD
	.no_dead_strip	_tsl2563_write_thresh
.subsections_via_symbols
