	.file	"extr_drbd_bitmap.c_bm_set_surplus.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bm_set_surplus, @function
bm_set_surplus:
.LFB0:
	.cfi_startproc
	endbr64
	mov	ecx, DWORD PTR BITS_PER_LONG_MASK[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, DWORD PTR [rdi]
	mov	edi, 1
	and	ebx, DWORD PTR BITS_PER_PAGE_MASK[rip]
	and	ecx, ebx
	sal	rdi, cl
	sub	rdi, 1
	call	cpu_to_lel@PLT
	mov	rdi, rbp
	mov	r12, rax
	mov	rax, QWORD PTR 8[rbp]
	lea	rsi, -1[rax]
	call	bm_map_pidx@PLT
	mov	ecx, DWORD PTR BITS_PER_LONG[rip]
	mov	rdi, rax
	mov	eax, ebx
	cdq
	idiv	ecx
	movsx	rbx, eax
	lea	rax, [rdi+rbx*8]
	test	r12, r12
	je	.L2
	not	r12
	or	QWORD PTR [rax], r12
	add	rax, 8
.L2:
	cmp	ecx, 32
	je	.L12
.L3:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	bm_unmap@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdx, rax
	sub	rdx, rdi
	and	edx, 8
	je	.L3
	mov	QWORD PTR [rax], -1
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	bm_unmap@PLT
	.cfi_endproc
.LFE0:
	.size	bm_set_surplus, .-bm_set_surplus
	.comm	BITS_PER_PAGE_MASK,4,4
	.comm	BITS_PER_LONG_MASK,4,4
	.comm	BITS_PER_LONG,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_drbd_bitmap.c_bm_set_surplus.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bm_set_surplus, %function
bm_set_surplus:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mvn	r0, #0
	ldr	r2, .L12
	ldr	r3, .L12+4
	ldr	r2, [r2]
	ldr	r6, [r4]
	ldr	r3, [r3]
	and	r6, r6, r2
	and	r3, r3, r6
	mvn	r0, r0, lsl r3
	bl	cpu_to_lel
	ldr	r1, [r4, #4]
	mov	r5, r0
	sub	r1, r1, #1
	mov	r0, r4
	bl	bm_map_pidx
	ldr	r3, .L12+8
	mov	r4, r0
	mov	r0, r6
	ldr	r6, [r3]
	mov	r1, r6
	bl	__aeabi_idiv
	cmp	r5, #0
	mvnne	r5, r5
	ldrne	r2, [r4, r0, lsl #2]
	add	r3, r4, r0, lsl #2
	orrne	r5, r2, r5
	addne	r3, r3, #4
	strne	r5, [r4, r0, lsl #2]
	cmp	r6, #32
	bne	.L3
	sub	r2, r3, r4
	tst	r2, #4
	mvnne	r2, #0
	strne	r2, [r3]
.L3:
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	bm_unmap
.L13:
	.align	2
.L12:
	.word	BITS_PER_PAGE_MASK
	.word	BITS_PER_LONG_MASK
	.word	BITS_PER_LONG
	.size	bm_set_surplus, .-bm_set_surplus
	.comm	BITS_PER_PAGE_MASK,4,4
	.comm	BITS_PER_LONG_MASK,4,4
	.comm	BITS_PER_LONG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
