	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_send_outbound
_cuda_send_outbound:                    ## @cuda_send_outbound
	.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, %rbx
	addq	$56, %rdi
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtx_assert
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	_STAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movq	(%rax), %rdx
	incq	%rdx
	movq	%rdx, 48(%rbx)
	movq	16(%rbx), %rdi
	movq	%rax, %rsi
	addq	$8, %rsi
	callq	_memcpy
	movq	$0, 40(%rbx)
	movq	_pkt_q@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_STAILQ_REMOVE_HEAD
	leaq	28(%rbx), %rdi
	movl	(%r12), %edx
	movq	%r14, %rsi
	callq	_STAILQ_INSERT_TAIL
	movl	$1, (%rbx)
	movl	24(%rbx), %edi
	callq	_cuda_poll
	movl	$150, %edi
	callq	_DELAY
	movq	8(%rbx), %rax
	movq	_CUDA_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_cuda_intr_state
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_CUDA_OUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_cuda_out
	movq	_vSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_cuda_write_reg
	movq	%rbx, %rdi
	callq	_cuda_ack_off
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cuda_tip                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_pkt_q,4,2                      ## @pkt_q
	.comm	_CUDA_IDLE,8,3                  ## @CUDA_IDLE
	.comm	_CUDA_OUT,8,3                   ## @CUDA_OUT
	.comm	_vSR,4,2                        ## @vSR
	.no_dead_strip	_cuda_send_outbound
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cuda_send_outbound
_cuda_send_outbound:                    ; @cuda_send_outbound
	.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
	add	x0, x0, #56
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mtx_assert
	add	x21, x19, #32
	mov	x0, x21
	bl	_STAILQ_FIRST
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x1, x0
	ldr	x8, [x1], #8
	add	x2, x8, #1
	str	x2, [x19, #48]
	ldr	x0, [x19, #16]
	bl	_memcpy
	str	xzr, [x19, #40]
Lloh3:
	adrp	x22, _pkt_q@GOTPAGE
Lloh4:
	ldr	x22, [x22, _pkt_q@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_STAILQ_REMOVE_HEAD
	add	x0, x19, #28
	ldr	w2, [x22]
	mov	x1, x20
	bl	_STAILQ_INSERT_TAIL
	mov	w8, #1
	str	w8, [x19]
	ldr	w0, [x19, #24]
	bl	_cuda_poll
	mov	w0, #150
	bl	_DELAY
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _CUDA_IDLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CUDA_IDLE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_cuda_intr_state
	cbz	w0, LBB0_4
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
LBB0_4:
Lloh8:
	adrp	x8, _CUDA_OUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CUDA_OUT@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_cuda_out
Lloh11:
	adrp	x8, _vSR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _vSR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cuda_write_reg
	mov	x0, x19
	bl	_cuda_ack_off
	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	_cuda_tip
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_pkt_q,4,2                      ; @pkt_q
	.comm	_CUDA_IDLE,8,3                  ; @CUDA_IDLE
	.comm	_CUDA_OUT,8,3                   ; @CUDA_OUT
	.comm	_vSR,4,2                        ; @vSR
	.no_dead_strip	_cuda_send_outbound
.subsections_via_symbols
