	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s3fwrn5_nci_rf_configure       ## -- Begin function s3fwrn5_nci_rf_configure
	.p2align	4, 0x90
_s3fwrn5_nci_rf_configure:              ## @s3fwrn5_nci_rf_configure
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rdx
	leaq	-48(%rbp), %rdi
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.4:
	movq	8(%rax), %rbx
	decq	%rcx
	movq	%rcx, %rdi
	shrq	$2, %rdi
	incq	%rdi
	movl	%edi, %eax
	andl	$3, %eax
	cmpq	$12, %rcx
	jae	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_21
LBB0_3:
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_6:
	andq	$-4, %rdi
	xorl	%ecx, %ecx
	movq	%rbx, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addl	(%rdx), %esi
	addl	4(%rdx), %esi
	addl	8(%rdx), %esi
	addl	12(%rdx), %esi
	addq	$16, %rcx
	addq	$16, %rdx
	addq	$-4, %rdi
	jne	LBB0_7
LBB0_8:
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	addq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rcx), %esi
	addq	$4, %rcx
	decq	%rax
	jne	LBB0_10
LBB0_11:
	movzwl	%si, %r12d
LBB0_12:
	movabsq	$1095216660481, %rax            ## imm = 0xFF00000001
	movq	%rax, -64(%rbp)
	movl	$255, -56(%rbp)
	movq	(%r15), %rdi
	movq	_NCI_PROP_FW_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rcx
	movl	$12, %edx
	callq	_nci_prop_cmd
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movq	(%r15), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_info
	movq	(%r15), %rdi
	movq	_NCI_PROP_START_RFREG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_nci_prop_cmd
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movl	%r12d, -40(%rbp)
	movq	(%r15), %rdi
	movq	_NCI_PROP_STOP_RFREG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rcx
	movl	$4, %edx
	callq	_nci_prop_cmd
	movl	%eax, %ebx
	movq	(%r15), %rax
	movq	(%rax), %rdi
	testl	%ebx, %ebx
	js	LBB0_17
## %bb.19:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_20
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_15:
	movl	%eax, %ebx
	movq	(%r15), %rax
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_18
LBB0_17:
	leaq	L_.str.3(%rip), %rsi
LBB0_18:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_20:
	movq	-48(%rbp), %rdi
	callq	_release_firmware
LBB0_21:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NCI_PROP_FW_CFG,4,2            ## @NCI_PROP_FW_CFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rfreg configuration update: %s\n"

	.comm	_NCI_PROP_START_RFREG,4,2       ## @NCI_PROP_START_RFREG
L_.str.1:                               ## @.str.1
	.asciz	"Unable to start rfreg update\n"

	.comm	_S3FWRN5_RFREG_SECTION_SIZE,4,2 ## @S3FWRN5_RFREG_SECTION_SIZE
	.comm	_NCI_PROP_SET_RFREG,4,2         ## @NCI_PROP_SET_RFREG
	.comm	_NCI_PROP_STOP_RFREG,4,2        ## @NCI_PROP_STOP_RFREG
L_.str.3:                               ## @.str.3
	.asciz	"Unable to stop rfreg update\n"

L_.str.4:                               ## @.str.4
	.asciz	"rfreg configuration update: success\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function s3fwrn5_nci_rf_configure
lCPI0_0:
	.long	1                               ; 0x1
	.long	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_s3fwrn5_nci_rf_configure
	.p2align	2
_s3fwrn5_nci_rf_configure:              ; @s3fwrn5_nci_rf_configure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x2, [x8]
	add	x0, sp, #40
	bl	_request_firmware
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x9, [sp, #40]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x9, [x9, #8]
	sub	x10, x8, #1
	cmp	x10, #12
	b.hs	LBB0_6
; %bb.3:
	mov	x10, #0
	mov	w13, #0
	b	LBB0_9
LBB0_4:
	mov	x21, x0
	b	LBB0_20
LBB0_5:
	mov	w22, #0
	b	LBB0_11
LBB0_6:
	mov	w15, #0
	mov	w16, #0
	mov	w14, #0
	mov	w13, #0
	lsr	x10, x10, #2
	add	x11, x10, #1
	and	x12, x11, #0x7ffffffffffffffc
	lsl	x10, x12, #2
	mov	x17, x12
	mov	x0, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w2, [x0]
	add	w15, w1, w15
	add	w16, w2, w16
	ldp	w1, w2, [x0, #8]
	add	w14, w1, w14
	add	w13, w2, w13
	add	x0, x0, #16
	subs	x17, x17, #4
	b.ne	LBB0_7
; %bb.8:
	add	w15, w16, w15
	add	w14, w14, w15
	add	w13, w13, w14
	cmp	x11, x12
	b.eq	LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, x10]
	add	w13, w11, w13
	add	x10, x10, #4
	cmp	x10, x8
	b.lo	LBB0_9
LBB0_10:
	and	w22, w13, #0xffff
LBB0_11:
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #24]
	mov	w8, #255
	str	w8, [sp, #32]
	ldr	x0, [x19]
Lloh2:
	adrp	x8, _NCI_PROP_FW_CFG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NCI_PROP_FW_CFG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x3, sp, #24
	mov	w2, #12
	bl	_nci_prop_cmd
	tbnz	w0, #31, LBB0_15
; %bb.12:
	ldr	x8, [x19]
	ldr	x0, [x8]
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	x0, [x19]
Lloh7:
	adrp	x8, _NCI_PROP_START_RFREG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NCI_PROP_START_RFREG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	mov	x3, #0
	bl	_nci_prop_cmd
	tbnz	w0, #31, LBB0_16
; %bb.13:
	str	w22, [sp, #16]
	ldr	x0, [x19]
Lloh10:
	adrp	x8, _NCI_PROP_STOP_RFREG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NCI_PROP_STOP_RFREG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x3, sp, #16
	mov	w2, #4
	bl	_nci_prop_cmd
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x0, [x8]
	tbnz	w21, #31, LBB0_17
; %bb.14:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	b	LBB0_19
LBB0_15:
	mov	x21, x0
	b	LBB0_19
LBB0_16:
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_17:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_18:
	bl	_dev_err
LBB0_19:
	ldr	x0, [sp, #40]
	bl	_release_firmware
LBB0_20:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NCI_PROP_FW_CFG,4,2            ; @NCI_PROP_FW_CFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rfreg configuration update: %s\n"

	.comm	_NCI_PROP_START_RFREG,4,2       ; @NCI_PROP_START_RFREG
l_.str.1:                               ; @.str.1
	.asciz	"Unable to start rfreg update\n"

	.comm	_S3FWRN5_RFREG_SECTION_SIZE,4,2 ; @S3FWRN5_RFREG_SECTION_SIZE
	.comm	_NCI_PROP_SET_RFREG,4,2         ; @NCI_PROP_SET_RFREG
	.comm	_NCI_PROP_STOP_RFREG,4,2        ; @NCI_PROP_STOP_RFREG
l_.str.3:                               ; @.str.3
	.asciz	"Unable to stop rfreg update\n"

l_.str.4:                               ; @.str.4
	.asciz	"rfreg configuration update: success\n"

.subsections_via_symbols
