	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libusb10_do_transfer
_libusb10_do_transfer:                  ## @libusb10_do_transfer
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%r8, %r12
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rdi, %r13
	testq	%rdx, %rdx
	jne	LBB0_4
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_4
LBB0_1:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_19
LBB0_4:
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	callq	_libusb_alloc_transfer
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_libusb_get_device
	movq	(%rax), %r12
	movq	%r13, 48(%r15)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 40(%r15)
	movl	16(%rbp), %eax
	movl	%eax, (%r15)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r15)
	movq	%r14, 32(%r15)
	movl	%ebx, 8(%r15)
	leaq	-44(%rbp), %rax
	movq	%rax, 24(%r15)
	movq	_libusb10_do_transfer_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movl	$0, -44(%rbp)
	movq	%r15, %rdi
	callq	_libusb_submit_transfer
	testl	%eax, %eax
	js	LBB0_20
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -44(%rbp)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_libusb_handle_events
	testl	%eax, %eax
	jns	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	callq	_libusb_cancel_transfer
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_usleep
	jmp	LBB0_7
LBB0_10:
	movl	12(%r15), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	16(%r15), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_16
## %bb.11:
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	movq	_LIBUSB_ERROR_TIMEOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_5:
	movq	_LIBUSB_ERROR_NO_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_19
LBB0_20:
	movl	%eax, %ebx
	jmp	LBB0_18
LBB0_16:
	movq	_LIBUSB_ERROR_OTHER@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_LIBUSB_ERROR_PIPE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_13:
	movq	_LIBUSB_ERROR_OVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_LIBUSB_ERROR_NO_DEVICE@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %ebx
LBB0_18:
	movq	%r15, %rdi
	callq	_libusb_free_transfer
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_14
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_ERROR_NO_MEM,4,2        ## @LIBUSB_ERROR_NO_MEM
	.comm	_libusb10_do_transfer_cb,4,2    ## @libusb10_do_transfer_cb
	.comm	_LIBUSB_ERROR_TIMEOUT,4,2       ## @LIBUSB_ERROR_TIMEOUT
	.comm	_LIBUSB_ERROR_OVERFLOW,4,2      ## @LIBUSB_ERROR_OVERFLOW
	.comm	_LIBUSB_ERROR_PIPE,4,2          ## @LIBUSB_ERROR_PIPE
	.comm	_LIBUSB_ERROR_NO_DEVICE,4,2     ## @LIBUSB_ERROR_NO_DEVICE
	.comm	_LIBUSB_ERROR_OTHER,4,2         ## @LIBUSB_ERROR_OTHER
	.no_dead_strip	_libusb10_do_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libusb10_do_transfer
_libusb10_do_transfer:                  ; @libusb10_do_transfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_3
; %bb.1:
	mov	x25, x6
	mov	x24, x5
	mov	x20, x4
	mov	x23, x3
	mov	x21, x2
	mov	x26, x1
	mov	x27, x0
	cbnz	x2, LBB0_4
; %bb.2:
	cbz	w23, LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	b	LBB0_20
LBB0_4:
	mov	w0, #0
	bl	_libusb_alloc_transfer
	cbz	x0, LBB0_12
; %bb.5:
	mov	x19, x0
	mov	x0, x27
	bl	_libusb_get_device
	ldr	x22, [x0]
	str	x27, [x19, #48]
	str	w26, [x19, #40]
	stp	w25, w24, [x19]
	str	w23, [x19, #8]
	add	x8, sp, #12
	stp	x8, x21, [x19, #24]
Lloh3:
	adrp	x8, _libusb10_do_transfer_cb@GOTPAGE
Lloh4:
	ldr	x8, [x8, _libusb10_do_transfer_cb@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	str	wzr, [sp, #12]
	mov	x0, x19
	bl	_libusb_submit_transfer
	tbnz	w0, #31, LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_libusb_handle_events
	tbz	w0, #31, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_libusb_cancel_transfer
	mov	w0, #1000
	bl	_usleep
	b	LBB0_6
LBB0_9:
	ldr	w8, [x19, #12]
	str	w8, [x20]
	ldr	w8, [x19, #16]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_14
; %bb.10:
	mov	w21, #0
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
Lloh8:
	adrp	x8, _LIBUSB_ERROR_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LIBUSB_ERROR_TIMEOUT@GOTPAGEOFF]
	b	LBB0_18
LBB0_12:
Lloh10:
	adrp	x8, _LIBUSB_ERROR_NO_MEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LIBUSB_ERROR_NO_MEM@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	b	LBB0_20
LBB0_13:
	mov	x21, x0
	b	LBB0_19
LBB0_14:
Lloh13:
	adrp	x8, _LIBUSB_ERROR_OTHER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LIBUSB_ERROR_OTHER@GOTPAGEOFF]
	b	LBB0_18
LBB0_15:
Lloh15:
	adrp	x8, _LIBUSB_ERROR_PIPE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LIBUSB_ERROR_PIPE@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
Lloh17:
	adrp	x8, _LIBUSB_ERROR_OVERFLOW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LIBUSB_ERROR_OVERFLOW@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh19:
	adrp	x8, _LIBUSB_ERROR_NO_DEVICE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LIBUSB_ERROR_NO_DEVICE@GOTPAGEOFF]
LBB0_18:
	ldr	w21, [x8]
LBB0_19:
	mov	x0, x19
	bl	_libusb_free_transfer
LBB0_20:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_15-LBB0_11)>>2
	.byte	(LBB0_16-LBB0_11)>>2
	.byte	(LBB0_17-LBB0_11)>>2
	.byte	(LBB0_19-LBB0_11)>>2
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_ERROR_NO_MEM,4,2        ; @LIBUSB_ERROR_NO_MEM
	.comm	_libusb10_do_transfer_cb,4,2    ; @libusb10_do_transfer_cb
	.comm	_LIBUSB_ERROR_TIMEOUT,4,2       ; @LIBUSB_ERROR_TIMEOUT
	.comm	_LIBUSB_ERROR_OVERFLOW,4,2      ; @LIBUSB_ERROR_OVERFLOW
	.comm	_LIBUSB_ERROR_PIPE,4,2          ; @LIBUSB_ERROR_PIPE
	.comm	_LIBUSB_ERROR_NO_DEVICE,4,2     ; @LIBUSB_ERROR_NO_DEVICE
	.comm	_LIBUSB_ERROR_OTHER,4,2         ; @LIBUSB_ERROR_OTHER
	.no_dead_strip	_libusb10_do_transfer
.subsections_via_symbols
