	.file	"extr_uvisor.c_uvisor_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"getting connection info\n"
.LC1:
	.string	"too little data\n"
.LC2:
	.string	"done\n"
.LC3:
	.string	"getting config info\n"
.LC4:
	.string	"get the interface number\n"
	.text
	.p2align 4
	.type	uvisor_init, @function
uvisor_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 1160
	.cfi_def_cfa_offset 1200
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1144[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR UVISOR_FLAG_VISOR[rip], eax
	jne	.L21
	test	DWORD PTR UVISOR_FLAG_PALM4[rip], eax
	jne	.L22
.L4:
	test	DWORD PTR UVISOR_FLAG_PALM35[rip], eax
	jne	.L7
.L8:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	DPRINTF@PLT
	xor	eax, eax
.L3:
.L1:
	mov	rbx, QWORD PTR 1144[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L23
	add	rsp, 1160
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	lea	rdi, .LC3[rip]
	xor	eax, eax
	lea	r13, 112[rsp]
	call	DPRINTF@PLT
	mov	edi, DWORD PTR 88[rsp]
	xor	esi, esi
	lea	r12, 80[rsp]
	mov	rax, QWORD PTR UT_READ[rip]
	mov	QWORD PTR 104[rsp], rax
	mov	rax, QWORD PTR UR_GET_CONFIG[rip]
	mov	QWORD PTR 96[rsp], rax
	call	USETW@PLT
	mov	edi, DWORD PTR 84[rsp]
	xor	esi, esi
	call	USETW@PLT
	mov	edi, DWORD PTR 80[rsp]
	mov	esi, 1
	call	USETW@PLT
	xor	esi, esi
	xor	eax, eax
	mov	rcx, r13
	mov	rdx, r12
	mov	rdi, rbp
	call	usbd_do_request@PLT
	test	rax, rax
	jne	.L1
	lea	rdi, .LC4[rip]
	call	DPRINTF@PLT
	mov	rax, QWORD PTR UT_READ_DEVICE[rip]
	mov	edi, DWORD PTR 88[rsp]
	xor	esi, esi
	mov	QWORD PTR 104[rsp], rax
	mov	rax, QWORD PTR UR_GET_INTERFACE[rip]
	mov	QWORD PTR 96[rsp], rax
	call	USETW@PLT
	mov	edi, DWORD PTR 84[rsp]
	xor	esi, esi
	call	USETW@PLT
	mov	edi, DWORD PTR 80[rsp]
	mov	esi, 1
	call	USETW@PLT
	xor	esi, esi
	xor	eax, eax
	mov	rcx, r13
	mov	rdx, r12
	mov	rdi, rbp
	call	usbd_do_request@PLT
	test	rax, rax
	je	.L8
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	DPRINTF@PLT
	mov	rax, QWORD PTR UT_READ_VENDOR_ENDPOINT[rip]
	mov	edi, DWORD PTR 88[rsp]
	xor	esi, esi
	mov	QWORD PTR 104[rsp], rax
	mov	rax, QWORD PTR UVISOR_GET_CONNECTION_INFORMATION[rip]
	mov	QWORD PTR 96[rsp], rax
	call	USETW@PLT
	mov	edi, DWORD PTR 84[rsp]
	xor	esi, esi
	call	USETW@PLT
	mov	edi, DWORD PTR 80[rsp]
	mov	esi, DWORD PTR UVISOR_CONNECTION_INFO_SIZE[rip]
	call	USETW@PLT
	mov	eax, DWORD PTR USB_DEFAULT_TIMEOUT[rip]
	xor	esi, esi
	mov	rdi, rbp
	lea	rcx, 16[rsp]
	lea	rdx, 80[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 1208
	mov	r8d, DWORD PTR USB_SHORT_XFER_OK[rip]
	push	rax
	.cfi_def_cfa_offset 1216
	lea	r9, 24[rsp]
	call	usbd_do_request_flags@PLT
	pop	rsi
	.cfi_def_cfa_offset 1208
	pop	rdi
	.cfi_def_cfa_offset 1200
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR UVISOR_FLAG_PALM4[rip], eax
	je	.L4
.L22:
	mov	rax, QWORD PTR UT_READ_VENDOR_ENDPOINT[rip]
	mov	edi, DWORD PTR 88[rsp]
	xor	esi, esi
	mov	QWORD PTR 104[rsp], rax
	mov	rax, QWORD PTR UVISOR_GET_PALM_INFORMATION[rip]
	mov	QWORD PTR 96[rsp], rax
	call	USETW@PLT
	mov	edi, DWORD PTR 84[rsp]
	xor	esi, esi
	call	USETW@PLT
	mov	edi, DWORD PTR 80[rsp]
	mov	esi, DWORD PTR UVISOR_GET_PALM_INFORMATION_LEN[rip]
	call	USETW@PLT
	mov	eax, DWORD PTR USB_DEFAULT_TIMEOUT[rip]
	xor	esi, esi
	mov	rdi, rbp
	lea	rcx, 48[rsp]
	lea	rdx, 80[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 1208
	mov	r8d, DWORD PTR USB_SHORT_XFER_OK[rip]
	push	rax
	.cfi_def_cfa_offset 1216
	lea	r9, 24[rsp]
	call	usbd_do_request_flags@PLT
	pop	rdx
	.cfi_def_cfa_offset 1208
	pop	rcx
	.cfi_def_cfa_offset 1200
	test	rax, rax
	jne	.L1
	cmp	QWORD PTR 8[rsp], 11
	jle	.L24
	cmp	QWORD PTR 64[rsp], 0
	mov	rax, QWORD PTR 56[rsp]
	je	.L6
	mov	eax, DWORD PTR 8[rax]
	mov	edx, eax
	sar	eax, 4
	and	edx, 15
	mov	DWORD PTR 4[r12], eax
	mov	eax, DWORD PTR [rbx]
	mov	DWORD PTR [r12], edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 4[rax]
	and	eax, 15
	mov	DWORD PTR [r12], eax
	mov	DWORD PTR 4[r12], eax
	mov	eax, DWORD PTR [rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, .LC1[rip]
	call	DPRINTF@PLT
	mov	rax, QWORD PTR USB_ERR_INVAL[rip]
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	uvisor_init, .-uvisor_init
	.comm	UVISOR_REQUEST_BYTES_AVAILABLE,8,8
	.comm	UVISOR_MAX_CONN,8,8
	.comm	UVISOR_GET_PALM_INFORMATION_LEN,4,4
	.comm	UVISOR_GET_PALM_INFORMATION,8,8
	.comm	UVISOR_GET_CONNECTION_INFORMATION,8,8
	.comm	UVISOR_FLAG_VISOR,4,4
	.comm	UVISOR_FLAG_PALM4,4,4
	.comm	UVISOR_FLAG_PALM35,4,4
	.comm	UVISOR_CONNECTION_INFO_SIZE,4,4
	.comm	UT_READ_VENDOR_ENDPOINT,8,8
	.comm	UT_READ_DEVICE,8,8
	.comm	UT_READ,8,8
	.comm	USB_SHORT_XFER_OK,4,4
	.comm	USB_ERR_INVAL,8,8
	.comm	USB_DEFAULT_TIMEOUT,4,4
	.comm	UR_GET_INTERFACE,8,8
	.comm	UR_GET_CONFIG,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_uvisor.c_uvisor_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"getting connection info\012\000"
	.align	2
.LC1:
	.ascii	"too little data\012\000"
	.align	2
.LC2:
	.ascii	"done\012\000"
	.align	2
.LC3:
	.ascii	"getting config info\012\000"
	.align	2
.LC4:
	.ascii	"get the interface number\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	uvisor_init, %function
uvisor_init:
	@ args = 0, pretend = 0, frame = 1080
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r0
	ldr	r0, .L25
	ldr	r3, [r5]
	ldr	r0, [r0]
	mov	r7, r2
	sub	sp, sp, #1088
	ldr	r2, .L25+4
	sub	sp, sp, #12
	tst	r3, r0
	mov	r6, r1
	ldr	r2, [r2]
	str	r2, [sp, #1092]
	mov	r2,#0
	bne	.L21
	ldr	r2, .L25+8
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L22
.L4:
	ldr	r2, .L25+12
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L7
.L8:
	ldr	r0, .L25+16
	bl	DPRINTF
	mov	r4, #0
.L3:
.L1:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [sp, #1092]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r4
	add	sp, sp, #1088
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	ldr	r0, .L25+20
	bl	DPRINTF
	ldr	r2, .L25+24
	ldr	r3, .L25+28
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, #0
	ldr	r0, [sp, #56]
	str	r2, [sp, #64]
	str	r3, [sp, #60]
	bl	USETW
	mov	r1, #0
	ldr	r0, [sp, #52]
	bl	USETW
	mov	r1, #1
	ldr	r0, [sp, #48]
	bl	USETW
	mov	r1, #0
	mov	r0, r6
	add	r3, sp, #68
	add	r2, sp, #48
	bl	usbd_do_request
	subs	r4, r0, #0
	bne	.L1
	ldr	r0, .L25+32
	bl	DPRINTF
	ldr	r2, .L25+36
	ldr	r3, .L25+40
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, r4
	ldr	r0, [sp, #56]
	str	r2, [sp, #64]
	str	r3, [sp, #60]
	bl	USETW
	mov	r1, r4
	ldr	r0, [sp, #52]
	bl	USETW
	mov	r1, #1
	ldr	r0, [sp, #48]
	bl	USETW
	mov	r1, r4
	mov	r0, r6
	add	r3, sp, #68
	add	r2, sp, #48
	bl	usbd_do_request
	subs	r4, r0, #0
	beq	.L8
	b	.L1
.L21:
	ldr	r0, .L25+44
	bl	DPRINTF
	ldr	r2, .L25+48
	ldr	r3, .L25+52
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, #0
	ldr	r0, [sp, #56]
	str	r2, [sp, #64]
	str	r3, [sp, #60]
	bl	USETW
	mov	r1, #0
	ldr	r0, [sp, #52]
	bl	USETW
	ldr	r3, .L25+56
	ldr	r0, [sp, #48]
	ldr	r1, [r3]
	bl	USETW
	ldr	r2, .L25+60
	ldr	r3, .L25+64
	ldr	r1, [r2]
	ldr	r2, [r3]
	add	r3, sp, #20
	stm	sp, {r2, r3}
	str	r1, [sp, #8]
	mov	r0, r6
	mov	r1, #0
	add	r3, sp, #24
	add	r2, sp, #48
	bl	usbd_do_request_flags
	subs	r4, r0, #0
	bne	.L1
	ldr	r2, .L25+8
	ldr	r3, [r5]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L4
.L22:
	ldr	r2, .L25+48
	ldr	r3, .L25+68
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, #0
	ldr	r0, [sp, #56]
	str	r2, [sp, #64]
	str	r3, [sp, #60]
	bl	USETW
	mov	r1, #0
	ldr	r0, [sp, #52]
	bl	USETW
	ldr	r3, .L25+72
	ldr	r0, [sp, #48]
	ldr	r1, [r3]
	bl	USETW
	ldr	r2, .L25+60
	ldr	r3, .L25+64
	ldr	r1, [r2]
	ldr	r2, [r3]
	add	r3, sp, #20
	stm	sp, {r2, r3}
	str	r1, [sp, #8]
	mov	r0, r6
	mov	r1, #0
	add	r3, sp, #36
	add	r2, sp, #48
	bl	usbd_do_request_flags
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, [sp, #20]
	cmp	r3, #11
	ble	.L24
	ldr	r2, [sp, #44]
	ldr	r3, [sp, #40]
	cmp	r2, #0
	ldrne	r2, [r3, #8]
	ldreq	r2, [r3, #4]
	andne	r1, r2, #15
	andeq	r2, r2, #15
	asrne	r2, r2, #4
	ldreq	r3, [r5]
	ldrne	r3, [r5]
	streq	r2, [r7]
	stmne	r7, {r1, r2}
	streq	r2, [r7, #4]
	b	.L4
.L24:
	ldr	r0, .L25+76
	bl	DPRINTF
	ldr	r3, .L25+80
	ldr	r4, [r3]
	b	.L1
.L23:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	UVISOR_FLAG_VISOR
	.word	.LC5
	.word	UVISOR_FLAG_PALM4
	.word	UVISOR_FLAG_PALM35
	.word	.LC2
	.word	.LC3
	.word	UT_READ
	.word	UR_GET_CONFIG
	.word	.LC4
	.word	UT_READ_DEVICE
	.word	UR_GET_INTERFACE
	.word	.LC0
	.word	UT_READ_VENDOR_ENDPOINT
	.word	UVISOR_GET_CONNECTION_INFORMATION
	.word	UVISOR_CONNECTION_INFO_SIZE
	.word	USB_DEFAULT_TIMEOUT
	.word	USB_SHORT_XFER_OK
	.word	UVISOR_GET_PALM_INFORMATION
	.word	UVISOR_GET_PALM_INFORMATION_LEN
	.word	.LC1
	.word	USB_ERR_INVAL
	.size	uvisor_init, .-uvisor_init
	.comm	UVISOR_REQUEST_BYTES_AVAILABLE,4,4
	.comm	UVISOR_MAX_CONN,4,4
	.comm	UVISOR_GET_PALM_INFORMATION_LEN,4,4
	.comm	UVISOR_GET_PALM_INFORMATION,4,4
	.comm	UVISOR_GET_CONNECTION_INFORMATION,4,4
	.comm	UVISOR_FLAG_VISOR,4,4
	.comm	UVISOR_FLAG_PALM4,4,4
	.comm	UVISOR_FLAG_PALM35,4,4
	.comm	UVISOR_CONNECTION_INFO_SIZE,4,4
	.comm	UT_READ_VENDOR_ENDPOINT,4,4
	.comm	UT_READ_DEVICE,4,4
	.comm	UT_READ,4,4
	.comm	USB_SHORT_XFER_OK,4,4
	.comm	USB_ERR_INVAL,4,4
	.comm	USB_DEFAULT_TIMEOUT,4,4
	.comm	UR_GET_INTERFACE,4,4
	.comm	UR_GET_CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
