	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kmx61_setup_new_data_interrupt
_kmx61_setup_new_data_interrupt:        ## @kmx61_setup_new_data_interrupt
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_KMX61_ACC@GOTPCREL(%rip), %r14
	movq	_KMX61_MAG@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%r14), %edx
	leaq	-48(%rbp), %rsi
	callq	_kmx61_get_mode
	testl	%eax, %eax
	js	LBB0_14
## %bb.1:
	movq	_KMX61_ALL_STBY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	orl	(%r14), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_kmx61_set_mode
	testl	%eax, %eax
	js	LBB0_14
## %bb.2:
	movq	(%r15), %rdi
	movq	_KMX61_REG_INC1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	_KMX61_REG_INC1_BIT_IEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.4:
	orl	%ebx, %edx
	movq	_KMX61_ACC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	andl	%ecx, %eax
	movq	_KMX61_MAG@GOTPCREL(%rip), %r14
	je	LBB0_6
## %bb.5:
	movq	_KMX61_REG_INC1_BIT_DRDYA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	orl	%eax, %edx
	testl	%ecx, (%r14)
	je	LBB0_10
## %bb.7:
	movq	_KMX61_REG_INC1_BIT_DRDYM@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	jmp	LBB0_10
LBB0_8:
	notl	%edx
	andl	%edx, %ebx
	movq	_KMX61_ACC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	andl	%esi, %eax
	movq	_KMX61_REG_INC1_BIT_DRDYA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	xorl	%edx, %edx
	cmpl	$1, %eax
	sbbl	%edx, %edx
	orl	%ecx, %edx
	andl	%ebx, %edx
	movq	_KMX61_MAG@GOTPCREL(%rip), %r14
	testl	%esi, (%r14)
	je	LBB0_10
## %bb.9:
	movq	_KMX61_REG_INC1_BIT_DRDYM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
LBB0_10:
	movq	(%r15), %rdi
	movl	(%r12), %esi
	callq	_i2c_smbus_write_byte_data
	movq	(%r15), %rdi
	testl	%eax, %eax
	js	LBB0_16
## %bb.11:
	movq	_KMX61_REG_CTRL1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movq	_KMX61_REG_CTRL1_BIT_DRDYE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	orl	%ebx, %eax
	notl	%edx
	andl	%ebx, %edx
	testl	%r13d, %r13d
	cmovnel	%eax, %edx
	movq	(%r15), %rdi
	movl	(%r12), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_17
## %bb.13:
	movl	-48(%rbp), %esi
	movl	(%r14), %edx
	movq	_KMX61_ACC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_kmx61_set_mode
LBB0_14:
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_15:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_18
LBB0_16:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_18
LBB0_17:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
LBB0_18:
	callq	_dev_err
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KMX61_ACC,4,2                  ## @KMX61_ACC
	.comm	_KMX61_MAG,4,2                  ## @KMX61_MAG
	.comm	_KMX61_ALL_STBY,4,2             ## @KMX61_ALL_STBY
	.comm	_KMX61_REG_INC1,4,2             ## @KMX61_REG_INC1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading reg_ctrl1\n"

	.comm	_KMX61_REG_INC1_BIT_IEN,4,2     ## @KMX61_REG_INC1_BIT_IEN
	.comm	_KMX61_REG_INC1_BIT_DRDYA,4,2   ## @KMX61_REG_INC1_BIT_DRDYA
	.comm	_KMX61_REG_INC1_BIT_DRDYM,4,2   ## @KMX61_REG_INC1_BIT_DRDYM
L_.str.1:                               ## @.str.1
	.asciz	"Error writing reg_int_ctrl1\n"

	.comm	_KMX61_REG_CTRL1,4,2            ## @KMX61_REG_CTRL1
	.comm	_KMX61_REG_CTRL1_BIT_DRDYE,4,2  ## @KMX61_REG_CTRL1_BIT_DRDYE
L_.str.2:                               ## @.str.2
	.asciz	"Error writing reg_ctrl1\n"

	.no_dead_strip	_kmx61_setup_new_data_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kmx61_setup_new_data_interrupt
