	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msg_submit
_msg_submit:                            ## @msg_submit
	.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	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.1:
	cmpq	$0, 32(%rbx)
	je	LBB0_2
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testl	%r15d, %r15d
	jne	LBB0_10
	jmp	LBB0_9
LBB0_2:
	movl	4(%rbx), %eax
	xorl	%edx, %edx
	subl	%ecx, %eax
	jae	LBB0_4
## %bb.3:
	movq	_MBOX_TX_QUEUE_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_4:
	addl	%edx, %eax
	movq	48(%rbx), %rcx
	movq	(%rcx,%rax,8), %r15
	movq	40(%rbx), %rdi
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rsi
	callq	*%rax
LBB0_6:
	movq	16(%rbx), %rax
	movq	8(%rax), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_7
## %bb.11:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_7:
	movq	%r15, 32(%rbx)
	decl	(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_9:
	movq	_TXDONE_BY_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_10
## %bb.12:
	movq	16(%rbx), %rdi
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hrtimer_start                  ## TAILCALL
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MBOX_TX_QUEUE_LEN,4,2          ## @MBOX_TX_QUEUE_LEN
	.comm	_TXDONE_BY_POLL,4,2             ## @TXDONE_BY_POLL
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.no_dead_strip	_msg_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msg_submit
_msg_submit:                            ; @msg_submit
	.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
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	cbnz	w21, LBB0_10
	b	LBB0_8
LBB0_3:
	ldr	w9, [x19, #4]
Lloh3:
	adrp	x10, _MBOX_TX_QUEUE_LEN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MBOX_TX_QUEUE_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	subs	w8, w9, w8
	csel	w9, w10, wzr, lo
	add	w8, w8, w9
	ldp	x0, x9, [x19, #40]
	ldr	x21, [x9, w8, uxtw #3]
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x1, x21
	blr	x8
LBB0_5:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x20
	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	_spin_unlock_irqrestore
LBB0_7:
	str	x21, [x19, #32]
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_8:
	ldr	w8, [x19, #8]
Lloh6:
	adrp	x9, _TXDONE_BY_POLL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TXDONE_BY_POLL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	x0, [x19, #16]
Lloh9:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	w1, #0
	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	_hrtimer_start
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MBOX_TX_QUEUE_LEN,4,2          ; @MBOX_TX_QUEUE_LEN
	.comm	_TXDONE_BY_POLL,4,2             ; @TXDONE_BY_POLL
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.no_dead_strip	_msg_submit
.subsections_via_symbols
