	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_init_firmware
_mwl8k_init_firmware:                   ## @mwl8k_init_firmware
	.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
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	_MAX_RESTART_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r12, %rdi
	callq	_mwl8k_hw_reset
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_mwl8k_request_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wiphy_err
	jmp	LBB0_9
LBB0_1:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_2
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	incl	%r15d
	leaq	L_.str.1(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_mwl8k_load_firmware
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	movl	(%r14), %edi
	movq	%r13, %rsi
	callq	_wiphy_err
	movq	%r12, %rdi
	callq	_mwl8k_release_firmware
	decl	%r15d
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wiphy_err
	movl	$20, %edi
	callq	_msleep
	movq	%r12, %rdi
	callq	_mwl8k_hw_reset
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_mwl8k_request_firmware
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%r12, %rdi
	callq	_mwl8k_release_firmware
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RESTART_ATTEMPTS,4,2       ## @MAX_RESTART_ATTEMPTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware files not found\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot start firmware\n"

L_.str.2:                               ## @.str.2
	.asciz	"Trying to reload the firmware again\n"

	.no_dead_strip	_mwl8k_init_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwl8k_init_firmware
_mwl8k_init_firmware:                   ; @mwl8k_init_firmware
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _MAX_RESTART_ATTEMPTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_RESTART_ATTEMPTS@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_mwl8k_hw_reset
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_mwl8k_request_firmware
	mov	x24, x0
	cbz	w0, LBB0_2
LBB0_1:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wiphy_err
	b	LBB0_4
LBB0_2:
	cbz	w22, LBB0_5
; %bb.3:
	mov	w24, #0
LBB0_4:
	mov	x0, x24
	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_5:
	add	w25, w23, #1
Lloh5:
	adrp	x22, l_.str.1@PAGE
Lloh6:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh7:
	adrp	x23, l_.str.2@PAGE
Lloh8:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_mwl8k_load_firmware
	mov	x24, x0
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19]
	mov	x1, x22
	bl	_wiphy_err
	mov	x0, x20
	bl	_mwl8k_release_firmware
	subs	w25, w25, #1
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19]
	mov	x1, x23
	bl	_wiphy_err
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	bl	_mwl8k_hw_reset
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_mwl8k_request_firmware
	cbz	w0, LBB0_6
; %bb.9:
	mov	x24, x0
	b	LBB0_1
LBB0_10:
	mov	x0, x20
	bl	_mwl8k_release_firmware
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RESTART_ATTEMPTS,4,2       ; @MAX_RESTART_ATTEMPTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware files not found\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot start firmware\n"

l_.str.2:                               ; @.str.2
	.asciz	"Trying to reload the firmware again\n"

	.no_dead_strip	_mwl8k_init_firmware
.subsections_via_symbols
