	.file	"extr_str_util.c_xstrncpy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	xstrncpy
	.type	xstrncpy, @function
xstrncpy:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8, rdx
	xor	eax, eax
	mov	r9, rsi
	sub	r8, 1
	jne	.L2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	BYTE PTR [rdi+rax], cl
	add	rax, 1
	cmp	rax, r8
	je	.L4
.L2:
	movzx	ecx, BYTE PTR [rsi+rax]
	lea	r9, [rsi+rax]
	test	cl, cl
	jne	.L5
	test	rdx, rdx
	jne	.L20
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	lea	r9, [rsi+r8]
	test	rdx, rdx
	je	.L7
	add	rdi, r8
.L3:
	mov	BYTE PTR [rdi], 0
.L7:
	cmp	BYTE PTR [r9], 0
	mov	rax, r8
	cmovne	rax, rdx
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	add	rdi, rax
	mov	r8, rax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	xstrncpy, .-xstrncpy
	.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_str_util.c_xstrncpy.c"
	.text
	.align	2
	.global	xstrncpy
	.syntax unified
	.arm
	.fpu softvfp
	.type	xstrncpy, %function
xstrncpy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r5, r2, #1
	mov	r6, r0
	beq	.L9
	sub	r4, r0, #1
	mov	lr, r1
	mov	r0, #0
	b	.L3
.L5:
	add	r0, r0, #1
	cmp	r0, r5
	strb	ip, [r4, #1]!
	beq	.L4
.L3:
	ldrb	ip, [lr]	@ zero_extendqisi2
	mov	r3, lr
	cmp	ip, #0
	add	lr, lr, #1
	bne	.L5
	cmp	r2, #0
	movne	r5, r0
	addne	r6, r6, r0
	popeq	{r4, r5, r6, pc}
.L2:
	mov	r1, #0
	strb	r1, [r6]
.L7:
	ldrb	r0, [r3]	@ zero_extendqisi2
	cmp	r0, #0
	movne	r0, r2
	moveq	r0, r5
	pop	{r4, r5, r6, pc}
.L4:
	cmp	r2, #0
	add	r3, r1, r5
	addne	r6, r6, r5
	beq	.L7
	b	.L2
.L9:
	mov	r3, r1
	b	.L2
	.size	xstrncpy, .-xstrncpy
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
