	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tl_fetch_check
_tl_fetch_check:                        ## @tl_fetch_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_TL_IN_TYPE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movl	%edi, %edx
	testl	%edi, %edi
	js	LBB0_5
## %bb.2:
	movq	_TL_IN_REMAINING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	%edx, %r8d
	jge	LBB0_10
## %bb.3:
	movq	_TL_ERROR_SYNTAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TL_IN_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_7
LBB0_4:
	movq	_TL_ERROR_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_tl_fetch_set_error
	jmp	LBB0_8
LBB0_5:
	movq	_TL_IN_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	negl	%eax
	cmpl	%eax, %ecx
	jge	LBB0_10
## %bb.6:
	movq	_TL_ERROR_SYNTAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TL_IN_REMAINING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_7:
	addl	%ecx, %r8d
	leaq	L_.str.1(%rip), %rsi
	callq	_tl_fetch_set_error_format
LBB0_8:
	movl	$-1, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_10:
	movq	_TL_ERROR@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rax
	sbbl	%eax, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TL_IN_TYPE,4,2                 ## @TL_IN_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to read from unitialized in buffer"

	.comm	_TL_ERROR_INTERNAL,4,2          ## @TL_ERROR_INTERNAL
	.comm	_TL_IN_REMAINING,4,2            ## @TL_IN_REMAINING
	.comm	_TL_ERROR_SYNTAX,4,2            ## @TL_ERROR_SYNTAX
L_.str.1:                               ## @.str.1
	.asciz	"Trying to read %d bytes at position %d (size = %d)"

	.comm	_TL_IN_POS,4,2                  ## @TL_IN_POS
	.comm	_TL_ERROR,8,3                   ## @TL_ERROR
	.no_dead_strip	_tl_fetch_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tl_fetch_check
_tl_fetch_check:                        ; @tl_fetch_check
	.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
Lloh0:
	adrp	x8, _TL_IN_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TL_IN_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x2, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _TL_IN_REMAINING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TL_IN_REMAINING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_9
; %bb.3:
Lloh6:
	adrp	x9, _TL_ERROR_SYNTAX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TL_ERROR_SYNTAX@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x9]
Lloh9:
	adrp	x9, _TL_IN_POS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TL_IN_POS@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	add	w4, w3, w8
	b	LBB0_7
LBB0_4:
Lloh12:
	adrp	x8, _TL_ERROR_INTERNAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TL_ERROR_INTERNAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tl_fetch_set_error
	b	LBB0_8
LBB0_5:
Lloh17:
	adrp	x8, _TL_IN_POS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TL_IN_POS@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	neg	w8, w2
	cmp	w3, w8
	b.ge	LBB0_9
; %bb.6:
Lloh20:
	adrp	x8, _TL_ERROR_SYNTAX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TL_ERROR_SYNTAX@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _TL_IN_REMAINING@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TL_IN_REMAINING@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	add	w4, w8, w3
LBB0_7:
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_tl_fetch_set_error_format
LBB0_8:
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh28:
	adrp	x8, _TL_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TL_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	x8, #0
	csetm	w0, ne
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_TL_IN_TYPE,4,2                 ; @TL_IN_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to read from unitialized in buffer"

	.comm	_TL_ERROR_INTERNAL,4,2          ; @TL_ERROR_INTERNAL
	.comm	_TL_IN_REMAINING,4,2            ; @TL_IN_REMAINING
	.comm	_TL_ERROR_SYNTAX,4,2            ; @TL_ERROR_SYNTAX
l_.str.1:                               ; @.str.1
	.asciz	"Trying to read %d bytes at position %d (size = %d)"

	.comm	_TL_IN_POS,4,2                  ; @TL_IN_POS
	.comm	_TL_ERROR,8,3                   ; @TL_ERROR
	.no_dead_strip	_tl_fetch_check
.subsections_via_symbols
