	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kmx61_get_mode
_kmx61_get_mode:                        ## @kmx61_get_mode
	.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	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	_KMX61_REG_STBY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	$0, (%r14)
	movq	_KMX61_ACC@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	movl	$0, %ecx
	testl	%r15d, (%rdx)
	je	LBB0_5
## %bb.3:
	movq	_KMX61_ACC_STBY_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	$0, %ecx
	testl	%r12d, %edx
	je	LBB0_5
## %bb.4:
	movl	%edx, (%r14)
	movl	%edx, %ecx
LBB0_5:
	movq	_KMX61_MAG@GOTPCREL(%rip), %rdx
	testl	%r15d, (%rdx)
	je	LBB0_10
## %bb.6:
	movq	_KMX61_MAG_STBY_BIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%r12d, %edx
	je	LBB0_8
## %bb.7:
	orl	%edx, %ecx
	jmp	LBB0_9
LBB0_1:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%r12d, %eax
	jmp	LBB0_10
LBB0_8:
	notl	%edx
	andl	%edx, %ecx
LBB0_9:
	movl	%ecx, (%r14)
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KMX61_REG_STBY,4,2             ## @KMX61_REG_STBY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading reg_stby\n"

	.comm	_KMX61_ACC,4,2                  ## @KMX61_ACC
	.comm	_KMX61_ACC_STBY_BIT,4,2         ## @KMX61_ACC_STBY_BIT
	.comm	_KMX61_MAG,4,2                  ## @KMX61_MAG
	.comm	_KMX61_MAG_STBY_BIT,4,2         ## @KMX61_MAG_STBY_BIT
	.no_dead_strip	_kmx61_get_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kmx61_get_mode
_kmx61_get_mode:                        ; @kmx61_get_mode
	.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, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _KMX61_REG_STBY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KMX61_REG_STBY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x19, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	str	wzr, [x20]
Lloh3:
	adrp	x8, _KMX61_ACC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KMX61_ACC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _KMX61_ACC_STBY_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KMX61_ACC_STBY_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_5
; %bb.3:
	str	w8, [x20]
	b	LBB0_6
LBB0_4:
	ldr	x0, [x22]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_12
LBB0_5:
	mov	w8, #0
LBB0_6:
Lloh11:
	adrp	x9, _KMX61_MAG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _KMX61_MAG@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_9
; %bb.7:
Lloh14:
	adrp	x9, _KMX61_MAG_STBY_BIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _KMX61_MAG_STBY_BIT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w19
	b.eq	LBB0_10
; %bb.8:
	mov	w19, #0
	orr	w8, w8, w9
	b	LBB0_11
LBB0_9:
	mov	w19, #0
	b	LBB0_12
LBB0_10:
	mov	w19, #0
	bic	w8, w8, w9
LBB0_11:
	str	w8, [x20]
LBB0_12:
	mov	x0, x19
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_KMX61_REG_STBY,4,2             ; @KMX61_REG_STBY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading reg_stby\n"

	.comm	_KMX61_ACC,4,2                  ; @KMX61_ACC
	.comm	_KMX61_ACC_STBY_BIT,4,2         ; @KMX61_ACC_STBY_BIT
	.comm	_KMX61_MAG,4,2                  ; @KMX61_MAG
	.comm	_KMX61_MAG_STBY_BIT,4,2         ; @KMX61_MAG_STBY_BIT
	.no_dead_strip	_kmx61_get_mode
.subsections_via_symbols
