	.file	"extr_ipc_tt.c_ipc_task_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ipc_task_init"
	.text
	.p2align 4
	.globl	ipc_task_init
	.type	ipc_task_init, @function
ipc_task_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR ipc_table_entries[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	rsi, 8[rsp]
	call	ipc_space_create@PLT
	cmp	QWORD PTR KERN_SUCCESS[rip], rax
	je	.L2
	lea	rdi, .LC0[rip]
	call	panic@PLT
.L2:
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], rbx
	xor	eax, eax
	call	ipc_port_alloc_kernel@PLT
	cmp	QWORD PTR IP_NULL[rip], rax
	mov	rbp, rax
	je	.L29
.L3:
	xor	eax, eax
	call	ipc_port_alloc_kernel@PLT
	cmp	QWORD PTR IP_NULL[rip], rax
	mov	r12, rax
	je	.L30
.L4:
	mov	rdi, rbx
	call	itk_lock_init@PLT
	mov	rax, QWORD PTR IP_NULL[rip]
	mov	QWORD PTR [rbx], rbp
	mov	rdi, rbx
	mov	QWORD PTR 96[rbx], r12
	mov	QWORD PTR 88[rbx], rax
	call	task_is_a_corpse_fork@PLT
	test	rax, rax
	je	.L5
	mov	rdx, QWORD PTR IP_NULL[rip]
	mov	QWORD PTR 80[rbx], rdx
.L6:
	mov	rax, QWORD PTR 8[rsp]
	cmp	QWORD PTR TASK_NULL[rip], r13
	mov	QWORD PTR 72[rbx], rdx
	mov	QWORD PTR 64[rbx], rax
	je	.L31
	mov	rdi, r13
	call	itk_lock@PLT
	mov	rax, QWORD PTR IP_NULL[rip]
	xor	edi, edi
	cmp	QWORD PTR 0[r13], rax
	setne	dil
	xor	ebp, ebp
	call	assert@PLT
	mov	eax, DWORD PTR TASK_PORT_REGISTER_MAX[rip]
	test	eax, eax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 56[rbx]
	lea	r12, [rax+rbp*8]
	mov	rax, QWORD PTR 56[r13]
	mov	rdi, QWORD PTR [rax+rbp*8]
	add	rbp, 1
	call	ipc_port_copy_send@PLT
	cmp	DWORD PTR TASK_PORT_REGISTER_MAX[rip], ebp
	mov	QWORD PTR [r12], rax
	jg	.L15
.L18:
	mov	r14d, DWORD PTR FIRST_EXCEPTION[rip]
	cmp	r14d, DWORD PTR EXC_TYPES_COUNT[rip]
	jge	.L17
	movsx	rdx, r14d
	mov	rsi, QWORD PTR 48[r13]
	mov	rax, QWORD PTR 48[rbx]
	lea	rbp, [rdx+rdx*2]
	sal	rbp, 3
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR 16[rsi+rbp]
	lea	r12, [rax+rbp]
	add	r14d, 1
	call	ipc_port_copy_send@PLT
	mov	rsi, QWORD PTR 48[r13]
	mov	QWORD PTR 16[r12], rax
	mov	rax, QWORD PTR 48[rbx]
	lea	rcx, [rsi+rbp]
	mov	edi, DWORD PTR 8[rcx]
	lea	rdx, [rax+rbp]
	add	rbp, 24
	cmp	DWORD PTR EXC_TYPES_COUNT[rip], r14d
	mov	DWORD PTR 8[rdx], edi
	mov	edi, DWORD PTR 4[rcx]
	mov	ecx, DWORD PTR [rcx]
	mov	DWORD PTR 4[rdx], edi
	mov	DWORD PTR [rdx], ecx
	jg	.L19
