	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function golombset_encode
_golombset_encode:                      ## @golombset_encode
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	-1(%rcx), %rax
	movq	%rax, -80(%rbp)
	movq	(%r8), %rax
	addq	%rcx, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -64(%rbp)
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	xorl	%edx, %edx
	leaq	-80(%rbp), %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addq	(%rbx,%r12,8), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_golombset_encode_value
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx,%r12,8), %rdx
	notq	%rdx
	incq	%r12
	cmpq	%r12, %r13
	jne	LBB0_3
## %bb.6:
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	xorl	%edx, %edx
LBB0_7:
	subq	%rcx, %rdx
	incq	%rdx
	movq	%rdx, (%r8)
	jmp	LBB0_8
LBB0_4:
	movl	$-1, %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_golombset_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function golombset_encode
_golombset_encode:                      ; @golombset_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x4
	mov	x20, x3
	sub	x8, x3, #1
	ldr	x9, [x4]
	add	x9, x3, x9
	stp	x8, x9, [sp, #8]
	str	xzr, [sp, #24]
	cbz	x2, LBB0_5
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x8, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	add	x2, x9, x8
	add	x0, sp, #8
	mov	x1, x23
	bl	_golombset_encode_value
	cbnz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22], #8
	mvn	x8, x8
	subs	x21, x21, #1
	b.ne	LBB0_2
; %bb.4:
	ldr	x8, [sp, #24]
	b	LBB0_6
LBB0_5:
	mov	x8, #0
LBB0_6:
	mov	w0, #0
	sub	x8, x8, x20
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_golombset_encode
.subsections_via_symbols
