	.file	"extr_maccub.c_golomb_encode_list.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	golomb_encode_list
	.type	golomb_encode_list, @function
golomb_encode_list:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	mov	ebx, edx
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR 32[rsp], rdi
	xor	edi, edi
	test	esi, esi
	setg	dil
	mov	DWORD PTR 16[rsp], edx
	mov	QWORD PTR 40[rsp], rcx
	call	assert@PLT
	lea	eax, -1[r15]
	mov	DWORD PTR 20[rsp], eax
	cmp	ebx, 1
	jle	.L2
	mov	edx, 1
	mov	eax, -1
	.p2align 4,,10
	.p2align 3
.L3:
	add	edx, edx
	add	eax, 1
	cmp	DWORD PTR 16[rsp], edx
	jg	.L3
	mov	rcx, QWORD PTR 40[rsp]
	mov	r14d, 128
	mov	BYTE PTR [rcx], 0
	mov	rbx, rcx
.L6:
	mov	edx, DWORD PTR 20[rsp]
	bt	edx, eax
	jnc	.L8
.L52:
	add	BYTE PTR [rbx], r14b
.L8:
	sub	eax, 1
	sar	r14d
	cmp	eax, -1
	je	.L5
.L9:
	test	r14d, r14d
	jne	.L6
	mov	edx, DWORD PTR 20[rsp]
	mov	BYTE PTR 1[rbx], 0
	add	rbx, 1
	mov	r14d, 128
	bt	edx, eax
	jc	.L52
	sub	eax, 1
	sar	r14d
	cmp	eax, -1
	jne	.L9
.L5:
	mov	edi, DWORD PTR 16[rsp]
	mov	esi, r15d
	mov	ebp, 1
	mov	r13d, 31
	call	compute_golomb_parameter@PLT
	mov	r12d, eax
	test	eax, eax
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	add	ebp, ebp
	sub	r13d, 1
	cmp	r12d, ebp
	jge	.L11
.L10:
	mov	eax, DWORD PTR 16[rsp]
	sub	ebp, r12d
	mov	DWORD PTR 12[rsp], ebp
	lea	ebp, 1[rax]
	test	r15d, r15d
	jle	.L12
	mov	eax, DWORD PTR 20[rsp]
	mov	r15, QWORD PTR 32[rsp]
	lea	rax, 4[r15+rax*4]
	mov	QWORD PTR 24[rsp], rax
	.p2align 4,,10
	.p2align 3
.L28:
	mov	eax, ebp
	mov	ebp, DWORD PTR [r15]
	add	r15, 4
	sub	eax, ebp
	test	eax, eax
	mov	DWORD PTR 8[rsp], eax
	setg	dil
	movzx	edi, dil
	call	assert@PLT
	mov	esi, DWORD PTR 8[rsp]
	lea	eax, -1[rsi]
	cmp	r12d, eax
	jle	.L17
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	mov	BYTE PTR 1[rbx], -128
	lea	r11, 2[rbx]
	cmp	eax, r12d
	jl	.L32
	mov	rbx, rsi
	mov	edi, -64
	sub	eax, r12d
	mov	r14d, 32
	mov	BYTE PTR [rbx], dil
	cmp	r12d, eax
	jg	.L18
.L17:
	sub	eax, r12d
	lea	rsi, 1[rbx]
	test	r14d, r14d
	je	.L14
	movzx	edi, BYTE PTR [rbx]
	mov	r11, rsi
	add	edi, r14d
	sar	r14d
	mov	BYTE PTR [rbx], dil
	cmp	r12d, eax
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	test	r14d, r14d
	jne	.L53
.L19:
	mov	BYTE PTR 1[rbx], 0
	lea	rdi, 1[r11]
	mov	rbx, r11
	mov	r14d, 64
.L20:
	cmp	DWORD PTR 12[rsp], eax
	jle	.L21
	lea	eax, 2[0+rax*4]
	mov	ecx, r13d
	sal	eax, cl
