	.file	"206658.c"
	.intel_syntax noprefix
	.text
	.globl	kfree_list
	.bss
	.align 8
	.type	kfree_list, @object
	.size	kfree_list, 8
kfree_list:
	.zero	8
	.text
	.globl	alloc
	.type	alloc, @function
alloc:
.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 -40[rbp], rdi
	mov	eax, 1024
	cmp	QWORD PTR -40[rbp], 1024
	cmovnb	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, kfree_list[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR kfree_list[rip]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L2
.L11:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	and	rax, rdx
	test	rax, rax
	jne	.L3
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], 1
	jmp	.L4
.L7:
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 10
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	cmp	rdx, rax
	je	.L5
	mov	QWORD PTR -16[rbp], 0
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	add	QWORD PTR -8[rbp], 1
.L4:
	cmp	QWORD PTR -16[rbp], 0
	je	.L6
	mov	rax, QWORD PTR -40[rbp]
	shr	rax, 10
	cmp	QWORD PTR -8[rbp], rax
	jb	.L7
.L6:
	cmp	QWORD PTR -16[rbp], 0
	je	.L3
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR -8[rbp], 0
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	QWORD PTR -8[rbp], 1
.L8:
	mov	rax, QWORD PTR -40[rbp]
	shr	rax, 3
	cmp	QWORD PTR -8[rbp], rax
	jb	.L9
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L10
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
.L2:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L11
	mov	eax, 0
.L10:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	alloc, .-alloc
	.section	.rodata
.LC0:
	.string	"free list: "
.LC1:
	.string	"%p "
.LC2:
	.string	"%p\n"
	.text
	.globl	print_free_list
	.type	print_free_list, @function
print_free_list:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
.L13:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_free_list, .-print_free_list
	.section	.rodata
.LC3:
	.string	"a=%p b=%p c=%p\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
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], 10
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	sal	eax, 10
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	and	eax, 1023
	test	rax, rax
	je	.L16
	mov	rax, QWORD PTR -32[rbp]
	and	rax, -1024
	add	rax, 1024
	mov	QWORD PTR -32[rbp], rax
.L16:
	mov	DWORD PTR -40[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -40[rbp]
	add	eax, 1
	sal	eax, 10
	movsx	rsi, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -40[rbp]
	sal	eax, 10
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, rax
	lea	rax, [rsi+rcx]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -40[rbp], 1
.L17:
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	cmp	DWORD PTR -40[rbp], eax
	jl	.L18
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	sal	eax, 10
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR kfree_list[rip], rax
	mov	rax, QWORD PTR kfree_list[rip]
	mov	rdi, rax
	call	print_free_list
	mov	edi, 1024
	call	alloc
	mov	QWORD PTR -24[rbp], rax
	mov	edi, 2048
	call	alloc
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 65536
	call	alloc
	mov	QWORD PTR -8[rbp], rax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR kfree_list[rip]
	mov	rdi, rax
	call	print_free_list
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"206658.c"
	.text
	.comm	kfree_list,4,4
	.align	2
	.global	alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	alloc, %function
alloc:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #1024
	movcs	r3, r3
	movcc	r3, #1024
	str	r3, [fp, #-24]
	ldr	r3, .L12
	str	r3, [fp, #-20]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L2
.L11:
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	and	r3, r3, r2
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L4
.L7:
	ldr	r3, [fp, #-8]
	lsl	r2, r3, #10
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L5
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L6
.L5:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-24]
	lsr	r3, r3, #10
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L7
.L6:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r3, [fp, #-24]
	lsr	r3, r3, #2
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L9
	ldr	r3, [fp, #-16]
	b	.L10
.L3:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
.L10:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L13:
	.align	2
.L12:
	.word	kfree_list
	.size	alloc, .-alloc
	.section	.rodata
	.align	2
.LC0:
	.ascii	"free list: \000"
	.align	2
.LC1:
	.ascii	"%p \000"
	.align	2
.LC2:
	.ascii	"%p\012\000"
	.text
	.align	2
	.global	print_free_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_free_list, %function
print_free_list:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r0, .L17
	bl	printf
	b	.L15
.L16:
	ldr	r1, [fp, #-8]
	ldr	r0, .L17+4
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L16
	ldr	r1, [fp, #-8]
	ldr	r0, .L17+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	print_free_list, .-print_free_list
	.section	.rodata
	.align	2
.LC3:
	.ascii	"a=%p b=%p c=%p\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, #10
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	lsl	r3, r3, #10
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-28]
	bic	r3, r3, #1020
	bic	r3, r3, #3
	add	r3, r3, #1024
	str	r3, [fp, #-28]
.L20:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L21
.L22:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #10
	mov	r1, r3
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	lsl	r2, r2, #10
	mov	r0, r2
	ldr	r2, [fp, #-28]
	add	r2, r0, r2
	add	r3, r1, r3
	str	r3, [r2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L21:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L22
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsl	r3, r3, #10
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	ldr	r2, .L24
	ldr	r3, [fp, #-28]
	str	r3, [r2]
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r0, r3
	bl	print_free_list
	mov	r0, #1024
	bl	alloc
	str	r0, [fp, #-16]
	mov	r0, #2048
	bl	alloc
	str	r0, [fp, #-12]
	mov	r0, #65536
	bl	alloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L24+4
	bl	printf
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r0, r3
	bl	print_free_list
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	kfree_list
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
