	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_antsel_attach          ## -- Begin function brcms_c_antsel_attach
	.p2align	4, 0x90
_brcms_c_antsel_attach:                 ## @brcms_c_antsel_attach
	.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, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%r14, 32(%rbx)
	movq	8(%r14), %rax
	movq	%rax, 24(%rbx)
	movq	_ANTSEL_NA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rsi, 16(%rbx)
	movl	$0, (%rbx)
	movl	(%r15), %ecx
	movl	%ecx, 4(%rbx)
	movl	(%rax), %edx
	cmpl	$4, %edx
	jl	LBB0_9
## %bb.2:
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.3:
	addl	$-128, %ecx
	cmpl	$2, %ecx
	ja	LBB0_17
## %bb.4:
	movq	_ANTSEL_2x3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rsi, 16(%rbx)
	movl	4(%r15), %eax
	cmpl	$7, %eax
	je	LBB0_16
## %bb.5:
	movl	8(%r15), %ecx
	cmpl	$7, %ecx
	je	LBB0_16
## %bb.6:
	movl	$0, (%rbx)
	cmpl	$3, %eax
	je	LBB0_17
## %bb.7:
	cmpl	$3, %ecx
	je	LBB0_17
## %bb.8:
	movq	(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_brcms_err
	movq	16(%rbx), %rsi
	jmp	LBB0_17
LBB0_9:
	cmpl	$4, %edx
	jne	LBB0_13
## %bb.10:
	cmpl	$7, 4(%r15)
	jne	LBB0_13
## %bb.11:
	cmpl	$0, 8(%r15)
	je	LBB0_12
LBB0_13:
	movq	_BFL2_2X4_DIV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_17
## %bb.14:
	movq	_ANTSEL_2x4@GOTPCREL(%rip), %rax
LBB0_15:
	movq	(%rax), %rsi
	movq	%rsi, 16(%rbx)
LBB0_16:
	movl	$1, (%rbx)
LBB0_17:
	movq	(%r14), %rdi
	callq	_brcms_b_antsel_type_set
	leaq	12(%rbx), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_brcms_c_antsel_init_cfg
	movq	%rbx, %rsi
	addq	$8, %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_brcms_c_antsel_init_cfg
LBB0_18:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ANTSEL_2x3@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ANTSEL_NA,8,3                  ## @ANTSEL_NA
	.comm	_ANTSEL_2x3,8,3                 ## @ANTSEL_2x3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"antsel_attach: 2o3 board cfg invalid\n"

	.comm	_BFL2_2X4_DIV,4,2               ## @BFL2_2X4_DIV
	.comm	_ANTSEL_2x4,8,3                 ## @ANTSEL_2x4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_antsel_attach          ; -- Begin function brcms_c_antsel_attach
	.p2align	2
_brcms_c_antsel_attach:                 ; @brcms_c_antsel_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.1:
	str	x20, [x19, #32]
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _ANTSEL_NA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ANTSEL_NA@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x9]
	stp	x1, x8, [x19, #16]
	ldr	w9, [x21]
	stp	wzr, w9, [x19]
	ldr	w10, [x8]
	cmp	w10, #4
	ccmp	w9, #0, #4, ge
	b.ne	LBB0_8
; %bb.2:
	cmp	w10, #4
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [x21, #4]
	cmp	w9, #7
	b.ne	LBB0_5
; %bb.4:
	ldr	w9, [x21, #8]
	cbz	w9, LBB0_16
LBB0_5:
	ldr	w8, [x8, #4]
Lloh6:
	adrp	x9, _BFL2_2X4_DIV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BFL2_2X4_DIV@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.6:
Lloh9:
	adrp	x8, _ANTSEL_2x4@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ANTSEL_2x4@GOTPAGEOFF]
LBB0_7:
	ldr	x1, [x8]
	str	x1, [x19, #16]
	b	LBB0_11
LBB0_8:
	sub	w8, w9, #128
	cmp	w8, #2
	b.hi	LBB0_12
; %bb.9:
Lloh11:
	adrp	x8, _ANTSEL_2x3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ANTSEL_2x3@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	str	x1, [x19, #16]
	ldr	w8, [x21, #4]
	cmp	w8, #7
	b.eq	LBB0_11
; %bb.10:
	ldr	w9, [x21, #8]
	cmp	w9, #7
	b.ne	LBB0_14
LBB0_11:
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	ldr	x0, [x20]
	bl	_brcms_b_antsel_type_set
	add	x1, x19, #12
	mov	x0, x19
	mov	w2, #1
	bl	_brcms_c_antsel_init_cfg
	add	x1, x19, #8
	mov	x0, x19
	mov	w2, #1
	bl	_brcms_c_antsel_init_cfg
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	str	wzr, [x19]
	cmp	w8, #3
	ccmp	w9, #3, #4, ne
	b.eq	LBB0_12
; %bb.15:
	ldr	x8, [x20]
	ldr	x0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_err
	ldr	x1, [x19, #16]
	b	LBB0_12
LBB0_16:
Lloh16:
	adrp	x8, _ANTSEL_2x3@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ANTSEL_2x3@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ANTSEL_NA,8,3                  ; @ANTSEL_NA
	.comm	_ANTSEL_2x3,8,3                 ; @ANTSEL_2x3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"antsel_attach: 2o3 board cfg invalid\n"

	.comm	_BFL2_2X4_DIV,4,2               ; @BFL2_2X4_DIV
	.comm	_ANTSEL_2x4,8,3                 ; @ANTSEL_2x4
.subsections_via_symbols
