	.file	"654642.c"
	.intel_syntax noprefix
	.text
	.globl	comparator
	.type	comparator, @function
comparator:
.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 -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]
	sub	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comparator, .-comparator
	.section	.rodata
.LC0:
	.string	"One parameter expected"
.LC1:
	.string	"Error stat file %s"
	.align 8
.LC2:
	.string	"File %s is not aligned properly"
.LC3:
	.string	"Error opening file %s"
.LC4:
	.string	"Error allocating memory"
.LC5:
	.string	"Error reading from file %s"
.LC6:
	.string	".temp1.dat"
.LC7:
	.string	"Error opening file temp1.dat"
	.align 8
.LC8:
	.string	"Error writing to file temp1.dat"
.LC9:
	.string	".temp2.dat"
.LC10:
	.string	"Error opening file temp2.dat"
	.align 8
.LC11:
	.string	"Error writing to file temp2.dat"
.LC12:
	.string	"Error seeking in file %s"
	.align 8
.LC13:
	.string	"Error seeking in file temp1.dat"
	.align 8
.LC14:
	.string	"Error seeking in file temp2.dat"
	.align 8
.LC15:
	.string	"Error reading from file temp1.dat"
	.align 8
.LC16:
	.string	"Error reading from file temp2.dat"
.LC17:
	.string	"Error writing to file %s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -292[rbp], 2
	je	.L4
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L4:
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jns	.L5
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	err@PLT
.L5:
	mov	rax, QWORD PTR -112[rbp]
	test	rax, rax
	jne	.L6
	mov	edi, 0
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -112[rbp]
	and	eax, 3
	test	rax, rax
	je	.L7
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	mov	edi, 3
	mov	eax, 0
	call	errx@PLT
.L7:
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -264[rbp], eax
	cmp	DWORD PTR -264[rbp], 0
	jns	.L8
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	mov	edi, 4
	mov	eax, 0
	call	err@PLT
