	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flashrestart
_flashrestart:                          ## @flashrestart
	.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	%rsi, %r12
	movq	%rdi, %r13
	movl	$1, %edi
	callq	_ssleep
	movq	_FLAG_FLASHING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r13), %r15
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_FLAG_MPI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_mpi_init_descriptors
	movl	%eax, %r14d
	movq	_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_7
LBB0_2:
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_setup_card
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	_MAX_FIDS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_AIRO_DEF_MTU@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rax
	xorl	%edx, %edx
	cmpq	%rax, %rbx
	setge	%dl
	movq	%r13, %rdi
	callq	_transmit_allocate
	movq	(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movl	$1, %edi
	callq	_ssleep
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAG_FLASHING,4,2              ## @FLAG_FLASHING
	.comm	_FLAG_MPI,4,2                   ## @FLAG_MPI
	.comm	_SUCCESS,4,2                    ## @SUCCESS
	.comm	_MAX_FIDS,4,2                   ## @MAX_FIDS
	.comm	_AIRO_DEF_MTU,4,2               ## @AIRO_DEF_MTU
	.no_dead_strip	_flashrestart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flashrestart
_flashrestart:                          ; @flashrestart
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x19, x0
	mov	w0, #1
	bl	_ssleep
Lloh0:
	adrp	x8, _FLAG_FLASHING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAG_FLASHING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x21, x19, #8
	mov	x1, x21
	bl	_clear_bit
Lloh3:
	adrp	x23, _FLAG_MPI@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FLAG_MPI@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mpi_init_descriptors
	mov	x20, x0
Lloh5:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_setup_card
	mov	x20, x0
	ldr	w0, [x23]
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x21, _MAX_FIDS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _MAX_FIDS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
Lloh10:
	adrp	x23, _AIRO_DEF_MTU@GOTPAGE
Lloh11:
	ldr	x23, [x23, _AIRO_DEF_MTU@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	cmp	x22, w8, sxtw
	cset	w2, ge
	mov	x0, x19
	bl	_transmit_allocate
	ldr	x8, [x19]
	str	w0, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #1
	bl	_ssleep
LBB0_7:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAG_FLASHING,4,2              ; @FLAG_FLASHING
	.comm	_FLAG_MPI,4,2                   ; @FLAG_MPI
	.comm	_SUCCESS,4,2                    ; @SUCCESS
	.comm	_MAX_FIDS,4,2                   ; @MAX_FIDS
	.comm	_AIRO_DEF_MTU,4,2               ; @AIRO_DEF_MTU
	.no_dead_strip	_flashrestart
.subsections_via_symbols
