	.file	"extr_thread_call.c_thread_call_free.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Refcount negative: %d\n"
	.text
	.p2align 4
	.globl	thread_call_free
	.type	thread_call_free, @function
thread_call_free:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	disable_ints_and_lock@PLT
	cmp	QWORD PTR 32[rbp], 0
	mov	r12d, eax
	jne	.L2
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR THREAD_CALL_RESCHEDULE[rip], eax
	jne	.L2
	mov	rcx, QWORD PTR 8[rbp]
	lea	rbx, -1[rcx]
	mov	QWORD PTR 8[rbp], rbx
	test	rbx, rbx
	js	.L11
.L5:
	mov	edx, DWORD PTR THREAD_CALL_SIGNAL[rip]
	or	edx, DWORD PTR THREAD_CALL_RUNNING[rip]
	and	eax, edx
	cmp	edx, eax
	je	.L12
	mov	edi, r12d
	call	enable_ints_and_unlock@PLT
	test	rbx, rbx
	je	.L13
.L8:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR TRUE[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xor	eax, eax
	call	thread_call_unlock@PLT
	mov	edi, r12d
	call	splx@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR FALSE[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	esi, r12d
	mov	rdi, rbp
	call	thread_call_wait_once_locked@PLT
	test	rbx, rbx
	jne	.L8
.L13:
	mov	rax, QWORD PTR 24[rbp]
	xor	edi, edi
	cmp	QWORD PTR 16[rbp], rax
	sete	dil
	call	assert@PLT
	mov	edi, DWORD PTR thread_call_zone[rip]
	mov	rsi, rbp
	call	zfree@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, rbx
	lea	rdi, .LC0[rip]
	call	panic@PLT
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	thread_call_free, .-thread_call_free
	.comm	thread_call_zone,4,4
	.comm	TRUE,4,4
	.comm	THREAD_CALL_SIGNAL,4,4
	.comm	THREAD_CALL_RUNNING,4,4
	.comm	THREAD_CALL_RESCHEDULE,4,4
	.comm	FALSE,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_thread_call.c_thread_call_free.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Refcount negative: %d\012\000"
	.text
	.align	2
	.global	thread_call_free
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_call_free, %function
thread_call_free:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	disable_ints_and_lock
	ldr	r3, [r4, #16]
	mov	r6, r0
	cmp	r3, #0
	bne	.L2
	ldr	r2, .L14
	ldr	r3, [r4]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L2
	ldr	r5, [r4, #4]
	sub	r5, r5, #1
	cmp	r5, #0
	str	r5, [r4, #4]
	blt	.L11
.L5:
	ldr	r2, .L14+4
	ldr	r1, .L14+8
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	bics	r3, r2, r3
	beq	.L12
	mov	r0, r6
	bl	enable_ints_and_unlock
	cmp	r5, #0
	beq	.L13
.L8:
	ldr	r3, .L14+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L2:
	bl	thread_call_unlock
	mov	r0, r6
	bl	splx
	ldr	r3, .L14+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L12:
	mov	r1, r6
	mov	r0, r4
	bl	thread_call_wait_once_locked
	cmp	r5, #0
	bne	.L8
.L13:
	ldr	r3, [r4, #12]
	ldr	r0, [r4, #8]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L14+20
	mov	r1, r4
	ldr	r0, [r3]
	bl	zfree
	b	.L8
.L11:
	mov	r1, r5
	ldr	r0, .L14+24
	bl	panic
	ldr	r3, [r4]
	b	.L5
.L15:
	.align	2
.L14:
	.word	THREAD_CALL_RESCHEDULE
	.word	THREAD_CALL_SIGNAL
	.word	THREAD_CALL_RUNNING
	.word	TRUE
	.word	FALSE
	.word	thread_call_zone
	.word	.LC0
	.size	thread_call_free, .-thread_call_free
	.comm	thread_call_zone,4,4
	.comm	TRUE,4,4
	.comm	THREAD_CALL_SIGNAL,4,4
	.comm	THREAD_CALL_RUNNING,4,4
	.comm	THREAD_CALL_RESCHEDULE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
