	.file	"extr_inode.c_udf_add_aext.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	udf_add_aext
	.type	udf_add_aext, @function
udf_add_aext:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 24[rsp], rdx
	mov	DWORD PTR 40[rsp], ecx
	mov	DWORD PTR 12[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	UDF_I@PLT
	mov	r15, rax
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	je	.L40
	movsx	rdx, DWORD PTR [rbx]
	add	rdx, QWORD PTR [rax]
	mov	QWORD PTR 16[rsp], rdx
.L3:
	mov	eax, DWORD PTR 8[r15]
	cmp	eax, 128
	je	.L30
	cmp	eax, 129
	jne	.L31
	mov	eax, 48
	mov	r13d, 24
.L4:
	mov	rdi, QWORD PTR 0[rbp]
	add	eax, DWORD PTR [rbx]
	cmp	eax, DWORD PTR [rdi]
	jle	.L6
	mov	r14d, DWORD PTR 16[rbx]
	mov	edx, DWORD PTR 20[rbx]
	lea	r8, 52[rsp]
	xor	esi, esi
	mov	ecx, r14d
	call	udf_new_block@PLT
	mov	DWORD PTR 16[rbx], eax
	test	eax, eax
	je	.L31
	mov	rdi, QWORD PTR 0[rbp]
	lea	rsi, 16[rbx]
	xor	edx, edx
	call	udf_get_lb_pblock@PLT
	mov	rdi, QWORD PTR 0[rbp]
	mov	esi, eax
	call	udf_tgetblk@PLT
	mov	r12, rax
	test	rax, rax
	je	.L31
	mov	rdi, rax
	call	lock_buffer@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR [r12]
	xor	esi, esi
	mov	edx, DWORD PTR [rax]
	call	memset@PLT
	mov	rdi, r12
	call	set_buffer_uptodate@PLT
	mov	rdi, r12
	call	unlock_buffer@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	mark_buffer_dirty_inode@PLT
	mov	rax, QWORD PTR [r12]
	mov	esi, DWORD PTR UDF_FLAG_STRICT[rip]
	mov	rdi, QWORD PTR 0[rbp]
	mov	QWORD PTR 32[rsp], rax
	call	UDF_QUERY_FLAG@PLT
	test	eax, eax
	je	.L41
.L8:
	mov	r14d, DWORD PTR [rbx]
	mov	rax, QWORD PTR 0[rbp]
	lea	edx, [r14+r13]
	cmp	edx, DWORD PTR [rax]
	jle	.L9
	mov	edi, r13d
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 32[rsp]
	mov	edx, r13d
	mov	QWORD PTR [rcx], rax
	movsx	rax, r13d
	sub	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR [r12]
	mov	rsi, QWORD PTR 16[rsp]
	lea	rdi, 16[rax]
	call	memcpy@PLT
	lea	eax, 16[r13]
	mov	DWORD PTR [rbx], eax
.L10:
	mov	rdi, QWORD PTR 0[rbp]
	call	UDF_SB@PLT
	mov	r8d, DWORD PTR 16[rbx]
	mov	r9d, 4
	mov	ecx, 1
	cmp	DWORD PTR [rax], 511
	jle	.L12
	mov	esi, DWORD PTR TAG_IDENT_AED[rip]
	mov	rdi, QWORD PTR [r12]
	mov	edx, 3
	call	udf_new_tag@PLT
	mov	eax, DWORD PTR 8[r15]
	cmp	eax, 128
	je	.L14
.L44:
	cmp	eax, 129
	jne	.L16
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	or	edi, DWORD PTR EXT_NEXT_EXTENT_ALLOCDECS[rip]
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 16[rbx]
	mov	QWORD PTR 16[rcx], rax
	call	cpu_to_lelb@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	edx, 8
	xor	esi, esi
	mov	DWORD PTR 8[rcx], eax
	mov	rdi, QWORD PTR [rcx]
	call	memset@PLT
.L16:
	cmp	QWORD PTR 8[rbx], 0
	je	.L17
.L45:
	mov	esi, DWORD PTR UDF_FLAG_STRICT[rip]
	mov	rdi, QWORD PTR 0[rbp]
	call	UDF_QUERY_FLAG@PLT
	test	eax, eax
	jne	.L18
.L20:
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, r14d
	mov	rdi, QWORD PTR [rax]
	call	udf_update_tag@PLT
.L19:
	mov	rdi, QWORD PTR 8[rbx]
	mov	rsi, rbp
	call	mark_buffer_dirty_inode@PLT
	mov	rdi, QWORD PTR 8[rbx]
	call	brelse@PLT
.L21:
	mov	QWORD PTR 8[rbx], r12
.L6:
	mov	r8d, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR 40[rsp]
	mov	rsi, rbx
	mov	rdi, rbp
	mov	rdx, QWORD PTR 24[rsp]
	call	udf_write_aext@PLT
	mov	r12d, eax
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	je	.L42
	mov	rdi, QWORD PTR [rax]
	mov	esi, r13d
	call	le32_add_cpu@PLT
	mov	esi, DWORD PTR UDF_FLAG_STRICT[rip]
	mov	rdi, QWORD PTR 0[rbp]
	call	UDF_QUERY_FLAG@PLT
	test	eax, eax
	jne	.L23
.L26:
	mov	esi, DWORD PTR [rbx]
	mov	eax, DWORD PTR 12[rsp]
	add	r13d, esi
	test	eax, eax
	mov	rax, QWORD PTR 8[rbx]
	cmove	esi, r13d
	mov	rdi, QWORD PTR [rax]
	call	udf_update_tag@PLT
.L28:
	mov	rdi, QWORD PTR 8[rbx]
	mov	rsi, rbp
	call	mark_buffer_dirty_inode@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L43
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L23:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[rbp]
	call	UDF_SB@PLT
	cmp	DWORD PTR [rax], 512
	jg	.L26
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, 16
	mov	rdi, QWORD PTR [rax]
	call	udf_update_tag@PLT
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L30:
	mov	eax, 32
	mov	r13d, 16
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	add	DWORD PTR 12[r15], r13d
	mov	rdi, rbp
	call	mark_inode_dirty@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR TAG_IDENT_AED[rip]
	mov	rdi, QWORD PTR [r12]
	mov	edx, 2
	call	udf_new_tag@PLT
	mov	eax, DWORD PTR 8[r15]
	cmp	eax, 128
	jne	.L44
.L14:
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	or	edi, DWORD PTR EXT_NEXT_EXTENT_ALLOCDECS[rip]
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR 16[rbx]
	mov	QWORD PTR 8[rcx], rax
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 16[rsp]
	cmp	QWORD PTR 8[rbx], 0
	mov	QWORD PTR [rcx], rax
	jne	.L45
.L17:
	mov	rdi, rbp
	call	mark_inode_dirty@PLT
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L9:
	xor	edi, edi
	mov	DWORD PTR 44[rsp], edx
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 32[rsp]
	mov	edx, DWORD PTR 44[rsp]
	mov	QWORD PTR [rcx], rax
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR [rbx], 16
	test	rax, rax
	mov	DWORD PTR 32[rsp], edx
	je	.L11
	mov	rdi, QWORD PTR [rax]
	mov	esi, r13d
	call	le32_add_cpu@PLT
	mov	edx, DWORD PTR 32[rsp]
	mov	r14d, edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR 0[rbp]
	call	UDF_SB@PLT
	cmp	DWORD PTR [rax], 512
	jg	.L20
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, 16
	mov	rdi, QWORD PTR [rax]
	call	udf_update_tag@PLT
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L11:
	add	DWORD PTR 12[r15], r13d
	mov	rdi, rbp
	call	mark_inode_dirty@PLT
	mov	edx, DWORD PTR 32[rsp]
	mov	r14d, edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L40:
	mov	rdi, rbp
	mov	r13, QWORD PTR [r15]
	mov	r12d, DWORD PTR [rbx]
	add	r12d, DWORD PTR 16[r15]
	call	udf_file_entry_alloc_offset@PLT
	sub	r12d, eax
	movsx	r12, r12d
	lea	rax, 0[r13+r12]
	mov	QWORD PTR 16[rsp], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L41:
	mov	edi, r14d
	call	cpu_to_le32@PLT
	mov	rcx, QWORD PTR 32[rsp]
	mov	QWORD PTR 8[rcx], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L31:
	mov	r12d, -1
	jmp	.L1
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	udf_add_aext, .-udf_add_aext
	.comm	UDF_FLAG_STRICT,4,4
	.comm	TAG_IDENT_AED,4,4
	.comm	EXT_NEXT_EXTENT_ALLOCDECS,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_inode.c_udf_add_aext.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	udf_add_aext
	.syntax unified
	.arm
	.fpu softvfp
	.type	udf_add_aext, %function
udf_add_aext:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	mov	r8, r3
	ldr	r3, .L47
	sub	sp, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	fp, r2
	mov	r5, r0
	bl	UDF_I
	ldr	r3, [r4, #4]
	mov	r6, r0
	cmp	r3, #0
	beq	.L42
	ldr	r3, [r3]
	ldr	r0, [r4]
	add	r3, r3, r0
	str	r3, [sp, #8]
.L3:
	ldr	r3, [r6, #4]
	cmp	r3, #128
	beq	.L30
	cmp	r3, #129
	bne	.L31
	mov	r3, #24
	mov	r9, #12
.L4:
	ldr	r0, [r5]
	ldr	r1, [r4]
	ldr	r2, [r0]
	add	r3, r3, r1
	cmp	r3, r2
	ble	.L6
	ldr	r10, [r4, #8]
	add	r2, sp, #24
	str	r2, [sp]
	mov	r3, r10
	mov	r1, #0
	ldr	r2, [r4, #12]
	bl	udf_new_block
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L31
	ldr	r7, [r5]
	add	r3, r4, #8
	mov	r1, r3
	mov	r0, r7
	mov	r2, #0
	str	r3, [sp, #16]
	bl	udf_get_lb_pblock
	mov	r1, r0
	mov	r0, r7
	bl	udf_tgetblk
	subs	r7, r0, #0
	beq	.L31
	bl	lock_buffer
	ldr	r3, [r5]
	mov	r1, #0
	ldr	r2, [r3]
	ldr	r0, [r7]
	bl	memset
	mov	r0, r7
	bl	set_buffer_uptodate
	mov	r0, r7
	bl	unlock_buffer
	mov	r1, r5
	mov	r0, r7
	bl	mark_buffer_dirty_inode
	ldr	r3, .L47+4
	ldr	r0, [r5]
	ldr	r1, [r3]
	ldr	r3, [r7]
	str	r3, [sp, #12]
	bl	UDF_QUERY_FLAG
	cmp	r0, #0
	beq	.L43
.L8:
	ldr	r3, [r5]
	ldr	r10, [r4]
	ldr	r2, [r3]
	add	r3, r10, r9
	cmp	r3, r2
	ble	.L9
	mov	r0, r9
	bl	cpu_to_le32
	ldr	r2, [sp, #8]
	ldr	r3, [r7]
	sub	r1, r2, r9
	ldr	r2, [sp, #12]
	str	r1, [sp, #8]
	str	r0, [r2]
	add	r0, r3, #8
	mov	r2, r9
	bl	memcpy
	add	r3, r9, #8
	str	r3, [r4]
.L10:
	ldr	r0, [r5]
	bl	UDF_SB
	mov	r1, #4
	ldr	r3, [r0]
	ldr	r2, .L47+8
	cmp	r3, #512
	ldr	r3, [r4, #8]
	ldr	r0, [r7]
	str	r1, [sp, #4]
	ldr	r1, [r2]
	movge	r2, #3
	movlt	r2, #2
	str	r3, [sp]
	mov	r3, #1
	bl	udf_new_tag
	ldr	r3, [r6, #4]
	cmp	r3, #128
	beq	.L14
	cmp	r3, #129
	bne	.L16
	ldr	r2, [r5]
	ldr	r3, .L47+12
	ldr	r0, [r2]
	ldr	r3, [r3]
	orr	r0, r0, r3
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r2, [sp, #16]
	ldm	r2, {r0, r1}
	ldr	r2, [sp, #8]
	str	r3, [r2, #8]
	bl	cpu_to_lelb
	mov	r2, #0
	ldr	r1, [sp, #8]
	ldr	r3, [r1]
	str	r0, [r1, #4]
	strb	r2, [r3]
	strb	r2, [r3, #1]
	strb	r2, [r3, #2]
	strb	r2, [r3, #3]
.L16:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L17
.L46:
	ldr	r3, .L47+4
	ldr	r0, [r5]
	ldr	r1, [r3]
	bl	UDF_QUERY_FLAG
	cmp	r0, #0
	bne	.L18
.L20:
	ldr	r3, [r4, #4]
	mov	r1, r10
	ldr	r0, [r3]
	bl	udf_update_tag
.L19:
	mov	r1, r5
	ldr	r0, [r4, #4]
	bl	mark_buffer_dirty_inode
	ldr	r0, [r4, #4]
	bl	brelse
.L21:
	str	r7, [r4, #4]
.L6:
	ldr	r3, [sp, #72]
	mov	r2, fp
	str	r3, [sp]
	mov	r1, r4
	mov	r3, r8
	mov	r0, r5
	bl	udf_write_aext
	ldr	r3, [r4, #4]
	mov	r7, r0
	cmp	r3, #0
	beq	.L44
	mov	r1, r9
	ldr	r0, [r3]
	bl	le32_add_cpu
	ldr	r3, .L47+4
	ldr	r0, [r5]
	ldr	r1, [r3]
	bl	UDF_QUERY_FLAG
	cmp	r0, #0
	bne	.L23
.L26:
	ldr	r3, [r4, #4]
	ldr	r2, [sp, #72]
	ldr	r1, [r4]
	cmp	r2, #0
	ldr	r0, [r3]
	addeq	r1, r1, r9
.L40:
	bl	udf_update_tag
	mov	r1, r5
	ldr	r0, [r4, #4]
	bl	mark_buffer_dirty_inode
.L1:
	ldr	r3, .L47
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L45
	mov	r0, r7
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	ldr	r0, [r5]
	bl	UDF_SB
	ldr	r3, [r0]
	cmp	r3, #512
	bgt	.L26
	ldr	r3, [r4, #4]
	mov	r1, #8
	ldr	r0, [r3]
	b	.L40
.L30:
	mov	r3, #16
	mov	r9, #8
	b	.L4
.L44:
	ldr	r3, [r6, #8]
	mov	r0, r5
	add	r9, r3, r9
	str	r9, [r6, #8]
	bl	mark_inode_dirty
	b	.L1
.L9:
	mov	r0, #0
	str	r3, [sp, #20]
	bl	cpu_to_le32
	mov	r1, #8
	ldr	r2, [r4, #4]
	ldr	r3, [sp, #12]
	cmp	r2, #0
	str	r0, [r3]
	ldr	r3, [sp, #20]
	str	r1, [r4]
	beq	.L11
	mov	r1, r9
	ldr	r0, [r2]
	mov	r10, r3
	bl	le32_add_cpu
	b	.L10
.L18:
	ldr	r0, [r5]
	bl	UDF_SB
	ldr	r3, [r0]
	cmp	r3, #512
	bgt	.L20
	ldr	r3, [r4, #4]
	mov	r1, #8
	ldr	r0, [r3]
	bl	udf_update_tag
	b	.L19
.L11:
	ldr	r2, [r6, #8]
	mov	r10, r3
	add	r3, r2, r9
	mov	r0, r5
	str	r3, [r6, #8]
	bl	mark_inode_dirty
	b	.L10
.L42:
	ldr	r7, [r0, #12]
	ldr	r3, [r4]
	mov	r0, r5
	add	r7, r7, r3
	ldr	r9, [r6]
	bl	udf_file_entry_alloc_offset
	sub	r7, r7, r0
	add	r3, r9, r7
	str	r3, [sp, #8]
	b	.L3
.L14:
	ldr	r2, [r5]
	ldr	r3, .L47+12
	ldr	r0, [r2]
	ldr	r3, [r3]
	orr	r0, r0, r3
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r2, [sp, #8]
	ldr	r0, [r4, #8]
	str	r3, [r2, #4]
	bl	cpu_to_le32
	ldr	r3, [r4, #4]
	ldr	r2, [sp, #8]
	cmp	r3, #0
	str	r0, [r2]
	bne	.L46
.L17:
	mov	r0, r5
	bl	mark_inode_dirty
	b	.L21
.L43:
	mov	r0, r10
	bl	cpu_to_le32
	ldr	r3, [sp, #12]
	str	r0, [r3, #4]
	b	.L8
.L31:
	mvn	r7, #0
	b	.L1
.L45:
	bl	__stack_chk_fail
.L48:
	.align	2
.L47:
	.word	.LC0
	.word	UDF_FLAG_STRICT
	.word	TAG_IDENT_AED
	.word	EXT_NEXT_EXTENT_ALLOCDECS
	.size	udf_add_aext, .-udf_add_aext
	.comm	UDF_FLAG_STRICT,4,4
	.comm	TAG_IDENT_AED,4,4
	.comm	EXT_NEXT_EXTENT_ALLOCDECS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
