	.file	"extr_golombset.h_golombset_encode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	golombset_encode, @function
golombset_encode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR 8[rsp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	rax, -1[rcx]
	mov	QWORD PTR 32[rsp], 0
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR [r8]
	add	rax, rcx
	mov	QWORD PTR 24[rsp], rax
	test	rdx, rdx
	je	.L6
	mov	r12d, edi
	mov	r15, rsi
	mov	rbp, rdx
	xor	eax, eax
	xor	ebx, ebx
	lea	r13, 16[rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR [r15+rbx*8]
	add	rbx, 1
	add	rax, 1
	cmp	rbp, rbx
	je	.L11
.L4:
	mov	rdx, QWORD PTR [r15+rbx*8]
	mov	esi, r12d
	mov	rdi, r13
	sub	rdx, rax
	call	golombset_encode_value@PLT
	test	rax, rax
	je	.L12
	mov	eax, -1
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR 32[rsp]
	add	rax, 1
.L2:
	mov	rcx, QWORD PTR 8[rsp]
	sub	rax, r14
	mov	QWORD PTR [rcx], rax
	xor	eax, eax
	jmp	.L1
.L6:
	mov	eax, 1
	jmp	.L2
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	golombset_encode, .-golombset_encode
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_golombset.h_golombset_encode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	golombset_encode, %function
golombset_encode:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r7, r3
	mov	ip, #0
	sub	sp, sp, #20
	ldr	r8, [sp, #48]
	mov	r9, r0
	ldr	r3, [r8]
	ldr	r0, .L14
	subs	r6, r2, #0
	add	r3, r7, r3
	sub	r2, r7, #1
	ldr	r0, [r0]
	str	r0, [sp, #12]
	mov	r0,#0
	stm	sp, {r2, r3, ip}
	beq	.L6
	mov	r5, ip
	sub	r4, r1, #4
	b	.L4
.L12:
	ldr	ip, [r4]
	add	r5, r5, #1
	cmp	r6, r5
	add	ip, ip, #1
	beq	.L11
.L4:
	ldr	r2, [r4, #4]!
	mov	r1, r9
	mov	r0, sp
	sub	r2, r2, ip
	bl	golombset_encode_value
	cmp	r0, #0
	beq	.L12
	mvn	r0, #0
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L11:
	ldr	r3, [sp, #8]
	add	r3, r3, #1
.L2:
	sub	r7, r3, r7
	mov	r0, #0
	str	r7, [r8]
	b	.L1
.L6:
	mov	r3, #1
	b	.L2
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.size	golombset_encode, .-golombset_encode
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
