	.file	"extr_packet.c_ssh_set_newkeys.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"set_newkeys: mode %d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"set_newkeys: rekeying, input %llu bytes %llu blocks, output %llu bytes %llu blocks"
	.section	.rodata.str1.1
.LC2:
	.string	"cipher_init_context: %d"
.LC3:
	.string	"Warning: %s"
.LC4:
	.string	"rekey after %llu blocks"
	.text
	.p2align 4
	.globl	ssh_set_newkeys
	.type	ssh_set_newkeys, @function
ssh_set_newkeys:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r13, QWORD PTR 8[rdi]
	lea	rdi, .LC0[rip]
	call	debug2@PLT
	cmp	DWORD PTR MODE_OUT[rip], ebx
	je	.L32
	lea	rax, 80[r13]
	lea	r15, 56[r13]
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR CIPHER_DECRYPT[rip]
	mov	DWORD PTR 20[rsp], eax
	lea	rax, 4[r13]
	mov	QWORD PTR 24[rsp], rax
.L3:
	mov	rax, QWORD PTR 24[r13]
	movsx	r12, ebx
	lea	r14, 0[0+r12*8]
	add	rax, r14
	cmp	QWORD PTR [rax], 0
	je	.L4
	mov	rcx, QWORD PTR 48[r13]
	mov	rdx, QWORD PTR 56[r13]
	xor	eax, eax
	lea	rdi, .LC1[rip]
	mov	rsi, QWORD PTR 72[r13]
	mov	r8, QWORD PTR 32[r13]
	call	debug@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rax]
	call	cipher_free@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 24[r13]
	mov	rdi, QWORD PTR [rax+r12*8]
	call	kex_free_newkeys@PLT
	mov	rax, QWORD PTR 24[r13]
	add	rax, r14
	mov	QWORD PTR [rax], 0
.L4:
	mov	rdx, QWORD PTR 0[rbp]
	mov	QWORD PTR [r15], 0
	mov	QWORD PTR 8[r15], 0
	mov	r15d, DWORD PTR SSH_ERR_INTERNAL_ERROR[rip]
	mov	r9, QWORD PTR [rdx]
	add	r9, r14
	mov	rdx, QWORD PTR [r9]
	mov	QWORD PTR [rax], rdx
	test	rdx, rdx
	je	.L1
	mov	QWORD PTR [r9], 0
	mov	r14, QWORD PTR [rax]
	mov	edi, DWORD PTR 40[r14]
	call	cipher_authlen@PLT
	test	rax, rax
	jne	.L9
	lea	rdi, 16[r14]
	call	mac_init@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L1
.L9:
	mov	DWORD PTR 16[r14], 1
	mov	rsi, r12
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	debug@PLT
	mov	edi, eax
	call	DBG@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	ecx, DWORD PTR 32[r14]
	mov	esi, DWORD PTR 40[r14]
	mov	eax, DWORD PTR 28[rsp]
	mov	r9d, DWORD PTR 24[r14]
	mov	r8d, DWORD PTR 28[r14]
	mov	edx, DWORD PTR 36[r14]
	push	rax
	.cfi_def_cfa_offset 112
	mov	rdi, QWORD PTR 24[rsp]
	call	cipher_init@PLT
	pop	rcx
	.cfi_def_cfa_offset 104
	pop	rsi
	.cfi_def_cfa_offset 96
	mov	r15d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR 8[r13]
	test	edx, edx
	je	.L33
.L11:
	mov	rax, QWORD PTR [r14]
	cmp	rax, QWORD PTR COMP_ZLIB[rip]
	je	.L13
	cmp	rax, QWORD PTR COMP_DELAYED[rip]
	je	.L34
.L14:
	mov	ecx, DWORD PTR 20[r14]
	cmp	ecx, 15
	jg	.L35
	mov	eax, 1073741824
	cdq
	idiv	ecx
	mov	edi, eax
	mov	rax, QWORD PTR 24[rsp]
	mov	DWORD PTR [rax], edi
	mov	eax, DWORD PTR 12[r13]
	test	eax, eax
	jne	.L36
