	.file	"694383.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\n extract will extract the real or imaginary parts of an FFT"
	.align 8
.LC1:
	.string	" or the magnitude or the phase."
	.align 8
.LC2:
	.string	"\nUsage: extract x infile np outfile"
	.align 8
.LC3:
	.string	"  x = m to extract magnitude information"
	.align 8
.LC4:
	.string	"      p to extract phase information"
	.align 8
.LC5:
	.string	"      r to extract the real part"
	.align 8
.LC6:
	.string	"      i to extract the imaginary part"
.LC7:
	.string	"  infile = input file name"
	.align 8
.LC8:
	.string	"  np = number of points to use in infile"
.LC9:
	.string	"  outfile = output file name"
.LC10:
	.string	"r"
.LC11:
	.string	"Unable to open fft file"
.LC12:
	.string	"Reading fft file: %s\n\n"
.LC13:
	.string	"%s"
.LC14:
	.string	"%lf %lf"
.LC15:
	.string	"w"
.LC16:
	.string	"Unable to open output file"
.LC17:
	.string	"Writing output file: %s\n\n"
.LC18:
	.string	"%lf\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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -180[rbp], 4
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L24
.L2:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 0
	jne	.L4
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L24
.L4:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -164[rbp], eax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -168[rbp], 0
	jmp	.L5
.L8:
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	esi, 128
	mov	rdi, rax
	call	fgets@PLT
	movzx	eax, BYTE PTR -144[rbp]
	cmp	al, 35
	jne	.L26
	lea	rax, -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -168[rbp], 1
.L5:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L8
	jmp	.L7
.L26:
	nop
