	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rdp_execute_finish
_rdp_execute_finish:                    ## @rdp_execute_finish
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_io@GOTPCREL(%rip), %r12
	movq	_SERIAL_TIMEOUT@GOTPCREL(%rip), %rbx
	leaq	L_.str(%rip), %r15
	leaq	L_.str.3(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_printf_filtered
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_serial_readchar
	cmpl	(%rbx), %eax
	je	LBB0_1
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %eax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, %eax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %eax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf_filtered
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_handle_swi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movq	_ds@GOTPCREL(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_rdp                       ## TAILCALL
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf_filtered                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_io,4,2                         ## @io
	.comm	_SERIAL_TIMEOUT,4,2             ## @SERIAL_TIMEOUT
	.comm	_QUIT,4,2                       ## @QUIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Waiting for target..\n"

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

	.comm	_ds,4,2                         ## @ds
L_.str.2:                               ## @.str.2
	.asciz	"Target reset\n"

L_.str.3:                               ## @.str.3
	.asciz	"Ignoring %x\n"

	.no_dead_strip	_rdp_execute_finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rdp_execute_finish
_rdp_execute_finish:                    ; @rdp_execute_finish
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x21, _io@GOTPAGE
Lloh1:
	ldr	x21, [x21, _io@GOTPAGEOFF]
Lloh2:
	adrp	x22, _SERIAL_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SERIAL_TIMEOUT@GOTPAGEOFF]
Lloh4:
	adrp	x19, l_.str@PAGE
Lloh5:
	add	x19, x19, l_.str@PAGEOFF
Lloh6:
	adrp	x20, l_.str.3@PAGE
Lloh7:
	add	x20, x20, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_printf_filtered
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	w1, #1
	bl	_serial_readchar
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #129
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #128
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #130
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x0, [sp]
	mov	x0, x20
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_handle_swi
	b	LBB0_3
LBB0_9:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh10:
	adrp	x1, _ds@GOTPAGE
Lloh11:
	ldr	x1, [x1, _ds@GOTPAGEOFF]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_send_rdp
LBB0_10:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_printf_filtered
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_io,4,2                         ; @io
	.comm	_SERIAL_TIMEOUT,4,2             ; @SERIAL_TIMEOUT
	.comm	_QUIT,4,2                       ; @QUIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waiting for target..\n"

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

	.comm	_ds,4,2                         ; @ds
l_.str.2:                               ; @.str.2
	.asciz	"Target reset\n"

l_.str.3:                               ; @.str.3
	.asciz	"Ignoring %x\n"

	.no_dead_strip	_rdp_execute_finish
.subsections_via_symbols
