	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_hw_bb_watchdog_config   ## -- Begin function ar9003_hw_bb_watchdog_config
	.p2align	4, 0x90
_ar9003_hw_bb_watchdog_config:          ## @ar9003_hw_bb_watchdog_config
	.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	%rdi, %r12
	callq	_ath9k_hw_common
	movq	%rax, %r13
	movl	(%r12), %ebx
	movq	_AR_PHY_WATCHDOG_CTL_2@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_REG_READ
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_AR_PHY_WATCHDOG_CNTL2_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	(%r14), %esi
	movq	_AR_PHY_WATCHDOG_IRQ_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_AR_PHY_WATCHDOG_RST_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r12, %rdi
	callq	_REG_WRITE
	cmpl	$10000, %ebx                    ## imm = 0x2710
	movl	$10000, %r15d                   ## imm = 0x2710
	cmovll	%ebx, %r15d
	imull	$100, %r15d, %r14d
	movslq	%r14d, %rbx
	imulq	$-580400985, %rbx, %r13         ## imm = 0xDD67C8A7
	shrq	$32, %r13
	addl	%r13d, %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	sarl	$6, %ebx
	addl	%eax, %ebx
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	callq	_IS_CHAN_HT40
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	addl	%r14d, %r13d
	movl	%r13d, %eax
	shrl	$31, %eax
	sarl	$5, %r13d
	addl	%eax, %r13d
	movl	%r13d, %ebx
LBB0_4:
	movq	_AR_PHY_WATCHDOG_CTL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_WATCHDOG_NON_IDLE_ENABLE@GOTPCREL(%rip), %rax
	movq	_AR_PHY_WATCHDOG_IDLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_AR_PHY_WATCHDOG_NON_IDLE_MASK@GOTPCREL(%rip), %rax
	shll	$2, %ebx
	andl	(%rax), %ebx
	orl	%ecx, %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_REG_WRITE
	movq	_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
LBB0_5:
	movq	_AR_PHY_WATCHDOG_RST_ENABLE@GOTPCREL(%rip), %rcx
	movq	_AR_PHY_WATCHDOG_IRQ_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, %eax
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_REG_WRITE
	movq	_AR_PHY_WATCHDOG_CTL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_REG_READ
	movq	_AR_PHY_WATCHDOG_NON_IDLE_ENABLE@GOTPCREL(%rip), %rcx
	movq	_AR_PHY_WATCHDOG_IDLE_ENABLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_REG_WRITE
	movq	_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_WATCHDOG_CTL_2,4,2      ## @AR_PHY_WATCHDOG_CTL_2
	.comm	_AR_PHY_WATCHDOG_RST_ENABLE,4,2 ## @AR_PHY_WATCHDOG_RST_ENABLE
	.comm	_AR_PHY_WATCHDOG_IRQ_ENABLE,4,2 ## @AR_PHY_WATCHDOG_IRQ_ENABLE
	.comm	_AR_PHY_WATCHDOG_CTL_1,4,2      ## @AR_PHY_WATCHDOG_CTL_1
	.comm	_AR_PHY_WATCHDOG_NON_IDLE_ENABLE,4,2 ## @AR_PHY_WATCHDOG_NON_IDLE_ENABLE
	.comm	_AR_PHY_WATCHDOG_IDLE_ENABLE,4,2 ## @AR_PHY_WATCHDOG_IDLE_ENABLE
	.comm	_RESET,4,2                      ## @RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disabled BB Watchdog\n"

	.comm	_AR_PHY_WATCHDOG_CNTL2_MASK,4,2 ## @AR_PHY_WATCHDOG_CNTL2_MASK
	.comm	_AR_PHY_WATCHDOG_IDLE_MASK,4,2  ## @AR_PHY_WATCHDOG_IDLE_MASK
	.comm	_AR_PHY_WATCHDOG_NON_IDLE_MASK,4,2 ## @AR_PHY_WATCHDOG_NON_IDLE_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Enabled BB Watchdog timeout (%u ms)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_hw_bb_watchdog_config   ; -- Begin function ar9003_hw_bb_watchdog_config
	.p2align	2
_ar9003_hw_bb_watchdog_config:          ; @ar9003_hw_bb_watchdog_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_ath9k_hw_common
	mov	x19, x0
	ldr	w22, [x20]
Lloh0:
	adrp	x23, _AR_PHY_WATCHDOG_CTL_2@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AR_PHY_WATCHDOG_CTL_2@GOTPAGEOFF]
	ldr	w21, [x23]
	mov	x0, x20
	mov	x1, x21
	bl	_REG_READ
	cbz	w22, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _AR_PHY_WATCHDOG_CNTL2_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_PHY_WATCHDOG_CNTL2_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w0
	ldr	w1, [x23]