.L7:
	mov	eax, DWORD PTR -164[rbp]
	add	eax, eax
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	lea	rcx, 8[rax]
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -144[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	DWORD PTR -168[rbp], 1
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -160[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -168[rbp], 1
.L9:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L10
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 0
	jne	.L11
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L24
.L11:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 114
	je	.L12
	cmp	eax, 114
	jg	.L13
	cmp	eax, 112
	je	.L14
	cmp	eax, 112
	jg	.L13
	cmp	eax, 105
	je	.L15
	cmp	eax, 109
	jne	.L13
	mov	DWORD PTR -168[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm1, xmm0
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	movsd	xmm2, QWORD PTR [rax]
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	mov	rdx, QWORD PTR -160[rbp]
	movq	xmm0, rax
	lea	rsi, .LC18[rip]
	mov	rdi, rdx
	mov	eax, 1
	call	fprintf@PLT
	add	DWORD PTR -168[rbp], 1
.L16:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L17
	jmp	.L13
.L14:
	mov	DWORD PTR -168[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	atan2@PLT
	movq	rax, xmm0
	mov	rdx, QWORD PTR -160[rbp]
	movq	xmm0, rax
	lea	rsi, .LC18[rip]
	mov	rdi, rdx
	mov	eax, 1
	call	fprintf@PLT
	add	DWORD PTR -168[rbp], 1
.L18:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L19
	jmp	.L13
.L12:
	mov	DWORD PTR -168[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -160[rbp]
	movq	xmm0, rdx
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 1
	call	fprintf@PLT
	add	DWORD PTR -168[rbp], 1
.L20:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L21
	jmp	.L13
.L15:
	mov	DWORD PTR -168[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -168[rbp]
	add	eax, eax
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -160[rbp]
	movq	xmm0, rdx
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 1
	call	fprintf@PLT
	add	DWORD PTR -168[rbp], 1
.L22:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L23
	nop
.L13:
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L24:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"694383.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012 extract will extract the real or imaginary par"
	.ascii	"ts of an FFT\000"
	.align	2
.LC1:
	.ascii	" or the magnitude or the phase.\000"
	.align	2
.LC2:
	.ascii	"\012Usage: extract x infile np outfile\000"
	.align	2
.LC3:
	.ascii	"  x = m to extract magnitude information\000"
	.align	2
.LC4:
	.ascii	"      p to extract phase information\000"
	.align	2
.LC5:
	.ascii	"      r to extract the real part\000"
	.align	2
.LC6:
	.ascii	"      i to extract the imaginary part\000"
	.align	2
.LC7:
	.ascii	"  infile = input file name\000"
	.align	2
.LC8:
	.ascii	"  np = number of points to use in infile\000"
	.align	2
.LC9:
	.ascii	"  outfile = output file name\000"
	.align	2
.LC10:
	.ascii	"r\000"
	.align	2
.LC11:
	.ascii	"Unable to open fft file\000"
	.align	2
.LC12:
	.ascii	"Reading fft file: %s\012\012\000"
	.align	2
.LC13:
	.ascii	"%s\000"
	.align	2
.LC14:
	.ascii	"%lf %lf\000"
	.align	2
.LC15:
	.ascii	"w\000"
	.align	2
.LC16:
	.ascii	"Unable to open output file\000"
	.align	2
.LC17:
	.ascii	"Writing output file: %s\012\012\000"
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.align	2
.LC18:
	.ascii	"%lf\012\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #160
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-168]
	cmp	r3, #4
	bgt	.L2
	ldr	r0, .L29+4
	bl	puts
	ldr	r0, .L29+8
	bl	puts
	ldr	r0, .L29+12
	bl	puts
	ldr	r0, .L29+16
	bl	puts
	ldr	r0, .L29+20
	bl	puts
	ldr	r0, .L29+24
	bl	puts
	ldr	r0, .L29+28
	bl	puts
	ldr	r0, .L29+32
	bl	puts
	ldr	r0, .L29+36
	bl	puts
	ldr	r0, .L29+40
	bl	puts
	mvn	r3, #0
	b	.L26
.L2:
	ldr	r3, [fp, #-172]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L29+44
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L29+48
	bl	perror
	mvn	r3, #0
	b	.L26
.L4:
	ldr	r3, [fp, #-172]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-172]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L29+52
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L5
.L8:
	sub	r3, fp, #144
	ldr	r2, [fp, #-156]
	mov	r1, #128
	mov	r0, r3
	bl	fgets
	ldrb	r3, [fp, #-144]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L28
	sub	r3, fp, #144
	mov	r1, r3
	ldr	r0, .L29+56
	bl	printf
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L5:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	blt	.L8
	b	.L7
.L28:
	nop
.L7:
	ldr	r3, [fp, #-152]
	lsl	r3, r3, #4
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-148]
	add	r3, r3, #8
	sub	r0, fp, #144
	ldr	r2, [fp, #-148]
	ldr	r1, .L29+60
	bl	__isoc99_sscanf
	mov	r3, #1
	str	r3, [fp, #-160]
	b	.L9
.L10:
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-148]
	add	r1, r2, r3
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	add	r3, r3, #8
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	mov	r2, r1
	ldr	r1, .L29+60
	ldr	r0, [fp, #-156]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L9:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	blt	.L10
	ldr	r0, [fp, #-156]
	bl	fclose
	ldr	r3, [fp, #-172]
	add	r3, r3, #16
	ldr	r3, [r3]
	ldr	r1, .L29+64
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L29+68
	bl	perror
	mvn	r3, #0
	b	.L26
.L11:
	ldr	r3, [fp, #-172]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L29+72
	bl	printf
	ldr	r3, [fp, #-172]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #105
	cmp	r3, #9
	ldrls	pc, [pc, r3, asl #2]
	b	.L12
.L14:
	.word	.L17
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L16
	.word	.L12
	.word	.L12
	.word	.L15
	.word	.L12
	.word	.L13
.L16:
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L18
.L19:
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	add	r3, r3, #8
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	add	r3, r3, #8
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L29+76
	ldr	r0, [fp, #-156]
	bl	fprintf
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L18:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	blt	.L19
	b	.L12
.L15:
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L20
.L21:
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	add	r3, r3, #8
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	atan2
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L29+76
	ldr	r0, [fp, #-156]
	bl	fprintf
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L20:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	blt	.L21
	b	.L12
.L13:
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L22
.L23:
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r1, .L29+76
	ldr	r0, [fp, #-156]
	bl	fprintf
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L22:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	blt	.L23
	b	.L12
.L17:
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L24
.L25:
	ldr	r3, [fp, #-160]
	lsl	r3, r3, #4
	add	r3, r3, #8
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r1, .L29+76
	ldr	r0, [fp, #-156]
	bl	fprintf
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L24:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	blt	.L25
	nop
.L12:
	ldr	r0, [fp, #-156]
	bl	fclose
	ldr	r0, [fp, #-148]
	bl	free
	mov	r3, #0
.L26:
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC19
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
