	.file	"extr_amplc_pci230.c_pci230_ao_stop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pci230_ao_stop, @function
pci230_ao_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rsi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rbx, QWORD PTR 8[rdi]
	lea	r13, 56[rbx]
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	r15d, DWORD PTR [rbx]
	mov	rsi, rbp
	mov	rdi, r13
	mov	DWORD PTR [rbx], 0
	call	spin_unlock_irqrestore@PLT
	test	r15d, r15d
	je	.L1
	mov	rax, QWORD PTR [r12]
	mov	rdx, QWORD PTR TRIG_TIMER[rip]
	cmp	QWORD PTR [rax], rdx
	je	.L15
.L3:
	cmp	DWORD PTR 4[rbx], 1
	movzx	r13d, BYTE PTR PCI230P2_INT_DAC[rip]
	jle	.L16
.L5:
	xor	ebp, ebp
	lea	r12, 40[rbx]
	mov	rdi, r12
	mov	rsi, rbp
	call	spin_lock_irqsave@PLT
	mov	edi, r13d
	not	edi
	and	dil, BYTE PTR 8[rbx]
	cmp	QWORD PTR 48[rbx], 0
	mov	BYTE PTR 8[rbx], dil
	jne	.L6
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	xor	ebp, ebp
	mov	rdi, r12
	mov	rsi, rbp
	call	spin_unlock_irqrestore@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	spin_lock_irqsave@PLT
	cmp	QWORD PTR 48[rbx], 0
	je	.L13
.L6:
	mov	rax, QWORD PTR THISCPU[rip]
	cmp	QWORD PTR 16[rbx], rax
	jne	.L8
.L13:
	movzx	edi, BYTE PTR 8[rbx]
.L7:
	mov	rsi, QWORD PTR PCI230_INT_SCE[rip]
	movzx	edi, dil
	add	rsi, QWORD PTR [r14]
	xor	ebp, ebp
	call	outb@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
	cmp	DWORD PTR 4[rbx], 1
	jg	.L17
.L9:
	mov	esi, DWORD PTR OWNER_AOCMD[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	pci230_release_all_resources@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	edi, DWORD PTR 24[rbx]
	mov	eax, DWORD PTR PCI230_DAC_OR_MASK[rip]
	mov	rsi, QWORD PTR PCI230_DACCON[rip]
	add	rsi, QWORD PTR 32[rbx]
	and	eax, edi
	mov	edi, DWORD PTR PCI230P2_DAC_FIFO_RESET[rip]
	or	edi, DWORD PTR PCI230P2_DAC_FIFO_UNDERRUN_CLEAR[rip]
	mov	DWORD PTR 24[rbx], eax
	or	edi, eax
	call	outw@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L16:
	movzx	r13d, BYTE PTR PCI230_INT_ZCLK_CT1[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	esi, 1
	mov	rdi, r14
	call	pci230_cancel_ct@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pci230_ao_stop, .-pci230_ao_stop
	.comm	TRIG_TIMER,8,8
	.comm	THISCPU,8,8
	.comm	PCI230_INT_ZCLK_CT1,1,1
	.comm	PCI230_INT_SCE,8,8
	.comm	PCI230_DAC_OR_MASK,4,4
	.comm	PCI230_DACCON,8,8
	.comm	PCI230P2_INT_DAC,1,1
	.comm	PCI230P2_DAC_FIFO_UNDERRUN_CLEAR,4,4
	.comm	PCI230P2_DAC_FIFO_RESET,4,4
	.comm	OWNER_AOCMD,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_amplc_pci230.c_pci230_ao_stop.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci230_ao_stop, %function
pci230_ao_stop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, #0
	ldr	r4, [r0, #4]
	mov	r8, r0
	add	r7, r4, #32
	mov	r6, r1
	mov	r0, r7
	mov	r1, r5
	bl	spin_lock_irqsave
	ldr	r9, [r4]
	mov	r0, r7
	mov	r1, r5
	str	r5, [r4]
	bl	spin_unlock_irqrestore
	cmp	r9, r5
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r2, [r6]
	ldr	r3, .L17
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L15
.L3:
	ldr	r3, [r4, #4]
	add	r6, r4, #24
	cmp	r3, #1
	ldrle	r3, .L17+4
	ldrgt	r3, .L17+8
	mov	r0, r6
	mov	r1, #0
	ldrb	r5, [r3]	@ zero_extendqisi2
	bl	spin_lock_irqsave
	ldrb	r0, [r4, #8]	@ zero_extendqisi2
	ldr	r3, [r4, #28]
	bic	r0, r0, r5
	cmp	r3, #0
	strb	r0, [r4, #8]
	beq	.L7
	ldr	r7, .L17+12
	b	.L6
.L8:
	mov	r5, #0
	mov	r0, r6
	mov	r1, r5
	bl	spin_unlock_irqrestore
	mov	r1, r5
	mov	r0, r6
	bl	spin_lock_irqsave
	ldr	r3, [r4, #28]
	cmp	r3, r5
	beq	.L13
.L6:
	ldr	r2, [r4, #12]
	ldr	r3, [r7]
	cmp	r2, r3
	bne	.L8
.L13:
	ldrb	r0, [r4, #8]	@ zero_extendqisi2
.L7:
	ldr	r3, .L17+16
	ldr	r1, [r8]
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	outb
	mov	r0, r6
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, [r4, #4]
	cmp	r3, #1
	bgt	.L16
.L9:
	ldr	r3, .L17+20
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, [r3]
	b	pci230_release_all_resources
.L16:
	ldr	r1, .L17+24
	ldr	r2, .L17+28
	ldr	r3, .L17+32
	ldr	r0, [r1]
	ldr	r1, [r2]
	ldr	r2, .L17+36
	ldr	ip, [r3]
	ldr	r3, [r4, #16]
	ldr	r2, [r2]
	orr	r0, r0, r1
	ldr	r1, [r4, #20]
	and	r3, r3, ip
	str	r3, [r4, #16]
	orr	r0, r0, r3
	add	r1, r1, r2
	bl	outw
	b	.L9
.L15:
	mov	r1, #1
	mov	r0, r8
	bl	pci230_cancel_ct
	b	.L3
.L18:
	.align	2
.L17:
	.word	TRIG_TIMER
	.word	PCI230_INT_ZCLK_CT1
	.word	PCI230P2_INT_DAC
	.word	THISCPU
	.word	PCI230_INT_SCE
	.word	OWNER_AOCMD
	.word	PCI230P2_DAC_FIFO_RESET
	.word	PCI230P2_DAC_FIFO_UNDERRUN_CLEAR
	.word	PCI230_DAC_OR_MASK
	.word	PCI230_DACCON
	.size	pci230_ao_stop, .-pci230_ao_stop
	.comm	TRIG_TIMER,4,4
	.comm	THISCPU,4,4
	.comm	PCI230_INT_ZCLK_CT1,1,1
	.comm	PCI230_INT_SCE,4,4
	.comm	PCI230_DAC_OR_MASK,4,4
	.comm	PCI230_DACCON,4,4
	.comm	PCI230P2_INT_DAC,1,1
	.comm	PCI230P2_DAC_FIFO_UNDERRUN_CLEAR,4,4
	.comm	PCI230P2_DAC_FIFO_RESET,4,4
	.comm	OWNER_AOCMD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
