	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_init_nfcal_hist_buffer   ## -- Begin function ath9k_init_nfcal_hist_buffer
	.p2align	4, 0x90
_ath9k_init_nfcal_hist_buffer:          ## @ath9k_init_nfcal_hist_buffer
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	4(%rsi), %ecx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movl	%ecx, 12(%rax)
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ecx
	movl	%ecx, 8(%rax)
	movq	_NUM_NF_READINGS@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_7
## %bb.1:
	movq	(%rax), %r13
	movq	_ATH9K_NF_CAL_HIST_MAX@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	_AR5416_MAX_CHAINS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	movl	$0, %eax
	cmovgel	%eax, %ebx
	incq	%r15
	movq	_NUM_NF_READINGS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r15, %r14
	shlq	$5, %r14
	movq	$0, 24(%r13,%r14)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_ath9k_hw_get_default_nf
	movl	%eax, (%r13,%r14)
	movq	_AR_PHY_CCA_FILTERWINDOW_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r13,%r14)
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13,%r14), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, (%r12)
	jl	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r13, %r14
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edx
	movl	%edx, (%rcx,%rax,4)
	incq	%rax
	movslq	(%r12), %rdx
	cmpq	%rdx, %rax
	jl	LBB0_5
	jmp	LBB0_6
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_NF_READINGS,4,2            ## @NUM_NF_READINGS
	.comm	_AR_PHY_CCA_FILTERWINDOW_LENGTH,4,2 ## @AR_PHY_CCA_FILTERWINDOW_LENGTH
	.comm	_ATH9K_NF_CAL_HIST_MAX,4,2      ## @ATH9K_NF_CAL_HIST_MAX
	.comm	_AR5416_MAX_CHAINS,4,2          ## @AR5416_MAX_CHAINS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_init_nfcal_hist_buffer   ; -- Begin function ath9k_init_nfcal_hist_buffer
	.p2align	2
_ath9k_init_nfcal_hist_buffer:          ; @ath9k_init_nfcal_hist_buffer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
	ldr	d0, [x1]
	str	d0, [x8, #8]
Lloh0:
	adrp	x22, _NUM_NF_READINGS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NUM_NF_READINGS@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x23, #0
	mov	w21, #0
	ldr	x24, [x8]
Lloh2:
	adrp	x25, _AR_PHY_CCA_FILTERWINDOW_LENGTH@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AR_PHY_CCA_FILTERWINDOW_LENGTH@GOTPAGEOFF]
Lloh4:
	adrp	x26, _ATH9K_NF_CAL_HIST_MAX@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ATH9K_NF_CAL_HIST_MAX@GOTPAGEOFF]
Lloh6:
	adrp	x27, _AR5416_MAX_CHAINS@GOTPAGE
Lloh7:
	ldr	x27, [x27, _AR5416_MAX_CHAINS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w21, #1
	ldr	w9, [x27]
	cmp	w8, w9
	csinc	w21, wzr, w21, ge
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	x28, x24, x23, lsl #5
	str	xzr, [x28, #24]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_ath9k_hw_get_default_nf
	str	w0, [x28]
	ldr	w8, [x25]
	str	w8, [x28, #16]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x28, #8]
	str	w0, [x8]
	ldr	w9, [x26]
	cmp	w9, #2
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, #1
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x28]
	str	w10, [x8, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x10, [x26]
	cmp	x9, x10
	b.lt	LBB0_6
	b	LBB0_2
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_NF_READINGS,4,2            ; @NUM_NF_READINGS
	.comm	_AR_PHY_CCA_FILTERWINDOW_LENGTH,4,2 ; @AR_PHY_CCA_FILTERWINDOW_LENGTH
	.comm	_ATH9K_NF_CAL_HIST_MAX,4,2      ; @ATH9K_NF_CAL_HIST_MAX
	.comm	_AR5416_MAX_CHAINS,4,2          ; @AR5416_MAX_CHAINS
.subsections_via_symbols
