	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_boot_run_firmware       ## -- Begin function wlcore_boot_run_firmware
	.p2align	4, 0x90
_wlcore_boot_run_firmware:              ## @wlcore_boot_run_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
	movq	%rdi, %r14
	movq	_PART_BOOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	24(%rdi), %rsi
	callq	_wlcore_set_partition
	testl	%eax, %eax
	js	LBB0_22
## %bb.1:
	movq	_ECPU_CONTROL_HALT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wl1271_boot_set_ecpu_ctrl
	testl	%eax, %eax
	js	LBB0_22
## %bb.2:
	movq	_REG_CHIP_ID_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_wlcore_read_reg
	testl	%eax, %eax
	js	LBB0_22
## %bb.3:
	movq	_DEBUG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	-48(%rbp), %rax
	cmpq	32(%r14), %rax
	jne	LBB0_24
## %bb.4:
	leaq	-56(%rbp), %r15
	movl	$4294967295, %r12d              ## imm = 0xFFFFFFFF
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movq	_INIT_LOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jge	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_INIT_LOOP_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	movq	_REG_INTERRUPT_NO_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_wlcore_read_reg
	testl	%eax, %eax
	js	LBB0_22
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax
	cmpq	%r12, %rax
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_WL1271_ACX_INTR_INIT_COMPLETE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	leal	1(%r13), %ebx
	testq	%rax, %rdx
	je	LBB0_5
## %bb.11:
	movq	_REG_INTERRUPT_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wlcore_write_reg
	testl	%eax, %eax
	js	LBB0_22
## %bb.12:
	movq	_INIT_LOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
	cmpl	%eax, %r13d
	jge	LBB0_14
## %bb.15:
	movq	_REG_COMMAND_MAILBOX_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r14, %rdx
	callq	_wlcore_read_reg
	testl	%eax, %eax
	js	LBB0_22
## %bb.16:
	movq	_DEBUG_MAILBOX@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	(%r14), %rdx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	_REG_EVENT_MAILBOX_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rdx
	movq	%r14, %rdi
	callq	_wlcore_read_reg
	testl	%eax, %eax
	js	LBB0_22
## %bb.17:
	movq	8(%r14), %rax
	movq	(%rax), %rdx
	movq	16(%r14), %rcx
	addq	%rdx, %rcx
	movq	%rcx, 8(%rax)
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	%r14, %rdi
	callq	_wlcore_boot_static_data
	testl	%eax, %eax
	js	LBB0_18
## %bb.19:
	movq	%r14, %rdi
	callq	_wl1271_event_unmask
	testl	%eax, %eax
	js	LBB0_20
## %bb.21:
	movq	_PART_WORK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	24(%r14), %rsi
	movq	%r14, %rdi
	callq	_wlcore_set_partition
LBB0_22:
	movl	%eax, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	leaq	L_.str.1(%rip), %rdi
	callq	_wl1271_error
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	callq	_wl1271_error
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_18:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
	callq	_wl1271_error
	jmp	LBB0_23
LBB0_20:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rdi
	callq	_wl1271_error
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_PART_BOOT,8,3                  ## @PART_BOOT
	.comm	_ECPU_CONTROL_HALT,4,2          ## @ECPU_CONTROL_HALT
	.comm	_REG_CHIP_ID_B,4,2              ## @REG_CHIP_ID_B
	.comm	_DEBUG_BOOT,4,2                 ## @DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chip id after firmware boot: 0x%x"

L_.str.1:                               ## @.str.1
	.asciz	"chip id doesn't match after firmware boot"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_INIT_LOOP,4,2                  ## @INIT_LOOP
	.comm	_INIT_LOOP_DELAY,4,2            ## @INIT_LOOP_DELAY
	.comm	_REG_INTERRUPT_NO_CLEAR,4,2     ## @REG_INTERRUPT_NO_CLEAR
L_.str.2:                               ## @.str.2
	.asciz	"error reading hardware complete init indication"

	.comm	_WL1271_ACX_INTR_INIT_COMPLETE,8,3 ## @WL1271_ACX_INTR_INIT_COMPLETE
	.comm	_REG_INTERRUPT_ACK,4,2          ## @REG_INTERRUPT_ACK
