	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oseama_entity_write_hdr
_oseama_entity_write_hdr:               ## @oseama_entity_write_hdr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$584, %rsp                      ## imm = 0x248
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -608(%rbp)
	movq	$0, -592(%rbp)
	movq	%rsi, -584(%rbp)                ## 8-byte Spill
	addl	$32, %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_fseek
	leaq	-564(%rbp), %rdi
	callq	_MD5_Init
	movl	$512, %edi                      ## imm = 0x200
	movq	%rbx, -576(%rbp)                ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_oseama_min
	leaq	-560(%rbp), %rdi
	movl	$1, %esi
	movl	%eax, %edx
	movq	%r13, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	leaq	-564(%rbp), %r12
	leaq	-560(%rbp), %rbx
	movq	-576(%rbp), %r14                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_MD5_Update
	subq	%r15, %r14
	movl	$512, %edi                      ## imm = 0x200
	movq	%r14, %rsi
	callq	_oseama_min
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	movq	%r13, %rcx
	callq	_fread
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
LBB0_3:
	xorl	%r12d, %r12d
	leaq	-564(%rbp), %rsi
	xorl	%edi, %edi
	callq	_MD5_Final
	movq	_SEAMA_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_be32
	movq	%rax, -600(%rbp)
	movq	-584(%rbp), %rdi                ## 8-byte Reload
	callq	_cpu_to_be16
	movl	%eax, -608(%rbp)
	movq	-576(%rbp), %rdi                ## 8-byte Reload
	callq	_cpu_to_be32
	movq	%rax, -616(%rbp)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_fseek
	leaq	-616(%rbp), %rdi
	movl	$1, %esi
	movl	$32, %edx
	movq	%r13, %rcx
	callq	_fwrite
	cmpq	$32, %rax
	je	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_seama_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r12d, %eax
	addq	$584, %rsp                      ## imm = 0x248
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SEAMA_MAGIC,8,3                ## @SEAMA_MAGIC
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't write Seama entity header to %s\n"

	.comm	_seama_path,8,3                 ## @seama_path
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_oseama_entity_write_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oseama_entity_write_hdr
_oseama_entity_write_hdr:               ; @oseama_entity_write_hdr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #560
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
	add	w1, w21, #32
Lloh3:
	adrp	x24, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_fseek
	add	x0, sp, #4
	bl	_MD5_Init
	mov	w0, #512
	mov	x1, x20
	bl	_oseama_min
	mov	x2, x0
	add	x0, sp, #40
	mov	w1, #1
	mov	x3, x19
	bl	_fread
	cbz	x0, LBB0_3
; %bb.1:
	mov	x23, x0
	mov	x22, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #4
	add	x1, sp, #40
	mov	x2, x23
	bl	_MD5_Update
	sub	x22, x22, x23
	mov	w0, #512
	mov	x1, x22
	bl	_oseama_min
	mov	x2, x0
	add	x0, sp, #40
	mov	w1, #1
	mov	x3, x19
	bl	_fread
	mov	x23, x0
	cbnz	x0, LBB0_2
LBB0_3:
	add	x1, sp, #4
	mov	w0, #0
	bl	_MD5_Final
Lloh5:
	adrp	x8, _SEAMA_MAGIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEAMA_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
	bl	_cpu_to_be32
	str	x0, [sp, #24]
	mov	x0, x21
	bl	_cpu_to_be16
	str	w0, [sp, #16]
	mov	x0, x20
	bl	_cpu_to_be32
	str	x0, [sp, #8]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #0
	bl	_fseek
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #32
	mov	x3, x19
	bl	_fwrite
	mov	x8, x0
	mov	w0, #0
	cmp	x8, #32
	b.eq	LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _seama_path@GOTPAGE
Lloh12:
	ldr	x8, [x8, _seama_path@GOTPAGEOFF]
Lloh13:
	ldr	x2, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldur	x8, [x29, #-72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	add	sp, sp, #560
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SEAMA_MAGIC,8,3                ; @SEAMA_MAGIC
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't write Seama entity header to %s\n"

	.comm	_seama_path,8,3                 ; @seama_path
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_oseama_entity_write_hdr
.subsections_via_symbols
