	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_b_setband
_brcms_b_setband:                       ## @brcms_b_setband
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %edi
	callq	_bcma_core_is_enabled
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_bcma_core_enable
	movq	%rbx, %rdi
	callq	_brcms_c_mctrl_reset
LBB0_2:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_brcms_c_setband_inact
	cmpl	$0, 4(%rbx)
	je	LBB0_6
## %bb.3:
	movl	%eax, %r12d
	movq	_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcms_b_core_phy_clk
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_brcms_b_bsinit
	cmpq	$0, 8(%r14)
	je	LBB0_5
## %bb.4:
	movq	_MI_DMAINT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_5:
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_brcms_intrsrestore
	movl	(%rbx), %ebx
	movq	_maccontrol@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_D11REGOFFS
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_bcma_read32
	movq	_MCTL_EN_MAC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	setne	%dil
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN_ON                        ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ON,4,2                         ## @ON
	.comm	_MI_DMAINT,8,3                  ## @MI_DMAINT
	.comm	_maccontrol,4,2                 ## @maccontrol
	.comm	_MCTL_EN_MAC,4,2                ## @MCTL_EN_MAC
	.no_dead_strip	_brcms_b_setband
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_b_setband
_brcms_b_setband:                       ; @brcms_b_setband
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w0, [x0]
	bl	_bcma_core_is_enabled
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_bcma_core_enable
	mov	x0, x19
	bl	_brcms_c_mctrl_reset
LBB0_2:
	mov	x0, x20
	mov	x1, x22
	bl	_brcms_c_setband_inact
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_6
; %bb.3:
	mov	x22, x0
Lloh0:
	adrp	x8, _ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ON@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcms_b_core_phy_clk
	mov	x0, x20
	mov	x1, x21
	bl	_brcms_b_bsinit
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _MI_DMAINT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MI_DMAINT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x20, #8]
LBB0_5:
	ldr	w0, [x20]
	mov	x1, x22
	bl	_brcms_intrsrestore
	ldr	w19, [x19]
Lloh6:
	adrp	x8, _maccontrol@GOTPAGE
Lloh7:
	ldr	x8, [x8, _maccontrol@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x19
	bl	_bcma_read32
Lloh9:
	adrp	x8, _MCTL_EN_MAC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MCTL_EN_MAC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, ne
	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
	b	_WARN_ON
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ON,4,2                         ; @ON
	.comm	_MI_DMAINT,8,3                  ; @MI_DMAINT
	.comm	_maccontrol,4,2                 ; @maccontrol
	.comm	_MCTL_EN_MAC,4,2                ; @MCTL_EN_MAC
	.no_dead_strip	_brcms_b_setband
.subsections_via_symbols
