	.file	"extr_ipc_right.c_ipc_right_info.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ipc_right_info
	.type	ipc_right_info, @function
ipc_right_info:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r12d, DWORD PTR [rdx]
	mov	r10, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rsp], r8
	mov	r13, QWORD PTR 16[rdx]
	test	DWORD PTR MACH_PORT_TYPE_RECEIVE[rip], r12d
	jne	.L11
	mov	QWORD PTR 16[rsp], r10
	mov	ebp, r12d
	and	ebp, DWORD PTR MACH_PORT_TYPE_SEND_RIGHTS[rip]
	je	.L5
	mov	DWORD PTR 28[rsp], esi
	mov	rcx, rdx
	mov	rbx, rdx
	mov	edx, esi
	mov	rsi, r13
	call	ipc_right_check@PLT
	mov	ebp, eax
	test	eax, eax
	jne	.L6
	mov	r10, QWORD PTR 16[rsp]
	cmp	QWORD PTR IE_REQ_NONE[rip], r10
	jne	.L12
	mov	rdi, r13
	call	ip_unlock@PLT
	mov	edi, r15d
	call	is_write_unlock@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, r13
	mov	QWORD PTR 16[rsp], r10
	xor	ebp, ebp
	mov	DWORD PTR 28[rsp], esi
	call	IP_VALID@PLT
	mov	edi, eax
	call	assert@PLT
	mov	r10, QWORD PTR 16[rsp]
	cmp	QWORD PTR IE_REQ_NONE[rip], r10
	je	.L5
	mov	rdi, r13
	call	ip_lock@PLT
	mov	rdi, r13
	call	ip_active@PLT
	mov	edi, eax
	call	assert@PLT
	mov	r10, QWORD PTR 16[rsp]
	mov	r9d, DWORD PTR 28[rsp]
	mov	rdi, r13
	mov	rdx, r10
	mov	esi, r9d
	call	ipc_port_request_type@PLT
	mov	rdi, r13
	mov	ebp, eax
	call	ip_unlock@PLT
.L5:
	mov	edi, r15d
	call	is_write_unlock@PLT
.L4:
	mov	edi, r12d
	call	IE_BITS_TYPE@PLT
	mov	edi, r12d
	or	eax, ebp
	mov	DWORD PTR [r14], eax
	call	IE_BITS_UREFS@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	DWORD PTR [rcx], eax
	mov	eax, DWORD PTR KERN_SUCCESS[rip]
	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
.L12:
	.cfi_restore_state
	mov	r9d, DWORD PTR 28[rsp]
	mov	rdx, r10
	mov	rdi, r13
	mov	esi, r9d
	call	ipc_port_request_type@PLT
	mov	rdi, r13
	mov	ebp, eax
	call	ip_unlock@PLT
	mov	edi, r15d
	call	is_write_unlock@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r12d, DWORD PTR [rbx]
	mov	edi, r12d
	call	IE_BITS_TYPE@PLT
	xor	edi, edi
	cmp	DWORD PTR MACH_PORT_TYPE_DEAD_NAME[rip], eax
	sete	dil
	xor	ebp, ebp
	call	assert@PLT
	mov	edi, r15d
	call	is_write_unlock@PLT
	mov	rdi, r13
	call	ip_release@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ipc_right_info, .-ipc_right_info
	.comm	MACH_PORT_TYPE_SEND_RIGHTS,4,4
	.comm	MACH_PORT_TYPE_RECEIVE,4,4
	.comm	MACH_PORT_TYPE_DEAD_NAME,4,4
	.comm	KERN_SUCCESS,4,4
	.comm	IE_REQ_NONE,8,8
	.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_right.c_ipc_right_info.c"
	.text
	.align	2
	.global	ipc_right_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipc_right_info, %function
ipc_right_info:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r2
	ldr	r2, .L14
	ldr	r5, [r6]
	ldr	r2, [r2]
	sub	sp, sp, #12
	ands	r2, r5, r2
	mov	r9, r1
	mov	r7, r3
	mov	r8, r0
	ldr	fp, [r6, #4]
	ldr	r10, [r6, #8]
	str	r2, [sp, #4]
	bne	.L13
	ldr	r3, .L14+4
	ldr	r4, [r3]
	ands	r4, r5, r4
	beq	.L5
	mov	r2, r1
	mov	r3, r6
	mov	r1, r10
	bl	ipc_right_check
	subs	r4, r0, #0
	bne	.L6
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, fp
	bne	.L11
.L7:
	mov	r0, r10
	bl	ip_unlock
.L10:
	mov	r0, r8
	bl	is_write_unlock
	b	.L4
.L5:
	bl	is_write_unlock
.L4:
	mov	r0, r5
	bl	IE_BITS_TYPE
	orr	r0, r4, r0
	str	r0, [r7]
	mov	r0, r5
	bl	IE_BITS_UREFS
	ldr	r2, [sp, #48]
	ldr	r3, .L14+12
	str	r0, [r2]
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r0, r10
	bl	IP_VALID
	bl	assert
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, fp
	moveq	r4, #0
	beq	.L10
	mov	r0, r10
	bl	ip_lock
	mov	r0, r10
	bl	ip_active
	bl	assert
.L11:
	mov	r2, fp
	mov	r1, r9
	mov	r0, r10
	bl	ipc_port_request_type
	mov	r4, r0
	b	.L7
.L6:
	ldr	r5, [r6]
	ldr	r4, [sp, #4]
	mov	r0, r5
	bl	IE_BITS_TYPE
	ldr	r3, .L14+16
	ldr	r3, [r3]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r0, r8
	bl	is_write_unlock
	mov	r0, r10
	bl	ip_release
	b	.L4
.L15:
	.align	2
.L14:
	.word	MACH_PORT_TYPE_RECEIVE
	.word	MACH_PORT_TYPE_SEND_RIGHTS
	.word	IE_REQ_NONE
	.word	KERN_SUCCESS
	.word	MACH_PORT_TYPE_DEAD_NAME
	.size	ipc_right_info, .-ipc_right_info
	.comm	MACH_PORT_TYPE_SEND_RIGHTS,4,4
	.comm	MACH_PORT_TYPE_RECEIVE,4,4
	.comm	MACH_PORT_TYPE_DEAD_NAME,4,4
	.comm	KERN_SUCCESS,4,4
	.comm	IE_REQ_NONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
