	.file	"extr_base.c_base_new.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"base"
	.text
	.p2align 4
	.globl	base_new
	.type	base_new, @function
base_new:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	ecx, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR QUANTUM[rip]
	mov	DWORD PTR 20[rsp], 0
	mov	QWORD PTR 24[rsp], 0
	push	rax
	.cfi_def_cfa_offset 120
	push	72
	.cfi_def_cfa_offset 128
	lea	r9, 40[rsp]
	lea	r8, 36[rsp]
	call	base_block_alloc@PLT
	pop	rdx
	.cfi_def_cfa_offset 120
	pop	rcx
	.cfi_def_cfa_offset 112
	test	rax, rax
	je	.L11
	mov	r14, QWORD PTR CACHELINE[rip]
	mov	r12, rax
	mov	edi, 72
	lea	r15, 4[r12]
	mov	rsi, r14
	call	ALIGNMENT_CEILING@PLT
	mov	rcx, r14
	lea	rsi, 32[rsp]
	mov	rdi, r15
	mov	rdx, rax
	mov	QWORD PTR 8[rsp], rax
	call	base_extent_bump_alloc_helper@PLT
	mov	edx, DWORD PTR ATOMIC_RELAXED[rip]
	mov	rsi, rbp
	mov	DWORD PTR [rax], r13d
	lea	rdi, 64[rax]
	mov	r14, rax
	call	atomic_store_p@PLT
	mov	ecx, DWORD PTR malloc_mutex_rank_exclusive[rip]
	lea	rdi, 60[r14]
	mov	edx, DWORD PTR WITNESS_RANK_BASE[rip]
	lea	rsi, .LC0[rip]
	call	malloc_mutex_init@PLT
	test	rax, rax
	jne	.L19
	mov	eax, DWORD PTR 20[rsp]
	xor	ebx, ebx
	cmp	QWORD PTR NSIZES[rip], 0
	mov	QWORD PTR 48[r14], r12
	mov	DWORD PTR 16[r14], 0
	mov	DWORD PTR 56[r14], eax
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR 8[r14], rax
	je	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 40[r14]
	lea	rdi, [rax+rbx*4]
	add	rbx, 1
	call	extent_heap_new@PLT
	cmp	QWORD PTR NSIZES[rip], rbx
	ja	.L4
.L7:
	cmp	QWORD PTR config_stats[rip], 0
	jne	.L20
.L6:
	mov	r8, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	mov	rcx, r14
	mov	rsi, r15
	mov	rdi, r14
	call	base_extent_bump_alloc_post@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L20:
	.cfi_restore_state
	mov	DWORD PTR 20[r14], 8
	mov	edi, 8
	xor	ebx, ebx
	call	PAGE_CEILING@PLT
	mov	edx, DWORD PTR [r12]
	mov	rcx, QWORD PTR metadata_thp_always[rip]
	cmp	QWORD PTR opt_metadata_thp[rip], rcx
	mov	DWORD PTR 24[r14], eax
	mov	DWORD PTR 28[r14], edx
	je	.L22
.L8:
	mov	DWORD PTR 32[r14], ebx
	xor	edi, edi
	cmp	DWORD PTR 20[r14], eax
	setle	dil
	call	assert@PLT
	mov	eax, DWORD PTR 28[r14]
	xor	edi, edi
	cmp	DWORD PTR 24[r14], eax
	setle	dil
	call	assert@PLT
	mov	ecx, DWORD PTR LG_HUGEPAGE[rip]
	mov	eax, DWORD PTR 32[r14]
	xor	edi, edi
	sal	eax, cl
	cmp	eax, DWORD PTR 28[r14]
	setle	dil
	call	assert@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	xor	r14d, r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r8d, DWORD PTR [r12]
	mov	rcx, r12
	mov	edx, r13d
	mov	rsi, rbp
	mov	rdi, rbx
	xor	r14d, r14d
	call	base_unmap@PLT
	jmp	.L1
.L22:
	xor	eax, eax
	call	metadata_thp_madvise@PLT
	test	rax, rax
	jne	.L9
.L17:
	mov	eax, DWORD PTR 24[r14]
	jmp	.L8
.L9:
	mov	edi, 8
	call	HUGEPAGE_CEILING@PLT
	mov	ecx, DWORD PTR LG_HUGEPAGE[rip]
	sar	eax, cl
	mov	ebx, eax
	jmp	.L17
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	base_new, .-base_new
	.comm	opt_metadata_thp,8,8
	.comm	metadata_thp_always,8,8
	.comm	malloc_mutex_rank_exclusive,4,4
	.comm	config_stats,8,8
	.comm	WITNESS_RANK_BASE,4,4
	.comm	QUANTUM,4,4
	.comm	NSIZES,8,8
	.comm	LG_HUGEPAGE,4,4
	.comm	CACHELINE,8,8
	.comm	ATOMIC_RELAXED,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_base.c_base_new.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"base\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	base_new
	.syntax unified
	.arm
	.fpu softvfp
	.type	base_new, %function