.L49:
	cmp	eax, -2147483648
	je	.L54
	.p2align 4,,10
	.p2align 3
.L27:
	lea	rsi, 1[rbx]
	test	r14d, r14d
	je	.L24
	mov	rdi, rsi
	mov	esi, r14d
	sar	r14d
.L25:
	test	eax, eax
	js	.L55
	add	eax, eax
.L56:
	cmp	eax, -2147483648
	jne	.L27
.L54:
	cmp	r15, QWORD PTR 24[rsp]
	jne	.L28
	mov	rcx, QWORD PTR 32[rsp]
	mov	eax, DWORD PTR 20[rsp]
	lea	rax, 4[rcx+rax*4]
	mov	QWORD PTR 32[rsp], rax
.L29:
	mov	rbx, rdi
.L30:
	movsx	rax, DWORD PTR 20[rsp]
	mov	rdi, QWORD PTR 40[rsp]
	mov	r14, QWORD PTR 32[rsp]
	mov	esi, DWORD PTR 16[rsp]
	sal	rax, 2
	sub	rbx, rdi
	sub	r14, rax
	mov	edx, ebx
	lea	rcx, -4[r14]
	call	golomb_decode_list@PLT
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, ebx
	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
.L55:
	.cfi_restore_state
	add	BYTE PTR [rbx], sil
	add	eax, eax
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L24:
	mov	BYTE PTR 1[rbx], 0
	lea	rdi, 2[rbx]
	mov	r14d, 64
	mov	rbx, rsi
	mov	esi, 128
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L21:
	add	eax, DWORD PTR 12[rsp]
	mov	ecx, r13d
	lea	eax, 1[rax+rax]
	sal	eax, cl
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L32:
	mov	r14d, 32
.L16:
	mov	rdi, r11
	mov	rbx, rsi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L13:
	lea	r11, 1[rbx]
	test	r14d, r14d
	je	.L19
.L53:
	sar	r14d
	mov	rsi, rbx
	jmp	.L16
.L12:
	cmp	r14d, 128
	je	.L30
	lea	rdi, 1[rbx]
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 40[rsp]
	mov	r14d, 128
	mov	BYTE PTR [rax], 0
	mov	rbx, rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	golomb_encode_list, .-golomb_encode_list
	.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_maccub.c_golomb_encode_list.c"
	.text
	.align	2
	.global	golomb_encode_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	golomb_encode_list, %function
