	.file	"439090.c"
	.intel_syntax noprefix
	.text
	.globl	lexicographic_sort
	.type	lexicographic_sort, @function
lexicographic_sort:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	lexicographic_sort, .-lexicographic_sort
	.globl	lexicographic_sort_reverse
	.type	lexicographic_sort_reverse, @function
lexicographic_sort_reverse:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lexicographic_sort_reverse, .-lexicographic_sort_reverse
	.globl	characters_count
	.type	characters_count, @function
characters_count:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 560
	mov	QWORD PTR -552[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -532[rbp], 0
	lea	rdx, -528[rbp]
	mov	eax, 0
	mov	ecx, 64
	mov	rdi, rdx
	rep stosq
	cmp	QWORD PTR -552[rbp], 0
	jne	.L8
	mov	eax, -1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -552[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	eax, DWORD PTR -528[rbp+rax*4]
	test	eax, eax
	jne	.L9
	mov	rax, QWORD PTR -552[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	movsx	rdx, eax
	mov	edx, DWORD PTR -528[rbp+rdx*4]
	add	edx, 1
	cdqe
	mov	DWORD PTR -528[rbp+rax*4], edx
	add	DWORD PTR -532[rbp], 1
.L9:
	add	QWORD PTR -552[rbp], 1
.L8:
	mov	rax, QWORD PTR -552[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
	mov	eax, DWORD PTR -532[rbp]
.L11:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	characters_count, .-characters_count
	.globl	sort_by_number_of_distinct_characters
	.type	sort_by_number_of_distinct_characters, @function
sort_by_number_of_distinct_characters:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	characters_count
	mov	ebx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	characters_count
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L14
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lexicographic_sort
	jmp	.L16
.L14:
	mov	eax, DWORD PTR -20[rbp]
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sort_by_number_of_distinct_characters, .-sort_by_number_of_distinct_characters
	.globl	sort_by_length
	.type	sort_by_length, @function
sort_by_length:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	ebx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L18
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lexicographic_sort
	jmp	.L20
.L18:
	mov	eax, DWORD PTR -20[rbp]
.L20:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	sort_by_length, .-sort_by_length
	.globl	string_sort
	.type	string_sort, @function
string_sort:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -56[rbp], rdx
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L22
.L26:
	mov	DWORD PTR -20[rbp], 1
	mov	DWORD PTR -16[rbp], 0
	jmp	.L23
.L25:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rcx
	test	eax, eax
	jle	.L24
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	DWORD PTR -20[rbp], 0
.L24:
	add	DWORD PTR -16[rbp], 1
.L23:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cmp	DWORD PTR -16[rbp], eax
	jl	.L25
.L22:
	cmp	DWORD PTR -20[rbp], 0
	je	.L26
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	string_sort, .-string_sort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -52[rbp], 0
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	lea	rbx, [rdx+rax]
	mov	edi, 1024
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR -52[rbp]
	movsx	rcx, ecx
	lea	rsi, 0[0+rcx*8]
	mov	rcx, QWORD PTR -32[rbp]
	lea	rbx, [rsi+rcx]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -52[rbp], 1
.L28:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L29
	mov	ecx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, lexicographic_sort[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	string_sort
	mov	DWORD PTR -48[rbp], 0
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	puts@PLT
	add	DWORD PTR -48[rbp], 1
.L30:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L31
	mov	edi, 10
	call	putchar@PLT
	mov	ecx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, lexicographic_sort_reverse[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	string_sort
	mov	DWORD PTR -44[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	puts@PLT
	add	DWORD PTR -44[rbp], 1
.L32:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -44[rbp], eax
	jl	.L33
	mov	edi, 10
	call	putchar@PLT
	mov	ecx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, sort_by_length[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	string_sort
	mov	DWORD PTR -40[rbp], 0
	jmp	.L34
.L35:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	puts@PLT
	add	DWORD PTR -40[rbp], 1
.L34:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L35
	mov	edi, 10
	call	putchar@PLT
	mov	ecx, DWORD PTR -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, sort_by_number_of_distinct_characters[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	string_sort
	mov	DWORD PTR -36[rbp], 0
	jmp	.L36
.L37:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	puts@PLT
	add	DWORD PTR -36[rbp], 1
.L36:
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L37
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"439090.c"
	.text
	.align	2
	.global	lexicographic_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	lexicographic_sort, %function
lexicographic_sort:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	lexicographic_sort, .-lexicographic_sort
	.align	2
	.global	lexicographic_sort_reverse
	.syntax unified
	.arm
	.fpu softvfp
	.type	lexicographic_sort_reverse, %function
lexicographic_sort_reverse:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	lexicographic_sort_reverse, .-lexicographic_sort_reverse
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	characters_count
	.syntax unified
	.arm
	.fpu softvfp
	.type	characters_count, %function
characters_count:
	@ args = 0, pretend = 0, frame = 528
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #528
	str	r0, [fp, #-528]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-524]
	sub	r3, fp, #520
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-528]
	cmp	r3, #0
	bne	.L8
	mvn	r3, #0
	b	.L11
.L10:
	ldr	r3, [fp, #-528]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-516]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-528]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-516]
	add	r1, r3, #1
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-516]
	ldr	r3, [fp, #-524]
	add	r3, r3, #1
	str	r3, [fp, #-524]
.L9:
	ldr	r3, [fp, #-528]
	add	r3, r3, #1
	str	r3, [fp, #-528]
.L8:
	ldr	r3, [fp, #-528]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-524]
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.size	characters_count, .-characters_count
	.align	2
	.global	sort_by_number_of_distinct_characters
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort_by_number_of_distinct_characters, %function
sort_by_number_of_distinct_characters:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	characters_count
	mov	r4, r0
	ldr	r0, [fp, #-28]
	bl	characters_count
	mov	r3, r0
	sub	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L16
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	lexicographic_sort
	mov	r3, r0
	b	.L18
.L16:
	ldr	r3, [fp, #-16]
.L18:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	sort_by_number_of_distinct_characters, .-sort_by_number_of_distinct_characters
	.align	2
	.global	sort_by_length
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort_by_length, %function
sort_by_length:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	sub	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L20
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	lexicographic_sort
	mov	r3, r0
	b	.L22
.L20:
	ldr	r3, [fp, #-16]
.L22:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	sort_by_length, .-sort_by_length
	.align	2
	.global	string_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	string_sort, %function
string_sort:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L24
.L28:
	mov	r3, #1
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L25
.L27:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	mov	r1, r2
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	ble	.L26
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-20]
.L26:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L25:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L27
.L24:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L28
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	string_sort, .-string_sort
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"%s\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L42+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L30
.L31:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r4, r2, r3
	mov	r0, #1024
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L42+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r5, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r1, r3, #1
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r4, r2, r3
	mov	r0, r5
	bl	realloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L30:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L31
	ldr	r3, [fp, #-44]
	ldr	r2, .L42+12
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	string_sort
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L32
.L33:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L32:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L33
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-44]
	ldr	r2, .L42+16
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	string_sort
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L34
.L35:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L34:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L35
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-44]
	ldr	r2, .L42+20
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	string_sort
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L36
.L37:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L36:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L37
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-44]
	ldr	r2, .L42+24
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	string_sort
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L38
.L39:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L38:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L39
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.word	lexicographic_sort
	.word	lexicographic_sort_reverse
	.word	sort_by_length
	.word	sort_by_number_of_distinct_characters
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
