	.file	"639563.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 16
	.type	weight, @object
	.size	weight, 16
weight:
	.long	2
	.long	1
	.long	4
	.long	5
	.align 16
	.type	value, @object
	.size	value, 16
value:
	.long	2000
	.long	3000
	.long	3000
	.long	4000
	.local	z
	.comm	z,16,16
	.local	x
	.comm	x,32,32
	.text
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.section	.rodata
	.align 8
.LC1:
	.string	"\345\200\244\346\256\265 %d\345\206\206 \351\207\215\343\201\225 %dkg \343\201\256\350\215\267\347\211\251\343\202\222 %.1f\345\200\213(%.1fkg)\302\245n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, value[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, weight[rip]
	mov	edi, DWORD PTR [rcx+rdx]
	cdq
	idiv	edi
	mov	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, z[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -20[rbp], 1
.L4:
	cmp	DWORD PTR -20[rbp], 3
	jle	.L5
	lea	rcx, compare[rip]
	mov	edx, 4
	mov	esi, 4
	lea	rdi, z[rip]
	call	qsort@PLT
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L6
.L11:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L8:
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, z[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, value[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rsi, 0[0+rdx*4]
	lea	rdx, weight[rip]
	mov	edi, DWORD PTR [rsi+rdx]
	cdq
	idiv	edi
	cmp	ecx, eax
	jne	.L8
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, weight[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, 5
	sub	eax, DWORD PTR -12[rbp]
	cmp	edx, eax
	jg	.L9
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, x[rip]
	movsd	xmm0, QWORD PTR .LC0[rip]
	movsd	QWORD PTR [rdx+rax], xmm0
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, weight[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	DWORD PTR -12[rbp], eax
	jmp	.L10
.L9:
	mov	eax, 5
	sub	eax, DWORD PTR -12[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, weight[rip]
	mov	eax, DWORD PTR [rdx+rax]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	divsd	xmm0, xmm1
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, x[rip]
	movsd	QWORD PTR [rdx+rax], xmm0
	mov	DWORD PTR -12[rbp], 5
.L10:
	add	DWORD PTR -16[rbp], 1
.L6:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L11
	mov	DWORD PTR -4[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, x[rip]
	movsd	xmm1, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, weight[rip]
	mov	eax, DWORD PTR [rdx+rax]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, x[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, weight[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	lea	rax, value[rip]
	mov	eax, DWORD PTR [rsi+rax]
	movapd	xmm1, xmm0
	movq	xmm0, rcx
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 2
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L12:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L13
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.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	"639563.c"
	.text
	.section	.rodata
	.align	2
	.type	weight, %object
	.size	weight, 16
weight:
	.word	2
	.word	1
	.word	4
	.word	5
	.align	2
	.type	value, %object
	.size	value, 16
value:
	.word	2000
	.word	3000
	.word	3000
	.word	4000
	.local	z
	.comm	z,16,4
	.local	x
	.comm	x,32,8
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	compare, %function
compare:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	compare, .-compare
	.global	__aeabi_idiv
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\345\200\244\346\256\265 %d\345\206\206 \351\207\215"
	.ascii	"\343\201\225 %dkg \343\201\256\350\215\267\347\211\251"
	.ascii	"\343\202\222 %.1f\345\200\213(%.1fkg)\302\245n\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #40
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L4
.L5:
	ldr	r2, .L15
	ldr	r3, [fp, #-48]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L15+4
	ldr	r3, [fp, #-48]
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L15+8
	ldr	r3, [fp, #-48]
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L4:
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	ble	.L5
	ldr	r3, .L15+12
	mov	r2, #4
	mov	r1, #4
	ldr	r0, .L15+8
	bl	qsort
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L6
.L11:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L7
.L8:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L7:
	ldr	r2, .L15+8
	ldr	r3, [fp, #-44]
	ldr	r4, [r2, r3, lsl #2]
	ldr	r2, .L15
	ldr	r3, [fp, #-36]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L15+4
	ldr	r3, [fp, #-36]
	ldr	r3, [r1, r3, lsl #2]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idiv
	mov	r3, r0
	cmp	r4, r3
	bne	.L8
	ldr	r2, .L15+4
	ldr	r3, [fp, #-36]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-40]
	rsb	r3, r3, #5
	cmp	r2, r3
	bgt	.L9
	ldr	r2, .L15+16
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	add	r1, r2, r3
	mov	r2, #0
	ldr	r3, .L15+20
	stm	r1, {r2-r3}
	ldr	r2, .L15+4
	ldr	r3, [fp, #-36]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-40]
	b	.L10
.L9:
	ldr	r3, [fp, #-40]
	rsb	r3, r3, #5
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, .L15+4
	ldr	r3, [fp, #-36]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L15+16
	ldr	r1, [fp, #-36]
	lsl	r1, r1, #3
	add	r1, r0, r1
	stm	r1, {r2-r3}
	mov	r3, #5
	str	r3, [fp, #-40]
.L10:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L6:
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ble	.L11
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L12
.L13:
	ldr	r2, .L15
	ldr	r3, [fp, #-32]
	ldr	r8, [r2, r3, lsl #2]
	ldr	r2, .L15+4
	ldr	r3, [fp, #-32]
	ldr	r9, [r2, r3, lsl #2]
	ldr	r2, .L15+16
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, .L15+16
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r6-r7}
	ldr	r2, .L15+4
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	stm	sp, {r4-r5}
	mov	r2, r9
	mov	r1, r8
	ldr	r0, .L15+24
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L12:
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	ble	.L13
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L16:
	.align	2
.L15:
	.word	value
	.word	weight
	.word	z
	.word	compare
	.word	x
	.word	1072693248
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
