	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_chip_attach              ## -- Begin function brcmf_chip_attach
	.p2align	4, 0x90
_brcmf_chip_attach:                     ## @brcmf_chip_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	%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	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	cmpl	$0, 16(%rsi)
	sete	%dil
	callq	_WARN_ON
	movq	_EINVAL@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	xorl	%r13d, %r13d
	testq	%rax, %rax
	cmovel	%r13d, %ebx
	xorl	%edi, %edi
	cmpl	$0, 12(%r12)
	sete	%dil
	callq	_WARN_ON
	xorl	%r14d, %r14d
	subl	(%r15), %r14d
	testq	%rax, %rax
	cmovel	%ebx, %r14d
	xorl	%edi, %edi
	cmpq	$0, (%r12)
	sete	%dil
	callq	_WARN_ON
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	testq	%rax, %rax
	cmovel	%r14d, %ebx
	xorl	%edi, %edi
	cmpl	$0, 8(%r12)
	sete	%dil
	callq	_WARN_ON
	subl	(%r15), %r13d
	testq	%rax, %rax
	cmovnel	%r13d, %ebx
	testl	%ebx, %ebx
	js	LBB0_1
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	addq	$32, %rdi
	callq	_INIT_LIST_HEAD
	movq	$0, 24(%r15)
	movq	%r12, 16(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, 8(%r15)
	callq	*(%r12)
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_brcmf_chip_recognition
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_brcmf_chip_setup
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r13d, %edi
	jmp	LBB0_2
LBB0_8:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_brcmf_chip_detach
	movl	%ebx, %edi
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.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_chip_attach              ; -- Begin function brcmf_chip_attach
	.p2align	2
_brcmf_chip_attach:                     ; @brcmf_chip_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, x1
	mov	x19, x0
	ldr	w8, [x1, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh0:
	adrp	x21, _EINVAL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	x0, #0
	csneg	w22, wzr, w8, eq
	ldr	w8, [x20, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x21]
	cmp	x0, #0
	csneg	w22, w22, w8, eq
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x21]
	cmp	x0, #0
	csneg	w22, w22, w8, eq
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x21]
	cmp	x0, #0
	csneg	w9, w22, w8, eq
	tbnz	w9, #31, LBB0_8
; %bb.1:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	add	x0, x0, #32
	bl	_INIT_LIST_HEAD
	stp	x20, xzr, [x21, #16]
	str	x19, [x21, #8]
	ldr	x8, [x20]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x0, x21
	bl	_brcmf_chip_recognition
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_brcmf_chip_setup
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	x0, x21
	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
LBB0_6:
	mov	x19, x0
	mov	x0, x21
	bl	_brcmf_chip_detach
	mov	x0, x19
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
LBB0_8:
	neg	w0, w8
LBB0_9:
	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	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
