	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_proto_attach             ## -- Begin function brcmf_proto_attach
	.p2align	4, 0x90
_brcmf_proto_attach:                    ## @brcmf_proto_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rbx, (%r14)
	movq	8(%r14), %rax
	movq	(%rax), %rdx
	movq	_BRCMF_PROTO_BCDC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_13
## %bb.2:
	movq	%r14, %rdi
	callq	_brcmf_proto_bcdc_attach
	testq	%rax, %rax
	jne	LBB0_16
	jmp	LBB0_4
LBB0_13:
	movq	_BRCMF_PROTO_MSGBUF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_brcmf_proto_msgbuf_attach
	testq	%rax, %rax
	jne	LBB0_16
LBB0_4:
	cmpl	$0, 56(%rbx)
	je	LBB0_12
## %bb.5:
	cmpq	$0, 48(%rbx)
	je	LBB0_12
## %bb.6:
	cmpq	$0, 40(%rbx)
	je	LBB0_12
## %bb.7:
	cmpq	$0, 32(%rbx)
	je	LBB0_12
## %bb.8:
	cmpq	$0, 24(%rbx)
	je	LBB0_12
## %bb.9:
	cmpq	$0, 16(%rbx)
	je	LBB0_12
## %bb.10:
	cmpq	$0, 8(%rbx)
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	jne	LBB0_17
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
LBB0_16:
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, (%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_BRCMF_PROTO_BCDC,8,3           ## @BRCMF_PROTO_BCDC
	.comm	_BRCMF_PROTO_MSGBUF,8,3         ## @BRCMF_PROTO_MSGBUF
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported proto type %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Not all proto handlers have been installed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_proto_attach             ; -- Begin function brcmf_proto_attach
	.p2align	2
_brcmf_proto_attach:                    ; @brcmf_proto_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
Lloh5:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_17
; %bb.1:
	str	x20, [x19]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _BRCMF_PROTO_BCDC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BRCMF_PROTO_BCDC@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_brcmf_proto_bcdc_attach
	cbnz	x0, LBB0_17
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x9, _BRCMF_PROTO_MSGBUF@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BRCMF_PROTO_MSGBUF@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.4:
	mov	x0, x19
	bl	_brcmf_proto_msgbuf_attach
	cbnz	x0, LBB0_17
LBB0_5:
	ldr	w8, [x20, #56]
	cbz	w8, LBB0_14
; %bb.6:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_14
; %bb.7:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_14
; %bb.8:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_14
; %bb.9:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_14
; %bb.10:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_14
; %bb.11:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_14
; %bb.12:
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.13:
	mov	w0, #0
	b	LBB0_18
LBB0_14:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_15:
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_bphy_err
LBB0_17:
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19]
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_BRCMF_PROTO_BCDC,8,3           ; @BRCMF_PROTO_BCDC
	.comm	_BRCMF_PROTO_MSGBUF,8,3         ; @BRCMF_PROTO_MSGBUF
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported proto type %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Not all proto handlers have been installed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
