	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si1145_read_raw
_si1145_read_raw:                       ## @si1145_read_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
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_iio_priv
	addq	$-134, %rbx
	cmpq	$3, %rbx
	ja	LBB0_17
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	movl	$-129, %edx
	addl	(%r15), %edx
	cmpl	$3, %edx
	ja	LBB0_17
## %bb.3:
	movq	_SI1145_PARAM_PS_ADC_GAIN@GOTPCREL(%rip), %rcx
	leaq	LJTI0_1(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_4:
	movl	$0, (%r14)
	movl	$10000, (%r12)                  ## imm = 0x2710
	jmp	LBB0_19
LBB0_5:
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_si1145_read_samp_freq          ## TAILCALL
LBB0_6:
	movl	(%r15), %ecx
	leal	-128(%rcx), %edx
	cmpl	$5, %edx
	jae	LBB0_13
## %bb.7:
	movq	%r13, %rdi
	callq	_iio_device_claim_direct_mode
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_28
## %bb.8:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_si1145_measure
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_iio_device_release_direct_mode
	testl	%r12d, %r12d
	jns	LBB0_16
	jmp	LBB0_28
LBB0_9:
	cmpl	$130, (%r15)
	jne	LBB0_11
## %bb.10:
	movl	$-10517, (%r14)                 ## imm = 0xD6EB
	jmp	LBB0_26
LBB0_11:
	movq	_SI1145_PARAM_ADC_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_si1145_param_query
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_28
## %bb.12:
	movl	%r12d, %edi
	callq	_si1145_uncompress
	negl	%eax
	jmp	LBB0_25
LBB0_13:
	cmpl	$133, %ecx
	jne	LBB0_17
## %bb.14:
	movl	(%rax), %ebx
	movl	8(%r15), %edi
	callq	_SI1145_PS_LED_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_28
## %bb.15:
	movl	8(%r15), %edi
	callq	_SI1145_PS_LED_SHIFT
	movl	%eax, %ecx
	shrl	%cl, %r12d
	andl	$15, %r12d
LBB0_16:
	movl	%r12d, (%r14)
	jmp	LBB0_26
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_28
LBB0_18:
	movl	$28, (%r14)
	movl	$571429, (%r12)                 ## imm = 0x8B825
LBB0_19:
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_20:
	movl	4(%r15), %ecx
	movq	_IIO_MOD_LIGHT_IR@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_22
## %bb.21:
	movq	_SI1145_PARAM_ALSIR_ADC_GAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_23
LBB0_22:
	movq	_SI1145_PARAM_ALSVIS_ADC_GAIN@GOTPCREL(%rip), %rcx
LBB0_23:
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_si1145_param_query
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_28
## %bb.24:
	andl	$7, %r12d
	movl	%r12d, %edi
	callq	_si1145_scale_from_adcgain
LBB0_25:
	movl	%eax, (%r14)
LBB0_26:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %r12d
LBB0_28:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_9
.set L0_1_set_4, LBB0_4-LJTI0_1
.set L0_1_set_18, LBB0_18-LJTI0_1
.set L0_1_set_23, LBB0_23-LJTI0_1
.set L0_1_set_20, LBB0_20-LJTI0_1
LJTI0_1:
	.long	L0_1_set_4
	.long	L0_1_set_18
	.long	L0_1_set_23
	.long	L0_1_set_20
	.end_data_region
                                        ## -- End function
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SI1145_PARAM_PS_ADC_GAIN,4,2   ## @SI1145_PARAM_PS_ADC_GAIN
	.comm	_IIO_MOD_LIGHT_IR,4,2           ## @IIO_MOD_LIGHT_IR
	.comm	_SI1145_PARAM_ALSIR_ADC_GAIN,4,2 ## @SI1145_PARAM_ALSIR_ADC_GAIN
	.comm	_SI1145_PARAM_ALSVIS_ADC_GAIN,4,2 ## @SI1145_PARAM_ALSVIS_ADC_GAIN
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_SI1145_PARAM_ADC_OFFSET,4,2    ## @SI1145_PARAM_ADC_OFFSET
	.no_dead_strip	_si1145_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si1145_read_raw
_si1145_read_raw:                       ; @si1145_read_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	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_iio_priv
	sub	x8, x23, #134
	cmp	x8, #3
	b.hi	LBB0_17
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [x21]
	sub	w9, w8, #129
	cmp	w9, #3
	b.hi	LBB0_17
; %bb.3:
Lloh2:
	adrp	x8, _SI1145_PARAM_PS_ADC_GAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SI1145_PARAM_PS_ADC_GAIN@GOTPAGEOFF]
