	.file	"extr_cpqphp_ctrl.c_sort_by_max_size.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sort_by_max_size, @function
sort_by_max_size:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rcx, QWORD PTR [rdi]
	test	rcx, rcx
	je	.L10
	mov	rax, QWORD PTR 8[rcx]
	test	rax, rax
	je	.L9
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR [rax]
	xor	esi, esi
	cmp	QWORD PTR [rcx], rdx
	jge	.L6
	mov	QWORD PTR [rdi], rax
	mov	rax, QWORD PTR 8[rax]
	mov	esi, 1
	mov	QWORD PTR 8[rcx], rax
	mov	rax, QWORD PTR [rdi]
	mov	QWORD PTR 8[rax], rcx
	mov	rcx, QWORD PTR [rdi]
	mov	rax, QWORD PTR 8[rcx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdx, QWORD PTR 8[rax]
	test	rdx, rdx
	je	.L7
	mov	r8, QWORD PTR [rdx]
	cmp	QWORD PTR [rax], r8
	jl	.L23
	mov	rcx, rax
	mov	rax, rdx
.L6:
	test	rax, rax
	jne	.L24
.L7:
	test	esi, esi
	je	.L9
.L25:
	mov	rcx, QWORD PTR [rdi]
	mov	rax, QWORD PTR 8[rcx]
	test	rax, rax
	jne	.L14
	xor	esi, esi
	test	esi, esi
	jne	.L25
.L9:
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	mov	QWORD PTR 8[rcx], rdx
	mov	rcx, QWORD PTR 8[rdx]
	add	esi, 1
	mov	QWORD PTR 8[rax], rcx
	mov	rcx, rdx
	mov	QWORD PTR 8[rdx], rax
	jmp	.L6
.L10:
	mov	eax, 1
	ret
	.cfi_endproc
.LFE0:
	.size	sort_by_max_size, .-sort_by_max_size
	.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_cpqphp_ctrl.c_sort_by_max_size.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort_by_max_size, %function
sort_by_max_size:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	lr, [r0]
	cmp	lr, #0
	beq	.L10
	ldr	r3, [lr, #4]
	cmp	r3, #0
	beq	.L9
.L14:
	ldr	r1, [lr]
	ldr	r2, [r3]
	cmp	r1, r2
	movge	r4, #0
	bge	.L6
	str	r3, [r0]
	ldr	r3, [r3, #4]
	mov	r4, #1
	str	r3, [lr, #4]
	ldr	r3, [r0]
	str	lr, [r3, #4]
	ldr	lr, [r0]
	ldr	r3, [lr, #4]
	b	.L6
.L24:
	ldr	r2, [r3, #4]
	cmp	r2, #0
	beq	.L7
	ldr	ip, [r3]
	ldr	r1, [r2]
	cmp	ip, r1
	strlt	r2, [lr, #4]
	movge	lr, r3
	movlt	lr, r2
	movge	r3, r2
	ldrlt	r1, [r2, #4]
	addlt	r4, r4, #1
	strlt	r1, [r3, #4]
	strlt	r3, [r2, #4]
.L6:
	cmp	r3, #0
	bne	.L24
.L7:
	cmp	r4, #0
	beq	.L9
.L25:
	ldr	lr, [r0]
	ldr	r3, [lr, #4]
	cmp	r3, #0
	bne	.L14
	mov	r4, r3
	cmp	r4, #0
	bne	.L25
.L9:
	mov	r0, #0
	pop	{r4, pc}
.L10:
	mov	r0, #1
	pop	{r4, pc}
	.size	sort_by_max_size, .-sort_by_max_size
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
