	.file	"extr_zd1201.c_zd1201_getconfig.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"riddatalen mismatches, expected=%u, (packet=%u) length=%u, rid=0x%04X, rid_fid=0x%04X\n"
	.align 8
.LC1:
	.string	"Packet type mismatch: 0x%x not 0x3\n"
	.align 8
.LC2:
	.string	"Rx Resource packet type error: %02X\n"
	.text
	.p2align 4
	.type	zd1201_getconfig, @function
zd1201_getconfig:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r8d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, ecx
	xor	ecx, ecx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	mov	edx, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 24[rdi], 0
	mov	esi, DWORD PTR ZD1201_CMDCODE_ACCESS[rip]
	call	zd1201_docmd@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L22
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L22:
	.cfi_restore_state
	mov	rsi, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 32[rbx]
	call	wait_event_interruptible@PLT
	mov	ecx, DWORD PTR [rbx]
	test	ecx, ecx
	je	.L19
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 4[rax]
	call	le16_to_cpu@PLT
	mov	r12d, eax
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 6[rax]
	call	le16_to_cpu@PLT
	mov	r15d, eax
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 8[rax]
	call	le16_to_cpu@PLT
	mov	ecx, DWORD PTR [rbx]
	mov	r8d, eax
	cmp	ecx, r8d
	lea	eax, -6[rcx]
	cmovl	r8d, eax
	mov	eax, DWORD PTR ZD1201_ACCESSBIT[rip]
	and	r12d, eax
	cmp	r12d, eax
	jne	.L20
	cmp	r13d, r15d
	je	.L5
.L20:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	lea	eax, -4[r8]
	cmp	eax, r14d
	jne	.L23
	mov	QWORD PTR 24[rbx], 0
	xor	ecx, ecx
	mov	edx, r13d
	mov	rdi, rbx
	mov	esi, DWORD PTR ZD1201_CMDCODE_SETRXRID[rip]
	call	zd1201_docmd@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rsi, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 32[rbx]
	call	wait_event_interruptible@PLT
	mov	r15d, DWORD PTR [rbx]
	test	r15d, r15d
	je	.L19
	mov	rdx, QWORD PTR 8[rbx]
	movsx	rax, r15d
	xor	r13d, r13d
	movzx	eax, BYTE PTR -1[rdx+rax]
	cmp	al, BYTE PTR ZD1201_PACKET_RESOURCE[rip]
	je	.L9
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rcx, 8[rdx]
	lea	r14d, -8[rax]
.L13:
	mov	edx, r14d
	mov	rsi, rcx
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rcx
	call	memcpy@PLT
	sub	r15d, 64
	movsx	rax, r14d
	add	r13d, 1
	mov	rcx, QWORD PTR 8[rsp]
	add	rbp, rax
	lea	rdx, [rcx+rax]
	test	r15d, r15d
	jle	.L1
.L9:
	movzx	ecx, BYTE PTR [rdx]
	cmp	r15d, 64
	mov	eax, 64
	cmovle	eax, r15d
	cmp	cl, 3
	jne	.L25
	xor	ecx, ecx
	cmp	r15d, 64
	setl	cl
	sub	eax, ecx
	test	r13d, r13d
	je	.L26
	lea	rcx, 4[rdx]
	lea	r14d, -4[rax]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L23:
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	rdi, QWORD PTR 16[rbx]
	movzx	edx, r14b
	mov	r9d, r13d
	push	r15
	.cfi_def_cfa_offset 96
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r12d, DWORD PTR ENODATA[rip]
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	neg	r12d
	jmp	.L1
.L25:
	mov	rdi, QWORD PTR 16[rbx]
	movzx	edx, cl
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
.L24:
	mov	rdi, QWORD PTR 16[rbx]
	movzx	edx, al
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	zd1201_getconfig, .-zd1201_getconfig
	.comm	ZD1201_PACKET_RESOURCE,1,1
	.comm	ZD1201_CMDCODE_SETRXRID,4,4
	.comm	ZD1201_CMDCODE_ACCESS,4,4
	.comm	ZD1201_ACCESSBIT,4,4
	.comm	ENODATA,4,4
	.comm	EIO,4,4
	.comm	EINVAL,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_zd1201.c_zd1201_getconfig.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"riddatalen mismatches, expected=%u, (packet=%u) len"
	.ascii	"gth=%u, rid=0x%04X, rid_fid=0x%04X\012\000"
	.align	2
