	.file	"423999.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"not weird"
.LC2:
	.string	"weird"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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, 4040
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -4048[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L2
.L9:
	lea	rdx, -4032[rbp]
	mov	eax, 0
	mov	ecx, 500
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -4032[rbp], 1
	mov	DWORD PTR -4036[rbp], 1
	mov	eax, DWORD PTR -4036[rbp]
	mov	DWORD PTR -4040[rbp], eax
	lea	rax, -4044[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	ebx, 2
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -4044[rbp]
	cdq
	idiv	ebx
	mov	eax, edx
	test	eax, eax
	jne	.L4
	add	DWORD PTR -4040[rbp], ebx
	mov	eax, DWORD PTR -4036[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -4036[rbp], edx
	cdqe
	mov	DWORD PTR -4032[rbp+rax*4], ebx
	mov	eax, DWORD PTR -4044[rbp]
	cdq
	idiv	ebx
	cmp	ebx, eax
	je	.L4
	mov	eax, DWORD PTR -4044[rbp]
	cdq
	idiv	ebx
	add	DWORD PTR -4040[rbp], eax
	mov	eax, DWORD PTR -4044[rbp]
	mov	ecx, DWORD PTR -4036[rbp]
	lea	edx, 1[rcx]
	mov	DWORD PTR -4036[rbp], edx
	cdq
	idiv	ebx
	mov	edx, eax
	movsx	rax, ecx
	mov	DWORD PTR -4032[rbp+rax*4], edx
.L4:
	add	ebx, 1
.L3:
	mov	edx, ebx
	imul	edx, ebx
	mov	eax, DWORD PTR -4044[rbp]
	cmp	edx, eax
	jle	.L5
	mov	edx, DWORD PTR -4044[rbp]
	mov	eax, DWORD PTR -4040[rbp]
	mov	esi, edx
	mov	edi, eax
	call	chkNotAbundant
	test	al, al
	je	.L6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L2
.L6:
	mov	eax, DWORD PTR -4036[rbp]
	movsx	rsi, eax
	lea	rax, -4032[rbp]
	lea	rcx, numcmp[rip]
	mov	edx, 4
	mov	rdi, rax
	call	qsort@PLT
	mov	edx, DWORD PTR -4044[rbp]
	mov	ecx, DWORD PTR -4036[rbp]
	lea	rax, -4032[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	isSemiperfect
	test	al, al
	je	.L8
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L2
.L8:
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L2:
	mov	eax, DWORD PTR -4048[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -4048[rbp], edx
	test	eax, eax
	jne	.L9
	mov	eax, 0
	mov	rsi, QWORD PTR -24[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	chkNotAbundant
	.type	chkNotAbundant, @function
chkNotAbundant:
.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 -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	setle	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	chkNotAbundant, .-chkNotAbundant
	.globl	isSemiperfect
	.type	isSemiperfect, @function
isSemiperfect:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 48
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	DWORD PTR -64[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rsi, rax
	mov	eax, DWORD PTR -64[rbp]
	add	eax, 1
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	movsx	rdx, eax
	mov	rcx, rdx
	mov	ebx, 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L15:
	cmp	rsp, rdx
	je	.L16
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L15
.L16:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L17
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L17:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR [rax], 1
	mov	ebx, 1
	jmp	.L18
.L19:
	mov	rdx, QWORD PTR -32[rbp]
	movsx	rax, ebx
	mov	BYTE PTR [rdx+rax], 0
	add	ebx, 1
.L18:
	cmp	ebx, DWORD PTR -64[rbp]
	jle	.L19
	mov	r12d, 0
	jmp	.L20
.L24:
	mov	eax, DWORD PTR -64[rbp]
	lea	ebx, -1[rax]
	jmp	.L21
.L23:
	mov	rdx, QWORD PTR -32[rbp]
	movsx	rax, ebx
	movzx	eax, BYTE PTR [rdx+rax]
	test	al, al
	je	.L22
	movsx	rax, r12d
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	eax, ebx
	cmp	DWORD PTR -64[rbp], eax
	jl	.L22
	movsx	rax, r12d
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	eax, ebx
	mov	rdx, QWORD PTR -32[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], 1
.L22:
	sub	ebx, 1
.L21:
	test	ebx, ebx
	jns	.L23
	add	r12d, 1
.L20:
	cmp	r12d, DWORD PTR -60[rbp]
	jl	.L24
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	mov	rsp, rsi
	mov	rdi, QWORD PTR -24[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	isSemiperfect, .-isSemiperfect
	.section	.rodata
.LC3:
	.string	"%d "
	.text
	.globl	printArr
	.type	printArr, @function
printArr:
.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	ebx, 0
	jmp	.L28
.L29:
	movsx	rax, ebx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	ebx, 1
.L28:
	cmp	ebx, DWORD PTR -28[rbp]
	jl	.L29
	mov	edi, 10
	call	putchar@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printArr, .-printArr
	.globl	numcmp
	.type	numcmp, @function
numcmp:
.LFB10:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	setg	al
	movzx	edx, al
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	setl	al
	movzx	ecx, al
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	numcmp, .-numcmp
	.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	"423999.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
.LC1:
	.ascii	"not weird\000"
	.align	2
.LC2:
	.ascii	"weird\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 = 4024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #4016
	sub	sp, sp, #8
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4016
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L12+4
	bl	__isoc99_scanf
	b	.L2
.L9:
	sub	r3, fp, #4000
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4000
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-4016]
	mov	r3, #1
	str	r3, [fp, #-4020]
	ldr	r3, [fp, #-4020]
	str	r3, [fp, #-4024]
	sub	r3, fp, #4016
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, .L12+4
	bl	__isoc99_scanf
	mov	r4, #2
	b	.L3
.L5:
	ldr	r3, [fp, #-4028]
	mov	r1, r4
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-4024]
	add	r3, r3, r4
	str	r3, [fp, #-4024]
	ldr	r3, [fp, #-4020]
	add	r2, r3, #1
	str	r2, [fp, #-4020]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	str	r4, [r3, #-4004]
	ldr	r3, [fp, #-4028]
	mov	r1, r4
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	cmp	r4, r3
	beq	.L4
	ldr	r3, [fp, #-4028]
	mov	r1, r4
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-4024]
	add	r3, r3, r2
	str	r3, [fp, #-4024]
	ldr	r2, [fp, #-4028]
	ldr	r5, [fp, #-4020]
	add	r3, r5, #1
	str	r3, [fp, #-4020]
	mov	r1, r4
	mov	r0, r2
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	lsl	r3, r5, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-4004]
.L4:
	add	r4, r4, #1
.L3:
	mul	r2, r4, r4
	ldr	r3, [fp, #-4028]
	cmp	r2, r3
	ble	.L5
	ldr	r3, [fp, #-4028]
	mov	r1, r3
	ldr	r0, [fp, #-4024]
	bl	chkNotAbundant
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L12+8
	bl	puts
	b	.L2
.L6:
	ldr	r1, [fp, #-4020]
	sub	r0, fp, #4000
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, .L12+12
	mov	r2, #4
	bl	qsort
	ldr	r2, [fp, #-4028]
	sub	r3, fp, #4000
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [fp, #-4020]
	mov	r0, r3
	bl	isSemiperfect
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r0, .L12+8
	bl	puts
	b	.L2
.L8:
	ldr	r0, .L12+16
	bl	puts
.L2:
	ldr	r3, [fp, #-4032]
	sub	r2, r3, #1
	str	r2, [fp, #-4032]
	cmp	r3, #0
	bne	.L9
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	numcmp
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	chkNotAbundant
	.syntax unified
	.arm
	.fpu softvfp
	.type	chkNotAbundant, %function
chkNotAbundant:
	@ 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	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	chkNotAbundant, .-chkNotAbundant
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	isSemiperfect
	.syntax unified
	.arm
	.fpu softvfp
	.type	isSemiperfect, %function
isSemiperfect:
	@ 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
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	lr, r3
	ldr	r3, [fp, #-40]
	add	ip, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	mov	r2, #1
	strb	r2, [r3]
	mov	r4, #1
	b	.L17
.L18:
	ldr	r3, [fp, #-20]
	mov	r2, #0
	strb	r2, [r3, r4]
	add	r4, r4, #1
.L17:
	ldr	r3, [fp, #-40]
	cmp	r4, r3
	ble	.L18
	mov	r5, #0
	b	.L19
.L23:
	ldr	r3, [fp, #-40]
	sub	r4, r3, #1
	b	.L20
.L22:
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3, r4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L21
	mov	r3, r5
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r3, r4, r3
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L21
	mov	r3, r5
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r3, r4, r3
	ldr	r2, [fp, #-20]
	mov	r1, #1
	strb	r1, [r2, r3]
.L21:
	sub	r4, r4, #1
.L20:
	cmp	r4, #0
	bge	.L22
	add	r5, r5, #1
.L19:
	ldr	r3, [fp, #-36]
	cmp	r5, r3
	blt	.L23
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	sp, lr
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC4
	.size	isSemiperfect, .-isSemiperfect
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d \000"
	.text
	.align	2
	.global	printArr
	.syntax unified
	.arm
	.fpu softvfp
	.type	printArr, %function
printArr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r4, #0
	b	.L29
.L30:
	mov	r3, r4
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L31
	bl	printf
	add	r4, r4, #1
.L29:
	ldr	r3, [fp, #-20]
	cmp	r4, r3
	blt	.L30
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC5
	.size	printArr, .-printArr
	.align	2
	.global	numcmp
	.syntax unified
	.arm
	.fpu softvfp
	.type	numcmp, %function
numcmp:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
	mov	r1, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r3, r3, #255
	sub	r3, r1, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	numcmp, .-numcmp
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
