	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function extract_file
_extract_file:                          ## @extract_file
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_SEAMA_META_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	shlq	$4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_o_msize@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_30
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_o_isize@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.2:
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movq	_o_isize@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jae	LBB0_25
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##       Child Loop BB0_27 Depth 3
                                        ##       Child Loop BB0_12 Depth 3
	movq	_o_images@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rax,%r13,8), %rdi
	xorl	%esi, %esi
	callq	_verify_seama
	movq	(%rbx), %rcx
	movq	(%rcx,%r13,8), %rsi
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_feof
	testl	%eax, %eax
	je	LBB0_7
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_fclose
	jmp	LBB0_16
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	%rbx, %rdi
	callq	_feof
	testl	%eax, %eax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_15
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_27 Depth 3
                                        ##       Child Loop BB0_12 Depth 3
	movq	%rbx, %rdi
	callq	_ferror
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movl	$1, %edx
	leaq	-88(%rbp), %rdi
	movl	$16, %esi
	movq	%rbx, %rcx
	callq	_fread
	movq	-88(%rbp), %r12
	movq	_SEAMA_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	cmpq	%rax, %r12
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	-76(%rbp), %edi
	callq	_ntohl
	movq	%rax, %r12
	movl	-80(%rbp), %edi
	callq	_ntohs
	movq	%rax, %r13
	testq	%r12, %r12
	je	LBB0_11
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	$16, %edx
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	testq	%r13, %r13
	je	LBB0_27
## %bb.18:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movq	%rbx, %rcx
	callq	_fread
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_match_meta
	testq	%rax, %rax
	jne	LBB0_19
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	(%r14), %rdx
	cmpq	%rdx, %r12
	cmovbq	%r12, %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_14
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=3
	subq	%rax, %r12
	jne	LBB0_27
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=2
	testq	%r13, %r13
	je	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	(%r14), %rdx
	cmpq	%rdx, %r13
	cmovbq	%r13, %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=3
	subq	%rax, %r13
	jne	LBB0_12
	jmp	LBB0_14
LBB0_30:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_25
LBB0_19:
	movq	_o_images@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rsi
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.4(%rip), %rsi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_fopen
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_20
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r14), %rdx
	cmpq	%rdx, %r12
	cmovbq	%r12, %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%rax, %r13
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rax, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_fwrite
	subq	%r13, %r12
	jne	LBB0_21
LBB0_23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
	jmp	LBB0_24
LBB0_20:
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_printf
LBB0_24:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_25:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SEAMA_META_SIZE,4,2        ## @MAX_SEAMA_META_SIZE
	.comm	_o_msize,8,3                    ## @o_msize
	.comm	_o_isize,8,3                    ## @o_isize
	.comm	_o_images,8,3                   ## @o_images
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"SEAMA: '%s' is not a seama file !\n"

L_.str.2:                               ## @.str.2
	.asciz	"r"

	.comm	_SEAMA_MAGIC,4,2                ## @SEAMA_MAGIC
L_.str.3:                               ## @.str.3
	.asciz	"SEAMA: found image @ '%s', image size: %zu\n"

L_.str.4:                               ## @.str.4
	.asciz	"w"

L_.str.5:                               ## @.str.5
	.asciz	"SEAMA: unable to open '%s' for writting.\n"

L_str:                                  ## @str
	.asciz	"SEAMA: need meta for searching image."

	.no_dead_strip	_extract_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function extract_file