L_.str.3:                               ## @.str.3
	.asciz	"timeout waiting for the hardware to complete initialization"

	.comm	_REG_COMMAND_MAILBOX_PTR,4,2    ## @REG_COMMAND_MAILBOX_PTR
	.comm	_DEBUG_MAILBOX,4,2              ## @DEBUG_MAILBOX
L_.str.4:                               ## @.str.4
	.asciz	"cmd_box_addr 0x%x"

	.comm	_REG_EVENT_MAILBOX_PTR,4,2      ## @REG_EVENT_MAILBOX_PTR
L_.str.5:                               ## @.str.5
	.asciz	"MBOX ptrs: 0x%x 0x%x"

L_.str.6:                               ## @.str.6
	.asciz	"error getting static data"

L_.str.7:                               ## @.str.7
	.asciz	"EVENT mask setting failed"

	.comm	_PART_WORK,8,3                  ## @PART_WORK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_boot_run_firmware       ; -- Begin function wlcore_boot_run_firmware
	.p2align	2
_wlcore_boot_run_firmware:              ; @wlcore_boot_run_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _PART_BOOT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PART_BOOT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	bl	_wlcore_set_partition
	tbnz	w0, #31, LBB0_17
; %bb.1:
Lloh3:
	adrp	x8, _ECPU_CONTROL_HALT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ECPU_CONTROL_HALT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wl1271_boot_set_ecpu_ctrl
	tbnz	w0, #31, LBB0_17
; %bb.2:
Lloh6:
	adrp	x8, _REG_CHIP_ID_B@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_CHIP_ID_B@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x19
	bl	_wlcore_read_reg
	tbnz	w0, #31, LBB0_17
