	.file	"extr_collate.c__collate_sxfrm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	_collate_sxfrm
	.type	_collate_sxfrm, @function
_collate_sxfrm:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdx
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 120
	mov	QWORD PTR -128[rbp], rsi
	mov	rdi, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR XFRM_BYTES[rip]
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rdx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L66:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L66
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L67
.L4:
	mov	rax, QWORD PTR 0[r13]
	mov	rdi, QWORD PTR -128[rbp]
	mov	QWORD PTR -96[rbp], rsp
	mov	eax, DWORD PTR [rax]
	mov	r14d, eax
	mov	DWORD PTR -132[rbp], eax
	call	assert@PLT
	test	r14d, r14d
	js	.L68
	xor	r10d, r10d
	lea	rax, -64[rbp]
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -104[rbp], rax
	mov	QWORD PTR -120[rbp], r10
.L33:
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -136[rbp], eax
	mov	r14d, eax
	cmp	DWORD PTR -132[rbp], eax
	je	.L69
	mov	rax, QWORD PTR 0[r13]
	mov	rdi, QWORD PTR -112[rbp]
	mov	r15, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	ecx, DWORD PTR [rax+rdi*4]
	test	DWORD PTR DIRECTIVE_BACKWARD[rip], ecx
	jne	.L70
.L10:
	test	DWORD PTR DIRECTIVE_POSITION[rip], ecx
	jne	.L61
	mov	rax, r13
	mov	r13, r15
	mov	r15, rax
.L15:
	cmp	QWORD PTR 0[r13], 0
	je	.L71
.L30:
	mov	r9, QWORD PTR -104[rbp]
	lea	rdx, -68[rbp]
	mov	rsi, r13
	lea	rcx, -72[rbp]
	mov	r8d, r14d
	mov	rdi, r15
	call	_collate_lookup@PLT
	movsx	rax, DWORD PTR -68[rbp]
	mov	edx, DWORD PTR -72[rbp]
	lea	r13, 0[r13+rax*8]
	test	edx, edx
	jg	.L24
	jne	.L64
	mov	QWORD PTR -64[rbp], 0
	cmp	QWORD PTR 0[r13], 0
	jne	.L30
.L71:
	cmp	QWORD PTR -64[rbp], 0
	jne	.L30
	mov	r13, r15
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rsi, QWORD PTR -96[rbp]
	mov	rdi, r15
	mov	ecx, r14d
	call	xfrm@PLT
	movsx	rdx, eax
	add	QWORD PTR -88[rbp], rdx
	mov	rdi, QWORD PTR -88[rbp]
	mov	QWORD PTR -120[rbp], rdi
	test	rbx, rbx
	je	.L15
	test	eax, eax
	je	.L39
	mov	rcx, QWORD PTR -96[rbp]
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L27:
	movsx	rax, edx
	sub	rbx, 1
	add	r12, 1
	mov	rax, QWORD PTR [rcx+rax*8]
	mov	BYTE PTR -1[r12], al
	mov	eax, edx
	test	eax, eax
	je	.L39
.L29:
	lea	edx, -1[rax]
	test	rbx, rbx
	jne	.L27
	test	edx, edx
	je	.L39
	sub	eax, 2
	test	eax, eax
	jne	.L29
.L39:
	mov	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR -120[rbp], rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L64:
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
.L12:
	mov	rdi, QWORD PTR -144[rbp]
	call	free@PLT
	mov	r10, -1
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L72
	lea	rsp, -40[rbp]
	mov	rax, r10
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L61:
	.cfi_restore_state
	mov	rdi, rbx
	mov	rax, QWORD PTR -120[rbp]
	mov	ebx, r14d
	mov	r14, r15
	mov	r15, rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L22:
	mov	r9, QWORD PTR -104[rbp]
	lea	rdx, -68[rbp]
	mov	rsi, r14
	lea	rcx, -72[rbp]
	mov	r8d, ebx
	mov	rdi, r13
	call	_collate_lookup@PLT
	movsx	rax, DWORD PTR -68[rbp]
	mov	edx, DWORD PTR -72[rbp]
	lea	r14, [r14+rax*8]
	test	edx, edx
	jg	.L16
	jne	.L64
	mov	edx, DWORD PTR COLLATE_MAX_PRIORITY[rip]
	mov	QWORD PTR -64[rbp], 0
	mov	DWORD PTR -72[rbp], edx
.L16:
	mov	rsi, QWORD PTR -96[rbp]
	mov	ecx, ebx
	mov	rdi, r13
	call	xfrm@PLT
	movsx	rdx, eax
	add	QWORD PTR -88[rbp], rdx
	test	r15, r15
	jne	.L73
.L18:
	mov	rax, QWORD PTR -88[rbp]
.L14:
	cmp	QWORD PTR [r14], 0
	jne	.L22
	cmp	QWORD PTR -64[rbp], 0
	jne	.L22
	mov	QWORD PTR -120[rbp], rax
	mov	rbx, r15
