	.file	"extr_spcp8x5.c_spcp8x5_startup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"device type = %d\n"
	.text
	.p2align 4
	.type	spcp8x5_startup, @function
spcp8x5_startup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, DWORD PTR SPCP825_007_TYPE[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR 16[rax]
	call	le16_to_cpu@PLT
	cmp	eax, 513
	je	.L26
	mov	rdi, QWORD PTR 16[r12]
	cmp	eax, 561
	je	.L27
	cmp	eax, 565
	je	.L28
	cmp	eax, 516
	je	.L29
	cmp	eax, 1137
	jne	.L3
	mov	rbx, QWORD PTR 8[rdi]
	mov	edi, 2078
	call	cpu_to_le16@PLT
	cmp	rbx, rax
	jne	.L24
	mov	r14d, DWORD PTR SPCP825_PHILIP_TYPE[rip]
.L24:
	mov	rdi, QWORD PTR 16[r12]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L27:
	mov	r14d, DWORD PTR SPCP835_TYPE[rip]
.L3:
	mov	edx, r14d
	lea	rsi, .LC0[rip]
	xor	ebx, ebx
	call	dev_dbg@PLT
	mov	eax, DWORD PTR [r12]
	test	eax, eax
	jg	.L8
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L31:
	lea	rdi, 20[rax]
	call	spin_lock_init@PLT
	mov	edi, DWORD PTR SPCP8x5_BUF_SIZE[rip]
	call	alloc_ringbuf@PLT
	mov	QWORD PTR 8[rbp], rax
	test	rax, rax
	je	.L30
	lea	rdi, 16[rbp]
	call	init_waitqueue_head@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	DWORD PTR 0[rbp], r14d
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax+rbx*4]
	add	rbx, 1
	call	usb_set_serial_port_data@PLT
	cmp	DWORD PTR [r12], ebx
	jle	.L12
.L8:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 24
	movsx	r13, ebx
	call	kzalloc@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L31
.L10:
	lea	ebp, -1[r13]
	test	r13d, r13d
	je	.L15
	lea	eax, -1[rbx]
	movsx	rbp, ebp
	sub	r13, rax
	sal	rbp, 2
	lea	rbx, -8[0+r13*4]
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 8[r12]
	mov	edi, DWORD PTR [rax+rbp]
	call	usb_get_serial_port_data@PLT
	mov	rdi, QWORD PTR 8[rax]
	mov	r13, rax
	call	free_ringbuf@PLT
	mov	rdi, r13
	call	kfree@PLT
	mov	rax, QWORD PTR 8[r12]
	xor	esi, esi
	mov	edi, DWORD PTR [rax+rbp]
	sub	rbp, 4
	call	usb_set_serial_port_data@PLT
	cmp	rbx, rbp
	jne	.L14
.L15:
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L26:
	.cfi_restore_state
	mov	r14d, DWORD PTR SPCP825_007_TYPE[rip]
	mov	rdi, QWORD PTR 16[r12]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, rbp
	call	kfree@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	mov	r14d, DWORD PTR SPCP825_INTERMATIC_TYPE[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	mov	r14d, DWORD PTR SPCP825_008_TYPE[rip]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	spcp8x5_startup, .-spcp8x5_startup
	.comm	SPCP8x5_BUF_SIZE,4,4
	.comm	SPCP835_TYPE,4,4
	.comm	SPCP825_PHILIP_TYPE,4,4
	.comm	SPCP825_INTERMATIC_TYPE,4,4
	.comm	SPCP825_008_TYPE,4,4
	.comm	SPCP825_007_TYPE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_spcp8x5.c_spcp8x5_startup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"device type = %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	spcp8x5_startup, %function
spcp8x5_startup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #8]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, .L30
	mov	r6, r0
	ldr	r0, [r3, #8]
	ldr	r7, [r4]
	bl	le16_to_cpu
	ldr	r3, .L30+4
	cmp	r0, r3
	beq	.L24
	ldr	r2, .L30+8
	ldr	r3, [r6, #8]
	cmp	r0, r2
	beq	.L25
	ldr	r2, .L30+12
	cmp	r0, r2
	beq	.L26
	cmp	r0, #516
	beq	.L27
	ldr	r2, .L30+16
	cmp	r0, r2
	bne	.L3
	ldr	r0, .L30+20
	ldr	r4, [r3, #4]
	bl	cpu_to_le16
	cmp	r4, r0
	ldreq	r2, .L30+24
	ldrne	r3, [r6, #8]
	ldreq	r3, [r6, #8]
	ldreq	r7, [r2]
	b	.L3
.L25:
	ldr	r2, .L30+28
	ldr	r7, [r2]
.L3:
	mov	r0, r3
	mov	r2, r7
	ldr	r1, .L30+32
	bl	dev_dbg
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L12
	mov	r5, #0
	ldr	r8, .L30+36
	ldr	r9, .L30+40
	b	.L8
.L29:
	bl	spin_lock_init
	ldr	r0, [r9]
	bl	alloc_ringbuf
	mov	r3, r0
	cmp	r3, #0
	add	r0, r4, #8
	str	r3, [r4, #4]
	beq	.L28
	bl	init_waitqueue_head
	ldr	r3, [r6, #4]
	str	r7, [r4]
	ldr	r0, [r3, r5, lsl #2]
	mov	r1, r4
	bl	usb_set_serial_port_data
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L12
.L8:
	mov	r0, #16
	ldr	r1, [r8]
	bl	kzalloc
	subs	r4, r0, #0
	add	r0, r4, #12
	bne	.L29
.L10:
	cmp	r5, #0
	sub	r5, r5, #1
	beq	.L14
.L13:
	ldr	r3, [r6, #4]
	ldr	r0, [r3, r5, lsl #2]
	bl	usb_get_serial_port_data
	mov	r4, r0
	ldr	r0, [r0, #4]
	bl	free_ringbuf
	mov	r0, r4
	bl	kfree
	ldr	r3, [r6, #4]
	mov	r1, #0
	ldr	r0, [r3, r5, lsl #2]
	sub	r5, r5, #1
	bl	usb_set_serial_port_data
	cmn	r5, #1
	bne	.L13
.L14:
	ldr	r3, .L30+44
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	ldr	r7, [r4]
	ldr	r3, [r6, #8]
	b	.L3
.L28:
	mov	r0, r4
	bl	kfree
	b	.L10
.L27:
	ldr	r2, .L30+48
	ldr	r7, [r2]
	b	.L3
.L26:
	ldr	r2, .L30+52
	ldr	r7, [r2]
	b	.L3
.L31:
	.align	2
.L30:
	.word	SPCP825_007_TYPE
	.word	513
	.word	561
	.word	565
	.word	1137
	.word	2078
	.word	SPCP825_PHILIP_TYPE
	.word	SPCP835_TYPE
	.word	.LC0
	.word	GFP_KERNEL
	.word	SPCP8x5_BUF_SIZE
	.word	ENOMEM
	.word	SPCP825_INTERMATIC_TYPE
	.word	SPCP825_008_TYPE
	.size	spcp8x5_startup, .-spcp8x5_startup
	.comm	SPCP8x5_BUF_SIZE,4,4
	.comm	SPCP835_TYPE,4,4
	.comm	SPCP825_PHILIP_TYPE,4,4
	.comm	SPCP825_INTERMATIC_TYPE,4,4
	.comm	SPCP825_008_TYPE,4,4
	.comm	SPCP825_007_TYPE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