_extract_file:                          ; @extract_file
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	mov	x8, sp
	stur	x8, [x29, #-112]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x27, _MAX_SEAMA_META_SIZE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MAX_SEAMA_META_SIZE@GOTPAGEOFF]
	ldr	w8, [x27]
	lsl	x8, x8, #4
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x19, x9, x8
	mov	sp, x19
Lloh7:
	adrp	x8, _o_msize@GOTPAGE
Lloh8:
	ldr	x8, [x8, _o_msize@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.1:
	stur	x0, [x29, #-120]                ; 8-byte Folded Spill
Lloh10:
	adrp	x28, _o_isize@GOTPAGE
Lloh11:
	ldr	x28, [x28, _o_isize@GOTPAGEOFF]
	ldr	x8, [x28]
	cbz	x8, LBB0_26
; %bb.2:
	mov	x20, #0
Lloh12:
	adrp	x26, _o_images@GOTPAGE
Lloh13:
	ldr	x26, [x26, _o_images@GOTPAGEOFF]
Lloh14:
	adrp	x22, _SEAMA_MAGIC@GOTPAGE
Lloh15:
	ldr	x22, [x22, _SEAMA_MAGIC@GOTPAGEOFF]
Lloh16:
	adrp	x23, l_.str.2@PAGE
Lloh17:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x0, [sp, #-16]!
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	add	sp, sp, #16
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	ldr	x8, [x28]
	cmp	x20, x8
	b.hs	LBB0_26
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_14 Depth 3
                                        ;       Child Loop BB0_16 Depth 3
	ldr	x8, [x26]
	lsl	x21, x20, #3
	ldr	x0, [x8, x21]
	mov	w1, #0
	bl	_verify_seama
	mov	x8, x0
	ldr	x9, [x26]
	ldr	x0, [x9, x21]
	tbnz	x8, #63, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x23
	bl	_fopen
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_14 Depth 3
                                        ;       Child Loop BB0_16 Depth 3
	mov	x0, x21
	bl	_feof
	cbnz	w0, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x21
	bl	_ferror
	cbnz	w0, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	sub	x0, x29, #104
	mov	w1, #16
	mov	w2, #1
	mov	x3, x21
	bl	_fread
	ldur	x24, [x29, #-104]
	ldr	w0, [x22]
	bl	_htonl
	cmp	x24, x0
	b.ne	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	ldur	w0, [x29, #-92]
	bl	_ntohl
	mov	x24, x0
	ldur	w0, [x29, #-96]
	bl	_ntohs
	mov	x25, x0
	cbz	x24, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	mov	w1, #1
	mov	w2, #16
	mov	x3, x21
	bl	_fread
	cbz	x25, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	mov	w1, #1
	mov	x2, x25
	mov	x3, x21
	bl	_fread
	mov	x0, x19
	mov	x1, x25
	bl	_match_meta
	cbnz	x0, LBB0_19
LBB0_14:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldrsw	x8, [x27]
	cmp	x24, x8
	csel	x2, x24, x8, lo
	mov	x0, x19
	mov	w1, #1
	mov	x3, x21
	bl	_fread
	sub	x24, x24, x0
	cmp	x0, #0
	ccmp	x24, #0, #4, ne
	b.ne	LBB0_14
	b	LBB0_8
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=2
	cbz	x25, LBB0_8
LBB0_16:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldrsw	x8, [x27]
	cmp	x25, x8
	csel	x2, x25, x8, lo
	mov	x0, x19
	mov	w1, #1
	mov	x3, x21
	bl	_fread
	sub	x25, x25, x0
	cmp	x0, #0
	ccmp	x25, #0, #4, ne
	b.ne	LBB0_16
	b	LBB0_8
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_fclose
	b	LBB0_4
LBB0_18:
Lloh20:
	adrp	x0, l_str@PAGE
Lloh21:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_26
LBB0_19:
	ldr	x8, [x26]
	ldr	x8, [x8, x20, lsl #3]
	stp	x8, x24, [sp, #-16]!
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	add	sp, sp, #16
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	ldur	x20, [x29, #-120]               ; 8-byte Folded Reload
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_24
; %bb.20:
	mov	x22, x0
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x27]
	cmp	x24, x8
	csel	x2, x24, x8, lo
	mov	x0, x19
	mov	w1, #1
	mov	x3, x21
	bl	_fread
	cbz	x0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	mov	x3, x22
	bl	_fwrite
	subs	x24, x24, x20
	b.ne	LBB0_21
LBB0_23:
	mov	x0, x22
	bl	_fclose
	b	LBB0_25
LBB0_24:
	str	x20, [sp, #-16]!
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	add	sp, sp, #16
LBB0_25:
	mov	x0, x21
	bl	_fclose
LBB0_26:
	ldur	x8, [x29, #-112]                ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-88]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SEAMA_META_SIZE,4,2        ; @MAX_SEAMA_META_SIZE
	.comm	_o_msize,8,3                    ; @o_msize
	.comm	_o_isize,8,3                    ; @o_isize
	.comm	_o_images,8,3                   ; @o_images
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"SEAMA: '%s' is not a seama file !\n"

l_.str.2:                               ; @.str.2
	.asciz	"r"

	.comm	_SEAMA_MAGIC,4,2                ; @SEAMA_MAGIC
l_.str.3:                               ; @.str.3
	.asciz	"SEAMA: found image @ '%s', image size: %zu\n"

l_.str.4:                               ; @.str.4
	.asciz	"w"

l_.str.5:                               ; @.str.5
	.asciz	"SEAMA: unable to open '%s' for writting.\n"

l_str:                                  ; @str
	.asciz	"SEAMA: need meta for searching image."

	.no_dead_strip	_extract_file
.subsections_via_symbols
