	.file	"extr_badblocks.c_bb_u64_list_add.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bb_u64_list_add, @function
bb_u64_list_add:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	mov	esi, DWORD PTR BB_ET_MAGIC_BADBLOCKS_LIST[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	r12, QWORD PTR [rdi]
	call	BB_CHECK_MAGIC@PLT
	movsx	rcx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 12[rbx]
	cmp	ecx, esi
	jge	.L24
.L2:
	mov	rdi, QWORD PTR [rbx]
	test	ecx, ecx
	je	.L5
	lea	r8d, -1[rcx]
	xor	eax, eax
	movsx	rdx, r8d
	lea	r9, 0[0+rdx*8]
	cmp	QWORD PTR [rdi+rdx*8], rbp
	je	.L1
	jl	.L5
	mov	rax, rdi
	xor	esi, esi
	test	ecx, ecx
	jg	.L11
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L26:
	jg	.L25
	add	esi, 1
	add	rax, 8
	cmp	esi, ecx
	je	.L21
.L11:
	cmp	QWORD PTR [rax], rbp
	jne	.L26
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	eax, 1[rcx]
	mov	DWORD PTR 8[rbx], eax
	xor	eax, eax
	mov	QWORD PTR [rdi+rcx*8], rbp
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	add	esi, 100
	mov	rdi, QWORD PTR [rbx]
	mov	DWORD PTR 12[rbx], esi
	sal	esi, 3
	call	realloc@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L27
	movsx	rdx, DWORD PTR 12[rbx]
	xor	esi, esi
	lea	rdi, -800[rax+rdx*8]
	mov	edx, 800
	call	memset@PLT
	movsx	rcx, DWORD PTR 8[rbx]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rax, 8[rdi+r9]
.L10:
	add	ecx, 1
	mov	QWORD PTR [rax], rbp
	xor	eax, eax
	mov	DWORD PTR 8[rbx], ecx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	cmp	ecx, esi
	jle	.L10
	add	r9, 8
	sub	r8d, esi
	lea	rdx, [rdi+r9]
	sal	r8, 3
	lea	rdi, -8[rdi+r9]
	sub	rdi, r8
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rsi, QWORD PTR -8[rdx]
	sub	rdx, 8
	mov	QWORD PTR 8[rdx], rsi
	cmp	rdi, rdx
	jne	.L12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	mov	QWORD PTR [rbx], r12
	mov	eax, DWORD PTR BB_ET_NO_MEMORY[rip]
	sub	DWORD PTR 12[rbx], 100
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	bb_u64_list_add, .-bb_u64_list_add
	.comm	BB_ET_NO_MEMORY,4,4
	.comm	BB_ET_MAGIC_BADBLOCKS_LIST,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_badblocks.c_bb_u64_list_add.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bb_u64_list_add, %function
bb_u64_list_add:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L27
	mov	r5, r1
	ldr	r1, [r3]
	ldr	r6, [r0]
	bl	BB_CHECK_MAGIC
	ldr	ip, [r4, #4]
	ldr	r1, [r4, #8]
	cmp	ip, r1
	bge	.L23
.L2:
	cmp	ip, #0
	ldr	r6, [r4]
	beq	.L5
	sub	r2, ip, #1
	ldr	r3, [r6, r2, lsl #2]
	lsl	r2, r2, #2
	cmp	r3, r5
	beq	.L14
	blt	.L5
	cmp	ip, #0
	movgt	r0, r6
	movgt	r3, #0
	bgt	.L11
	b	.L20
.L25:
	bgt	.L24
	add	r3, r3, #1
	cmp	r3, ip
	beq	.L20
.L11:
	ldr	lr, [r0]
	mov	r1, r0
	cmp	lr, r5
	add	r0, r0, #4
	bne	.L25
.L14:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L5:
	add	r3, ip, #1
	str	r3, [r4, #4]
	mov	r0, #0
	str	r5, [r6, ip, lsl #2]
	pop	{r4, r5, r6, pc}
.L23:
	add	r1, r1, #100
	str	r1, [r4, #8]
	ldr	r0, [r4]
	lsl	r1, r1, #2
	bl	realloc
	cmp	r0, #0
	ldr	r3, [r4, #8]
	str	r0, [r4]
	beq	.L26
	add	r3, r3, #1073741824
	sub	r3, r3, #100
	mov	r2, #400
	mov	r1, #0
	add	r0, r0, r3, lsl #2
	bl	memset
	ldr	ip, [r4, #4]
	b	.L2
.L20:
	add	r2, r2, #4
	add	r1, r6, r2
.L10:
	add	ip, ip, #1
	str	r5, [r1]
	mov	r0, #0
	str	ip, [r4, #4]
	pop	{r4, r5, r6, pc}
.L24:
	cmp	ip, r3
	addgt	r2, r2, #4
	addgt	r2, r6, r2
	addgt	r3, r6, r3, lsl #2
	ble	.L10
.L12:
	ldr	r0, [r2, #-4]
	str	r0, [r2], #-4
	cmp	r3, r2
	bne	.L12
	b	.L10
.L26:
	ldr	r2, .L27+4
	sub	r3, r3, #100
	ldr	r0, [r2]
	str	r6, [r4]
	str	r3, [r4, #8]
	pop	{r4, r5, r6, pc}
.L28:
	.align	2
.L27:
	.word	BB_ET_MAGIC_BADBLOCKS_LIST
	.word	BB_ET_NO_MEMORY
	.size	bb_u64_list_add, .-bb_u64_list_add
	.comm	BB_ET_NO_MEMORY,4,4
	.comm	BB_ET_MAGIC_BADBLOCKS_LIST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
