	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qt2025c_wait_reset
_qt2025c_wait_reset:                    ## @qt2025c_wait_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_qt2025c_wait_heartbeat
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_qt2025c_wait_fw_status_good
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	addl	(%rcx), %edx
	jne	LBB0_3
## %bb.2:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_dbg
	movq	%rbx, %rdi
	callq	_qt2025c_restart_firmware
	movq	%rbx, %rdi
	callq	_qt2025c_wait_heartbeat
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_qt2025c_wait_fw_status_good    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bashing QT2025C microcontroller\n"

	.no_dead_strip	_qt2025c_wait_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qt2025c_wait_reset
_qt2025c_wait_reset:                    ; @qt2025c_wait_reset
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_qt2025c_wait_heartbeat
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_qt2025c_wait_fw_status_good
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _hw@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
	mov	x0, x19
	bl	_qt2025c_restart_firmware
	mov	x0, x19
	bl	_qt2025c_wait_heartbeat
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_qt2025c_wait_fw_status_good
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bashing QT2025C microcontroller\n"

	.no_dead_strip	_qt2025c_wait_reset
.subsections_via_symbols
