	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_maint_get_message         ## -- Begin function diva_maint_get_message
	.p2align	4, 0x90
_diva_maint_get_message:                ## @diva_maint_get_message
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_dbg_q_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rdx
	callq	_diva_os_enter_spin_lock
	movq	_dbg_q_busy@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
LBB0_4:
	movq	_dbg_q_lock@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_diva_os_leave_spin_lock
	jmp	LBB0_5
LBB0_2:
	movl	$1, (%r15)
	movq	_dbg_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_queuePeekMsg
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$0, (%r15)
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_dbg_q_lock,4,2                 ## @dbg_q_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read"

	.comm	_dbg_q_busy,4,2                 ## @dbg_q_busy
L_.str.1:                               ## @.str.1
	.asciz	"read_busy"

	.comm	_dbg_queue,4,2                  ## @dbg_queue
L_.str.2:                               ## @.str.2
	.asciz	"read_empty"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_maint_get_message         ; -- Begin function diva_maint_get_message
	.p2align	2
_diva_maint_get_message:                ; @diva_maint_get_message
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _dbg_q_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _dbg_q_lock@GOTPAGEOFF]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_diva_os_enter_spin_lock
Lloh4:
	adrp	x21, _dbg_q_busy@GOTPAGE
Lloh5:
	ldr	x21, [x21, _dbg_q_busy@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, #0
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_2:
Lloh8:
	adrp	x0, _dbg_q_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _dbg_q_lock@GOTPAGEOFF]
	mov	x1, x19
	bl	_diva_os_leave_spin_lock
	b	LBB0_4
LBB0_3:
	mov	w8, #1
	str	w8, [x21]
Lloh10:
	adrp	x8, _dbg_queue@GOTPAGE
Lloh11:
	ldr	x8, [x8, _dbg_queue@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_queuePeekMsg
	mov	x20, x0
	cbz	x0, LBB0_5
LBB0_4:
	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
	ret
LBB0_5:
	str	wzr, [x21]
Lloh13:
	adrp	x2, l_.str.2@PAGE
Lloh14:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_dbg_q_lock,4,2                 ; @dbg_q_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read"

	.comm	_dbg_q_busy,4,2                 ; @dbg_q_busy
l_.str.1:                               ; @.str.1
	.asciz	"read_busy"

	.comm	_dbg_queue,4,2                  ; @dbg_queue
l_.str.2:                               ; @.str.2
	.asciz	"read_empty"

.subsections_via_symbols
