	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ezusb_ctx_complete
_ezusb_ctx_complete:                    ## @ezusb_ctx_complete
	.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
	movq	16(%rdi), %r15
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	leaq	12(%r14), %rdi
	callq	_list_del_init
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_ezusb_req_queue_run
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
LBB0_2:
	movl	(%r14), %ebx
	addl	$-128, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	$4, %ebx
	ja	LBB0_7
## %bb.3:
	movl	8(%r14), %eax
	movq	_EZUSB_RID_TX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.4:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	cmpl	$132, (%r14)
	setne	%al
	incl	(%rdi,%rax,4)
	callq	_netif_wake_queue
	jmp	LBB0_6
LBB0_7:
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_6:
	leaq	4(%r14), %rdi
	callq	_ezusb_complete_all
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ezusb_request_context_put      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EZUSB_RID_TX,4,2               ## @EZUSB_RID_TX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Called, CTX not terminating, but device gone"

L_.str.1:                               ## @.str.1
	.asciz	"Called, CTX not in terminating state."

	.no_dead_strip	_ezusb_ctx_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ezusb_ctx_complete
_ezusb_ctx_complete:                    ; @ezusb_ctx_complete
	.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
	ldr	x20, [x0, #16]
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	add	x0, x19, #12
	bl	_list_del_init
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_ezusb_req_queue_run
	mov	x0, x21
	bl	_spin_lock_irqsave
LBB0_2:
	ldr	w8, [x19]
	sub	w22, w8, #128
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cmp	w22, #4
	b.hi	LBB0_6
; %bb.3:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _EZUSB_RID_TX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EZUSB_RID_TX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w8, [x19]
	cmp	w8, #132
	cset	w8, ne
	lsl	x8, x8, #2
	ldr	w9, [x0, x8]
	add	w9, w9, #1
	str	w9, [x0, x8]
	bl	_netif_wake_queue
	b	LBB0_9
LBB0_6:
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.7:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	b	_err
LBB0_8:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_9:
	add	x0, x19, #4
	bl	_ezusb_complete_all
	mov	x0, x19
	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
	b	_ezusb_request_context_put
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EZUSB_RID_TX,4,2               ; @EZUSB_RID_TX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Called, CTX not terminating, but device gone"

l_.str.1:                               ; @.str.1
	.asciz	"Called, CTX not in terminating state."

	.no_dead_strip	_ezusb_ctx_complete
.subsections_via_symbols
