	.file	"extr_remote-st.c_st2000_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %s %d %s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Bad arguments.  Usage: target st2000 <device> <speed>\nor target st2000 <host> <port>\n"
	.section	.rodata.str1.1
.LC2:
	.string	"\003"
.LC3:
	.string	"Remote %s connected to %s\n"
	.text
	.p2align 4
	.type	st2000_open, @function
st2000_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	mov	edi, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, esi
	sub	rsp, 120
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	call	target_preopen@PLT
	mov	rdx, QWORD PTR dev_name[rip]
	mov	r8, rsp
	lea	rcx, baudrate[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	sscanf@PLT
	cmp	eax, 2
	je	.L2
	lea	rdi, .LC1[rip]
	call	error@PLT
.L2:
	xor	edi, edi
	call	st2000_close@PLT
	mov	rdi, QWORD PTR dev_name[rip]
	call	serial_open@PLT
	mov	DWORD PTR st2000_desc[rip], eax
	mov	edi, eax
	test	eax, eax
	je	.L18
	mov	esi, DWORD PTR baudrate[rip]
	call	serial_setbaudrate@PLT
	test	rax, rax
	jne	.L19
.L4:
	mov	edi, DWORD PTR st2000_desc[rip]
	call	serial_raw@PLT
	lea	rdi, st2000_ops[rip]
	call	push_target@PLT
	lea	rdi, .LC2[rip]
	call	printf_stdebug@PLT
	mov	edi, 1
	call	expect_prompt@PLT
	test	ebx, ebx
	jne	.L20
.L1:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 120
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rdi, QWORD PTR dev_name[rip]
	call	perror_with_name@PLT
	mov	edi, DWORD PTR st2000_desc[rip]
	mov	esi, DWORD PTR baudrate[rip]
	call	serial_setbaudrate@PLT
	test	rax, rax
	je	.L4
.L19:
	mov	rdi, QWORD PTR dev_name[rip]
	call	serial_close@PLT
	mov	rdi, QWORD PTR dev_name[rip]
	call	perror_with_name@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rsi, QWORD PTR target_shortname[rip]
	lea	rdi, .LC3[rip]
	call	printf@PLT
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	st2000_open, .-st2000_open
	.comm	target_shortname,8,8
	.comm	st2000_ops,4,4
	.comm	st2000_desc,4,4
	.comm	log_file,8,8
	.comm	dev_name,8,8
	.comm	baudrate,4,4
	.comm	LOG_FILE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_remote-st.c_st2000_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	" %s %d %s\000"
	.align	2
.LC1:
	.ascii	"Bad arguments.  Usage: target st2000 <device> <spee"
	.ascii	"d>\012or target st2000 <host> <port>\012\000"
	.align	2
.LC2:
	.ascii	"\003\000"
	.align	2
.LC3:
	.ascii	"Remote %s connected to %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	st2000_open, %function
st2000_open:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r0
	ldr	r3, .L22
	sub	sp, sp, #112
	mov	r0, r1
	ldr	r5, .L22+4
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #108]
	mov	r3,#0
	bl	target_preopen
	add	r3, sp, #8
	str	r3, [sp]
	mov	r0, r6
	ldr	r2, [r5]
	ldr	r3, .L22+8
	ldr	r1, .L22+12
	bl	sscanf
	cmp	r0, #2
	beq	.L2
	ldr	r0, .L22+16
	bl	error
.L2:
	mov	r0, #0
	bl	st2000_close
	ldr	r0, [r5]
	bl	serial_open
	ldr	r6, .L22+20
	cmp	r0, #0
	str	r0, [r6]
	beq	.L18
.L3:
	ldr	r3, .L22+8
	ldr	r1, [r3]
	bl	serial_setbaudrate
	cmp	r0, #0
	bne	.L19
.L4:
	ldr	r0, [r6]
	bl	serial_raw
	ldr	r0, .L22+24
	bl	push_target
	ldr	r0, .L22+28
	bl	printf_stdebug
	mov	r0, #1
	bl	expect_prompt
	cmp	r4, #0
	bne	.L20
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #108]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #112
	@ sp needed
	pop	{r4, r5, r6, pc}
.L18:
	ldr	r0, [r5]
	bl	perror_with_name
	ldr	r0, [r6]
	b	.L3
.L20:
	ldr	r3, .L22+32
	ldr	r2, [r5]
	ldr	r1, [r3]
	ldr	r0, .L22+36
	bl	printf
	b	.L1
.L19:
	ldr	r0, [r5]
	bl	serial_close
	ldr	r0, [r5]
	bl	perror_with_name
	b	.L4
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC4
	.word	dev_name
	.word	baudrate
	.word	.LC0
	.word	.LC1
	.word	st2000_desc
	.word	st2000_ops
	.word	.LC2
	.word	target_shortname
	.word	.LC3
	.size	st2000_open, .-st2000_open
	.comm	target_shortname,4,4
	.comm	st2000_ops,4,4
	.comm	st2000_desc,4,4
	.comm	log_file,4,4
	.comm	dev_name,4,4
	.comm	baudrate,4,4
	.comm	LOG_FILE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
