	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scanformat
_scanformat:                            ## @scanformat
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movb	(%rsi), %al
	movq	%rsi, %rbx
	testb	%al, %al
	je	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %r13
	movq	%r12, %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %esi
	movq	%r13, %rdi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_2
LBB0_4:
	movq	%rbx, %rax
	subq	%r12, %rax
	cmpq	$6, %rax
	jb	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_luaL_error
LBB0_6:
	movsbl	(%rbx), %edi
	callq	_uchar
	movl	%eax, %edi
	callq	_isdigit
	cmpq	$1, %rax
	sbbq	$-1, %rbx
	movsbl	(%rbx), %edi
	callq	_uchar
	movl	%eax, %edi
	callq	_isdigit
	cmpq	$1, %rax
	sbbq	$-1, %rbx
	movb	(%rbx), %al
	cmpb	$46, %al
	jne	LBB0_8
## %bb.7:
	leaq	1(%rbx), %r13
	movsbl	1(%rbx), %edi
	callq	_uchar
	movl	%eax, %edi
	callq	_isdigit
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	2(%rbx), %r15
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	cmoveq	%r13, %r15
	negq	%rcx
	movsbl	2(%rbx,%rcx), %edi
	callq	_uchar
	movl	%eax, %edi
	callq	_isdigit
	cmpq	$1, %rax
	sbbq	$-1, %r15
	movb	(%r15), %al
	movq	%r15, %rbx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_8:
	movsbl	%al, %edi
	callq	_uchar
	movl	%eax, %edi
	callq	_isdigit
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_luaL_error
LBB0_10:
	leaq	1(%r14), %rdi
	movb	$37, (%r14)
	movq	%rbx, %r15
	subq	%r12, %r15
	leaq	1(%r15), %rdx
	movq	%r12, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strncpy
	movb	$0, 2(%r14,%r15)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-+ #0"

L_.str.1:                               ## @.str.1
	.asciz	"invalid format (repeated flags)"

L_.str.2:                               ## @.str.2
	.asciz	"invalid format (width or precision too long)"

	.no_dead_strip	_scanformat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scanformat
_scanformat:                            ; @scanformat
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldrb	w8, [x1]
	mov	x23, x1
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	mov	x23, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w1, w8
	mov	x0, x22
	bl	_strchr
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x23, #1]!
	cbnz	w8, LBB0_2
LBB0_4:
	sub	x8, x23, x20
	cmp	x8, #6
	b.lo	LBB0_6
; %bb.5:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_luaL_error
LBB0_6:
	mov	x22, x23
	ldrsb	w0, [x22], #1
	bl	_uchar
	bl	_isdigit
	cmp	x0, #0
	csel	x22, x23, x22, eq
	mov	x23, x22
	ldrsb	w0, [x23], #1
	bl	_uchar
	bl	_isdigit
	cmp	x0, #0
	csel	x22, x22, x23, eq
	ldrb	w8, [x22]
	cmp	w8, #46
	b.ne	LBB0_8
; %bb.7:
	mov	x23, x22
	ldrsb	w0, [x23, #1]!
	bl	_uchar
	bl	_isdigit
	add	x8, x22, #2
	mov	w9, #1
	cmp	x0, #0
	csel	x23, x23, x8, eq
	cinc	x8, x9, ne
	ldrsb	w0, [x22, x8]
	bl	_uchar
	bl	_isdigit
	cmp	x0, #0
	cinc	x22, x23, ne
	ldrb	w8, [x22]
LBB0_8:
	sxtb	w0, w8
	bl	_uchar
	bl	_isdigit
	cbz	x0, LBB0_10
; %bb.9:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_luaL_error
LBB0_10:
	mov	w8, #37
	strb	w8, [x19], #1
	sub	x8, x22, x20
	add	x21, x8, #1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_strncpy
	strb	wzr, [x19, x21]
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-+ #0"

l_.str.1:                               ; @.str.1
	.asciz	"invalid format (repeated flags)"

l_.str.2:                               ; @.str.2
	.asciz	"invalid format (width or precision too long)"

	.no_dead_strip	_scanformat
.subsections_via_symbols