.L23:
	mov	eax, DWORD PTR -136[rbp]
	add	eax, 1
	cmp	DWORD PTR -132[rbp], eax
	jl	.L74
	mov	QWORD PTR -64[rbp], 0
	test	rbx, rbx
	je	.L7
	mov	eax, DWORD PTR XFRM_SEP[rip]
	sub	rbx, 1
	add	r12, 1
	mov	BYTE PTR -1[r12], al
.L7:
	add	QWORD PTR -88[rbp], 1
	add	QWORD PTR -112[rbp], 1
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L73:
	test	eax, eax
	je	.L18
	mov	rcx, QWORD PTR -96[rbp]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	movsx	rax, edx
	sub	r15, 1
	add	r12, 1
	mov	rax, QWORD PTR [rcx+rax*8]
	mov	BYTE PTR -1[r12], al
	mov	eax, edx
.L20:
	test	eax, eax
	je	.L18
.L21:
	lea	edx, -1[rax]
	test	r15, r15
	jne	.L19
	test	edx, edx
	je	.L18
	sub	eax, 2
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L69:
	mov	ecx, DWORD PTR DIRECTIVE_FORWARD[rip]
	mov	r15, QWORD PTR -128[rbp]
	or	ecx, DWORD PTR DIRECTIVE_UNDEFINED[rip]
	test	DWORD PTR DIRECTIVE_BACKWARD[rip], ecx
	je	.L10
.L70:
	mov	rdi, QWORD PTR -144[rbp]
	mov	DWORD PTR -148[rbp], ecx
	call	free@PLT
	mov	rdi, QWORD PTR -128[rbp]
	call	wcsdup@PLT
	mov	ecx, DWORD PTR -148[rbp]
	test	rax, rax
	mov	r15, rax
	je	.L75
	mov	rdi, rax
	mov	DWORD PTR -144[rbp], ecx
	call	wcslen@PLT
	mov	ecx, DWORD PTR -144[rbp]
	cdqe
	lea	rax, -8[r15+rax*8]
	cmp	r15, rax
	jnb	.L36
	mov	rdx, r15
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rsi, QWORD PTR [rdx]
	mov	rdi, QWORD PTR [rax]
	add	rdx, 8
	sub	rax, 8
	mov	QWORD PTR -8[rdx], rdi
	mov	QWORD PTR 8[rax], rsi
	cmp	rdx, rax
	jb	.L13
.L36:
	mov	QWORD PTR -144[rbp], r15
	jmp	.L10
.L67:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L75:
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	QWORD PTR -144[rbp], 0
	mov	DWORD PTR errno[rip], eax
	jmp	.L12
.L68:
	mov	QWORD PTR -144[rbp], 0
	xor	r10d, r10d
.L6:
	mov	rdi, QWORD PTR -144[rbp]
	mov	QWORD PTR -88[rbp], r10
	call	free@PLT
	mov	r10, QWORD PTR -88[rbp]
	jmp	.L1
.L74:
	mov	r10, QWORD PTR -120[rbp]
	jmp	.L6
.L72:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_collate_sxfrm, .-_collate_sxfrm
	.comm	errno,4,4
	.comm	XFRM_SEP,4,4
	.comm	XFRM_BYTES,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DIRECTIVE_UNDEFINED,4,4
	.comm	DIRECTIVE_POSITION,4,4
	.comm	DIRECTIVE_FORWARD,4,4
	.comm	DIRECTIVE_BACKWARD,4,4
	.comm	COLLATE_MAX_PRIORITY,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_collate.c__collate_sxfrm.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	_collate_sxfrm
	.syntax unified
	.arm
	.fpu softvfp
	.type	_collate_sxfrm, %function