_kmx61_setup_new_data_interrupt:        ; @kmx61_setup_new_data_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _KMX61_ACC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _KMX61_ACC@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _KMX61_MAG@GOTPAGE
Lloh3:
	ldr	x24, [x24, _KMX61_MAG@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w2, w9, w8
	add	x1, sp, #12
	bl	_kmx61_get_mode
	tbnz	w0, #31, LBB0_12
; %bb.1:
Lloh4:
	adrp	x8, _KMX61_ALL_STBY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KMX61_ALL_STBY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #1
	bl	_kmx61_set_mode
	tbnz	w0, #31, LBB0_12
; %bb.2:
	ldr	x0, [x19]
Lloh7:
	adrp	x25, _KMX61_REG_INC1@GOTPAGE
Lloh8:
	ldr	x25, [x25, _KMX61_REG_INC1@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.3:
Lloh9:
	adrp	x8, _KMX61_REG_INC1_BIT_IEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KMX61_REG_INC1_BIT_IEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbz	w20, LBB0_6
; %bb.4:
	orr	w8, w8, w21
	ldr	w9, [x23]
Lloh12:
	adrp	x10, _KMX61_REG_INC1_BIT_DRDYA@GOTPAGE
Lloh13:
	ldr	x10, [x10, _KMX61_REG_INC1_BIT_DRDYA@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w9, w22
	csel	w9, wzr, w10, eq
	orr	w2, w8, w9
	ldr	w8, [x24]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.5:
Lloh15:
	adrp	x8, _KMX61_REG_INC1_BIT_DRDYM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KMX61_REG_INC1_BIT_DRDYM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w2, w8, w2
	b	LBB0_8
LBB0_6:
	bic	w8, w21, w8
	ldr	w9, [x23]
Lloh18:
	adrp	x10, _KMX61_REG_INC1_BIT_DRDYA@GOTPAGE
Lloh19:
	ldr	x10, [x10, _KMX61_REG_INC1_BIT_DRDYA@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w9, w22
	mov	w9, #-1
	csinv	w9, w9, w10, eq
	and	w2, w8, w9
	ldr	w8, [x24]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _KMX61_REG_INC1_BIT_DRDYM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _KMX61_REG_INC1_BIT_DRDYM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	bic	w2, w2, w8
LBB0_8:
	ldr	x0, [x19]
	ldr	w1, [x25]
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	ldr	x0, [x19]
	tbnz	w21, #31, LBB0_14
; %bb.9:
Lloh24:
	adrp	x22, _KMX61_REG_CTRL1@GOTPAGE
Lloh25:
	ldr	x22, [x22, _KMX61_REG_CTRL1@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.10:
Lloh26:
	adrp	x8, _KMX61_REG_CTRL1_BIT_DRDYE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _KMX61_REG_CTRL1_BIT_DRDYE@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w9, w8, w21
	bic	w8, w21, w8
	cmp	w20, #0
	csel	w2, w8, w9, eq
	ldr	x0, [x19]
	ldr	w1, [x22]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_15
; %bb.11:
	ldr	w1, [sp, #12]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #1
	bl	_kmx61_set_mode
LBB0_12:
	mov	x21, x0
	b	LBB0_17
LBB0_13:
	ldr	x0, [x19]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_14:
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_15:
	mov	x21, x0
	ldr	x0, [x19]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	bl	_dev_err
LBB0_17:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_KMX61_ACC,4,2                  ; @KMX61_ACC
	.comm	_KMX61_MAG,4,2                  ; @KMX61_MAG
	.comm	_KMX61_ALL_STBY,4,2             ; @KMX61_ALL_STBY
	.comm	_KMX61_REG_INC1,4,2             ; @KMX61_REG_INC1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading reg_ctrl1\n"

	.comm	_KMX61_REG_INC1_BIT_IEN,4,2     ; @KMX61_REG_INC1_BIT_IEN
	.comm	_KMX61_REG_INC1_BIT_DRDYA,4,2   ; @KMX61_REG_INC1_BIT_DRDYA
	.comm	_KMX61_REG_INC1_BIT_DRDYM,4,2   ; @KMX61_REG_INC1_BIT_DRDYM
l_.str.1:                               ; @.str.1
	.asciz	"Error writing reg_int_ctrl1\n"

	.comm	_KMX61_REG_CTRL1,4,2            ; @KMX61_REG_CTRL1
	.comm	_KMX61_REG_CTRL1_BIT_DRDYE,4,2  ; @KMX61_REG_CTRL1_BIT_DRDYE
l_.str.2:                               ; @.str.2
	.asciz	"Error writing reg_ctrl1\n"

	.no_dead_strip	_kmx61_setup_new_data_interrupt
.subsections_via_symbols
