	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_translate_country_code
_brcmf_translate_country_code:          ## @brcmf_translate_country_code
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.4:
	movq	%rdx, %r9
	movq	%rsi, %r15
	movb	(%rsi), %r8b
	movq	(%rdx), %rcx
	cmpb	(%rcx), %r8b
	jne	LBB0_7
## %bb.5:
	movb	1(%r15), %dl
	cmpb	1(%rcx), %dl
	jne	LBB0_7
## %bb.6:
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_brcmf_dbg
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.8:
	movq	8(%r12), %rsi
	movl	$-1, %r14d
	xorl	%edx, %edx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rdx
	addq	$16, %rsi
	cmpq	%rdx, %rcx
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %ebx
	movq	(%rsi), %rdi
	movzbl	(%rdi), %eax
	cmpl	$-1, %r14d
	movl	%edx, %r14d
	cmovnel	%ebx, %r14d
	testb	%al, %al
	cmovnel	%ebx, %r14d
	cmpb	%r8b, %al
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movzbl	1(%rdi), %eax
	cmpb	1(%r15), %al
	jne	LBB0_11
## %bb.14:
	movl	%edx, %r14d
	jmp	LBB0_15
LBB0_1:
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_12:
	cmpl	$-1, %r14d
	je	LBB0_13
LBB0_15:
	xorl	%r13d, %r13d
	movq	%r9, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	callq	_memset
	movq	8(%r12), %rax
	movslq	%r14d, %rbx
	shlq	$4, %rbx
	movl	12(%rax,%rbx), %edi
	callq	_cpu_to_le32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 12(%rcx)
	movl	8(%rcx), %edi
	movq	%rcx, %r14
	movq	8(%r12), %rax
	movl	8(%rax,%rbx), %esi
	movq	_BRCMF_COUNTRY_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movb	(%r15), %al
	movq	(%r14), %rcx
	movb	%al, (%rcx)
	movb	1(%r15), %al
	movq	(%r14), %rcx
	movb	%al, 1(%rcx)
	movq	(%r14), %rax
	movb	$0, 2(%rax)
	jmp	LBB0_16
LBB0_13:
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	callq	_brcmf_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No country codes configured for device\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Country code already set\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"No country code match found\n"

	.comm	_BRCMF_COUNTRY_BUF_SZ,4,2       ## @BRCMF_COUNTRY_BUF_SZ
	.no_dead_strip	_brcmf_translate_country_code
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_translate_country_code
_brcmf_translate_country_code:          ; @brcmf_translate_country_code
	.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
	ldr	x8, [x0]
	ldr	x21, [x8]
	cbz	x21, LBB0_10
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	ldrb	w8, [x1]
	ldr	x9, [x2]
	ldrb	w10, [x9]
	cmp	w8, w10
	b.ne	LBB0_4
; %bb.2:
	ldrb	w10, [x20, #1]
	ldrb	w9, [x9, #1]
	cmp	w10, w9
	b.ne	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcmf_dbg
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_15
LBB0_4:
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.5:
	mov	x10, #0
	ldr	x11, [x21, #8]
	mov	w22, #-1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x10, x10, #1
	add	x11, x11, #16
	cmp	x9, x10
	b.eq	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	ldrb	w13, [x12]
	cmn	w22, #1
	ccmp	w13, #0, #0, eq
	csel	w22, w10, w22, eq
	cmp	w13, w8
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldrb	w12, [x12, #1]
	ldrb	w13, [x20, #1]
	cmp	w12, w13
	b.ne	LBB0_6
; %bb.9:
	mov	x22, x10
	b	LBB0_12
LBB0_10:
Lloh7:
	adrp	x8, _TRACE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_11:
	cmn	w22, #1
	b.eq	LBB0_13
LBB0_12:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x8, [x21, #8]
	sbfiz	x22, x22, #4, #32
	add	x8, x8, x22
	ldr	w0, [x8, #12]
	bl	_cpu_to_le32
	str	w0, [x19, #12]
	ldr	w0, [x19, #8]
	ldr	x8, [x21, #8]
	add	x8, x8, x22
	ldr	w1, [x8, #8]
Lloh12:
	adrp	x8, _BRCMF_COUNTRY_BUF_SZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BRCMF_COUNTRY_BUF_SZ@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_memcpy
	mov	w0, #0
	ldrb	w8, [x20]
	ldr	x9, [x19]
	strb	w8, [x9]
	ldrb	w8, [x20, #1]
	ldr	x9, [x19]
	strb	w8, [x9, #1]
	ldr	x8, [x19]
	strb	wzr, [x8, #2]
	b	LBB0_16
LBB0_13:
Lloh15:
	adrp	x8, _TRACE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_14:
	bl	_brcmf_dbg
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No country codes configured for device\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Country code already set\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"No country code match found\n"

	.comm	_BRCMF_COUNTRY_BUF_SZ,4,2       ; @BRCMF_COUNTRY_BUF_SZ
	.no_dead_strip	_brcmf_translate_country_code
.subsections_via_symbols
