	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl18xx_get_pg_ver
_wl18xx_get_pg_ver:                     ## @wl18xx_get_pg_ver
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_PART_TOP_PRCM_ELP_SOC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rdi), %rsi
	callq	_wlcore_set_partition
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	_WL18XX_REG_FUSE_DATA_2_3@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_wlcore_read32
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movl	-44(%rbp), %r15d
	movq	_WL18XX_PACKAGE_TYPE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_WL18XX_REG_FUSE_DATA_1_3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_wlcore_read32
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movl	%r15d, -72(%rbp)                ## 4-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %ecx
	movq	_WL18XX_PG_VER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	andl	%ecx, %r15d
	movq	_WL18XX_PG_VER_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r15d
	movq	_WL18XX_ROM_VER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_WL18XX_ROM_VER_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_WL18XX_PACKAGE_TYPE_WSP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_WL18XX_METAL_VER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_WL18XX_NEW_METAL_VER_MASK@GOTPCREL(%rip), %rax
	movq	%r13, %rcx
	movl	(%rax), %r13d
	movq	_WL18XX_METAL_VER_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_WL18XX_NEW_METAL_VER_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rcx), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_wlcore_read32
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	andl	%edi, %r12d
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r12d
	cmpl	$15, %r12d
	setl	%al
	xorl	%ecx, %ecx
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	btl	%esi, %edx
	setb	%cl
	cmpl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	sete	%cl
	testb	%cl, %al
	cmovnel	-60(%rbp), %r13d                ## 4-byte Folded Reload
	cmovnel	-52(%rbp), %r14d                ## 4-byte Folded Reload
	andl	%edi, %r13d
	movl	%r14d, %ecx
	sarl	%cl, %r13d
	movq	_WL18XX_RDL_VER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	-44(%rbp), %edi
	movq	_WL18XX_RDL_VER_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edi
	callq	_wl18xx_rdl_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	callq	_wl1271_info
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	%r15d, (%rax)
LBB0_6:
	movq	_PART_BOOT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_wlcore_set_partition
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PART_TOP_PRCM_ELP_SOC,8,3      ## @PART_TOP_PRCM_ELP_SOC
	.comm	_WL18XX_REG_FUSE_DATA_2_3,4,2   ## @WL18XX_REG_FUSE_DATA_2_3
	.comm	_WL18XX_PACKAGE_TYPE_OFFSET,4,2 ## @WL18XX_PACKAGE_TYPE_OFFSET
	.comm	_WL18XX_REG_FUSE_DATA_1_3,4,2   ## @WL18XX_REG_FUSE_DATA_1_3
	.comm	_WL18XX_PG_VER_MASK,4,2         ## @WL18XX_PG_VER_MASK
	.comm	_WL18XX_PG_VER_OFFSET,4,2       ## @WL18XX_PG_VER_OFFSET
	.comm	_WL18XX_ROM_VER_MASK,4,2        ## @WL18XX_ROM_VER_MASK
	.comm	_WL18XX_ROM_VER_OFFSET,4,2      ## @WL18XX_ROM_VER_OFFSET
	.comm	_WL18XX_PACKAGE_TYPE_WSP,4,2    ## @WL18XX_PACKAGE_TYPE_WSP
	.comm	_WL18XX_METAL_VER_MASK,4,2      ## @WL18XX_METAL_VER_MASK
	.comm	_WL18XX_METAL_VER_OFFSET,4,2    ## @WL18XX_METAL_VER_OFFSET
	.comm	_WL18XX_NEW_METAL_VER_MASK,4,2  ## @WL18XX_NEW_METAL_VER_MASK
	.comm	_WL18XX_NEW_METAL_VER_OFFSET,4,2 ## @WL18XX_NEW_METAL_VER_OFFSET
	.comm	_WL18XX_RDL_VER_MASK,4,2        ## @WL18XX_RDL_VER_MASK
	.comm	_WL18XX_RDL_VER_OFFSET,4,2      ## @WL18XX_RDL_VER_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl18xx HW: %s, PG %d.%d (ROM 0x%x)"

	.comm	_PART_BOOT,8,3                  ## @PART_BOOT
	.no_dead_strip	_wl18xx_get_pg_ver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl18xx_get_pg_ver
_wl18xx_get_pg_ver:                     ; @wl18xx_get_pg_ver
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PART_TOP_PRCM_ELP_SOC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PART_TOP_PRCM_ELP_SOC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	bl	_wlcore_set_partition
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh3:
	adrp	x21, _WL18XX_REG_FUSE_DATA_2_3@GOTPAGE
