	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kxsd9_write_scale
_kxsd9_write_scale:                     ## @kxsd9_write_scale
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	callq	_iio_priv
	movq	%rax, %r14
	movq	_kxsd9_micro_scales@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r15d, %r15d
	cmpl	%ebx, (%rax)
	je	LBB0_5
## %bb.1:
	movl	$1, %r15d
	cmpl	%ebx, 4(%rax)
	je	LBB0_5
## %bb.2:
	movl	$2, %r15d
	cmpl	%ebx, 8(%rax)
	je	LBB0_5
## %bb.3:
	movl	$3, %r15d
	cmpl	%ebx, 12(%rax)
	jne	LBB0_4
LBB0_5:
	movl	4(%r14), %edi
	movq	_KXSD9_REG_CTRL_C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KXSD9_CTRL_C_FS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movl	%r15d, (%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_kxsd9_micro_scales,8,3         ## @kxsd9_micro_scales
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KXSD9_REG_CTRL_C,4,2           ## @KXSD9_REG_CTRL_C
	.comm	_KXSD9_CTRL_C_FS_MASK,4,2       ## @KXSD9_CTRL_C_FS_MASK
	.no_dead_strip	_kxsd9_write_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kxsd9_write_scale
_kxsd9_write_scale:                     ; @kxsd9_write_scale
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _kxsd9_micro_scales@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kxsd9_micro_scales@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w9, w20
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_8
LBB0_2:
	ldr	w9, [x8, #4]
	cmp	w9, w20
	b.ne	LBB0_4
; %bb.3:
	mov	w20, #1
	b	LBB0_8
LBB0_4:
	ldr	w9, [x8, #8]
	cmp	w9, w20
	b.ne	LBB0_6
; %bb.5:
	mov	w20, #2
	b	LBB0_8
LBB0_6:
	ldr	w8, [x8, #12]
	cmp	w8, w20
	b.ne	LBB0_11
; %bb.7:
	mov	w20, #3
LBB0_8:
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x8, _KXSD9_REG_CTRL_C@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KXSD9_REG_CTRL_C@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _KXSD9_CTRL_C_FS_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KXSD9_CTRL_C_FS_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_10
; %bb.9:
	str	w20, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_kxsd9_micro_scales,8,3         ; @kxsd9_micro_scales
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KXSD9_REG_CTRL_C,4,2           ; @KXSD9_REG_CTRL_C
	.comm	_KXSD9_CTRL_C_FS_MASK,4,2       ; @KXSD9_CTRL_C_FS_MASK
	.no_dead_strip	_kxsd9_write_scale
.subsections_via_symbols
