	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max44000_write_raw
_max44000_write_raw:                    ## @max44000_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, %rbx
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, %r13
	callq	_iio_priv
	movq	%rax, %r14
	movq	_IIO_CHAN_INFO_RAW@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	(%r13), %rax
	movq	_IIO_CURRENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_max44000_write_led_current_raw
	jmp	LBB0_3
LBB0_4:
	movq	_IIO_CHAN_INFO_INT_TIME@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	(%r13), %rax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	imull	(%rax), %r12d
	addl	%r15d, %r12d
	movq	_max44000_int_time_avail_ns_array@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_find_closest_descending
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_max44000_write_alstim
	jmp	LBB0_3
LBB0_7:
	movq	_IIO_CHAN_INFO_SCALE@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_10
## %bb.8:
	movq	(%r13), %rax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rax
	imull	(%rax), %r12d
	addl	%r15d, %r12d
	movq	_max44000_scale_avail_ulux_array@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_find_closest
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_max44000_write_alspga
LBB0_3:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_CHAN_INFO_RAW,8,3          ## @IIO_CHAN_INFO_RAW
	.comm	_IIO_CURRENT,8,3                ## @IIO_CURRENT
	.comm	_IIO_CHAN_INFO_INT_TIME,8,3     ## @IIO_CHAN_INFO_INT_TIME
	.comm	_IIO_LIGHT,8,3                  ## @IIO_LIGHT
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_max44000_int_time_avail_ns_array,4,2 ## @max44000_int_time_avail_ns_array
	.comm	_IIO_CHAN_INFO_SCALE,8,3        ## @IIO_CHAN_INFO_SCALE
	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
	.comm	_max44000_scale_avail_ulux_array,4,2 ## @max44000_scale_avail_ulux_array
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max44000_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max44000_write_raw
_max44000_write_raw:                    ; @max44000_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	x23, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _IIO_CHAN_INFO_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_CHAN_INFO_RAW@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _IIO_CURRENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_CURRENT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	bl	_max44000_write_led_current_raw
	b	LBB0_9
LBB0_3:
Lloh6:
	adrp	x8, _IIO_CHAN_INFO_INT_TIME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_CHAN_INFO_INT_TIME@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x22]
Lloh9:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh12:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	madd	w20, w8, w20, w21
Lloh15:
	adrp	x8, _max44000_int_time_avail_ns_array@GOTPAGE
Lloh16:
	ldr	x8, [x8, _max44000_int_time_avail_ns_array@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_find_closest_descending
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	bl	_max44000_write_alstim
	b	LBB0_9
LBB0_6:
Lloh18:
	adrp	x8, _IIO_CHAN_INFO_SCALE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IIO_CHAN_INFO_SCALE@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x22]
Lloh21:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
Lloh24:
	adrp	x8, _USEC_PER_SEC@GOTPAGE
Lloh25:
	ldr	x8, [x8, _USEC_PER_SEC@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	madd	w20, w8, w20, w21
Lloh27:
	adrp	x8, _max44000_scale_avail_ulux_array@GOTPAGE
Lloh28:
	ldr	x8, [x8, _max44000_scale_avail_ulux_array@GOTPAGEOFF]
Lloh29:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_find_closest
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	bl	_max44000_write_alspga
LBB0_9:
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	b	LBB0_11
LBB0_10:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_CHAN_INFO_RAW,8,3          ; @IIO_CHAN_INFO_RAW
	.comm	_IIO_CURRENT,8,3                ; @IIO_CURRENT
	.comm	_IIO_CHAN_INFO_INT_TIME,8,3     ; @IIO_CHAN_INFO_INT_TIME
	.comm	_IIO_LIGHT,8,3                  ; @IIO_LIGHT
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_max44000_int_time_avail_ns_array,4,2 ; @max44000_int_time_avail_ns_array
	.comm	_IIO_CHAN_INFO_SCALE,8,3        ; @IIO_CHAN_INFO_SCALE
	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
	.comm	_max44000_scale_avail_ulux_array,4,2 ; @max44000_scale_avail_ulux_array
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max44000_write_raw
.subsections_via_symbols
