	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kxcjk1013_chip_init
_kxcjk1013_chip_init:                   ## @kxcjk1013_chip_init
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	movq	_KXCJK1013_REG_WHO_AM_I@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_STANDBY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kxcjk1013_set_mode
	testl	%eax, %eax
	js	LBB0_18
## %bb.2:
	movq	8(%r14), %rdi
	movq	_KXCJK1013_REG_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movq	_KXCJK1013_REG_CTRL1_BIT_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ebx, %edx
	movq	8(%r14), %rdi
	movl	(%r15), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	_KXCJK1013_RANGE_4G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kxcjk1013_set_range
	testl	%eax, %eax
	js	LBB0_18
## %bb.5:
	movq	8(%r14), %rdi
	movq	_KXCJK1013_REG_DATA_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.6:
	movl	%ebx, (%r14)
	movq	8(%r14), %rdi
	movq	_KXCJK1013_REG_INT_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_16
## %bb.7:
	movq	_KXCJK1013_REG_INT_CTRL1_BIT_IEA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	orl	%ebx, %eax
	notl	%edx
	andl	%ebx, %edx
	cmpq	$0, 16(%r14)
	cmovnel	%eax, %edx
	movq	8(%r14), %rdi
	movl	(%r15), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_17
## %bb.8:
	movq	_OPERATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kxcjk1013_set_mode
	testl	%eax, %eax
	js	LBB0_18
