	.file	"extr_subr_witness.c_adopt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"witness rmatrix paradox! [%d][%d]=%d both ancestor and descendant\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Witness disabled."
	.text
	.p2align 4
	.type	adopt, @function
adopt:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	cmp	QWORD PTR witness_cold[rip], 0
	je	.L37
.L2:
	mov	rsi, rbx
	mov	rdi, rbp
	call	isitmychild@PLT
	test	rax, rax
	je	.L38
.L1:
	add	rsp, 40
	.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
.L38:
	.cfi_restore_state
	call	witness_increment_graph_generation@PLT
	movsx	r14, DWORD PTR 0[rbp]
	mov	r13d, DWORD PTR [rbx]
	mov	edi, r14d
	mov	DWORD PTR 16[rsp], r14d
	call	WITNESS_INDEX_ASSERT@PLT
	mov	edi, r13d
	call	WITNESS_INDEX_ASSERT@PLT
	xor	edi, edi
	cmp	r14d, r13d
	setne	dil
	call	MPASS@PLT
	mov	rdx, QWORD PTR w_rmatrix[rip]
	movsx	rcx, r13d
	lea	rdi, 0[0+r14*4]
	mov	QWORD PTR 8[rsp], rdi
	mov	esi, DWORD PTR WITNESS_PARENT[rip]
	lea	r11, 0[0+rcx*8]
	mov	rax, QWORD PTR [rdx+r14*8]
	add	rdi, QWORD PTR [rdx+rcx*8]
	lea	rax, [rax+rcx*4]
	or	DWORD PTR [rax], esi
	mov	esi, DWORD PTR WITNESS_CHILD[rip]
	or	DWORD PTR [rdi], esi
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR WITNESS_ANCESTOR[rip], eax
	jne	.L4
	add	DWORD PTR 8[rbp], 1
	add	DWORD PTR 4[rbx], 1
.L4:
	mov	edi, DWORD PTR w_max_used_index[rip]
	test	edi, edi
	jle	.L1
	mov	r15d, 1
	mov	r14d, 4
	mov	r9d, r15d
	mov	r15, r11
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L39:
	cmp	DWORD PTR 16[rsp], r9d
	je	.L14
.L5:
	add	r9d, 1
	add	r14, 4
	cmp	r9d, edi
	jg	.L1
	mov	rdx, QWORD PTR w_rmatrix[rip]
.L13:
	mov	rax, QWORD PTR [rdx+r14*2]
	mov	rbx, QWORD PTR 8[rsp]
	lea	r12, [r14+r14]
	mov	esi, DWORD PTR WITNESS_ANCESTOR_MASK[rip]
	test	DWORD PTR [rax+rbx], esi
	je	.L39
.L14:
	mov	ebx, 4
	mov	ebp, 1
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	mov	ecx, DWORD PTR [rcx]
	mov	edi, DWORD PTR w_max_used_index[rip]
	test	ecx, eax
	je	.L8
	test	DWORD PTR WITNESS_DESCENDANT_MASK[rip], ecx
	jne	.L40
	.p2align 4,,10
	.p2align 3
.L8:
	add	ebp, 1
	add	rbx, 4
	cmp	edi, ebp
	jl	.L5
	mov	rdx, QWORD PTR w_rmatrix[rip]
	mov	esi, DWORD PTR WITNESS_ANCESTOR_MASK[rip]
	mov	rax, QWORD PTR [rdx+r12]
.L12:
	add	rax, rbx
	mov	ecx, DWORD PTR [rax]
	test	ecx, esi
	jne	.L8
	mov	r8, QWORD PTR [rdx+r15]
	test	DWORD PTR [r8+rbx], esi
	jne	.L15
	cmp	r13d, ebp
	jne	.L8