.L8:
	mov	rax, QWORD PTR -112[rbp]
	shr	rax, 3
	mov	DWORD PTR -260[rbp], eax
	mov	rax, QWORD PTR -112[rbp]
	shr	rax, 2
	sub	eax, DWORD PTR -260[rbp]
	mov	DWORD PTR -256[rbp], eax
	mov	eax, DWORD PTR -260[rbp]
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -172[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -172[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC4[rip]
	mov	edi, 5
	mov	eax, 0
	call	err@PLT
.L9:
	mov	eax, DWORD PTR -260[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -176[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -176[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 6
	mov	eax, 0
	call	err@PLT
.L10:
	mov	esi, DWORD PTR -260[rbp]
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, comparator[rip]
	mov	edx, 4
	mov	rdi, rax
	call	qsort@PLT
	mov	edx, 384
	mov	esi, 578
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -252[rbp], eax
	cmp	DWORD PTR -252[rbp], 0
	jns	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -180[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -180[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC7[rip]
	mov	edi, 4
	mov	eax, 0
	call	err@PLT
.L11:
	mov	eax, DWORD PTR -260[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -252[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L12
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -184[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -184[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC8[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L12:
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -256[rbp]
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -188[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC4[rip]
	mov	edi, 5
	mov	eax, 0
	call	err@PLT
.L13:
	mov	eax, DWORD PTR -256[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -192[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -192[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 6
	mov	eax, 0
	call	err@PLT
.L14:
	mov	esi, DWORD PTR -256[rbp]
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, comparator[rip]
	mov	edx, 4
	mov	rdi, rax
	call	qsort@PLT
	mov	edx, 384
	mov	esi, 578
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -248[rbp], eax
	cmp	DWORD PTR -248[rbp], 0
	jns	.L15
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -196[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -196[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC10[rip]
	mov	edi, 4
	mov	eax, 0
	call	err@PLT
.L15:
	mov	eax, DWORD PTR -256[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -248[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L16
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -200[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -200[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC11[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L16:
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -204[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -204[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC12[rip]
	mov	edi, 8
	mov	eax, 0
	call	err@PLT
.L17:
	mov	DWORD PTR -272[rbp], 0
	mov	DWORD PTR -268[rbp], 0
	jmp	.L18
.L27:
	mov	eax, DWORD PTR -272[rbp]
	sal	rax, 2
	mov	rcx, rax
	mov	eax, DWORD PTR -252[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -224[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -224[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC13[rip]
	mov	edi, 8
	mov	eax, 0
	call	err@PLT
.L19:
	mov	eax, DWORD PTR -268[rbp]
	sal	rax, 2
	mov	rcx, rax
	mov	eax, DWORD PTR -248[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	test	rax, rax
	jns	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -228[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -228[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC14[rip]
	mov	edi, 8
	mov	eax, 0
	call	err@PLT
.L20:
	lea	rcx, -280[rbp]
	mov	eax, DWORD PTR -252[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L21
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -232[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -232[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC15[rip]
	mov	edi, 6
	mov	eax, 0
	call	err@PLT
.L21:
	lea	rcx, -276[rbp]
	mov	eax, DWORD PTR -248[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L22
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -236[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -236[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC16[rip]
	mov	edi, 6
	mov	eax, 0
	call	err@PLT
.L22:
	lea	rdx, -276[rbp]
	lea	rax, -280[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	comparator
	test	eax, eax
	jns	.L23
	lea	rcx, -280[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -240[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -240[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L24:
	add	DWORD PTR -272[rbp], 1
	jmp	.L18
.L23:
	lea	rcx, -276[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -244[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -244[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L25:
	add	DWORD PTR -268[rbp], 1
.L18:
	mov	eax, DWORD PTR -272[rbp]
	cmp	eax, DWORD PTR -260[rbp]
	jnb	.L28
	mov	eax, DWORD PTR -268[rbp]
	cmp	eax, DWORD PTR -256[rbp]
	jb	.L27
	jmp	.L28
.L31:
	lea	rcx, -280[rbp]
	mov	eax, DWORD PTR -252[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L29
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -208[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -208[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC15[rip]
	mov	edi, 6
	mov	eax, 0
	call	err@PLT
.L29:
	lea	rcx, -280[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L30
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -212[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -212[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L30:
	add	DWORD PTR -272[rbp], 1
.L28:
	mov	eax, DWORD PTR -272[rbp]
	cmp	eax, DWORD PTR -260[rbp]
	jb	.L31
	jmp	.L32
.L35:
	lea	rcx, -276[rbp]
	mov	eax, DWORD PTR -248[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L33
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -216[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -216[rbp]
	mov	DWORD PTR [rax], edx
	lea	rsi, .LC16[rip]
	mov	edi, 6
	mov	eax, 0
	call	err@PLT
.L33:
	lea	rcx, -276[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L34
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -220[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -220[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	mov	edi, 7
	mov	eax, 0
	call	err@PLT
.L34:
	add	DWORD PTR -268[rbp], 1
.L32:
	mov	eax, DWORD PTR -268[rbp]
	cmp	eax, DWORD PTR -256[rbp]
	jb	.L35
	mov	eax, DWORD PTR -264[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -248[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.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	"654642.c"
	.text
	.align	2
	.global	comparator
	.syntax unified
	.arm
	.fpu softvfp
	.type	comparator, %function
comparator:
	@ 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]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	comparator, .-comparator
	.section	.rodata
	.align	2
.LC0:
	.ascii	"One parameter expected\000"
	.align	2
.LC1:
	.ascii	"Error stat file %s\000"
	.align	2
.LC2:
	.ascii	"File %s is not aligned properly\000"
	.align	2
.LC3:
	.ascii	"Error opening file %s\000"
	.align	2
.LC4:
	.ascii	"Error allocating memory\000"
	.align	2
.LC5:
	.ascii	"Error reading from file %s\000"
	.align	2
.LC6:
	.ascii	".temp1.dat\000"
	.align	2
.LC7:
	.ascii	"Error opening file temp1.dat\000"
	.align	2
.LC8:
	.ascii	"Error writing to file temp1.dat\000"
	.align	2
.LC9:
	.ascii	".temp2.dat\000"
	.align	2
.LC10:
	.ascii	"Error opening file temp2.dat\000"
	.align	2
.LC11:
	.ascii	"Error writing to file temp2.dat\000"
	.align	2
.LC12:
	.ascii	"Error seeking in file %s\000"
	.align	2
.LC13:
	.ascii	"Error seeking in file temp1.dat\000"
	.align	2
.LC14:
	.ascii	"Error seeking in file temp2.dat\000"
	.align	2
.LC15:
	.ascii	"Error reading from file temp1.dat\000"
	.align	2
.LC16:
	.ascii	"Error reading from file temp2.dat\000"
	.align	2
.LC17:
	.ascii	"Error writing to file %s\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #224
	str	r0, [fp, #-224]
	str	r1, [fp, #-228]
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-224]
	cmp	r3, #2
	beq	.L4
	ldr	r1, .L37+4
	mov	r0, #1
	bl	errx
.L4:
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #100
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+8
	mov	r0, #2
	bl	err
.L5:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L6
	mov	r0, #0
	bl	exit
.L6:
	ldr	r3, [fp, #-56]
	and	r3, r3, #3
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+12
	mov	r0, #3
	bl	errx
.L7:
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-200]
	ldr	r3, [fp, #-200]
	cmp	r3, #0
	bge	.L8
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+16
	mov	r0, #4
	bl	err
.L8:
	ldr	r3, [fp, #-56]
	lsr	r3, r3, #3
	str	r3, [fp, #-196]
	ldr	r3, [fp, #-56]
	lsr	r2, r3, #2
	ldr	r3, [fp, #-196]
	sub	r3, r2, r3
	str	r3, [fp, #-192]
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-188]
	ldr	r3, [fp, #-188]
	cmp	r3, #0
	bne	.L9
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-104]
	ldr	r0, [fp, #-200]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-104]
	str	r3, [r2]
	ldr	r1, .L37+20
	mov	r0, #5
	bl	err
.L9:
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-188]
	ldr	r0, [fp, #-200]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-108]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-188]
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-108]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+24
	mov	r0, #6
	bl	err
.L10:
	ldr	r3, .L37+28
	mov	r2, #4
	ldr	r1, [fp, #-196]
	ldr	r0, [fp, #-188]
	bl	qsort
	mov	r2, #384
	ldr	r1, .L37+32
	ldr	r0, .L37+36
	bl	open
	str	r0, [fp, #-184]
	ldr	r3, [fp, #-184]
	cmp	r3, #0
	bge	.L11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-112]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-188]
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-112]
	str	r3, [r2]
	ldr	r1, .L37+40
	mov	r0, #4
	bl	err
.L11:
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-188]
	ldr	r0, [fp, #-184]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L12
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-116]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-188]
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-116]
	str	r3, [r2]
	ldr	r1, .L37+44
	mov	r0, #7
	bl	err
.L12:
	ldr	r0, [fp, #-188]
	bl	free
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-188]
	ldr	r3, [fp, #-188]
	cmp	r3, #0
	bne	.L13
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-120]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-120]
	str	r3, [r2]
	ldr	r1, .L37+20
	mov	r0, #5
	bl	err
.L13:
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-188]
	ldr	r0, [fp, #-200]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-124]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-188]
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-124]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+24
	mov	r0, #6
	bl	err
.L14:
	ldr	r3, .L37+28
	mov	r2, #4
	ldr	r1, [fp, #-192]
	ldr	r0, [fp, #-188]
	bl	qsort
	mov	r2, #384
	ldr	r1, .L37+32
	ldr	r0, .L37+48
	bl	open
	str	r0, [fp, #-180]
	ldr	r3, [fp, #-180]
	cmp	r3, #0
	bge	.L15
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-128]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-188]
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-128]
	str	r3, [r2]
	ldr	r1, .L37+52
	mov	r0, #4
	bl	err
.L15:
	ldr	r3, [fp, #-192]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-188]
	ldr	r0, [fp, #-180]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L16
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-132]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	ldr	r0, [fp, #-188]
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-132]
	str	r3, [r2]
	ldr	r1, .L37+56
	mov	r0, #7
	bl	err
.L16:
	ldr	r0, [fp, #-188]
	bl	free
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-200]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-136]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-136]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+60
	mov	r0, #8
	bl	err
.L17:
	mov	r3, #0
	str	r3, [fp, #-208]
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L18
.L27:
	ldr	r3, [fp, #-208]
	lsl	r3, r3, #2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-184]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L19
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-156]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-156]
	str	r3, [r2]
	ldr	r1, .L37+64
	mov	r0, #8
	bl	err
.L19:
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-180]
	bl	lseek
	mov	r3, r0
	cmp	r3, #0
	bge	.L20
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-160]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-160]
	str	r3, [r2]
	ldr	r1, .L37+68
	mov	r0, #8
	bl	err
.L20:
	sub	r3, fp, #216
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-184]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L21
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-164]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-164]
	str	r3, [r2]
	ldr	r1, .L37+72
	mov	r0, #6
	bl	err
.L21:
	sub	r3, fp, #212
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-180]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L22
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-168]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-168]
	str	r3, [r2]
	ldr	r1, .L37+76
	mov	r0, #6
	bl	err
.L22:
	sub	r2, fp, #212
	sub	r3, fp, #216
	mov	r1, r2
	mov	r0, r3
	bl	comparator
	mov	r3, r0
	cmp	r3, #0
	bge	.L23
	sub	r3, fp, #216
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-200]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L24
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-172]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-172]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+80
	mov	r0, #7
	bl	err
.L24:
	ldr	r3, [fp, #-208]
	add	r3, r3, #1
	str	r3, [fp, #-208]
	b	.L18
.L23:
	sub	r3, fp, #212
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-200]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L25
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-176]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-176]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+80
	mov	r0, #7
	bl	err
.L25:
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L18:
	ldr	r2, [fp, #-208]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	bcs	.L28
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-192]
	cmp	r2, r3
	bcc	.L27
	b	.L28
.L31:
	sub	r3, fp, #216
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-184]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-140]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-140]
	str	r3, [r2]
	ldr	r1, .L37+72
	mov	r0, #6
	bl	err
.L29:
	sub	r3, fp, #216
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-200]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L30
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-144]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-144]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+80
	mov	r0, #7
	bl	err
.L30:
	ldr	r3, [fp, #-208]
	add	r3, r3, #1
	str	r3, [fp, #-208]
.L28:
	ldr	r2, [fp, #-208]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	bcc	.L31
	b	.L32
.L35:
	sub	r3, fp, #212
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-180]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L33
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-148]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-148]
	str	r3, [r2]
	ldr	r1, .L37+76
	mov	r0, #6
	bl	err
.L33:
	sub	r3, fp, #212
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-200]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L34
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-152]
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-152]
	str	r3, [r2]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37+80
	mov	r0, #7
	bl	err
.L34:
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L32:
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-192]
	cmp	r2, r3
	bcc	.L35
	ldr	r0, [fp, #-200]
	bl	close
	ldr	r0, [fp, #-184]
	bl	close
	ldr	r0, [fp, #-180]
	bl	close
	mov	r0, #0
	bl	exit
.L38:
	.align	2
.L37:
	.word	.LC18
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	comparator
	.word	578
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
