	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_nphy_gen_load_samples
_b43_nphy_gen_load_samples:             ## @b43_nphy_gen_load_samples
	.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	%ecx, %ebx
	movl	%edx, %r12d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	callq	_b43_is_40mhz
	testq	%rax, %rax
	movl	$20, %eax
	movl	$40, %r13d
	cmovel	%eax, %r13d
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movq	_B43_NPHY_BBCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_b43_phy_read
	movq	_B43_NPHY_BBCFG_RSTRX@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	leal	(%rdx,%rdx), %r13d
	addl	$80, %r13d
	movq	%r15, %rdi
	callq	_b43_is_40mhz
	testq	%rax, %rax
	setne	%cl
	shll	%cl, %r13d
	leal	(%r13,%r13), %ebx
	jmp	LBB0_3
LBB0_1:
	leal	(,%r13,8), %ebx
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	shll	$2, %eax
	leal	(%rax,%rax,8), %eax
	cltd
	idivl	%r13d
	shll	$16, %eax
	cltq
	imulq	$1374389535, %rax, %r13         ## imm = 0x51EB851F
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$37, %r13
	addl	%eax, %r13d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_CORDIC_FIXED
	movl	%eax, %edi
	callq	_cordic_calc_iq
	movq	%rax, (%r14,%r15,8)
	addl	%r13d, %ebx
	imull	%r12d, %eax
	movl	%eax, %edi
	callq	_CORDIC_FLOAT
	movl	%eax, (%r14,%r15,8)
	movl	4(%r14,%r15,8), %edi
	imull	%r12d, %edi
	callq	_CORDIC_FLOAT
	movl	%eax, 4(%r14,%r15,8)
	incq	%r15
	cmpq	%r15, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_b43_nphy_load_samples
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_kfree
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovnsl	%ebx, %eax
	jmp	LBB0_8
LBB0_4:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_b43err
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_NPHY_BBCFG,4,2             ## @B43_NPHY_BBCFG
	.comm	_B43_NPHY_BBCFG_RSTRX,4,2       ## @B43_NPHY_BBCFG_RSTRX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocation for samples generation failed\n"

	.no_dead_strip	_b43_nphy_gen_load_samples
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_nphy_gen_load_samples
_b43_nphy_gen_load_samples:             ; @b43_nphy_gen_load_samples
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
	bl	_b43_is_40mhz
	cmp	x0, #0
	mov	w8, #40
	mov	w9, #20
	csel	w25, w9, w8, eq
	cbz	w21, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _B43_NPHY_BBCFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43_NPHY_BBCFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43_phy_read
Lloh3:
	adrp	x8, _B43_NPHY_BBCFG_RSTRX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43_NPHY_BBCFG_RSTRX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w8, #82
	mov	w9, #80
	csel	w21, w9, w8, eq
	mov	x0, x19
	bl	_b43_is_40mhz
	cmp	x0, #0
	cset	w8, ne
	lsl	w25, w21, w8
	lsl	w21, w25, #1
	b	LBB0_3
LBB0_2:
	lsl	w21, w25, #3
LBB0_3:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	mov	w23, #0
	add	w8, w24, w24, lsl #3
	lsl	w8, w8, #2
	sdiv	w8, w8, w25
	lsl	w8, w8, #16
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w24, w8, w9
	mov	w25, w21
	add	x26, x0, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_CORDIC_FIXED
	bl	_cordic_calc_iq
	stur	x0, [x26, #-4]
	add	w23, w23, w24
	mul	w0, w0, w20
	bl	_CORDIC_FLOAT
	stur	w0, [x26, #-4]
	ldr	w8, [x26]
	mul	w0, w8, w20
	bl	_CORDIC_FLOAT
	str	w0, [x26], #8
	subs	x25, x25, #1
	b.ne	LBB0_5
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_b43_nphy_load_samples
	mov	x19, x0
	mov	x0, x22
	bl	_kfree
	cmp	w19, #0
	csel	w0, wzr, w21, lt
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43err
	mov	w0, #0
LBB0_8:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_NPHY_BBCFG,4,2             ; @B43_NPHY_BBCFG
	.comm	_B43_NPHY_BBCFG_RSTRX,4,2       ; @B43_NPHY_BBCFG_RSTRX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocation for samples generation failed\n"

	.no_dead_strip	_b43_nphy_gen_load_samples
.subsections_via_symbols