.L15:
	or	ecx, DWORD PTR WITNESS_ANCESTOR[rip]
	lea	r8, [rbx+rbx]
	mov	DWORD PTR [rax], ecx
	mov	rcx, QWORD PTR [rdx+rbx*2]
	mov	edx, DWORD PTR WITNESS_DESCENDANT[rip]
	add	rcx, r14
	or	DWORD PTR [rcx], edx
	mov	rdx, QWORD PTR w_data[rip]
	add	DWORD PTR 4[rdx+r12], 1
	add	DWORD PTR [rdx+r8], 1
	mov	r10d, DWORD PTR [rax]
	mov	eax, DWORD PTR WITNESS_ANCESTOR_MASK[rip]
	test	r10d, eax
	je	.L11
	test	DWORD PTR WITNESS_DESCENDANT_MASK[rip], r10d
	je	.L11
	mov	ecx, r10d
	mov	esi, r9d
	mov	edx, ebp
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	QWORD PTR 24[rsp], r8
	mov	DWORD PTR 20[rsp], r9d
	call	printf@PLT
	xor	eax, eax
	call	kdb_backtrace@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR w_rmatrix[rip]
	mov	r8, QWORD PTR 24[rsp]
	mov	rcx, r14
	mov	DWORD PTR witness_watch[rip], -1
	mov	r9d, DWORD PTR 20[rsp]
	add	rcx, QWORD PTR [rax+r8]
	mov	eax, DWORD PTR WITNESS_ANCESTOR_MASK[rip]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	mov	edx, r9d
	mov	esi, ebp
	lea	rdi, .LC0[rip]
	xor	eax, eax
	mov	DWORD PTR 20[rsp], r9d
	call	printf@PLT
	xor	eax, eax
	call	kdb_backtrace@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, DWORD PTR w_max_used_index[rip]
	mov	r9d, DWORD PTR 20[rsp]
	mov	DWORD PTR witness_watch[rip], -1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L37:
	mov	esi, DWORD PTR MA_OWNED[rip]
	lea	rdi, w_mtx[rip]
	call	mtx_assert@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	adopt, .-adopt
	.comm	witness_watch,4,4
	.comm	witness_cold,8,8
	.comm	w_rmatrix,8,8
	.comm	w_mtx,4,4
	.comm	w_max_used_index,4,4
	.comm	w_data,8,8
	.comm	WITNESS_PARENT,4,4
	.comm	WITNESS_DESCENDANT_MASK,4,4
	.comm	WITNESS_DESCENDANT,4,4
	.comm	WITNESS_CHILD,4,4
	.comm	WITNESS_ANCESTOR_MASK,4,4
	.comm	WITNESS_ANCESTOR,4,4
	.comm	MA_OWNED,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_subr_witness.c_adopt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"witness rmatrix paradox! [%d][%d]=%d both ancestor "
	.ascii	"and descendant\012\000"
	.align	2
.LC1:
	.ascii	"Witness disabled.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adopt, %function
adopt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L30
	mov	r5, r0
	ldr	r3, [r3]
	mov	r4, r1
	cmp	r3, #0
	sub	sp, sp, #20
	beq	.L27
