	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_channel_mgr_attach     ## -- Begin function brcms_c_channel_mgr_attach
	.p2align	4, 0x90
_brcms_c_channel_mgr_attach:            ## @brcms_c_channel_mgr_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	24(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r12, 16(%rbx)
	movq	%r14, 8(%rbx)
	movq	%rbx, 16(%r14)
	movl	$8, %r12d
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_brcms_world_regd
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_brcms_c_country_valid
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movl	$8, %edx
	callq	_strncpy
LBB0_3:
	cmpq	$0, (%rbx)
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_brcms_default_world_regd
	movq	%rax, (%rbx)
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_BRCM_CNTRY_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	decl	%r12d
LBB0_5:
	movl	4(%r14), %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_strncpy
	movl	(%r14), %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_strncpy
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_brcms_c_set_country
LBB0_6:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_BRCM_CNTRY_BUF_SZ,4,2          ## @BRCM_CNTRY_BUF_SZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_channel_mgr_attach     ; -- Begin function brcms_c_channel_mgr_attach
	.p2align	2
_brcms_c_channel_mgr_attach:            ; @brcms_c_channel_mgr_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	x22, [x0, #8]
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
	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, #24
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	stp	x20, x22, [x19, #8]
	str	x19, [x20, #16]
	mov	x0, x21
	mov	w1, #8
	bl	_brcms_world_regd
	str	x0, [x19]
	mov	x0, x21
	bl	_brcms_c_country_valid
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	mov	x1, x21
	mov	w2, #8
	bl	_strncpy
LBB0_3:
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w22, #8
	b	LBB0_6
LBB0_5:
	bl	_brcms_default_world_regd
	str	x0, [x19]
	ldr	x8, [x0]
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _BRCM_CNTRY_BUF_SZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BRCM_CNTRY_BUF_SZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w22, w8, #1
LBB0_6:
	ldr	w0, [x20, #4]
	mov	x1, x21
	mov	x2, x22
	bl	_strncpy
	ldr	w0, [x20]
	mov	x1, x21
	mov	x2, x22
	bl	_strncpy
	ldr	x1, [x19]
	mov	x0, x19
	bl	_brcms_c_set_country
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_BRCM_CNTRY_BUF_SZ,4,2          ; @BRCM_CNTRY_BUF_SZ
.subsections_via_symbols
