	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grf5101_rf_init
_grf5101_rf_init:                       ## @grf5101_rf_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movl	16(%r14), %esi
	movq	%r14, %rdi
	callq	_rtl8180_set_anaparam
	movq	%rbx, %rdi
	movl	$31, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$64, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$96, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$97, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$97, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$2788, %edx                     ## imm = 0xAE4
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$1, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$65, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$31, %esi
	movl	$97, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$6691, %edx                     ## imm = 0x1A23
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$18801, %edx                    ## imm = 0x4971
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	$16862, %edx                    ## imm = 0x41DE
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$11648, %edx                    ## imm = 0x2D80
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	$26879, %edx                    ## imm = 0x68FF
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$30003, %edx                    ## imm = 0x7533
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$9, %esi
	movl	$50177, %edx                    ## imm = 0xC401
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$10, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	$455, %edx                      ## imm = 0x1C7
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$13, %esi
	movl	$10707, %edx                    ## imm = 0x29D3
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$14, %esi
	movl	$744, %edx                      ## imm = 0x2E8
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	$402, %edx                      ## imm = 0x192
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$584, %edx                      ## imm = 0x248
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$18, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$19, %esi
	movl	$8388, %edx                     ## imm = 0x20C4
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$20, %esi
	movl	$62716, %edx                    ## imm = 0xF4FC
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$21, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$22, %esi
	movl	$5376, %edx                     ## imm = 0x1500
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$7, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_write_grf5101
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$168, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$192, %edx
	callq	_rtl8180_write_phy
	movl	$144, %r15d
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	$144, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	$30, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$7, %esi
	movl	$100, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_grf5101_write_phy_antenna
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$136, %edx
	callq	_rtl8180_write_phy
	movq	8(%r14), %rsi
	movq	%r14, %rdi
	callq	_rtl818x_ioread8
	movq	_RTL818X_CONFIG2_ANTENNA_DIV@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	shll	$7, %edx
	orl	$64, %edx
	movq	%rbx, %rdi
	movl	$18, %esi
	callq	_rtl8180_write_phy
	orl	(%r14), %r15d
	movq	%rbx, %rdi
	movl	$19, %esi
	movl	%r15d, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$25, %esi
	xorl	%edx, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$26, %esi
	movl	$160, %edx
	callq	_rtl8180_write_phy
	movq	%rbx, %rdi
	movl	$27, %esi
	movl	$68, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl8180_write_phy              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL818X_CONFIG2_ANTENNA_DIV,4,2 ## @RTL818X_CONFIG2_ANTENNA_DIV
	.no_dead_strip	_grf5101_rf_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grf5101_rf_init
_grf5101_rf_init:                       ; @grf5101_rf_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0]
	ldr	w1, [x20, #16]
	mov	x0, x20
	bl	_rtl8180_set_anaparam
	mov	x0, x19
	mov	w1, #31
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #0
	bl	_write_grf5101
	mov	w21, #64
	mov	x0, x19
	mov	w1, #31
	mov	w2, #64
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #96
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #97
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #97
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #0
	mov	w2, #2788
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #1
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #65
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #31
	mov	w2, #97
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #1
	mov	w2, #6691
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #2
	mov	w2, #18801
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #3
	mov	w2, #16862
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #4
	mov	w2, #11648
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #5
	mov	w2, #26879
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #7
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #8
	mov	w2, #30003
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #9
	mov	w2, #50177
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #10
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #12
	mov	w2, #455
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #13
	mov	w2, #10707
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #14
	mov	w2, #744
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #16
	mov	w2, #402
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #17
	mov	w2, #584
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #18
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #19
	mov	w2, #8388
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #20
	mov	w2, #62716
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #21
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #22
	mov	w2, #5376
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #7
	mov	w2, #4096
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #0
	mov	w2, #168
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_rtl8180_write_phy
	mov	w22, #192
	mov	x0, x19
	mov	w1, #4
	mov	w2, #192
	bl	_rtl8180_write_phy
	mov	w23, #144
	mov	x0, x19
	mov	w1, #5
	mov	w2, #144
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #6
	mov	w2, #30
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #7
	mov	w2, #100
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #1
	bl	_grf5101_write_phy_antenna
	mov	x0, x19
	mov	w1, #17
	mov	w2, #136
	bl	_rtl8180_write_phy
	ldr	x1, [x20, #8]
	mov	x0, x20
	bl	_rtl818x_ioread8
Lloh0:
	adrp	x8, _RTL818X_CONFIG2_ANTENNA_DIV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL818X_CONFIG2_ANTENNA_DIV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	csel	w2, w21, w22, eq
	mov	x0, x19
	mov	w1, #18
	bl	_rtl8180_write_phy
	ldr	w8, [x20]
	orr	w2, w8, w23
	mov	x0, x19
	mov	w1, #19
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #25
	mov	w2, #0
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #26
	mov	w2, #160
	bl	_rtl8180_write_phy
	mov	x0, x19
	mov	w1, #27
	mov	w2, #68
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_rtl8180_write_phy
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL818X_CONFIG2_ANTENNA_DIV,4,2 ; @RTL818X_CONFIG2_ANTENNA_DIV
	.no_dead_strip	_grf5101_rf_init
.subsections_via_symbols
