	.file	"224221.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Input %d records (id name):\n"
.LC1:
	.string	"#%d: "
.LC2:
	.string	"%d %s"
.LC3:
	.string	"\nRecords: (Count = %2d)\n"
.LC4:
	.string	"====================="
.LC5:
	.string	"%8d %s\n"
.LC6:
	.string	"\nFind name by id: "
.LC7:
	.string	"%d"
.LC8:
	.string	"record not found."
	.align 8
.LC9:
	.string	"record found, id: %d, name: %s\n"
	.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
	sub	rsp, 608
	mov	DWORD PTR -596[rbp], edi
	mov	QWORD PTR -608[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 10
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -588[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -588[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -576[rbp]
	mov	eax, DWORD PTR -588[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	lea	rsi, -576[rbp]
	mov	eax, DWORD PTR -588[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 3
	add	rax, 48
	add	rax, rsi
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -588[rbp], 1
.L2:
	cmp	DWORD PTR -588[rbp], 9
	jle	.L3
	lea	rax, -576[rbp]
	lea	rcx, sort_comparer[rip]
	mov	edx, 56
	mov	esi, 10
	mov	rdi, rax
	call	qsort@PLT
	mov	esi, 10
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -584[rbp], 0
	jmp	.L4
.L5:
	lea	rcx, -576[rbp]
	mov	eax, DWORD PTR -584[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -584[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 3
	add	rax, rbp
	sub	rax, 524
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -584[rbp], 1
.L4:
	cmp	DWORD PTR -584[rbp], 9
	jle	.L5
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -592[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -592[rbp]
	lea	rax, -576[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	find_by_id
	mov	DWORD PTR -580[rbp], eax
	cmp	DWORD PTR -580[rbp], -1
	jne	.L6
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L7
.L6:
	lea	rcx, -576[rbp]
	mov	eax, DWORD PTR -580[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -580[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	sub	rax, rcx
	sal	rax, 3
	add	rax, rbp
	sub	rax, 524
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	sort_comparer
	.type	sort_comparer, @function
sort_comparer:
.LFB7:
	.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	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 52[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 52[rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_comparer, .-sort_comparer
	.globl	find_by_id
	.type	find_by_id, @function
find_by_id:
.LFB8:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L13
.L17:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 52[rax]
	cmp	DWORD PTR -32[rbp], eax
	jne	.L14
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 52[rax]
	cmp	DWORD PTR -32[rbp], eax
	jge	.L16
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L13
.L16:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
.L13:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L17
	mov	eax, -1
.L15:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	find_by_id, .-find_by_id
	.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	"224221.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Input %d records (id name):\012\000"
	.align	2
.LC1:
	.ascii	"#%d: \000"
	.align	2
.LC2:
	.ascii	"%d %s\000"
	.align	2
.LC3:
	.ascii	"\012Records: (Count = %2d)\012\000"
	.align	2
.LC4:
	.ascii	"=====================\000"
	.align	2
.LC5:
	.ascii	"%8d %s\012\000"
	.align	2
.LC6:
	.ascii	"\012Find name by id: \000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"record not found.\000"
	.align	2
.LC9:
	.ascii	"record found, id: %d, name: %s\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 592
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #592
	str	r0, [fp, #-592]
	str	r1, [fp, #-596]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #10
	ldr	r0, .L10+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-580]
	b	.L2
.L3:
	ldr	r3, [fp, #-580]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L10+8
	bl	printf
	sub	r1, fp, #568
	ldr	r2, [fp, #-580]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #48
	add	r3, r1, r3
	add	r0, r3, #4
	sub	r1, fp, #568
	ldr	r2, [fp, #-580]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L10+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-580]
	add	r3, r3, #1
	str	r3, [fp, #-580]
.L2:
	ldr	r3, [fp, #-580]
	cmp	r3, #9
	ble	.L3
	sub	r0, fp, #568
	ldr	r3, .L10+16
	mov	r2, #56
	mov	r1, #10
	bl	qsort
	mov	r1, #10
	ldr	r0, .L10+20
	bl	printf
	ldr	r0, .L10+24
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-576]
	b	.L4
.L5:
	ldr	r2, [fp, #-576]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #512
	ldr	r0, [r3]
	sub	r1, fp, #568
	ldr	r2, [fp, #-576]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L10+28
	bl	printf
	ldr	r3, [fp, #-576]
	add	r3, r3, #1
	str	r3, [fp, #-576]
.L4:
	ldr	r3, [fp, #-576]
	cmp	r3, #9
	ble	.L5
	ldr	r0, .L10+32
	bl	printf
	sub	r3, fp, #584
	mov	r1, r3
	ldr	r0, .L10+36
	bl	__isoc99_scanf
	ldr	r2, [fp, #-584]
	sub	r3, fp, #568
	mov	r1, #10
	mov	r0, r3
	bl	find_by_id
	str	r0, [fp, #-572]
	ldr	r3, [fp, #-572]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L10+40
	bl	puts
	b	.L7
.L6:
	ldr	r2, [fp, #-572]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #512
	ldr	r0, [r3]
	sub	r1, fp, #568
	ldr	r2, [fp, #-572]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L10+44
	bl	printf
.L7:
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	sort_comparer
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.align	2
	.global	sort_comparer
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort_comparer, %function
sort_comparer:
	@ 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]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #52]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #52]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sort_comparer, .-sort_comparer
	.align	2
	.global	find_by_id
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_by_id, %function
find_by_id:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L15
.L19:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #52]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bne	.L16
	ldr	r3, [fp, #-8]
	b	.L17
.L16:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #52]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bge	.L18
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L15
.L18:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L15:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L19
	mvn	r3, #0
.L17:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	find_by_id, .-find_by_id
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
