	.file	"extr_locks.c_lck_mtx_sleep_deadline.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Invalid lock sleep action %x\n"
	.text
	.p2align 4
	.globl	lck_mtx_sleep_deadline
	.type	lck_mtx_sleep_deadline, @function
lck_mtx_sleep_deadline:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	mov	r15d, r8d
	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
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	current_thread@PLT
	mov	rdi, r13
	mov	rbp, rax
	call	VM_KERNEL_UNSLIDE_OR_PERM@PLT
	mov	rdi, r14
	mov	DWORD PTR 12[rsp], eax
	call	VM_KERNEL_UNSLIDE_OR_PERM@PLT
	mov	esi, DWORD PTR LCK_MTX_SLEEP_DEADLINE_CODE[rip]
	mov	edi, DWORD PTR DBG_MACH_LOCKS[rip]
	mov	DWORD PTR 8[rsp], eax
	call	MACHDBG_CODE@PLT
	mov	r10d, DWORD PTR 8[rsp]
	mov	ecx, DWORD PTR 12[rsp]
	mov	edx, ebx
	or	eax, DWORD PTR DBG_FUNC_START[rip]
	xor	r9d, r9d
	mov	r8d, r12d
	mov	edi, eax
	mov	esi, r10d
	call	KERNEL_DEBUG@PLT
	mov	eax, DWORD PTR LCK_SLEEP_MASK[rip]
	not	eax
	test	eax, ebx
	jne	.L24
.L2:
	test	DWORD PTR LCK_SLEEP_PROMOTED_PRI[rip], ebx
	je	.L3
	add	DWORD PTR 4[rbp], 1
.L3:
	mov	rsi, r12
	mov	edx, r15d
	mov	rdi, r13
	call	assert_wait_deadline@PLT
	cmp	QWORD PTR THREAD_WAITING[rip], rax
	mov	r12, rax
	je	.L25
	test	DWORD PTR LCK_SLEEP_UNLOCK[rip], ebx
	jne	.L26
