	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_get_string_descriptor   ## -- Begin function libusb_get_string_descriptor
	.p2align	4, 0x90
_libusb_get_string_descriptor:          ## @libusb_get_string_descriptor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rcx, %r9
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	testl	%r8d, %r8d
	jle	LBB0_3
## %bb.4:
	movl	%edx, %r10d
	cmpl	$65535, %r8d                    ## imm = 0xFFFF
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmovll	%r8d, %eax
	movb	$0, (%r9)
	movq	_LIBUSB_ENDPOINT_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_LIBUSB_REQUEST_GET_DESCRIPTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_LIBUSB_DT_STRING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$8, %ecx
	orl	%esi, %ecx
	movl	%r8d, %esi
	movl	%r10d, %r8d
	pushq	$1000                           ## imm = 0x3E8
	pushq	%rax
	callq	_libusb_control_transfer
	addq	$16, %rsp
	popq	%rbp
	retq
LBB0_3:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_ENDPOINT_IN,4,2         ## @LIBUSB_ENDPOINT_IN
	.comm	_LIBUSB_REQUEST_GET_DESCRIPTOR,4,2 ## @LIBUSB_REQUEST_GET_DESCRIPTOR
	.comm	_LIBUSB_DT_STRING,4,2           ## @LIBUSB_DT_STRING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_get_string_descriptor   ; -- Begin function libusb_get_string_descriptor
	.p2align	2
_libusb_get_string_descriptor:          ; @libusb_get_string_descriptor
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_4
; %bb.1:
	mov	x5, x3
	cbz	x3, LBB0_4
; %bb.2:
	cmp	w4, #0
	b.le	LBB0_4
; %bb.3:
	mov	x8, x2
	mov	w9, #65535
	cmp	w4, w9
	csel	w6, w4, w9, lt
	strb	wzr, [x5]
Lloh0:
	adrp	x9, _LIBUSB_ENDPOINT_IN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LIBUSB_ENDPOINT_IN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _LIBUSB_REQUEST_GET_DESCRIPTOR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _LIBUSB_REQUEST_GET_DESCRIPTOR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x10]
Lloh6:
	adrp	x10, _LIBUSB_DT_STRING@GOTPAGE
Lloh7:
	ldr	x10, [x10, _LIBUSB_DT_STRING@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w3, w1, w10, lsl #8
	mov	x1, x9
	mov	x4, x8
	mov	w7, #1000
	b	_libusb_control_transfer
LBB0_4:
Lloh9:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_ENDPOINT_IN,4,2         ; @LIBUSB_ENDPOINT_IN
	.comm	_LIBUSB_REQUEST_GET_DESCRIPTOR,4,2 ; @LIBUSB_REQUEST_GET_DESCRIPTOR
	.comm	_LIBUSB_DT_STRING,4,2           ; @LIBUSB_DT_STRING
.subsections_via_symbols
