	.file	"extr_ipc_kmsg.c_ipc_kmsg_copyin_port_descriptor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ipc_kmsg_copyin_port_descriptor
	.type	ipc_kmsg_copyin_port_descriptor, @function
ipc_kmsg_copyin_port_descriptor:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR 112[rsp]
	mov	QWORD PTR 16[rsp], rcx
	mov	QWORD PTR 24[rsp], r8
	mov	QWORD PTR [rsp], r9
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r15, QWORD PTR [rsi]
	mov	rdi, r15
	call	ipc_object_copyin_type@PLT
	mov	r13, QWORD PTR 8[rbx]
	mov	rbp, rax
	mov	rdi, r13
	call	MACH_PORT_VALID@PLT
	test	rax, rax
	je	.L2
	lea	rcx, 32[rsp]
	mov	rdx, r15
	mov	rsi, r13
	mov	edi, r12d
	call	ipc_object_copyin@PLT
	cmp	QWORD PTR KERN_SUCCESS[rip], rax
	jne	.L13
	cmp	QWORD PTR MACH_MSG_TYPE_PORT_RECEIVE[rip], rbp
	mov	rdi, QWORD PTR 32[rsp]
	je	.L14
.L6:
	mov	QWORD PTR 24[r14], rdi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r13
	call	CAST_MACH_NAME_TO_PORT@PLT
	mov	QWORD PTR 24[r14], rax
.L8:
	mov	eax, DWORD PTR MACH_MSG_PORT_DESCRIPTOR[rip]
	mov	QWORD PTR 16[r14], rbp
	mov	DWORD PTR 8[r14], eax
	lea	rax, 16[rbx]
	mov	QWORD PTR [r14], 0
.L1:
	mov	rdx, QWORD PTR 40[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L15
	add	rsp, 56
	.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
.L13:
	.cfi_restore_state
	mov	rax, QWORD PTR [rsp]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR MACH_SEND_KERNEL[rip], eax
	je	.L16
.L4:
	mov	eax, DWORD PTR MACH_SEND_INVALID_RIGHT[rip]
	mov	rsi, QWORD PTR 8[rsp]
	mov	DWORD PTR [rsi], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, QWORD PTR 16[rsp]
	call	ipc_port_check_circularity@PLT
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR 24[rsp]
	mov	edx, DWORD PTR MACH_MSGH_BITS_CIRCULAR[rip]
	mov	rax, QWORD PTR [rax]
	or	DWORD PTR [rax], edx
.L11:
	mov	rdi, QWORD PTR 32[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	ecx, DWORD PTR kGUARD_EXC_SEND_INVALID_RIGHT[rip]
	xor	edx, edx
	xor	esi, esi
	mov	rdi, r13
	call	mach_port_guard_exception@PLT
	jmp	.L4
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ipc_kmsg_copyin_port_descriptor, .-ipc_kmsg_copyin_port_descriptor
	.comm	kGUARD_EXC_SEND_INVALID_RIGHT,4,4
	.comm	MACH_SEND_KERNEL,4,4
	.comm	MACH_SEND_INVALID_RIGHT,4,4
	.comm	MACH_MSG_TYPE_PORT_RECEIVE,8,8
	.comm	MACH_MSG_PORT_DESCRIPTOR,4,4
	.comm	MACH_MSGH_BITS_CIRCULAR,4,4
	.comm	KERN_SUCCESS,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_kmsg.c_ipc_kmsg_copyin_port_descriptor.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ipc_kmsg_copyin_port_descriptor
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipc_kmsg_copyin_port_descriptor, %function
ipc_kmsg_copyin_port_descriptor:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L16
	sub	sp, sp, #20
	ldr	ip, [ip]
	str	ip, [sp, #12]
	mov	ip,#0
	ldr	r8, [r1]
	mov	r4, r1
	str	r3, [sp]
	ldr	r3, [sp, #56]
	mov	r5, r0
	mov	r0, r8
	mov	r7, r2
	str	r3, [sp, #4]
	ldr	r10, [sp, #60]
	ldr	r9, [sp, #64]
	bl	ipc_object_copyin_type
	ldr	fp, [r4, #4]
	mov	r6, r0
	mov	r0, fp
	bl	MACH_PORT_VALID
	cmp	r0, #0
	beq	.L2
	add	r3, sp, #8
	mov	r2, r8
	mov	r0, r7
	mov	r1, fp
	bl	ipc_object_copyin
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L13
	ldr	r3, .L16+8
	ldr	r0, [sp, #8]
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L11
	ldr	r1, [sp]
	bl	ipc_port_check_circularity
	cmp	r0, #0
	ldrne	r3, [sp, #4]
	ldrne	r1, .L16+12
	ldrne	r2, [r3]
	ldrne	r1, [r1]
	ldrne	r3, [r2]
	ldrne	r0, [sp, #8]
	orrne	r3, r3, r1
	ldreq	r0, [sp, #8]
	strne	r3, [r2]
	b	.L11
.L2:
	mov	r0, fp
	bl	CAST_MACH_NAME_TO_PORT
.L11:
	mov	r3, #0
	ldr	r2, .L16+16
	str	r0, [r5, #12]
	ldr	r2, [r2]
	str	r6, [r5, #8]
	add	r0, r4, #8
	str	r2, [r5, #4]
	str	r3, [r5]
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r3, .L16+20
	ldr	r2, [r10]
	ldr	r3, [r3]
	ands	r2, r2, r3
	beq	.L15
.L4:
	ldr	r3, .L16+24
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r9]
	b	.L1
.L15:
	ldr	r3, .L16+28
	mov	r0, fp
	mov	r1, r2
	ldr	r3, [r3]
	bl	mach_port_guard_exception
	b	.L4
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	KERN_SUCCESS
	.word	MACH_MSG_TYPE_PORT_RECEIVE
	.word	MACH_MSGH_BITS_CIRCULAR
	.word	MACH_MSG_PORT_DESCRIPTOR
	.word	MACH_SEND_KERNEL
	.word	MACH_SEND_INVALID_RIGHT
	.word	kGUARD_EXC_SEND_INVALID_RIGHT
	.size	ipc_kmsg_copyin_port_descriptor, .-ipc_kmsg_copyin_port_descriptor
	.comm	kGUARD_EXC_SEND_INVALID_RIGHT,4,4
	.comm	MACH_SEND_KERNEL,4,4
	.comm	MACH_SEND_INVALID_RIGHT,4,4
	.comm	MACH_MSG_TYPE_PORT_RECEIVE,4,4
	.comm	MACH_MSG_PORT_DESCRIPTOR,4,4
	.comm	MACH_MSGH_BITS_CIRCULAR,4,4
	.comm	KERN_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
