	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_pno_prep_fwconfig
_brcmf_pno_prep_fwconfig:               ## @brcmf_pno_prep_fwconfig
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_brcmf_dbg
	xorl	%edi, %edi
	cmpl	$0, (%r13)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rcx
	movq	(%rcx), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %edi
	cmpl	$2, %edi
	movq	%rbx, %r14
	jl	LBB0_6
## %bb.3:
	movq	8(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_gcd
	movl	%eax, (%r14)
	movl	(%r13), %edi
	cmpl	$3, %edi
	jl	LBB0_6
## %bb.4:
	movl	$2, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_gcd
	movl	%eax, (%r14)
	incq	%rbx
	movslq	(%r13), %rdi
	cmpq	%rdi, %rbx
	jl	LBB0_5
LBB0_6:
	movq	_SCAN@GOTPCREL(%rip), %rcx
	movq	_BRCMF_PNO_SCHED_SCAN_MIN_PERIOD@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jge	LBB0_8
## %bb.7:
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	(%rbx), %eax
	movl	%eax, (%r14)
	movl	(%r13), %edi
LBB0_8:
	movq	$0, (%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$20, %esi
	callq	_kcalloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	cmpl	$0, (%r13)
	jle	LBB0_15
## %bb.11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r12
	xorl	%r15d, %r15d
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rbx
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_brcmf_pno_get_bucket_channels
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	decl	%r14d
	movl	%r14d, -8(%r12)
	movq	(%rbx), %rax
	movl	(%rax), %eax
	cltd
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	idivl	(%r14)
	testl	%eax, %eax
	movl	$1, %ecx
	cmovel	%ecx, %eax
	movl	%eax, -4(%r12)
	movq	_BRCMF_PNO_REPORT_NO_BATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	incq	%r15
	movslq	(%r13), %rax
	addq	$20, %r12
	cmpq	%rax, %r15
	jl	LBB0_12
LBB0_15:
	xorl	%eax, %eax
	callq	_BRCMF_SCAN_ON
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_brcmf_err
	movl	(%r13), %r14d
	testl	%r14d, %r14d
	jle	LBB0_20
## %bb.18:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$16, %rbx
	leaq	L_.str.3(%rip), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	-12(%rbx), %r14d
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movl	-4(%rbx), %r8d
	movl	-16(%rbx), %ecx
	movl	-8(%rbx), %r9d
	movl	%ecx, (%rsp)
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_brcmf_err
	incq	%r12
	movslq	(%r13), %r14
	addq	$20, %rbx
	cmpq	%r14, %r12
	jl	LBB0_19
	jmp	LBB0_20
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_21
LBB0_16:
	movl	(%r13), %r14d
LBB0_20:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
LBB0_21:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCAN,4,2                       ## @SCAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"n_reqs=%d\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_BRCMF_PNO_SCHED_SCAN_MIN_PERIOD,4,2 ## @BRCMF_PNO_SCHED_SCAN_MIN_PERIOD
L_.str.1:                               ## @.str.1
	.asciz	"scan period too small, using minimum\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BRCMF_PNO_REPORT_NO_BATCH,4,2  ## @BRCMF_PNO_REPORT_NO_BATCH
L_.str.2:                               ## @.str.2
	.asciz	"base period=%u\n"

L_.str.3:                               ## @.str.3
	.asciz	"[%d] period %u max %u repeat %u flag %x idx %u\n"

	.no_dead_strip	_brcmf_pno_prep_fwconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_pno_prep_fwconfig
_brcmf_pno_prep_fwconfig:               ; @brcmf_pno_prep_fwconfig
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _SCAN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SCAN@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.1:
Lloh4:
	adrp	x8, _ENODATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_3:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	x9, [x8]
	ldr	x9, [x9]
	ldr	w1, [x9]
	str	w1, [x21]
	ldr	w0, [x20]
	cmp	w0, #2
	b.lt	LBB0_8
; %bb.5:
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_gcd
	mov	x1, x0
	str	w0, [x21]
	ldr	w0, [x20]
	cmp	w0, #3
	b.lt	LBB0_8
; %bb.6:
	mov	w24, #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x24, lsl #3]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_gcd
	mov	x1, x0
	str	w0, [x21]
	add	x24, x24, #1
	ldrsw	x0, [x20]
	cmp	x24, x0
	b.lt	LBB0_7
LBB0_8:
Lloh6:
	adrp	x24, _BRCMF_PNO_SCHED_SCAN_MIN_PERIOD@GOTPAGE
Lloh7:
	ldr	x24, [x24, _BRCMF_PNO_SCHED_SCAN_MIN_PERIOD@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w1, w8
	b.ge	LBB0_10
; %bb.9:
	ldr	w0, [x23]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcmf_dbg
	ldr	w8, [x24]
	str	w8, [x21]
	ldr	w0, [x20]
LBB0_10:
	str	xzr, [x19]
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #20
	bl	_kcalloc
	cbz	x0, LBB0_19
; %bb.11:
	mov	x23, x0
	mov	x0, x22
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.12:
	mov	x26, #0
	add	x27, x23, #4
Lloh13:
	adrp	x28, _BRCMF_PNO_REPORT_NO_BATCH@GOTPAGE
Lloh14:
	ldr	x28, [x28, _BRCMF_PNO_REPORT_NO_BATCH@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x25, [x8, x26, lsl #3]
	mov	x0, x25
	mov	x1, x22
	bl	_brcmf_pno_get_bucket_channels
	mov	x24, x0
	tbnz	w0, #31, LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	sub	w8, w24, #1
	stur	w8, [x27, #-4]
	ldr	x8, [x25]
	ldr	w8, [x8]
	ldr	w9, [x21]
	sdiv	w8, w8, w9
	cmp	w8, #0
	csinc	w8, w8, wzr, ne
	str	w8, [x27]
	ldr	w8, [x28]
	str	w8, [x27, #4]
	add	x26, x26, #1
	ldrsw	x8, [x20]
	add	x27, x27, #20
	cmp	x26, x8
	b.lt	LBB0_13
LBB0_15:
	bl	_BRCMF_SCAN_ON
	cbz	x0, LBB0_21
; %bb.16:
	ldr	w1, [x21]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_brcmf_err
	ldr	w24, [x20]
	cmp	w24, #1
	b.lt	LBB0_22
; %bb.17:
	mov	x21, #0
	add	x25, x23, #8
Lloh17:
	adrp	x22, l_.str.3@PAGE
Lloh18:
	add	x22, x22, l_.str.3@PAGEOFF
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25, #8]
	ldur	w24, [x25, #-4]
	bl	_le16_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	ldp	w9, w8, [x25]
	ldur	w10, [x25, #-8]
	stp	x9, x10, [sp, #24]
	stp	x0, x8, [sp, #8]
	str	x24, [sp]
	mov	x0, x22
	mov	x1, x21
	bl	_brcmf_err
	add	x21, x21, #1
	ldrsw	x24, [x20]
	add	x25, x25, #20
	cmp	x21, x24
	b.lt	LBB0_18
	b	LBB0_22
LBB0_19:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_20:
	mov	x0, x23
	bl	_kfree
	b	LBB0_3
LBB0_21:
	ldr	w24, [x20]
LBB0_22:
	str	x23, [x19]
	b	LBB0_3
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SCAN,4,2                       ; @SCAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"n_reqs=%d\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_BRCMF_PNO_SCHED_SCAN_MIN_PERIOD,4,2 ; @BRCMF_PNO_SCHED_SCAN_MIN_PERIOD
l_.str.1:                               ; @.str.1
	.asciz	"scan period too small, using minimum\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BRCMF_PNO_REPORT_NO_BATCH,4,2  ; @BRCMF_PNO_REPORT_NO_BATCH
l_.str.2:                               ; @.str.2
	.asciz	"base period=%u\n"

l_.str.3:                               ; @.str.3
	.asciz	"[%d] period %u max %u repeat %u flag %x idx %u\n"

	.no_dead_strip	_brcmf_pno_prep_fwconfig
.subsections_via_symbols
