	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_wireless_core_reset  ## -- Begin function b43legacy_wireless_core_reset
	.p2align	4, 0x90
_b43legacy_wireless_core_reset:         ## @b43legacy_wireless_core_reset
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_B43legacy_TMSLOW_PHYCLKEN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_B43legacy_TMSLOW_PHYRESET@GOTPCREL(%rip), %rbx
	orl	(%rbx), %r14d
	movl	4(%rdi), %edi
	movl	%r14d, %esi
	callq	_ssb_device_enable
	movl	$2, %edi
	callq	_msleep
	movl	4(%r15), %edi
	movq	_SSB_TMSLOW@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_ssb_read32
	movq	_SSB_TMSLOW_FGC@GOTPCREL(%rip), %r13
	orl	(%r13), %eax
	movl	(%rbx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	4(%r15), %edi
	movl	(%r12), %esi
	movl	%ebx, %edx
	callq	_ssb_write32
	movl	4(%r15), %edi
	movl	(%r12), %esi
	callq	_ssb_read32
	movl	$1, %edi
	callq	_msleep
	movl	(%r13), %edx
	notl	%edx
	andl	%ebx, %edx
	movl	4(%r15), %edi
	movl	(%r12), %esi
	callq	_ssb_write32
	movl	4(%r15), %edi
	movl	(%r12), %esi
	callq	_ssb_read32
	movl	$1, %edi
	callq	_msleep
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_b43legacy_switch_analog
	movq	_B43legacy_MMIO_MACCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_b43legacy_read32
	movq	_B43legacy_MACCTL_GMODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_B43legacy_TMSLOW_GMODE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	movl	%edx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %edx
	xorl	%eax, %eax
	testl	%r14d, %r14d
	setne	%al
	cmovel	%ecx, %edx
	movl	%eax, (%r15)
	movq	_B43legacy_MACCTL_IHR_ENABLED@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43legacy_write32              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_TMSLOW_PHYCLKEN,4,2  ## @B43legacy_TMSLOW_PHYCLKEN
	.comm	_B43legacy_TMSLOW_PHYRESET,4,2  ## @B43legacy_TMSLOW_PHYRESET
	.comm	_SSB_TMSLOW,4,2                 ## @SSB_TMSLOW
	.comm	_SSB_TMSLOW_FGC,4,2             ## @SSB_TMSLOW_FGC
	.comm	_B43legacy_MMIO_MACCTL,4,2      ## @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MACCTL_GMODE,4,2     ## @B43legacy_MACCTL_GMODE
	.comm	_B43legacy_TMSLOW_GMODE,4,2     ## @B43legacy_TMSLOW_GMODE
	.comm	_B43legacy_MACCTL_IHR_ENABLED,4,2 ## @B43legacy_MACCTL_IHR_ENABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_wireless_core_reset  ; -- Begin function b43legacy_wireless_core_reset
	.p2align	2
_b43legacy_wireless_core_reset:         ; @b43legacy_wireless_core_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _B43legacy_TMSLOW_PHYCLKEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43legacy_TMSLOW_PHYCLKEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w8, w8, w1
Lloh3:
	adrp	x21, _B43legacy_TMSLOW_PHYRESET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _B43legacy_TMSLOW_PHYRESET@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w20, w8, w9
	ldr	w0, [x0, #4]
	mov	x1, x20
	bl	_ssb_device_enable
	mov	w0, #2
	bl	_msleep
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x22, _SSB_TMSLOW@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SSB_TMSLOW@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_ssb_read32
Lloh7:
	adrp	x23, _SSB_TMSLOW_FGC@GOTPAGE
Lloh8:
	ldr	x23, [x23, _SSB_TMSLOW_FGC@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w8, w8, w0
	ldr	w9, [x21]
	bic	w21, w8, w9
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	mov	x2, x21
	bl	_ssb_write32
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_ssb_read32
	mov	w0, #1
	bl	_msleep
	ldr	w8, [x23]
	bic	w2, w21, w8
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_ssb_write32
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_ssb_read32
	mov	w0, #1
	bl	_msleep
	mov	x0, x19
	mov	w1, #1
	bl	_b43legacy_switch_analog
Lloh9:
	adrp	x21, _B43legacy_MMIO_MACCTL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _B43legacy_MMIO_MACCTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_b43legacy_read32
Lloh11:
	adrp	x8, _B43legacy_MACCTL_GMODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _B43legacy_MACCTL_GMODE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _B43legacy_TMSLOW_GMODE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _B43legacy_TMSLOW_GMODE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w20
	cset	w9, ne
	bic	w10, w0, w8
	orr	w8, w8, w0
	csel	w8, w10, w8, eq
	str	w9, [x19]
Lloh17:
	adrp	x9, _B43legacy_MACCTL_IHR_ENABLED@GOTPAGE
Lloh18:
	ldr	x9, [x9, _B43legacy_MACCTL_IHR_ENABLED@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w9, w8
	ldr	w1, [x21]
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_b43legacy_write32
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_TMSLOW_PHYCLKEN,4,2  ; @B43legacy_TMSLOW_PHYCLKEN
	.comm	_B43legacy_TMSLOW_PHYRESET,4,2  ; @B43legacy_TMSLOW_PHYRESET
	.comm	_SSB_TMSLOW,4,2                 ; @SSB_TMSLOW
	.comm	_SSB_TMSLOW_FGC,4,2             ; @SSB_TMSLOW_FGC
	.comm	_B43legacy_MMIO_MACCTL,4,2      ; @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MACCTL_GMODE,4,2     ; @B43legacy_MACCTL_GMODE
	.comm	_B43legacy_TMSLOW_GMODE,4,2     ; @B43legacy_TMSLOW_GMODE
	.comm	_B43legacy_MACCTL_IHR_ENABLED,4,2 ; @B43legacy_MACCTL_IHR_ENABLED
.subsections_via_symbols
