	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_golomb_encode_list             ## -- Begin function golomb_encode_list
	.p2align	4, 0x90
_golomb_encode_list:                    ## @golomb_encode_list
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	testl	%esi, %esi
	setg	%dil
	callq	_assert
	cmpl	$2, %r13d
	jl	LBB0_10
## %bb.1:
	movl	$1, %ecx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	addl	%ecx, %ecx
	incl	%eax
	cmpl	%r13d, %ecx
	jl	LBB0_2
## %bb.3:
	movb	$0, (%r14)
	leal	-1(%rbx), %edx
	leal	-2(%rax), %ecx
	movl	$128, %r12d
	cmpl	$-1, %ecx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	jl	LBB0_11
## %bb.4:
	movl	$128, %r12d
	xorl	%ecx, %ecx
	movq	%r14, %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	sarl	%r12d
	testl	%eax, %eax
	jle	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	decl	%eax
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	btl	%eax, %edx
	jb	LBB0_9
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movb	$0, 1(%r15)
	incq	%r15
	movl	$128, %r12d
	xorl	%ecx, %ecx
	btl	%eax, %edx
	jae	LBB0_5
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	addb	%r12b, %cl
	movb	%cl, (%r15)
	jmp	LBB0_5
LBB0_10:
	movb	$0, (%r14)
	leal	-1(%rbx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$128, %r12d
LBB0_11:
	movq	%r14, %r15
LBB0_12:
	movl	%r13d, %edi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %esi
	callq	_compute_golomb_parameter
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_16
## %bb.13:
	movl	$31, %esi
	movl	$1, %edi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	addl	%edi, %edi
	decl	%esi
	cmpl	%ebx, %edi
	jle	LBB0_14
## %bb.15:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_17
	jmp	LBB0_39
LBB0_16:
	movl	$1, %edi
	movl	$31, %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_39
LBB0_17:
	subl	%ebx, %edi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %r13d
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leal	-1(%rdx), %eax
	addq	$4, %rcx
	cmpl	$2, %edx
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jl	LBB0_39
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
                                        ##     Child Loop BB0_35 Depth 2
	movl	%r13d, %r14d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %eax
	movl	%eax, %r13d
	subl	%eax, %r14d
	xorl	%edi, %edi
	testl	%r14d, %r14d
	setg	%dil
	callq	_assert
	leal	-1(%r14), %eax
	cmpl	%ebx, %r14d
	jle	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_24 Depth=2
	movb	$-128, 1(%r15)
	incq	%r15
	movl	$64, %r12d
LBB0_23:                                ##   in Loop: Header=BB0_24 Depth=2
	subl	%ebx, %eax
	cmpl	%ebx, %eax
	jl	LBB0_27
LBB0_24:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	addb	%r12b, (%r15)
	sarl	%r12d
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edi                 ## 4-byte Reload
LBB0_27:                                ##   in Loop: Header=BB0_20 Depth=1
	testl	%r12d, %r12d
	je	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_20 Depth=1
	sarl	%r12d
	cmpl	%edi, %eax
	jge	LBB0_31
LBB0_29:                                ##   in Loop: Header=BB0_20 Depth=1
	leal	2(,%rax,4), %eax
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_20 Depth=1
	movb	$0, 1(%r15)
	incq	%r15
	movl	$64, %r12d
	cmpl	%edi, %eax
	jl	LBB0_29
LBB0_31:                                ##   in Loop: Header=BB0_20 Depth=1
	addl	%edi, %eax
	addl	%eax, %eax
	incl	%eax
LBB0_32:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%esi, %ecx
	shll	%cl, %eax
	cmpl	$-2147483648, %eax              ## imm = 0x80000000
	je	LBB0_18
## %bb.33:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_35
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_35 Depth=2
	movb	$0, 1(%r15)
	incq	%r15
	movl	$128, %r12d
	testl	%eax, %eax
	js	LBB0_38
LBB0_34:                                ##   in Loop: Header=BB0_35 Depth=2
	addl	%eax, %eax
	sarl	%r12d
	cmpl	$-2147483648, %eax              ## imm = 0x80000000
	je	LBB0_19
LBB0_35:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%r12d, %r12d
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=2
	testl	%eax, %eax
	jns	LBB0_34
LBB0_38:                                ##   in Loop: Header=BB0_35 Depth=2
	addb	%r12b, (%r15)
	jmp	LBB0_34
LBB0_39:
	xorl	%ebx, %ebx
	cmpl	$128, %r12d
	setne	%bl
	addl	%r15d, %ebx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	subl	%edi, %ebx
	movslq	-52(%rbp), %rax                 ## 4-byte Folded Reload
	shlq	$2, %rax
	subq	%rax, %rcx
	addq	$-4, %rcx
                                        ## kill: def $edi killed $edi killed $rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	callq	_golomb_decode_list
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_golomb_encode_list             ; -- Begin function golomb_encode_list
	.p2align	2
_golomb_encode_list:                    ; @golomb_encode_list
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x28, x0
	cmp	w1, #0
	cset	w0, gt
	bl	_assert
	cmp	w19, #2
	b.lt	LBB0_10
; %bb.1:
	mov	w8, #0
	mov	w9, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w9, w9, #1
	add	w8, w8, #1
	cmp	w9, w19
	b.lt	LBB0_2
; %bb.3:
	strb	wzr, [x20]
	sub	w24, w22, #1
	sub	w9, w8, #2
	cmn	w9, #1
	b.lt	LBB0_11
; %bb.4:
	mov	w9, #0
	mov	w26, #128
	mov	x25, x20
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	asr	w26, w26, #1
	cmp	w8, #0
	b.le	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #1
	cbz	w26, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsr	w10, w24, w8
	tbnz	w10, #0, LBB0_9
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w9, #0
	strb	wzr, [x25, #1]!
	mov	w26, #128
	lsr	w10, w24, w8
	tbz	w10, #0, LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w9, w26
	strb	w9, [x25]
	b	LBB0_5
LBB0_10:
	strb	wzr, [x20]
	sub	w24, w22, #1
LBB0_11:
	mov	w26, #128
	mov	x25, x20
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	bl	_compute_golomb_parameter
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.13:
	mov	w27, #31
	mov	w8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	lsl	w8, w8, #1
	sub	w27, w27, #1
	cmp	w8, w23
	b.le	LBB0_14
	b	LBB0_16
LBB0_15:
	mov	w8, #1
	mov	w27, #31
LBB0_16:
	cmp	w22, #1
	str	w19, [sp, #24]                  ; 4-byte Folded Spill
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	str	w24, [sp, #12]                  ; 4-byte Folded Spill
	b.lt	LBB0_34
; %bb.17:
	sub	w8, w8, w23
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	add	w24, w19, #1
	mov	w20, #128
	mov	w19, #-2147483648
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	cmp	w22, #2
	mov	x22, x9
	b.lt	LBB0_34
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_29 Depth 2
	mov	x8, x24
	ldr	w24, [x28], #4
	sub	w21, w8, w24
	cmp	w21, #0
	cset	w0, gt
	bl	_assert
	sub	w8, w21, #1
	cmp	w21, w23
	b.gt	LBB0_24
LBB0_20:                                ;   in Loop: Header=BB0_19 Depth=1
	cbz	w26, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	asr	w26, w26, #1
	b	LBB0_27
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=2
	strb	w20, [x25, #1]!
	mov	w26, #64
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	sub	w8, w8, w23
	cmp	w8, w23
	b.lt	LBB0_20
LBB0_24:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	w26, LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	ldrb	w9, [x25]
	add	w9, w9, w26
	strb	w9, [x25]
	asr	w26, w26, #1
	b	LBB0_23
LBB0_26:                                ;   in Loop: Header=BB0_19 Depth=1
	strb	wzr, [x25, #1]!
	mov	w26, #64
LBB0_27:                                ;   in Loop: Header=BB0_19 Depth=1
	sub	w9, w22, #1
	ldr	w12, [sp, #28]                  ; 4-byte Folded Reload
	add	w10, w8, w12
	mov	w11, #1
	bfi	w11, w10, #1, #31
	mov	w10, #2
	bfi	w10, w8, #2, #30
	cmp	w8, w12
	csel	w8, w11, w10, ge
	lsl	w8, w8, w27
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=2
	lsl	w8, w8, #1
	asr	w26, w26, #1
LBB0_29:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w8, w19
	b.eq	LBB0_18
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=2
	cbz	w26, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=2
	tbz	w8, #31, LBB0_28
	b	LBB0_33
LBB0_32:                                ;   in Loop: Header=BB0_29 Depth=2
	strb	wzr, [x25, #1]!
	mov	w26, #128
	tbz	w8, #31, LBB0_28
LBB0_33:                                ;   in Loop: Header=BB0_29 Depth=2
	ldrb	w10, [x25]
	add	w10, w10, w26
	strb	w10, [x25]
	b	LBB0_28
LBB0_34:
	cmp	w26, #128
	cinc	w8, w25, ne
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	sub	w22, w8, w0
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	sub	x8, x28, w8, sxtw #2
	sub	x3, x8, #4
                                        ; kill: def $w0 killed $w0 killed $x0
	ldr	w1, [sp, #24]                   ; 4-byte Folded Reload
	mov	x2, x22
	bl	_golomb_decode_list
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
