	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kxcjk1013_set_range
_kxcjk1013_set_range:                   ## @kxcjk1013_set_range
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	movq	_KXCJK1013_REG_CTRL1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_KXCJK1013_REG_CTRL1_BIT_GSEL0@GOTPCREL(%rip), %rax
	movq	_KXCJK1013_REG_CTRL1_BIT_GSEL1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %ebx
	movq	_KXCJK1013_scale_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,8), %esi
	movl	4(%rax,%rcx,8), %edx
	shll	$3, %esi
	orl	%ebx, %esi
	shll	$4, %edx
	orl	%esi, %edx
	movq	8(%r14), %rdi
	movl	(%r12), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	%r15d, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KXCJK1013_REG_CTRL1,4,2        ## @KXCJK1013_REG_CTRL1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading reg_ctrl1\n"

	.comm	_KXCJK1013_REG_CTRL1_BIT_GSEL0,4,2 ## @KXCJK1013_REG_CTRL1_BIT_GSEL0
	.comm	_KXCJK1013_REG_CTRL1_BIT_GSEL1,4,2 ## @KXCJK1013_REG_CTRL1_BIT_GSEL1
	.comm	_KXCJK1013_scale_table,8,3      ## @KXCJK1013_scale_table
L_.str.1:                               ## @.str.1
	.asciz	"Error writing reg_ctrl1\n"

	.no_dead_strip	_kxcjk1013_set_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kxcjk1013_set_range
_kxcjk1013_set_range:                   ; @kxcjk1013_set_range
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x22, _KXCJK1013_REG_CTRL1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _KXCJK1013_REG_CTRL1@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _KXCJK1013_REG_CTRL1_BIT_GSEL0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KXCJK1013_REG_CTRL1_BIT_GSEL0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _KXCJK1013_REG_CTRL1_BIT_GSEL1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KXCJK1013_REG_CTRL1_BIT_GSEL1@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w20, w8
Lloh8:
	adrp	x9, _KXCJK1013_scale_table@GOTPAGE
Lloh9:
	ldr	x9, [x9, _KXCJK1013_scale_table@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x9, x9, w21, sxtw #3
	ldp	w10, w9, [x9]
	orr	w8, w8, w10, lsl #3
	orr	w2, w8, w9, lsl #4
	ldr	x0, [x19, #8]
	ldr	w1, [x22]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w20, #0
	str	w21, [x19]
	b	LBB0_6
LBB0_3:
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_dev_err
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_KXCJK1013_REG_CTRL1,4,2        ; @KXCJK1013_REG_CTRL1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading reg_ctrl1\n"

	.comm	_KXCJK1013_REG_CTRL1_BIT_GSEL0,4,2 ; @KXCJK1013_REG_CTRL1_BIT_GSEL0
	.comm	_KXCJK1013_REG_CTRL1_BIT_GSEL1,4,2 ; @KXCJK1013_REG_CTRL1_BIT_GSEL1
	.comm	_KXCJK1013_scale_table,8,3      ; @KXCJK1013_scale_table
l_.str.1:                               ; @.str.1
	.asciz	"Error writing reg_ctrl1\n"

	.no_dead_strip	_kxcjk1013_set_range
.subsections_via_symbols
