	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_allocate                ## -- Begin function sshbuf_allocate
	.p2align	4, 0x90
_sshbuf_allocate:                       ## @sshbuf_allocate
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_SSHBUF_DBG
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sshbuf_check_reserve
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	(%rbx), %rax
	addq	%r14, %rax
	xorl	%esi, %esi
	cmpq	8(%rbx), %rax
	seta	%sil
	movq	%rbx, %rdi
	callq	_sshbuf_maybe_pack
	leaq	L_.str.1(%rip), %rdi
	callq	_SSHBUF_TELL
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	xorl	%r15d, %r15d
	movq	%rdi, %r13
	subq	16(%rbx), %r13
	jbe	LBB0_9
## %bb.2:
	movq	_SSHBUF_SIZE_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ROUNDUP
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_SSHBUF_DBG
	cmpq	8(%rbx), %r12
	jbe	LBB0_4
## %bb.3:
	addq	16(%rbx), %r13
	movq	%r13, %r12
LBB0_4:
	movq	%r12, %rdi
	callq	_SSHBUF_DBG
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rdi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_recallocarray
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r12, 16(%rbx)
	movq	%rax, 24(%rbx)
	movq	%rax, 32(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sshbuf_check_reserve
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	leaq	L_.str.5(%rip), %rdi
	callq	_SSHBUF_TELL
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.4(%rip), %rdi
	callq	_SSHBUF_DBG
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r15d
LBB0_9:
	movl	%r15d, %eax
	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.1:                               ## @.str.1
	.asciz	"allocate"

	.comm	_SSHBUF_SIZE_INC,4,2            ## @SSHBUF_SIZE_INC
L_.str.4:                               ## @.str.4
	.asciz	"realloc fail"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
L_.str.5:                               ## @.str.5
	.asciz	"done"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_allocate                ; -- Begin function sshbuf_allocate
	.p2align	2
_sshbuf_allocate:                       ; @sshbuf_allocate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_SSHBUF_DBG
	mov	x0, x20
	mov	x1, x19
	bl	_sshbuf_check_reserve
	cbnz	w0, LBB0_9
; %bb.1:
	ldp	x8, x9, [x20]
	add	x8, x8, x19
	cmp	x8, x9
	cset	w1, hi
	mov	x0, x20
	bl	_sshbuf_maybe_pack
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_SSHBUF_TELL
	ldr	x8, [x20]
	ldr	x9, [x20, #16]
	add	x0, x8, x19
	subs	x22, x0, x9
	b.ls	LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _SSHBUF_SIZE_INC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSHBUF_SIZE_INC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_ROUNDUP
	mov	x21, x0
	bl	_SSHBUF_DBG
	ldr	x8, [x20, #8]
	cmp	x21, x8
	b.ls	LBB0_4
; %bb.3:
	ldr	x8, [x20, #16]
	add	x21, x22, x8
LBB0_4:
	mov	x0, x21
	bl	_SSHBUF_DBG
	ldp	x1, x0, [x20, #16]
	mov	x2, x21
	mov	w3, #1
	bl	_recallocarray
	cbz	x0, LBB0_8
; %bb.5:
	stp	x21, x0, [x20, #16]
	str	x0, [x20, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_sshbuf_check_reserve
	tbnz	w0, #31, LBB0_9
; %bb.6:
Lloh5:
	adrp	x0, l_.str.5@PAGE
Lloh6:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_SSHBUF_TELL
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x0, l_.str.4@PAGE
Lloh8:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_SSHBUF_DBG
Lloh9:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"allocate"

	.comm	_SSHBUF_SIZE_INC,4,2            ; @SSHBUF_SIZE_INC
l_.str.4:                               ; @.str.4
	.asciz	"realloc fail"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
l_.str.5:                               ; @.str.5
	.asciz	"done"

.subsections_via_symbols
