	.file	"extr_keyspan.c_keyspan_fake_startup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"keyspan/usa49wlc.fw"
.LC1:
	.string	"keyspan/usa28.fw"
.LC2:
	.string	"keyspan/usa28xa.fw"
.LC3:
	.string	"keyspan/usa28xb.fw"
.LC4:
	.string	"keyspan/usa19.fw"
.LC5:
	.string	"keyspan/usa19qi.fw"
.LC6:
	.string	"keyspan/mpr.fw"
.LC7:
	.string	"keyspan/usa19qw.fw"
.LC8:
	.string	"keyspan/usa18x.fw"
.LC9:
	.string	"keyspan/usa19w.fw"
.LC10:
	.string	"keyspan/usa49w.fw"
.LC11:
	.string	"keyspan/usa28x.fw"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC12:
	.string	"Keyspan startup version %04x product %04x"
	.align 8
.LC13:
	.string	"Firmware already loaded.  Quitting."
	.section	.rodata.str1.1
.LC14:
	.string	"Unknown product ID (%04x)\n"
	.section	.rodata.str1.8
	.align 8
.LC15:
	.string	"Required keyspan firmware image (%s) unavailable.\n"
	.align 8
.LC16:
	.string	"Uploading Keyspan %s firmware."
	.align 8
.LC17:
	.string	"ezusb_writememory failed for Keyspan firmware (%d %04X %p %d)\n"
	.text
	.p2align 4
	.type	keyspan_fake_startup, @function
