	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_get_cstring             ## -- Begin function sshbuf_get_cstring
	.p2align	4, 0x90
_sshbuf_get_cstring:                    ## @sshbuf_get_cstring
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	$0, (%r15)
LBB0_2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	$0, (%r14)
LBB0_4:
	leaq	-40(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sshbuf_peek_string_direct
	testl	%eax, %eax
	jne	LBB0_19
## %bb.5:
	movq	-32(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.6:
	movq	-40(%rbp), %rdi
	xorl	%esi, %esi
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	-40(%rbp), %rcx
	movq	-32(%rbp), %rdx
	leaq	(%rcx,%rdx,4), %rcx
	addq	$-4, %rcx
	cmpq	%rcx, %rax
	jae	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_SSHBUF_DBG
	movq	_SSH_ERR_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_9:
	movq	%rbx, %rdi
	callq	_sshbuf_skip_string
	movl	%eax, %ecx
	movl	$-1, %eax
	testl	%ecx, %ecx
	jne	LBB0_19
## %bb.10:
	testq	%r15, %r15
	je	LBB0_17
## %bb.11:
	movq	-32(%rbp), %rbx
	leaq	1(%rbx), %rdi
	callq	_malloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.15:
	movq	-40(%rbp), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	(%r15), %rax
	movq	-32(%rbp), %rcx
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	callq	_SSHBUF_DBG
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_14:
	xorl	%ecx, %ecx
LBB0_16:
	movb	$0, (%rax,%rcx)
LBB0_17:
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_19
## %bb.18:
	movq	-32(%rbp), %rcx
	movq	%rcx, (%r14)
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SSH_ERR_INVALID_FORMAT"

	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ## @SSH_ERR_INVALID_FORMAT
L_.str.1:                               ## @.str.1
	.asciz	"SSH_ERR_ALLOC_FAIL"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_get_cstring             ; -- Begin function sshbuf_get_cstring
	.p2align	2
_sshbuf_get_cstring:                    ; @sshbuf_get_cstring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	cbz	x1, LBB0_2
; %bb.1:
	str	xzr, [x20]
LBB0_2:
	cbz	x19, LBB0_4
; %bb.3:
	str	xzr, [x19]
LBB0_4:
	mov	x1, sp
	add	x2, sp, #8
	mov	x0, x21
	bl	_sshbuf_peek_string_direct
	cbnz	w0, LBB0_20
; %bb.5:
	ldr	x2, [sp, #8]
	cbz	x2, LBB0_9
; %bb.6:
	ldr	x0, [sp]
	mov	w1, #0
	bl	_memchr
	cbz	x0, LBB0_9
; %bb.7:
	ldp	x8, x9, [sp]
	add	x8, x8, x9, lsl #2
	sub	x8, x8, #4
	cmp	x0, x8
	b.hs	LBB0_9
; %bb.8:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SSHBUF_DBG
Lloh2:
	adrp	x8, _SSH_ERR_INVALID_FORMAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSH_ERR_INVALID_FORMAT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_20
LBB0_9:
	mov	x0, x21
	bl	_sshbuf_skip_string
	cbz	w0, LBB0_11
; %bb.10:
	mov	w0, #-1
	b	LBB0_20
LBB0_11:
	cbz	x20, LBB0_18
; %bb.12:
	ldr	x21, [sp, #8]
	add	x0, x21, #1
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_15
; %bb.13:
	cbz	x21, LBB0_16
; %bb.14:
	ldr	x1, [sp]
	mov	x2, x21
	bl	_memcpy
	ldr	x0, [x20]
	ldr	x8, [sp, #8]
	b	LBB0_17
LBB0_15:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_SSHBUF_DBG
Lloh7:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_20
LBB0_16:
	mov	x8, #0
LBB0_17:
	strb	wzr, [x0, x8]
LBB0_18:
	mov	w0, #0
	cbz	x19, LBB0_20
; %bb.19:
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_20:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SSH_ERR_INVALID_FORMAT"

	.comm	_SSH_ERR_INVALID_FORMAT,4,2     ; @SSH_ERR_INVALID_FORMAT
l_.str.1:                               ; @.str.1
	.asciz	"SSH_ERR_ALLOC_FAIL"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols
