	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_chip_parameter_setup
_rtw_chip_parameter_setup:              ## @rtw_chip_parameter_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	64(%rdi), %r14
	callq	_rtw_hci_type
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.1:
	movl	$985, 48(%rbx)                  ## imm = 0x3D9
	movq	_REG_SYS_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtw_read32
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_BIT_GET_VENDOR_ID
	sarl	$2, %eax
	movl	%eax, 4(%rbx)
	movl	(%rbx), %edi
	callq	_BIT_GET_CHIP_VER
	movl	%eax, 44(%rbx)
	movq	_BIT_RTL_ID@GOTPCREL(%rip), %rcx
	movl	(%rbx), %edx
	movl	4(%rbx), %r8d
	xorl	%esi, %esi
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	sete	%sil
	movl	%esi, 8(%rbx)
	movq	_BIT_RF_TYPE_ID@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	andl	(%rcx), %edx
	movq	_BB_PATH_AB@GOTPCREL(%rip), %rcx
	cmoveq	_BB_PATH_A@GOTPCREL(%rip), %rcx
	sete	%sil
	movq	(%rcx), %rdx
	movq	_RF_2T2R@GOTPCREL(%rip), %rdi
	cmoveq	_RF_1T1R@GOTPCREL(%rip), %rdi
	movl	$2, %ecx
	movl	$2, %eax
	subl	%esi, %eax
	movl	(%rdi), %esi
	movl	%esi, 40(%rbx)
	movl	%eax, 12(%rbx)
	movq	%rdx, 32(%rbx)
	movq	%rdx, 24(%rbx)
	cmpl	$1, %r8d
	je	LBB0_3
## %bb.2:
	movl	$1, %ecx
	cmpl	$2, %r8d
	jne	LBB0_4
LBB0_3:
	movl	%ecx, 4(%rbx)
LBB0_4:
	movl	8(%r14), %eax
	movl	%eax, 60(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 56(%rbx)
	movl	(%r14), %eax
	movl	%eax, 52(%rbx)
	movq	_BIT_VHT_DACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_rtw_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported hci type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REG_SYS_CFG1,4,2               ## @REG_SYS_CFG1
	.comm	_BIT_RTL_ID,4,2                 ## @BIT_RTL_ID
	.comm	_BIT_RF_TYPE_ID,4,2             ## @BIT_RF_TYPE_ID
	.comm	_RF_2T2R,4,2                    ## @RF_2T2R
	.comm	_BB_PATH_AB,8,3                 ## @BB_PATH_AB
	.comm	_RF_1T1R,4,2                    ## @RF_1T1R
	.comm	_BB_PATH_A,8,3                  ## @BB_PATH_A
	.comm	_BIT_VHT_DACK,4,2               ## @BIT_VHT_DACK
	.no_dead_strip	_rtw_chip_parameter_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_chip_parameter_setup
_rtw_chip_parameter_setup:              ; @rtw_chip_parameter_setup
	.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
	ldr	x20, [x0, #64]
	bl	_rtw_hci_type
	cmp	w0, #128
	b.ne	LBB0_3
; %bb.1:
	mov	w8, #985
	str	w8, [x19, #48]
Lloh0:
	adrp	x8, _REG_SYS_CFG1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_SYS_CFG1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtw_read32
	str	w0, [x19]
	bl	_BIT_GET_VENDOR_ID
	asr	w8, w0, #2
	str	w8, [x19, #4]
	ldr	w0, [x19]
	bl	_BIT_GET_CHIP_VER
Lloh3:
	adrp	x8, _BIT_RTL_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BIT_RTL_ID@GOTPAGEOFF]
	str	w0, [x19, #44]
Lloh5:
	ldr	w8, [x8]
	ldp	w10, w9, [x19]
	tst	w8, w10
	cset	w8, eq
	str	w8, [x19, #8]
Lloh6:
	adrp	x8, _BIT_RF_TYPE_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BIT_RF_TYPE_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w10
	mov	w8, #1
Lloh9:
	adrp	x10, _BB_PATH_A@GOTPAGE
Lloh10:
	ldr	x10, [x10, _BB_PATH_A@GOTPAGEOFF]
Lloh11:
	adrp	x11, _BB_PATH_AB@GOTPAGE
Lloh12:
	ldr	x11, [x11, _BB_PATH_AB@GOTPAGEOFF]
Lloh13:
	adrp	x12, _RF_1T1R@GOTPAGE
Lloh14:
	ldr	x12, [x12, _RF_1T1R@GOTPAGEOFF]
	csel	x10, x10, x11, eq
Lloh15:
	adrp	x11, _RF_2T2R@GOTPAGE
Lloh16:
	ldr	x11, [x11, _RF_2T2R@GOTPAGEOFF]
	csel	x11, x12, x11, eq
	cinc	w12, w8, ne
	ldr	x10, [x10]
	ldr	w11, [x11]
	str	w11, [x19, #40]
	str	w12, [x19, #12]
	stp	x10, x10, [x19, #24]
	cmp	w9, #1
	b.eq	LBB0_4
; %bb.2:
	cmp	w9, #2
	b.eq	LBB0_5
	b	LBB0_6
LBB0_3:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rtw_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
	mov	w8, #2
LBB0_5:
	str	w8, [x19, #4]
LBB0_6:
	mov	w0, #0
	ldr	w8, [x20, #8]
	str	w8, [x19, #60]
	ldr	d0, [x20]
	stur	d0, [x19, #52]
Lloh22:
	adrp	x8, _BIT_VHT_DACK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BIT_VHT_DACK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported hci type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REG_SYS_CFG1,4,2               ; @REG_SYS_CFG1
	.comm	_BIT_RTL_ID,4,2                 ; @BIT_RTL_ID
	.comm	_BIT_RF_TYPE_ID,4,2             ; @BIT_RF_TYPE_ID
	.comm	_RF_2T2R,4,2                    ; @RF_2T2R
	.comm	_BB_PATH_AB,8,3                 ; @BB_PATH_AB
	.comm	_RF_1T1R,4,2                    ; @RF_1T1R
	.comm	_BB_PATH_A,8,3                  ; @BB_PATH_A
	.comm	_BIT_VHT_DACK,4,2               ; @BIT_VHT_DACK
	.no_dead_strip	_rtw_chip_parameter_setup
.subsections_via_symbols
