	.file	"extr_Str.c_TrimRight.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	TrimRight
	.type	TrimRight, @function
TrimRight:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L26
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	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	ebx, eax
	test	eax, eax
	je	.L1
	cdqe
	movzx	eax, BYTE PTR -1[r12+rax]
	cmp	al, 32
	je	.L11
	cmp	al, 9
	je	.L11
.L1:
	add	rsp, 24
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	lea	ebp, 1[rbx]
	mov	edi, ebp
	call	Malloc@PLT
	mov	edi, ebp
	mov	r13, rax
	call	Malloc@PLT
	mov	r14, rax
	test	ebx, ebx
	jle	.L10
	lea	eax, -1[rbx]
	mov	rbp, r12
	xor	ebx, ebx
	xor	ecx, ecx
	lea	r15, 1[r12+rax]
	xor	edx, edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	cmp	al, 9
	je	.L7
	mov	edx, ebx
	mov	rsi, r14
	mov	DWORD PTR 12[rsp], ecx
	add	rbp, 1
	call	Copy@PLT
	mov	ecx, DWORD PTR 12[rsp]
	movzx	eax, BYTE PTR -1[rbp]
	add	ebx, ecx
	lea	ecx, 1[rbx]
	movsx	rbx, ebx
	movsx	rdx, ecx
	mov	BYTE PTR 0[r13+rbx], al
	xor	ebx, ebx
	lea	rdi, 0[r13+rdx]
	cmp	r15, rbp
	je	.L6
.L9:
	movzx	eax, BYTE PTR 0[rbp]
	lea	rdi, 0[r13+rdx]
	cmp	al, 32
	jne	.L30
.L7:
	movsx	rsi, ebx
	add	rbp, 1
	add	ebx, 1
	mov	BYTE PTR [r14+rsi], al
	cmp	r15, rbp
	jne	.L9
.L6:
	mov	BYTE PTR [rdi], 0
	mov	rdx, r13
	mov	rdi, r12
	xor	esi, esi
	call	StrCpy@PLT
	mov	rdi, r13
	call	Free@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	Free@PLT
	.p2align 4,,10
	.p2align 3
.L26:
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	mov	rdi, r13
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	TrimRight, .-TrimRight
	.comm	FALSE,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_Str.c_TrimRight.c"
	.text
	.align	2
	.global	TrimRight
	.syntax unified
	.arm
	.fpu softvfp
	.type	TrimRight, %function
TrimRight:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r7, r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	bl	StrLen
	subs	r6, r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	add	r3, r7, r6
	ldrb	r4, [r3, #-1]	@ zero_extendqisi2
	cmp	r4, #32
	cmpne	r4, #9
	movne	r4, #1
	moveq	r4, #0
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	add	r5, r6, #1
	mov	r0, r5
	bl	Malloc
	mov	r9, r0
	mov	r0, r5
	bl	Malloc
	cmp	r6, #0
	mov	r8, r0
	ble	.L9
	sub	r5, r7, #1
	mov	r0, r9
	mov	r10, r4
	add	r6, r5, r6
	b	.L8
.L7:
	cmp	r6, r5
	beq	.L5
.L8:
	ldrb	r3, [r5, #1]!	@ zero_extendqisi2
	mov	r2, r0
	cmp	r3, #32
	cmpne	r3, #9
	strbeq	r3, [r8, r4]
	addeq	r4, r4, #1
	beq	.L7
	mov	r2, r4
	mov	r1, r8
	add	r4, r10, r4
	bl	Copy
	add	r10, r4, #1
	ldrb	r3, [r5]	@ zero_extendqisi2
	add	r0, r9, r10
	cmp	r6, r5
	strb	r3, [r9, r4]
	mov	r2, r0
	mov	r4, #0
	bne	.L8
.L5:
	mov	r1, #0
	mov	r0, r7
	strb	r1, [r2]
	mov	r2, r9
	bl	StrCpy
	mov	r0, r9
	bl	Free
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	Free
.L9:
	mov	r2, r9
	b	.L5
	.size	TrimRight, .-TrimRight
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
