	.file	"18887392.c"
	.intel_syntax noprefix
	.text
	.globl	g_fd
	.bss
	.align 4
	.type	g_fd, @object
	.size	g_fd, 4
g_fd:
	.zero	4
	.section	.rodata
.LC0:
	.string	"failure: %s: %d %s\n"
	.text
	.globl	bitch
	.type	bitch, @function
bitch:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rbx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bitch, .-bitch
	.section	.rodata
.LC1:
	.string	"%s: cb=%d\n"
.LC2:
	.string	"\n"
.LC3:
	.string	""
.LC4:
	.string	"%s%0*x %04x:"
.LC5:
	.string	"-%02x"
.LC6:
	.string	" %02x"
.LC7:
	.string	"   "
	.text
	.globl	hex
	.type	hex, @function
hex:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -12[rbp], 16
	jmp	.L4
.L21:
	mov	rdx, QWORD PTR -8[rbp]
	cmp	DWORD PTR -24[rbp], 0
	je	.L5
	lea	rax, .LC2[rip]
	jmp	.L6
.L5:
	lea	rax, .LC3[rip]
.L6:
	mov	ecx, DWORD PTR -24[rbp]
	mov	r8d, ecx
	mov	rcx, rdx
	mov	edx, 16
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L7
.L13:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	ecx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, ecx
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jle	.L8
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 7
	test	eax, eax
	jne	.L9
	cmp	DWORD PTR -20[rbp], 0
	je	.L9
	lea	rax, .LC5[rip]
	jmp	.L11
.L9:
	lea	rax, .LC6[rip]
	jmp	.L11
.L8:
	lea	rax, .LC7[rip]
.L11:
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L7:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jge	.L14
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jg	.L13
	jmp	.L14
.L15:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L14:
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	cmp	DWORD PTR -12[rbp], eax
	jg	.L15
	mov	edi, 32
	call	putchar@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L16
.L20:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -25[rbp], al
	mov	rdx, QWORD PTR stdout[rip]
	cmp	BYTE PTR -25[rbp], 126
	ja	.L17
	cmp	BYTE PTR -25[rbp], 31
	jbe	.L17
	movzx	eax, BYTE PTR -25[rbp]
	jmp	.L18
.L17:
	mov	eax, 46
.L18:
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	add	DWORD PTR -20[rbp], 1
.L16:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jge	.L19
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jg	.L20
.L19:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	add	DWORD PTR -24[rbp], eax
.L4:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jg	.L21
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	hex, .-hex
	.section	.rodata
	.align 8
.LC8:
	.string	"doioctl: %s: iCmd=%#x errno=%d %s\n"
.LC9:
	.string	"doioctl: %s: iCmd=%#x ok\n"
	.text
	.globl	doioctl
	.type	doioctl, @function