keyspan_fake_startup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	edi, DWORD PTR 4[rax]
	call	le16_to_cpu@PLT
	mov	r12d, eax
	mov	rax, QWORD PTR 0[r13]
	mov	edi, DWORD PTR 8[rax]
	call	le16_to_cpu@PLT
	lea	rdi, .LC12[rip]
	mov	edx, r12d
	mov	esi, eax
	xor	eax, eax
	call	dbg@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	edi, DWORD PTR 8[rax]
	call	le16_to_cpu@PLT
	test	ah, -128
	je	.L30
	mov	rax, QWORD PTR 0[r13]
	mov	edi, DWORD PTR 4[rax]
	call	le16_to_cpu@PLT
	add	eax, -128
	cmp	eax, 11
	ja	.L4
	lea	rdx, .L6[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L17-.L6
	.long	.L16-.L6
	.long	.L15-.L6
	.long	.L23-.L6
	.long	.L13-.L6
	.long	.L12-.L6
	.long	.L11-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC13[rip]
	xor	eax, eax
	call	dbg@PLT
.L3:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L31
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	lea	rbp, .LC11[rip]
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR 0[r13]
	mov	rdi, rsp
	mov	rsi, rbp
	call	request_ihex_firmware@PLT
	test	rax, rax
	jne	.L32
	mov	rsi, rbp
	lea	rdi, .LC16[rip]
	xor	eax, eax
	call	dbg@PLT
	mov	rdi, r13
	mov	esi, 1
	call	ezusb_set_reset@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	rbp, QWORD PTR [rdi]
	test	rbp, rbp
	jne	.L21
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, rbp
	call	ihex_next_binrec@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L33
.L21:
	mov	edi, DWORD PTR 0[rbp]
	call	be16_to_cpu@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	r14, QWORD PTR 8[rbp]
	mov	r12d, eax
	call	be32_to_cpu@PLT
	mov	ecx, r12d
	mov	rdx, r14
	mov	rdi, r13
	mov	esi, eax
	mov	r8d, 160
	call	ezusb_writememory@PLT
	mov	r12d, eax
	test	eax, eax
	jns	.L20
	mov	edi, DWORD PTR 0[rbp]
	call	be16_to_cpu@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	rbx, QWORD PTR 8[rbp]
	mov	r14d, eax
	call	be32_to_cpu@PLT
	mov	rdi, QWORD PTR 0[r13]
	mov	r9d, r14d
	mov	r8, rbx
	mov	ecx, eax
	mov	edx, r12d
	lea	rsi, .LC17[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	rdi, QWORD PTR [rsp]
.L19:
	call	release_firmware@PLT
	xor	esi, esi
	mov	rdi, r13
	call	ezusb_set_reset@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rbp, .LC2[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rbp, .LC3[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rbp, .LC0[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rbp, .LC10[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rbp, .LC1[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rbp, .LC9[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rbp, .LC7[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rbp, .LC5[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rbp, .LC4[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rbp, .LC8[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L5:
	lea	rbp, .LC6[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdi, QWORD PTR 0[r13]
	mov	rdx, rbp
	lea	rsi, .LC15[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdi, QWORD PTR [rsp]
	jmp	.L19
.L4:
	mov	rax, QWORD PTR 0[r13]
	mov	edi, DWORD PTR 4[rax]
	call	le16_to_cpu@PLT
	mov	rdi, QWORD PTR 0[r13]
	lea	rsi, .LC14[rip]
	mov	edx, eax
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L3
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	keyspan_fake_startup, .-keyspan_fake_startup
	.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_keyspan.c_keyspan_fake_startup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Keyspan startup version %04x product %04x\000"
	.align	2
.LC1:
	.ascii	"Firmware already loaded.  Quitting.\000"
	.align	2
.LC2:
	.ascii	"Unknown product ID (%04x)\012\000"
	.align	2
.LC3:
	.ascii	"Required keyspan firmware image (%s) unavailable.\012"
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"Uploading Keyspan %s firmware.\000"
	.align	2
.LC5:
	.ascii	"ezusb_writememory failed for Keyspan firmware (%d %"
	.ascii	"04X %p %d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	keyspan_fake_startup, %function
keyspan_fake_startup:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r0]
	ldr	r2, .L22
	mov	r6, r0
	sub	sp, sp, #16
	ldr	r0, [r3, #8]
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	bl	le16_to_cpu
	ldr	r3, [r6]
	mov	r4, r0
	ldr	r0, [r3, #4]
	bl	le16_to_cpu
	mov	r1, r4
	mov	r2, r0
	ldr	r0, .L22+4
	bl	dbg
	ldr	r3, [r6]
	ldr	r0, [r3, #8]
	bl	le16_to_cpu
	tst	r0, #32768
	beq	.L18
	ldr	r3, [r6]
	ldr	r0, [r3, #4]
	bl	le16_to_cpu
	sub	r0, r0, #128
	cmp	r0, #11
	bhi	.L4
	ldr	r3, .L22+8
	ldr	r2, [r6]
	ldr	r4, [r3, r0, lsl #2]
	add	r0, sp, #8
	mov	r1, r4
	bl	request_ihex_firmware
	cmp	r0, #0
	bne	.L19
	mov	r1, r4
	ldr	r0, .L22+12
	bl	dbg
	mov	r1, #1
	mov	r0, r6
	bl	ezusb_set_reset
	ldr	r0, [sp, #8]
	ldr	r4, [r0]
	cmp	r4, #0
	beq	.L7
	mov	r7, #160
	b	.L9
.L8:
	mov	r0, r4
	bl	ihex_next_binrec
	subs	r4, r0, #0
	beq	.L20
.L9:
	ldr	r0, [r4, #8]
	bl	be32_to_cpu
	mov	r5, r0
	ldm	r4, {r0, r8}
	bl	be16_to_cpu
	mov	r1, r5
	mov	r3, r0
	mov	r2, r8
	mov	r0, r6
	str	r7, [sp]
	bl	ezusb_writememory
	subs	r5, r0, #0
	bge	.L8
	ldr	r0, [r4, #8]
	ldr	r8, [r6]
	bl	be32_to_cpu
	mov	r7, r0
	ldm	r4, {r0, r4}
	bl	be16_to_cpu
	mov	r3, r7
	str	r0, [sp, #4]
	mov	r2, r5
	mov	r0, r8
	ldr	r1, .L22+16
	str	r4, [sp]
	bl	dev_err
	ldr	r0, [sp, #8]
.L7:
	bl	release_firmware
	mov	r0, r6
	mov	r1, #0
	bl	ezusb_set_reset
	b	.L3
.L4:
	ldr	r4, [r6]
	ldr	r0, [r4, #4]
	bl	le16_to_cpu
	ldr	r1, .L22+20
	mov	r2, r0
	mov	r0, r4
	bl	dev_err
.L3:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	mov	r0, #1
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r0, .L22+24
	bl	dbg
	b	.L3
.L19:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L22+28
	bl	dev_err
	b	.L3
.L20:
	ldr	r0, [sp, #8]
	bl	release_firmware
	mov	r0, r6
	mov	r1, #0
	bl	ezusb_set_reset
	b	.L3
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC6
	.word	.LC0
	.word	.LANCHOR0
	.word	.LC4
	.word	.LC5
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.size	keyspan_fake_startup, .-keyspan_fake_startup
	.section	.rodata.str1.4
	.align	2
.LC7:
	.ascii	"keyspan/usa49wlc.fw\000"
	.align	2
.LC8:
	.ascii	"keyspan/usa49w.fw\000"
	.align	2
.LC9:
	.ascii	"keyspan/usa28xb.fw\000"
	.align	2
.LC10:
	.ascii	"keyspan/usa28xa.fw\000"
	.align	2
.LC11:
	.ascii	"keyspan/usa28x.fw\000"
	.align	2
.LC12:
	.ascii	"keyspan/usa28.fw\000"
	.align	2
.LC13:
	.ascii	"keyspan/usa19w.fw\000"
	.align	2
.LC14:
	.ascii	"keyspan/usa19qw.fw\000"
	.align	2
.LC15:
	.ascii	"keyspan/usa19qi.fw\000"
	.align	2
.LC16:
	.ascii	"keyspan/usa19.fw\000"
	.align	2
.LC17:
	.ascii	"keyspan/usa18x.fw\000"
	.align	2
.LC18:
	.ascii	"keyspan/mpr.fw\000"
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	CSWTCH.3, %object
	.size	CSWTCH.3, 48
CSWTCH.3:
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
