	.file	"extr_kd.c_kd_send_data_packet.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\252"
	.text
	.p2align 4
	.globl	kd_send_data_packet
	.type	kd_send_data_packet, @function
kd_send_data_packet:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	r15d, DWORD PTR 128[rsp]
	lea	eax, [r8+r15]
	cmp	eax, DWORD PTR KD_MAX_PAYLOAD[rip]
	jle	.L2
	mov	eax, DWORD PTR KD_E_MALFORMED[rip]
.L1:
	mov	rbx, QWORD PTR 56[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L15
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L2:
	.cfi_restore_state
	mov	r14, rcx
	mov	ecx, DWORD PTR KD_PACKET_DATA[rip]
	mov	r13, r9
	mov	DWORD PTR 8[rsp], esi
	mov	rbp, rdi
	mov	esi, r8d
	mov	rdi, r14
	mov	DWORD PTR 12[rsp], edx
	mov	DWORD PTR 40[rsp], ecx
	mov	r12d, r8d
	mov	DWORD PTR 16[rsp], eax
	call	kd_data_checksum@PLT
	mov	esi, r15d
	mov	rdi, r13
	mov	rbx, rax
	call	kd_data_checksum@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	r10d, DWORD PTR 8[rsp]
	mov	rdi, rbp
	add	rbx, rax
	lea	rsi, 16[rsp]
	mov	DWORD PTR 20[rsp], edx
	mov	edx, 32
	mov	QWORD PTR 32[rsp], rbx
	mov	DWORD PTR 24[rsp], r10d
	call	iob_write@PLT
	test	rax, rax
	js	.L13
	mov	edx, r12d
	mov	rsi, r14
	mov	rdi, rbp
	call	iob_write@PLT
	test	rax, rax
	js	.L13
	test	r13, r13
	je	.L6
	mov	edx, r15d
	mov	rsi, r13
	mov	rdi, rbp
	call	iob_write@PLT
	test	rax, rax
	js	.L13
.L6:
	mov	edx, 1
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	iob_write@PLT
	test	rax, rax
	mov	eax, DWORD PTR KD_E_IOERR[rip]
	cmovns	eax, DWORD PTR KD_E_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR KD_E_IOERR[rip]
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kd_send_data_packet, .-kd_send_data_packet
	.comm	KD_PACKET_DATA,4,4
	.comm	KD_MAX_PAYLOAD,4,4
	.comm	KD_E_OK,4,4
	.comm	KD_E_MALFORMED,4,4
	.comm	KD_E_IOERR,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_kd.c_kd_send_data_packet.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\252\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kd_send_data_packet
	.syntax unified
	.arm
	.fpu softvfp
	.type	kd_send_data_packet, %function
kd_send_data_packet:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L16
	sub	sp, sp, #28
	ldr	fp, [sp, #64]
	ldr	r9, [sp, #72]
	ldr	lr, [ip]
	mov	r5, r3
	add	ip, fp, r9
	ldr	r3, .L16+4
	cmp	ip, lr
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r10, [sp, #68]
	ble	.L2
	ldr	r3, .L16+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L16+12
	mov	r4, r0
	ldr	r3, [r3]
	mov	r6, r1
	mov	r0, r5
	mov	r1, fp
	mov	r7, r2
	str	ip, [sp]
	str	r3, [sp, #16]
	bl	kd_data_checksum
	mov	r1, r9
	mov	r8, r0
	mov	r0, r10
	bl	kd_data_checksum
	mov	r2, #20
	add	r8, r8, r0
	mov	r1, sp
	mov	r0, r4
	str	r8, [sp, #12]
	str	r7, [sp, #4]
	str	r6, [sp, #8]
	bl	iob_write
	cmp	r0, #0
	blt	.L13
	mov	r2, fp
	mov	r1, r5
	mov	r0, r4
	bl	iob_write
	cmp	r0, #0
	blt	.L13
	cmp	r10, #0
	beq	.L6
	mov	r2, r9
	mov	r1, r10
	mov	r0, r4
	bl	iob_write
	cmp	r0, #0
	blt	.L13
.L6:
	mov	r0, r4
	mov	r2, #1
	ldr	r1, .L16+16
	bl	iob_write
	cmp	r0, #0
	ldrge	r3, .L16+20
	ldrge	r0, [r3]
	bge	.L1
.L13:
	ldr	r3, .L16+24
	ldr	r0, [r3]
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	KD_MAX_PAYLOAD
	.word	.LC1
	.word	KD_E_MALFORMED
	.word	KD_PACKET_DATA
	.word	.LC0
	.word	KD_E_OK
	.word	KD_E_IOERR
	.size	kd_send_data_packet, .-kd_send_data_packet
	.comm	KD_PACKET_DATA,4,4
	.comm	KD_MAX_PAYLOAD,4,4
	.comm	KD_E_OK,4,4
	.comm	KD_E_MALFORMED,4,4
	.comm	KD_E_IOERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
