	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getpkt                         ## -- Begin function getpkt
	.p2align	4, 0x90
_getpkt:                                ## @getpkt
	.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, %r14
	movq	_stderr@GOTPCREL(%rip), %r15
	movq	_remote_debug@GOTPCREL(%rip), %r12
	movl	$-1, %r13d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	xorl	%eax, %eax
	callq	_readchar
	cmpl	$36, %eax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_readchar
	testl	%eax, %eax
	js	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$35, %eax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movb	%al, (%r14,%r12)
	addb	%al, %r15b
	xorl	%eax, %eax
	callq	_readchar
	incq	%r12
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	cmpq	$0, (%r12)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r15), %edi
	callq	_fflush
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	jns	LBB0_1
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movb	$0, (%r14,%r12)
	xorl	%eax, %eax
	callq	_readchar
	movl	%eax, %edi
	callq	_fromhex
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_readchar
	movl	%eax, %edi
	callq	_fromhex
	movzbl	%r15b, %ecx
	movzbl	%bl, %esi
	shll	$4, %esi
	movzbl	%al, %edx
	addl	%esi, %edx
	cmpl	%ecx, %edx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_stderr@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_fprintf
	movq	_remote_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edx
	callq	_write
	movq	_remote_debug@GOTPCREL(%rip), %r12
	jmp	LBB0_1
LBB0_9:
	movl	$-1, %r13d
	jmp	LBB0_17
LBB0_12:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_stderr@GOTPCREL(%rip), %rbx
	je	LBB0_14
## %bb.13:
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	callq	_fflush
LBB0_14:
	movq	_remote_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edx
	callq	_write
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.15:
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	callq	_fflush
LBB0_16:
	movl	%r12d, %r13d
LBB0_17:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_remote_debug,8,3               ## @remote_debug
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[getpkt: discarding char '%c']\n"

L_.str.1:                               ## @.str.1
	.asciz	"Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n"

	.comm	_remote_desc,4,2                ## @remote_desc
L_.str.2:                               ## @.str.2
	.asciz	"-"

L_.str.3:                               ## @.str.3
	.asciz	"getpkt (\"%s\");  [sending ack] \n"

L_.str.4:                               ## @.str.4
	.asciz	"+"

L_.str.5:                               ## @.str.5
	.asciz	"[sent ack]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getpkt                         ; -- Begin function getpkt
	.p2align	2
_getpkt:                                ; @getpkt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x25, _stderr@GOTPAGE
Lloh1:
	ldr	x25, [x25, _stderr@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str.1@PAGE
Lloh3:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh4:
	adrp	x27, _remote_desc@GOTPAGE
Lloh5:
	ldr	x27, [x27, _remote_desc@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str.2@PAGE
Lloh7:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh8:
	adrp	x26, _remote_debug@GOTPAGE
Lloh9:
	ldr	x26, [x26, _remote_debug@GOTPAGEOFF]
Lloh10:
	adrp	x22, l_.str@PAGE
Lloh11:
	add	x22, x22, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	bl	_readchar
	cmp	w0, #36
	b.ne	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_readchar
	tbnz	w0, #31, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, #0
	mov	w28, #0
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w0, #35
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	strb	w0, [x19, x23]
	add	w28, w28, w0
	bl	_readchar
	add	x23, x23, #1
	tbz	w0, #31, LBB0_4
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	ldr	x8, [x26]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x25]
	str	x23, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x25]
	bl	_fflush
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	tbz	w23, #31, LBB0_1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	strb	wzr, [x19, x23]
	bl	_readchar
	bl	_fromhex
	mov	x24, x0
	bl	_readchar
	bl	_fromhex
	and	w9, w28, #0xff
	add	w8, w0, w24, lsl #4
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x25]
	stp	x9, x19, [sp, #8]
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	ldr	w0, [x27]
	mov	x1, x21
	mov	w2, #1
	bl	_write
	b	LBB0_1
LBB0_11:
	mov	w23, #-1
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	ldr	x8, [x26]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w0, [x25]
	str	x19, [sp]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	ldr	w0, [x25]
	bl	_fflush
LBB0_15:
	ldr	w0, [x27]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #1
	bl	_write
	ldr	x8, [x26]
	cbz	x8, LBB0_12
; %bb.16:
	ldr	w0, [x25]
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	ldr	w0, [x25]
	bl	_fflush
	b	LBB0_12
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_remote_debug,8,3               ; @remote_debug
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[getpkt: discarding char '%c']\n"

l_.str.1:                               ; @.str.1
	.asciz	"Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n"

	.comm	_remote_desc,4,2                ; @remote_desc
l_.str.2:                               ; @.str.2
	.asciz	"-"

l_.str.3:                               ; @.str.3
	.asciz	"getpkt (\"%s\");  [sending ack] \n"

l_.str.4:                               ; @.str.4
	.asciz	"+"

l_.str.5:                               ; @.str.5
	.asciz	"[sent ack]\n"

.subsections_via_symbols
