	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb20_dev_req_string_sync   ## -- Begin function libusb20_dev_req_string_sync
	.p2align	4, 0x90
_libusb20_dev_req_string_sync:          ## @libusb20_dev_req_string_sync
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r15
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	%rcx, %rdi
	xorl	%esi, %esi
	movl	%r8d, %edx
	callq	_memset
	cmpl	$3, %ebx
	jg	LBB0_2
## %bb.1:
	movq	_LIBUSB20_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_2:
	movq	_LIBUSB20_CONTROL_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_LIBUSB20_INIT
	movq	_LIBUSB20_REQUEST_TYPE_STANDARD@GOTPCREL(%rip), %rax
	movq	_LIBUSB20_RECIPIENT_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_LIBUSB20_ENDPOINT_IN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -64(%rbp)
	movq	_LIBUSB20_REQUEST_GET_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_LIBUSB20_DT_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$8, %eax
	orl	%r13d, %eax
	movl	%eax, -60(%rbp)
	movl	%r12d, -56(%rbp)
	movl	$4, -52(%rbp)
	movq	_LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_libusb20_dev_request_sync
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	$255, -52(%rbp)
	movl	$255, %eax
	cmpl	%ebx, %eax
	jle	LBB0_7
LBB0_6:
	movl	%ebx, -52(%rbp)
LBB0_7:
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	%r12d, %r9d
	callq	_libusb20_dev_request_sync
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movl	4(%r15), %eax
	movq	_LIBUSB20_DT_STRING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.9:
	movq	_LIBUSB20_ERROR_OTHER@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)
	movl	(%r13), %r12d
	cmpl	%ebx, %eax
	jg	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB20_ERROR_INVALID_PARAM,4,2 ## @LIBUSB20_ERROR_INVALID_PARAM
	.comm	_LIBUSB20_CONTROL_SETUP,4,2     ## @LIBUSB20_CONTROL_SETUP
	.comm	_LIBUSB20_REQUEST_TYPE_STANDARD,4,2 ## @LIBUSB20_REQUEST_TYPE_STANDARD
	.comm	_LIBUSB20_RECIPIENT_DEVICE,4,2  ## @LIBUSB20_RECIPIENT_DEVICE
	.comm	_LIBUSB20_ENDPOINT_IN,4,2       ## @LIBUSB20_ENDPOINT_IN
	.comm	_LIBUSB20_REQUEST_GET_DESCRIPTOR,4,2 ## @LIBUSB20_REQUEST_GET_DESCRIPTOR
	.comm	_LIBUSB20_DT_STRING,4,2         ## @LIBUSB20_DT_STRING
	.comm	_LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK,4,2 ## @LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK
	.comm	_LIBUSB20_ERROR_OTHER,4,2       ## @LIBUSB20_ERROR_OTHER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb20_dev_req_string_sync   ; -- Begin function libusb20_dev_req_string_sync
	.p2align	2
_libusb20_dev_req_string_sync:          ; @libusb20_dev_req_string_sync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	mov	x0, x3
	mov	w1, #0
	mov	x2, x4
	bl	_memset
	cmp	w21, #3
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _LIBUSB20_ERROR_INVALID_PARAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBUSB20_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_2:
Lloh3:
	adrp	x8, _LIBUSB20_CONTROL_SETUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIBUSB20_CONTROL_SETUP@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_LIBUSB20_INIT
Lloh6:
	adrp	x8, _LIBUSB20_REQUEST_TYPE_STANDARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LIBUSB20_REQUEST_TYPE_STANDARD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _LIBUSB20_RECIPIENT_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LIBUSB20_RECIPIENT_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _LIBUSB20_ENDPOINT_IN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _LIBUSB20_ENDPOINT_IN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _LIBUSB20_REQUEST_GET_DESCRIPTOR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _LIBUSB20_REQUEST_GET_DESCRIPTOR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w9, [sp, #24]
Lloh18:
	adrp	x24, _LIBUSB20_DT_STRING@GOTPAGE
Lloh19:
	ldr	x24, [x24, _LIBUSB20_DT_STRING@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w9, w23, w9, lsl #8
	stp	w8, w9, [sp, #8]
	mov	w8, #4
	stp	w22, w8, [sp, #16]
Lloh20:
	adrp	x22, _LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK@GOTPAGE
Lloh21:
	ldr	x22, [x22, _LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK@GOTPAGEOFF]
	ldr	w5, [x22]
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x19
	mov	x3, #0
	mov	w4, #1000
	bl	_libusb20_dev_request_sync
	cbz	w0, LBB0_8
; %bb.3:
	mov	w5, #0
	mov	w8, #255
	str	w8, [sp, #20]
	cmp	w8, w21
	b.le	LBB0_5
LBB0_4:
	str	w21, [sp, #20]
LBB0_5:
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x19
	mov	x3, #0
	mov	w4, #1000
	bl	_libusb20_dev_request_sync
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x19, #4]
	ldr	w9, [x24]
Lloh22:
	adrp	x10, _LIBUSB20_ERROR_OTHER@GOTPAGE
Lloh23:
	ldr	x10, [x10, _LIBUSB20_ERROR_OTHER@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	cmp	w8, w9
	csel	w0, wzr, w10, eq
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	ldr	w8, [x19]
	str	w8, [sp, #20]
	ldr	w5, [x22]
	cmp	w8, w21
	b.gt	LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB20_ERROR_INVALID_PARAM,4,2 ; @LIBUSB20_ERROR_INVALID_PARAM
	.comm	_LIBUSB20_CONTROL_SETUP,4,2     ; @LIBUSB20_CONTROL_SETUP
	.comm	_LIBUSB20_REQUEST_TYPE_STANDARD,4,2 ; @LIBUSB20_REQUEST_TYPE_STANDARD
	.comm	_LIBUSB20_RECIPIENT_DEVICE,4,2  ; @LIBUSB20_RECIPIENT_DEVICE
	.comm	_LIBUSB20_ENDPOINT_IN,4,2       ; @LIBUSB20_ENDPOINT_IN
	.comm	_LIBUSB20_REQUEST_GET_DESCRIPTOR,4,2 ; @LIBUSB20_REQUEST_GET_DESCRIPTOR
	.comm	_LIBUSB20_DT_STRING,4,2         ; @LIBUSB20_DT_STRING
	.comm	_LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK,4,2 ; @LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK
	.comm	_LIBUSB20_ERROR_OTHER,4,2       ; @LIBUSB20_ERROR_OTHER
.subsections_via_symbols
