	.file	"878440.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"failed to get device descriptor"
.LC1:
	.string	"%04x:%04x (bus %d, device %d)"
.LC2:
	.string	" path: %d"
.LC3:
	.string	".%d"
	.text
	.type	print_devs, @function
print_devs:
.LFB20:
	.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, 104
	.cfi_offset 3, -24
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	mov	DWORD PTR -80[rbp], 0
	jmp	.L2
.L8:
	lea	rdx, -64[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	libusb_get_device_descriptor@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	jmp	.L1
.L3:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	libusb_get_device_address@PLT
	movzx	ebx, al
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	libusb_get_bus_number@PLT
	movzx	ecx, al
	movzx	eax, WORD PTR -54[rbp]
	movzx	edx, ax
	movzx	eax, WORD PTR -56[rbp]
	movzx	eax, ax
	mov	r8d, ebx
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -32[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	rdi, rax
	call	libusb_get_port_numbers@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jle	.L5
	movzx	eax, BYTE PTR -32[rbp]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -80[rbp], 1
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	movzx	eax, BYTE PTR -32[rbp+rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -80[rbp], 1
.L6:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jl	.L7
.L5:
	mov	edi, 10
	call	putchar@PLT
.L2:
	mov	eax, DWORD PTR -84[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -84[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L8
.L1:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	print_devs, .-print_devs
	.globl	main
	.type	main, @function
main:
.LFB21:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	libusb_init@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L11
	mov	eax, DWORD PTR -28[rbp]
	jmp	.L14
.L11:
	lea	rax, -24[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	libusb_get_device_list@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jns	.L13
	mov	edi, 0
	call	libusb_exit@PLT
	mov	rax, QWORD PTR -16[rbp]
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	print_devs
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	libusb_free_device_list@PLT
	mov	edi, 0
	call	libusb_exit@PLT
	mov	eax, 0
.L14:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.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	"878440.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"failed to get device descriptor\000"
	.align	2
.LC1:
	.ascii	"%04x:%04x (bus %d, device %d)\000"
	.align	2
.LC2:
	.ascii	" path: %d\000"
	.align	2
.LC3:
	.ascii	".%d\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_devs, %function
print_devs:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #68
	str	r0, [fp, #-72]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L2
.L8:
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, [fp, #-60]
	bl	libusb_get_device_descriptor
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bge	.L3
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L10+8
	bl	fwrite
	b	.L1
.L3:
	ldrh	r3, [fp, #-44]
	mov	r4, r3
	ldrh	r3, [fp, #-42]
	mov	r5, r3
	ldr	r0, [fp, #-60]
	bl	libusb_get_bus_number
	mov	r3, r0
	mov	r6, r3
	ldr	r0, [fp, #-60]
	bl	libusb_get_device_address
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L10+12
	bl	printf
	sub	r3, fp, #32
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-60]
	bl	libusb_get_port_numbers
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	ble	.L5
	ldrb	r3, [fp, #-32]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L10+16
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-64]
	b	.L6
.L7:
	sub	r2, fp, #32
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L10+20
	bl	printf
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L6:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L7
.L5:
	mov	r0, #10
	bl	putchar
.L2:
	ldr	r3, [fp, #-68]
	add	r2, r3, #1
	str	r2, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L8
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC4
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	print_devs, .-print_devs
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	libusb_init
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L13
	ldr	r3, [fp, #-16]
	b	.L16
.L13:
	sub	r3, fp, #20
	mov	r1, r3
	mov	r0, #0
	bl	libusb_get_device_list
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L15
	mov	r0, #0
	bl	libusb_exit
	ldr	r3, [fp, #-12]
	b	.L16
.L15:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	print_devs
	ldr	r3, [fp, #-20]
	mov	r1, #1
	mov	r0, r3
	bl	libusb_free_device_list
	mov	r0, #0
	bl	libusb_exit
	mov	r3, #0
.L16:
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
