	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ak8975_start_read_axis
_ak8975_start_read_axis:                ## @ak8975_start_read_axis
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_MODE_ONCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ak8975_set_mode
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpq	$0, 16(%r15)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_wait_conversion_complete_interrupt
	testl	%eax, %eax
	jns	LBB0_9
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_4:
	movl	8(%r15), %edi
	callq	_gpio_is_valid
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	callq	_wait_conversion_complete_gpio
	testl	%eax, %eax
	js	LBB0_8
LBB0_9:
	movq	(%r15), %rcx
	movq	(%rcx), %rdx
	movq	_ST1_DRDY@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%ebx, %ebx
	testl	%eax, (%rdx,%rsi,4)
	je	LBB0_14
## %bb.10:
	movq	8(%rcx), %rax
	movq	_ST2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_ST2_DERR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_ST2_HOFL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rax,%rdx,4), %edx
	orl	(%rax,%rcx,4), %edx
	testl	%r12d, %edx
	je	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_6:
	callq	_wait_conversion_complete_polled
	testl	%eax, %eax
	jns	LBB0_9
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %ebx
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_ONCE,4,2                  ## @MODE_ONCE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error in setting operating mode\n"

	.comm	_ST1_DRDY,8,3                   ## @ST1_DRDY
	.comm	_ST2,8,3                        ## @ST2
L_.str.1:                               ## @.str.1
	.asciz	"Error in reading ST2\n"

	.comm	_ST2_DERR,8,3                   ## @ST2_DERR
	.comm	_ST2_HOFL,8,3                   ## @ST2_HOFL
L_.str.2:                               ## @.str.2
	.asciz	"ST2 status error 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ak8975_start_read_axis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ak8975_start_read_axis
_ak8975_start_read_axis:                ; @ak8975_start_read_axis
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MODE_ONCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODE_ONCE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ak8975_set_mode
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_wait_conversion_complete_interrupt
	mov	x21, x0
	tbz	w0, #31, LBB0_8
	b	LBB0_13
LBB0_3:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_13
LBB0_5:
	ldr	w0, [x20, #8]
	bl	_gpio_is_valid
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_wait_conversion_complete_gpio
	mov	x21, x0
	tbz	w0, #31, LBB0_8
	b	LBB0_13
LBB0_7:
	mov	x0, x20
	bl	_wait_conversion_complete_polled
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
LBB0_8:
	ldr	x8, [x20]
	ldr	x9, [x8]
Lloh5:
	adrp	x10, _ST1_DRDY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ST1_DRDY@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	tst	w9, w21
	b.eq	LBB0_12
; %bb.9:
	ldr	x8, [x8, #8]
Lloh8:
	adrp	x9, _ST2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ST2@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_14
; %bb.10:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _ST2_DERR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ST2_DERR@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh13:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
Lloh14:
	adrp	x10, _ST2_HOFL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ST2_HOFL@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	ldr	w8, [x8, x10, lsl #2]
	orr	w8, w8, w9
	tst	w8, w21
	b.eq	LBB0_12
; %bb.11:
	str	x21, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_12:
	mov	w21, #0
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_14:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_ONCE,4,2                  ; @MODE_ONCE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error in setting operating mode\n"

	.comm	_ST1_DRDY,8,3                   ; @ST1_DRDY
	.comm	_ST2,8,3                        ; @ST2
l_.str.1:                               ; @.str.1
	.asciz	"Error in reading ST2\n"

	.comm	_ST2_DERR,8,3                   ; @ST2_DERR
	.comm	_ST2_HOFL,8,3                   ; @ST2_HOFL
l_.str.2:                               ; @.str.2
	.asciz	"ST2 status error 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ak8975_start_read_axis
.subsections_via_symbols
