	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sshbuf_maybe_pack
_sshbuf_maybe_pack:                     ## @sshbuf_maybe_pack
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movslq	%esi, %rdi
	callq	_SSHBUF_DBG
	leaq	L_.str.1(%rip), %rdi
	callq	_SSHBUF_TELL
	movslq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	cmpq	$0, 24(%r14)
	jne	LBB0_8
## %bb.2:
	cmpl	$1, 4(%r14)
	jle	LBB0_3
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:
	movl	8(%r14), %edx
LBB0_5:
	movq	16(%r14), %rdi
	movq	%rax, %rsi
	addq	%rdi, %rsi
	subl	%eax, %edx
	callq	_memmove
	movl	(%r14), %eax
	subl	%eax, 8(%r14)
	movl	$0, (%r14)
	leaq	L_.str.2(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SSHBUF_TELL                    ## TAILCALL
LBB0_6:
	movq	_SSHBUF_PACK_MIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_8
## %bb.7:
	movl	8(%r14), %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	cmpl	%ecx, %eax
	jl	LBB0_8
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"pre-pack"

	.comm	_SSHBUF_PACK_MIN,4,2            ## @SSHBUF_PACK_MIN
L_.str.2:                               ## @.str.2
	.asciz	"packed"

	.no_dead_strip	_sshbuf_maybe_pack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sshbuf_maybe_pack
_sshbuf_maybe_pack:                     ; @sshbuf_maybe_pack
	.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
	sxtw	x0, w20
	bl	_SSHBUF_DBG
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_SSHBUF_TELL
	ldrsw	x8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x9, [x19, #24]
	cbnz	x9, LBB0_3
; %bb.2:
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.le	LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	cbz	w20, LBB0_7
; %bb.5:
	ldr	w9, [x19, #8]
LBB0_6:
	ldr	x0, [x19, #16]
	add	x1, x0, x8
	sub	w2, w9, w8
	bl	_memmove
	ldr	w8, [x19]
	ldr	w9, [x19, #8]
	sub	w8, w9, w8
	str	w8, [x19, #8]
	str	wzr, [x19]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SSHBUF_TELL
LBB0_7:
Lloh4:
	adrp	x9, _SSHBUF_PACK_MIN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SSHBUF_PACK_MIN@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_3
; %bb.8:
	ldr	w9, [x19, #8]
	cmp	w9, #0
	cinc	w10, w9, lt
	cmp	w8, w10, asr #1
	b.lt	LBB0_3
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"pre-pack"

	.comm	_SSHBUF_PACK_MIN,4,2            ; @SSHBUF_PACK_MIN
l_.str.2:                               ; @.str.2
	.asciz	"packed"

	.no_dead_strip	_sshbuf_maybe_pack
.subsections_via_symbols