; %bb.3:
Lloh9:
	adrp	x8, _DEBUG_BOOT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DEBUG_BOOT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x2, [sp, #24]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1271_debug
	ldr	x8, [sp, #24]
	ldr	x9, [x19, #32]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.4:
	mov	w8, #0
Lloh14:
	adrp	x21, _INIT_LOOP@GOTPAGE
Lloh15:
	ldr	x21, [x21, _INIT_LOOP@GOTPAGEOFF]
Lloh16:
	adrp	x23, _INIT_LOOP_DELAY@GOTPAGE
Lloh17:
	ldr	x23, [x23, _INIT_LOOP_DELAY@GOTPAGEOFF]
Lloh18:
	adrp	x24, _REG_INTERRUPT_NO_CLEAR@GOTPAGE
Lloh19:
	ldr	x24, [x24, _REG_INTERRUPT_NO_CLEAR@GOTPAGEOFF]
	mov	w25, #-1
Lloh20:
	adrp	x26, _WL1271_ACX_INTR_INIT_COMPLETE@GOTPAGE
Lloh21:
	ldr	x26, [x26, _WL1271_ACX_INTR_INIT_COMPLETE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	ldr	w8, [x21]
	cmp	w22, w8
	b.ge	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
	bl	_udelay
	ldr	w1, [x24]
	add	x2, sp, #16
	mov	x0, x19
	bl	_wlcore_read_reg
	tbnz	w0, #31, LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [sp, #16]
	cmp	x9, x25
	b.eq	LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x26]
	add	w8, w22, #1
	tst	x2, x9
	b.eq	LBB0_5
; %bb.9:
Lloh22:
	adrp	x8, _REG_INTERRUPT_ACK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REG_INTERRUPT_ACK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wlcore_write_reg
	tbnz	w0, #31, LBB0_17
; %bb.10:
	ldr	w8, [x21]
LBB0_11:
	cmp	w22, w8
	b.ge	LBB0_22
; %bb.12:
Lloh25:
	adrp	x8, _REG_COMMAND_MAILBOX_PTR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _REG_COMMAND_MAILBOX_PTR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_wlcore_read_reg
	tbnz	w0, #31, LBB0_17
; %bb.13:
Lloh28:
	adrp	x21, _DEBUG_MAILBOX@GOTPAGE
Lloh29:
	ldr	x21, [x21, _DEBUG_MAILBOX@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x2, [x19]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wl1271_debug
Lloh32:
	adrp	x8, _REG_EVENT_MAILBOX_PTR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _REG_EVENT_MAILBOX_PTR@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	bl	_wlcore_read_reg
	tbnz	w0, #31, LBB0_17
; %bb.14:
	ldp	x8, x9, [x19, #8]
	ldr	x2, [x8]
	add	x9, x9, x2
	str	x9, [x8, #8]
	ldr	w0, [x21]
	str	x9, [sp]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wl1271_debug
	mov	x0, x19
	bl	_wlcore_boot_static_data
	tbnz	w0, #31, LBB0_23
; %bb.15:
	mov	x0, x19
	bl	_wl1271_event_unmask
	tbnz	w0, #31, LBB0_24
; %bb.16:
	ldr	x8, [x19, #24]
Lloh37:
	adrp	x9, _PART_WORK@GOTPAGE
Lloh38:
	ldr	x9, [x9, _PART_WORK@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_wlcore_set_partition
LBB0_17:
	mov	x20, x0
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
Lloh40:
	adrp	x0, l_.str.1@PAGE
Lloh41:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_20:
	bl	_wl1271_error
Lloh42:
	adrp	x8, _EIO@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_18
LBB0_21:
Lloh45:
	adrp	x0, l_.str.2@PAGE
Lloh46:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_22:
Lloh47:
	adrp	x0, l_.str.3@PAGE
Lloh48:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_20
LBB0_23:
	mov	x20, x0
Lloh49:
	adrp	x0, l_.str.6@PAGE
Lloh50:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_wl1271_error
	b	LBB0_18
LBB0_24:
	mov	x20, x0
Lloh51:
	adrp	x0, l_.str.7@PAGE
Lloh52:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_wl1271_error
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_PART_BOOT,8,3                  ; @PART_BOOT
	.comm	_ECPU_CONTROL_HALT,4,2          ; @ECPU_CONTROL_HALT
	.comm	_REG_CHIP_ID_B,4,2              ; @REG_CHIP_ID_B
	.comm	_DEBUG_BOOT,4,2                 ; @DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chip id after firmware boot: 0x%x"

l_.str.1:                               ; @.str.1
	.asciz	"chip id doesn't match after firmware boot"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_INIT_LOOP,4,2                  ; @INIT_LOOP
	.comm	_INIT_LOOP_DELAY,4,2            ; @INIT_LOOP_DELAY
	.comm	_REG_INTERRUPT_NO_CLEAR,4,2     ; @REG_INTERRUPT_NO_CLEAR
l_.str.2:                               ; @.str.2
	.asciz	"error reading hardware complete init indication"

	.comm	_WL1271_ACX_INTR_INIT_COMPLETE,8,3 ; @WL1271_ACX_INTR_INIT_COMPLETE
	.comm	_REG_INTERRUPT_ACK,4,2          ; @REG_INTERRUPT_ACK
l_.str.3:                               ; @.str.3
	.asciz	"timeout waiting for the hardware to complete initialization"

	.comm	_REG_COMMAND_MAILBOX_PTR,4,2    ; @REG_COMMAND_MAILBOX_PTR
	.comm	_DEBUG_MAILBOX,4,2              ; @DEBUG_MAILBOX
l_.str.4:                               ; @.str.4
	.asciz	"cmd_box_addr 0x%x"

	.comm	_REG_EVENT_MAILBOX_PTR,4,2      ; @REG_EVENT_MAILBOX_PTR
l_.str.5:                               ; @.str.5
	.asciz	"MBOX ptrs: 0x%x 0x%x"

l_.str.6:                               ; @.str.6
	.asciz	"error getting static data"

l_.str.7:                               ; @.str.7
	.asciz	"EVENT mask setting failed"

	.comm	_PART_WORK,8,3                  ; @PART_WORK
.subsections_via_symbols
