	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function putpkt_binary
_putpkt_binary:                         ## @putpkt_binary
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r13
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_get_remote_state
	movq	%rax, %r14
	leal	6(%rbx), %eax
	movslq	%eax, %rdi
	callq	_alloca
	movq	%rax, %r12
	movq	(%r14), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_alloca
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movb	$36, (%r12)
	leaq	1(%r12), %rcx
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	movl	%ebx, %esi
	leaq	-1(%rsi), %rdx
	movl	%esi, %eax
	andl	$3, %eax
	cmpq	$3, %rdx
	jae	LBB0_4
## %bb.3:
	xorl	%edx, %edx
                                        ## implicit-def: $r14
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	movq	%r12, %r14
	jmp	LBB0_11
LBB0_4:
	andl	$-4, %esi
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13,%rdx), %ecx
	addl	%ecx, %ebx
	movb	%cl, 1(%r12,%rdx)
	movzbl	1(%r13,%rdx), %ecx
	addl	%ecx, %ebx
	movb	%cl, 2(%r12,%rdx)
	movzbl	2(%r13,%rdx), %ecx
	addl	%ecx, %ebx
	movb	%cl, 3(%r12,%rdx)
	movzbl	3(%r13,%rdx), %ecx
	addl	%ecx, %ebx
	movb	%cl, 4(%r12,%rdx)
	addq	$4, %rdx
	movzbl	%bl, %ebx
	cmpq	%rdx, %rsi
	jne	LBB0_5
## %bb.6:
	leaq	(%r12,%rdx), %rcx
	incq	%rcx
	movq	%r12, %r14
	addq	%rdx, %r14
	testq	%rax, %rax
	je	LBB0_11
LBB0_8:
	addq	%rdx, %r13
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13,%rdx), %esi
	addl	%esi, %ebx
	movb	%sil, (%rcx,%rdx)
	movzbl	%bl, %ebx
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_9
## %bb.10:
	leaq	(%rcx,%rdx), %r14
	decq	%r14
	addq	%rdx, %rcx
LBB0_11:
	movb	$35, (%rcx)
	movl	%ebx, %eax
	shrl	$4, %eax
	movzbl	%al, %edi
	callq	_tohex
	movb	%al, 2(%r14)
	andl	$15, %ebx
	movl	%ebx, %edi
	callq	_tohex
	movb	%al, 3(%r14)
	addq	$4, %r14
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ebx
	subl	%r12d, %ebx
	movq	_remote_debug@GOTPCREL(%rip), %r13
	movq	_remote_timeout@GOTPCREL(%rip), %r14
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	incl	%r15d
	cmpl	$4, %r15d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_38
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	cmpq	$0, (%r13)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movb	$0, (%rax)
	movq	_gdb_stdlog@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf_unfiltered
	movl	(%rbx), %ecx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_fputstrn_unfiltered
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf_unfiltered
	movl	(%rbx), %edi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	callq	_gdb_flush
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	_remote_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_serial_write
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	L_.str.2(%rip), %rdi
	callq	_perror_with_name
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_17 Depth=2
	andl	$127, %ebx
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_fputc_unfiltered
	movl	$1, %r15d
LBB0_17:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edi
	callq	_readchar
	movl	%eax, %ebx
	cmpq	$0, (%r13)
	je	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$45, %ebx
	ja	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	%ebx, %eax
	movabsq	$44049184587776, %rcx           ## imm = 0x281000000000
	btq	%rax, %rcx
	jb	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$128, %ebx
	jne	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=2
	testl	%r15d, %r15d
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	$10, %edi
	callq	_putchar_unfiltered
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=2
	xorl	%r15d, %r15d
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$42, %ebx
	jg	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$36, %ebx
	jne	LBB0_39
## %bb.26:                              ##   in Loop: Header=BB0_17 Depth=2
	cmpq	$0, (%r13)
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_fprintf_unfiltered
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_read_frame
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$128, %ebx
	je	LBB0_37
## %bb.30:                              ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$45, %ebx
	je	LBB0_35
## %bb.31:                              ##   in Loop: Header=BB0_17 Depth=2
	cmpl	$43, %ebx
	je	LBB0_32
LBB0_39:                                ##   in Loop: Header=BB0_17 Depth=2
	cmpq	$0, (%r13)
	je	LBB0_17
## %bb.40:                              ##   in Loop: Header=BB0_17 Depth=2
	testl	%r15d, %r15d
	jne	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_fprintf_unfiltered
	jmp	LBB0_42
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	$0, (%r13)
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_fprintf_unfiltered
	jmp	LBB0_37
LBB0_32:
	movl	$1, %ebx
	cmpq	$0, (%r13)
	je	LBB0_34
## %bb.33:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_fprintf_unfiltered
LBB0_34:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	xorl	%ebx, %ebx
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_remote_debug,8,3               ## @remote_debug
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sending packet: "

L_.str.1:                               ## @.str.1
	.asciz	"..."

	.comm	_remote_desc,4,2                ## @remote_desc
L_.str.2:                               ## @.str.2
	.asciz	"putpkt: write failed"

	.comm	_remote_timeout,4,2             ## @remote_timeout
L_.str.3:                               ## @.str.3
	.asciz	"Ack\n"

L_.str.4:                               ## @.str.4
	.asciz	"Nak\n"

L_.str.5:                               ## @.str.5
	.asciz	"Packet instead of Ack, ignoring it\n"