Lloh4:
	adrp	x10, lJTI0_1@PAGE
Lloh5:
	add	x10, x10, lJTI0_1@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
	str	wzr, [x19]
	mov	w8, #10000
	b	LBB0_19
LBB0_5:
	mov	x1, x19
	mov	x2, 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
	b	_si1145_read_samp_freq
LBB0_6:
	ldr	w8, [x21]
	sub	w9, w8, #128
	cmp	w9, #5
	b.hs	LBB0_14
; %bb.7:
	mov	x0, x22
	bl	_iio_device_claim_direct_mode
	mov	x20, x0
	cbnz	w0, LBB0_25
; %bb.8:
	mov	x0, x22
	mov	x1, x21
	bl	_si1145_measure
	mov	x20, x0
	mov	x0, x22
	bl	_iio_device_release_direct_mode
	tbnz	w20, #31, LBB0_25
; %bb.9:
	str	w20, [x19]
	b	LBB0_23
LBB0_10:
	ldr	w8, [x21]
	cmp	w8, #130
	b.ne	LBB0_12
; %bb.11:
	mov	w8, #-10517
	str	w8, [x19]
	b	LBB0_23
LBB0_12:
Lloh6:
	adrp	x8, _SI1145_PARAM_ADC_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SI1145_PARAM_ADC_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_si1145_param_query
	mov	x20, x0
	tbnz	w0, #31, LBB0_25
; %bb.13:
	mov	x0, x20
	bl	_si1145_uncompress
	neg	w8, w0
	str	w8, [x19]
	b	LBB0_23
LBB0_14:
	cmp	w8, #133
	b.ne	LBB0_17
; %bb.15:
	ldr	w20, [x0]
	ldr	w0, [x21, #8]
	bl	_SI1145_PS_LED_REG
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_25
; %bb.16:
	ldr	w0, [x21, #8]
	bl	_SI1145_PS_LED_SHIFT
	lsr	w8, w20, w0
	and	w8, w8, #0xf
	str	w8, [x19]
	b	LBB0_23
LBB0_17:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_25
LBB0_18:
	mov	w8, #28
	str	w8, [x19]
	mov	w8, #47141
	movk	w8, #8, lsl #16
LBB0_19:
	str	w8, [x20]
Lloh12:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
	b	LBB0_24
LBB0_20:
	ldr	w8, [x21, #4]
Lloh14:
	adrp	x9, _IIO_MOD_LIGHT_IR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IIO_MOD_LIGHT_IR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _SI1145_PARAM_ALSVIS_ADC_GAIN@GOTPAGE
Lloh18:
	ldr	x10, [x10, _SI1145_PARAM_ALSVIS_ADC_GAIN@GOTPAGEOFF]
Lloh19:
	adrp	x11, _SI1145_PARAM_ALSIR_ADC_GAIN@GOTPAGE
Lloh20:
	ldr	x11, [x11, _SI1145_PARAM_ALSIR_ADC_GAIN@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x11, x10, eq
LBB0_21:
	ldr	w1, [x8]
	bl	_si1145_param_query
	mov	x20, x0
	tbnz	w0, #31, LBB0_25
; %bb.22:
	and	w0, w20, #0x7
	bl	_si1145_scale_from_adcgain
	str	w0, [x19]
LBB0_23:
Lloh21:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
LBB0_24:
	ldr	w20, [x8]
LBB0_25:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
lJTI0_1:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_18-LBB0_4)>>2
	.byte	(LBB0_21-LBB0_4)>>2
	.byte	(LBB0_20-LBB0_4)>>2
                                        ; -- End function
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SI1145_PARAM_PS_ADC_GAIN,4,2   ; @SI1145_PARAM_PS_ADC_GAIN
	.comm	_IIO_MOD_LIGHT_IR,4,2           ; @IIO_MOD_LIGHT_IR
	.comm	_SI1145_PARAM_ALSIR_ADC_GAIN,4,2 ; @SI1145_PARAM_ALSIR_ADC_GAIN
	.comm	_SI1145_PARAM_ALSVIS_ADC_GAIN,4,2 ; @SI1145_PARAM_ALSVIS_ADC_GAIN
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_SI1145_PARAM_ADC_OFFSET,4,2    ; @SI1145_PARAM_ADC_OFFSET
	.no_dead_strip	_si1145_read_raw
.subsections_via_symbols
