	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_clear_halt              ## -- Begin function libusb_clear_halt
	.p2align	4, 0x90
_libusb_clear_halt:                     ## @libusb_clear_halt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %rbx
	xorl	%edx, %edx
	callq	_libusb10_get_transfer
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_libusb_get_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_CTX_LOCK
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%r13d, %ecx
	callq	_libusb20_tr_open
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_CTX_UNLOCK
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.3:
	movq	_LIBUSB20_ERROR_BUSY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_8
## %bb.4:
	movq	_LIBUSB_ERROR_OTHER@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	callq	_libusb20_tr_clear_stall_sync
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.9:
	movl	(%r15), %edi
	callq	_CTX_LOCK
	movq	%r12, %rdi
	callq	_libusb20_tr_close
	movl	(%r15), %edi
	callq	_CTX_UNLOCK
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB20_ERROR_BUSY,4,2        ## @LIBUSB20_ERROR_BUSY
	.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_clear_halt              ; -- Begin function libusb_clear_halt
	.p2align	2
_libusb_clear_halt:                     ; @libusb_clear_halt
	.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	x21, x1
	mov	x20, x0
	mov	w2, #0
	bl	_libusb10_get_transfer
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_libusb_get_device
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	w0, [x0]
	bl	_CTX_LOCK
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	x3, x21
	bl	_libusb20_tr_open
	mov	x21, x0
	ldr	w0, [x20]
	bl	_CTX_UNLOCK
	cbz	w21, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _LIBUSB20_ERROR_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBUSB20_ERROR_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _LIBUSB_ERROR_OTHER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIBUSB_ERROR_OTHER@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_libusb20_tr_clear_stall_sync
	cbnz	w21, LBB0_8
; %bb.7:
	ldr	w0, [x20]
	bl	_CTX_LOCK
	mov	x0, x19
	bl	_libusb20_tr_close
	ldr	w0, [x20]
	bl	_CTX_UNLOCK
LBB0_8:
	mov	w0, #0
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB20_ERROR_BUSY,4,2        ; @LIBUSB20_ERROR_BUSY
	.comm	_LIBUSB_ERROR_OTHER,4,2         ; @LIBUSB_ERROR_OTHER
.subsections_via_symbols