## %bb.9:
	movq	_KXCJK1013_DEFAULT_WAKE_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_10:
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_19
LBB0_18:
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_12:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_19
LBB0_13:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_19
LBB0_15:
	movq	8(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_19
LBB0_16:
	movq	8(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_19
LBB0_17:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_err
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KXCJK1013_REG_WHO_AM_I,4,2     ## @KXCJK1013_REG_WHO_AM_I
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading who_am_i\n"

L_.str.1:                               ## @.str.1
	.asciz	"KXCJK1013 Chip Id %x\n"

	.comm	_STANDBY,4,2                    ## @STANDBY
	.comm	_KXCJK1013_REG_CTRL1,4,2        ## @KXCJK1013_REG_CTRL1
L_.str.2:                               ## @.str.2
	.asciz	"Error reading reg_ctrl1\n"

	.comm	_KXCJK1013_REG_CTRL1_BIT_RES,4,2 ## @KXCJK1013_REG_CTRL1_BIT_RES
L_.str.3:                               ## @.str.3
	.asciz	"Error reading reg_ctrl\n"

	.comm	_KXCJK1013_RANGE_4G,4,2         ## @KXCJK1013_RANGE_4G
	.comm	_KXCJK1013_REG_DATA_CTRL,4,2    ## @KXCJK1013_REG_DATA_CTRL
L_.str.4:                               ## @.str.4
	.asciz	"Error reading reg_data_ctrl\n"

	.comm	_KXCJK1013_REG_INT_CTRL1,4,2    ## @KXCJK1013_REG_INT_CTRL1
L_.str.5:                               ## @.str.5
	.asciz	"Error reading reg_int_ctrl1\n"

	.comm	_KXCJK1013_REG_INT_CTRL1_BIT_IEA,4,2 ## @KXCJK1013_REG_INT_CTRL1_BIT_IEA
L_.str.6:                               ## @.str.6
	.asciz	"Error writing reg_int_ctrl1\n"

	.comm	_OPERATION,4,2                  ## @OPERATION
	.comm	_KXCJK1013_DEFAULT_WAKE_THRES,4,2 ## @KXCJK1013_DEFAULT_WAKE_THRES
	.no_dead_strip	_kxcjk1013_chip_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kxcjk1013_chip_init
_kxcjk1013_chip_init:                   ; @kxcjk1013_chip_init
	.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	x19, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _KXCJK1013_REG_WHO_AM_I@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KXCJK1013_REG_WHO_AM_I@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	ldr	x0, [x19, #8]
	tbnz	w20, #31, LBB0_10
; %bb.1:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh5:
	adrp	x8, _STANDBY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STANDBY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kxcjk1013_set_mode
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x21, _KXCJK1013_REG_CTRL1@GOTPAGE
Lloh9:
	ldr	x21, [x21, _KXCJK1013_REG_CTRL1@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_12
; %bb.3:
Lloh10:
	adrp	x8, _KXCJK1013_REG_CTRL1_BIT_RES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KXCJK1013_REG_CTRL1_BIT_RES@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w2, w8, w20
	ldr	x0, [x19, #8]
	ldr	w1, [x21]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_13
; %bb.4:
Lloh13:
	adrp	x8, _KXCJK1013_RANGE_4G@GOTPAGE
Lloh14:
	ldr	x8, [x8, _KXCJK1013_RANGE_4G@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kxcjk1013_set_range
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldr	x0, [x19, #8]
Lloh16:
	adrp	x8, _KXCJK1013_REG_DATA_CTRL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _KXCJK1013_REG_DATA_CTRL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_14
; %bb.6:
	str	w20, [x19]
	ldr	x0, [x19, #8]
Lloh19:
	adrp	x21, _KXCJK1013_REG_INT_CTRL1@GOTPAGE
Lloh20:
	ldr	x21, [x21, _KXCJK1013_REG_INT_CTRL1@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_15
; %bb.7:
Lloh21:
	adrp	x8, _KXCJK1013_REG_INT_CTRL1_BIT_IEA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _KXCJK1013_REG_INT_CTRL1_BIT_IEA@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w9, w8, w20
	bic	w8, w20, w8
	ldp	x0, x10, [x19, #8]
	cmp	x10, #0
	csel	w2, w8, w9, eq
	ldr	w1, [x21]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_16
; %bb.8:
Lloh24:
	adrp	x8, _OPERATION@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OPERATION@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kxcjk1013_set_mode
	tbnz	w0, #31, LBB0_11
; %bb.9:
	mov	w20, #0
Lloh27:
	adrp	x8, _KXCJK1013_DEFAULT_WAKE_THRES@GOTPAGE
Lloh28:
	ldr	x8, [x8, _KXCJK1013_DEFAULT_WAKE_THRES@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_17
LBB0_10:
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_11:
	mov	x20, x0
	b	LBB0_17
LBB0_12:
	ldr	x0, [x19, #8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_13:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_14:
	ldr	x0, [x19, #8]
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_15:
	ldr	x0, [x19, #8]
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_16:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
LBB0_17:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_KXCJK1013_REG_WHO_AM_I,4,2     ; @KXCJK1013_REG_WHO_AM_I
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading who_am_i\n"

l_.str.1:                               ; @.str.1
	.asciz	"KXCJK1013 Chip Id %x\n"

	.comm	_STANDBY,4,2                    ; @STANDBY
	.comm	_KXCJK1013_REG_CTRL1,4,2        ; @KXCJK1013_REG_CTRL1
l_.str.2:                               ; @.str.2
	.asciz	"Error reading reg_ctrl1\n"

	.comm	_KXCJK1013_REG_CTRL1_BIT_RES,4,2 ; @KXCJK1013_REG_CTRL1_BIT_RES
l_.str.3:                               ; @.str.3
	.asciz	"Error reading reg_ctrl\n"

	.comm	_KXCJK1013_RANGE_4G,4,2         ; @KXCJK1013_RANGE_4G
	.comm	_KXCJK1013_REG_DATA_CTRL,4,2    ; @KXCJK1013_REG_DATA_CTRL
l_.str.4:                               ; @.str.4
	.asciz	"Error reading reg_data_ctrl\n"

	.comm	_KXCJK1013_REG_INT_CTRL1,4,2    ; @KXCJK1013_REG_INT_CTRL1
l_.str.5:                               ; @.str.5
	.asciz	"Error reading reg_int_ctrl1\n"

	.comm	_KXCJK1013_REG_INT_CTRL1_BIT_IEA,4,2 ; @KXCJK1013_REG_INT_CTRL1_BIT_IEA
l_.str.6:                               ; @.str.6
	.asciz	"Error writing reg_int_ctrl1\n"

	.comm	_OPERATION,4,2                  ; @OPERATION
	.comm	_KXCJK1013_DEFAULT_WAKE_THRES,4,2 ; @KXCJK1013_DEFAULT_WAKE_THRES
	.no_dead_strip	_kxcjk1013_chip_init
.subsections_via_symbols
