	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssh_packet_start_discard
_ssh_packet_start_discard:              ## @ssh_packet_start_discard
	.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	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.1:
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	(%rbx), %r13
	movl	(%rsi), %edi
	callq	_cipher_is_cbc
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	testq	%r12, %r12
	je	LBB0_8
## %bb.3:
	cmpq	$0, 8(%r12)
	je	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sshpkt_disconnect
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	_SSH_ERR_MAC_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_6:
	cmpq	$0, (%r12)
	je	LBB0_8
## %bb.7:
	movq	%r12, 24(%r13)
	movq	%r15, (%r13)
LBB0_8:
	movl	8(%r13), %edi
	callq	_sshbuf_len
	cmpq	%r14, %rax
	jge	LBB0_11
## %bb.9:
	movl	8(%r13), %edi
	callq	_sshbuf_len
	subq	%rax, %r14
	movq	%r14, 16(%r13)
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ssh_packet_stop_discard        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Packet corrupt"

	.comm	_SSH_ERR_MAC_INVALID,4,2        ## @SSH_ERR_MAC_INVALID
	.no_dead_strip	_ssh_packet_start_discard
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssh_packet_start_discard
_ssh_packet_start_discard:              ; @ssh_packet_start_discard
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	cbz	x1, LBB0_4
; %bb.1:
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	ldr	x23, [x20]
	ldr	w0, [x1]
	bl	_cipher_is_cbc
	cbz	w0, LBB0_4
; %bb.2:
	cbz	x22, LBB0_8
; %bb.3:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_6
LBB0_4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_sshpkt_disconnect
Lloh2:
	adrp	x8, _SSH_ERR_MAC_INVALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSH_ERR_MAC_INVALID@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, w8, w0, eq
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x22]
	cbz	x8, LBB0_8
; %bb.7:
	str	x22, [x23, #24]
	str	x21, [x23]
LBB0_8:
	ldr	w0, [x23, #8]
	bl	_sshbuf_len
	cmp	x0, x19
	b.ge	LBB0_10
; %bb.9:
	ldr	w0, [x23, #8]
	bl	_sshbuf_len
	mov	x8, x0
	mov	w0, #0
	sub	x8, x19, x8
	str	x8, [x23, #16]
	b	LBB0_5
LBB0_10:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ssh_packet_stop_discard
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Packet corrupt"

	.comm	_SSH_ERR_MAC_INVALID,4,2        ; @SSH_ERR_MAC_INVALID
	.no_dead_strip	_ssh_packet_start_discard
.subsections_via_symbols
