	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encode_varint                  ## -- Begin function encode_varint
	.p2align	4, 0x90
_encode_varint:                         ## @encode_varint
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	%edi, %eax
	andb	$127, %al
	movb	%al, -17(%rbp)
	movl	$15, %ecx
	cmpl	$128, %edi
	jb	LBB0_3
## %bb.1:
	movl	$15, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	sarl	$7, %edi
	decl	%edi
	movl	%edi, %eax
	orb	$-128, %al
	decl	%ecx
	movb	%al, -32(%rbp,%rcx)
	cmpl	$127, %edi
	ja	LBB0_2
LBB0_3:
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.5:
	movl	%ecx, %eax
	addq	%rbp, %rax
	addq	$-32, %rax
	movl	$16, %ebx
	subl	%ecx, %ebx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	jmp	LBB0_6
LBB0_4:
	movl	$16, %ebx
	subl	%ecx, %ebx
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encode_varint                  ; -- Begin function encode_varint
	.p2align	2
_encode_varint:                         ; @encode_varint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	and	w8, w0, #0x7f
	strb	w8, [sp, #23]
	mov	w9, #15
	cmp	w0, #128
	b.lo	LBB0_3
; %bb.1:
	add	x8, sp, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w0, #7
	sub	w0, w10, #1
	orr	w10, w0, #0x80
	sub	w9, w9, #1
	strb	w10, [x8, w9, uxtw]
	cmp	w0, #127
	b.hi	LBB0_2
LBB0_3:
	cbz	x1, LBB0_5
; %bb.4:
	add	x8, sp, #8
	add	x8, x8, w9, uxtw
	mov	w10, #16
	sub	w19, w10, w9
	mov	x0, x1
	mov	x1, x8
	mov	x2, x19
	bl	_memcpy
	b	LBB0_6
LBB0_5:
	mov	w8, #16
	sub	w19, w8, w9
LBB0_6:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
