	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl18xx_pre_boot
_wl18xx_pre_boot:                       ## @wl18xx_pre_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_wl18xx_set_clk
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_WL18XX_WELP_ARM_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WELP_ARM_COMMAND_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_wlcore_write32
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	_PART_BOOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_wlcore_set_partition
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	_REG_INTERRUPT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL1271_ACX_INTR_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_wlcore_write_reg
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_wl18xx_boot_soft_reset         ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WL18XX_WELP_ARM_COMMAND,4,2    ## @WL18XX_WELP_ARM_COMMAND
	.comm	_WELP_ARM_COMMAND_VAL,4,2       ## @WELP_ARM_COMMAND_VAL
	.comm	_PART_BOOT,8,3                  ## @PART_BOOT
	.comm	_REG_INTERRUPT_MASK,4,2         ## @REG_INTERRUPT_MASK
	.comm	_WL1271_ACX_INTR_ALL,4,2        ## @WL1271_ACX_INTR_ALL
	.no_dead_strip	_wl18xx_pre_boot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl18xx_pre_boot
_wl18xx_pre_boot:                       ; @wl18xx_pre_boot
	.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	_wl18xx_set_clk
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _WL18XX_WELP_ARM_COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WL18XX_WELP_ARM_COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _WELP_ARM_COMMAND_VAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WELP_ARM_COMMAND_VAL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wlcore_write32
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	w0, #500
	bl	_udelay
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _PART_BOOT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PART_BOOT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_wlcore_set_partition
	tbnz	w0, #31, LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _REG_INTERRUPT_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_INTERRUPT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _WL1271_ACX_INTR_ALL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WL1271_ACX_INTR_ALL@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wlcore_write_reg
	tbnz	w0, #31, LBB0_5
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_wl18xx_boot_soft_reset
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_WL18XX_WELP_ARM_COMMAND,4,2    ; @WL18XX_WELP_ARM_COMMAND
	.comm	_WELP_ARM_COMMAND_VAL,4,2       ; @WELP_ARM_COMMAND_VAL
	.comm	_PART_BOOT,8,3                  ; @PART_BOOT
	.comm	_REG_INTERRUPT_MASK,4,2         ; @REG_INTERRUPT_MASK
	.comm	_WL1271_ACX_INTR_ALL,4,2        ; @WL1271_ACX_INTR_ALL
	.no_dead_strip	_wl18xx_pre_boot
.subsections_via_symbols
