	.file	"extr_whiteheat.c_whiteheat_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: Couldn't send command [%d]\n"
	.align 8
.LC1:
	.string	"%s: Send command incomplete [%d]\n"
	.align 8
.LC2:
	.string	"%s: Couldn't get results [%d]\n"
	.align 8
.LC3:
	.string	"%s: Get results incomplete [%d]\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%s: Command failed [%d]\n"
.LC5:
	.string	"%s: Firmware v%d.%02d\n"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"%s: Unable to retrieve firmware version, try replugging\n"
	.align 8
.LC7:
	.string	"%s: If the firmware is not running (status led not blinking)\n"
	.align 8
.LC8:
	.string	"%s: please contact support@connecttech.com\n"
	.text
	.p2align 4
	.type	whiteheat_attach, @function
whiteheat_attach:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rdx, QWORD PTR COMMAND_PORT[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 16[rdi]
	mov	rdi, QWORD PTR 8[rdi]
	mov	r14, QWORD PTR [rax+rdx*8]
	mov	esi, DWORD PTR 20[r14]
	call	usb_sndbulkpipe@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 2
	mov	r12d, eax
	call	kmalloc@PLT
	test	rax, rax
	je	.L2
	mov	rbp, rax
	mov	rax, QWORD PTR WHITEHEAT_GET_HW_INFO[rip]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 9
	mov	QWORD PTR 8[rbp], 0
	mov	QWORD PTR 0[rbp], rax
	call	kmalloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L3
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, r12d
	lea	r15, 4[rsp]
	call	usb_clear_halt@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	r8, r15
	mov	rdx, rbp
	mov	r9d, DWORD PTR COMMAND_TIMEOUT_MS[rip]
	mov	ecx, 2
	mov	esi, r12d
	call	usb_bulk_msg@PLT
	test	eax, eax
	jne	.L21
	mov	ecx, DWORD PTR 4[rsp]
	mov	rdi, QWORD PTR 8[rbx]
	cmp	ecx, 2
	jne	.L22
	mov	esi, DWORD PTR 16[r14]
	call	usb_rcvbulkpipe@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, eax
	mov	r12d, eax
	call	usb_clear_halt@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, r12d
	mov	r8, r15
	mov	r9d, DWORD PTR COMMAND_TIMEOUT_MS[rip]
	mov	ecx, 9
	mov	rdx, r13
	call	usb_bulk_msg@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L23
	mov	rax, QWORD PTR [rbx]
	mov	ecx, DWORD PTR 4[rsp]
	mov	rdi, QWORD PTR 8[rbx]
	mov	edx, DWORD PTR [rax]
	cmp	ecx, 9
	jne	.L24
	mov	rcx, QWORD PTR 0[r13]
	cmp	rcx, QWORD PTR 0[rbp]
	je	.L9
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	dev_err@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, .LC6[rip]
	mov	edx, DWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, .LC7[rip]
	mov	edx, DWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, .LC8[rip]
	mov	edx, DWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	mov	rdi, r13
	call	kfree@PLT
	mov	rdi, rbp
	call	kfree@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	ecx, DWORD PTR 12[r13]
	mov	r8d, DWORD PTR 8[r13]
	lea	rsi, .LC5[rip]
	call	dev_info@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 24
	call	kmalloc@PLT
	mov	r15, rax
	test	rax, rax
	jne	.L10
	mov	rdi, r13
	call	kfree@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, rbp
	call	kfree@PLT
.L2:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	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	rax, QWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	mov	edx, DWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdx, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rbx]
	mov	ecx, eax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	mov	edx, DWORD PTR [rdx]
	call	dev_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rdi, 16[rax]
	call	mutex_init@PLT
	mov	QWORD PTR 8[r15], 0
	mov	rdi, r15
	call	init_waitqueue_head@PLT
	mov	rsi, r15
	mov	rdi, r14
	call	usb_set_serial_port_data@PLT
	mov	rax, QWORD PTR 8[r14]
	mov	edx, DWORD PTR command_port_write_callback[rip]
	mov	rdi, r13
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR [r14]
	mov	edx, DWORD PTR command_port_read_callback[rip]
	mov	DWORD PTR [rax], edx
	call	kfree@PLT
	mov	rdi, rbp
	call	kfree@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR 8[rbx]
	mov	ecx, r12d
	lea	rsi, .LC2[rip]
	mov	edx, DWORD PTR [rax]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L5
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	whiteheat_attach, .-whiteheat_attach
	.comm	command_port_write_callback,4,4
	.comm	command_port_read_callback,4,4
	.comm	WHITEHEAT_GET_HW_INFO,8,8
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	COMMAND_TIMEOUT_MS,4,4
	.comm	COMMAND_PORT,8,8
	.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_whiteheat.c_whiteheat_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: Couldn't send command [%d]\012\000"
	.align	2
.LC1:
	.ascii	"%s: Send command incomplete [%d]\012\000"
	.align	2
.LC2:
	.ascii	"%s: Couldn't get results [%d]\012\000"
	.align	2
.LC3:
	.ascii	"%s: Get results incomplete [%d]\012\000"
	.align	2
.LC4:
	.ascii	"%s: Command failed [%d]\012\000"
	.align	2
.LC5:
	.ascii	"%s: Firmware v%d.%02d\012\000"
	.align	2
.LC6:
	.ascii	"%s: Unable to retrieve firmware version, try replug"
	.ascii	"ging\012\000"
	.align	2
