	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_validate_chipaccess
_b43legacy_validate_chipaccess:         ## @b43legacy_validate_chipaccess
	.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, %rbx
	movq	_B43legacy_SHM_SHARED@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	callq	_b43legacy_shm_read32
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$-1437248086, %ecx              ## imm = 0xAA5555AA
	callq	_b43legacy_shm_write32
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_b43legacy_shm_read32
	cmpl	$-1437248086, %eax              ## imm = 0xAA5555AA
	jne	LBB0_4
## %bb.1:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$1437248085, %ecx               ## imm = 0x55AAAA55
	callq	_b43legacy_shm_write32
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_b43legacy_shm_read32
	cmpl	$1437248085, %eax               ## imm = 0x55AAAA55
	jne	LBB0_4
## %bb.2:
	movl	(%r15), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_b43legacy_shm_write32
	movq	_B43legacy_MMIO_MACCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43legacy_read32
	movq	_B43legacy_MACCTL_GMODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, %eax
	movq	_B43legacy_MACCTL_IHR_ENABLED@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_4
## %bb.3:
	movq	_B43legacy_MMIO_GEN_IRQ_REASON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43legacy_read32
	testl	%eax, %eax
	je	LBB0_5
LBB0_4:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_b43legacyerr
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_SHM_SHARED,4,2       ## @B43legacy_SHM_SHARED
	.comm	_B43legacy_MMIO_MACCTL,4,2      ## @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MACCTL_GMODE,4,2     ## @B43legacy_MACCTL_GMODE
	.comm	_B43legacy_MACCTL_IHR_ENABLED,4,2 ## @B43legacy_MACCTL_IHR_ENABLED
	.comm	_B43legacy_MMIO_GEN_IRQ_REASON,4,2 ## @B43legacy_MMIO_GEN_IRQ_REASON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to validate the chipaccess\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_b43legacy_validate_chipaccess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_validate_chipaccess
_b43legacy_validate_chipaccess:         ; @b43legacy_validate_chipaccess
	.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	x19, x0
Lloh0:
	adrp	x21, _B43legacy_SHM_SHARED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _B43legacy_SHM_SHARED@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_b43legacy_shm_read32
	mov	x20, x0
	ldr	w1, [x21]
	mov	w22, #21930
	movk	w22, #43605, lsl #16
	mov	x0, x19
	mov	w2, #0
	mov	w3, #21930
	movk	w3, #43605, lsl #16
	bl	_b43legacy_shm_write32
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_b43legacy_shm_read32
	cmp	w0, w22
	b.ne	LBB0_4
; %bb.1:
	ldr	w1, [x21]
	mov	w22, #43605
	movk	w22, #21930, lsl #16
	mov	x0, x19
	mov	w2, #0
	mov	w3, #43605
	movk	w3, #21930, lsl #16
	bl	_b43legacy_shm_write32
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_b43legacy_shm_read32
	cmp	w0, w22
	b.ne	LBB0_4
; %bb.2:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	bl	_b43legacy_shm_write32
Lloh2:
	adrp	x8, _B43legacy_MMIO_MACCTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _B43legacy_MMIO_MACCTL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_read32
Lloh5:
	adrp	x8, _B43legacy_MACCTL_GMODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _B43legacy_MACCTL_GMODE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w9, w8, w0
Lloh8:
	adrp	x10, _B43legacy_MACCTL_IHR_ENABLED@GOTPAGE
Lloh9:
	ldr	x10, [x10, _B43legacy_MACCTL_IHR_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w8, w10, w8
	cmp	w9, w8
	b.ne	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _B43legacy_MMIO_GEN_IRQ_REASON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _B43legacy_MMIO_GEN_IRQ_REASON@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_read32
	cbz	w0, LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43legacyerr
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_SHM_SHARED,4,2       ; @B43legacy_SHM_SHARED
	.comm	_B43legacy_MMIO_MACCTL,4,2      ; @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MACCTL_GMODE,4,2     ; @B43legacy_MACCTL_GMODE
	.comm	_B43legacy_MACCTL_IHR_ENABLED,4,2 ; @B43legacy_MACCTL_IHR_ENABLED
	.comm	_B43legacy_MMIO_GEN_IRQ_REASON,4,2 ; @B43legacy_MMIO_GEN_IRQ_REASON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to validate the chipaccess\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_b43legacy_validate_chipaccess
.subsections_via_symbols
