	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fza_reset
_fza_reset:                             ## @fza_reset
	.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
	movq	%rdi, %rbx
	movl	8(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	leaq	28(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_fza_do_reset
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	24(%rbx), %edi
	movq	(%rbx), %rsi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,8), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_timeout
	movq	%rax, %r14
	movq	16(%rbx), %rdi
	callq	_readw_u
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_FZA_STATUS_GET_STATE
	movq	%rax, %r15
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.3:
	movq	_FZA_STATE_UNINITIALIZED@GOTPCREL(%rip), %rax
	movl	8(%rbx), %r12d
	cmpq	(%rax), %r15
	jne	LBB0_4
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_info
	movl	8(%rbx), %esi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leaq	(%rcx,%rcx,8), %rax
	leaq	(%rax,%rax,4), %rax
	subq	%r14, %rax
	imulq	$1000, %rax, %rax               ## imm = 0x3E8
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_6
## %bb.7:
	cqto
	idivq	%rcx
	jmp	LBB0_8
LBB0_1:
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_2
LBB0_4:
	movq	%r13, %rdi
	callq	_FZA_STATUS_GET_TEST
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pr_err
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_debug
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: resetting the board...\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"%s: RESET timed out!, state %x\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_FZA_STATE_UNINITIALIZED,8,3    ## @FZA_STATE_UNINITIALIZED
L_.str.2:                               ## @.str.2
	.asciz	"%s: RESET failed!, state %x, failure ID %x\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: OK\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s: RESET: %lums elapsed\n"

	.no_dead_strip	_fza_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fza_reset
_fza_reset:                             ; @fza_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w1, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	add	x20, x19, #28
	mov	x0, x20
	bl	_spin_lock_irqsave
	str	xzr, [x19]
	mov	x0, x19
	bl	_fza_do_reset
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #24]
	ldr	x1, [x19]
Lloh2:
	adrp	x24, _HZ@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HZ@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	w9, #45
	mul	w2, w8, w9
	bl	_wait_event_timeout
	mov	x20, x0
	ldr	x0, [x19, #16]
	bl	_readw_u
	mov	x23, x0
	bl	_FZA_STATUS_GET_STATE
	mov	x21, x0
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.1:
Lloh4:
	adrp	x8, _FZA_STATE_UNINITIALIZED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FZA_STATE_UNINITIALIZED@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	w22, [x19, #8]
	cmp	x21, x8
	b.ne	LBB0_4
; %bb.2:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_pr_info
	ldr	w1, [x19, #8]
	ldrsw	x8, [x24]
	mov	w9, #45
	mul	x9, x8, x9
	sub	x9, x9, x20
	mov	w10, #1000
	mul	x9, x9, x10
	sdiv	x2, x9, x8
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_6
LBB0_3:
	ldr	w1, [x19, #8]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	x0, x23
	bl	_FZA_STATUS_GET_TEST
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
LBB0_5:
	mov	x2, x21
	bl	_pr_err
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: resetting the board...\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"%s: RESET timed out!, state %x\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_FZA_STATE_UNINITIALIZED,8,3    ; @FZA_STATE_UNINITIALIZED
l_.str.2:                               ; @.str.2
	.asciz	"%s: RESET failed!, state %x, failure ID %x\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: OK\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s: RESET: %lums elapsed\n"

	.no_dead_strip	_fza_reset
.subsections_via_symbols
