	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwifiex_pcie_get_fw_name
_mwifiex_pcie_get_fw_name:              ## @mwifiex_pcie_get_fw_name
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$0, -12(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.3:
	movl	(%rbx), %edi
	movq	_PCIE8766_DEFAULT_FW_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_strcpy                         ## TAILCALL
LBB0_5:
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_mwifiex_read_reg
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3280, %esi                     ## imm = 0xCD0
	callq	_mwifiex_read_reg
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3284, %esi                     ## imm = 0xCD4
	callq	_mwifiex_read_reg
	movzbl	-12(%rbp), %edx
	movl	%edx, -12(%rbp)
	movl	-20(%rbp), %eax
	andl	$7, %eax
	movl	%eax, -20(%rbp)
	movzbl	-16(%rbp), %ecx
	movl	%ecx, -16(%rbp)
	movq	_PCIE8997_A1@GOTPCREL(%rip), %rsi
	movl	(%rbx), %edi
	cmpl	(%rsi), %edx
	jne	LBB0_9
## %bb.6:
	movq	_CHIP_MAGIC_VALUE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_9
## %bb.7:
	movq	_CHIP_VER_PCIEUART@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movq	_PCIEUART8997_FW_NAME_V4@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	%rbx, %rdi
	movl	$3160, %esi                     ## imm = 0xC58
	movl	$-2134900736, %edx              ## imm = 0x80C00000
	callq	_mwifiex_write_reg
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3160, %esi                     ## imm = 0xC58
	callq	_mwifiex_read_reg
	movzbl	-11(%rbp), %eax
	shll	$8, %eax
	movl	%eax, -12(%rbp)
	movl	(%rbx), %edi
	movq	_PCIE8897_DEFAULT_FW_NAME@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_PCIEUSB8997_FW_NAME_V4@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %esi
	callq	_strcpy
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE8766_DEFAULT_FW_NAME,4,2   ## @PCIE8766_DEFAULT_FW_NAME
	.comm	_PCIE8897_A0_FW_NAME,4,2        ## @PCIE8897_A0_FW_NAME
	.comm	_PCIE8897_B0_FW_NAME,4,2        ## @PCIE8897_B0_FW_NAME
	.comm	_PCIE8897_DEFAULT_FW_NAME,4,2   ## @PCIE8897_DEFAULT_FW_NAME
	.comm	_PCIE8997_A1,4,2                ## @PCIE8997_A1
	.comm	_CHIP_MAGIC_VALUE,4,2           ## @CHIP_MAGIC_VALUE
	.comm	_CHIP_VER_PCIEUART,4,2          ## @CHIP_VER_PCIEUART
	.comm	_PCIEUART8997_FW_NAME_V4,4,2    ## @PCIEUART8997_FW_NAME_V4
	.comm	_PCIEUSB8997_FW_NAME_V4,4,2     ## @PCIEUSB8997_FW_NAME_V4
	.no_dead_strip	_mwifiex_pcie_get_fw_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwifiex_pcie_get_fw_name
_mwifiex_pcie_get_fw_name:              ; @mwifiex_pcie_get_fw_name
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _PCIE8766_DEFAULT_FW_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIE8766_DEFAULT_FW_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_strcpy
LBB0_4:
	mov	x0, x19
	mov	w1, #3160
	mov	w2, #-2134900736
	bl	_mwifiex_write_reg
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #3160
	bl	_mwifiex_read_reg
	ldrb	w8, [sp, #13]
	lsl	w8, w8, #8
	str	w8, [sp, #12]
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _PCIE8897_DEFAULT_FW_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIE8897_DEFAULT_FW_NAME@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #8
	bl	_mwifiex_read_reg
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #3280
	bl	_mwifiex_read_reg
	add	x2, sp, #4
	mov	x0, x19
	mov	w1, #3284
	bl	_mwifiex_read_reg
	ldrb	w8, [sp, #12]
	ldr	w9, [sp, #8]
	and	w9, w9, #0x7
	stp	w9, w8, [sp, #8]
	ldrb	w10, [sp, #4]
Lloh5:
	adrp	x11, _PCIE8997_A1@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PCIE8997_A1@GOTPAGEOFF]
	str	w10, [sp, #4]
Lloh7:
	ldr	w11, [x11]
Lloh8:
	adrp	x12, _CHIP_MAGIC_VALUE@GOTPAGE
Lloh9:
	ldr	x12, [x12, _CHIP_MAGIC_VALUE@GOTPAGEOFF]
Lloh10:
	adrp	x13, _CHIP_VER_PCIEUART@GOTPAGE
Lloh11:
	ldr	x13, [x13, _CHIP_VER_PCIEUART@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
Lloh13:
	ldr	w13, [x13]
	ldr	w0, [x19]
	cmp	w8, w11
	ccmp	w10, w12, #0, eq
	ccmp	w9, w13, #0, eq
	b.eq	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _PCIEUSB8997_FW_NAME_V4@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCIEUSB8997_FW_NAME_V4@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _PCIEUART8997_FW_NAME_V4@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCIEUART8997_FW_NAME_V4@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	bl	_strcpy
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE8766_DEFAULT_FW_NAME,4,2   ; @PCIE8766_DEFAULT_FW_NAME
	.comm	_PCIE8897_A0_FW_NAME,4,2        ; @PCIE8897_A0_FW_NAME
	.comm	_PCIE8897_B0_FW_NAME,4,2        ; @PCIE8897_B0_FW_NAME
	.comm	_PCIE8897_DEFAULT_FW_NAME,4,2   ; @PCIE8897_DEFAULT_FW_NAME
	.comm	_PCIE8997_A1,4,2                ; @PCIE8997_A1
	.comm	_CHIP_MAGIC_VALUE,4,2           ; @CHIP_MAGIC_VALUE
	.comm	_CHIP_VER_PCIEUART,4,2          ; @CHIP_VER_PCIEUART
	.comm	_PCIEUART8997_FW_NAME_V4,4,2    ; @PCIEUART8997_FW_NAME_V4
	.comm	_PCIEUSB8997_FW_NAME_V4,4,2     ; @PCIEUSB8997_FW_NAME_V4
	.no_dead_strip	_mwifiex_pcie_get_fw_name
.subsections_via_symbols
