	.file	"854020.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
	.text
	.globl	read_int
	.type	read_int, @function
read_int:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	mov	edx, 4
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_int, .-read_int
	.globl	read_bram
	.type	read_bram, @function
read_bram:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_bram, .-read_bram
	.section	.rodata
.LC1:
	.string	"/proc/%s/hw/ioreg/ppout0_addr"
.LC2:
	.string	"/proc/%s/hw/ioreg/ppout0_a"
.LC3:
	.string	"/proc/%s/hw/ioreg/ppout0_b"
.LC4:
	.string	"/proc/%s/hw/ioreg/ppout0_chan"
.LC5:
	.string	"/proc/%s/hw/ioreg/mcntr"
.LC6:
	.string	"ERROR opening socket"
.LC7:
	.string	"192.168.1.1"
.LC8:
	.string	"Unknown host"
.LC9:
	.string	"12345"
.LC10:
	.string	"ERROR sending"
	.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, 2896
	mov	DWORD PTR -2884[rbp], edi
	mov	QWORD PTR -2896[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -2884[rbp], 1
	jg	.L7
	mov	eax, -1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	jmp	.L21
.L7:
	mov	rax, QWORD PTR -2896[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -2800[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -2896[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -2544[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -2896[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -2288[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -2896[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -2032[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -2896[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1776[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -2864[rbp], eax
	cmp	DWORD PTR -2864[rbp], 0
	jns	.L9
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	error@PLT
.L9:
	mov	WORD PTR -2816[rbp], 2
	lea	rdi, .LC7[rip]
	call	gethostbyname@PLT
	mov	QWORD PTR -2824[rbp], rax
	cmp	QWORD PTR -2824[rbp], 0
	jne	.L10
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	error@PLT
.L10:
	mov	rax, QWORD PTR -2824[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -2824[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -2816[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	lea	rdi, .LC9[rip]
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -2814[rbp], ax
	mov	DWORD PTR -2860[rbp], 16
	lea	rax, -2800[rbp]
	mov	rdi, rax
	call	read_int
	and	eax, 8191
	mov	DWORD PTR -2856[rbp], eax
	cmp	DWORD PTR -2856[rbp], 4096
	setg	al
	mov	BYTE PTR -2873[rbp], al
	movzx	eax, BYTE PTR -2873[rbp]
	mov	BYTE PTR -2874[rbp], al
.L19:
	mov	DWORD PTR -2868[rbp], 0
	jmp	.L11
.L12:
	lea	rax, -2800[rbp]
	mov	rdi, rax
	call	read_int
	and	eax, 8191
	mov	DWORD PTR -2856[rbp], eax
	cmp	DWORD PTR -2856[rbp], 4096
	setg	al
	mov	BYTE PTR -2874[rbp], al
	add	DWORD PTR -2868[rbp], 1
.L11:
	movzx	eax, BYTE PTR -2874[rbp]
	cmp	al, BYTE PTR -2873[rbp]
	je	.L12
	movzx	eax, BYTE PTR -2874[rbp]
	mov	BYTE PTR -2873[rbp], al
	lea	rax, -2032[rbp]
	mov	rdi, rax
	call	read_int
	mov	DWORD PTR -2852[rbp], eax
	mov	eax, DWORD PTR -2852[rbp]
	and	eax, 65535
	mov	DWORD PTR -2848[rbp], eax
	mov	eax, DWORD PTR -2852[rbp]
	shr	eax, 16
	mov	DWORD PTR -2844[rbp], eax
	cmp	DWORD PTR -2844[rbp], 0
	je	.L19
	lea	rax, -1776[rbp]
	mov	rdi, rax
	call	read_int
	mov	DWORD PTR -2840[rbp], eax
	cmp	BYTE PTR -2874[rbp], 0
	je	.L14
	lea	rax, -2544[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -2832[rbp], rax
	jmp	.L15
.L14:
	lea	rax, -2288[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -2832[rbp], rax
.L15:
	mov	DWORD PTR -2872[rbp], 0
	jmp	.L16
.L18:
	mov	eax, DWORD PTR -2868[rbp]
	sal	eax, 16
	mov	edx, eax
	mov	eax, DWORD PTR -2872[rbp]
	add	edx, eax
	lea	rax, -1520[rbp]
	mov	DWORD PTR [rax], edx
	lea	rax, -1520[rbp]
	add	rax, 4
	mov	edx, DWORD PTR -2852[rbp]
	mov	DWORD PTR [rax], edx
	lea	rax, -1520[rbp]
	add	rax, 8
	mov	edx, DWORD PTR -2840[rbp]
	mov	DWORD PTR [rax], edx
	lea	rax, -1520[rbp]
	add	rax, 12
	mov	rdx, QWORD PTR -2832[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1024
	mov	rdi, rax
	call	fread@PLT
	mov	ecx, DWORD PTR -2860[rbp]
	lea	rdx, -2816[rbp]
	lea	rsi, -1520[rbp]
	mov	eax, DWORD PTR -2864[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 1036
	mov	edi, eax
	call	sendto@PLT
	mov	DWORD PTR -2836[rbp], eax
	cmp	DWORD PTR -2836[rbp], 0
	jns	.L17
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	error@PLT
.L17:
	add	DWORD PTR -2872[rbp], 1
.L16:
	cmp	DWORD PTR -2872[rbp], 15
	jle	.L18
	mov	rax, QWORD PTR -2832[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L19
.L21:
	call	__stack_chk_fail@PLT
.L20:
	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	"854020.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_int, %function
read_int:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L4+4
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-16]
	sub	r0, fp, #20
	ldr	r3, [fp, #-16]
	mov	r2, #4
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, [fp, #-20]
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC1
	.word	.LC0
	.size	read_int, .-read_int
	.align	2
	.global	read_bram
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_bram, %function
read_bram:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r1, .L8
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-12]
	mov	r2, #1
	ldr	r0, [fp, #-20]
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.size	read_bram, .-read_bram
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/proc/%s/hw/ioreg/ppout0_addr\000"
	.align	2
.LC3:
	.ascii	"/proc/%s/hw/ioreg/ppout0_a\000"
	.align	2
.LC4:
	.ascii	"/proc/%s/hw/ioreg/ppout0_b\000"
	.align	2
.LC5:
	.ascii	"/proc/%s/hw/ioreg/ppout0_chan\000"
	.align	2
.LC6:
	.ascii	"/proc/%s/hw/ioreg/mcntr\000"
	.align	2
.LC7:
	.ascii	"ERROR opening socket\000"
	.align	2
.LC8:
	.ascii	"192.168.1.1\000"
	.align	2
.LC9:
	.ascii	"Unknown host\000"
	.align	2
.LC10:
	.ascii	"12345\000"
	.align	2
.LC11:
	.ascii	"ERROR sending\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2864
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2864
	sub	sp, sp, #8
	str	r0, [fp, #-2864]
	str	r1, [fp, #-2868]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2864]
	cmp	r3, #1
	bgt	.L11
	mvn	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	b	.L25
.L11:
	ldr	r3, [fp, #-2868]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #2784
	sub	r3, r3, #4
	ldr	r1, .L26+4
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-2868]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #2528
	sub	r3, r3, #4
	ldr	r1, .L26+8
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-2868]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #2272
	sub	r3, r3, #4
	ldr	r1, .L26+12
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-2868]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #2016
	sub	r3, r3, #4
	ldr	r1, .L26+16
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-2868]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1760
	sub	r3, r3, #4
	ldr	r1, .L26+20
	mov	r0, r3
	bl	sprintf
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-2840]
	ldr	r3, [fp, #-2840]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L26+24
	bl	error
.L13:
	sub	r3, fp, #4
	sub	r3, r3, #2800
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L26+28
	bl	gethostbyname
	str	r0, [fp, #-2836]
	ldr	r3, [fp, #-2836]
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L26+32
	bl	error
.L14:
	ldr	r3, [fp, #-2836]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-2836]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #2800
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r0, .L26+36
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #2800
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #16
	str	r3, [fp, #-2832]
	sub	r3, fp, #2784
	sub	r3, r3, #4
	mov	r0, r3
	bl	read_int
	mov	r3, r0
	lsl	r3, r3, #19
	lsr	r3, r3, #19
	str	r3, [fp, #-2828]
	ldr	r3, [fp, #-2828]
	cmp	r3, #4096
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
	strb	r3, [fp, #-2853]
	ldrb	r3, [fp, #-2853]
	strb	r3, [fp, #-2854]
.L23:
	mov	r3, #0
	str	r3, [fp, #-2848]
	b	.L15
.L16:
	sub	r3, fp, #2784
	sub	r3, r3, #4
	mov	r0, r3
	bl	read_int
	mov	r3, r0
	lsl	r3, r3, #19
	lsr	r3, r3, #19
	str	r3, [fp, #-2828]
	ldr	r3, [fp, #-2828]
	cmp	r3, #4096
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
	strb	r3, [fp, #-2854]
	ldr	r3, [fp, #-2848]
	add	r3, r3, #1
	str	r3, [fp, #-2848]
.L15:
	ldrb	r2, [fp, #-2854]	@ zero_extendqisi2
	ldrb	r3, [fp, #-2853]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L16
	ldrb	r3, [fp, #-2854]
	strb	r3, [fp, #-2853]
	sub	r3, fp, #2016
	sub	r3, r3, #4
	mov	r0, r3
	bl	read_int
	str	r0, [fp, #-2824]
	ldr	r3, [fp, #-2824]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [fp, #-2820]
	ldr	r3, [fp, #-2824]
	lsr	r3, r3, #16
	str	r3, [fp, #-2816]
	ldr	r3, [fp, #-2816]
	cmp	r3, #0
	beq	.L23
	sub	r3, fp, #1760
	sub	r3, r3, #4
	mov	r0, r3
	bl	read_int
	str	r0, [fp, #-2812]
	ldrb	r3, [fp, #-2854]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L18
	sub	r3, fp, #2528
	sub	r3, r3, #4
	ldr	r1, .L26+40
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-2844]
	b	.L19
.L18:
	sub	r3, fp, #2272
	sub	r3, r3, #4
	ldr	r1, .L26+40
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-2844]
.L19:
	mov	r3, #0
	str	r3, [fp, #-2852]
	b	.L20
.L22:
	ldr	r3, [fp, #-2848]
	lsl	r2, r3, #16
	ldr	r3, [fp, #-2852]
	add	r2, r2, r3
	sub	r3, fp, #1504
	sub	r3, r3, #4
	str	r2, [r3]
	sub	r3, fp, #1504
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r2, [fp, #-2824]
	str	r2, [r3]
	sub	r3, fp, #1504
	sub	r3, r3, #4
	add	r3, r3, #8
	ldr	r2, [fp, #-2812]
	str	r2, [r3]
	sub	r0, fp, #1504
	sub	r0, r0, #4
	add	r0, r0, #12
	ldr	r3, [fp, #-2844]
	mov	r2, #1
	mov	r1, #1024
	bl	fread
	sub	r1, fp, #1504
	sub	r1, r1, #4
	ldr	r3, [fp, #-2832]
	str	r3, [sp, #4]
	sub	r3, fp, #2800
	sub	r3, r3, #4
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, .L26+44
	ldr	r0, [fp, #-2840]
	bl	sendto
	str	r0, [fp, #-2808]
	ldr	r3, [fp, #-2808]
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L26+48
	bl	error
.L21:
	ldr	r3, [fp, #-2852]
	add	r3, r3, #1
	str	r3, [fp, #-2852]
.L20:
	ldr	r3, [fp, #-2852]
	cmp	r3, #15
	ble	.L22
	ldr	r0, [fp, #-2844]
	bl	fclose
	b	.L23
.L25:
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC12
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC0
	.word	1036
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
