	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libusb_get_description
_libusb_get_description:                ## @libusb_get_description
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	leaq	-40(%rbp), %rdx
	xorl	%esi, %esi
	callq	_libusb_get_config_descriptor
	testl	%eax, %eax
	je	LBB0_1
## %bb.15:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_ERR
	jmp	LBB0_14
LBB0_1:
	movq	-40(%rbp), %rdi
	movq	8(%rdi), %rax
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movl	%eax, %eax
	movq	(%rdi), %rcx
	shlq	$4, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rcx,%rdx)
	jg	LBB0_4
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	$16, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
	jmp	LBB0_13
LBB0_4:
	movq	8(%rcx,%rdx), %rax
	movl	24(%rax), %ecx
	movl	%ecx, (%r14)
	movq	16(%rax), %rcx
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.5:
	movl	%ecx, %ecx
	movq	8(%rax), %rax
	movq	_LIBUSB_TRANSFER_TYPE_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r11d
	movq	_LIBUSB_TRANSFER_TYPE_INTERRUPT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	movq	_LIBUSB_ENDPOINT_DIR_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_LIBUSB_ENDPOINT_OUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	_LIBUSB_ENDPOINT_IN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r10d
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$12, %rbx
	cmpq	%rbx, %r12
	je	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rbx), %ecx
	andl	%r11d, %ecx
	cmpl	%r15d, %ecx
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%rax,%rbx), %ecx
	movl	%r8d, %edx
	andl	%ecx, %edx
	cmpl	%r10d, %edx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ecx, 4(%r14)
	movl	8(%rax,%rbx), %esi
	movl	%esi, 16(%r14)
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%r9d, %edx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%ecx, 8(%r14)
	movl	8(%rax,%rbx), %ecx
	movl	%ecx, 12(%r14)
	jmp	LBB0_11
LBB0_13:
	callq	_libusb_free_config_descriptor
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error %d getting libusb config descriptor\n"

	.comm	_LIBUSB_TRANSFER_TYPE_MASK,4,2  ## @LIBUSB_TRANSFER_TYPE_MASK
	.comm	_LIBUSB_TRANSFER_TYPE_INTERRUPT,4,2 ## @LIBUSB_TRANSFER_TYPE_INTERRUPT
	.comm	_LIBUSB_ENDPOINT_DIR_MASK,4,2   ## @LIBUSB_ENDPOINT_DIR_MASK
	.comm	_LIBUSB_ENDPOINT_OUT,4,2        ## @LIBUSB_ENDPOINT_OUT
	.comm	_LIBUSB_ENDPOINT_IN,4,2         ## @LIBUSB_ENDPOINT_IN
	.comm	_LIBUSB_CLASS_HID,8,3           ## @LIBUSB_CLASS_HID
	.no_dead_strip	_libusb_get_description
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libusb_get_description
_libusb_get_description:                ; @libusb_get_description
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	add	x2, sp, #8
	mov	w1, #0
	bl	_libusb_get_config_descriptor
	cbz	w0, LBB0_2
; %bb.1:
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	b	LBB0_15
LBB0_2:
	ldr	x0, [sp, #8]
	ldr	x8, [x0, #8]
	cbz	w8, LBB0_14
; %bb.3:
	and	x8, x8, #0xffffffff
	ldr	x9, [x0]
	add	x9, x9, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w10, [x9, #-8]
	cmp	w10, #1
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_4
	b	LBB0_14
LBB0_6:
	ldr	x9, [x9]
	ldp	x8, x10, [x9, #16]
	str	w10, [x19]
	cbz	w8, LBB0_14
; %bb.7:
	and	x8, x8, #0xffffffff
	ldr	x14, [x9, #8]
Lloh2:
	adrp	x9, _LIBUSB_TRANSFER_TYPE_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LIBUSB_TRANSFER_TYPE_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x10, _LIBUSB_TRANSFER_TYPE_INTERRUPT@GOTPAGE
Lloh5:
	ldr	x10, [x10, _LIBUSB_TRANSFER_TYPE_INTERRUPT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _LIBUSB_ENDPOINT_DIR_MASK@GOTPAGE
Lloh9:
	ldr	x11, [x11, _LIBUSB_ENDPOINT_DIR_MASK@GOTPAGEOFF]
Lloh10:
	adrp	x12, _LIBUSB_ENDPOINT_OUT@GOTPAGE
Lloh11:
	ldr	x12, [x12, _LIBUSB_ENDPOINT_OUT@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
Lloh13:
	ldr	w12, [x12]
Lloh14:
	adrp	x13, _LIBUSB_ENDPOINT_IN@GOTPAGE
Lloh15:
	ldr	x13, [x13, _LIBUSB_ENDPOINT_IN@GOTPAGEOFF]
Lloh16:
	ldr	w13, [x13]
	add	x14, x14, #8
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x14, x14, #12
	subs	x8, x8, #1
	b.eq	LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w15, [x14, #-8]
	and	w15, w9, w15
	cmp	w15, w10
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldur	w15, [x14, #-4]
	and	w16, w11, w15
	cmp	w16, w13
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	str	w15, [x19, #4]
	ldr	w17, [x14]
	str	w17, [x19, #16]
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	cmp	w16, w12
	b.ne	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w16, [x14]
	stp	w15, w16, [x19, #8]
	b	LBB0_8
LBB0_14:
	bl	_libusb_free_config_descriptor
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error %d getting libusb config descriptor\n"

	.comm	_LIBUSB_TRANSFER_TYPE_MASK,4,2  ; @LIBUSB_TRANSFER_TYPE_MASK
	.comm	_LIBUSB_TRANSFER_TYPE_INTERRUPT,4,2 ; @LIBUSB_TRANSFER_TYPE_INTERRUPT
	.comm	_LIBUSB_ENDPOINT_DIR_MASK,4,2   ; @LIBUSB_ENDPOINT_DIR_MASK
	.comm	_LIBUSB_ENDPOINT_OUT,4,2        ; @LIBUSB_ENDPOINT_OUT
	.comm	_LIBUSB_ENDPOINT_IN,4,2         ; @LIBUSB_ENDPOINT_IN
	.comm	_LIBUSB_CLASS_HID,8,3           ; @LIBUSB_CLASS_HID
	.no_dead_strip	_libusb_get_description
.subsections_via_symbols
