	.file	"extr_alloc.c_hpfs_alloc_fnode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	hpfs_alloc_fnode
	.type	hpfs_alloc_fnode, @function
hpfs_alloc_fnode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xor	r12d, r12d
	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
	mov	rbx, rdx
	mov	edx, 1
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	ecx, DWORD PTR FNODE_ALLOC_FWD[rip]
	call	hpfs_alloc_sector@PLT
	mov	DWORD PTR [rbx], eax
	test	eax, eax
	je	.L1
	mov	esi, eax
	mov	rdx, r13
	mov	rdi, rbp
	call	hpfs_get_sector@PLT
	mov	r12, rax
	test	rax, rax
	je	.L8
	mov	edx, 512
	xor	esi, esi
	mov	rdi, rax
	call	memset@PLT
	mov	edi, DWORD PTR FNODE_MAGIC[rip]
	call	cpu_to_le32@PLT
	mov	edi, 196
	mov	DWORD PTR 24[r12], eax
	call	cpu_to_le16@PLT
	mov	DWORD PTR [r12], 8
	mov	edi, 8
	mov	QWORD PTR 16[r12], rax
	call	cpu_to_le16@PLT
	mov	QWORD PTR 8[r12], rax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	mov	edx, 1
	mov	rdi, rbp
	call	hpfs_free_sectors@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	hpfs_alloc_fnode, .-hpfs_alloc_fnode
	.comm	FNODE_MAGIC,4,4
	.comm	FNODE_ALLOC_FWD,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_alloc.c_hpfs_alloc_fnode.c"
	.text
	.align	2
	.global	hpfs_alloc_fnode
	.syntax unified
	.arm
	.fpu softvfp
	.type	hpfs_alloc_fnode, %function
hpfs_alloc_fnode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r3
	ldr	r3, .L8
	mov	r5, r2
	ldr	r3, [r3]
	mov	r2, #1
	mov	r6, r0
	bl	hpfs_alloc_sector
	subs	r1, r0, #0
	moveq	r4, r1
	str	r0, [r5]
	beq	.L1
	mov	r2, r4
	mov	r0, r6
	bl	hpfs_get_sector
	subs	r4, r0, #0
	beq	.L7
	mov	r2, #512
	mov	r1, #0
	bl	memset
	ldr	r3, .L8+4
	ldr	r0, [r3]
	bl	cpu_to_le32
	mov	r3, r0
	mov	r0, #196
	str	r3, [r4, #12]
	bl	cpu_to_le16
	mov	r3, #8
	str	r0, [r4, #8]
	str	r3, [r4]
	mov	r0, r3
	bl	cpu_to_le16
	str	r0, [r4, #4]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L7:
	mov	r0, r6
	mov	r2, #1
	ldr	r1, [r5]
	bl	hpfs_free_sectors
	b	.L1
.L9:
	.align	2
.L8:
	.word	FNODE_ALLOC_FWD
	.word	FNODE_MAGIC
	.size	hpfs_alloc_fnode, .-hpfs_alloc_fnode
	.comm	FNODE_MAGIC,4,4
	.comm	FNODE_ALLOC_FWD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
