	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_boot                    ## -- Begin function wl1251_boot
	.p2align	4, 0x90
_wl1251_boot:                           ## @wl1251_boot
	.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, %r14
	movq	_ACX_REG_ECPU_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_ECPU_CONTROL_HALT@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_wl1251_reg_write32
	movq	%r14, %rdi
	callq	_wl1251_boot_soft_reset
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	cmpq	$0, 16(%r14)
	je	LBB0_3
## %bb.2:
	movq	_ACX_REG_EE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_START_EEPROM_MGR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_wl1251_reg_write32
	movl	$40, %edi
	callq	_msleep
	movq	_ACX_EEPROMLESS_IND_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_USE_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	callq	_wl1251_boot_upload_nvs
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	_ACX_EEPROMLESS_IND_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
LBB0_5:
	movq	%r14, %rdi
	callq	_wl1251_reg_write32
	movq	_SCR_PAD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wl1251_reg_read32
	movzbl	%ah, %ecx
	movl	%ecx, 4(%r14)
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, 8(%r14)
	movq	_SCR_PAD3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wl1251_reg_read32
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %r8d
	movl	%r8d, 12(%r14)
	shrl	$24, %eax
	movq	_DEBUG_BOOT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	4(%r14), %edx
	movl	8(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_wl1251_debug
	movq	%r14, %rdi
	callq	_wl1251_boot_init_seq
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_wl1251_reg_read32
	movl	%eax, %r15d
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wl1251_debug
	testl	%r15d, (%r12)
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	callq	_wl1251_boot_upload_firmware
	testl	%eax, %eax
	js	LBB0_9
## %bb.11:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wl1251_boot_run_firmware       ## TAILCALL
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_wl1251_error
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ACX_REG_ECPU_CONTROL,4,2       ## @ACX_REG_ECPU_CONTROL
	.comm	_ECPU_CONTROL_HALT,4,2          ## @ECPU_CONTROL_HALT
	.comm	_ACX_REG_EE_START,4,2           ## @ACX_REG_EE_START
	.comm	_START_EEPROM_MGR,4,2           ## @START_EEPROM_MGR
	.comm	_ACX_EEPROMLESS_IND_REG,4,2     ## @ACX_EEPROMLESS_IND_REG
	.comm	_USE_EEPROM,4,2                 ## @USE_EEPROM
	.comm	_SCR_PAD2,4,2                   ## @SCR_PAD2
	.comm	_SCR_PAD3,4,2                   ## @SCR_PAD3
	.comm	_DEBUG_BOOT,4,2                 ## @DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radioType 0x%x majorE2Ver 0x%x minorE2Ver 0x%x minor_minor_e2_ver 0x%x"

L_.str.1:                               ## @.str.1
	.asciz	"halt boot_data 0x%x"

L_.str.2:                               ## @.str.2
	.asciz	"boot failed, ECPU_CONTROL_HALT not set"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wl1251_boot
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_wl1251_boot
	.p2align	2
_wl1251_boot:                           ; @wl1251_boot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x20, _ACX_REG_ECPU_CONTROL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ACX_REG_ECPU_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _ECPU_CONTROL_HALT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ECPU_CONTROL_HALT@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_wl1251_reg_write32
	mov	x0, x19
	bl	_wl1251_boot_soft_reset
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.2:
Lloh4:
	adrp	x8, _ACX_REG_EE_START@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ACX_REG_EE_START@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _START_EEPROM_MGR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _START_EEPROM_MGR@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wl1251_reg_write32
	mov	w0, #40
	bl	_msleep
Lloh10:
	adrp	x8, _ACX_EEPROMLESS_IND_REG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ACX_EEPROMLESS_IND_REG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _USE_EEPROM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _USE_EEPROM@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_wl1251_boot_upload_nvs
	tbnz	w0, #31, LBB0_10
; %bb.4:
Lloh16:
	adrp	x8, _ACX_EEPROMLESS_IND_REG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ACX_EEPROMLESS_IND_REG@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x19]
LBB0_5:
	mov	x0, x19
	bl	_wl1251_reg_write32
Lloh19:
	adrp	x8, _SCR_PAD2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SCR_PAD2@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wl1251_reg_read32
	dup.2s	v0, w0
Lloh22:
	adrp	x8, lCPI0_0@PAGE
Lloh23:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	stur	d0, [x19, #4]
Lloh24:
	adrp	x8, _SCR_PAD3@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SCR_PAD3@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wl1251_reg_read32
	ubfx	w8, w0, #16, #8
	str	w8, [x19, #12]
	lsr	w9, w0, #24
Lloh27:
	adrp	x22, _DEBUG_BOOT@GOTPAGE
Lloh28:
	ldr	x22, [x22, _DEBUG_BOOT@GOTPAGEOFF]
	ldr	w0, [x22]
	ldp	w2, w10, [x19, #4]
	stp	x8, x9, [sp, #8]
	str	x10, [sp]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1251_debug
	mov	x0, x19
	bl	_wl1251_boot_init_seq
	tbnz	w0, #31, LBB0_10
; %bb.6:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_wl1251_reg_read32
	mov	x20, x0
	ldr	w0, [x22]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_wl1251_debug
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_wl1251_boot_upload_firmware
	tbnz	w0, #31, LBB0_10
; %bb.8:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_wl1251_boot_run_firmware
LBB0_9:
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1251_error
Lloh35:
	adrp	x8, _EIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdrp	Lloh22, Lloh24
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ACX_REG_ECPU_CONTROL,4,2       ; @ACX_REG_ECPU_CONTROL
	.comm	_ECPU_CONTROL_HALT,4,2          ; @ECPU_CONTROL_HALT
	.comm	_ACX_REG_EE_START,4,2           ; @ACX_REG_EE_START
	.comm	_START_EEPROM_MGR,4,2           ; @START_EEPROM_MGR
	.comm	_ACX_EEPROMLESS_IND_REG,4,2     ; @ACX_EEPROMLESS_IND_REG
	.comm	_USE_EEPROM,4,2                 ; @USE_EEPROM
	.comm	_SCR_PAD2,4,2                   ; @SCR_PAD2
	.comm	_SCR_PAD3,4,2                   ; @SCR_PAD3
	.comm	_DEBUG_BOOT,4,2                 ; @DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radioType 0x%x majorE2Ver 0x%x minorE2Ver 0x%x minor_minor_e2_ver 0x%x"

l_.str.1:                               ; @.str.1
	.asciz	"halt boot_data 0x%x"

l_.str.2:                               ; @.str.2
	.asciz	"boot failed, ECPU_CONTROL_HALT not set"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
