	.file	"extr_..stb.h_stb_replaceinplace.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	stb_replaceinplace
	.type	stb_replaceinplace, @function
stb_replaceinplace:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	mov	rdi, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	strlen@PLT
	mov	rdi, r14
	mov	ebp, eax
	cdqe
	mov	QWORD PTR 8[rsp], rax
	call	strlen@PLT
	xor	edi, edi
	movsx	r12, eax
	mov	rbx, r12
	sub	ebx, ebp
	test	ebx, ebx
	setle	dil
	call	assert@PLT
	test	ebx, ebx
	jg	.L1
	mov	rsi, r13
	mov	rdi, r15
	call	strstr@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L1
	cmp	BYTE PTR [rax], 0
	mov	rbp, rax
	jne	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r15, rbx
	mov	rdi, rbp
	mov	rsi, r8
	sub	r15, r8
	mov	edx, r15d
	add	rbp, r15
	call	memmove@PLT
	cmp	BYTE PTR [rbx], 0
	je	.L3
.L5:
	mov	rdi, rbp
	mov	rdx, r12
	mov	rsi, r14
	add	rbp, r12
	call	memcpy@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rsi, r13
	lea	r8, [rbx+rax]
	mov	rdi, r8
	mov	QWORD PTR [rsp], r8
	call	strstr@PLT
	mov	r8, QWORD PTR [rsp]
	test	rax, rax
	mov	rbx, rax
	jne	.L4
	mov	rdi, r8
	call	strlen@PLT
	mov	r8, QWORD PTR [rsp]
	movsx	rbx, eax
	add	rbx, r8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	BYTE PTR 0[rbp], 0
.L1:
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	stb_replaceinplace, .-stb_replaceinplace
	.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_..stb.h_stb_replaceinplace.c"
	.text
	.align	2
	.global	stb_replaceinplace
	.syntax unified
	.arm
	.fpu softvfp
	.type	stb_replaceinplace, %function
stb_replaceinplace:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	mov	r0, r1
	mov	r8, r2
	mov	r7, r1
	bl	strlen
	mov	r9, r0
	mov	r0, r8
	bl	strlen
	sub	r5, r0, r9
	cmp	r5, #0
	mov	r6, r0
	movgt	r0, #0
	movle	r0, #1
	bl	assert
	cmp	r5, #0
	popgt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r0, r4
	mov	r1, r7
	bl	strstr
	subs	r4, r0, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldrb	r3, [r4]	@ zero_extendqisi2
	mov	fp, r4
	cmp	r3, #0
	bne	.L6
	b	.L3
.L5:
	mov	r0, fp
	mov	r1, r10
	mov	r2, r5
	bl	memmove
	ldrb	r3, [r4]	@ zero_extendqisi2
	add	fp, fp, r5
	cmp	r3, #0
	beq	.L3
.L6:
	add	r10, r4, r9
	mov	r2, r6
	mov	r1, r8
	mov	r0, fp
	bl	memcpy
	mov	r0, r10
	mov	r1, r7
	bl	strstr
	subs	r4, r0, #0
	add	fp, fp, r6
	subne	r5, r4, r10
	bne	.L5
	mov	r0, r10
	bl	strlen
	mov	r5, r0
	add	r4, r10, r0
	b	.L5
.L3:
	mov	r3, #0
	strb	r3, [fp]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	.size	stb_replaceinplace, .-stb_replaceinplace
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
