	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_wireless_core_attach
_b43_wireless_core_attach:              ## @b43_wireless_core_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	40(%rdi), %r14
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	xorl	%esi, %esi
	callq	_b43_bus_powerup
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_b43err
	jmp	LBB0_16
LBB0_2:
	movq	$1, (%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_b43_wireless_core_reset
	movq	%r15, %rdi
	callq	_b43_phy_versioning
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_b43_supported_bands
	cmpl	$0, -28(%rbp)
	je	LBB0_6
## %bb.4:
	movl	8(%r15), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_8
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_b43warn
	movl	$0, -28(%rbp)
LBB0_6:
	cmpl	$0, -32(%rbp)
	je	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	callq	_b43_phy_allocate
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:
	movl	-32(%rbp), %esi
	movl	%esi, 4(%r15)
	movq	%r15, %rdi
	callq	_b43_wireless_core_reset
	movq	%r15, %rdi
	callq	_b43_validate_chipaccess
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %edx
	movq	%r15, %rdi
	callq	_b43_setup_bands
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_11
LBB0_14:
	movq	%r15, %rdi
	callq	_b43_phy_free
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_b43err
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movq	%r15, %rdi
	callq	_b43_bus_may_powerdown
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpq	$0, (%r14)
	jne	LBB0_13
## %bb.12:
	movq	%r15, (%r14)
LBB0_13:
	leaq	24(%r15), %rdi
	movq	_b43_chip_reset@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	16(%r15), %rax
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*(%rax)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_b43_device_disable
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bus powerup failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"5 GHz band is unsupported on this PHY\n"

L_.str.2:                               ## @.str.2
	.asciz	"b43 can't support any band on this device\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_b43_chip_reset,4,2             ## @b43_chip_reset
	.comm	_B43_BCMA_IOST_2G_PHY,4,2       ## @B43_BCMA_IOST_2G_PHY
	.comm	_B43_BCMA_IOST_5G_PHY,4,2       ## @B43_BCMA_IOST_5G_PHY
	.comm	_B43_TMSHIGH_HAVE_2GHZ_PHY,4,2  ## @B43_TMSHIGH_HAVE_2GHZ_PHY
	.comm	_B43_TMSHIGH_HAVE_5GHZ_PHY,4,2  ## @B43_TMSHIGH_HAVE_5GHZ_PHY
	.comm	_BCMA_IOST,4,2                  ## @BCMA_IOST
	.comm	_SSB_TMSHIGH,4,2                ## @SSB_TMSHIGH
	.no_dead_strip	_b43_wireless_core_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function b43_wireless_core_attach
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_b43_wireless_core_attach:              ; @b43_wireless_core_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
	ldr	x20, [x0, #40]
	str	xzr, [sp, #8]
	mov	w1, #0
	bl	_b43_bus_powerup
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_b43err
	b	LBB0_13
LBB0_2:
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_b43_wireless_core_reset
	mov	x0, x19
	bl	_b43_phy_versioning
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.3:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_b43_supported_bands
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	w8, [x19, #8]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_7
; %bb.5:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_b43warn
	str	wzr, [sp, #8]
LBB0_6:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_11
LBB0_7:
	mov	x0, x19
	bl	_b43_phy_allocate
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.8:
	ldr	w1, [sp, #12]
	str	w1, [x19, #4]
	mov	x0, x19
	bl	_b43_wireless_core_reset
	mov	x0, x19
	bl	_b43_validate_chipaccess
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.9:
	ldp	w2, w1, [sp, #8]
	mov	x0, x19
	bl	_b43_setup_bands
	mov	x21, x0
	cbz	w0, LBB0_14
LBB0_10:
	mov	x0, x19
	bl	_b43_phy_free
	b	LBB0_12
LBB0_11:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_b43err
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x0, x19
	bl	_b43_bus_may_powerdown
LBB0_13:
	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
LBB0_14:
	ldr	x8, [x20]
	cbnz	x8, LBB0_16
; %bb.15:
	str	x19, [x20]
LBB0_16:
	add	x0, x19, #24
Lloh11:
	adrp	x8, _b43_chip_reset@GOTPAGE
Lloh12:
	ldr	x8, [x8, _b43_chip_reset@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_INIT_WORK
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	mov	x0, x19
	mov	w1, #0
	bl	_b43_device_disable
	mov	x0, x19
	bl	_b43_bus_may_powerdown
	mov	w21, #0
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bus powerup failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"5 GHz band is unsupported on this PHY\n"

l_.str.2:                               ; @.str.2
	.asciz	"b43 can't support any band on this device\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_b43_chip_reset,4,2             ; @b43_chip_reset
	.comm	_B43_BCMA_IOST_2G_PHY,4,2       ; @B43_BCMA_IOST_2G_PHY
	.comm	_B43_BCMA_IOST_5G_PHY,4,2       ; @B43_BCMA_IOST_5G_PHY
	.comm	_B43_TMSHIGH_HAVE_2GHZ_PHY,4,2  ; @B43_TMSHIGH_HAVE_2GHZ_PHY
	.comm	_B43_TMSHIGH_HAVE_5GHZ_PHY,4,2  ; @B43_TMSHIGH_HAVE_5GHZ_PHY
	.comm	_BCMA_IOST,4,2                  ; @BCMA_IOST
	.comm	_SSB_TMSHIGH,4,2                ; @SSB_TMSHIGH
	.no_dead_strip	_b43_wireless_core_attach
.subsections_via_symbols
