	.file	"extr_oseama.c_oseama_entity_write_hdr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Couldn't write Seama entity header to %s\n"
	.text
	.p2align 4
	.type	oseama_entity_write_hdr, @function
oseama_entity_write_hdr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	mov	r15, rsi
	add	esi, 32
	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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 600
	.cfi_def_cfa_offset 656
	mov	QWORD PTR 8[rsp], rdx
	mov	edx, DWORD PTR SEEK_SET[rip]
	lea	r13, 28[rsp]
	lea	rbp, 64[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 584[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR 32[rsp], xmm0
	movaps	XMMWORD PTR 48[rsp], xmm0
	call	fseek@PLT
	mov	rdi, r13
	call	MD5_Init@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, r14
	mov	rsi, rbp
	mov	rdi, r13
	sub	rbx, r14
	call	MD5_Update@PLT
.L2:
	mov	rsi, rbx
	mov	edi, 512
	call	oseama_min@PLT
	mov	rcx, r12
	mov	esi, 1
	mov	rdi, rbp
	mov	edx, eax
	call	fread@PLT
	mov	r14, rax
	test	rax, rax
	jne	.L3
	mov	edi, DWORD PTR 56[rsp]
	mov	rsi, r13
	call	MD5_Final@PLT
	mov	rdi, QWORD PTR SEAMA_MAGIC[rip]
	call	cpu_to_be32@PLT
	mov	rdi, r15
	mov	QWORD PTR 48[rsp], rax
	call	cpu_to_be16@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	DWORD PTR 40[rsp], eax
	call	cpu_to_be32@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	xor	esi, esi
	mov	rdi, r12
	mov	QWORD PTR 32[rsp], rax
	call	fseek@PLT
	lea	rdi, 32[rsp]
	mov	rcx, r12
	mov	edx, 32
	mov	esi, 1
	call	fwrite@PLT
	mov	r8, rax
	xor	eax, eax
	cmp	r8, 32
	jne	.L10
.L1:
	mov	rcx, QWORD PTR 584[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L11
	add	rsp, 600
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	mov	rdx, QWORD PTR seama_path[rip]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	oseama_entity_write_hdr, .-oseama_entity_write_hdr
	.comm	stderr,4,4
	.comm	seama_path,8,8
	.comm	SEEK_SET,4,4
	.comm	SEAMA_MAGIC,8,8
	.comm	EIO,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_oseama.c_oseama_entity_write_hdr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Couldn't write Seama entity header to %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	oseama_entity_write_hdr, %function
oseama_entity_write_hdr:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r7, r2
	ldr	r9, .L11
	ldr	ip, .L11+4
	sub	sp, sp, #540
	mov	r8, r1
	ldr	r2, [r9]
	add	r1, r1, #16
	ldr	ip, [ip]
	str	ip, [sp, #532]
	mov	ip,#0
	mov	r6, r0
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	bl	fseek
	mov	r0, sp
	mov	r5, r7
	bl	MD5_Init
	b	.L2
.L3:
	mov	r2, r4
	mov	r0, sp
	add	r1, sp, #20
	bl	MD5_Update
	sub	r5, r5, r4
.L2:
	mov	r1, r5
	mov	r0, #512
	bl	oseama_min
	mov	r3, r6
	mov	r2, r0
	mov	r1, #1
	add	r0, sp, #20
	bl	fread
	subs	r4, r0, #0
	bne	.L3
	mov	r1, sp
	ldr	r0, [sp, #16]
	bl	MD5_Final
	ldr	r3, .L11+8
	ldr	r0, [r3]
	bl	cpu_to_be32
	mov	r3, r0
	mov	r0, r8
	str	r3, [sp, #12]
	bl	cpu_to_be16
	mov	r3, r0
	mov	r0, r7
	str	r3, [sp, #8]
	bl	cpu_to_be32
	mov	r3, r0
	mov	r1, r4
	ldr	r2, [r9]
	mov	r0, r6
	str	r3, [sp, #4]
	bl	fseek
	mov	r3, r6
	mov	r2, #16
	mov	r1, #1
	add	r0, sp, #4
	bl	fwrite
	cmp	r0, #16
	moveq	r0, r4
	bne	.L9
.L1:
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [sp, #532]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #540
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L9:
	ldr	r3, .L11+12
	ldr	r2, .L11+16
	ldr	r0, [r3]
	ldr	r2, [r2]
	ldr	r1, .L11+20
	bl	fprintf
	ldr	r3, .L11+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	SEEK_SET
	.word	.LC1
	.word	SEAMA_MAGIC
	.word	stderr
	.word	seama_path
	.word	.LC0
	.word	EIO
	.size	oseama_entity_write_hdr, .-oseama_entity_write_hdr
	.comm	stderr,4,4
	.comm	seama_path,4,4
	.comm	SEEK_SET,4,4
	.comm	SEAMA_MAGIC,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
