	.file	"extr_turnstile.c_turnstile_update_inheritor.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Missing type in flags (%x) for inheritor (%p)"
	.text
	.p2align 4
	.globl	turnstile_update_inheritor
	.type	turnstile_update_inheritor, @function
turnstile_update_inheritor:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	current_thread@PLT
	xor	edi, edi
	mov	rbx, rax
	mov	rax, QWORD PTR TURNSTILE_INHERITOR_NULL[rip]
	cmp	QWORD PTR [rbx], rax
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR TURNSTILE_UPDATE_FLAGS_NONE[rip]
	cmp	QWORD PTR TURNSTILE_INHERITOR_NULL[rip], rbp
	mov	QWORD PTR [rbx], rbp
	mov	DWORD PTR 8[rbx], eax
	je	.L2
	mov	edx, DWORD PTR TURNSTILE_INHERITOR_THREAD[rip]
	test	edx, r12d
	jne	.L9
	mov	edx, DWORD PTR TURNSTILE_INHERITOR_TURNSTILE[rip]
	test	edx, r12d
	jne	.L10
	mov	edx, DWORD PTR TURNSTILE_INHERITOR_WORKQ[rip]
	test	edx, r12d
	je	.L5
	or	eax, edx
	mov	rdi, rbp
	mov	DWORD PTR 8[rbx], eax
	call	workq_reference@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	test	DWORD PTR TURNSTILE_DELAYED_UPDATE[rip], r12d
	je	.L11
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	or	eax, edx
	mov	rdi, rbp
	mov	DWORD PTR 8[rbx], eax
	call	thread_reference@PLT
	test	DWORD PTR TURNSTILE_DELAYED_UPDATE[rip], r12d
	jne	.L1
.L11:
	xor	eax, eax
	call	splsched@PLT
	mov	rdi, r13
	mov	ebp, eax
	call	waitq_lock@PLT
	mov	rdi, r13
	call	turnstile_update_inheritor_locked@PLT
	mov	rdi, r13
	call	waitq_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, ebp
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	splx@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdx, rbp
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	or	eax, edx
	mov	rdi, rbp
	mov	DWORD PTR 8[rbx], eax
	call	turnstile_reference@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	turnstile_update_inheritor, .-turnstile_update_inheritor
	.comm	TURNSTILE_UPDATE_FLAGS_NONE,4,4
	.comm	TURNSTILE_INHERITOR_WORKQ,4,4
	.comm	TURNSTILE_INHERITOR_TURNSTILE,4,4
	.comm	TURNSTILE_INHERITOR_THREAD,4,4
	.comm	TURNSTILE_INHERITOR_NULL,8,8
	.comm	TURNSTILE_DELAYED_UPDATE,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_turnstile.c_turnstile_update_inheritor.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Missing type in flags (%x) for inheritor (%p)\000"
	.text
	.align	2
	.global	turnstile_update_inheritor
	.syntax unified
	.arm
	.fpu softvfp
	.type	turnstile_update_inheritor, %function
turnstile_update_inheritor:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r6, r2
	mov	r7, r0
	bl	current_thread
	ldr	r8, .L11
	mov	r4, r0
	ldr	r3, [r8]
	ldr	r0, [r0]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L11+4
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, r5
	str	r5, [r4]
	str	r3, [r4, #4]
	beq	.L2
	ldr	r2, .L11+8
	ldr	r2, [r2]
	tst	r2, r6
	bne	.L9
	ldr	r2, .L11+12
	ldr	r2, [r2]
	tst	r2, r6
	bne	.L10
	ldr	r2, .L11+16
	ldr	r2, [r2]
	tst	r2, r6
	beq	.L5
	orr	r3, r3, r2
	mov	r0, r5
	str	r3, [r4, #4]
	bl	workq_reference
.L2:
	ldr	r3, .L11+20
	ldr	r3, [r3]
	tst	r6, r3
	popne	{r4, r5, r6, r7, r8, pc}
	bl	splsched
	mov	r4, r0
	mov	r0, r7
	bl	waitq_lock
	mov	r0, r7
	bl	turnstile_update_inheritor_locked
	mov	r0, r7
	bl	waitq_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	splx
.L9:
	orr	r3, r3, r2
	mov	r0, r5
	str	r3, [r4, #4]
	bl	thread_reference
	b	.L2
.L5:
	mov	r2, r5
	mov	r1, r6
	ldr	r0, .L11+24
	bl	panic
	b	.L2
.L10:
	orr	r3, r3, r2
	mov	r0, r5
	str	r3, [r4, #4]
	bl	turnstile_reference
	b	.L2
.L12:
	.align	2
.L11:
	.word	TURNSTILE_INHERITOR_NULL
	.word	TURNSTILE_UPDATE_FLAGS_NONE
	.word	TURNSTILE_INHERITOR_THREAD
	.word	TURNSTILE_INHERITOR_TURNSTILE
	.word	TURNSTILE_INHERITOR_WORKQ
	.word	TURNSTILE_DELAYED_UPDATE
	.word	.LC0
	.size	turnstile_update_inheritor, .-turnstile_update_inheritor
	.comm	TURNSTILE_UPDATE_FLAGS_NONE,4,4
	.comm	TURNSTILE_INHERITOR_WORKQ,4,4
	.comm	TURNSTILE_INHERITOR_TURNSTILE,4,4
	.comm	TURNSTILE_INHERITOR_THREAD,4,4
	.comm	TURNSTILE_INHERITOR_NULL,4,4
	.comm	TURNSTILE_DELAYED_UPDATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
