	.file	"44348.c"
	.intel_syntax noprefix
	.text
	.globl	gen_random
	.type	gen_random, @function
gen_random:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movsd	QWORD PTR -8[rbp], xmm0
	mov	rax, QWORD PTR last.0[rip]
	imul	rax, rax, 3877
	lea	rcx, 29573[rax]
	movabs	rdx, 4318579316753219217
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 15
	mov	rdx, rcx
	sar	rdx, 63
	sub	rax, rdx
	imul	rdx, rax, 139968
	mov	rax, rcx
	sub	rax, rdx
	mov	QWORD PTR last.0[rip], rax
	mov	rax, QWORD PTR last.0[rip]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	mulsd	xmm0, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR .LC0[rip]
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gen_random, .-gen_random
	.globl	benchmark_heapsort
	.type	benchmark_heapsort, @function
benchmark_heapsort:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	sar	eax
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
.L13:
	cmp	DWORD PTR -12[rbp], 1
	jle	.L4
	sub	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR -8[rbp], xmm0
	jmp	.L5
.L4:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR -8[rbp], xmm0
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm0, QWORD PTR 8[rax]
	movsd	QWORD PTR [rdx], xmm0
	sub	DWORD PTR -16[rbp], 1
	cmp	DWORD PTR -16[rbp], 1
	jne	.L5
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L16
.L5:
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, eax
	mov	DWORD PTR -20[rbp], eax
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jge	.L8
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	comisd	xmm0, xmm1
	jbe	.L8
	add	DWORD PTR -20[rbp], 1
.L8:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	comisd	xmm0, QWORD PTR -8[rbp]
	jbe	.L17
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	movsd	xmm0, QWORD PTR [rdx]
	movsd	QWORD PTR [rax], xmm0
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	add	DWORD PTR -20[rbp], eax
	jmp	.L7
.L17:
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
.L7:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L12
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L13
.L16:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	benchmark_heapsort, .-benchmark_heapsort
	.section	.rodata
.LC2:
	.string	"%f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 2
	jne	.L19
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L20
.L19:
	mov	eax, 8000000
.L20:
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -32[rbp], 1
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR .LC1[rip]
	movq	xmm0, rax
	call	gen_random
	movq	rax, xmm0
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -32[rbp], 1
.L21:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L22
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	benchmark_heapsort
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movq	xmm0, rax
	lea	rdi, .LC2[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.data
	.align 8
	.type	last.0, @object
	.size	last.0, 8
last.0:
	.quad	42
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1090590208
	.align 8
.LC1:
	.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	"44348.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.align	2
	.global	gen_random
	.syntax unified
	.arm
	.fpu softvfp
	.type	gen_random, %function
gen_random:
	@ 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, #-12]
	str	r1, [fp, #-8]
	ldr	r3, .L3
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r2
	add	r3, r3, #29440
	add	r3, r3, #133
	ldr	r2, .L3+4
	smull	r1, r2, r3, r2
	asr	r1, r2, #14
	asr	r2, r3, #31
	sub	r2, r1, r2
	ldr	r1, .L3+8
	mul	r2, r1, r2
	sub	r2, r3, r2
	ldr	r3, .L3
	str	r2, [r3]
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L3+12
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	last.6156
	.word	502748801
	.word	139968
	.word	1090590208
	.size	gen_random, .-gen_random
	.global	__aeabi_dcmplt
	.align	2
	.global	benchmark_heapsort
	.syntax unified
	.arm
	.fpu softvfp
	.type	benchmark_heapsort, %function
benchmark_heapsort:
	@ 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, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	asr	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L15:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L6
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L7
.L6:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r1, r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L7
	ldr	r3, [fp, #-36]
	add	r1, r3, #8
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	b	.L18
.L7:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L9
.L14:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L10:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	lsl	r2, r2, #3
	ldr	r1, [fp, #-36]
	add	r1, r1, r2
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	b	.L9
.L19:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L14
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-36]
	add	r1, r2, r3
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	b	.L15
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	benchmark_heapsort, .-benchmark_heapsort
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%f\012\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, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	bne	.L21
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	b	.L22
.L21:
	ldr	r3, .L26
.L22:
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L23
.L24:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, #0
	ldr	r1, .L26+4
	bl	gen_random
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L23:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L24
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	benchmark_heapsort
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r0, .L26+8
	bl	printf
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L27:
	.align	2
.L26:
	.word	8000000
	.word	1072693248
	.word	.LC0
	.size	main, .-main
	.data
	.align	2
	.type	last.6156, %object
	.size	last.6156, 4
last.6156:
	.word	42
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
