	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_submit_transfer         ## -- Begin function libusb_submit_transfer
	.p2align	4, 0x90
_libusb_submit_transfer:                ## @libusb_submit_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
	pushq	%rax
	.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_6
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.2:
	movl	8(%rbx), %r15d
	callq	_libusb_get_device
	movq	%rax, %r14
	movl	8(%rax), %edi
	movq	_LIBUSB_DEBUG_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_DPRINTF
	movl	8(%r14), %edi
	callq	_CTX_LOCK
	movq	(%rbx), %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_libusb10_get_transfer
	movq	%rax, %r12
	movq	(%rbx), %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_libusb10_get_transfer
	testq	%r12, %r12
	je	LBB0_7
## %bb.3:
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	cmpq	$0, -56(%rbx)
	je	LBB0_11
LBB0_5:
	movq	_LIBUSB_ERROR_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_10
LBB0_7:
	movq	_LIBUSB_ERROR_OTHER@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
LBB0_9:
	movq	_LIBUSB_DEBUG_FUNCTION@GOTPCREL(%rip), %r15
	movl	8(%r14), %edi
	callq	_CTX_UNLOCK
	movl	8(%r14), %edi
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DPRINTF
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	-64(%rbx), %rax
	movq	%r12, %rdi
	movq	%rax, %r12
	callq	_libusb20_tr_get_priv_sc1
	cmpq	%r12, %rax
	je	LBB0_5
## %bb.12:
	movq	%r13, %rdi
	callq	_libusb20_tr_get_priv_sc1
	cmpq	%r12, %rax
	je	LBB0_5
## %bb.13:
	cmpq	$0, (%r14)
	je	LBB0_15
## %bb.14:
	movq	_LIBUSB_ERROR_NO_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_15:
	movq	_LIBUSB_SUPER_XFER_ST_PEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbx)
	movq	%r14, %rdi
	addq	$12, %rdi
	movq	_entry@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	(%rbx), %rdi
	movl	%r15d, %esi
	callq	_libusb10_submit_transfer_sub
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_DEBUG_FUNCTION,4,2      ## @LIBUSB_DEBUG_FUNCTION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"libusb_submit_transfer enter"

	.comm	_LIBUSB_ERROR_OTHER,4,2         ## @LIBUSB_ERROR_OTHER
	.comm	_LIBUSB_ERROR_BUSY,4,2          ## @LIBUSB_ERROR_BUSY
	.comm	_LIBUSB_ERROR_NO_DEVICE,4,2     ## @LIBUSB_ERROR_NO_DEVICE
	.comm	_LIBUSB_SUPER_XFER_ST_PEND,4,2  ## @LIBUSB_SUPER_XFER_ST_PEND
	.comm	_entry,4,2                      ## @entry
L_.str.1:                               ## @.str.1
	.asciz	"libusb_submit_transfer leave %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_submit_transfer         ; -- Begin function libusb_submit_transfer
	.p2align	2
_libusb_submit_transfer:                ; @libusb_submit_transfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w21, [x20, #8]
	bl	_libusb_get_device
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x25, _LIBUSB_DEBUG_FUNCTION@GOTPAGE
Lloh1:
	ldr	x25, [x25, _LIBUSB_DEBUG_FUNCTION@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_DPRINTF
	ldr	w0, [x19, #8]
	bl	_CTX_LOCK
	ldr	x0, [x20]
	mov	x1, x21
	mov	w2, #0
	bl	_libusb10_get_transfer
	mov	x24, x0
	ldr	x0, [x20]
	mov	x1, x21
	mov	w2, #1
	bl	_libusb10_get_transfer
	cbz	x24, LBB0_7
; %bb.3:
	mov	x23, x0
	cbz	x0, LBB0_7
; %bb.4:
	ldur	x8, [x20, #-56]
	cbz	x8, LBB0_11
LBB0_5:
Lloh4:
	adrp	x8, _LIBUSB_ERROR_BUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LIBUSB_ERROR_BUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _LIBUSB_ERROR_OTHER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LIBUSB_ERROR_OTHER@GOTPAGEOFF]
LBB0_8:
	ldr	w20, [x8]
LBB0_9:
	ldr	w0, [x19, #8]
	bl	_CTX_UNLOCK
	ldr	w0, [x19, #8]
	ldr	w1, [x25]
	str	x20, [sp]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_DPRINTF
LBB0_10:
	mov	x0, x20
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	sub	x22, x20, #64
	mov	x0, x24
	bl	_libusb20_tr_get_priv_sc1
	cmp	x0, x22
	b.eq	LBB0_5
; %bb.12:
	mov	x0, x23
	bl	_libusb20_tr_get_priv_sc1
	cmp	x0, x22
	b.eq	LBB0_5
; %bb.13:
	ldr	x8, [x19]
	cbz	x8, LBB0_15
; %bb.14:
Lloh13:
	adrp	x8, _LIBUSB_ERROR_NO_DEVICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LIBUSB_ERROR_NO_DEVICE@GOTPAGEOFF]
	b	LBB0_8
LBB0_15:
Lloh15:
	adrp	x8, _LIBUSB_SUPER_XFER_ST_PEND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LIBUSB_SUPER_XFER_ST_PEND@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	stur	w8, [x20, #-64]
	add	x0, x19, #12
Lloh18:
	adrp	x8, _entry@GOTPAGE
Lloh19:
	ldr	x8, [x8, _entry@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_TAILQ_INSERT_TAIL
	ldr	x0, [x20]
	mov	x1, x21
	bl	_libusb10_submit_transfer_sub
	mov	w20, #0
	b	LBB0_9
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_DEBUG_FUNCTION,4,2      ; @LIBUSB_DEBUG_FUNCTION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"libusb_submit_transfer enter"

	.comm	_LIBUSB_ERROR_OTHER,4,2         ; @LIBUSB_ERROR_OTHER
	.comm	_LIBUSB_ERROR_BUSY,4,2          ; @LIBUSB_ERROR_BUSY
	.comm	_LIBUSB_ERROR_NO_DEVICE,4,2     ; @LIBUSB_ERROR_NO_DEVICE
	.comm	_LIBUSB_SUPER_XFER_ST_PEND,4,2  ; @LIBUSB_SUPER_XFER_ST_PEND
	.comm	_entry,4,2                      ; @entry
l_.str.1:                               ; @.str.1
	.asciz	"libusb_submit_transfer leave %d"

.subsections_via_symbols
