	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_msgmgr_queue_startup
_ti_msgmgr_queue_startup:               ## @ti_msgmgr_queue_startup
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	%r15, %rdi
	callq	_dev_get_drvdata
	movq	(%r14), %rbx
	movq	(%rax), %r12
	cmpq	$0, 8(%r12)
	je	LBB0_4
## %bb.1:
	movl	12(%rbx), %edi
	callq	_readl
	movq	_SPROXY_THREAD_CTRL_DIR_MASK@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	sete	%dl
	movl	%edx, (%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ti_msgmgr_queue_get_num_messages
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	xorl	%r13d, %r13d
	cmpl	$0, (%rbx)
	jne	LBB0_10
## %bb.5:
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_ti_msgmgr_queue_rx_irq_req
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	callq	_kfree
	movl	%r14d, %r13d
	jmp	LBB0_10
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPROXY_THREAD_CTRL_DIR_MASK,4,2 ## @SPROXY_THREAD_CTRL_DIR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Cannot transmit with 0 credits!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ti_msgmgr_queue_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_msgmgr_queue_startup
_ti_msgmgr_queue_startup:               ; @ti_msgmgr_queue_startup
	.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	x8, [x0, #8]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_dev_get_drvdata
	ldr	x21, [x19]
	ldr	x22, [x0]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x21, #12]
	bl	_readl
Lloh0:
	adrp	x8, _SPROXY_THREAD_CTRL_DIR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPROXY_THREAD_CTRL_DIR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, eq
	str	w8, [x21]
	mov	x0, x22
	mov	x1, x21
	bl	_ti_msgmgr_queue_get_num_messages
	cbz	w0, LBB0_7
LBB0_2:
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.3:
	mov	w19, #0
	b	LBB0_11
LBB0_4:
	ldr	w0, [x22]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	str	w0, [x21, #4]
	cbz	w0, LBB0_9
; %bb.5:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	bl	_ti_msgmgr_queue_rx_irq_req
	mov	x19, x0
	cbz	w0, LBB0_11
; %bb.6:
	ldr	w0, [x21, #4]
	bl	_kfree
	b	LBB0_11
LBB0_7:
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.8:
	ldr	w2, [x21, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_11:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SPROXY_THREAD_CTRL_DIR_MASK,4,2 ; @SPROXY_THREAD_CTRL_DIR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Cannot transmit with 0 credits!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ti_msgmgr_queue_startup
.subsections_via_symbols
