	.file	"extr_nci.c_s3fwrn5_nci_rf_configure.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"rfreg configuration update: %s\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Unable to start rfreg update\n"
.LC2:
	.string	"rfreg update error (code=%d)\n"
.LC3:
	.string	"Unable to stop rfreg update\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"rfreg configuration update: success\n"
	.text
	.p2align 4
	.globl	s3fwrn5_nci_rf_configure
	.type	s3fwrn5_nci_rf_configure, @function
s3fwrn5_nci_rf_configure:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	lea	rdi, 8[rsp]
	mov	rdx, QWORD PTR [rax]
	call	request_firmware@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L1
	mov	rdx, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR [rdx]
	test	eax, eax
	jle	.L14
	mov	rdx, QWORD PTR 8[rdx]
	sub	eax, 1
	xor	r14d, r14d
	shr	eax, 2
	mov	ecx, eax
	lea	rax, 4[rdx]
	lea	rcx, [rax+rcx*4]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	add	rax, 4
.L4:
	add	r14d, DWORD PTR [rdx]
	mov	rdx, rax
	cmp	rcx, rax
	jne	.L21
.L3:
	mov	esi, DWORD PTR NCI_PROP_FW_CFG[rip]
	mov	rdi, QWORD PTR 0[rbp]
	movabs	rax, 1095216660481
	lea	rcx, 20[rsp]
	mov	edx, 12
	mov	QWORD PTR 20[rsp], rax
	mov	DWORD PTR 28[rsp], 255
	call	nci_prop_cmd@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L5
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, r12
	lea	rsi, .LC0[rip]
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	call	dev_info@PLT
	mov	esi, DWORD PTR NCI_PROP_START_RFREG[rip]
	xor	ecx, ecx
	xor	edx, edx
	mov	rdi, QWORD PTR 0[rbp]
	call	nci_prop_cmd@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L22
	mov	QWORD PTR 32[rsp], 0
	mov	rax, QWORD PTR 8[rsp]
	mov	edx, DWORD PTR [rax]
	test	edx, edx
	jle	.L12
	mov	ebx, DWORD PTR S3FWRN5_RFREG_SECTION_SIZE[rip]
	xor	r15d, r15d
	lea	r12, 32[rsp]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 8[rsp]
	mov	ebx, DWORD PTR S3FWRN5_RFREG_SECTION_SIZE[rip]
	add	QWORD PTR 32[rsp], 1
	mov	edx, DWORD PTR [rax]
	add	r15d, ebx
	cmp	edx, r15d
	jle	.L12