.L5:
	test	DWORD PTR LCK_SLEEP_PROMOTED_PRI[rip], ebx
	je	.L8
	mov	eax, DWORD PTR 4[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR 4[rbp], edx
	cmp	eax, 1
	je	.L27
.L8:
	mov	esi, DWORD PTR LCK_MTX_SLEEP_DEADLINE_CODE[rip]
	mov	edi, DWORD PTR DBG_MACH_LOCKS[rip]
	call	MACHDBG_CODE@PLT
	or	eax, DWORD PTR DBG_FUNC_END[rip]
	mov	esi, r12d
	xor	ecx, ecx
	mov	edi, eax
	xor	r9d, r9d
	xor	r8d, r8d
	xor	edx, edx
	call	KERNEL_DEBUG@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L24:
	.cfi_restore_state
	mov	esi, ebx
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r14
	call	lck_mtx_unlock@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, r14
	call	lck_mtx_unlock@PLT
	mov	edi, DWORD PTR THREAD_CONTINUE_NULL[rip]
	call	thread_block@PLT
	mov	r12, rax
	test	DWORD PTR LCK_SLEEP_UNLOCK[rip], ebx
	jne	.L5
	mov	rdi, r14
	test	DWORD PTR LCK_SLEEP_SPIN[rip], ebx
	je	.L6
	call	lck_mtx_lock_spin@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR TH_SFLAG_RW_PROMOTED[rip], eax
	je	.L8
	mov	rdi, r13
	call	unslide_for_kdebug@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	lck_rw_clear_promotion@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	call	lck_mtx_lock@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	lck_mtx_sleep_deadline, .-lck_mtx_sleep_deadline
	.comm	TH_SFLAG_RW_PROMOTED,4,4
	.comm	THREAD_WAITING,8,8
	.comm	THREAD_CONTINUE_NULL,4,4
	.comm	LCK_SLEEP_UNLOCK,4,4
	.comm	LCK_SLEEP_SPIN,4,4
	.comm	LCK_SLEEP_PROMOTED_PRI,4,4
	.comm	LCK_SLEEP_MASK,4,4
	.comm	LCK_MTX_SLEEP_DEADLINE_CODE,4,4
	.comm	DBG_MACH_LOCKS,4,4
	.comm	DBG_FUNC_START,4,4
	.comm	DBG_FUNC_END,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_locks.c_lck_mtx_sleep_deadline.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid lock sleep action %x\012\000"
	.text
	.align	2
	.global	lck_mtx_sleep_deadline
	.syntax unified
	.arm
	.fpu softvfp
	.type	lck_mtx_sleep_deadline, %function
lck_mtx_sleep_deadline:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r7, r2
	mov	r4, r1
	mov	r5, r3
	mov	r8, r0
	bl	current_thread
	ldr	r10, .L28
	ldr	r9, .L28+4
	ldr	r1, [r10]
	mov	r6, r0
	ldr	r0, [r9]
	bl	MACHDBG_CODE
	mov	fp, r0
	ldr	r3, .L28+8
	mov	r0, r8
	ldr	r3, [r3]
	orr	fp, fp, r3
	bl	VM_KERNEL_UNSLIDE_OR_PERM
	mov	r1, r0
	mov	r0, r7
	str	r1, [sp, #12]
	bl	VM_KERNEL_UNSLIDE_OR_PERM
	mov	ip, #0
	mov	r3, r0
	mov	r2, r4
	mov	r0, fp
	ldr	r1, [sp, #12]
	str	r5, [sp]
	str	ip, [sp, #4]
	bl	KERNEL_DEBUG
	ldr	r3, .L28+12
	ldr	r3, [r3]
	bics	r3, r4, r3
	bne	.L24
.L2:
	ldr	fp, .L28+16
	mov	r1, r5
	ldr	r3, [fp]
	mov	r0, r7
	tst	r4, r3
	ldrne	r3, [r6, #4]
	ldr	r2, [sp, #56]
	addne	r3, r3, #1
	strne	r3, [r6, #4]
	bl	assert_wait_deadline
	ldr	r3, .L28+20
	mov	r5, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L25
	ldr	r3, .L28+24
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L26
.L5:
	ldr	r3, [fp]
	tst	r4, r3
	beq	.L8
	ldr	r3, [r6, #4]
	cmp	r3, #1
	sub	r3, r3, #1
	str	r3, [r6, #4]
	beq	.L27
.L8:
	ldr	r1, [r10]
	ldr	r0, [r9]
	bl	MACHDBG_CODE
	mov	r3, #0
	ldr	r2, .L28+28
	str	r3, [sp, #4]
	ldr	r2, [r2]
	mov	r1, r5
	str	r3, [sp]
	orr	r0, r0, r2
	mov	r2, r3
	bl	KERNEL_DEBUG
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	mov	r1, r4
	ldr	r0, .L28+32
	bl	panic
	b	.L2
.L26:
	mov	r0, r8
	bl	lck_mtx_unlock
	b	.L5
.L25:
	mov	r0, r8
	bl	lck_mtx_unlock
	ldr	r3, .L28+36
	ldr	r0, [r3]
	bl	thread_block
	ldr	r3, .L28+24
	mov	r5, r0
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L5
	ldr	r3, .L28+40
	mov	r0, r8
	ldr	r3, [r3]
	tst	r4, r3
	beq	.L6
	bl	lck_mtx_lock_spin
	b	.L5
.L27:
	ldr	r3, .L28+44
	ldr	r2, [r6]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L8
	mov	r0, r7
	bl	unslide_for_kdebug
	mov	r1, r0
	mov	r0, r6
	bl	lck_rw_clear_promotion
	b	.L8
.L6:
	bl	lck_mtx_lock
	b	.L5
.L29:
	.align	2
.L28:
	.word	LCK_MTX_SLEEP_DEADLINE_CODE
	.word	DBG_MACH_LOCKS
	.word	DBG_FUNC_START
	.word	LCK_SLEEP_MASK
	.word	LCK_SLEEP_PROMOTED_PRI
	.word	THREAD_WAITING
	.word	LCK_SLEEP_UNLOCK
	.word	DBG_FUNC_END
	.word	.LC0
	.word	THREAD_CONTINUE_NULL
	.word	LCK_SLEEP_SPIN
	.word	TH_SFLAG_RW_PROMOTED
	.size	lck_mtx_sleep_deadline, .-lck_mtx_sleep_deadline
	.comm	TH_SFLAG_RW_PROMOTED,4,4
	.comm	THREAD_WAITING,4,4
	.comm	THREAD_CONTINUE_NULL,4,4
	.comm	LCK_SLEEP_UNLOCK,4,4
	.comm	LCK_SLEEP_SPIN,4,4
	.comm	LCK_SLEEP_PROMOTED_PRI,4,4
	.comm	LCK_SLEEP_MASK,4,4
	.comm	LCK_MTX_SLEEP_DEADLINE_CODE,4,4
	.comm	DBG_MACH_LOCKS,4,4
	.comm	DBG_FUNC_START,4,4
	.comm	DBG_FUNC_END,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
