	.file	"215768906.c"
	.intel_syntax noprefix
	.text
	.globl	sorting_function
	.type	sorting_function, @function
sorting_function:
.LFB0:
	.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	QWORD PTR -64[rbp], rcx
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -8[rbp], eax
	mov	DWORD PTR -20[rbp], 0
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	mov	DWORD PTR -16[rbp], eax
	jmp	.L2
.L3:
	add	DWORD PTR -20[rbp], 1
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
.L2:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -8[rbp], eax
	jg	.L3
	jmp	.L4
.L5:
	sub	DWORD PTR -16[rbp], 1
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
.L4:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L5
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jg	.L6
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -20[rbp], 1
	sub	DWORD PTR -16[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
.L6:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L2
	cmp	DWORD PTR -16[rbp], 0
	jle	.L8
	lea	rcx, -64[rbp]
	lea	rdx, -56[rbp]
	mov	esi, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	sorting_function
.L8:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jge	.L10
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, DWORD PTR -20[rbp]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -40[rbp]
	lea	rdi, [rcx+rdx]
	lea	rcx, -64[rbp]
	lea	rdx, -56[rbp]
	mov	esi, eax
	call	sorting_function
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	sorting_function, .-sorting_function
	.section	.rodata
.LC0:
	.string	"unsorted array: "
.LC1:
	.string	"%d "
.LC2:
	.string	"\nsorted array: "
	.align 8
.LC3:
	.string	"\npermutation = %d comparison = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -100[rbp], 22
	mov	DWORD PTR -116[rbp], 0
	mov	DWORD PTR -112[rbp], 0
	mov	DWORD PTR -96[rbp], 1
	mov	DWORD PTR -92[rbp], 2
	mov	DWORD PTR -88[rbp], 5
	mov	DWORD PTR -84[rbp], 6
	mov	DWORD PTR -80[rbp], 12
	mov	DWORD PTR -76[rbp], 74
	mov	DWORD PTR -72[rbp], 55
	mov	DWORD PTR -68[rbp], 69
	mov	DWORD PTR -64[rbp], 13
	mov	DWORD PTR -60[rbp], 78
	mov	DWORD PTR -56[rbp], 17
	mov	DWORD PTR -52[rbp], 25
	mov	DWORD PTR -48[rbp], 13
	mov	DWORD PTR -44[rbp], 47
	mov	DWORD PTR -40[rbp], 18
	mov	DWORD PTR -36[rbp], 15
	mov	DWORD PTR -32[rbp], 136
	mov	DWORD PTR -28[rbp], 14
	mov	DWORD PTR -24[rbp], 2
	mov	DWORD PTR -20[rbp], 3
	mov	DWORD PTR -16[rbp], -6
	mov	DWORD PTR -12[rbp], 123
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -108[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	eax, DWORD PTR -96[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -108[rbp], 1
.L12:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L13
	lea	rcx, -112[rbp]
	lea	rdx, -116[rbp]
	mov	esi, DWORD PTR -100[rbp]
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	sorting_function
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -104[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	eax, DWORD PTR -96[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -104[rbp], 1
.L14:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L15
	mov	edx, DWORD PTR -112[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"215768906.c"
	.text
	.align	2
	.global	sorting_function
	.syntax unified
	.arm
	.fpu softvfp
	.type	sorting_function, %function
sorting_function:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L2
.L3:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-44]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
.L2:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bgt	.L3
	b	.L4
.L5:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-44]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
.L4:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L5
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bgt	.L6
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-40]
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
.L6:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L2
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L8
	sub	r3, fp, #44
	sub	r2, fp, #40
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-32]
	bl	sorting_function
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r0, r2, r3
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-24]
	sub	r1, r2, r3
	sub	r3, fp, #44
	sub	r2, fp, #40
	bl	sorting_function
.L10:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sorting_function, .-sorting_function
	.section	.rodata
	.align	2
.LC1:
	.ascii	"unsorted array: \000"
	.align	2
.LC2:
	.ascii	"%d \000"
	.align	2
.LC3:
	.ascii	"\012sorted array: \000"
	.align	2
.LC4:
	.ascii	"\012permutation = %d comparison = %d\012\000"
	.align	2
.LC0:
	.word	1
	.word	2
	.word	5
	.word	6
	.word	12
	.word	74
	.word	55
	.word	69
	.word	13
	.word	78
	.word	17
	.word	25
	.word	13
	.word	47
	.word	18
	.word	15
	.word	136
	.word	14
	.word	2
	.word	3
	.word	-6
	.word	123
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #22
	str	r3, [fp, #-100]
	mov	r3, #0
	str	r3, [fp, #-116]
	mov	r3, #0
	str	r3, [fp, #-112]
	ldr	r2, .L18+4
	sub	r3, fp, #96
	mov	r1, r2
	mov	r2, #88
	mov	r0, r3
	bl	memcpy
	ldr	r0, .L18+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L12
.L13:
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-92]
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L12:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L13
	sub	r3, fp, #112
	sub	r2, fp, #116
	sub	r0, fp, #96
	ldr	r1, [fp, #-100]
	bl	sorting_function
	ldr	r0, .L18+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L14
.L15:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-92]
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L14:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L15
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-112]
	mov	r1, r3
	ldr	r0, .L18+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
