	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_init_fetch_firmwares    ## -- Begin function ath6kl_init_fetch_firmwares
	.p2align	4, 0x90
_ath6kl_init_fetch_firmwares:           ## @ath6kl_init_fetch_firmwares
	.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	_ath6kl_fetch_board_file
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%rbx, %rdi
	callq	_ath6kl_fetch_testmode_file
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movq	_ATH6KL_FW_API5_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath6kl_fetch_fw_apin
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_ATH6KL_FW_API4_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath6kl_fetch_fw_apin
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_ATH6KL_FW_API3_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath6kl_fetch_fw_apin
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_ATH6KL_FW_API2_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath6kl_fetch_fw_apin
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	%rbx, %rdi
	callq	_ath6kl_fetch_fw_api1
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movl	$1, %edx
	jmp	LBB0_12
LBB0_3:
	movl	$5, %edx
	jmp	LBB0_12
LBB0_5:
	movl	$4, %edx
	jmp	LBB0_12
LBB0_7:
	movl	$3, %edx
	jmp	LBB0_12
LBB0_9:
	movl	$2, %edx
LBB0_12:
	movl	%edx, (%rbx)
	movq	_ATH6KL_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_ath6kl_dbg
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_FW_API5_FILE,4,2        ## @ATH6KL_FW_API5_FILE
	.comm	_ATH6KL_FW_API4_FILE,4,2        ## @ATH6KL_FW_API4_FILE
	.comm	_ATH6KL_FW_API3_FILE,4,2        ## @ATH6KL_FW_API3_FILE
	.comm	_ATH6KL_FW_API2_FILE,4,2        ## @ATH6KL_FW_API2_FILE
	.comm	_ATH6KL_DBG_BOOT,4,2            ## @ATH6KL_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using fw api %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_init_fetch_firmwares    ; -- Begin function ath6kl_init_fetch_firmwares
	.p2align	2
_ath6kl_init_fetch_firmwares:           ; @ath6kl_init_fetch_firmwares
	.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	_ath6kl_fetch_board_file
	cbnz	w0, LBB0_13
; %bb.1:
	mov	x0, x19
	bl	_ath6kl_fetch_testmode_file
	cbnz	w0, LBB0_13
; %bb.2:
Lloh0:
	adrp	x8, _ATH6KL_FW_API5_FILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_FW_API5_FILE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath6kl_fetch_fw_apin
	cbz	w0, LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _ATH6KL_FW_API4_FILE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_FW_API4_FILE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath6kl_fetch_fw_apin
	cbz	w0, LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _ATH6KL_FW_API3_FILE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATH6KL_FW_API3_FILE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath6kl_fetch_fw_apin
	cbz	w0, LBB0_10
; %bb.5:
Lloh9:
	adrp	x8, _ATH6KL_FW_API2_FILE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATH6KL_FW_API2_FILE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath6kl_fetch_fw_apin
	cbz	w0, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_ath6kl_fetch_fw_api1
	cbnz	w0, LBB0_13
; %bb.7:
	mov	w2, #1
	b	LBB0_12
LBB0_8:
	mov	w2, #5
	b	LBB0_12
LBB0_9:
	mov	w2, #4
	b	LBB0_12
LBB0_10:
	mov	w2, #3
	b	LBB0_12
LBB0_11:
	mov	w2, #2
LBB0_12:
	str	w2, [x19]
Lloh12:
	adrp	x8, _ATH6KL_DBG_BOOT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATH6KL_DBG_BOOT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_FW_API5_FILE,4,2        ; @ATH6KL_FW_API5_FILE
	.comm	_ATH6KL_FW_API4_FILE,4,2        ; @ATH6KL_FW_API4_FILE
	.comm	_ATH6KL_FW_API3_FILE,4,2        ; @ATH6KL_FW_API3_FILE
	.comm	_ATH6KL_FW_API2_FILE,4,2        ; @ATH6KL_FW_API2_FILE
	.comm	_ATH6KL_DBG_BOOT,4,2            ; @ATH6KL_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using fw api %d\n"

.subsections_via_symbols
