	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kxtj9_enable
_kxtj9_enable:                          ## @kxtj9_enable
	.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
	callq	_kxtj9_device_power_on
	testl	%eax, %eax
	js	LBB0_15
## %bb.1:
	movq	(%r14), %rdi
	movq	_CTRL_REG1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_15
## %bb.2:
	movq	(%r14), %rdi
	cmpq	$0, 8(%rdi)
	je	LBB0_4
## %bb.3:
	movq	_INT_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r14), %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_15
LBB0_4:
	movl	16(%r14), %esi
	movq	%r14, %rdi
	callq	_kxtj9_update_g_range
	testl	%eax, %eax
	js	LBB0_15
## %bb.5:
	movq	_PC1_ON@GOTPCREL(%rip), %rax
	movl	12(%r14), %edx
	orl	(%rax), %edx
	movl	%edx, 12(%r14)
	movq	(%r14), %rdi
	movl	(%r15), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_15
## %bb.6:
	movl	8(%r14), %esi
	movq	%r14, %rdi
	callq	_kxtj9_update_odr
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	movq	(%r14), %rdi
	xorl	%ebx, %ebx
	cmpq	$0, 8(%rdi)
	je	LBB0_16
## %bb.8:
	movq	_INT_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	jns	LBB0_16
## %bb.9:
	movl	%eax, %r15d
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r14, %rdi
	callq	_kxtj9_device_power_off
	movl	%r15d, %ebx
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTRL_REG1,4,2                  ## @CTRL_REG1
	.comm	_INT_CTRL1,4,2                  ## @INT_CTRL1
	.comm	_PC1_ON,4,2                     ## @PC1_ON
	.comm	_INT_REL,4,2                    ## @INT_REL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error clearing interrupt: %d\n"

	.no_dead_strip	_kxtj9_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kxtj9_enable
_kxtj9_enable:                          ; @kxtj9_enable
	.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
	bl	_kxtj9_device_power_on
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	x0, [x19]
Lloh0:
	adrp	x21, _CTRL_REG1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CTRL_REG1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_10
; %bb.2:
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _INT_CTRL1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_CTRL1@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x19, #20]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_10
LBB0_4:
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_kxtj9_update_g_range
	tbnz	w0, #31, LBB0_10
; %bb.5:
Lloh5:
	adrp	x8, _PC1_ON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PC1_ON@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w2, w9, w8
	str	w2, [x19, #12]
	ldr	x0, [x19]
	ldr	w1, [x21]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_10
; %bb.6:
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_kxtj9_update_odr
	tbnz	w0, #31, LBB0_10
; %bb.7:
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
; %bb.8:
Lloh8:
	adrp	x8, _INT_REL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INT_REL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_12
LBB0_9:
	mov	w20, #0
	b	LBB0_11
LBB0_10:
	mov	x20, x0
LBB0_11:
	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
LBB0_12:
	mov	x20, x0
	ldr	x0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	x0, x19
	bl	_kxtj9_device_power_off
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CTRL_REG1,4,2                  ; @CTRL_REG1
	.comm	_INT_CTRL1,4,2                  ; @INT_CTRL1
	.comm	_PC1_ON,4,2                     ; @PC1_ON
	.comm	_INT_REL,4,2                    ; @INT_REL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error clearing interrupt: %d\n"

	.no_dead_strip	_kxtj9_enable
.subsections_via_symbols