.L2:
	mov	r1, r4
	mov	r0, r5
	bl	isitmychild
	cmp	r0, #0
	beq	.L28
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	bl	witness_increment_graph_generation
	ldr	r7, [r5]
	ldr	r6, [r4]
	mov	r0, r7
	str	r7, [sp, #12]
	str	r6, [sp]
	bl	WITNESS_INDEX_ASSERT
	mov	r0, r6
	bl	WITNESS_INDEX_ASSERT
	ldr	r10, .L30+4
	subs	r0, r7, r6
	movne	r0, #1
	bl	MPASS
	ldr	r1, [r10]
	ldr	r2, .L30+8
	ldr	r3, [r1, r7, lsl #2]
	ldr	ip, [r2]
	ldr	r2, [r3, r6, lsl #2]
	ldr	r0, [r1, r6, lsl #2]
	orr	r2, r2, ip
	ldr	ip, .L30+12
	str	r2, [r3, r6, lsl #2]
	ldr	ip, [ip]
	ldr	r2, [r0, r7, lsl #2]
	ldr	fp, .L30+16
	orr	r2, r2, ip
	str	r2, [r0, r7, lsl #2]
	ldr	r2, [r3, r6, lsl #2]
	ldr	r3, [fp]
	lsl	ip, r7, #2
	tst	r2, r3
	mov	lr, r6
	str	ip, [sp, #8]
	lsl	r9, r6, #2
	bne	.L4
	ldr	r2, [r5, #8]
	ldr	r3, [r4, #4]
	add	r2, r2, #1
	add	r3, r3, #1
	str	r2, [r5, #8]
	str	r3, [r4, #4]
.L4:
	ldr	r3, .L30+20
	ldr	r0, [r3]
	cmp	r0, #0
	ble	.L1
	mov	r6, #1
	ldr	r7, .L30+24
	b	.L11
.L5:
	add	r6, r6, #1
	cmp	r6, r0
	bgt	.L1
	ldr	r1, [r10]
.L11:
	ldr	r2, [r1, r6, lsl #2]
	ldr	ip, [sp, #8]
	ldr	r3, [r7]
	ldr	ip, [r2, ip]
	ldr	lr, [sp, #12]
	and	ip, ip, r3
	subs	lr, lr, r6
	movne	lr, #1
	cmp	ip, #0
	movne	lr, #0
	cmp	lr, #0
	lsl	r5, r6, #2
	bne	.L5
	lsl	r0, r6, #3
	mov	r4, #1
	str	r0, [sp, #4]
	b	.L10
.L9:
	ldr	r3, [r1]
	tst	r3, r2
	beq	.L7
	ldr	r2, .L30+28
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L29
.L7:
	ldr	r3, .L30+20
	add	r4, r4, #1
	ldr	r0, [r3]
	cmp	r0, r4
	blt	.L5
	ldr	r1, [r10]
	ldr	r3, [r7]
	ldr	r2, [r1, r5]
.L10:
	ldr	r0, [r2, r4, lsl #2]
	lsl	r8, r4, #2
	tst	r0, r3
	add	r2, r2, r4, lsl #2
	bne	.L7
	ldr	ip, [r1, r9]
	ldr	ip, [ip, r4, lsl #2]
	and	r3, r3, ip
	ldr	ip, [sp]
	subs	ip, ip, r4
	movne	ip, #1
	cmp	r3, #0
	movne	ip, #0
	cmp	ip, #0
	bne	.L7
	ldr	r3, [fp]
	ldr	r1, [r1, r8]
	orr	r0, r3, r0
	ldr	r3, .L30+32
	str	r0, [r2]
	ldr	r0, [r1, r5]
	ldr	ip, [r3]
	ldr	r3, .L30+36
	orr	r0, r0, ip
	ldr	r3, [r3]
	str	r0, [r1, r5]
	ldr	r0, [sp, #4]
	add	r1, r1, r5
	add	lr, r3, r0
	ldr	ip, [lr, #4]
	ldr	r0, [r3, r4, lsl #3]
	add	ip, ip, #1
	add	r0, r0, #1
	str	ip, [lr, #4]
	str	r0, [r3, r4, lsl #3]
	ldr	r3, [r2]
	ldr	r2, [r7]
	tst	r3, r2
	beq	.L9
	ldr	r0, .L30+28
	ldr	r0, [r0]
	tst	r3, r0
	beq	.L9
	mov	r2, r4
	mov	r1, r6
	ldr	r0, .L30+40
	bl	printf
	bl	kdb_backtrace
	ldr	r0, .L30+44
	bl	puts
	mvn	r3, #0
	ldr	r1, [r10]
	ldr	r0, .L30+48
	ldr	r1, [r1, r8]
	ldr	r2, [r7]
	str	r3, [r0]
	add	r1, r1, r5
	b	.L9
.L29:
	mov	r2, r6
	mov	r1, r4
	ldr	r0, .L30+40
	bl	printf
	bl	kdb_backtrace
	ldr	r0, .L30+44
	bl	puts
	mvn	r3, #0
	ldr	r2, .L30+48
	str	r3, [r2]
	b	.L7
.L27:
	ldr	r3, .L30+52
	ldr	r0, .L30+56
	ldr	r1, [r3]
	bl	mtx_assert
	b	.L2
.L31:
	.align	2
.L30:
	.word	witness_cold
	.word	w_rmatrix
	.word	WITNESS_PARENT
	.word	WITNESS_CHILD
	.word	WITNESS_ANCESTOR
	.word	w_max_used_index
	.word	WITNESS_ANCESTOR_MASK
	.word	WITNESS_DESCENDANT_MASK
	.word	WITNESS_DESCENDANT
	.word	w_data
	.word	.LC0
	.word	.LC1
	.word	witness_watch
	.word	MA_OWNED
	.word	w_mtx
	.size	adopt, .-adopt
	.comm	witness_watch,4,4
	.comm	witness_cold,4,4
	.comm	w_rmatrix,4,4
	.comm	w_mtx,4,4
	.comm	w_max_used_index,4,4
	.comm	w_data,4,4
	.comm	WITNESS_PARENT,4,4
	.comm	WITNESS_DESCENDANT_MASK,4,4
	.comm	WITNESS_DESCENDANT,4,4
	.comm	WITNESS_CHILD,4,4
	.comm	WITNESS_ANCESTOR_MASK,4,4
	.comm	WITNESS_ANCESTOR,4,4
	.comm	MA_OWNED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
