	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotQueueConsoleMessage         ## -- Begin function BotQueueConsoleMessage
	.p2align	4, 0x90
_BotQueueConsoleMessage:                ## @BotQueueConsoleMessage
	.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	%rdx, %r15
	movl	%esi, %r12d
	callq	_BotChatStateFromHandle
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_AllocConsoleMessage
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	movl	(%r14), %eax
	leal	1(%rax), %ecx
	cmpl	$8192, %eax                     ## imm = 0x2000
	movl	$1, %eax
	cmovbl	%ecx, %eax
	movl	%eax, (%r14)
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	callq	_AAS_Time
	movl	%eax, 28(%rbx)
	movl	%r12d, 4(%rbx)
	movl	24(%rbx), %edi
	movq	_MAX_MESSAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_strncpy
	movq	$0, 16(%rbx)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rcx
	addq	$16, %rcx
	movq	%rbx, 16(%rax)
	jmp	LBB0_5
LBB0_7:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PRT_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_4:
	movq	%rbx, 16(%r14)
	movq	%r14, %rcx
	addq	$8, %rcx
LBB0_5:
	movq	%rbx, (%rcx)
	movq	%rax, 8(%rbx)
	incl	4(%r14)
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_ERROR,4,2                  ## @PRT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"empty console message heap\n"

	.comm	_MAX_MESSAGE_SIZE,4,2           ## @MAX_MESSAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotQueueConsoleMessage         ; -- Begin function BotQueueConsoleMessage
	.p2align	2
_BotQueueConsoleMessage:                ; @BotQueueConsoleMessage
	.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, x2
	mov	x22, x1
	bl	_BotChatStateFromHandle
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	bl	_AllocConsoleMessage
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	w8, [x19]
	lsr	w9, w8, #13
	cmp	w9, #0
	mov	w9, #1
	csinc	w8, w9, w8, ne
	str	w8, [x19]
	str	w8, [x0]
	bl	_AAS_Time
	str	w0, [x20, #28]
	str	w22, [x20, #4]
	ldr	w0, [x20, #24]
Lloh0:
	adrp	x8, _MAX_MESSAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_MESSAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_strncpy
	str	xzr, [x20, #16]
	mov	x9, x19
	ldr	x8, [x9, #16]!
	cbz	x8, LBB0_5
; %bb.3:
	str	x20, [x8, #16]
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _botimport@GOTPAGE
Lloh4:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh5:
	adrp	x9, _PRT_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PRT_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	x2, [x8]
Lloh8:
	ldr	w0, [x9]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@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
	br	x2
LBB0_5:
	str	x20, [x19, #16]
	add	x9, x19, #8
LBB0_6:
	str	x20, [x9]
	str	x8, [x20, #8]
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
LBB0_7:
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_ERROR,4,2                  ; @PRT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"empty console message heap\n"

	.comm	_MAX_MESSAGE_SIZE,4,2           ; @MAX_MESSAGE_SIZE
.subsections_via_symbols
