	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fis_validate                   ## -- Begin function fis_validate
	.p2align	4, 0x90
_fis_validate:                          ## @fis_validate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r13
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_fis_open
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	cmpl	$2, %r12d
	jl	LBB0_7
## %bb.3:
	decl	%r12d
	shlq	$4, %r12
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 8(%r13,%rax)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$16, %rax
	cmpq	%rax, %r12
	jne	LBB0_5
LBB0_7:
	movq	_fis_erasesize@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rbx, %rax
	xorl	%r12d, %r12d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rbx, %rax
	jbe	LBB0_18
## %bb.8:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	shlq	$4, %r14
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%r12d
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	addq	$8, %rbx
	cmpq	%rbx, -56(%rbp)                 ## 8-byte Folded Reload
	jbe	LBB0_18
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	(%rbx), %rdi
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$255, %eax
	je	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r15), %rsi
	movl	$8, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	16(%rcx), %r13
	cmpq	%r13, %r14
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	(%rbx), %rdi
	movq	16(%r15,%rcx), %rsi
	movl	$8, %edx
	callq	_strncmp
	movq	%r13, %rcx
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_16
LBB0_18:
	xorl	%eax, %eax
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	sete	%al
	leal	(%rax,%rax), %ebx
	decl	%ebx
	jmp	LBB0_19
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_20
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$-1, %ebx
LBB0_19:
	xorl	%eax, %eax
	callq	_fis_close
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIS error: only the last partition can detect the size automatically\n"

	.comm	_fis_erasesize,4,2              ## @fis_erasesize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fis_validate                   ; -- Begin function fis_validate
	.p2align	2
_fis_validate:                          ; @fis_validate
	.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
	mov	x23, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_fis_open
	cbz	x0, LBB0_16
; %bb.1:
	mov	x21, x0
	cmp	w23, #2
	b.lt	LBB0_5
; %bb.2:
	sub	w8, w23, #1
	add	x9, x22, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	cbz	w10, LBB0_19
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_3
LBB0_5:
Lloh0:
	adrp	x8, _fis_erasesize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fis_erasesize@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	add	x23, x21, x8
	cmp	x23, x21
	b.ls	LBB0_17
; %bb.6:
	mov	w22, #0
	mov	w24, w19
	add	x25, x20, #16
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w22, w22, #1
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, #8
	cmp	x23, x21
	b.ls	LBB0_18
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x0, [x21]
	ldr	w8, [x0]
	cbz	w8, LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w8, #255
	b.eq	LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w19, #1
	b.lt	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x1, [x20]
	mov	w2, #8
	bl	_strncmp
	cbz	w0, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x26, x24
	mov	x8, x25
LBB0_14:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	subs	x26, x26, #1
	b.eq	LBB0_8
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x27, x8, #16
	ldr	x0, [x21]
	ldr	x1, [x8]
	mov	w2, #8
	bl	_strncmp
	mov	x8, x27
	cbnz	w0, LBB0_14
	b	LBB0_7
LBB0_16:
	mov	w19, #-1
	b	LBB0_21
LBB0_17:
	mov	w22, #0
LBB0_18:
	cmp	w22, w19
	mov	w8, #1
	cneg	w19, w8, ne
	b	LBB0_20
LBB0_19:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w19, #-1
LBB0_20:
	bl	_fis_close
LBB0_21:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIS error: only the last partition can detect the size automatically\n"

	.comm	_fis_erasesize,4,2              ; @fis_erasesize
.subsections_via_symbols
