	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocd_put_packet
_ocd_put_packet:                        ## @ocd_put_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	leal	2(%r14), %edi
	callq	_alloca
	movb	$85, (%rax)
	movq	%rax, %rcx
	incq	%rcx
	xorl	%esi, %esi
	testl	%r14d, %r14d
	jle	LBB0_1
## %bb.2:
	leal	-1(%r14), %edx
	cmpl	$3, %edx
	jae	LBB0_4
## %bb.3:
                                        ## implicit-def: $rdx
                                        ## implicit-def: $edi
	testb	$3, %r14b
	jne	LBB0_8
	jmp	LBB0_11
LBB0_1:
	xorl	%edi, %edi
	movq	%rax, %rdx
	jmp	LBB0_11
LBB0_4:
	movl	%r14d, %edx
	andl	$-4, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15), %edi
	addl	%edi, %esi
	movb	%dil, (%rcx)
	movzbl	1(%r15), %edi
	addl	%edi, %esi
	movb	%dil, 1(%rcx)
	movzbl	2(%r15), %edi
	addl	%edi, %esi
	movb	%dil, 2(%rcx)
	movzbl	%sil, %edi
	movzbl	3(%r15), %esi
	addq	$4, %r15
	addl	%esi, %edi
	movb	%sil, 3(%rcx)
	movzbl	%dil, %esi
	addq	$4, %rcx
	addl	$-4, %edx
	jne	LBB0_5
## %bb.6:
	movq	%rcx, %rdx
	decq	%rdx
	testb	$3, %r14b
	je	LBB0_11
LBB0_8:
	andl	$3, %r14d
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15,%rdx), %ebx
	movl	%esi, %edi
	addl	%ebx, %edi
	movb	%bl, (%rcx)
	movzbl	%dil, %esi
	incq	%rcx
	incq	%rdx
	cmpl	%edx, %r14d
	jne	LBB0_9
## %bb.10:
	leaq	-1(%rcx), %rdx
LBB0_11:
	negb	%dil
	movb	%dil, (%rcx)
	movq	_ocd_desc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	subl	%eax, %edx
	addl	$2, %edx
	movq	%rax, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_serial_write
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_perror_with_name               ## TAILCALL
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ocd_desc,4,2                   ## @ocd_desc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"output_packet: write failed"

	.no_dead_strip	_ocd_put_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocd_put_packet
_ocd_put_packet:                        ; @ocd_put_packet
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	add	w0, w1, #2
	bl	_alloca
	mov	x1, x0
	mov	w9, #85
	mov	x8, x0
	strb	w9, [x8], #1
	cmp	w20, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w11, #0
	add	w10, w20, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x19], #1
	add	w9, w11, w12
	strb	w12, [x8], #1
	and	w11, w9, #0xff
	sub	w10, w10, #1
	cmp	w10, #1
	b.hi	LBB0_2
; %bb.3:
	sub	x10, x8, #1
	b	LBB0_5
LBB0_4:
	mov	w9, #0
	mov	x10, x1
LBB0_5:
	neg	w9, w9
	strb	w9, [x8]
Lloh0:
	adrp	x8, _ocd_desc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ocd_desc@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	sub	w8, w10, w1
	add	w2, w8, #2
	bl	_serial_write
	cbz	x0, LBB0_7
; %bb.6:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_perror_with_name
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ocd_desc,4,2                   ; @ocd_desc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"output_packet: write failed"

	.no_dead_strip	_ocd_put_packet
.subsections_via_symbols
