	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_reset_device            ## -- Begin function libusb_reset_device
	.p2align	4, 0x90
_libusb_reset_device:                   ## @libusb_reset_device
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_libusb_get_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_libusb10_cancel_all_transfer
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	callq	_libusb10_remove_pollfd
	movq	%r14, %rdi
	callq	_libusb20_dev_reset
	movl	%eax, %r15d
	movl	4(%rbx), %r12d
	movq	%r14, %rdi
	callq	_libusb20_dev_get_fd
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	movq	_POLLOUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rcx), %r8d
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r8d
	movq	_POLLWRNORM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r8d
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_libusb10_add_pollfd
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.3:
	movq	_LIBUSB_ERROR_OTHER@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
	.comm	_LIBUSB_ERROR_OTHER,4,2         ## @LIBUSB_ERROR_OTHER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_reset_device            ; -- Begin function libusb_reset_device
	.p2align	2
_libusb_reset_device:                   ; @libusb_reset_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_libusb_get_device
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	bl	_libusb10_cancel_all_transfer
	ldr	w0, [x20, #4]
	mov	x1, x20
	bl	_libusb10_remove_pollfd
	mov	x0, x19
	bl	_libusb20_dev_reset
	mov	x21, x0
	ldr	w22, [x20, #4]
	mov	x0, x19
	bl	_libusb20_dev_get_fd
	mov	x3, x0
Lloh0:
	adrp	x8, _POLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _POLLOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _POLLOUT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _POLLWRNORM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _POLLWRNORM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w4, w8, w9
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_libusb10_add_pollfd
Lloh12:
	adrp	x8, _LIBUSB_ERROR_OTHER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LIBUSB_ERROR_OTHER@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w0, wzr, w8, eq
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
	.comm	_LIBUSB_ERROR_OTHER,4,2         ; @LIBUSB_ERROR_OTHER
.subsections_via_symbols
