	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_put_string              ## -- Begin function sshbuf_put_string
	.p2align	4, 0x90
_sshbuf_put_string:                     ## @sshbuf_put_string
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SSHBUF_SIZE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$-4, %rax
	cmpq	%rdx, %rax
	jae	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_SSHBUF_DBG
	movq	_SSH_ERR_NO_BUFFER_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%rdx, %r15
	movq	%rsi, %r14
	leaq	4(%rdx), %rsi
	leaq	-32(%rbp), %rdx
	callq	_sshbuf_reserve
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	-32(%rbp), %rdi
	movq	%r15, %rsi
	callq	_POKE_U32
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	-32(%rbp), %rdi
	addq	$16, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	jmp	LBB0_6
LBB0_3:
	movl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSHBUF_SIZE_MAX,4,2            ## @SSHBUF_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SSH_ERR_NO_BUFFER_SPACE"

	.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_put_string              ; -- Begin function sshbuf_put_string
	.p2align	2
_sshbuf_put_string:                     ; @sshbuf_put_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _SSHBUF_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSHBUF_SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	sub	x8, x8, #4
	cmp	x8, x2
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SSHBUF_DBG
Lloh5:
	adrp	x8, _SSH_ERR_NO_BUFFER_SPACE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_NO_BUFFER_SPACE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	add	x1, x2, #4
	add	x2, sp, #8
	bl	_sshbuf_reserve
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x0, [sp, #8]
	mov	x1, x19
	bl	_POKE_U32
	cbz	x19, LBB0_5
; %bb.4:
	ldr	x8, [sp, #8]
	add	x0, x8, #16
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SSHBUF_SIZE_MAX,4,2            ; @SSHBUF_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SSH_ERR_NO_BUFFER_SPACE"

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