L_.str.6:                               ## @.str.6
	.asciz	"putpkt: Junk: "

	.comm	_quit_flag,8,3                  ## @quit_flag
	.no_dead_strip	_putpkt_binary
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function putpkt_binary
_putpkt_binary:                         ; @putpkt_binary
	.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	x23, x1
	mov	x22, x0
	bl	_get_remote_state
	mov	x20, x0
	add	w8, w23, #6
	sxtw	x0, w8
	bl	_alloca
	mov	x25, x0
	ldr	x20, [x20]
	mov	x0, x20
	bl	_alloca
	mov	x21, x0
	mov	w9, #36
	mov	x8, x25
	strb	w9, [x8], #1
	cmp	w23, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w19, #0
	mov	w9, w23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x22], #1
	add	w11, w19, w10
	strb	w10, [x8], #1
	and	w19, w11, #0xff
	subs	x9, x9, #1
	b.ne	LBB0_2
; %bb.3:
	sub	x22, x8, #1
	b	LBB0_5
LBB0_4:
	mov	w19, #0
	mov	x22, x25
LBB0_5:
	mov	w9, #35
	strb	w9, [x8]
	lsr	w0, w19, #4
	bl	_tohex
	strb	w0, [x22, #2]
	and	w0, w19, #0xf
	bl	_tohex
	mov	w26, #0
	add	x8, x22, #4
Lloh0:
	adrp	x28, _remote_debug@GOTPAGE
Lloh1:
	ldr	x28, [x28, _remote_debug@GOTPAGEOFF]
Lloh2:
	adrp	x24, _remote_timeout@GOTPAGE
Lloh3:
	ldr	x24, [x24, _remote_timeout@GOTPAGEOFF]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	sub	w23, w8, w25
Lloh4:
	adrp	x27, _gdb_stdlog@GOTPAGE
Lloh5:
	ldr	x27, [x27, _gdb_stdlog@GOTPAGEOFF]
	strb	w0, [x22, #3]
	mov	w19, #1
	mov	x22, #44049184587776
	str	x25, [sp, #24]                  ; 8-byte Folded Spill
	str	w23, [sp, #20]                  ; 4-byte Folded Spill
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w26, w26, #1
	cmp	w26, #4
	ldr	x25, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w23, [sp, #20]                  ; 4-byte Folded Reload
	b.eq	LBB0_35
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x8, [x28]
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	strb	wzr, [x8]
	ldr	w0, [x27]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf_unfiltered
	ldr	w3, [x27]
	mov	x0, x25
	mov	x1, x23
	mov	w2, #0
	bl	_fputstrn_unfiltered
	ldr	w0, [x27]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf_unfiltered
	ldr	w0, [x27]
	bl	_gdb_flush
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh10:
	adrp	x8, _remote_desc@GOTPAGE
Lloh11:
	ldr	x8, [x8, _remote_desc@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x25
	mov	x2, x23
	bl	_serial_write
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror_with_name
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w23, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	and	w0, w25, #0x7f
	ldr	w1, [x27]
	bl	_fputc_unfiltered
	mov	w23, #1
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24]
	bl	_readchar
	mov	x25, x0
	ldr	x8, [x28]
	cbz	x8, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	w8, w25
	cmp	w25, #45
	lsl	x8, x19, x8
	and	x8, x8, x22
	ccmp	x8, #0, #4, ls
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=2
	cmp	w25, #128
	b.ne	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=2
	cbnz	w23, LBB0_22
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=2
	cmp	w25, #42
	b.gt	LBB0_23
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=2
	cmp	w25, #36
	b.ne	LBB0_26
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x28]
	cbz	x8, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	w0, [x27]
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf_unfiltered
LBB0_21:                                ;   in Loop: Header=BB0_13 Depth=2
	mov	x0, x21
	mov	x1, x20
	bl	_read_frame
	b	LBB0_13
LBB0_22:                                ;   in Loop: Header=BB0_13 Depth=2
	mov	w0, #10
	bl	_putchar_unfiltered
	mov	w23, #0
	cmp	w25, #42
	b.le	LBB0_18
LBB0_23:                                ;   in Loop: Header=BB0_13 Depth=2
	cmp	w25, #128
	b.eq	LBB0_6
; %bb.24:                               ;   in Loop: Header=BB0_13 Depth=2
	cmp	w25, #45
	b.eq	LBB0_29
; %bb.25:                               ;   in Loop: Header=BB0_13 Depth=2
	cmp	w25, #43
	b.eq	LBB0_31
LBB0_26:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x28]
	cbz	x8, LBB0_13
; %bb.27:                               ;   in Loop: Header=BB0_13 Depth=2
	cbnz	w23, LBB0_12
; %bb.28:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	w0, [x27]
Lloh17:
	adrp	x1, l_.str.6@PAGE
Lloh18:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf_unfiltered
	b	LBB0_12
LBB0_29:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x28]
	cbz	x8, LBB0_6
; %bb.30:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x27]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf_unfiltered
	b	LBB0_6
LBB0_31:
	ldr	x8, [x28]
	cbz	x8, LBB0_33
; %bb.32:
	ldr	w0, [x27]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf_unfiltered
LBB0_33:
	mov	w0, #1
LBB0_34:
	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_35:
	mov	w0, #0
	b	LBB0_34
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_remote_debug,8,3               ; @remote_debug
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sending packet: "

l_.str.1:                               ; @.str.1
	.asciz	"..."

	.comm	_remote_desc,4,2                ; @remote_desc
l_.str.2:                               ; @.str.2
	.asciz	"putpkt: write failed"

	.comm	_remote_timeout,4,2             ; @remote_timeout
l_.str.3:                               ; @.str.3
	.asciz	"Ack\n"

l_.str.4:                               ; @.str.4
	.asciz	"Nak\n"

l_.str.5:                               ; @.str.5
	.asciz	"Packet instead of Ack, ignoring it\n"

l_.str.6:                               ; @.str.6
	.asciz	"putpkt: Junk: "

	.comm	_quit_flag,8,3                  ; @quit_flag
	.no_dead_strip	_putpkt_binary
.subsections_via_symbols
