	.file	"extr_srcpos.c_shorten_to_initial_path.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	shorten_to_initial_path, @function
shorten_to_initial_path:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	rdx, rdi
	xor	r8d, r8d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	movzx	eax, BYTE PTR [rdi]
	mov	rcx, QWORD PTR initial_path[rip]
	test	al, al
	jne	.L2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	test	sil, sil
	je	.L5
	cmp	al, 47
	jne	.L4
	add	r8d, 1
	mov	r12, rdx
.L4:
	movzx	eax, BYTE PTR 1[rdx]
	add	rdx, 1
	add	rcx, 1
	test	al, al
	je	.L5
.L2:
	movzx	esi, BYTE PTR [rcx]
	cmp	sil, al
	je	.L23
.L5:
	test	r12, r12
	je	.L1
	mov	r13d, DWORD PTR initial_pathlen[rip]
	lea	rbp, 1[r12]
	mov	rdi, rbx
	sub	r13d, r8d
	call	strlen@PLT
	mov	rdx, rbp
	sub	rdx, rbx
	sub	eax, edx
	lea	edx, 0[r13+r13*2]
	lea	edi, 1[rax+rdx]
	call	xmalloc@PLT
	mov	r12, rax
	test	r13d, r13d
	je	.L11
	lea	edx, -1[r13]
	lea	rdx, 3[rdx+rdx*2]
	add	rdx, rax
	.p2align 4,,10
	.p2align 3
.L9:
	mov	BYTE PTR [rax], 46
	add	rax, 3
	mov	BYTE PTR -2[rax], 46
	mov	BYTE PTR -1[rax], 47
	cmp	rax, rdx
	jne	.L9
	lea	edi, 0[r13+r13*2]
	movsx	rdi, edi
	add	rdi, r12
.L8:
	mov	rsi, rbp
	call	strcpy@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L11:
	.cfi_restore_state
	mov	rdi, rax
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	shorten_to_initial_path, .-shorten_to_initial_path
	.comm	initial_pathlen,4,4
	.comm	initial_path,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_srcpos.c_shorten_to_initial_path.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	shorten_to_initial_path, %function
shorten_to_initial_path:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldrb	r2, [r0]	@ zero_extendqisi2
	ldr	r3, .L20
	cmp	r2, #0
	ldr	ip, [r3]
	beq	.L9
	mov	r5, #0
	mov	r6, r0
	mov	r4, r5
	mov	lr, r0
	sub	ip, ip, #1
	b	.L3
.L6:
	cmp	r2, #47
	moveq	r4, lr
	ldrb	r2, [lr, #1]!	@ zero_extendqisi2
	addeq	r5, r5, #1
	cmp	r2, #0
	beq	.L5
.L3:
	ldrb	r1, [ip, #1]!	@ zero_extendqisi2
	clz	r3, r1
	lsr	r3, r3, #5
	cmp	r1, r2
	orrne	r3, r3, #1
	cmp	r3, #0
	beq	.L6
.L5:
	cmp	r4, #0
	beq	.L1
	ldr	r3, .L20+4
	mov	r0, r6
	ldr	r8, [r3]
	bl	strlen
	add	r7, r4, #1
	sub	r8, r8, r5
	sub	r6, r7, r6
	add	r5, r8, r8, lsl #1
	sub	r6, r0, r6
	add	r0, r6, r5
	add	r0, r0, #1
	bl	xmalloc
	cmp	r8, #0
	mov	r4, r0
	beq	.L7
	mov	r2, #46
	mov	r1, #47
	mov	r3, r0
	add	r0, r0, r5
.L8:
	strb	r2, [r3]
	strb	r2, [r3, #1]
	strb	r1, [r3, #2]
	add	r3, r3, #3
	cmp	r0, r3
	bne	.L8
.L7:
	mov	r1, r7
	bl	strcpy
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r4, r2
	b	.L1
.L21:
	.align	2
.L20:
	.word	initial_path
	.word	initial_pathlen
	.size	shorten_to_initial_path, .-shorten_to_initial_path
	.comm	initial_pathlen,4,4
	.comm	initial_path,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
