	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_pno_config_sched_scans
_brcmf_pno_config_sched_scans:          ## @brcmf_pno_config_sched_scans
	.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	%rdi, %r15
	movq	(%rdi), %r14
	callq	_ifp_to_pno
	movq	%rax, %rbx
	leaq	-56(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%rax, %rdi
	callq	_brcmf_pno_prep_fwconfig
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_19
## %bb.1:
	movslq	%r12d, %r13
	shlq	$5, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_brcmf_pno_clean
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	-60(%rbp), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_brcmf_pno_config
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_brcmf_pno_channel_config
	testl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	js	LBB0_15
## %bb.5:
	movq	_BRCMF_GSCAN_CFG_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, 28(%r14)
	movq	_GSCAN_RETRY_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	_GSCAN_BATCH_NO_THR_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movq	_BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movl	%r12d, (%r14)
	movq	8(%r14), %rdi
	movq	-72(%rbp), %rsi
	shll	$5, %r12d
	movl	%r12d, %edx
	callq	_memcpy
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_brcmf_fil_iovar_data_set
	testl	%eax, %eax
	js	LBB0_15
## %bb.6:
	movq	%r15, %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_brcmf_pno_set_random
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_brcmf_pno_config_networks
	testl	%eax, %eax
	js	LBB0_15
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_brcmf_fil_iovar_int_set
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_17
	jmp	LBB0_16
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_18
LBB0_10:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_bphy_err
	movl	%ebx, %r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_15:
	movl	%eax, %r12d
LBB0_16:
	movq	%r15, %rdi
	callq	_brcmf_pno_clean
	jmp	LBB0_17
LBB0_11:
	movl	%eax, %r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_17:
	movq	%r14, %rdi
	callq	_kfree
LBB0_18:
	movq	-72(%rbp), %rdi
	callq	_kfree
LBB0_19:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed error=%d\n"

	.comm	_BRCMF_GSCAN_CFG_VERSION,4,2    ## @BRCMF_GSCAN_CFG_VERSION
	.comm	_GSCAN_RETRY_THRESHOLD,4,2      ## @GSCAN_RETRY_THRESHOLD
	.comm	_GSCAN_BATCH_NO_THR_SET,4,2     ## @GSCAN_BATCH_NO_THR_SET
	.comm	_BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN,4,2 ## @BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN
L_.str.1:                               ## @.str.1
	.asciz	"pfn_gscan_cfg"

L_.str.2:                               ## @.str.2
	.asciz	"pfn"

	.no_dead_strip	_brcmf_pno_config_sched_scans
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_pno_config_sched_scans
_brcmf_pno_config_sched_scans:          ; @brcmf_pno_config_sched_scans
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x24, [x0]
	bl	_ifp_to_pno
	mov	x22, x0
	add	x1, sp, #16
	add	x2, sp, #24
	add	x3, sp, #12
	bl	_brcmf_pno_prep_fwconfig
	mov	x21, x0
	tbnz	w0, #31, LBB0_16
; %bb.1:
	sub	w8, w21, #1
	sbfiz	x8, x8, #5, #32
	add	x23, x8, #32
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_brcmf_pno_clean
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldr	w1, [sp, #12]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_brcmf_pno_config
	tbnz	w0, #31, LBB0_13
; %bb.4:
	add	x1, sp, #16
	mov	x0, x19
	bl	_brcmf_pno_channel_config
	tbnz	w0, #31, LBB0_11
; %bb.5:
Lloh3:
	adrp	x8, _BRCMF_GSCAN_CFG_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BRCMF_GSCAN_CFG_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le16
Lloh6:
	adrp	x8, _GSCAN_RETRY_THRESHOLD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GSCAN_RETRY_THRESHOLD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w8, w0, [x20, #24]
Lloh9:
	adrp	x8, _GSCAN_BATCH_NO_THR_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GSCAN_BATCH_NO_THR_SET@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
	str	w21, [x20]
	ldr	x0, [x20, #8]
	ldr	x1, [sp, #24]
	lsl	w2, w21, #5
	bl	_memcpy
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x23
	bl	_brcmf_fil_iovar_data_set
	tbnz	w0, #31, LBB0_11
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	bl	_brcmf_pno_set_random
	tbnz	w0, #31, LBB0_11
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	bl	_brcmf_pno_config_networks
	tbnz	w0, #31, LBB0_11
; %bb.8:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_brcmf_fil_iovar_int_set
	mov	x21, x0
	tbz	w0, #31, LBB0_14
	b	LBB0_12
LBB0_9:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_10:
	mov	x25, x0
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	bl	_bphy_err
	mov	x21, x25
	b	LBB0_14
LBB0_11:
	mov	x21, x0
LBB0_12:
	mov	x0, x19
	bl	_brcmf_pno_clean
	b	LBB0_14
LBB0_13:
	mov	x21, x0
LBB0_14:
	mov	x0, x20
	bl	_kfree
LBB0_15:
	ldr	x0, [sp, #24]
	bl	_kfree
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed error=%d\n"

	.comm	_BRCMF_GSCAN_CFG_VERSION,4,2    ; @BRCMF_GSCAN_CFG_VERSION
	.comm	_GSCAN_RETRY_THRESHOLD,4,2      ; @GSCAN_RETRY_THRESHOLD
	.comm	_GSCAN_BATCH_NO_THR_SET,4,2     ; @GSCAN_BATCH_NO_THR_SET
	.comm	_BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN,4,2 ; @BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN
l_.str.1:                               ; @.str.1
	.asciz	"pfn_gscan_cfg"

l_.str.2:                               ; @.str.2
	.asciz	"pfn"

	.no_dead_strip	_brcmf_pno_config_sched_scans
.subsections_via_symbols
