	.file	"extr_ipc_tt.c_thread_get_special_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	thread_get_special_port
	.type	thread_get_special_port, @function
thread_get_special_port:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR THREAD_NULL[rip], rdi
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, DWORD PTR KERN_INVALID_ARGUMENT[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	je	.L1
	cmp	esi, 128
	je	.L11
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rbp, rdi
	mov	r12d, DWORD PTR KERN_SUCCESS[rip]
	mov	rbx, rdx
	call	thread_mtx_lock@PLT
	cmp	QWORD PTR 0[rbp], 0
	jne	.L12
	mov	r12d, DWORD PTR KERN_FAILURE[rip]
.L7:
	mov	rdi, rbp
	call	thread_mtx_unlock@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	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	edi, DWORD PTR 8[rbp]
	call	ipc_port_copy_send@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	thread_get_special_port, .-thread_get_special_port
	.comm	THREAD_NULL,8,8
	.comm	KERN_SUCCESS,4,4
	.comm	KERN_INVALID_ARGUMENT,4,4
	.comm	KERN_FAILURE,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_ipc_tt.c_thread_get_special_port.c"
	.text
	.align	2
	.global	thread_get_special_port
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_get_special_port, %function
thread_get_special_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L4
	cmp	r1, #128
	beq	.L11
.L4:
	ldr	r3, .L13+4
	ldr	r6, [r3]
	mov	r0, r6
	pop	{r4, r5, r6, pc}
.L11:
	mov	r4, r0
	ldr	r3, .L13+8
	mov	r5, r2
	ldr	r6, [r3]
	bl	thread_mtx_lock
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L13+12
	ldr	r6, [r3]
.L7:
	mov	r0, r4
	bl	thread_mtx_unlock
	mov	r0, r6
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r0, [r4, #4]
	bl	ipc_port_copy_send
	str	r0, [r5]
	b	.L7
.L14:
	.align	2
.L13:
	.word	THREAD_NULL
	.word	KERN_INVALID_ARGUMENT
	.word	KERN_SUCCESS
	.word	KERN_FAILURE
	.size	thread_get_special_port, .-thread_get_special_port
	.comm	THREAD_NULL,4,4
	.comm	KERN_SUCCESS,4,4
	.comm	KERN_INVALID_ARGUMENT,4,4
	.comm	KERN_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
