	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucan_write_bulk_callback
_ucan_write_bulk_callback:              ## @ucan_write_bulk_callback
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movl	12(%rbx), %edi
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	movl	$4, %esi
	callq	_usb_free_coherent
	movq	(%r15), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_2
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%r14), %rdi
	callq	_netif_device_present
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_5
## %bb.4:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_warn
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r14), %rdi
	movslq	(%r14), %rax
	shlq	$3, %rax
	movq	%r15, %rsi
	subq	%rax, %rsi
	callq	_can_free_echo_skb
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%r14), %rax
	incl	(%rax)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ucan_release_context
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_err                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to transmit USB message to device: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"urb failed, failed to release context\n"

	.no_dead_strip	_ucan_write_bulk_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucan_write_bulk_callback
_ucan_write_bulk_callback:              ; @ucan_write_bulk_callback
	.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, x0
	ldr	x19, [x0, #16]
	cmp	x19, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_2
; %bb.1:
	ldp	w2, w0, [x21, #8]
	ldr	w3, [x21, #4]
	mov	w1, #4
	bl	_usb_free_coherent
	ldr	x20, [x19]
	cmp	x20, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_3
LBB0_2:
	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
LBB0_3:
	ldr	x0, [x20, #8]
	bl	_netif_device_present
	cbz	w0, LBB0_2
; %bb.4:
	ldr	w2, [x21]
	cbz	w2, LBB0_2
; %bb.5:
	ldr	x0, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_warn
	add	x21, x20, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x0, [x20, #8]
	ldrsw	x8, [x20]
	sub	x1, x19, x8, lsl #3
	bl	_can_free_echo_skb
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_ucan_release_context
	cbnz	w0, LBB0_2
; %bb.6:
	ldr	x0, [x20, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, 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	_netdev_err
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to transmit USB message to device: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"urb failed, failed to release context\n"

	.no_dead_strip	_ucan_write_bulk_callback
.subsections_via_symbols