doioctl:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
.L24:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -36[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR g_fd[rip]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L24
.L23:
	cmp	DWORD PTR -20[rbp], 0
	je	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	r8, rbx
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L26
.L25:
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L26:
	mov	eax, DWORD PTR -20[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	doioctl, .-doioctl
	.globl	dobulk
	.type	dobulk, @function
dobulk:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	QWORD PTR -80[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	DWORD PTR -24[rbp], 1000
	mov	rax, QWORD PTR -72[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -80[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, -1072147198
	call	doioctl
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	js	.L29
	mov	eax, DWORD PTR -36[rbp]
	jmp	.L31
.L29:
	mov	eax, -1
.L31:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dobulk, .-dobulk
	.section	.rodata
.LC10:
	.string	"send_bulk"
	.text
	.globl	send_bulk
	.type	send_bulk, @function
send_bulk:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	lea	rcx, .LC10[rip]
	mov	edi, eax
	call	dobulk
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	send_bulk, .-send_bulk
	.section	.rodata
.LC11:
	.string	"recv_bulk"
.LC12:
	.string	"cb=%d\n"
	.text
	.globl	recv_bulk
	.type	recv_bulk, @function
recv_bulk:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	eax, DWORD PTR -20[rbp]
	or	al, -128
	mov	edi, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, .LC11[rip]
	mov	rsi, rax
	call	dobulk
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jle	.L36
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L36:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	recv_bulk, .-recv_bulk
	.section	.rodata
.LC13:
	.string	"rc=%d CtrlMsg.wLength=%d\n"
	.text
	.globl	doctrl
	.type	doctrl, @function
doctrl:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	eax, ecx
	mov	ecx, r8d
	mov	QWORD PTR -80[rbp], r9
	mov	BYTE PTR -52[rbp], dil
	mov	BYTE PTR -56[rbp], sil
	mov	WORD PTR -60[rbp], dx
	mov	WORD PTR -64[rbp], ax
	mov	eax, ecx
	mov	WORD PTR -68[rbp], ax
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	movzx	eax, BYTE PTR -52[rbp]
	mov	BYTE PTR -32[rbp], al
	movzx	eax, BYTE PTR -56[rbp]
	mov	BYTE PTR -31[rbp], al
	movzx	eax, WORD PTR -60[rbp]
	mov	WORD PTR -30[rbp], ax
	movzx	eax, WORD PTR -68[rbp]
	mov	WORD PTR -26[rbp], ax
	mov	DWORD PTR -24[rbp], 1000
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, -1072147200
	call	doioctl
	mov	DWORD PTR -36[rbp], eax
	movzx	eax, WORD PTR -26[rbp]
	movzx	edx, ax
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -36[rbp], 0
	js	.L39
	mov	eax, DWORD PTR -36[rbp]
	jmp	.L41
.L39:
	mov	eax, -1
.L41:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	doctrl, .-doctrl
	.section	.rodata
.LC14:
	.string	"claim_if"
	.text
	.type	claim_if, @function
claim_if:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rax, -4[rbp]
	lea	rdx, .LC14[rip]
	mov	rsi, rax
	mov	edi, -2147199729
	call	doioctl
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	claim_if, .-claim_if
	.section	.rodata
.LC15:
	.string	"set_connected"
	.text
	.type	usb_set_connected, @function
usb_set_connected:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	je	.L46
	mov	eax, 21783
	jmp	.L47
.L46:
	mov	eax, 21782
.L47:
	mov	DWORD PTR -28[rbp], eax
	mov	QWORD PTR -24[rbp], 0
	lea	rax, -32[rbp]
	lea	rdx, .LC15[rip]
	mov	rsi, rax
	mov	edi, -1072671470
	call	doioctl
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L49
	call	__stack_chk_fail@PLT
.L49:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	usb_set_connected, .-usb_set_connected
	.section	.rodata
.LC16:
	.string	"set_config"
	.text
	.type	set_config, @function
set_config:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rax, -4[rbp]
	lea	rdx, .LC16[rip]
	mov	rsi, rax
	mov	edi, -2147199739
	call	doioctl
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	set_config, .-set_config
	.section	.rodata
.LC17:
	.string	"set_interface"
	.text
	.type	set_interface, @function
set_interface:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -12[rbp], eax
	lea	rax, -16[rbp]
	lea	rdx, .LC17[rip]
	mov	rsi, rax
	mov	edi, -2146937596
	call	doioctl
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	set_interface, .-set_interface
	.section	.rodata
.LC18:
	.string	"reset_ep"
	.text
	.type	reset_ep, @function
reset_ep:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rax, -4[rbp]
	lea	rdx, .LC18[rip]
	mov	rsi, rax
	mov	edi, -2147199741
	call	doioctl
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	reset_ep, .-reset_ep
	.section	.rodata
.LC19:
	.string	"i=%d\n"
.LC20:
	.string	"USBC"
.LC21:
	.string	"intquery req"
.LC22:
	.string	"inquiry result"
.LC23:
	.string	"inquiry sense?"
	.text
	.type	msd, @function
msd:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 544
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -540[rbp], 1
	mov	DWORD PTR -536[rbp], 1
	mov	DWORD PTR -544[rbp], 0
	jmp	.L58
.L61:
	mov	eax, DWORD PTR -544[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -528[rbp]
	mov	edx, 4
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	memcpy@PLT
	lea	rax, -528[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], 305334660
	mov	BYTE PTR -520[rbp], 36
	mov	BYTE PTR -516[rbp], -128
	mov	BYTE PTR -514[rbp], 6
	mov	BYTE PTR -513[rbp], 18
	mov	BYTE PTR -509[rbp], 36
	lea	rax, -528[rbp]
	lea	rdx, .LC21[rip]
	mov	esi, 31
	mov	rdi, rax
	call	hex
	mov	eax, DWORD PTR -536[rbp]
	lea	rcx, -528[rbp]
	mov	edx, 31
	mov	rsi, rcx
	mov	edi, eax
	call	send_bulk
	test	eax, eax
	js	.L63
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -540[rbp]
	lea	rcx, -528[rbp]
	mov	edx, 36
	mov	rsi, rcx
	mov	edi, eax
	call	recv_bulk
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	movsx	rcx, eax
	lea	rax, -528[rbp]
	lea	rdx, .LC22[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	hex
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -540[rbp]
	lea	rcx, -528[rbp]
	mov	edx, 36
	mov	rsi, rcx
	mov	edi, eax
	call	recv_bulk
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	movsx	rcx, eax
	lea	rax, -528[rbp]
	lea	rdx, .LC23[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	hex
	mov	edi, 150000
	call	usleep@PLT
	add	DWORD PTR -544[rbp], 1
.L58:
	cmp	DWORD PTR -544[rbp], 2
	jle	.L61
	jmp	.L57
.L63:
	nop
.L57:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	msd, .-msd
	.section	.rodata
.LC24:
	.string	"resetting..."
.LC25:
	.string	"reset"
	.text
	.globl	reset
	.type	reset, @function
reset:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	lea	rdi, .LC24[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	lea	rdx, .LC25[rip]
	mov	rsi, rax
	mov	edi, 21780
	call	doioctl
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L66
	call	__stack_chk_fail@PLT
.L66:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	reset, .-reset
	.section	.rodata
.LC26:
	.string	"open"
	.text
	.globl	main
	.type	main, @function
main:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR g_fd[rip], eax
	mov	eax, DWORD PTR g_fd[rip]
	test	eax, eax
	jns	.L68
	lea	rdi, .LC26[rip]
	call	bitch
	jmp	.L69
.L68:
	call	reset
	mov	esi, 1
	mov	edi, 0
	call	usb_set_connected
	mov	edi, 0
	call	claim_if
	mov	esi, 0
	mov	edi, 0
	call	set_interface
	mov	eax, 0
	call	msd
	mov	eax, 0
.L69:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"18887392.c"
	.text
	.comm	g_fd,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"failure: %s: %d %s\012\000"
	.text
	.align	2
	.global	bitch
	.syntax unified
	.arm
	.fpu softvfp
	.type	bitch, %function
bitch:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r4
	ldr	r1, [fp, #-16]
	ldr	r0, .L3
	bl	printf
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	bitch, .-bitch
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s: cb=%d\012\000"
	.align	2
.LC2:
	.ascii	"\012\000"
	.align	2
.LC3:
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"%s%0*x %04x:\000"
	.align	2
.LC5:
	.ascii	"-%02x\000"
	.align	2
.LC6:
	.ascii	" %02x\000"
	.align	2
.LC7:
	.ascii	"   \000"
	.text
	.align	2
	.global	hex
	.syntax unified
	.arm
	.fpu softvfp
	.type	hex, %function
hex:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-40]
	ldr	r0, .L24
	bl	printf
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #16
	str	r3, [fp, #-8]
	b	.L6
.L23:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L7
	ldr	r1, .L24+4
	b	.L8
.L7:
	ldr	r1, .L24+8
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, #8
	ldr	r0, .L24+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L9
.L15:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-16]
	and	r3, r3, #7
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L24+16
	b	.L13
.L11:
	ldr	r3, .L24+20
	b	.L13
.L10:
	ldr	r3, .L24+24
.L13:
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-24]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bge	.L16
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bgt	.L15
	b	.L16
.L17:
	ldr	r0, .L24+24
	bl	printf
.L16:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bgt	.L17
	mov	r0, #32
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L18
.L22:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-25]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #126
	bhi	.L19
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #31
	bls	.L19
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	b	.L20
.L19:
	mov	r3, #46
.L20:
	ldr	r2, .L24+28
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L18:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bge	.L21
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bgt	.L22
.L21:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-20]
.L6:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L23
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stdout
	.size	hex, .-hex
	.section	.rodata
	.align	2
.LC8:
	.ascii	"doioctl: %s: iCmd=%#x errno=%d %s\012\000"
	.align	2
.LC9:
	.ascii	"doioctl: %s: iCmd=%#x ok\012\000"
	.text
	.align	2
	.global	doioctl
	.syntax unified
	.arm
	.fpu softvfp
	.type	doioctl, %function
doioctl:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
.L28:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r1, [fp, #-24]
	ldr	r2, [fp, #-28]
	mov	r0, r3
	bl	ioctl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L27
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L28
.L27:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r4
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	ldr	r0, .L32+4
	bl	printf
	b	.L30
.L29:
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	ldr	r0, .L32+8
	bl	printf
.L30:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L33:
	.align	2
.L32:
	.word	g_fd
	.word	.LC8
	.word	.LC9
	.size	doioctl, .-doioctl
	.section	.rodata
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dobulk
	.syntax unified
	.arm
	.fpu softvfp
	.type	dobulk, %function
dobulk:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	mov	r3, #1000
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-12]
	sub	r3, fp, #24
	ldr	r2, [fp, #-44]
	mov	r1, r3
	ldr	r0, .L39+4
	bl	doioctl
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L35
	ldr	r3, [fp, #-28]
	b	.L37
.L35:
	mvn	r3, #0
.L37:
	ldr	r2, .L39
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC10
	.word	-1072671486
	.size	dobulk, .-dobulk
	.section	.rodata
	.align	2
.LC11:
	.ascii	"send_bulk\000"
	.text
	.align	2
	.global	send_bulk
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_bulk, %function
send_bulk:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L43
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	dobulk
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC11
	.size	send_bulk, .-send_bulk
	.section	.rodata
	.align	2
.LC12:
	.ascii	"recv_bulk\000"
	.align	2
.LC13:
	.ascii	"cb=%d\012\000"
	.text
	.align	2
	.global	recv_bulk
	.syntax unified
	.arm
	.fpu softvfp
	.type	recv_bulk, %function
recv_bulk:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	orr	r0, r3, #128
	ldr	r3, .L48
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	bl	dobulk
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L46
	ldr	r1, [fp, #-8]
	ldr	r0, .L48+4
	bl	printf
.L46:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC12
	.word	.LC13
	.size	recv_bulk, .-recv_bulk
	.section	.rodata
	.align	2
.LC14:
	.ascii	"rc=%d CtrlMsg.wLength=%d\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	doctrl
	.syntax unified
	.arm
	.fpu softvfp
	.type	doctrl, %function
doctrl:
	@ args = 12, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	mov	ip, r0
	mov	r0, r1
	mov	r1, r2
	mov	r2, r3
	mov	r3, ip
	strb	r3, [fp, #-29]
	mov	r3, r0
	strb	r3, [fp, #-30]
	mov	r3, r1	@ movhi
	strh	r3, [fp, #-32]	@ movhi
	mov	r3, r2	@ movhi
	strh	r3, [fp, #-34]	@ movhi
	ldr	r3, [fp, #8]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #12]
	str	r3, [fp, #-44]
	ldr	r3, .L55
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	ldrb	r3, [fp, #-29]
	strb	r3, [fp, #-24]
	ldrb	r3, [fp, #-30]
	strb	r3, [fp, #-23]
	ldrh	r3, [fp, #-32]	@ movhi
	strh	r3, [fp, #-22]	@ movhi
	ldrh	r3, [fp, #4]	@ movhi
	strh	r3, [fp, #-18]	@ movhi
	mov	r3, #1000
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-12]
	sub	r3, fp, #24
	ldr	r2, [fp, #-44]
	mov	r1, r3
	ldr	r0, .L55+4
	bl	doioctl
	str	r0, [fp, #-28]
	ldrh	r3, [fp, #-18]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, .L55+8
	bl	printf
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L51
	ldr	r3, [fp, #-28]
	b	.L53
.L51:
	mvn	r3, #0
.L53:
	ldr	r2, .L55
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L54
	bl	__stack_chk_fail
.L54:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC15
	.word	-1072671488
	.word	.LC14
	.size	doctrl, .-doctrl
	.section	.rodata
	.align	2
.LC16:
	.ascii	"claim_if\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	claim_if, %function
claim_if:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	sub	r3, fp, #8
	ldr	r2, .L59
	mov	r1, r3
	ldr	r0, .L59+4
	bl	doioctl
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	.LC16
	.word	-2147199729
	.size	claim_if, .-claim_if
	.section	.rodata
	.align	2
.LC17:
	.ascii	"set_connected\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usb_set_connected, %function
usb_set_connected:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L62
	ldr	r3, .L66+4
	b	.L63
.L62:
	ldr	r3, .L66+8
.L63:
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #20
	ldr	r2, .L66+12
	mov	r1, r3
	ldr	r0, .L66+16
	bl	doioctl
	mov	r3, r0
	ldr	r2, .L66
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L65
	bl	__stack_chk_fail
.L65:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC18
	.word	21783
	.word	21782
	.word	.LC17
	.word	-1072933614
	.size	usb_set_connected, .-usb_set_connected
	.section	.rodata
	.align	2
.LC19:
	.ascii	"set_config\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_config, %function
set_config:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	sub	r3, fp, #8
	ldr	r2, .L70
	mov	r1, r3
	ldr	r0, .L70+4
	bl	doioctl
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	.LC19
	.word	-2147199739
	.size	set_config, .-set_config
	.section	.rodata
	.align	2
.LC20:
	.ascii	"set_interface\000"
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_interface, %function
set_interface:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	ldr	r2, .L75+4
	mov	r1, r3
	ldr	r0, .L75+8
	bl	doioctl
	mov	r3, r0
	ldr	r2, .L75
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC21
	.word	.LC20
	.word	-2146937596
	.size	set_interface, .-set_interface
	.section	.rodata
	.align	2
.LC22:
	.ascii	"reset_ep\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reset_ep, %function
reset_ep:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	sub	r3, fp, #8
	ldr	r2, .L79
	mov	r1, r3
	ldr	r0, .L79+4
	bl	doioctl
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC22
	.word	-2147199741
	.size	reset_ep, .-reset_ep
	.section	.rodata
	.align	2
.LC23:
	.ascii	"i=%d\012\000"
	.align	2
.LC24:
	.ascii	"USBC\000"
	.align	2
.LC25:
	.ascii	"intquery req\000"
	.align	2
.LC26:
	.ascii	"inquiry result\000"
	.align	2
.LC27:
	.ascii	"inquiry sense?\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msd, %function
msd:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	ldr	r3, .L88
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-532]
	mov	r3, #1
	str	r3, [fp, #-528]
	mov	r3, #0
	str	r3, [fp, #-536]
	b	.L82
.L85:
	ldr	r1, [fp, #-536]
	ldr	r0, .L88+4
	bl	printf
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #520
	mov	r2, #4
	ldr	r1, .L88+8
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #520
	add	r3, r3, #4
	ldr	r2, .L88+12
	str	r2, [r3]
	mov	r3, #36
	strb	r3, [fp, #-512]
	mvn	r3, #127
	strb	r3, [fp, #-508]
	mov	r3, #6
	strb	r3, [fp, #-506]
	mov	r3, #18
	strb	r3, [fp, #-505]
	mov	r3, #36
	strb	r3, [fp, #-501]
	sub	r3, fp, #520
	ldr	r2, .L88+16
	mov	r1, #31
	mov	r0, r3
	bl	hex
	ldr	r3, [fp, #-528]
	sub	r1, fp, #520
	mov	r2, #31
	mov	r0, r3
	bl	send_bulk
	mov	r3, r0
	cmp	r3, #0
	blt	.L87
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-532]
	sub	r1, fp, #520
	mov	r2, #36
	mov	r0, r3
	bl	recv_bulk
	str	r0, [fp, #-524]
	sub	r3, fp, #520
	ldr	r2, .L88+20
	ldr	r1, [fp, #-524]
	mov	r0, r3
	bl	hex
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-532]
	sub	r1, fp, #520
	mov	r2, #36
	mov	r0, r3
	bl	recv_bulk
	str	r0, [fp, #-524]
	sub	r3, fp, #520
	ldr	r2, .L88+24
	ldr	r1, [fp, #-524]
	mov	r0, r3
	bl	hex
	ldr	r0, .L88+28
	bl	usleep
	ldr	r3, [fp, #-536]
	add	r3, r3, #1
	str	r3, [fp, #-536]
.L82:
	ldr	r3, [fp, #-536]
	cmp	r3, #2
	ble	.L85
	b	.L81
.L87:
	nop
.L81:
	ldr	r3, .L88
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L86
	bl	__stack_chk_fail
.L86:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L89:
	.align	2
.L88:
	.word	.LC28
	.word	.LC23
	.word	.LC24
	.word	305334660
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	150000
	.size	msd, .-msd
	.section	.rodata
	.align	2
.LC29:
	.ascii	"resetting...\000"
	.align	2
.LC30:
	.ascii	"reset\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	reset, %function
reset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L93
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L93+4
	bl	puts
	sub	r3, fp, #12
	ldr	r2, .L93+8
	mov	r1, r3
	ldr	r0, .L93+12
	bl	doioctl
	mov	r3, r0
	ldr	r2, .L93
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L92
	bl	__stack_chk_fail
.L92:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L94:
	.align	2
.L93:
	.word	.LC31
	.word	.LC29
	.word	.LC30
	.word	21780
	.size	reset, .-reset
	.section	.rodata
	.align	2
.LC32:
	.ascii	"open\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L98
	str	r3, [r2]
	ldr	r3, .L98
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L96
	ldr	r0, .L98+4
	bl	bitch
	mov	r3, r0
	b	.L97
.L96:
	bl	reset
	mov	r1, #1
	mov	r0, #0
	bl	usb_set_connected
	mov	r0, #0
	bl	claim_if
	mov	r1, #0
	mov	r0, #0
	bl	set_interface
	bl	msd
	mov	r3, #0
.L97:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L99:
	.align	2
.L98:
	.word	g_fd
	.word	.LC32
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
