	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_set_max_size            ## -- Begin function sshbuf_set_max_size
	.p2align	4, 0x90
_sshbuf_set_max_size:                   ## @sshbuf_set_max_size
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_SSHBUF_DBG
	movq	%r15, %rdi
	callq	_sshbuf_check_sanity
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	cmpq	%r14, (%r15)
	je	LBB0_6
## %bb.2:
	cmpq	$0, 48(%r15)
	jne	LBB0_4
## %bb.3:
	cmpl	$2, 8(%r15)
	jl	LBB0_7
LBB0_4:
	movq	_SSH_ERR_BUFFER_READ_ONLY@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_SSHBUF_SIZE_MAX@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jb	LBB0_15
## %bb.8:
	xorl	%esi, %esi
	cmpq	%r14, 16(%r15)
	seta	%sil
	movq	%r15, %rdi
	callq	_sshbuf_maybe_pack
	cmpq	%r14, 24(%r15)
	jbe	LBB0_14
## %bb.9:
	movq	16(%r15), %rdi
	cmpq	%r14, %rdi
	jae	LBB0_14
## %bb.10:
	movq	_SSHBUF_SIZE_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	cmpq	%r12, %rdi
	jb	LBB0_12
## %bb.11:
	movq	_SSHBUF_SIZE_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ROUNDUP
	movq	%rax, %r12
LBB0_12:
	cmpq	%r14, %r12
	cmovaeq	%r14, %r12
	movq	%r12, %rdi
	callq	_SSHBUF_DBG
	movq	24(%r15), %rsi
	movq	32(%r15), %rdi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_recallocarray
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:
	movq	%rax, 32(%r15)
	movq	%rax, 40(%r15)
	movq	%r12, 24(%r15)
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	callq	_SSHBUF_TELL
	cmpq	%r14, 24(%r15)
	jbe	LBB0_16
LBB0_15:
	movq	_SSH_ERR_NO_BUFFER_SPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_16:
	movq	%r14, (%r15)
	jmp	LBB0_6
LBB0_17:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_BUFFER_READ_ONLY,4,2   ## @SSH_ERR_BUFFER_READ_ONLY
	.comm	_SSHBUF_SIZE_MAX,8,3            ## @SSHBUF_SIZE_MAX
	.comm	_SSH_ERR_NO_BUFFER_SPACE,4,2    ## @SSH_ERR_NO_BUFFER_SPACE
	.comm	_SSHBUF_SIZE_INIT,8,3           ## @SSHBUF_SIZE_INIT
	.comm	_SSHBUF_SIZE_INC,4,2            ## @SSHBUF_SIZE_INC
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"new-max"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshbuf_set_max_size            ; -- Begin function sshbuf_set_max_size
	.p2align	2
_sshbuf_set_max_size:                   ; @sshbuf_set_max_size
	.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
	bl	_sshbuf_check_sanity
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x8, [x20]
	cmp	x8, x19
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_7
LBB0_3:
	ldr	x8, [x20, #48]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	w8, [x20, #8]
	cmp	w8, #2
	b.lt	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _SSH_ERR_BUFFER_READ_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_ERR_BUFFER_READ_ONLY@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	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
LBB0_8:
Lloh2:
	adrp	x8, _SSHBUF_SIZE_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSHBUF_SIZE_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x19
	b.lo	LBB0_16
; %bb.9:
	ldr	x8, [x20, #16]
	cmp	x8, x19
	cset	w1, hi
	mov	x0, x20
	bl	_sshbuf_maybe_pack
	ldr	x8, [x20, #24]
	cmp	x8, x19
	b.ls	LBB0_15
; %bb.10:
	ldr	x0, [x20, #16]
	cmp	x0, x19
	b.hs	LBB0_15
; %bb.11:
Lloh5:
	adrp	x8, _SSHBUF_SIZE_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSHBUF_SIZE_INIT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lo	LBB0_13
; %bb.12:
Lloh8:
	adrp	x8, _SSHBUF_SIZE_INC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSHBUF_SIZE_INC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_ROUNDUP
	mov	x8, x0
LBB0_13:
	cmp	x8, x19
	csel	x21, x8, x19, lo
	mov	x0, x21
	bl	_SSHBUF_DBG
	ldp	x1, x0, [x20, #24]
	mov	x2, x21
	mov	w3, #1
	bl	_recallocarray
	cbz	x0, LBB0_18
; %bb.14:
	stp	x0, x0, [x20, #32]
	str	x21, [x20, #24]
LBB0_15:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_SSHBUF_TELL
	ldr	x8, [x20, #24]
	cmp	x8, x19
	b.ls	LBB0_17
LBB0_16:
Lloh13:
	adrp	x8, _SSH_ERR_NO_BUFFER_SPACE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SSH_ERR_NO_BUFFER_SPACE@GOTPAGEOFF]
	b	LBB0_6
LBB0_17:
	mov	w0, #0
	str	x19, [x20]
	b	LBB0_7
LBB0_18:
Lloh15:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_BUFFER_READ_ONLY,4,2   ; @SSH_ERR_BUFFER_READ_ONLY
	.comm	_SSHBUF_SIZE_MAX,8,3            ; @SSHBUF_SIZE_MAX
	.comm	_SSH_ERR_NO_BUFFER_SPACE,4,2    ; @SSH_ERR_NO_BUFFER_SPACE
	.comm	_SSHBUF_SIZE_INIT,8,3           ; @SSHBUF_SIZE_INIT
	.comm	_SSHBUF_SIZE_INC,4,2            ; @SSHBUF_SIZE_INC
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"new-max"

.subsections_via_symbols
