	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotChatStateFromHandle         ## -- Begin function BotChatStateFromHandle
	.p2align	4, 0x90
_BotChatStateFromHandle:                ## @BotChatStateFromHandle
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %edx
	leaq	L_.str(%rip), %rsi
	testl	%edi, %edi
	jle	LBB0_4
## %bb.1:
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jl	LBB0_4
## %bb.2:
	movq	_botchatstates@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edx, %ecx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	_PRT_FATAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	callq	*(%rax)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CLIENTS,4,2                ## @MAX_CLIENTS
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_FATAL,4,2                  ## @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chat state handle %d out of range\n"

	.comm	_botchatstates,8,3              ## @botchatstates
L_.str.1:                               ## @.str.1
	.asciz	"invalid chat state %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotChatStateFromHandle         ; -- Begin function BotChatStateFromHandle
	.p2align	2
_BotChatStateFromHandle:                ; @BotChatStateFromHandle
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, _MAX_CLIENTS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_CLIENTS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w2
	b.lt	LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _botchatstates@GOTPAGE
Lloh6:
	ldr	x8, [x8, _botchatstates@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x0, [x8, w2, uxtw #3]
	cbz	x0, LBB0_4
; %bb.3:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
Lloh10:
	adrp	x8, _botimport@GOTPAGE
Lloh11:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _PRT_FATAL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PRT_FATAL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x9]
	blr	x8
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CLIENTS,4,2                ; @MAX_CLIENTS
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_FATAL,4,2                  ; @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chat state handle %d out of range\n"

	.comm	_botchatstates,8,3              ; @botchatstates
l_.str.1:                               ; @.str.1
	.asciz	"invalid chat state %d\n"

.subsections_via_symbols