.L19:
	movsx	rsi, edi
	xor	eax, eax
	lea	rdi, .LC4[rip]
	call	debug@PLT
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	lea	rax, 88[r13]
	mov	QWORD PTR 24[rsp], r13
	lea	r15, 32[r13]
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR CIPHER_ENCRYPT[rip]
	mov	DWORD PTR 20[rsp], eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rax, QWORD PTR 24[rsp]
	add	ecx, ecx
	mov	edi, 1
	sal	edi, cl
	mov	DWORD PTR [rax], edi
	mov	eax, DWORD PTR 12[r13]
	test	eax, eax
	je	.L19
.L36:
	cdq
	idiv	DWORD PTR 20[r14]
	mov	esi, eax
	call	MINIMUM@PLT
	mov	edi, eax
	mov	rax, QWORD PTR 24[rsp]
	mov	DWORD PTR [rax], edi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L34:
	cmp	QWORD PTR 16[r13], 0
	je	.L14
.L13:
	mov	eax, DWORD PTR 8[r14]
	test	eax, eax
	jne	.L14
	mov	rdi, rbp
	call	ssh_packet_init_compression@PLT
	test	eax, eax
	js	.L22
	cmp	DWORD PTR MODE_OUT[rip], ebx
	je	.L37
	mov	rdi, rbp
	call	start_compression_in@PLT
	test	eax, eax
	jne	.L22
.L16:
	mov	DWORD PTR 8[r14], 1
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rax]
	call	cipher_warning_message@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L11
	lea	rdi, .LC3[rip]
	call	error@PLT
	mov	DWORD PTR 8[r13], 1
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L37:
	mov	esi, 6
	mov	rdi, rbp
	call	start_compression_out@PLT
	test	eax, eax
	je	.L16
	.p2align 4,,10
	.p2align 3
.L22:
	mov	r15d, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ssh_set_newkeys, .-ssh_set_newkeys
	.comm	SSH_ERR_INTERNAL_ERROR,4,4
	.comm	MODE_OUT,4,4
	.comm	COMP_ZLIB,8,8
	.comm	COMP_DELAYED,8,8
	.comm	CIPHER_ENCRYPT,4,4
	.comm	CIPHER_DECRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_packet.c_ssh_set_newkeys.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"set_newkeys: mode %d\000"
	.align	2
.LC1:
	.ascii	"set_newkeys: rekeying, input %llu bytes %llu blocks"
	.ascii	", output %llu bytes %llu blocks\000"
	.align	2
.LC2:
	.ascii	"cipher_init_context: %d\000"
	.align	2
.LC3:
	.ascii	"Warning: %s\000"
	.global	__aeabi_idiv
	.align	2
.LC4:
	.ascii	"rekey after %llu blocks\000"
	.text
	.align	2
	.global	ssh_set_newkeys
	.syntax unified
	.arm
	.fpu softvfp
	.type	ssh_set_newkeys, %function