Lloh5:
	adrp	x9, _AR_PHY_WATCHDOG_IRQ_ENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR_PHY_WATCHDOG_IRQ_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _AR_PHY_WATCHDOG_RST_ENABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AR_PHY_WATCHDOG_RST_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bic	w2, w8, w9
	mov	x0, x20
	bl	_REG_WRITE
	mov	w8, #10000
	cmp	w22, w8
	csel	w21, w22, w8, lt
	mov	w8, #100
	mul	w23, w21, w8
	mov	w8, #51367
	movk	w8, #56679, lsl #16
	smull	x8, w23, w8
	lsr	x24, x8, #32
	add	w8, w24, w23
	asr	w9, w8, #6
	add	w22, w9, w8, lsr #31
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_IS_CHAN_HT40
	add	w8, w24, w23
	asr	w9, w8, #5
	add	w8, w9, w8, lsr #31
	cmp	x0, #0
	csel	w22, w22, w8, eq
LBB0_3:
Lloh11:
	adrp	x8, _AR_PHY_WATCHDOG_CTL_1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_PHY_WATCHDOG_CTL_1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _AR_PHY_WATCHDOG_NON_IDLE_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_PHY_WATCHDOG_NON_IDLE_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _AR_PHY_WATCHDOG_IDLE_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AR_PHY_WATCHDOG_IDLE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _AR_PHY_WATCHDOG_NON_IDLE_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AR_PHY_WATCHDOG_NON_IDLE_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	and	w9, w9, w22, lsl #2
	orr	w2, w8, w9
	mov	x0, x20
	bl	_REG_WRITE
Lloh23:
	adrp	x8, _RESET@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
Lloh28:
	adrp	x8, _AR_PHY_WATCHDOG_RST_ENABLE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AR_PHY_WATCHDOG_RST_ENABLE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _AR_PHY_WATCHDOG_IRQ_ENABLE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _AR_PHY_WATCHDOG_IRQ_ENABLE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w0, w8
	mov	x0, x20
	mov	x1, x21
	bl	_REG_WRITE
Lloh34:
	adrp	x8, _AR_PHY_WATCHDOG_CTL_1@GOTPAGE
Lloh35:
	ldr	x8, [x8, _AR_PHY_WATCHDOG_CTL_1@GOTPAGEOFF]
Lloh36:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_REG_READ
Lloh37:
	adrp	x8, _AR_PHY_WATCHDOG_NON_IDLE_ENABLE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AR_PHY_WATCHDOG_NON_IDLE_ENABLE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	adrp	x9, _AR_PHY_WATCHDOG_IDLE_ENABLE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _AR_PHY_WATCHDOG_IDLE_ENABLE@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w0, w8
	mov	x0, x20
	mov	x1, x21
	bl	_REG_WRITE
Lloh43:
	adrp	x8, _RESET@GOTPAGE
Lloh44:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x2, l_.str@PAGE
Lloh47:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ath_dbg
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_WATCHDOG_CTL_2,4,2      ; @AR_PHY_WATCHDOG_CTL_2
	.comm	_AR_PHY_WATCHDOG_RST_ENABLE,4,2 ; @AR_PHY_WATCHDOG_RST_ENABLE
	.comm	_AR_PHY_WATCHDOG_IRQ_ENABLE,4,2 ; @AR_PHY_WATCHDOG_IRQ_ENABLE
	.comm	_AR_PHY_WATCHDOG_CTL_1,4,2      ; @AR_PHY_WATCHDOG_CTL_1
	.comm	_AR_PHY_WATCHDOG_NON_IDLE_ENABLE,4,2 ; @AR_PHY_WATCHDOG_NON_IDLE_ENABLE
	.comm	_AR_PHY_WATCHDOG_IDLE_ENABLE,4,2 ; @AR_PHY_WATCHDOG_IDLE_ENABLE
	.comm	_RESET,4,2                      ; @RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disabled BB Watchdog\n"

	.comm	_AR_PHY_WATCHDOG_CNTL2_MASK,4,2 ; @AR_PHY_WATCHDOG_CNTL2_MASK
	.comm	_AR_PHY_WATCHDOG_IDLE_MASK,4,2  ; @AR_PHY_WATCHDOG_IDLE_MASK
	.comm	_AR_PHY_WATCHDOG_NON_IDLE_MASK,4,2 ; @AR_PHY_WATCHDOG_NON_IDLE_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Enabled BB Watchdog timeout (%u ms)\n"

.subsections_via_symbols
