	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk8ba50_write_raw
_stk8ba50_write_raw:                    ## @stk8ba50_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
	callq	_iio_priv
	movq	%rax, %r14
	cmpq	$128, %rbx
	je	LBB0_6
## %bb.1:
	cmpq	$129, %rbx
	jne	LBB0_11
## %bb.2:
	movq	_stk8ba50_samp_freq_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:
	movl	$8, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r12d, -4(%rdi,%rbx)
	je	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$12, %rbx
	cmpq	%rax, %r13
	jl	LBB0_4
	jmp	LBB0_11
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_stk8ba50_scale_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.8:
	movl	$8, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpl	%r15d, -8(%rdi,%rbx)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$12, %rbx
	cmpq	%rax, %r13
	jl	LBB0_9
	jmp	LBB0_11
LBB0_15:
	movq	8(%r14), %rax
	movq	_STK8BA50_REG_BWSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rdi,%rbx), %edx
	movq	%rax, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_16
## %bb.17:
	movl	%r13d, 4(%r14)
	jmp	LBB0_18
LBB0_12:
	movq	8(%r14), %rax
	movq	_STK8BA50_REG_RANGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rdi,%rbx), %edx
	movq	%rax, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movl	%r13d, (%r14)
	jmp	LBB0_18
LBB0_16:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
LBB0_13:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_stk8ba50_scale_table,8,3       ## @stk8ba50_scale_table
	.comm	_STK8BA50_REG_RANGE,4,2         ## @STK8BA50_REG_RANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set measurement range\n"

	.comm	_stk8ba50_samp_freq_table,8,3   ## @stk8ba50_samp_freq_table
	.comm	_STK8BA50_REG_BWSEL,4,2         ## @STK8BA50_REG_BWSEL
L_.str.1:                               ## @.str.1
	.asciz	"failed to set sampling rate\n"

	.no_dead_strip	_stk8ba50_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk8ba50_write_raw
_stk8ba50_write_raw:                    ; @stk8ba50_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	x22, x4
	mov	x21, x3
	mov	x20, x2
	bl	_iio_priv
	mov	x19, x0
	cmp	x22, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	x22, #129
	b.ne	LBB0_7
; %bb.2:
Lloh0:
	adrp	x22, _stk8ba50_samp_freq_table@GOTPAGE
Lloh1:
	ldr	x22, [x22, _stk8ba50_samp_freq_table@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x23, #0
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	add	x8, x0, x23
	ldr	w9, [x8, #4]
	cmp	w9, w20
	b.eq	LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #12
	cmp	x21, w0, sxtw
	b.lt	LBB0_4
	b	LBB0_7
LBB0_6:
	cbz	w20, LBB0_9
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	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
LBB0_9:
Lloh5:
	adrp	x20, _stk8ba50_scale_table@GOTPAGE
Lloh6:
	ldr	x20, [x20, _stk8ba50_scale_table@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.10:
	mov	x23, #0
	mov	x22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w8, [x0, x23]
	cmp	w8, w21
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #12
	cmp	x22, w0, sxtw
	b.lt	LBB0_11
	b	LBB0_7
LBB0_13:
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x9, _STK8BA50_REG_BWSEL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _STK8BA50_REG_BWSEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	ldr	w2, [x8, #8]
	bl	_i2c_smbus_write_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_17
; %bb.14:
	str	w21, [x19, #4]
	b	LBB0_8
LBB0_15:
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _STK8BA50_REG_RANGE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _STK8BA50_REG_RANGE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x9]
	add	x9, x0, x23
	ldr	w2, [x9, #8]
	mov	x0, x8
	bl	_i2c_smbus_write_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_18
; %bb.16:
	str	w22, [x19]
	b	LBB0_8
LBB0_17:
	ldr	x0, [x19, #8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_18:
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_stk8ba50_scale_table,8,3       ; @stk8ba50_scale_table
	.comm	_STK8BA50_REG_RANGE,4,2         ; @STK8BA50_REG_RANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set measurement range\n"

	.comm	_stk8ba50_samp_freq_table,8,3   ; @stk8ba50_samp_freq_table
	.comm	_STK8BA50_REG_BWSEL,4,2         ; @STK8BA50_REG_BWSEL
l_.str.1:                               ; @.str.1
	.asciz	"failed to set sampling rate\n"

	.no_dead_strip	_stk8ba50_write_raw
.subsections_via_symbols
