	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kd_send_data_packet            ## -- Begin function kd_send_data_packet
	.p2align	4, 0x90
_kd_send_data_packet:                   ## @kd_send_data_packet
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movl	%esi, %r15d
	movl	16(%rbp), %eax
	addl	%ebx, %eax
	movq	_KD_MAX_PAYLOAD@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jle	LBB0_2
## %bb.1:
	movq	_KD_E_MALFORMED@GOTPCREL(%rip), %r14
	jmp	LBB0_9
LBB0_2:
	movq	%rdi, %r13
	movq	_KD_PACKET_DATA@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, -72(%rbp)
	movl	%eax, -96(%rbp)
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	movl	%ebx, %esi
	movq	%r9, %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_kd_data_checksum
	movq	%rax, %r12
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	16(%rbp), %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_kd_data_checksum
	addq	%r12, %rax
	movq	%rax, -80(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -92(%rbp)
	movl	%r15d, -88(%rbp)
	leaq	-96(%rbp), %rsi
	movq	%r13, %rdi
	movl	$32, %edx
	callq	_iob_write
	movq	_KD_E_IOERR@GOTPCREL(%rip), %r14
	testq	%rax, %rax
	js	LBB0_9
## %bb.3:
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_iob_write
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movl	16(%rbp), %edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_iob_write
	testq	%rax, %rax
	js	LBB0_9
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_iob_write
	testq	%rax, %rax
	jns	LBB0_7
## %bb.8:
	movq	_KD_E_IOERR@GOTPCREL(%rip), %r14
	jmp	LBB0_9
LBB0_7:
	movq	_KD_E_OK@GOTPCREL(%rip), %r14
LBB0_9:
	movl	(%r14), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KD_MAX_PAYLOAD,4,2             ## @KD_MAX_PAYLOAD
	.comm	_KD_E_MALFORMED,4,2             ## @KD_E_MALFORMED
	.comm	_KD_PACKET_DATA,4,2             ## @KD_PACKET_DATA
	.comm	_KD_E_IOERR,4,2                 ## @KD_E_IOERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\252"

	.comm	_KD_E_OK,4,2                    ## @KD_E_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kd_send_data_packet            ; -- Begin function kd_send_data_packet
	.p2align	2
_kd_send_data_packet:                   ; @kd_send_data_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _KD_MAX_PAYLOAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KD_MAX_PAYLOAD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	add	w8, w6, w4
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x22, _KD_E_MALFORMED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _KD_E_MALFORMED@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	x24, x1
	mov	x19, x0
Lloh5:
	adrp	x9, _KD_PACKET_DATA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KD_PACKET_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w9, [sp, #24]
	str	w8, [sp]
	mov	x0, x3
	mov	x1, x4
	bl	_kd_data_checksum
	mov	x26, x0
	mov	x0, x21
	mov	x1, x20
	bl	_kd_data_checksum
	add	x8, x0, x26
	str	x8, [sp, #16]
	stp	w25, w24, [sp, #4]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #32
	bl	_iob_write
	tbnz	x0, #63, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_iob_write
Lloh8:
	adrp	x22, _KD_E_IOERR@GOTPAGE
Lloh9:
	ldr	x22, [x22, _KD_E_IOERR@GOTPAGEOFF]
	tbnz	x0, #63, LBB0_8
; %bb.4:
	cbz	x21, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_iob_write
	tbnz	x0, #63, LBB0_7
LBB0_6:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_iob_write
Lloh12:
	adrp	x8, _KD_E_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KD_E_OK@GOTPAGEOFF]
	cmp	x0, #0
	csel	x22, x22, x8, lt
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x22, _KD_E_IOERR@GOTPAGE
Lloh15:
	ldr	x22, [x22, _KD_E_IOERR@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x22]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_KD_MAX_PAYLOAD,4,2             ; @KD_MAX_PAYLOAD
	.comm	_KD_E_MALFORMED,4,2             ; @KD_E_MALFORMED
	.comm	_KD_PACKET_DATA,4,2             ; @KD_PACKET_DATA
	.comm	_KD_E_IOERR,4,2                 ; @KD_E_IOERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\252"

	.comm	_KD_E_OK,4,2                    ; @KD_E_OK
.subsections_via_symbols
