	.file	"extr_sysv_ipc.c_ipcperm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ipcperm
	.type	ipcperm, @function
ipcperm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR [rdi]
	mov	rax, QWORD PTR 0[r13]
	cmp	rax, QWORD PTR [rsi]
	je	.L2
	cmp	rax, QWORD PTR 8[rsi]
	jne	.L3
.L2:
	mov	edx, DWORD PTR 16[rbx]
	mov	ebx, DWORD PTR IPC_M[rip]
.L4:
	mov	eax, DWORD PTR IPC_R[rip]
	mov	ecx, ebx
	or	ecx, eax
	test	eax, edx
	cmovne	ebx, ecx
	mov	ecx, DWORD PTR IPC_W[rip]
	mov	esi, ebx
	or	esi, ecx
	test	ecx, edx
	cmovne	ebx, esi
	mov	edx, ebx
	and	edx, ebp
	cmp	edx, ebp
	je	.L15
	mov	edx, DWORD PTR IPC_M[rip]
	mov	r13d, edx
	and	r13d, ebp
	je	.L11
	and	edx, ebx
	mov	r13d, edx
	je	.L33
	xor	r13d, r13d
.L11:
	test	ebp, eax
	je	.L13
.L36:
	test	ebx, eax
	je	.L34
.L13:
	mov	eax, DWORD PTR IPC_W[rip]
	test	eax, ebp
	jne	.L35
.L14:
	or	ebx, r13d
	and	ebx, ebp
	cmp	ebx, ebp
	je	.L15
	mov	eax, DWORD PTR EACCES[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	test	eax, ebx
	jne	.L14
	mov	esi, DWORD PTR PRIV_IPC_WRITE[rip]
	mov	rdi, r12
	call	priv_check@PLT
	test	eax, eax
	jne	.L14
	or	r13d, DWORD PTR IPC_W[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR 24[rsi]
	mov	rsi, r13
	call	groupmember@PLT
	test	rax, rax
	je	.L5
.L6:
	mov	edx, DWORD PTR 16[rbx]
	xor	ebx, ebx
	sal	edx, 3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	mov	esi, DWORD PTR PRIV_IPC_READ[rip]
	mov	rdi, r12
	call	priv_check@PLT
	test	eax, eax
	jne	.L13
	or	r13d, DWORD PTR IPC_R[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L33:
	mov	esi, DWORD PTR PRIV_IPC_ADMIN[rip]
	mov	rdi, r12
	call	priv_check@PLT
	test	eax, eax
	jne	.L31
	mov	r13d, DWORD PTR IPC_M[rip]
.L31:
	mov	eax, DWORD PTR IPC_R[rip]
	test	ebp, eax
	je	.L13
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 20[rbx]
	mov	rsi, r13
	call	groupmember@PLT
	test	rax, rax
	jne	.L6
	mov	edx, DWORD PTR 16[rbx]
	xor	ebx, ebx
	sal	edx, 6
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ipcperm, .-ipcperm
	.comm	PRIV_IPC_WRITE,4,4
	.comm	PRIV_IPC_READ,4,4
	.comm	PRIV_IPC_ADMIN,4,4
	.comm	IPC_W,4,4
	.comm	IPC_R,4,4
	.comm	IPC_M,4,4
	.comm	EACCES,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_sysv_ipc.c_ipcperm.c"
	.text
	.align	2
	.global	ipcperm
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipcperm, %function
ipcperm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, [r0]
	mov	r6, r1
	ldr	r3, [r4]
	ldr	r1, [r1]
	mov	r7, r0
	cmp	r3, r1
	mov	r5, r2
	beq	.L2
	ldr	r2, [r6, #4]
	cmp	r3, r2
	bne	.L3
.L2:
	ldr	r3, .L40
	ldr	r2, [r6, #8]
	ldr	r4, [r3]
.L4:
	ldr	r9, .L40+4
	ldr	r8, .L40+8
	ldr	r3, [r9]
	ldr	r1, [r8]
	tst	r3, r2
	orrne	r4, r4, r3
	tst	r1, r2
	orrne	r4, r4, r1
	bics	r2, r5, r4
	beq	.L15
	ldr	r10, .L40
	ldr	r2, [r10]
	ands	r6, r2, r5
	beq	.L11
	ands	r6, r2, r4
	movne	r6, #0
	beq	.L35
.L11:
	tst	r5, r3
	beq	.L13
.L39:
	tst	r4, r3
	beq	.L36
.L13:
	ldr	r3, [r8]
	tst	r3, r5
	bne	.L37
.L14:
	orr	r4, r4, r6
	bics	r3, r5, r4
	beq	.L15
.L38:
	ldr	r3, .L40+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L37:
	tst	r3, r4
	bne	.L14
	ldr	r3, .L40+16
	mov	r0, r7
	ldr	r1, [r3]
	bl	priv_check
	cmp	r0, #0
	ldreq	r3, [r8]
	orreq	r6, r6, r3
	orr	r4, r4, r6
	bics	r3, r5, r4
	bne	.L38
.L15:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	mov	r1, r4
	ldr	r0, [r6, #16]
	bl	groupmember
	cmp	r0, #0
	beq	.L5
.L6:
	ldr	r2, [r6, #8]
	mov	r4, #0
	lsl	r2, r2, #3
	b	.L4
.L35:
	ldr	r3, .L40+20
	mov	r0, r7
	ldr	r1, [r3]
	bl	priv_check
	ldr	r3, [r9]
	cmp	r0, #0
	ldreq	r6, [r10]
	tst	r5, r3
	beq	.L13
	b	.L39
.L36:
	ldr	r3, .L40+24
	mov	r0, r7
	ldr	r1, [r3]
	bl	priv_check
	cmp	r0, #0
	ldreq	r3, [r9]
	orreq	r6, r6, r3
	ldr	r3, [r8]
	tst	r3, r5
	beq	.L14
	b	.L37
.L5:
	mov	r1, r4
	ldr	r0, [r6, #12]
	bl	groupmember
	subs	r4, r0, #0
	bne	.L6
	ldr	r2, [r6, #8]
	lsl	r2, r2, #6
	b	.L4
.L41:
	.align	2
.L40:
	.word	IPC_M
	.word	IPC_R
	.word	IPC_W
	.word	EACCES
	.word	PRIV_IPC_WRITE
	.word	PRIV_IPC_ADMIN
	.word	PRIV_IPC_READ
	.size	ipcperm, .-ipcperm
	.comm	PRIV_IPC_WRITE,4,4
	.comm	PRIV_IPC_READ,4,4
	.comm	PRIV_IPC_ADMIN,4,4
	.comm	IPC_W,4,4
	.comm	IPC_R,4,4
	.comm	IPC_M,4,4
	.comm	EACCES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