.LC7:
	.ascii	"%s: If the firmware is not running (status led not "
	.ascii	"blinking)\012\000"
	.align	2
.LC8:
	.ascii	"%s: please contact support@connecttech.com\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	whiteheat_attach, %function
whiteheat_attach:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L26
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r0, #8]
	ldr	r2, [r2]
	sub	sp, sp, #16
	ldr	r8, [r3, r2, lsl #2]
	ldr	r3, .L26+4
	ldr	r1, [r8, #12]
	mov	r4, r0
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	usb_sndbulkpipe
	ldr	r7, .L26+8
	mov	r6, r0
	ldr	r1, [r7]
	mov	r0, #2
	bl	kmalloc
	subs	r5, r0, #0
	beq	.L2
	mov	r2, #0
	ldr	r3, .L26+12
	ldr	r1, [r7]
	ldr	r3, [r3]
	mov	r0, #9
	str	r2, [r5, #4]
	str	r3, [r5]
	bl	kmalloc
	subs	r9, r0, #0
	beq	.L3
	ldr	r10, .L26+16
	mov	r1, r6
	ldr	r0, [r4, #4]
	bl	usb_clear_halt
	ldr	r3, [r10]
	mov	r1, r6
	str	r3, [sp, #4]
	add	r3, sp, #8
	str	r3, [sp]
	mov	r2, r5
	mov	r3, #2
	ldr	r0, [r4, #4]
	bl	usb_bulk_msg
	subs	r3, r0, #0
	bne	.L21
	ldr	r3, [sp, #8]
	ldr	r0, [r4, #4]
	cmp	r3, #2
	bne	.L22
	ldr	r1, [r8, #8]
	bl	usb_rcvbulkpipe
	mov	r6, r0
	ldr	r0, [r4, #4]
	mov	r1, r6
	bl	usb_clear_halt
	ldr	r3, [r10]
	mov	r1, r6
	str	r3, [sp, #4]
	add	r3, sp, #8
	str	r3, [sp]
	mov	r2, r9
	mov	r3, #9
	ldr	r0, [r4, #4]
	bl	usb_bulk_msg
	subs	r6, r0, #0
	bne	.L23
	ldr	r3, [sp, #8]
	ldr	r2, [r4]
	cmp	r3, #9
	ldr	r2, [r2]
	ldr	r0, [r4, #4]
	bne	.L24
	ldr	r3, [r9]
	ldr	r1, [r5]
	cmp	r3, r1
	beq	.L9
	ldr	r1, .L26+20
	bl	dev_err
.L5:
	ldr	r3, [r4]
	ldr	r1, .L26+24
	ldr	r2, [r3]
	ldr	r0, [r4, #4]
	bl	dev_err
	ldr	r3, [r4]
	ldr	r1, .L26+28
	ldr	r2, [r3]
	ldr	r0, [r4, #4]
	bl	dev_err
	ldr	r3, [r4]
	ldr	r1, .L26+32
	ldr	r2, [r3]
	ldr	r0, [r4, #4]
	bl	dev_err
	mov	r0, r9
	bl	kfree
	mov	r0, r5
	bl	kfree
	ldr	r3, .L26+36
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L1
.L9:
	ldmib	r9, {r1, r3}
	str	r1, [sp]
	ldr	r1, .L26+40
	bl	dev_info
	mov	r0, #12
	ldr	r1, [r7]
	bl	kmalloc
	subs	r4, r0, #0
	bne	.L10
	mov	r0, r9
	bl	kfree
.L3:
	mov	r0, r5
	bl	kfree
.L2:
	ldr	r3, .L26+44
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L1:
	ldr	r3, .L26+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	ldr	r2, [r4]
	ldr	r1, .L26+48
	ldr	r2, [r2]
	bl	dev_err
	b	.L5
.L21:
	ldr	r2, [r4]
	ldr	r1, .L26+52
	ldr	r2, [r2]
	ldr	r0, [r4, #4]
	bl	dev_err
	b	.L5
.L24:
	ldr	r1, .L26+56
	bl	dev_err
	b	.L5
.L10:
	add	r0, r4, #8
	bl	mutex_init
	mov	r0, r4
	str	r6, [r4, #4]
	bl	init_waitqueue_head
	mov	r1, r4
	mov	r0, r8
	bl	usb_set_serial_port_data
	ldr	r2, .L26+60
	ldr	r3, [r8, #4]
	ldr	r1, [r2]
	ldr	r2, .L26+64
	str	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r8]
	mov	r0, r9
	str	r2, [r3]
	bl	kfree
	mov	r0, r5
	bl	kfree
	b	.L1
.L23:
	ldr	r2, [r4]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, .L26+68
	ldr	r0, [r4, #4]
	bl	dev_err
	b	.L5
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	COMMAND_PORT
	.word	.LC9
	.word	GFP_KERNEL
	.word	WHITEHEAT_GET_HW_INFO
	.word	COMMAND_TIMEOUT_MS
	.word	.LC4
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	ENODEV
	.word	.LC5
	.word	ENOMEM
	.word	.LC1
	.word	.LC0
	.word	.LC3
	.word	command_port_write_callback
	.word	command_port_read_callback
	.word	.LC2
	.size	whiteheat_attach, .-whiteheat_attach
	.comm	command_port_write_callback,4,4
	.comm	command_port_read_callback,4,4
	.comm	WHITEHEAT_GET_HW_INFO,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	COMMAND_TIMEOUT_MS,4,4
	.comm	COMMAND_PORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
