	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsl2583_write_raw
_tsl2583_write_raw:                     ## @tsl2583_write_raw
	.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
	movq	%r8, %r15
	movl	%ecx, %ebx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	callq	_iio_priv
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_tsl2583_set_pm_runtime_busy
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	cmpq	$128, %r15
	je	LBB0_14
## %bb.3:
	cmpq	$129, %r15
	je	LBB0_8
## %bb.4:
	cmpq	$130, %r15
	jne	LBB0_20
## %bb.5:
	movl	(%r12), %eax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.6:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r13d
	jmp	LBB0_21
LBB0_14:
	imull	$-1030792151, %ebx, %eax        ## imm = 0xC28F5C29
	addl	$85899344, %eax                 ## imm = 0x51EB850
	rorl	%eax
	cmpl	$85899344, %eax                 ## imm = 0x51EB850
	ja	LBB0_20
## %bb.15:
	leal	-50(%rbx), %eax
	cmpl	$600, %eax                      ## imm = 0x258
	ja	LBB0_20
## %bb.16:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_20
## %bb.17:
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, (%r12)
	jne	LBB0_20
## %bb.18:
	movl	%ebx, 12(%r14)
	movq	%r14, %rdi
	callq	_tsl2583_set_als_time
	jmp	LBB0_19
LBB0_8:
	movl	(%r12), %eax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.9:
	movq	_gainadj@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_20
## %bb.10:
	xorl	%ebx, %ebx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r12d, (%rdi,%rbx,4)
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %rbx
	jb	LBB0_11
	jmp	LBB0_20
LBB0_12:
	movl	%ebx, 8(%r14)
	movq	%r14, %rdi
	callq	_tsl2583_set_als_gain
LBB0_19:
	movl	%eax, %r13d
LBB0_20:
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r13d, %r13d
	js	LBB0_21
LBB0_7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tsl2583_set_pm_runtime_busy    ## TAILCALL
LBB0_21:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IIO_LIGHT,4,2                  ## @IIO_LIGHT
	.comm	_gainadj,8,3                    ## @gainadj
	.no_dead_strip	_tsl2583_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsl2583_write_raw
_tsl2583_write_raw:                     ; @tsl2583_write_raw
	.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	x24, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	bl	_iio_priv
	mov	x19, x0
	mov	w1, #1
	bl	_tsl2583_set_pm_runtime_busy
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	cmp	x24, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	x24, #129
	b.eq	LBB0_12
; %bb.3:
	cmp	x24, #130
	b.ne	LBB0_19
; %bb.4:
	ldr	w8, [x23]
Lloh3:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.5:
	str	w21, [x19, #4]
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_20
LBB0_6:
	mov	x20, x0
	b	LBB0_21
LBB0_7:
	mov	w8, #23593
	movk	w8, #49807, lsl #16
	mov	w9, #47184
	movk	w9, #1310, lsl #16
	madd	w8, w22, w8, w9
	ror	w8, w8, #1
	cmp	w8, w9
	b.hi	LBB0_19
; %bb.8:
	sub	w8, w22, #50
	cmp	w8, #600
	b.hi	LBB0_19
; %bb.9:
	cbnz	w21, LBB0_19
; %bb.10:
	ldr	w8, [x23]
Lloh6:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.11:
	str	w22, [x19, #12]
	mov	x0, x19
	bl	_tsl2583_set_als_time
	b	LBB0_18
LBB0_12:
	ldr	w8, [x23]
Lloh9:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.13:
Lloh12:
	adrp	x22, _gainadj@GOTPAGE
Lloh13:
	ldr	x22, [x22, _gainadj@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_19
; %bb.14:
	mov	x23, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w8, [x0, x23, lsl #2]
	cmp	w8, w21
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, uxtw
	b.lo	LBB0_15
	b	LBB0_19
LBB0_17:
	str	w23, [x19, #8]
	mov	x0, x19
	bl	_tsl2583_set_als_gain
LBB0_18:
	mov	x20, x0
LBB0_19:
	mov	x0, x19
	bl	_mutex_unlock
	tbnz	w20, #31, LBB0_21
LBB0_20:
	mov	x0, x19
	mov	w1, #0
	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	_tsl2583_set_pm_runtime_busy
LBB0_21:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IIO_LIGHT,4,2                  ; @IIO_LIGHT
	.comm	_gainadj,8,3                    ; @gainadj
	.no_dead_strip	_tsl2583_write_raw
.subsections_via_symbols