.L17:
	mov	rdi, QWORD PTR 40[r13]
	call	ipc_port_copy_send@PLT
	mov	rdi, QWORD PTR 32[r13]
	mov	QWORD PTR 40[rbx], rax
	call	ipc_port_copy_send@PLT
	mov	rdi, QWORD PTR 24[r13]
	mov	QWORD PTR 32[rbx], rax
	call	ipc_port_copy_send@PLT
	mov	rdi, QWORD PTR 16[r13]
	mov	QWORD PTR 24[rbx], rax
	call	ipc_port_copy_send@PLT
	mov	rdi, QWORD PTR 8[r13]
	mov	QWORD PTR 16[rbx], rax
	call	ipc_port_copy_send@PLT
	mov	rdi, r13
	mov	QWORD PTR 8[rbx], rax
	call	itk_unlock@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L32
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	esi, DWORD PTR FIRST_EXCEPTION[rip]
	mov	ecx, DWORD PTR EXC_TYPES_COUNT[rip]
	cmp	esi, ecx
	jge	.L12
	sub	ecx, 1
	movsx	rdi, esi
	mov	r8, QWORD PTR 48[rbx]
	sub	ecx, esi
	lea	rax, [rdi+rdi*2]
	add	rcx, rdi
	lea	rax, 16[r8+rax*8]
	lea	rcx, [rcx+rcx*2]
	lea	rcx, 40[r8+rcx*8]
	.p2align 4,,10
	.p2align 3
.L11:
	mov	QWORD PTR [rax], rdx
	add	rax, 24
	cmp	rcx, rax
	jne	.L11
.L12:
	xor	eax, eax
	call	host_priv_self@PLT
	lea	rsi, 16[rsp]
	mov	edi, eax
	call	host_get_host_port@PLT
	xor	edi, edi
	cmp	QWORD PTR KERN_SUCCESS[rip], rax
	sete	dil
	call	assert@PLT
	mov	rax, QWORD PTR 16[rsp]
	mov	rcx, QWORD PTR IP_NULL[rip]
	mov	QWORD PTR 40[rbx], rax
	mov	eax, DWORD PTR TASK_PORT_REGISTER_MAX[rip]
	mov	QWORD PTR 32[rbx], rcx
	mov	QWORD PTR 24[rbx], rcx
	mov	QWORD PTR 16[rbx], rcx
	mov	QWORD PTR 8[rbx], rcx
	test	eax, eax
	jle	.L1
	sub	eax, 1
	lea	rsi, 8[0+rax*8]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR 56[rbx]
	mov	QWORD PTR [rdx+rax], rcx
	add	rax, 8
	cmp	rax, rsi
	jne	.L14
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, rbp
	call	ipc_port_make_send@PLT
	mov	rdx, QWORD PTR IP_NULL[rip]
	mov	QWORD PTR 80[rbx], rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L29:
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L3
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ipc_task_init, .-ipc_task_init
	.comm	ipc_table_entries,8,8
	.comm	TASK_PORT_REGISTER_MAX,4,4
	.comm	TASK_NULL,8,8
	.comm	KERN_SUCCESS,8,8
	.comm	IP_NULL,8,8
	.comm	FIRST_EXCEPTION,4,4
	.comm	EXC_TYPES_COUNT,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_ipc_task_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ipc_task_init\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ipc_task_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipc_task_init, %function
ipc_task_init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L32
	sub	sp, sp, #16
	mov	r5, r0
	ldr	r0, [r3]
	ldr	r3, .L32+4
	mov	r6, r1
	add	r1, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	ipc_space_create
	ldr	r7, .L32+8
	ldr	r3, [r7]
	cmp	r3, r0
	beq	.L2
	ldr	r0, .L32+12
	bl	panic
