	.file	"extr_path.c_calc_shared_perm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	calc_shared_perm, @function
calc_shared_perm:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	eax, eax
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	get_shared_repository@PLT
	test	eax, eax
	mov	eax, 0
	js	.L13
	call	get_shared_repository@PLT
	mov	ebx, eax
.L3:
	mov	eax, ebx
	and	al, 109
	test	DWORD PTR S_IWUSR[rip], ebp
	cmove	ebx, eax
	test	DWORD PTR S_IXUSR[rip], ebp
	je	.L5
	mov	eax, ebx
	sar	eax, 2
	and	eax, 73
	or	ebx, eax
.L5:
	xor	eax, eax
	call	get_shared_repository@PLT
	mov	r8d, eax
	mov	eax, ebp
	and	eax, -512
	or	eax, ebx
	or	ebx, ebp
	test	r8d, r8d
	cmovns	eax, ebx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	call	get_shared_repository@PLT
	neg	eax
	mov	ebx, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	calc_shared_perm, .-calc_shared_perm
	.comm	S_IXUSR,4,4
	.comm	S_IWUSR,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_path.c_calc_shared_perm.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_shared_perm, %function
calc_shared_perm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	bl	get_shared_repository
	cmp	r0, #0
	blt	.L13
	bl	get_shared_repository
	mov	r4, r0
.L3:
	ldr	r3, .L14
	ldr	r3, [r3]
	tst	r5, r3
	ldr	r3, .L14+4
	biceq	r4, r4, #146
	ldr	r3, [r3]
	tst	r5, r3
	asrne	r3, r4, #2
	andne	r3, r3, #73
	orrne	r4, r4, r3
	bl	get_shared_repository
	cmp	r0, #0
	biclt	r0, r5, #508
	biclt	r0, r0, #3
	orrlt	r0, r0, r4
	orrge	r0, r4, r5
	pop	{r4, r5, r6, pc}
.L13:
	bl	get_shared_repository
	rsb	r4, r0, #0
	b	.L3
.L15:
	.align	2
.L14:
	.word	S_IWUSR
	.word	S_IXUSR
	.size	calc_shared_perm, .-calc_shared_perm
	.comm	S_IXUSR,4,4
	.comm	S_IWUSR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