_collate_sxfrm:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #52
	mov	ip, r1
	str	r1, [fp, #-64]
	ldr	r1, .L64
	mov	r7, r0
	ldr	r1, [r1]
	ldr	r0, [r0]
	lsl	r1, r1, #2
	ldr	r4, [r0]
	add	r1, r1, #7
	bic	r1, r1, #7
	mov	r5, r3
	ldr	r3, .L64+4
	str	r4, [fp, #-60]
	mov	r0, ip
	sub	sp, sp, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r10, r2
	bl	assert
	cmp	r4, #0
	movlt	r3, #0
	strlt	r3, [fp, #-56]
	strlt	r3, [fp, #-68]
	blt	.L3
	mov	r3, #0
	mov	r6, r3
	mov	r8, r3
	add	r9, sp, #8
	str	r3, [fp, #-68]
	str	r3, [fp, #-44]
	str	r3, [fp, #-56]
.L30:
	ldr	r3, [fp, #-60]
	cmp	r3, r8
	ldreq	r3, .L64+8
	ldrne	r3, [r7]
	ldreq	r2, [r3]
	ldreq	r3, .L64+12
	ldrne	r3, [r3, #4]
	ldreq	r3, [r3]
	ldrne	r2, [r3, r8, lsl #2]
	orreq	r2, r2, r3
	ldr	r3, .L64+16
	ldr	r3, [r3]
	tst	r2, r3
	ldreq	r4, [fp, #-64]
	bne	.L60
.L7:
	ldr	r3, .L64+20
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L12
	ldr	r2, [fp, #-56]
	b	.L11
.L19:
	sub	r3, fp, #44
	mov	r1, r4
	str	r3, [sp, #4]
	sub	r2, fp, #48
	sub	r3, fp, #52
	mov	r0, r7
	str	r8, [sp]
	bl	_collate_lookup
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r2, #0
	add	r4, r4, r3, lsl #2
	bgt	.L13
	bne	.L57
	ldr	r3, .L64+24
	str	r2, [fp, #-44]
	ldr	r2, [r3]
	str	r2, [fp, #-52]
.L13:
	mov	r3, r8
	mov	r1, r9
	mov	r0, r7
	bl	xfrm
	cmp	r5, #0
	add	r6, r6, r0
	bne	.L56
.L15:
	mov	r2, r6
.L11:
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L19
	str	r2, [fp, #-56]
.L20:
	ldr	r3, [fp, #-60]
	add	r8, r8, #1
	cmp	r3, r8
	blt	.L3
	mov	r3, #0
	cmp	r5, r3
	str	r3, [fp, #-44]
	ldrne	r3, .L64+28
	subne	r5, r5, #1
	ldrne	r3, [r3]
	add	r6, r6, #1
	strbne	r3, [r10], #1
	b	.L30
.L16:
	mov	r0, r3
	ldr	r2, [r9, r3, lsl #2]
	sub	r5, r5, #1
	strb	r2, [r10], #1
.L56:
	cmp	r0, #0
	beq	.L15
	cmp	r5, #0
	sub	r3, r0, #1
	bne	.L16
	cmp	r3, #0
	beq	.L15
	sub	r0, r0, #2
	b	.L56
.L21:
	mov	r3, r8
	mov	r1, r9
	mov	r0, r7
	bl	xfrm
	cmp	r5, #0
	add	r6, r6, r0
	bne	.L58
.L36:
	str	r6, [fp, #-56]
.L12:
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L61
.L27:
	sub	r3, fp, #44
	mov	r1, r4
	str	r3, [sp, #4]
	sub	r2, fp, #48
	sub	r3, fp, #52
	mov	r0, r7
	str	r8, [sp]
	bl	_collate_lookup
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r2, #0
	add	r4, r4, r3, lsl #2
	bgt	.L21
	bne	.L57
	str	r2, [fp, #-44]
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L27
.L61:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L27
	b	.L20
.L24:
	mov	r0, r3
	ldr	r2, [r9, r3, lsl #2]
	sub	r5, r5, #1
	strb	r2, [r10], #1
.L58:
	cmp	r0, #0
	beq	.L36
	cmp	r5, #0
	sub	r3, r0, #1
	bne	.L24
	cmp	r3, #0
	beq	.L36
	sub	r0, r0, #2
	b	.L58
.L57:
	ldr	r2, .L64+32
	ldr	r3, .L64+36
	ldr	r2, [r2]
	str	r2, [r3]
.L9:
	ldr	r0, [fp, #-68]
	bl	free
	mvn	r3, #0
	str	r3, [fp, #-56]
.L1:
	ldr	r3, .L64+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L62
	ldr	r0, [fp, #-56]
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L60:
	ldr	r0, [fp, #-68]
	str	r2, [fp, #-72]
	bl	free
	ldr	r0, [fp, #-64]
	bl	wcsdup
	subs	r4, r0, #0
	ldr	r2, [fp, #-72]
	beq	.L63
	str	r2, [fp, #-68]
	bl	wcslen
	sub	r3, r0, #-1073741823
	add	r3, r4, r3, lsl #2
	cmp	r4, r3
	ldr	r2, [fp, #-68]
	bcs	.L33
	mov	r1, r4
.L10:
	ldr	r0, [r1]
	ldr	ip, [r3]
	str	ip, [r1], #4
	str	r0, [r3], #-4
	cmp	r1, r3
	bcc	.L10
.L33:
	str	r4, [fp, #-68]
	b	.L7
.L63:
	ldr	r2, .L64+40
	ldr	r3, .L64+36
	ldr	r2, [r2]
	str	r4, [fp, #-68]
	str	r2, [r3]
	b	.L9
.L3:
	ldr	r0, [fp, #-68]
	bl	free
	b	.L1
.L62:
	bl	__stack_chk_fail
.L65:
	.align	2
.L64:
	.word	XFRM_BYTES
	.word	.LC0
	.word	DIRECTIVE_FORWARD
	.word	DIRECTIVE_UNDEFINED
	.word	DIRECTIVE_BACKWARD
	.word	DIRECTIVE_POSITION
	.word	COLLATE_MAX_PRIORITY
	.word	XFRM_SEP
	.word	EINVAL
	.word	errno
	.word	ENOMEM
	.size	_collate_sxfrm, .-_collate_sxfrm
	.comm	errno,4,4
	.comm	XFRM_SEP,4,4
	.comm	XFRM_BYTES,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DIRECTIVE_UNDEFINED,4,4
	.comm	DIRECTIVE_POSITION,4,4
	.comm	DIRECTIVE_FORWARD,4,4
	.comm	DIRECTIVE_BACKWARD,4,4
	.comm	COLLATE_MAX_PRIORITY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
