	.file	"extr_ddbridge-core.c_ddb_unredirect.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ddb_unredirect, @function
ddb_unredirect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	lea	rdi, redirect_lock[rip]
	call	mutex_lock@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 8[rax]
	cmp	QWORD PTR [rdx], 0
	jne	.L22
	mov	rbp, QWORD PTR [rax]
	test	rbp, rbp
	je	.L4
	mov	rdx, QWORD PTR 8[rbx]
	mov	rcx, QWORD PTR [rdx]
	test	rcx, rcx
	je	.L5
	mov	r12, QWORD PTR 8[rcx]
	mov	rcx, QWORD PTR [rcx]
	test	rcx, rcx
	je	.L6
	mov	rax, QWORD PTR 8[rcx]
	mov	rsi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rsi], rbp
	test	rax, rax
	je	.L7
	mov	edx, DWORD PTR [rcx]
	mov	esi, DWORD PTR 16[rbp]
	mov	QWORD PTR [rax], r12
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR [rax]
	call	ddb_redirect_dma@PLT
	mov	rdx, QWORD PTR 8[rbx]
.L7:
	mov	rdi, QWORD PTR [rdx]
	mov	QWORD PTR [rdi], 0
	call	ddb_set_dma_table@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rbx]
.L6:
	mov	QWORD PTR 8[rbp], r12
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 8[rdx], 0
.L5:
	mov	QWORD PTR 0[rbp], 0
	mov	rdi, rbp
	mov	QWORD PTR [rax], 0
	call	ddb_set_dma_table@PLT
.L4:
	lea	rdi, redirect_lock[rip]
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	lea	rdi, redirect_lock[rip]
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	ddb_unredirect, .-ddb_unredirect
	.comm	redirect_lock,4,4
	.comm	EBUSY,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_ddbridge-core.c_ddb_unredirect.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ddb_unredirect, %function
ddb_unredirect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, .L23
	bl	mutex_lock
	ldr	r3, [r4]
	ldr	r2, [r3, #4]
	ldr	r6, [r2]
	cmp	r6, #0
	bne	.L22
	ldr	r5, [r3]
	cmp	r5, #0
	beq	.L4
	ldr	r2, [r4, #4]
	ldr	r1, [r2]
	cmp	r1, #0
	beq	.L5
	ldm	r1, {r0, r7}
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r0, #4]
	ldr	ip, [r3]
	ldr	r1, [r3, #4]
	ldr	r3, [ip]
	str	r5, [r1]
	cmp	r3, #0
	beq	.L7
	ldr	r1, [r5, #12]
	ldr	r2, [r0]
	str	r7, [r3]
	ldr	r0, [r1]
	ldr	r1, [r5, #8]
	bl	ddb_redirect_dma
	ldr	r2, [r4, #4]
.L7:
	mov	r3, #0
	ldr	r0, [r2]
	str	r3, [r0]
	bl	ddb_set_dma_table
	ldr	r2, [r4, #4]
	ldr	r3, [r4]
.L6:
	mov	r1, #0
	str	r7, [r5, #4]
	ldr	r2, [r2]
	str	r1, [r2, #4]
.L5:
	mov	r2, #0
	mov	r0, r5
	str	r2, [r5]
	str	r2, [r3]
	bl	ddb_set_dma_table
.L4:
	ldr	r0, .L23
	bl	mutex_unlock
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	ldr	r0, .L23
	bl	mutex_unlock
	ldr	r3, .L23+4
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	.align	2
.L23:
	.word	redirect_lock
	.word	EBUSY
	.size	ddb_unredirect, .-ddb_unredirect
	.comm	redirect_lock,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
