	.file	"766021.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
	.align 8
.LC0:
	.string	"usage %s hostname port filename numBursts BurstSize EventsPerSec\n"
.LC2:
	.string	"sending %f events/sec\n"
.LC3:
	.string	"ERROR opening socket"
.LC4:
	.string	"ERROR, no such host\n"
.LC5:
	.string	"ERROR connecting"
.LC6:
	.string	"connection established"
.LC7:
	.string	"r"
.LC8:
	.string	"time: %f\n"
.LC9:
	.string	"events: %lu\n"
.LC10:
	.string	"average events/sec: %f\n"
	.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, 496
	mov	DWORD PTR -484[rbp], edi
	mov	QWORD PTR -496[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -432[rbp], 0
	mov	QWORD PTR -424[rbp], 0
	mov	QWORD PTR -416[rbp], 0
	mov	DWORD PTR -468[rbp], 0
	mov	BYTE PTR -469[rbp], 0
	cmp	DWORD PTR -484[rbp], 6
	jg	.L3
	mov	rax, QWORD PTR -496[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -496[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -464[rbp], eax
	mov	rax, QWORD PTR -496[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR -408[rbp], rax
	mov	rax, QWORD PTR -496[rbp]
	add	rax, 40
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR -400[rbp], rax
	mov	rax, QWORD PTR -496[rbp]
	add	rax, 48
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -460[rbp], eax
	mov	eax, 1000000000
	mov	edx, 0
	div	DWORD PTR -460[rbp]
	mov	eax, eax
	mov	QWORD PTR -392[rbp], rax
	mov	rax, QWORD PTR -392[rbp]
	test	rax, rax
	js	.L4
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L5
.L4:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L5:
	movsd	xmm1, QWORD PTR .LC1[rip]
	divsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC2[rip]
	mov	eax, 1
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -456[rbp], eax
	cmp	DWORD PTR -456[rbp], 0
	jns	.L6
	lea	rdi, .LC3[rip]
	call	error
.L6:
	mov	rax, QWORD PTR -496[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -384[rbp], rax
	cmp	QWORD PTR -384[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	lea	rax, -288[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -288[rbp], 2
	mov	rax, QWORD PTR -384[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -288[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	eax, DWORD PTR -464[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -286[rbp], ax
	jmp	.L8
.L9:
	lea	rdi, .LC5[rip]
	call	error
	mov	edi, 500000
	call	usleep@PLT
.L8:
	lea	rax, -288[rbp]
	mov	rcx, rax
	mov	eax, DWORD PTR -456[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	js	.L9
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	QWORD PTR -352[rbp], 0
	mov	QWORD PTR -344[rbp], 0
	mov	QWORD PTR -336[rbp], 0
	mov	QWORD PTR -328[rbp], 0
	mov	QWORD PTR -448[rbp], 0
	mov	QWORD PTR -440[rbp], 0
	mov	rax, QWORD PTR -496[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -376[rbp], rax
	cmp	QWORD PTR -376[rbp], 0
	jne	.L10
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	QWORD PTR -320[rbp], 0
	mov	QWORD PTR -312[rbp], 0
	mov	QWORD PTR -304[rbp], 0
	mov	QWORD PTR -296[rbp], 0
	lea	rax, -352[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	lea	rax, -320[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -408[rbp]
	imul	rax, QWORD PTR -400[rbp]
	mov	QWORD PTR -368[rbp], rax
	jmp	.L11
.L13:
	mov	rax, QWORD PTR -448[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -448[rbp]
	mov	eax, DWORD PTR -456[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -452[rbp], eax
	add	QWORD PTR -424[rbp], 1
	add	QWORD PTR -432[rbp], 1
.L11:
	mov	rax, QWORD PTR -368[rbp]
	cmp	QWORD PTR -424[rbp], rax
	jnb	.L12
	mov	rdx, QWORD PTR -376[rbp]
	lea	rcx, -440[rbp]
	lea	rax, -448[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -360[rbp], rax
	cmp	QWORD PTR -360[rbp], -1
	jne	.L13
.L12:
	lea	rcx, -469[rbp]
	mov	eax, DWORD PTR -456[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -452[rbp], eax
	mov	rax, QWORD PTR -376[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -448[rbp]
	test	rax, rax
	je	.L14
	mov	rax, QWORD PTR -448[rbp]
	mov	rdi, rax
	call	free@PLT
.L14:
	lea	rax, -336[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR -352[rbp]
	sub	rax, rdx
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -328[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -344[rbp]
	sub	rax, rdx
	mov	QWORD PTR -416[rbp], rax
	mov	rax, QWORD PTR -416[rbp]
	test	rax, rax
	js	.L15
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L16
.L15:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L16:
	movsd	xmm1, QWORD PTR .LC1[rip]
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC8[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -424[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -424[rbp]
	test	rax, rax
	js	.L17
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L18
.L17:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L18:
	mov	rax, QWORD PTR -416[rbp]
	test	rax, rax
	js	.L19
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	jmp	.L20
.L19:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rdx
	addsd	xmm1, xmm1
.L20:
	movsd	xmm2, QWORD PTR .LC1[rip]
	divsd	xmm1, xmm2
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC10[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, DWORD PTR -456[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1104006501
	.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	"766021.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	perror
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage %s hostname port filename numBursts BurstSize"
	.ascii	" EventsPerSec\012\000"
	.global	__aeabi_uidiv
	.global	__aeabi_ui2d
	.global	__aeabi_ddiv
	.align	2
.LC1:
	.ascii	"sending %f events/sec\012\000"
	.align	2
.LC2:
	.ascii	"ERROR opening socket\000"
	.align	2
.LC3:
	.ascii	"ERROR, no such host\012\000"
	.align	2
.LC4:
	.ascii	"ERROR connecting\000"
	.align	2
.LC5:
	.ascii	"connection established\000"
	.align	2
.LC6:
	.ascii	"r\000"
	.align	2
.LC7:
	.ascii	"time: %f\012\000"
	.align	2
.LC8:
	.ascii	"events: %lu\012\000"
	.align	2
.LC9:
	.ascii	"average events/sec: %f\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 = 392
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #392
	str	r0, [fp, #-400]
	str	r1, [fp, #-404]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-380]
	mov	r3, #0
	str	r3, [fp, #-376]
	mov	r3, #0
	str	r3, [fp, #-372]
	mov	r3, #0
	str	r3, [fp, #-368]
	mov	r3, #0
	strb	r3, [fp, #-389]
	ldr	r3, [fp, #-400]
	cmp	r3, #6
	bgt	.L3
	ldr	r3, .L15+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-404]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L15+8
	bl	fprintf
	mov	r0, #0
	bl	exit
.L3:
	ldr	r3, [fp, #-404]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-404]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-360]
	ldr	r3, [fp, #-404]
	add	r3, r3, #20
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-356]
	ldr	r3, [fp, #-404]
	add	r3, r3, #24
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-352]
	ldr	r1, [fp, #-352]
	ldr	r0, .L15+12
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-348]
	ldr	r0, [fp, #-348]
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L15+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L15+20
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-344]
	ldr	r3, [fp, #-344]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L15+24
	bl	error
.L4:
	ldr	r3, [fp, #-404]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-340]
	ldr	r3, [fp, #-340]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L15+28
	bl	fwrite
	mov	r0, #0
	bl	exit
.L5:
	sub	r3, fp, #288
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #12
	sub	r3, r3, #276
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-340]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-340]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #288
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-364]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #276
	strh	r2, [r3, #2]	@ movhi
	b	.L6
.L7:
	ldr	r0, .L15+32
	bl	error
	ldr	r0, .L15+36
	bl	usleep
.L6:
	sub	r3, fp, #288
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-344]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	blt	.L7
	ldr	r0, .L15+40
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-320]
	mov	r3, #0
	str	r3, [fp, #-316]
	mov	r3, #0
	str	r3, [fp, #-312]
	mov	r3, #0
	str	r3, [fp, #-308]
	mov	r3, #0
	str	r3, [fp, #-388]
	mov	r3, #0
	str	r3, [fp, #-384]
	ldr	r3, [fp, #-404]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L15+44
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-336]
	ldr	r3, [fp, #-336]
	cmp	r3, #0
	bne	.L8
	mov	r0, #1
	bl	exit
.L8:
	mov	r3, #0
	str	r3, [fp, #-304]
	mov	r3, #0
	str	r3, [fp, #-300]
	mov	r3, #0
	str	r3, [fp, #-296]
	mov	r3, #0
	str	r3, [fp, #-292]
	sub	r3, fp, #320
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	sub	r3, fp, #304
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	ldr	r3, [fp, #-360]
	ldr	r2, [fp, #-356]
	mul	r3, r2, r3
	str	r3, [fp, #-332]
	b	.L9
.L11:
	ldr	r4, [fp, #-388]
	ldr	r3, [fp, #-388]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, [fp, #-344]
	bl	write
	str	r0, [fp, #-324]
	ldr	r3, [fp, #-376]
	add	r3, r3, #1
	str	r3, [fp, #-376]
	ldr	r3, [fp, #-380]
	add	r3, r3, #1
	str	r3, [fp, #-380]
.L9:
	ldr	r3, [fp, #-332]
	ldr	r2, [fp, #-376]
	cmp	r2, r3
	bcs	.L10
	sub	r1, fp, #384
	sub	r3, fp, #388
	ldr	r2, [fp, #-336]
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-328]
	ldr	r3, [fp, #-328]
	cmn	r3, #1
	bne	.L11
.L10:
	sub	r3, fp, #388
	sub	r3, r3, #1
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-344]
	bl	write
	str	r0, [fp, #-324]
	ldr	r0, [fp, #-336]
	bl	fclose
	ldr	r3, [fp, #-388]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-388]
	mov	r0, r3
	bl	free
.L12:
	sub	r3, fp, #312
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	ldr	r2, [fp, #-312]
	ldr	r3, [fp, #-320]
	sub	r3, r2, r3
	ldr	r2, .L15+12
	mul	r2, r3, r2
	ldr	r3, [fp, #-308]
	add	r2, r2, r3
	ldr	r3, [fp, #-316]
	sub	r3, r2, r3
	str	r3, [fp, #-372]
	ldr	r0, [fp, #-372]
	bl	__aeabi_ui2d
	mov	r2, #0
	ldr	r3, .L15+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L15+48
	bl	printf
	ldr	r1, [fp, #-376]
	ldr	r0, .L15+52
	bl	printf
	ldr	r0, [fp, #-376]
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-372]
	bl	__aeabi_ui2d
	mov	r2, #0
	ldr	r3, .L15+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L15+56
	bl	printf
	ldr	r0, [fp, #-344]
	bl	close
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC10
	.word	stderr
	.word	.LC0
	.word	1000000000
	.word	1104006501
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	500000
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