Lloh4:
	ldr	x21, [x21, _WL18XX_REG_FUSE_DATA_2_3@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #28
	mov	x0, x19
	bl	_wlcore_read32
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	w22, [sp, #28]
Lloh5:
	adrp	x8, _WL18XX_PACKAGE_TYPE_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WL18XX_PACKAGE_TYPE_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
Lloh8:
	adrp	x8, _WL18XX_REG_FUSE_DATA_1_3@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WL18XX_REG_FUSE_DATA_1_3@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #28
	mov	x0, x19
	bl	_wlcore_read32
	tbnz	w0, #31, LBB0_7
; %bb.3:
	stp	w23, w22, [sp, #20]             ; 8-byte Folded Spill
	ldr	w25, [sp, #28]
Lloh11:
	adrp	x8, _WL18XX_PG_VER_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WL18XX_PG_VER_MASK@GOTPAGEOFF]
Lloh13:
	adrp	x9, _WL18XX_PG_VER_OFFSET@GOTPAGE
Lloh14:
	ldr	x9, [x9, _WL18XX_PG_VER_OFFSET@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
Lloh16:
	ldr	w8, [x9]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh17:
	adrp	x8, _WL18XX_ROM_VER_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WL18XX_ROM_VER_MASK@GOTPAGEOFF]
Lloh19:
	adrp	x9, _WL18XX_ROM_VER_OFFSET@GOTPAGE
Lloh20:
	ldr	x9, [x9, _WL18XX_ROM_VER_OFFSET@GOTPAGEOFF]
Lloh21:
	ldr	w27, [x8]
Lloh22:
	ldr	w26, [x9]
Lloh23:
	adrp	x8, _WL18XX_PACKAGE_TYPE_WSP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WL18XX_PACKAGE_TYPE_WSP@GOTPAGEOFF]
Lloh25:
	adrp	x9, _WL18XX_METAL_VER_MASK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _WL18XX_METAL_VER_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w28, [x8]
Lloh28:
	ldr	w8, [x9]
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
Lloh29:
	adrp	x8, _WL18XX_NEW_METAL_VER_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WL18XX_NEW_METAL_VER_MASK@GOTPAGEOFF]
Lloh31:
	adrp	x9, _WL18XX_METAL_VER_OFFSET@GOTPAGE
Lloh32:
	ldr	x9, [x9, _WL18XX_METAL_VER_OFFSET@GOTPAGEOFF]
Lloh33:
	ldr	w23, [x8]
Lloh34:
	ldr	w8, [x9]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
Lloh35:
	adrp	x8, _WL18XX_NEW_METAL_VER_OFFSET@GOTPAGE
Lloh36:
	ldr	x8, [x8, _WL18XX_NEW_METAL_VER_OFFSET@GOTPAGEOFF]
Lloh37:
	ldr	w24, [x8]
	ldr	w1, [x21]
	add	x2, sp, #28
	mov	x0, x19
	bl	_wlcore_read32
	tbnz	w0, #31, LBB0_7
; %bb.4:
	and	w8, w22, w25
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	asr	w21, w8, w9
	and	w8, w27, w25
	asr	w22, w8, w26
	cmp	w22, #15
	cset	w8, lt
	ldp	w10, w9, [sp, #20]              ; 8-byte Folded Reload
	lsr	w9, w9, w10
	and	w9, w9, #0x1
	cmp	w9, w28
	cset	w9, eq
	tst	w8, w9
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	csel	w8, w8, w23, ne
	and	w8, w8, w25
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	csel	w9, w9, w24, ne
	asr	w23, w8, w9
	ldr	w8, [sp, #28]
Lloh38:
	adrp	x9, _WL18XX_RDL_VER_MASK@GOTPAGE
Lloh39:
	ldr	x9, [x9, _WL18XX_RDL_VER_MASK@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh41:
	adrp	x9, _WL18XX_RDL_VER_OFFSET@GOTPAGE
Lloh42:
	ldr	x9, [x9, _WL18XX_RDL_VER_OFFSET@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	asr	w0, w8, w9
	bl	_wl18xx_rdl_name
	mov	x1, x0
Lloh44:
	adrp	x0, l_.str@PAGE
Lloh45:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x23
	mov	x4, x22
	bl	_wl1271_info
	cbz	x20, LBB0_6
; %bb.5:
	str	w21, [x20]
LBB0_6:
	ldr	x8, [x19]
Lloh46:
	adrp	x9, _PART_BOOT@GOTPAGE
Lloh47:
	ldr	x9, [x9, _PART_BOOT@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_wlcore_set_partition
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_PART_TOP_PRCM_ELP_SOC,8,3      ; @PART_TOP_PRCM_ELP_SOC
	.comm	_WL18XX_REG_FUSE_DATA_2_3,4,2   ; @WL18XX_REG_FUSE_DATA_2_3
	.comm	_WL18XX_PACKAGE_TYPE_OFFSET,4,2 ; @WL18XX_PACKAGE_TYPE_OFFSET
	.comm	_WL18XX_REG_FUSE_DATA_1_3,4,2   ; @WL18XX_REG_FUSE_DATA_1_3
	.comm	_WL18XX_PG_VER_MASK,4,2         ; @WL18XX_PG_VER_MASK
	.comm	_WL18XX_PG_VER_OFFSET,4,2       ; @WL18XX_PG_VER_OFFSET
	.comm	_WL18XX_ROM_VER_MASK,4,2        ; @WL18XX_ROM_VER_MASK
	.comm	_WL18XX_ROM_VER_OFFSET,4,2      ; @WL18XX_ROM_VER_OFFSET
	.comm	_WL18XX_PACKAGE_TYPE_WSP,4,2    ; @WL18XX_PACKAGE_TYPE_WSP
	.comm	_WL18XX_METAL_VER_MASK,4,2      ; @WL18XX_METAL_VER_MASK
	.comm	_WL18XX_METAL_VER_OFFSET,4,2    ; @WL18XX_METAL_VER_OFFSET
	.comm	_WL18XX_NEW_METAL_VER_MASK,4,2  ; @WL18XX_NEW_METAL_VER_MASK
	.comm	_WL18XX_NEW_METAL_VER_OFFSET,4,2 ; @WL18XX_NEW_METAL_VER_OFFSET
	.comm	_WL18XX_RDL_VER_MASK,4,2        ; @WL18XX_RDL_VER_MASK
	.comm	_WL18XX_RDL_VER_OFFSET,4,2      ; @WL18XX_RDL_VER_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl18xx HW: %s, PG %d.%d (ROM 0x%x)"

	.comm	_PART_BOOT,8,3                  ; @PART_BOOT
	.no_dead_strip	_wl18xx_get_pg_ver
.subsections_via_symbols