.LC1:
	.ascii	"Packet type mismatch: 0x%x not 0x3\012\000"
	.align	2
.LC2:
	.ascii	"Rx Resource packet type error: %02X\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	zd1201_getconfig, %function
zd1201_getconfig:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r1
	sub	sp, sp, #16
	ldr	r1, .L22
	str	ip, [r0, #12]
	str	ip, [sp]
	mov	r8, r2
	mov	r7, r3
	mov	r2, r6
	mov	r3, ip
	ldr	r1, [r1]
	mov	r4, r0
	bl	zd1201_docmd
	subs	r5, r0, #0
	beq	.L19
.L1:
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	ldr	r1, [r4, #12]
	ldr	r0, [r4, #16]
	bl	wait_event_interruptible
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [r4, #4]
	ldr	r0, [r3, #4]
	bl	le16_to_cpu
	ldr	r1, [r4, #4]
	mov	r9, r0
	ldr	r0, [r1, #6]
	bl	le16_to_cpu
	ldr	r3, [r4, #4]
	mov	r5, r0
	ldr	r0, [r3, #8]
	bl	le16_to_cpu
	ldr	r2, .L22+4
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r0
	bic	r2, r2, r9
	mov	r1, r0
	sublt	r1, r3, #6
	cmp	r2, #0
	cmpeq	r6, r5
	movne	r2, #1
	moveq	r2, #0
	beq	.L5
.L17:
	ldr	r3, .L22+8
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	ldr	r3, .L22+12
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	sub	r0, r1, #4
	cmp	r0, r7
	bne	.L20
	ldr	r0, .L22+16
	str	r2, [r4, #12]
	str	r1, [sp]
	mov	r3, r2
	ldr	r1, [r0]
	mov	r2, r6
	mov	r0, r4
	bl	zd1201_docmd
	subs	r5, r0, #0
	bne	.L1
	ldr	r1, [r4, #12]
	ldr	r0, [r4, #16]
	bl	wait_event_interruptible
	ldr	r7, [r4]
	cmp	r7, #0
	beq	.L16
	ldr	r1, [r4, #4]
	ldr	r3, .L22+20
	add	r2, r1, r7
	ldrb	r2, [r2, #-1]	@ zero_extendqisi2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, r2
	moveq	r10, r5
	beq	.L8
	b	.L21
.L9:
	cmp	r7, #63
	suble	r6, r6, #1
	cmp	r10, #0
	subeq	r6, r6, #8
	subne	r6, r6, #4
	addeq	r9, r1, #8
	addne	r9, r1, #4
	mov	r1, r9
	mov	r0, r8
	mov	r2, r6
	sub	r7, r7, #64
	bl	memcpy
	cmp	r7, #0
	add	r10, r10, #1
	add	r8, r8, r6
	add	r1, r9, r6
	ble	.L1
.L8:
	ldrb	r2, [r1]	@ zero_extendqisi2
	cmp	r7, #64
	movlt	r6, r7
	movge	r6, #64
	cmp	r2, #3
	beq	.L9
	ldr	r0, [r4, #8]
	ldr	r1, .L22+24
	bl	dev_dbg
	ldr	r3, .L22+8
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L20:
	stm	sp, {r1, r6}
	str	r5, [sp, #8]
	ldr	r0, [r4, #8]
	ldr	r1, .L22+28
	and	r2, r7, #255
	bl	dev_dbg
	ldr	r3, .L22+32
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L21:
	ldr	r0, [r4, #8]
	ldr	r1, .L22+36
	bl	dev_dbg
	b	.L17
.L23:
	.align	2
.L22:
	.word	ZD1201_CMDCODE_ACCESS
	.word	ZD1201_ACCESSBIT
	.word	EINVAL
	.word	EIO
	.word	ZD1201_CMDCODE_SETRXRID
	.word	ZD1201_PACKET_RESOURCE
	.word	.LC2
	.word	.LC0
	.word	ENODATA
	.word	.LC1
	.size	zd1201_getconfig, .-zd1201_getconfig
	.comm	ZD1201_PACKET_RESOURCE,1,1
	.comm	ZD1201_CMDCODE_SETRXRID,4,4
	.comm	ZD1201_CMDCODE_ACCESS,4,4
	.comm	ZD1201_ACCESSBIT,4,4
	.comm	ENODATA,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