ssh_set_newkeys:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	mov	r4, r1
	ldr	r10, .L45
	ldr	r0, .L45+4
	sub	sp, sp, #36
	ldr	r5, [r7, #4]
	bl	debug2
	ldr	r3, [r10]
	cmp	r3, r4
	beq	.L38
	ldr	r3, .L45+8
	add	r9, r5, #48
	ldr	r3, [r3]
	add	r6, r5, #36
	str	r3, [sp, #24]
	add	r3, r5, #4
	str	r3, [sp, #28]
.L3:
	ldr	r3, [r5, #20]
	lsl	fp, r4, #2
	ldr	r2, [r3, r4, lsl #2]
	add	r3, r3, r4, lsl #2
	cmp	r2, #0
	beq	.L4
	mov	r8, #0
	ldr	r0, [r5, #24]
	ldr	r2, [r5, #44]
	asr	r1, r0, #31
	str	r0, [sp, #16]
	str	r1, [sp, #20]
	ldr	r0, [r5, #32]
	asr	r3, r2, #31
	asr	r1, r0, #31
	str	r0, [sp, #8]
	str	r1, [sp, #12]
	ldr	r0, [r5, #36]
	asr	r1, r0, #31
	stm	sp, {r0-r1}
	ldr	r0, .L45+12
	bl	debug
	ldr	r0, [r9]
	bl	cipher_free
	ldr	r3, [r5, #20]
	str	r8, [r9]
	ldr	r0, [r3, r4, lsl #2]
	bl	kex_free_newkeys
	ldr	r3, [r5, #20]
	str	r8, [r3, r4, lsl #2]
	add	r3, r3, fp
.L4:
	mov	r2, #0
	ldr	r1, [r7]
	str	r2, [r6]
	ldr	r0, [r1]
	str	r2, [r6, #4]
	ldr	r1, [r0, r4, lsl #2]
	cmp	r1, r2
	str	r1, [r3]
	beq	.L39
	str	r2, [r0, r4, lsl #2]
	ldr	r6, [r3]
	ldr	r0, [r6, #32]
	bl	cipher_authlen
	cmp	r0, #0
	bne	.L9
	add	r0, r6, #8
	bl	mac_init
	subs	r8, r0, #0
	bne	.L1
.L9:
	mov	fp, #1
	mov	r2, r4
	asr	r3, r4, #31
	ldr	r0, .L45+16
	str	fp, [r6, #8]
	bl	debug
	bl	DBG
	ldr	r0, [sp, #24]
	ldr	r3, [r6, #24]
	ldr	r2, [r6, #28]
	ldr	r1, [r6, #32]
	str	r0, [sp, #8]
	ldr	r0, [r6, #16]
	str	r0, [sp, #4]
	ldr	r0, [r6, #20]
	str	r0, [sp]
	mov	r0, r9
	bl	cipher_init
	subs	r8, r0, #0
	bne	.L1
	ldr	r3, [r5, #8]
	cmp	r3, #0
	beq	.L40
.L11:
	ldr	r2, .L45+20
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L13
	ldr	r2, .L45+24
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L41
.L14:
	ldr	r1, [r6, #12]
	cmp	r1, #15
	bgt	.L42
	mov	r0, #1073741824
	bl	__aeabi_idiv
	mov	r4, r0
.L18:
	ldr	r3, [sp, #28]
	str	r4, [r3]
	ldr	r0, [r5, #12]
	cmp	r0, #0
	bne	.L43
.L19:
	mov	r2, r4
	ldr	r0, .L45+28
	asr	r3, r4, #31
	bl	debug
.L1:
	mov	r0, r8
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L38:
	ldr	r3, .L45+32
	add	r9, r5, #52
	ldr	r3, [r3]
	add	r6, r5, #24
	str	r3, [sp, #24]
	str	r5, [sp, #28]
	b	.L3
.L39:
	ldr	r3, .L45+36
	ldr	r8, [r3]
	mov	r0, r8
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	mov	r4, #1
	lsl	r1, r1, r4
	lsl	r4, r4, r1
	b	.L18
.L41:
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L14
.L13:
	ldr	r3, [r6, #4]
	cmp	r3, #0
	bne	.L14
	mov	r0, r7
	bl	ssh_packet_init_compression
	cmp	r0, #0
	blt	.L22
	ldr	r3, [r10]
	mov	r0, r7
	cmp	r3, r4
	beq	.L44
	bl	start_compression_in
	cmp	r0, #0
	bne	.L22
.L16:
	mov	r3, #1
	str	r3, [r6, #4]
	b	.L14
.L40:
	ldr	r0, [r9]
	bl	cipher_warning_message
	subs	r1, r0, #0
	beq	.L11
	ldr	r0, .L45+40
	bl	error
	str	fp, [r5, #8]
	b	.L11
.L43:
	ldr	r1, [r6, #12]
	bl	__aeabi_idiv
	mov	r1, r0
	mov	r0, r4
	bl	MINIMUM
	ldr	r3, [sp, #28]
	mov	r4, r0
	str	r0, [r3]
	b	.L19
.L44:
	mov	r1, #6
	bl	start_compression_out
	cmp	r0, #0
	beq	.L16
.L22:
	mov	r8, r0
	b	.L1
.L46:
	.align	2
.L45:
	.word	MODE_OUT
	.word	.LC0
	.word	CIPHER_DECRYPT
	.word	.LC1
	.word	.LC2
	.word	COMP_ZLIB
	.word	COMP_DELAYED
	.word	.LC4
	.word	CIPHER_ENCRYPT
	.word	SSH_ERR_INTERNAL_ERROR
	.word	.LC3
	.size	ssh_set_newkeys, .-ssh_set_newkeys
	.comm	SSH_ERR_INTERNAL_ERROR,4,4
	.comm	MODE_OUT,4,4
	.comm	COMP_ZLIB,4,4
	.comm	COMP_DELAYED,4,4
	.comm	CIPHER_ENCRYPT,4,4
	.comm	CIPHER_DECRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
