	.file	"extr_uPD98402.c_set_loopback.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_loopback, @function
set_loopback:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	mov	edi, DWORD PTR MDR[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	GET@PLT
	movzx	ebx, BYTE PTR uPD98402_MDR_TPLP[rip]
	mov	edi, ebp
	or	bl, BYTE PTR uPD98402_MDR_ALP[rip]
	or	bl, BYTE PTR uPD98402_MDR_RPLP[rip]
	not	ebx
	and	ebx, eax
	call	__ATM_LM_XTLOC@PLT
	cmp	eax, 129
	je	.L2
	cmp	eax, 130
	je	.L3
	mov	r8d, DWORD PTR EINVAL[rip]
	or	bl, BYTE PTR uPD98402_MDR_TPLP[rip]
	neg	r8d
	cmp	eax, 128
	je	.L2
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r8d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	or	bl, BYTE PTR uPD98402_MDR_ALP[rip]
.L2:
	mov	edi, ebp
	call	__ATM_LM_XTRMT@PLT
	cmp	eax, 128
	je	.L6
	cmp	eax, 129
	je	.L7
	mov	r8d, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	r8d
	mov	eax, r8d
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	or	bl, BYTE PTR uPD98402_MDR_RPLP[rip]
.L7:
	mov	esi, DWORD PTR MDR[rip]
	movzx	edi, bl
	call	PUT@PLT
	mov	rdi, r12
	call	PRIV@PLT
	xor	r8d, r8d
	mov	DWORD PTR [rax], ebp
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	set_loopback, .-set_loopback
	.comm	uPD98402_MDR_TPLP,1,1
	.comm	uPD98402_MDR_RPLP,1,1
	.comm	uPD98402_MDR_ALP,1,1
	.comm	MDR,4,4
	.comm	EINVAL,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_uPD98402.c_set_loopback.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_loopback, %function
set_loopback:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, .L20
	mov	r6, r0
	ldr	r0, [r7]
	mov	r5, r1
	bl	GET
	ldr	r10, .L20+4
	ldr	r9, .L20+8
	ldr	r8, .L20+12
	ldrb	r3, [r10]	@ zero_extendqisi2
	ldrb	r2, [r9]	@ zero_extendqisi2
	ldrb	r4, [r8]	@ zero_extendqisi2
	orr	r3, r3, r2
	orr	r3, r3, r4
	bic	r4, r0, r3
	mov	r0, r5
	bl	__ATM_LM_XTLOC
	cmp	r0, #129
	and	r4, r4, #255
	beq	.L2
	cmp	r0, #130
	beq	.L3
	cmp	r0, #128
	beq	.L18
.L15:
	ldr	r3, .L20+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	ldrb	r3, [r10]	@ zero_extendqisi2
	orr	r4, r4, r3
.L2:
	mov	r0, r5
	bl	__ATM_LM_XTRMT
	cmp	r0, #128
	beq	.L6
.L19:
	cmp	r0, #129
	bne	.L15
.L7:
	ldr	r1, [r7]
	mov	r0, r4
	bl	PUT
	mov	r0, r6
	bl	PRIV
	mov	r3, r0
	mov	r0, #0
	str	r5, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	ldrb	r3, [r8]	@ zero_extendqisi2
	orr	r4, r4, r3
	b	.L7
.L3:
	ldrb	r3, [r9]	@ zero_extendqisi2
	mov	r0, r5
	orr	r4, r4, r3
	bl	__ATM_LM_XTRMT
	cmp	r0, #128
	bne	.L19
	b	.L6
.L21:
	.align	2
.L20:
	.word	MDR
	.word	uPD98402_MDR_TPLP
	.word	uPD98402_MDR_ALP
	.word	uPD98402_MDR_RPLP
	.word	EINVAL
	.size	set_loopback, .-set_loopback
	.comm	uPD98402_MDR_TPLP,1,1
	.comm	uPD98402_MDR_RPLP,1,1
	.comm	uPD98402_MDR_ALP,1,1
	.comm	MDR,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
