	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_check_reserve           ## -- Begin function sshbuf_check_reserve
	.p2align	4, 0x90
_sshbuf_check_reserve:                  ## @sshbuf_check_reserve
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_sshbuf_check_sanity
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	cmpq	$0, 32(%rbx)
	jne	LBB0_3
## %bb.2:
	cmpl	$2, (%rbx)
	jl	LBB0_4
LBB0_3:
	movq	_SSH_ERR_BUFFER_READ_ONLY@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_SSHBUF_TELL
	movq	8(%rbx), %rcx
	subq	%r14, %rcx
	jb	LBB0_6
## %bb.5:
	movq	16(%rbx), %rdx
	subq	24(%rbx), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %rcx
	jae	LBB0_8
LBB0_6:
	movq	_SSH_ERR_NO_BUFFER_SPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_BUFFER_READ_ONLY,4,2   ## @SSH_ERR_BUFFER_READ_ONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"check"

	.comm	_SSH_ERR_NO_BUFFER_SPACE,4,2    ## @SSH_ERR_NO_BUFFER_SPACE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_check_reserve           ; -- Begin function sshbuf_check_reserve
	.p2align	2
_sshbuf_check_reserve:                  ; @sshbuf_check_reserve
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_sshbuf_check_sanity
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _SSH_ERR_BUFFER_READ_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_ERR_BUFFER_READ_ONLY@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SSHBUF_TELL
	ldr	x8, [x19, #8]
	subs	x8, x8, x20
	b.lo	LBB0_8
; %bb.7:
	ldp	x9, x10, [x19, #16]
	sub	x9, x9, x10
	cmp	x8, x9
	b.hs	LBB0_9
LBB0_8:
Lloh4:
	adrp	x8, _SSH_ERR_NO_BUFFER_SPACE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SSH_ERR_NO_BUFFER_SPACE@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_BUFFER_READ_ONLY,4,2   ; @SSH_ERR_BUFFER_READ_ONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"check"

	.comm	_SSH_ERR_NO_BUFFER_SPACE,4,2    ; @SSH_ERR_NO_BUFFER_SPACE
.subsections_via_symbols
