	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isl29018_write_raw
_isl29018_write_raw:                    ## @isl29018_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	callq	_iio_priv
	movq	%rax, %r12
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	leaq	8(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpq	$0, 16(%r12)
	je	LBB0_4
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %r15d
LBB0_2:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_3:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rcx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	cmpq	$128, %r13
	je	LBB0_9
## %bb.5:
	cmpq	$129, %r13
	je	LBB0_11
## %bb.6:
	cmpq	$130, %r13
	jne	LBB0_2
## %bb.7:
	movl	(%rcx), %eax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_3
## %bb.8:
	movl	%esi, (%r12)
	movl	%r14d, 4(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_3
LBB0_9:
	movl	(%rcx), %eax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_3
## %bb.10:
	movl	%r14d, %edx
	movq	%r12, %rdi
	callq	_isl29018_set_scale
	jmp	LBB0_14
LBB0_11:
	testl	%esi, %esi
	jne	LBB0_2
## %bb.12:
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, (%rcx)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_3
## %bb.13:
	movl	%r14d, %esi
	movq	%r12, %rdi
	callq	_isl29018_set_integration_time
LBB0_14:
	movl	%eax, %r15d
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IIO_LIGHT,4,2                  ## @IIO_LIGHT
	.no_dead_strip	_isl29018_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isl29018_write_raw
_isl29018_write_raw:                    ; @isl29018_write_raw
	.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	x25, x4
	mov	x20, x3
	mov	x23, x2
	mov	x24, x1
	bl	_iio_priv
	mov	x22, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
LBB0_3:
	neg	w21, w21
	cmp	x25, #128
	b.eq	LBB0_8
; %bb.4:
	cmp	x25, #129
	b.eq	LBB0_10
; %bb.5:
	cmp	x25, #130
	b.ne	LBB0_2
; %bb.6:
	ldr	w8, [x24]
Lloh6:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.7:
	mov	w21, #0
	stp	w23, w20, [x22]
	b	LBB0_2
LBB0_8:
	ldr	w8, [x24]
Lloh9:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.9:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	bl	_isl29018_set_scale
	b	LBB0_13
LBB0_10:
	cbnz	w23, LBB0_2
; %bb.11:
	ldr	w8, [x24]
Lloh12:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.12:
	mov	x0, x22
	mov	x1, x20
	bl	_isl29018_set_integration_time
LBB0_13:
	mov	x21, x0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IIO_LIGHT,4,2                  ; @IIO_LIGHT
	.no_dead_strip	_isl29018_write_raw
.subsections_via_symbols
