	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inv_mpu6050_switch_engine      ## -- Begin function inv_mpu6050_switch_engine
	.p2align	4, 0x90
_inv_mpu6050_switch_engine:             ## @inv_mpu6050_switch_engine
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_INV_MPU6050_BIT_PWR_GYRO_STBY@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
                                        ## implicit-def: $edx
	cmpl	%r14d, %eax
	jne	LBB0_3
## %bb.1:
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_15
## %bb.2:
	movq	_INV_MPU6050_BIT_CLK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movl	%edx, -36(%rbp)
	movl	(%r12), %eax
LBB0_3:
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.4:
	cmpl	%r14d, %eax
	jne	LBB0_6
## %bb.5:
	movq	_INV_CLK_INTERNAL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_15
LBB0_6:
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	leaq	-40(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_15
## %bb.7:
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.8:
	movl	%r14d, %edx
	notl	%edx
	andl	-40(%rbp), %edx
	jmp	LBB0_10
LBB0_9:
	movl	-40(%rbp), %edx
	orl	%r14d, %edx
LBB0_10:
	movl	%edx, -40(%rbp)
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_15
## %bb.11:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.12:
	movq	_INV_MPU6050_TEMP_UP_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	cmpl	%r14d, (%r12)
	jne	LBB0_14
## %bb.13:
	movq	_INV_CLK_PLL@GOTPCREL(%rip), %rax
	movl	-36(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INV_MPU6050_BIT_PWR_GYRO_STBY,4,2 ## @INV_MPU6050_BIT_PWR_GYRO_STBY
	.comm	_INV_MPU6050_BIT_CLK_MASK,4,2   ## @INV_MPU6050_BIT_CLK_MASK
	.comm	_INV_CLK_INTERNAL,4,2           ## @INV_CLK_INTERNAL
	.comm	_INV_MPU6050_TEMP_UP_TIME,4,2   ## @INV_MPU6050_TEMP_UP_TIME
	.comm	_INV_CLK_PLL,4,2                ## @INV_CLK_PLL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inv_mpu6050_switch_engine      ; -- Begin function inv_mpu6050_switch_engine
	.p2align	2
_inv_mpu6050_switch_engine:             ; @inv_mpu6050_switch_engine
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _INV_MPU6050_BIT_PWR_GYRO_STBY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INV_MPU6050_BIT_PWR_GYRO_STBY@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w9, w2
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regmap_read
	cbnz	w0, LBB0_15
; %bb.2:
Lloh2:
	adrp	x8, _INV_MPU6050_BIT_CLK_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INV_MPU6050_BIT_CLK_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	bic	w8, w9, w8
	str	w8, [sp, #8]
	ldr	w9, [x22]
	cbz	w21, LBB0_4
	b	LBB0_6
LBB0_3:
                                        ; implicit-def: $w8
	cbnz	w21, LBB0_6
LBB0_4:
	cmp	w9, w20
	b.ne	LBB0_6
; %bb.5:
Lloh5:
	adrp	x9, _INV_CLK_INTERNAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INV_CLK_INTERNAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w8, w9
	str	w2, [sp, #8]
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	_regmap_write
	cbnz	w0, LBB0_15
LBB0_6:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_15
; %bb.7:
	cbz	w21, LBB0_9
; %bb.8:
	ldr	w8, [sp, #12]
	bic	w2, w8, w20
	b	LBB0_10
LBB0_9:
	ldr	w8, [sp, #12]
	orr	w2, w8, w20
LBB0_10:
	str	w2, [sp, #12]
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	bl	_regmap_write
	cbnz	w0, LBB0_15
; %bb.11:
	cbz	w21, LBB0_14
; %bb.12:
Lloh8:
	adrp	x8, _INV_MPU6050_TEMP_UP_TIME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INV_MPU6050_TEMP_UP_TIME@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_msleep
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_14
; %bb.13:
Lloh11:
	adrp	x8, _INV_CLK_PLL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INV_CLK_PLL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	_regmap_write
	cbnz	w0, LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_INV_MPU6050_BIT_PWR_GYRO_STBY,4,2 ; @INV_MPU6050_BIT_PWR_GYRO_STBY
	.comm	_INV_MPU6050_BIT_CLK_MASK,4,2   ; @INV_MPU6050_BIT_CLK_MASK
	.comm	_INV_CLK_INTERNAL,4,2           ; @INV_CLK_INTERNAL
	.comm	_INV_MPU6050_TEMP_UP_TIME,4,2   ; @INV_MPU6050_TEMP_UP_TIME
	.comm	_INV_CLK_PLL,4,2                ; @INV_CLK_PLL
.subsections_via_symbols
