	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_attach                   ## -- Begin function brcmf_attach
	.p2align	4, 0x90
_brcmf_attach:                          ## @brcmf_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
	callq	_dev_get_drvdata
	movq	(%rax), %r12
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	24(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_BRCMF_BSSIDX_INVALID@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	movq	24(%r12), %rdi
	movl	%eax, (%rdi,%rbx,4)
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	leaq	16(%r12), %rdi
	callq	_mutex_init
	movq	$0, 8(%r12)
	movq	%r12, %rdi
	callq	_brcmf_proto_attach
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
	jmp	LBB0_8
LBB0_5:
	movq	_BRCMF_E_PSM_WATCHDOG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_brcmf_psm_watchdog_notify@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_brcmf_fweh_register
	movq	%r12, %rdi
	callq	_brcmf_fweh_attach
	movl	(%r12), %esi
	movq	%r12, %rdi
	callq	_brcmf_bus_started
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_bphy_err
LBB0_8:
	movq	%r14, %rdi
	callq	_brcmf_detach
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_BRCMF_BSSIDX_INVALID,4,2       ## @BRCMF_BSSIDX_INVALID
L_.str.1:                               ## @.str.1
	.asciz	"brcmf_prot_attach failed\n"

	.comm	_BRCMF_E_PSM_WATCHDOG,4,2       ## @BRCMF_E_PSM_WATCHDOG
	.comm	_brcmf_psm_watchdog_notify,4,2  ## @brcmf_psm_watchdog_notify
L_.str.2:                               ## @.str.2
	.asciz	"dongle is not responding: err=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_attach                   ; -- Begin function brcmf_attach
	.p2align	2
_brcmf_attach:                          ; @brcmf_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	bl	_dev_get_drvdata
	ldr	x20, [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
	ldr	x0, [x20, #24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
Lloh5:
	adrp	x22, _BRCMF_BSSIDX_INVALID@GOTPAGE
Lloh6:
	ldr	x22, [x22, _BRCMF_BSSIDX_INVALID@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	ldr	x0, [x20, #24]
	str	w8, [x0, x21, lsl #2]
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_2
LBB0_3:
	add	x0, x20, #16
	bl	_mutex_init
	str	xzr, [x20, #8]
	mov	x0, x20
	bl	_brcmf_proto_attach
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _BRCMF_E_PSM_WATCHDOG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BRCMF_E_PSM_WATCHDOG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _brcmf_psm_watchdog_notify@GOTPAGE
Lloh13:
	ldr	x8, [x8, _brcmf_psm_watchdog_notify@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_brcmf_fweh_register
	mov	x0, x20
	bl	_brcmf_fweh_attach
	ldr	w1, [x20]
	mov	x0, x20
	bl	_brcmf_bus_started
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.6:
	str	x21, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x20
	bl	_bphy_err
	mov	x0, x19
	bl	_brcmf_detach
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_BRCMF_BSSIDX_INVALID,4,2       ; @BRCMF_BSSIDX_INVALID
l_.str.1:                               ; @.str.1
	.asciz	"brcmf_prot_attach failed\n"

	.comm	_BRCMF_E_PSM_WATCHDOG,4,2       ; @BRCMF_E_PSM_WATCHDOG
	.comm	_brcmf_psm_watchdog_notify,4,2  ; @brcmf_psm_watchdog_notify
l_.str.2:                               ; @.str.2
	.asciz	"dongle is not responding: err=%d\n"

.subsections_via_symbols
