	.file	"extr_spa_history.c_spa_history_create_obj.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	spa_history_create_obj
	.type	spa_history_create_obj, @function
spa_history_create_obj:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	ASSERT@PLT
	mov	ecx, DWORD PTR DMU_OT_SPA_HISTORY_OFFSETS[rip]
	mov	r9, r12
	mov	rdi, r13
	mov	edx, DWORD PTR SPA_OLD_MAXBLOCKSIZE[rip]
	mov	esi, DWORD PTR DMU_OT_SPA_HISTORY[rip]
	mov	r8d, 4
	call	dmu_object_alloc@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	r9, rbp
	mov	rdi, r13
	push	r12
	.cfi_def_cfa_offset 80
	mov	edx, DWORD PTR DMU_POOL_HISTORY[rip]
	mov	ecx, 4
	mov	r8d, 1
	mov	DWORD PTR 0[rbp], eax
	mov	esi, DWORD PTR DMU_POOL_DIRECTORY_OBJECT[rip]
	call	zap_add@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	VERIFY@PLT
	mov	esi, DWORD PTR 0[rbp]
	lea	rcx, 16[rsp]
	mov	rdi, r13
	mov	edx, DWORD PTR FTAG[rip]
	call	dmu_bonus_hold@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	VERIFY@PLT
	mov	rax, QWORD PTR 16[rsp]
	xor	edi, edi
	cmp	DWORD PTR [rax], 3
	seta	dil
	call	ASSERT@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, r12
	mov	rbx, QWORD PTR 8[rdi]
	call	dmu_buf_will_dirty@PLT
	mov	rdi, rbp
	call	spa_normal_class@PLT
	mov	edi, eax
	call	metaslab_class_get_dspace@PLT
	mov	esi, 1073741824
	movsx	rdi, eax
	sar	eax, 31
	imul	rdi, rdi, 274877907
	sar	rdi, 38
	sub	edi, eax
	mov	DWORD PTR [rbx], edi
	call	MIN@PLT
	mov	esi, 131072
	mov	DWORD PTR [rbx], eax
	mov	edi, eax
	call	MAX@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	DWORD PTR [rbx], eax
	mov	esi, DWORD PTR FTAG[rip]
	call	dmu_buf_rele@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L5
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	spa_history_create_obj, .-spa_history_create_obj
	.comm	SPA_OLD_MAXBLOCKSIZE,4,4
	.comm	FTAG,4,4
	.comm	DMU_POOL_HISTORY,4,4
	.comm	DMU_POOL_DIRECTORY_OBJECT,4,4
	.comm	DMU_OT_SPA_HISTORY_OFFSETS,4,4
	.comm	DMU_OT_SPA_HISTORY,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_spa_history.c_spa_history_create_obj.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	spa_history_create_obj
	.syntax unified
	.arm
	.fpu softvfp
	.type	spa_history_create_obj, %function
spa_history_create_obj:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	ldr	r0, [r0]
	mov	r5, r1
	clz	r0, r0
	mov	r6, #4
	ldr	r3, .L6
	sub	sp, sp, #28
	lsr	r0, r0, #5
	ldr	r7, [r4, #4]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	ASSERT
	ldr	r3, .L6+4
	ldr	r2, .L6+8
	ldr	r1, .L6+12
	str	r5, [sp, #4]
	str	r6, [sp]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r7
	bl	dmu_object_alloc
	mov	ip, #1
	str	r0, [r4]
	stmib	sp, {r4, r5}
	ldr	r2, .L6+16
	ldr	r1, .L6+20
	str	ip, [sp]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r7
	bl	zap_add
	clz	r0, r0
	ldr	r6, .L6+24
	lsr	r0, r0, #5
	bl	VERIFY
	ldr	r2, [r6]
	ldr	r1, [r4]
	add	r3, sp, #16
	mov	r0, r7
	bl	dmu_bonus_hold
	clz	r0, r0
	lsr	r0, r0, #5
	bl	VERIFY
	ldr	r3, [sp, #16]
	ldr	r0, [r3]
	cmp	r0, #3
	movls	r0, #0
	movhi	r0, #1
	bl	ASSERT
	ldr	r0, [sp, #16]
	mov	r1, r5
	ldr	r5, [r0, #4]
	bl	dmu_buf_will_dirty
	mov	r0, r4
	bl	spa_normal_class
	bl	metaslab_class_get_dspace
	ldr	r2, .L6+28
	asr	r3, r0, #31
	smull	r1, r0, r2, r0
	rsb	r0, r3, r0, asr #6
	mov	r1, #1073741824
	str	r0, [r5]
	bl	MIN
	mov	r1, #131072
	str	r0, [r5]
	bl	MAX
	str	r0, [r5]
	ldr	r1, [r6]
	ldr	r0, [sp, #16]
	bl	dmu_buf_rele
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	DMU_OT_SPA_HISTORY_OFFSETS
	.word	SPA_OLD_MAXBLOCKSIZE
	.word	DMU_OT_SPA_HISTORY
	.word	DMU_POOL_HISTORY
	.word	DMU_POOL_DIRECTORY_OBJECT
	.word	FTAG
	.word	274877907
	.size	spa_history_create_obj, .-spa_history_create_obj
	.comm	SPA_OLD_MAXBLOCKSIZE,4,4
	.comm	FTAG,4,4
	.comm	DMU_POOL_HISTORY,4,4
	.comm	DMU_POOL_DIRECTORY_OBJECT,4,4
	.comm	DMU_OT_SPA_HISTORY_OFFSETS,4,4
	.comm	DMU_OT_SPA_HISTORY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
