	.file	"extr_builtin.c_build_dirname.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	build_dirname, @function
build_dirname:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	movsx	edi, BYTE PTR [rdi]
	call	isalphaW@PLT
	test	eax, eax
	je	.L4
	cmp	BYTE PTR 1[r13], 58
	jne	.L4
	cmp	BYTE PTR 2[r13], 92
	jne	.L4
	cmp	BYTE PTR 3[r13], 92
	jne	.L4
	cmp	BYTE PTR 4[r13], 0
	je	.L4
	lea	r12, 4[r13]
	mov	rdi, r12
	call	strlenW@PLT
	mov	ebx, eax
	cdqe
	lea	rax, -1[r12+rax]
	cmp	BYTE PTR [rax], 92
	je	.L4
	cmp	r12, rax
	ja	.L5
	add	r13, 3
	.p2align 4,,10
	.p2align 3
.L7:
	sub	rax, 1
	mov	edi, ebx
	sub	ebx, 1
	cmp	rax, r13
	je	.L6
	cmp	BYTE PTR [rax], 92
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	sub	rax, 1
	mov	edi, ebx
	sub	ebx, 1
	cmp	r12, rax
	ja	.L6
	cmp	BYTE PTR [rax], 92
	je	.L8
.L6:
	call	heap_alloc@PLT
	test	rax, rax
	je	.L4
	movsx	rbx, ebx
	mov	rdx, rax
	add	rbx, r12
	cmp	rbx, r12
	jbe	.L13
	mov	edi, 1
	sub	edi, eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r12, rsi
	mov	BYTE PTR [rdx], cl
	add	rdx, 1
	cmp	rbx, r12
	jbe	.L22
.L12:
	movzx	ecx, BYTE PTR [r12]
	lea	rsi, 1[r12]
	lea	r8d, [rdi+rdx]
	cmp	cl, 92
	jne	.L10
	cmp	BYTE PTR 1[r12], 92
	jne	.L10
	add	r12, 2
	mov	BYTE PTR [rdx], 92
	add	rdx, 1
	cmp	rbx, r12
	ja	.L12
	.p2align 4,,10
	.p2align 3
.L22:
	movsx	rdx, r8d
	add	rdx, rax
.L9:
	mov	BYTE PTR [rdx], 0
	mov	DWORD PTR 0[rbp], r8d
	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
.L4:
	.cfi_restore_state
	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
.L13:
	.cfi_restore_state
	xor	r8d, r8d
	jmp	.L9
.L5:
	lea	edi, 1[rbx]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	build_dirname, .-build_dirname
	.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_builtin.c_build_dirname.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_dirname, %function
build_dirname:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldrb	r0, [r0]	@ zero_extendqisi2
	mov	r6, r1
	bl	isalphaW
	cmp	r0, #0
	beq	.L4
	ldrb	r3, [r5, #1]	@ zero_extendqisi2
	cmp	r3, #58
	bne	.L4
	ldrb	r3, [r5, #2]	@ zero_extendqisi2
	cmp	r3, #92
	bne	.L4
	ldrb	r3, [r5, #3]	@ zero_extendqisi2
	cmp	r3, #92
	bne	.L4
	ldrb	r3, [r5, #4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L4
	add	r7, r5, #4
	mov	r0, r7
	bl	strlenW
	sub	r1, r0, #1
	ldrb	r3, [r7, r1]	@ zero_extendqisi2
	mov	r4, r0
	cmp	r3, #92
	add	r2, r7, r1
	beq	.L4
	cmp	r7, r2
	bhi	.L5
	sub	r2, r2, #1
	add	r5, r5, #3
	b	.L7
.L32:
	sub	r1, r1, #1
.L7:
	cmp	r5, r2
	mov	r0, r4
	mov	r3, r2
	mov	r4, r1
	beq	.L6
	ldrb	r0, [r2]	@ zero_extendqisi2
	sub	r2, r2, #1
	cmp	r0, #92
	bne	.L32
	sub	r3, r3, #1
.L8:
	cmp	r3, r7
	mov	r0, r4
	sub	r4, r4, #1
	bcc	.L6
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r3, r3, #1
	cmp	r2, #92
	beq	.L8
.L6:
	bl	heap_alloc
	cmp	r0, #0
	beq	.L4
	add	r4, r7, r4
	cmp	r4, r7
	bls	.L13
	mov	r3, r0
	rsb	r5, r0, #1
	b	.L12
.L10:
	mov	r7, r2
	cmp	r4, r7
	strb	r1, [r3]
	add	r3, r3, #1
	bls	.L33
.L12:
	mov	r2, r7
	ldrb	r1, [r2], #1	@ zero_extendqisi2
	add	ip, r5, r3
	cmp	r1, #92
	mov	lr, ip
	bne	.L10
	ldrb	r8, [r7, #1]	@ zero_extendqisi2
	cmp	r8, #92
	strbeq	r8, [r3]
	addeq	r7, r7, #2
	bne	.L10
	cmp	r4, r7
	add	r3, r3, #1
	bhi	.L12
.L33:
	add	ip, r0, ip
.L9:
	mov	r3, #0
	strb	r3, [ip]
	str	lr, [r6]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	ip, r0
	mov	lr, #0
	b	.L9
.L5:
	add	r0, r0, #1
	b	.L6
	.size	build_dirname, .-build_dirname
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
