	.file	"extr_search-y-index.c_bwrite_coordinates_list.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bwrite_coordinates_list, @function
bwrite_coordinates_list:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	xor	edi, edi
	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, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR tot_items[rip]
	cmp	QWORD PTR [rsi], rax
	mov	rbp, rsp
	setb	dil
	call	assert@PLT
	mov	rdi, r13
	call	bwrite_get_bits_written@PLT
	mov	esi, r14d
	mov	rdi, r13
	sub	DWORD PTR coordinate_bits[rip], eax
	call	bwrite_gamma_code@PLT
	mov	rdx, QWORD PTR [r15]
	mov	rax, QWORD PTR item_positions[rip]
	test	r14d, r14d
	mov	r12d, DWORD PTR [rax+rdx*4]
	setg	al
	xor	edi, edi
	cmp	r14d, r12d
	setle	dil
	and	edi, eax
	call	assert@PLT
	mov	rdi, r13
	call	bwrite_get_bits_written@PLT
	mov	rsi, QWORD PTR [r15]
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	ecx, DWORD PTR 12[r13]
	mov	rdx, QWORD PTR item_positions[rip]
	mov	r9d, DWORD PTR le_golomb[rip]
	mov	rdi, rbp
	mov	r8d, DWORD PTR 8[r13]
	mov	esi, DWORD PTR [rdx+rsi*4]
	push	rax
	.cfi_def_cfa_offset 112
	mov	edx, r14d
	call	list_encoder_init@PLT
	pop	rax
	.cfi_def_cfa_offset 104
	pop	rdx
	.cfi_def_cfa_offset 96
	test	r14d, r14d
	jle	.L4
	mov	eax, DWORD PTR 8[r15]
	lea	rbx, 8[r15]
	cmp	r12d, eax
	setge	dl
	xor	edi, edi
	test	eax, eax
	setg	dil
	and	edi, edx
	call	assert@PLT
	lea	eax, -1[r14]
	mov	edi, 1
	sal	rax, 4
	lea	r14, 24[r15+rax]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR [rbx]
	cmp	eax, r12d
	setle	dl
	xor	edi, edi
	test	eax, eax
	setg	dil
	and	edi, edx
	call	assert@PLT
	xor	edi, edi
	mov	eax, DWORD PTR [rbx]
	cmp	DWORD PTR -16[rbx], eax
	setl	dil
.L5:
	call	assert@PLT
	mov	eax, DWORD PTR [rbx]
	add	rbx, 16
	mov	rdi, rbp
	lea	esi, -1[rax]
	call	[QWORD PTR 8[rsp]]
	cmp	rbx, r14
	jne	.L3
.L4:
	mov	rax, QWORD PTR [rsp]
	mov	rdi, r13
	mov	QWORD PTR 0[r13], rax
	call	bwrite_get_bits_written@PLT
	add	DWORD PTR coordinate_bits[rip], eax
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 40
	.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
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bwrite_coordinates_list, .-bwrite_coordinates_list
	.comm	tot_items,8,8
	.comm	le_golomb,4,4
	.comm	item_positions,8,8
	.comm	coordinate_bits,4,4
	.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_search-y-index.c_bwrite_coordinates_list.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bwrite_coordinates_list, %function
bwrite_coordinates_list:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	ldr	r3, .L11
	mov	r4, r1
	ldr	r3, [r3]
	ldr	r1, [r1]
	sub	sp, sp, #44
	cmp	r1, r3
	ldr	r3, .L11+4
	movcs	r0, #0
	movcc	r0, #1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	assert
	mov	r0, r7
	bl	bwrite_get_bits_written
	ldr	r9, .L11+8
	ldr	r5, .L11+12
	ldr	r3, [r9]
	mov	r1, r6
	sub	r3, r3, r0
	mov	r0, r7
	str	r3, [r9]
	bl	bwrite_gamma_code
	ldr	r3, [r5]
	ldr	r2, [r4]
	cmp	r6, #0
	ldr	r8, [r3, r2, lsl #2]
	movgt	r0, #1
	movle	r0, #0
	cmp	r6, r8
	movgt	r0, #0
	bl	assert
	ldr	r2, [r5]
	ldr	r1, [r4]
	ldr	r3, .L11+16
	ldr	r1, [r2, r1, lsl #2]
	mov	r0, r7
	ldr	r5, [r3]
	ldr	r10, [r7, #12]
	ldr	fp, [r7, #8]
	str	r1, [sp, #20]
	bl	bwrite_get_bits_written
	mov	r3, r10
	str	r0, [sp, #8]
	mov	r2, r6
	ldr	r1, [sp, #20]
	str	fp, [sp]
	str	r5, [sp, #4]
	add	r0, sp, #24
	bl	list_encoder_init
	cmp	r6, #0
	ble	.L4
	ldr	r0, [r4, #4]
	mov	r5, #0
	cmp	r8, r0
	cmpge	r0, #0
	movgt	r0, #1
	movle	r0, #0
	bl	assert
	add	r4, r4, #8
	mov	r0, #1
	b	.L5
.L3:
	ldr	r2, [r4, #-4]
	subs	r3, r2, #0
	movgt	r0, #1
	movle	r0, #0
	cmp	r3, r8
	movgt	r0, #0
	bl	assert
	ldr	r0, [r4, #-12]
	ldr	r3, [r4, #-4]
	cmp	r0, r3
	movge	r0, #0
	movlt	r0, #1
.L5:
	bl	assert
	ldr	r1, [r4, #-4]
	ldr	r3, [sp, #32]
	add	r5, r5, #1
	sub	r1, r1, #1
	add	r0, sp, #24
	blx	r3
	cmp	r6, r5
	add	r4, r4, #8
	bne	.L3
.L4:
	ldr	r2, [sp, #28]
	ldr	r3, [sp, #24]
	str	r2, [r7, #4]
	str	r3, [r7]
	mov	r0, r7
	bl	bwrite_get_bits_written
	ldr	r3, [r9]
	add	r3, r3, r0
	str	r3, [r9]
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	tot_items
	.word	.LC0
	.word	coordinate_bits
	.word	item_positions
	.word	le_golomb
	.size	bwrite_coordinates_list, .-bwrite_coordinates_list
	.comm	tot_items,4,4
	.comm	le_golomb,4,4
	.comm	item_positions,4,4
	.comm	coordinate_bits,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