base_new:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, #0
	mov	r7, r1
	mov	r4, #48
	sub	sp, sp, #44
	ldr	r3, .L22
	add	lr, sp, #28
	add	ip, sp, #24
	ldr	r1, [r3]
	stm	sp, {ip, lr}
	ldr	ip, .L22+4
	str	r1, [sp, #12]
	str	r4, [sp, #8]
	mov	r3, r7
	mov	r1, r9
	ldr	ip, [ip]
	str	ip, [sp, #36]
	mov	ip,#0
	mov	r10, r2
	str	r9, [sp, #24]
	str	r9, [sp, #28]
	str	r0, [sp, #20]
	bl	base_block_alloc
	subs	r5, r0, #0
	moveq	r4, r5
	beq	.L1
	ldr	r3, .L22+8
	mov	r0, r4
	ldr	r4, [r3]
	add	fp, r5, #4
	mov	r1, r4
	bl	ALIGNMENT_CEILING
	mov	r3, r4
	mov	r2, r0
	add	r1, sp, #32
	mov	r8, r0
	mov	r0, fp
	bl	base_extent_bump_alloc_helper
	mov	r4, r0
	ldr	r3, .L22+12
	mov	r1, r10
	ldr	r2, [r3]
	str	r7, [r0], #44
	bl	atomic_store_p
	ldr	r3, .L22+16
	ldr	r2, .L22+20
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L22+24
	add	r0, r4, #40
	bl	malloc_mutex_init
	subs	r6, r0, #0
	bne	.L19
	ldr	r9, .L22+28
	ldr	r2, [sp, #24]
	ldr	r3, [r9]
	str	r5, [r4, #32]
	cmp	r3, #0
	ldr	r3, [sp, #28]
	movne	r7, r6
	str	r6, [r4, #8]
	str	r2, [r4, #36]
	str	r3, [r4, #4]
	beq	.L7
.L4:
	ldr	r0, [r4, #28]
	add	r0, r0, r7, lsl #2
	bl	extent_heap_new
	ldr	r3, [r9]
	add	r7, r7, #1
	cmp	r3, r7
	bhi	.L4
.L7:
	ldr	r3, .L22+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
.L6:
	mov	r1, fp
	mov	r3, r4
	mov	r0, r4
	ldr	r2, [sp, #32]
	str	r8, [sp]
	bl	base_extent_bump_alloc_post
.L1:
	ldr	r3, .L22+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	mov	r7, #8
	mov	r0, r7
	str	r7, [r4, #12]
	bl	PAGE_CEILING
	ldr	r2, .L22+36
	ldr	r3, .L22+40
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, [r5]
	cmp	r1, r2
	str	r0, [r4, #16]
	str	r3, [r4, #20]
	beq	.L15
.L17:
	ldr	r5, .L22+44
.L8:
	ldr	r3, [r4, #12]
	str	r6, [r4, #24]
	cmp	r3, r0
	movgt	r0, #0
	movle	r0, #1
	bl	assert
	ldr	r0, [r4, #16]
	ldr	r3, [r4, #20]
	cmp	r0, r3
	movgt	r0, #0
	movle	r0, #1
	bl	assert
	ldr	r2, [r5]
	ldr	r1, [r4, #24]
	ldr	r3, [r4, #20]
	cmp	r3, r1, lsl r2
	movge	r0, #1
	movlt	r0, #0
	bl	assert
	b	.L6
.L19:
	ldr	r3, [r5]
	mov	r2, r7
	str	r3, [sp]
	mov	r1, r10
	mov	r3, r5
	ldr	r0, [sp, #20]
	mov	r4, r9
	bl	base_unmap
	b	.L1
.L15:
	bl	metadata_thp_madvise
	subs	r6, r0, #0
	ldreq	r0, [r4, #16]
	beq	.L17
.L9:
	mov	r0, r7
	bl	HUGEPAGE_CEILING
	mov	r6, r0
	ldr	r5, .L22+44
	ldr	r0, [r4, #16]
	ldr	r3, [r5]
	asr	r6, r6, r3
	b	.L8
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	QUANTUM
	.word	.LC1
	.word	CACHELINE
	.word	ATOMIC_RELAXED
	.word	malloc_mutex_rank_exclusive
	.word	WITNESS_RANK_BASE
	.word	.LC0
	.word	NSIZES
	.word	config_stats
	.word	opt_metadata_thp
	.word	metadata_thp_always
	.word	LG_HUGEPAGE
	.size	base_new, .-base_new
	.comm	opt_metadata_thp,4,4
	.comm	metadata_thp_always,4,4
	.comm	malloc_mutex_rank_exclusive,4,4
	.comm	config_stats,4,4
	.comm	WITNESS_RANK_BASE,4,4
	.comm	QUANTUM,4,4
	.comm	NSIZES,4,4
	.comm	LG_HUGEPAGE,4,4
	.comm	CACHELINE,4,4
	.comm	ATOMIC_RELAXED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