.L11:
	sub	edx, r15d
	mov	edi, DWORD PTR 40[rsp]
	movsx	rsi, r15d
	cmp	edx, ebx
	cmovle	ebx, edx
	add	rsi, QWORD PTR 8[rax]
	mov	edx, ebx
	call	memcpy@PLT
	mov	rdi, QWORD PTR 0[rbp]
	lea	edx, 1[rbx]
	mov	rcx, r12
	mov	esi, DWORD PTR NCI_PROP_SET_RFREG[rip]
	call	nci_prop_cmd@PLT
	mov	r13d, eax
	test	eax, eax
	jns	.L10
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, r13d
	lea	rsi, .LC2[rip]
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
.L5:
	mov	rdi, QWORD PTR 8[rsp]
	call	release_firmware@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR NCI_PROP_STOP_RFREG[rip]
	mov	rdi, QWORD PTR 0[rbp]
	lea	rcx, 4[rsp]
	and	r14d, 65535
	mov	edx, 4
	mov	DWORD PTR 4[rsp], r14d
	call	nci_prop_cmd@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L24
	mov	rax, QWORD PTR 0[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	call	dev_info@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	xor	r14d, r14d
	jmp	.L3
.L22:
	mov	rax, QWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L5
.L24:
	mov	rax, QWORD PTR 0[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	s3fwrn5_nci_rf_configure, .-s3fwrn5_nci_rf_configure
	.comm	S3FWRN5_RFREG_SECTION_SIZE,4,4
	.comm	NCI_PROP_STOP_RFREG,4,4
	.comm	NCI_PROP_START_RFREG,4,4
	.comm	NCI_PROP_SET_RFREG,4,4
	.comm	NCI_PROP_FW_CFG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_nci.c_s3fwrn5_nci_rf_configure.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rfreg configuration update: %s\012\000"
	.align	2
.LC1:
	.ascii	"Unable to start rfreg update\012\000"
	.align	2
.LC2:
	.ascii	"rfreg update error (code=%d)\012\000"
	.align	2
.LC3:
	.ascii	"Unable to stop rfreg update\012\000"
	.align	2
.LC4:
	.ascii	"rfreg configuration update: success\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	s3fwrn5_nci_rf_configure
	.syntax unified
	.arm
	.fpu softvfp
	.type	s3fwrn5_nci_rf_configure, %function
s3fwrn5_nci_rf_configure:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r0]
	sub	sp, sp, #32
	ldr	r2, [r3]
	ldr	r3, .L24
	mov	r7, r0
	mov	r0, sp
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r4, r1
	bl	request_firmware
	subs	r10, r0, #0
	blt	.L1
	ldr	r3, [sp]
	mov	r6, #0
	ldr	r0, [r3]
	cmp	r0, #0
	ble	.L3
	ldr	r2, [r3, #4]
	sub	r0, r0, #1
	bic	r0, r0, #3
	add	r3, r2, #4
	add	r0, r0, r3
	b	.L4
.L20:
	add	r3, r3, #4
.L4:
	ldr	r2, [r2]
	cmp	r0, r3
	add	r6, r6, r2
	mov	r2, r3
	bne	.L20
.L3:
	mov	r0, #1
	mov	ip, #255
	ldr	r2, .L24+4
	str	r0, [sp, #16]
	ldr	r1, [r2]
	ldr	r0, [r7]
	mov	r2, #12
	add	r3, sp, #16
	str	ip, [sp, #20]
	str	ip, [sp, #24]
	bl	nci_prop_cmd
	subs	r10, r0, #0
	blt	.L5
	ldr	r3, [r7]
	mov	r2, r4
	ldr	r0, [r3]
	ldr	r1, .L24+8
	bl	dev_info
	mov	r3, #0
	ldr	r1, .L24+12
	mov	r2, r3
	ldr	r1, [r1]
	ldr	r0, [r7]
	bl	nci_prop_cmd
	subs	r10, r0, #0
	blt	.L21
	mov	r5, #0
	ldr	r1, [sp]
	str	r5, [sp, #8]
	ldr	r3, [r1]
	cmp	r3, r5
	ble	.L12
	ldr	r8, .L24+16
	ldr	r9, .L24+20
	ldr	r4, [r8]
	b	.L11
.L10:
	ldr	r1, [sp]
	ldr	r4, [r8]
	ldr	r3, [r1]
	ldr	r2, [sp, #8]
	add	r5, r5, r4
	add	r2, r2, #1
	cmp	r3, r5
	str	r2, [sp, #8]
	ble	.L12
.L11:
	sub	r3, r3, r5
	cmp	r3, r4
	movlt	r4, r3
	ldr	r1, [r1, #4]
	mov	r2, r4
	add	r1, r5, r1
	ldr	r0, [sp, #12]
	bl	memcpy
	ldr	r1, [r9]
	ldr	r0, [r7]
	add	r3, sp, #8
	add	r2, r4, #1
	bl	nci_prop_cmd
	subs	r10, r0, #0
	bge	.L10
	ldr	r3, [r7]
	mov	r2, r10
	ldr	r0, [r3]
	ldr	r1, .L24+24
	bl	dev_err
.L5:
	ldr	r0, [sp]
	bl	release_firmware
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r10
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	ldr	r3, .L24+28
	lsl	r6, r6, #16
	ldr	r1, [r3]
	mov	r2, #4
	ldr	r0, [r7]
	lsr	r6, r6, #16
	add	r3, sp, #4
	str	r6, [sp, #4]
	bl	nci_prop_cmd
	subs	r10, r0, #0
	blt	.L23
	ldr	r3, [r7]
	ldr	r1, .L24+32
	ldr	r0, [r3]
	bl	dev_info
	b	.L5
.L21:
	ldr	r3, [r7]
	ldr	r1, .L24+36
	ldr	r0, [r3]
	bl	dev_err
	b	.L5
.L23:
	ldr	r3, [r7]
	ldr	r1, .L24+40
	ldr	r0, [r3]
	bl	dev_err
	b	.L5
.L22:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC5
	.word	NCI_PROP_FW_CFG
	.word	.LC0
	.word	NCI_PROP_START_RFREG
	.word	S3FWRN5_RFREG_SECTION_SIZE
	.word	NCI_PROP_SET_RFREG
	.word	.LC2
	.word	NCI_PROP_STOP_RFREG
	.word	.LC4
	.word	.LC1
	.word	.LC3
	.size	s3fwrn5_nci_rf_configure, .-s3fwrn5_nci_rf_configure
	.comm	S3FWRN5_RFREG_SECTION_SIZE,4,4
	.comm	NCI_PROP_STOP_RFREG,4,4
	.comm	NCI_PROP_START_RFREG,4,4
	.comm	NCI_PROP_SET_RFREG,4,4
	.comm	NCI_PROP_FW_CFG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