.L2:
	ldr	r3, [sp, #4]
	ldr	r4, .L32+16
	str	r5, [r3]
	bl	ipc_port_alloc_kernel
	ldr	r3, [r4]
	mov	r8, r0
	cmp	r3, r0
	beq	.L28
.L3:
	bl	ipc_port_alloc_kernel
	ldr	r3, [r4]
	mov	r9, r0
	cmp	r3, r0
	beq	.L29
.L4:
	mov	r0, r5
	bl	itk_lock_init
	ldr	r3, [r4]
	mov	r0, r5
	str	r8, [r5]
	str	r9, [r5, #48]
	str	r3, [r5, #44]
	bl	task_is_a_corpse_fork
	cmp	r0, #0
	beq	.L5
	ldr	r2, [r4]
	str	r2, [r5, #40]
.L6:
	ldr	r3, .L32+20
	str	r2, [r5, #36]
	ldr	r1, [r3]
	ldr	r3, [sp, #4]
	cmp	r1, r6
	str	r3, [r5, #32]
	beq	.L30
	mov	r0, r6
	bl	itk_lock
	ldr	r3, [r4]
	ldr	r0, [r6]
	ldr	r8, .L32+24
	subs	r0, r0, r3
	movne	r0, #1
	bl	assert
	ldr	r3, [r8]
	cmp	r3, #0
	movgt	r4, #0
	ble	.L17
.L14:
	ldr	r3, [r6, #28]
	ldr	r7, [r5, #28]
	ldr	r0, [r3, r4, lsl #2]
	bl	ipc_port_copy_send
	ldr	r3, [r8]
	str	r0, [r7, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L14
.L17:
	ldr	r3, .L32+28
	ldr	r7, .L32+32
	ldr	r4, [r3]
	ldr	r3, [r7]
	cmp	r4, r3
	bge	.L16
	ldr	r3, [r6, #24]
	ldr	ip, [r5, #24]
.L18:
	add	r3, r3, r4, lsl #4
	ldr	r0, [r3, #12]
	add	r8, ip, r4, lsl #4
	bl	ipc_port_copy_send
	ldr	r3, [r6, #24]
	lsl	r2, r4, #4
	ldr	ip, [r5, #24]
	add	r1, r3, r2
	ldr	r9, [r1, #8]
	ldr	r10, [r1, #4]
	ldr	lr, [r3, r4, lsl #4]
	ldr	r1, [r7]
	add	r2, ip, r2
	str	r0, [r8, #12]
	str	r9, [r2, #8]
	str	r10, [r2, #4]
	str	lr, [ip, r4, lsl #4]
	add	r4, r4, #1
	cmp	r1, r4
	bgt	.L18
.L16:
	ldr	r0, [r6, #20]
	bl	ipc_port_copy_send
	mov	r3, r0
	ldr	r0, [r6, #16]
	str	r3, [r5, #20]
	bl	ipc_port_copy_send
	mov	r3, r0
	ldr	r0, [r6, #12]
	str	r3, [r5, #16]
	bl	ipc_port_copy_send
	mov	r3, r0
	ldr	r0, [r6, #8]
	str	r3, [r5, #12]
	bl	ipc_port_copy_send
	mov	r3, r0
	ldr	r0, [r6, #4]
	str	r3, [r5, #8]
	bl	ipc_port_copy_send
	mov	r3, r0
	mov	r0, r6
	str	r3, [r5, #4]
	bl	itk_unlock
.L1:
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L30:
	ldr	r3, .L32+28
	ldr	r1, .L32+32
	ldr	r3, [r3]
	ldr	r0, [r1]
	cmp	r3, r0
	bge	.L12
	ldr	r1, [r5, #24]
	add	r3, r1, r3, lsl #4
	add	r1, r1, r0, lsl #4
.L11:
	str	r2, [r3, #12]
	add	r3, r3, #16
	cmp	r1, r3
	bne	.L11
.L12:
	bl	host_priv_self
	add	r1, sp, #8
	bl	host_get_host_port
	ldr	r3, [r7]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L32+24
	ldr	r1, [r4]
	ldr	r0, [r3]
	ldr	r3, [sp, #8]
	cmp	r0, #0
	str	r3, [r5, #20]
	str	r1, [r5, #16]
	movgt	r3, #0
	str	r1, [r5, #12]
	str	r1, [r5, #8]
	str	r1, [r5, #4]
	ble	.L1
.L9:
	ldr	r2, [r5, #28]
	str	r1, [r2, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, r0
	bne	.L9
	b	.L1
.L5:
	mov	r0, r8
	bl	ipc_port_make_send
	ldr	r2, [r4]
	str	r0, [r5, #40]
	b	.L6
.L29:
	ldr	r0, .L32+12
	bl	panic
	b	.L4
.L28:
	ldr	r0, .L32+12
	bl	panic
	b	.L3
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	ipc_table_entries
	.word	.LC1
	.word	KERN_SUCCESS
	.word	.LC0
	.word	IP_NULL
	.word	TASK_NULL
	.word	TASK_PORT_REGISTER_MAX
	.word	FIRST_EXCEPTION
	.word	EXC_TYPES_COUNT
	.size	ipc_task_init, .-ipc_task_init
	.comm	ipc_table_entries,4,4
	.comm	TASK_PORT_REGISTER_MAX,4,4
	.comm	TASK_NULL,4,4
	.comm	KERN_SUCCESS,4,4
	.comm	IP_NULL,4,4
	.comm	FIRST_EXCEPTION,4,4
	.comm	EXC_TYPES_COUNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