golomb_encode_list:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #36
	mov	r5, r2
	mov	r4, r1
	str	r2, [sp, #20]
	mov	r2, r0
	cmp	r1, #0
	movle	r0, #0
	movgt	r0, #1
	str	r3, [sp, #28]
	str	r1, [sp, #24]
	str	r2, [sp, #16]
	bl	assert
	sub	r3, r4, #1
	cmp	r5, #1
	str	r3, [sp, #8]
	ble	.L2
	mov	r1, r5
	mov	r2, #1
	mvn	r3, #0
.L3:
	lsl	r2, r2, #1
	cmp	r1, r2
	add	r3, r3, #1
	bgt	.L3
	mov	r2, #0
	ldr	r1, [sp, #28]
	mov	r5, #128
	mov	r4, r1
	strb	r2, [r1]
	b	.L6
.L9:
	cmp	r5, #0
	strbeq	r5, [r4, #1]
	moveq	r5, #128
	addeq	r4, r4, #1
.L6:
	ldr	r2, [sp, #8]
	asr	r2, r2, r3
	tst	r2, #1
	ldrbne	r2, [r4]	@ zero_extendqisi2
	sub	r3, r3, #1
	addne	r2, r2, r5
	strbne	r2, [r4]
	cmn	r3, #1
	asr	r5, r5, #1
	bne	.L9
.L5:
	ldr	r1, [sp, #24]
	ldr	r0, [sp, #20]
	bl	compute_golomb_parameter
	subs	r6, r0, #0
	mov	r7, #1
	mov	fp, #31
	ble	.L10
.L11:
	lsl	r7, r7, #1
	cmp	r6, r7
	sub	fp, fp, #1
	bge	.L11
.L10:
	sub	r3, r7, r6
	ldr	r10, [sp, #24]
	str	r3, [sp, #4]
	ldr	r3, [sp, #20]
	cmp	r10, #0
	add	r9, r3, #1
	ble	.L12
	ldr	r7, [sp, #16]
	str	fp, [sp, #12]
	mvn	r8, #127
	mov	fp, r7
.L28:
	mov	r3, r9
	ldr	r9, [fp], #4
	sub	r10, r10, #1
	sub	r7, r3, r9
	cmp	r7, #0
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	sub	r3, r7, #1
	cmp	r6, r3
	ble	.L17
	b	.L13
.L14:
	cmp	r3, r6
	strb	r8, [r4, #1]
	add	r0, r4, #2
	blt	.L32
	mov	r4, lr
	mov	r2, #192
	sub	r3, r3, r6
	cmp	r6, r3
	mov	r5, #32
	strb	r2, [r4]
	bgt	.L18
.L17:
	cmp	r5, #0
	sub	r3, r3, r6
	add	lr, r4, #1
	beq	.L14
	ldrb	r2, [r4]	@ zero_extendqisi2
	cmp	r6, r3
	add	r2, r2, r5
	and	r2, r2, #255
	mov	r0, lr
	asr	r5, r5, #1
	strb	r2, [r4]
	ble	.L17
.L18:
	cmp	r5, #0
	movne	lr, r4
	asrne	r5, r5, #1
	bne	.L16
	strb	r5, [r4, #1]
	mov	r4, r0
	mov	r5, #64
	add	ip, r0, #1
.L20:
	ldr	r2, [sp, #4]
	cmp	r2, r3
	ldrle	r2, [sp, #4]
	lslgt	r3, r3, #2
	addle	r3, r2, r3
	lslle	r3, r3, #1
	ldr	r2, [sp, #12]
	addgt	r3, r3, #2
	addle	r3, r3, #1
	lsl	r3, r3, r2
.L22:
	cmp	r3, #-2147483648
	beq	.L23
.L50:
	cmp	r5, #0
	add	r2, r4, #1
	strbeq	r5, [r4, #1]
	movne	r1, r5
	addeq	ip, r4, #2
	movne	ip, r2
	moveq	r5, #64
	moveq	r4, r2
	moveq	r1, #128
	asrne	r5, r5, #1
	cmp	r3, #0
	lsl	r3, r3, #1
	bge	.L22
	ldrb	r2, [r4]	@ zero_extendqisi2
	cmp	r3, #-2147483648
	add	r2, r2, r1
	strb	r2, [r4]
	bne	.L50
.L23:
	cmp	r10, #0
	bne	.L28
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #24]
	add	r3, r3, r2, lsl #2
	str	r3, [sp, #16]
.L29:
	mov	r4, ip
.L30:
	ldr	r3, [sp, #8]
	ldr	r0, [sp, #28]
	mvn	r3, r3
	ldr	r2, [sp, #16]
	sub	r4, r4, r0
	add	r3, r2, r3, lsl #2
	ldr	r1, [sp, #20]
	mov	r2, r4
	bl	golomb_decode_list
	mov	r0, r4
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	mov	r5, #32
.L16:
	mov	ip, r0
	mov	r4, lr
	b	.L20
.L13:
	add	r0, r4, #1
	b	.L18
.L12:
	cmp	r5, #128
	beq	.L30
	add	ip, r4, #1
	b	.L29
.L2:
	mov	r3, #0
	ldr	r2, [sp, #28]
	mov	r5, #128
	mov	r4, r2
	strb	r3, [r2]
	b	.L5
	.size	golomb_encode_list, .-golomb_encode_list
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
