	.file	"extr_cpm-serial.c_cpm_serial_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cpm_serial_open, @function
cpm_serial_open:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	xor	eax, eax
	call	disable_port@PLT
	mov	rax, QWORD PTR param[rip]
	mov	esi, 16
	lea	rdi, 32[rax]
	call	out_8@PLT
	mov	rax, QWORD PTR param[rip]
	mov	esi, 16
	lea	rdi, 28[rax]
	call	out_8@PLT
	mov	rax, QWORD PTR param[rip]
	mov	esi, 1
	lea	rdi, 24[rax]
	call	out_be16@PLT
	mov	rax, QWORD PTR param[rip]
	xor	esi, esi
	lea	rdi, 20[rax]
	call	out_be16@PLT
	mov	rax, QWORD PTR param[rip]
	xor	esi, esi
	lea	rdi, 16[rax]
	call	out_be16@PLT
	mov	rax, QWORD PTR param[rip]
	xor	esi, esi
	lea	rdi, 12[rax]
	call	out_be16@PLT
	mov	rax, QWORD PTR param[rip]
	xor	esi, esi
	lea	rdi, 8[rax]
	call	out_be16@PLT
	mov	rax, QWORD PTR cbd_addr[rip]
	movabs	rcx, 4295008256
	lea	rdx, -4[rax]
	mov	QWORD PTR rbdf[rip], rax
	mov	QWORD PTR 8[rax], rdx
	lea	rdx, 16[rax]
	mov	QWORD PTR [rax], rcx
	sub	rcx, 32768
	mov	QWORD PTR tbdf[rip], rdx
	lea	rdx, -8[rax]
	mov	QWORD PTR 24[rax], rdx
	mov	QWORD PTR 16[rax], rcx
	xor	eax, eax
	call	sync@PLT
	mov	rax, QWORD PTR param[rip]
	mov	esi, DWORD PTR cbd_offset[rip]
	lea	rdi, 4[rax]
	call	out_be16@PLT
	mov	eax, DWORD PTR cbd_offset[rip]
	mov	rdi, QWORD PTR param[rip]
	lea	esi, 4[rax]
	call	out_be16@PLT
	mov	edi, DWORD PTR CPM_CMD_INIT_RX_TX[rip]
	call	do_cmd@PLT
	xor	eax, eax
	call	enable_port@PLT
	xor	eax, eax
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cpm_serial_open, .-cpm_serial_open
	.comm	tbdf,8,8
	.comm	rbdf,8,8
	.comm	param,8,8
	.comm	cbd_offset,4,4
	.comm	cbd_addr,8,8
	.comm	CPM_CMD_INIT_RX_TX,4,4
	.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_cpm-serial.c_cpm_serial_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cpm_serial_open, %function
cpm_serial_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r4, .L4
	bl	disable_port
	ldr	r0, [r4]
	mov	r1, #16
	add	r0, r0, #32
	bl	out_8
	ldr	r0, [r4]
	mov	r1, #16
	add	r0, r0, #28
	bl	out_8
	ldr	r0, [r4]
	mov	r1, #1
	add	r0, r0, #24
	bl	out_be16
	ldr	r0, [r4]
	mov	r1, #0
	add	r0, r0, #20
	bl	out_be16
	ldr	r0, [r4]
	mov	r1, #0
	add	r0, r0, #16
	bl	out_be16
	ldr	r0, [r4]
	mov	r1, #0
	add	r0, r0, #12
	bl	out_be16
	ldr	r0, [r4]
	mov	r1, #0
	add	r0, r0, #8
	bl	out_be16
	mov	r0, #40960
	mov	ip, #8192
	mov	r2, #1
	ldr	r3, .L4+4
	ldr	lr, .L4+8
	ldr	r3, [r3]
	ldr	r1, .L4+12
	str	r3, [lr]
	str	ip, [r3, #12]
	str	r0, [r3]
	sub	ip, r3, #4
	sub	r0, r3, #8
	str	ip, [r3, #8]
	str	r2, [r3, #4]
	str	r2, [r3, #16]
	str	r0, [r3, #20]
	add	r0, r3, #12
	ldr	r5, .L4+16
	str	r0, [r1]
	bl	sync
	ldr	r0, [r4]
	ldr	r1, [r5]
	add	r0, r0, #4
	bl	out_be16
	ldr	r1, [r5]
	ldr	r0, [r4]
	add	r1, r1, #4
	bl	out_be16
	ldr	r3, .L4+20
	ldr	r0, [r3]
	bl	do_cmd
	bl	enable_port
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L5:
	.align	2
.L4:
	.word	param
	.word	cbd_addr
	.word	rbdf
	.word	tbdf
	.word	cbd_offset
	.word	CPM_CMD_INIT_RX_TX
	.size	cpm_serial_open, .-cpm_serial_open
	.comm	tbdf,4,4
	.comm	rbdf,4,4
	.comm	param,4,4
	.comm	cbd_offset,4,4
	.comm	cbd_addr,4,4
	.comm	CPM_CMD_INIT_RX_TX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
