	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hw_chip_test
_ath9k_hw_chip_test:                    ## @ath9k_hw_chip_test
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_ath9k_hw_common
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_AR_STA_ID0@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, -56(%rbp)
	movl	$0, -52(%rbp)
	movq	%r14, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	movl	$1, %ecx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_AR_PHY_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$32, %eax
	movl	%eax, -52(%rbp)
	movl	$2, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_2:
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %ebx
	orl	%r12d, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_REG_WRITE
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	cmpl	%ebx, %eax
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	incl	%r12d
	addl	$65536, %r13d                   ## imm = 0x10000
	cmpl	$256, %r12d                     ## imm = 0x100
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1431655765, %r13d              ## imm = 0x55555555
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1431655765, %edx               ## imm = 0x55555555
	callq	_REG_WRITE
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	cmpl	$1431655765, %eax               ## imm = 0x55555555
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$-1431655766, %r13d             ## imm = 0xAAAAAAAA
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$-1431655766, %edx              ## imm = 0xAAAAAAAA
	callq	_REG_WRITE
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	cmpl	$-1431655766, %eax              ## imm = 0xAAAAAAAA
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1717986918, %r13d              ## imm = 0x66666666
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1717986918, %edx               ## imm = 0x66666666
	callq	_REG_WRITE
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	cmpl	$1717986918, %eax               ## imm = 0x66666666
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$-1717986919, %r13d             ## imm = 0x99999999
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$-1717986919, %edx              ## imm = 0x99999999
	callq	_REG_WRITE
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	cmpl	$-1717986919, %eax              ## imm = 0x99999999
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	cmpq	-80(%rbp), %rax                 ## 8-byte Folded Reload
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	-56(%rbp,%rax,4), %r15d
	jmp	LBB0_3
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%ebx, %ecx
LBB0_13:
	movl	%eax, %r8d
	callq	_ath_err
	xorl	%eax, %eax
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%r13d, %ecx
	jmp	LBB0_13
LBB0_15:
	movl	$100, %edi
	callq	_udelay
	movl	$1, %eax
	jmp	LBB0_16
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_STA_ID0,4,2                 ## @AR_STA_ID0
	.comm	_AR_PHY_BASE,4,2                ## @AR_PHY_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n"

	.no_dead_strip	_ath9k_hw_chip_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hw_chip_test
_ath9k_hw_chip_test:                    ; @ath9k_hw_chip_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_ath9k_hw_common
	mov	x19, x0
Lloh3:
	adrp	x8, _AR_STA_ID0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_STA_ID0@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	stp	w20, wzr, [sp, #16]
	mov	x0, x21
	bl	_AR_SREV_9300_20_OR_LATER
	mov	x23, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _AR_PHY_BASE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR_PHY_BASE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	add	w8, w8, #32
	str	w8, [sp, #20]
LBB0_2:
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	mov	x24, x0
	mov	w22, #0
	mov	w26, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	orr	w25, w22, w26
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w25
	b.ne	LBB0_19
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	add	w22, w22, #16, lsl #12          ; =65536
	cmp	w26, #256
	b.ne	LBB0_3
; %bb.5:
	mov	w22, #1431655765
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1431655765
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w22
	b.ne	LBB0_20
; %bb.6:
	mov	w26, #-1431655766
	mov	x0, x21
	mov	x1, x20
	mov	w2, #-1431655766
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w26
	b.ne	LBB0_21
; %bb.7:
	mov	w27, #1717986918
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1717986918
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w27
	b.ne	LBB0_22
; %bb.8:
	mov	w28, #-1717986919
	mov	x0, x21
	mov	x1, x20
	mov	w2, #-1717986919
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w28
	b.ne	LBB0_23
; %bb.9:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	bl	_REG_WRITE
	cbz	w23, LBB0_11
LBB0_10:
	mov	w0, #100
	bl	_udelay
	mov	w0, #1
	b	LBB0_26
LBB0_11:
	ldr	w20, [sp, #20]
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	w24, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	orr	w25, w24, w23
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w25
	b.ne	LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w23, w23, #1
	add	w24, w24, #16, lsl #12          ; =65536
	cmp	w23, #256
	b.ne	LBB0_12
; %bb.14:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1431655765
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w22
	b.ne	LBB0_20
; %bb.15:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #-1431655766
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w26
	b.ne	LBB0_21
; %bb.16:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1717986918
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w27
	b.ne	LBB0_22
; %bb.17:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #-1717986919
	bl	_REG_WRITE
	mov	x0, x21
	mov	x1, x20
	bl	_REG_READ
	cmp	w0, w28
	b.ne	LBB0_23
; %bb.18:
	mov	x0, x21
	mov	x1, x20
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_REG_WRITE
	b	LBB0_10
LBB0_19:
	mov	x4, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x25
	b	LBB0_25
LBB0_20:
	mov	x4, x0
	b	LBB0_24
LBB0_21:
	mov	x4, x0
	mov	w22, #-1431655766
	b	LBB0_24
LBB0_22:
	mov	x4, x0
	mov	w22, #1717986918
	b	LBB0_24
LBB0_23:
	mov	x4, x0
	mov	w22, #-1717986919
LBB0_24:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
LBB0_25:
	bl	_ath_err
	mov	w0, #0
LBB0_26:
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_STA_ID0,4,2                 ; @AR_STA_ID0
	.comm	_AR_PHY_BASE,4,2                ; @AR_PHY_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n"

	.no_dead_strip	_ath9k_hw_chip_test
.subsections_via_symbols
