	.file	"449676.c"
	.intel_syntax noprefix
	.text
	.local	debug
	.comm	debug,4,4
	.section	.rodata
.LC0:
	.string	"idle"
.LC1:
	.string	"w"
.LC2:
	.string	".link-stats"
.LC3:
	.string	"%ld %ld %ld %ld\n"
.LC4:
	.string	"link-stats"
.LC5:
	.string	"stats updated"
	.text
	.type	idle, @function
idle:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, DWORD PTR debug[rip]
	test	eax, eax
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	je	.L6
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 40[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r9, rdi
	mov	r8, rsi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rsi, .LC4[rip]
	lea	rdi, .LC2[rip]
	call	rename@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L1
.L6:
	nop
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	idle, .-idle
	.section	.rodata
.LC6:
	.string	"write"
	.text
	.type	forward, @function
forward:
.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, 2096
	mov	DWORD PTR -2084[rbp], edi
	mov	DWORD PTR -2088[rbp], esi
	mov	QWORD PTR -2096[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2084[rbp]
	mov	edx, 2048
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -2080[rbp], rax
	mov	rdx, QWORD PTR -2080[rbp]
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2088[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -2072[rbp], rax
	cmp	QWORD PTR -2072[rbp], 0
	jns	.L9
	lea	rdi, .LC6[rip]
	call	perror@PLT
.L9:
	mov	rax, QWORD PTR -2072[rbp]
	cmp	rax, QWORD PTR -2080[rbp]
	jge	.L10
	lea	rdi, .LC6[rip]
	call	perror@PLT
.L10:
	mov	rax, QWORD PTR -2096[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -2096[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -2096[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -2080[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -2096[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -2072[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	forward, .-forward
	.section	.rodata
.LC7:
	.string	"select"
.LC8:
	.string	"tap->sock %zd octets\n"
.LC9:
	.string	"sock->tap %zd octets\n"
	.text
	.type	loop, @function
loop:
.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, 272
	mov	DWORD PTR -260[rbp], edi
	mov	DWORD PTR -264[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -208[rbp]
	mov	edx, 56
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
.L18:
	mov	QWORD PTR -224[rbp], 5
	mov	QWORD PTR -216[rbp], 0
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 113 "the_stack_data/449676.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -252[rbp], edx
	mov	DWORD PTR -248[rbp], eax
	mov	eax, DWORD PTR -264[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -264[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -260[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	lea	rdx, -224[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 32
	call	select@PLT
	mov	DWORD PTR -244[rbp], eax
	cmp	DWORD PTR -244[rbp], -1
	jne	.L14
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L15
.L14:
	cmp	DWORD PTR -244[rbp], 0
	jne	.L16
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	idle
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -260[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -260[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L17
	lea	rax, -208[rbp]
	lea	rdx, 32[rax]
	mov	ecx, DWORD PTR -264[rbp]
	mov	eax, DWORD PTR -260[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	forward
	mov	QWORD PTR -240[rbp], rax
	mov	eax, DWORD PTR -208[rbp]
	add	eax, 1
	mov	DWORD PTR -208[rbp], eax
	mov	eax, DWORD PTR debug[rip]
	test	eax, eax
	je	.L17
	mov	rax, QWORD PTR -240[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	eax, DWORD PTR -264[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -264[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L18
	lea	rax, -208[rbp]
	lea	rdx, 8[rax]
	mov	ecx, DWORD PTR -260[rbp]
	mov	eax, DWORD PTR -264[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	forward
	mov	QWORD PTR -232[rbp], rax
	mov	eax, DWORD PTR -208[rbp]
	add	eax, 1
	mov	DWORD PTR -208[rbp], eax
	mov	eax, DWORD PTR debug[rip]
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR -232[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	jmp	.L18
	.cfi_endproc
.LFE8:
	.size	loop, .-loop
	.section	.rodata
.LC10:
	.string	"/dev/net/tun"
.LC11:
	.string	"open tunnel driver"
.LC12:
	.string	"%s%s"
.LC13:
	.string	"create tap device"
	.text
	.type	tap_open, @function
tap_open:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 2
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jns	.L21
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L21:
	lea	rax, -48[rbp]
	mov	edx, 40
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 4098
	mov	rcx, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -48[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	lea	rdx, .LC12[rip]
	mov	esi, 16
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 1074025674
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L22
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L22:
	mov	eax, DWORD PTR -52[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	tap_open, .-tap_open
	.section	.rodata
.LC14:
	.string	"usage: %s <interface-number>\n"
.LC15:
	.string	"host"
.LC16:
	.string	"switch"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 1
	jg	.L26
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, -1
	call	exit@PLT
.L26:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	call	tap_open
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	call	tap_open
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	loop
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"449676.c"
	.text
	.local	debug
	.comm	debug,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"idle\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.align	2
.LC2:
	.ascii	".link-stats\000"
	.align	2
.LC3:
	.ascii	"%ld %ld %ld %ld\012\000"
	.align	2
.LC4:
	.ascii	"link-stats\000"
	.align	2
.LC5:
	.ascii	"stats updated\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	idle, %function
idle:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	ldr	r3, .L8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L8+4
	bl	puts
.L2:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	beq	.L6
	ldr	r1, .L8+8
	ldr	r0, .L8+12
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	r0, [r3, #24]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #12]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r0
	mov	r2, r1
	ldr	r1, .L8+16
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r0, [fp, #-8]
	bl	fclose
	ldr	r1, .L8+20
	ldr	r0, .L8+12
	bl	rename
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r0, .L8+24
	bl	puts
	b	.L1
.L6:
	nop
	b	.L1
.L7:
	nop
.L1:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	debug
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	idle, .-idle
	.section	.rodata
	.align	2
.LC6:
	.ascii	"write\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	forward, %function
forward:
	@ args = 0, pretend = 0, frame = 2080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2080
	str	r0, [fp, #-2072]
	str	r1, [fp, #-2076]
	str	r2, [fp, #-2080]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #2048
	mov	r1, r3
	ldr	r0, [fp, #-2072]
	bl	read
	str	r0, [fp, #-2064]
	ldr	r2, [fp, #-2064]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2076]
	bl	write
	str	r0, [fp, #-2060]
	ldr	r3, [fp, #-2060]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L15+4
	bl	perror
.L11:
	ldr	r2, [fp, #-2060]
	ldr	r3, [fp, #-2064]
	cmp	r2, r3
	bge	.L12
	ldr	r0, .L15+4
	bl	perror
.L12:
	ldr	r3, [fp, #-2080]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-2080]
	str	r2, [r3]
	ldr	r3, [fp, #-2080]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-2064]
	add	r2, r2, r3
	ldr	r3, [fp, #-2080]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-2060]
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	.LC6
	.size	forward, .-forward
	.section	.rodata
	.align	2
.LC8:
	.ascii	"select\000"
	.align	2
.LC9:
	.ascii	"tap->sock %zd octets\012\000"
	.align	2
.LC10:
	.ascii	"sock->tap %zd octets\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	loop, %function
loop:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #208
	str	r0, [fp, #-200]
	str	r1, [fp, #-204]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #168
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
.L24:
	mov	r3, #5
	str	r3, [fp, #-176]
	mov	r3, #0
	str	r3, [fp, #-172]
	sub	r3, fp, #136
	str	r3, [fp, #-192]
	mov	r3, #0
	str	r3, [fp, #-196]
	b	.L18
.L19:
	ldr	r3, [fp, #-192]
	ldr	r2, [fp, #-196]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-196]
	add	r3, r3, #1
	str	r3, [fp, #-196]
.L18:
	ldr	r3, [fp, #-196]
	cmp	r3, #31
	bls	.L19
	ldr	r3, [fp, #-204]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, [fp, #-204]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
	ldr	r3, [fp, #-200]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, [fp, #-200]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
	sub	r1, fp, #136
	sub	r3, fp, #176
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r0, #32
	bl	select
	str	r0, [fp, #-188]
	ldr	r3, [fp, #-188]
	cmn	r3, #1
	bne	.L20
	ldr	r0, .L26+4
	bl	perror
	b	.L21
.L20:
	ldr	r3, [fp, #-188]
	cmp	r3, #0
	bne	.L22
	sub	r3, fp, #168
	mov	r0, r3
	bl	idle
	b	.L21
.L22:
	ldr	r3, [fp, #-200]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, [fp, #-200]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L23
	sub	r3, fp, #168
	add	r3, r3, #20
	mov	r2, r3
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-200]
	bl	forward
	str	r0, [fp, #-184]
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
	ldr	r3, .L26+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
	ldr	r1, [fp, #-184]
	ldr	r0, .L26+12
	bl	printf
.L23:
	ldr	r3, [fp, #-204]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, [fp, #-204]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L24
	sub	r3, fp, #168
	add	r3, r3, #8
	mov	r2, r3
	ldr	r1, [fp, #-200]
	ldr	r0, [fp, #-204]
	bl	forward
	str	r0, [fp, #-180]
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
	ldr	r3, .L26+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L24
	ldr	r1, [fp, #-180]
	ldr	r0, .L26+16
	bl	printf
.L21:
	b	.L24
.L27:
	.align	2
.L26:
	.word	.LC11
	.word	.LC8
	.word	debug
	.word	.LC9
	.word	.LC10
	.size	loop, .-loop
	.section	.rodata
	.align	2
.LC12:
	.ascii	"/dev/net/tun\000"
	.align	2
.LC13:
	.ascii	"open tunnel driver\000"
	.align	2
.LC14:
	.ascii	"%s%s\000"
	.align	2
.LC15:
	.ascii	"create tap device\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tap_open, %function
tap_open:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #2
	ldr	r0, .L33+4
	bl	open
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L29
	ldr	r0, .L33+8
	bl	perror
	mvn	r0, #0
	bl	exit
.L29:
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L33+12
	strh	r3, [fp, #-24]	@ movhi
	sub	r0, fp, #40
	ldr	r3, [fp, #-52]
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, .L33+16
	mov	r1, #16
	bl	snprintf
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L33+20
	ldr	r0, [fp, #-44]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L30
	ldr	r0, .L33+24
	bl	perror
	mvn	r0, #0
	bl	exit
.L30:
	ldr	r3, [fp, #-44]
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC16
	.word	.LC12
	.word	.LC13
	.word	4098
	.word	.LC14
	.word	1074025674
	.word	.LC15
	.size	tap_open, .-tap_open
	.section	.rodata
	.align	2
.LC17:
	.ascii	"usage: %s <interface-number>\012\000"
	.align	2
.LC18:
	.ascii	"host\000"
	.align	2
.LC19:
	.ascii	"switch\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L36
	ldr	r3, .L38
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L38+4
	bl	fprintf
	mvn	r0, #0
	bl	exit
.L36:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L38+8
	bl	tap_open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L38+12
	bl	tap_open
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	loop
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	stderr
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
