	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mandoc_strntoi                 ## -- Begin function mandoc_strntoi
	.p2align	4, 0x90
_mandoc_strntoi:                        ## @mandoc_strntoi
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$-1, %r15d
	cmpq	$31, %rsi
	ja	LBB0_4
## %bb.1:
	movl	%edx, %r14d
	movq	%rdi, %rsi
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	movb	$0, -80(%rbp,%rbx)
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	-88(%rbp), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_strtol
	cmpb	$0, -80(%rbp)
	je	LBB0_4
## %bb.2:
	movq	-88(%rbp), %rcx
	cmpb	$0, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	cmpq	%r15, %rax
	cmovlq	%rax, %r15
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r15
	cmovleq	%rax, %r15
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r15d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_INT_MIN,8,3                    ## @INT_MIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mandoc_strntoi                 ; -- Begin function mandoc_strntoi
	.p2align	2
_mandoc_strntoi:                        ; @mandoc_strntoi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	cmp	x1, #31
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x1, x0
	add	x21, sp, #8
	add	x0, sp, #8
	mov	x2, x20
	bl	_memcpy
	strb	wzr, [x21, x20]
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
	add	x0, sp, #8
	mov	x1, sp
	mov	x2, x19
	bl	_strtol
	ldrb	w8, [sp, #8]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	x8, [sp]
	ldrb	w8, [x8]
	cbz	w8, LBB0_6
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldr	x8, [sp, #40]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.5:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #96
	ret
LBB0_6:
Lloh9:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	csel	x8, x0, x8, lt
Lloh12:
	adrp	x9, _INT_MIN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INT_MIN@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x0, x8, x9, gt
	b	LBB0_4
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_INT_MIN,8,3                    ; @INT_MIN
.subsections_via_symbols
