	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_mpu401
_reset_mpu401:                          ## @reset_mpu401
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpl	$0, (%rdi)
	movl	$100000, %eax                   ## imm = 0x186A0
	movl	$30000, %ecx                    ## imm = 0x7530
	cmovel	%eax, %ecx
	movl	$1, (%rdi)
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	44(%rdi), %r14
	movb	$1, %r13b
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	sete	%al
	testb	%al, %bl
	movl	$0, %r13d
	je	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##     Child Loop BB0_6 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	callq	_output_ready
	movl	%eax, %r12d
	cmpl	$2, %ebx
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	decl	%ebx
	testl	%r12d, %r12d
	je	LBB0_2
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_MPU_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_write_command
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r13d, %ebx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_input_avail
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%r15, %rdi
	callq	_read_data
	xorl	%r12d, %r12d
	movq	_MPU_ACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%r12b
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=2
	xorl	%r12d, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	$2, %r13d
	jl	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	decl	%r13d
	testl	%r12d, %r12d
	je	LBB0_6
	jmp	LBB0_11
LBB0_12:
	movq	_ST_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movups	%xmm0, 24(%r15)
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPU_RESET,4,2                  ## @MPU_RESET
	.comm	_MPU_ACK,8,3                    ## @MPU_ACK
	.comm	_ST_INIT,4,2                    ## @ST_INIT
	.no_dead_strip	_reset_mpu401
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_mpu401
_reset_mpu401:                          ; @reset_mpu401
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	w8, [x0]
	mov	w9, #30000
	mov	w10, #34464
	movk	w10, #1, lsl #16
	cmp	w8, #0
	csel	w24, w10, w9, eq
	mov	w8, #1
	mov	x20, x0
	str	w8, [x20], #44
	lsl	w22, w24, #1
	mov	x23, x24
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_output_ready
	mov	x21, x0
	cmp	w23, #2
	b.lt	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w23, w23, #1
	cbz	w21, LBB0_1
LBB0_3:
Lloh0:
	adrp	x25, _MPU_RESET@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MPU_RESET@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_write_command
	cbnz	w21, LBB0_14
; %bb.4:
Lloh2:
	adrp	x23, _MPU_ACK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MPU_ACK@GOTPAGEOFF]
	mov	x26, x22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_input_avail
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_read_data
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w21, eq
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w21, #0
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	cmp	w26, #2
	b.lt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w26, w26, #1
	cbz	w21, LBB0_5
LBB0_10:
	cbnz	w21, LBB0_14
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	sub	w24, w24, #1
	cbnz	w21, LBB0_13
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_output_ready
	mov	x21, x0
	cmp	w24, #2
	b.ge	LBB0_11
LBB0_13:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_write_command
	cbz	w21, LBB0_15
LBB0_14:
Lloh4:
	adrp	x8, _ST_INIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ST_INIT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #8]
	stur	q0, [x19, #24]
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_input_avail
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	bl	_read_data
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w21, eq
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w21, #0
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	cmp	w22, #2
	b.lt	LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	sub	w22, w22, #1
	cbz	w21, LBB0_15
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MPU_RESET,4,2                  ; @MPU_RESET
	.comm	_MPU_ACK,8,3                    ; @MPU_ACK
	.comm	_ST_INIT,4,2                    ; @ST_INIT
	.no_dead_strip	_reset_mpu401
.subsections_via_symbols
