	.file	"extr_synclinkmp.c_program_hw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	program_hw, @function
program_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 4[rdi]
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdi, r12
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	spin_lock_irqsave@PLT
	mov	rdi, rbp
	call	rx_stop@PLT
	mov	rdi, rbp
	call	tx_stop@PLT
	mov	QWORD PTR 64[rbp], 0
	mov	rdi, rbp
	mov	rax, QWORD PTR MGSL_MODE_HDLC[rip]
	mov	QWORD PTR 72[rbp], 0
	mov	QWORD PTR 80[rbp], 0
	cmp	QWORD PTR 56[rbp], rax
	je	.L2
	cmp	QWORD PTR 16[rbp], 0
	je	.L3
.L2:
	call	hdlc_mode@PLT
.L4:
	mov	rdi, rbp
	call	set_signals@PLT
	mov	edx, DWORD PTR CDCD[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR CCTS[rip]
	or	edx, DWORD PTR 0[rbp]
	mov	QWORD PTR 48[rbp], 0
	mov	DWORD PTR 0[rbp], edx
	mov	esi, DWORD PTR IE1[rip]
	mov	QWORD PTR 40[rbp], 0
	mov	QWORD PTR 32[rbp], 0
	mov	QWORD PTR 24[rbp], 0
	call	write_reg@PLT
	mov	rdi, rbp
	call	get_signals@PLT
	cmp	QWORD PTR 16[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR 8[rbp]
	test	rax, rax
	je	.L6
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR CREAD[rip], eax
	je	.L6
.L5:
	mov	rdi, rbp
	call	rx_start@PLT
.L6:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, r12
	xor	esi, esi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	call	async_mode@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	program_hw, .-program_hw
	.comm	MGSL_MODE_HDLC,8,8
	.comm	IE1,4,4
	.comm	CREAD,4,4
	.comm	CDCD,4,4
	.comm	CCTS,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_synclinkmp.c_program_hw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	program_hw, %function
program_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	add	r5, r0, #4
	mov	r1, #0
	mov	r0, r5
	bl	spin_lock_irqsave
	mov	r0, r4
	bl	rx_stop
	mov	r0, r4
	bl	tx_stop
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r4, #32]
	ldr	r2, [r2]
	mov	r0, r4
	cmp	r1, r2
	str	r3, [r4, #36]
	str	r3, [r4, #40]
	str	r3, [r4, #44]
	beq	.L2
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L3
.L2:
	bl	hdlc_mode
.L4:
	mov	r0, r4
	bl	set_signals
	mov	r3, #0
	ldr	r2, .L15+4
	ldr	r1, .L15+8
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r4]
	orr	r2, r2, r1
	ldr	r1, .L15+12
	orr	r2, r2, r0
	str	r3, [r4, #28]
	str	r3, [r4, #24]
	str	r3, [r4, #20]
	str	r3, [r4, #16]
	ldr	r1, [r1]
	str	r2, [r4]
	mov	r0, r4
	bl	write_reg
	mov	r0, r4
	bl	get_signals
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L6
	ldr	r1, .L15+16
	ldr	r2, [r3]
	ldr	r3, [r1]
	tst	r2, r3
	beq	.L6
.L5:
	mov	r0, r4
	bl	rx_start
.L6:
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	mov	r1, #0
	b	spin_unlock_irqrestore
.L3:
	bl	async_mode
	b	.L4
.L16:
	.align	2
.L15:
	.word	MGSL_MODE_HDLC
	.word	CDCD
	.word	CCTS
	.word	IE1
	.word	CREAD
	.size	program_hw, .-program_hw
	.comm	MGSL_MODE_HDLC,4,4
	.comm	IE1,4,4
	.comm	CREAD,4,4
	.comm	CDCD,4,4
	.comm	CCTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
