	.file	"357661.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"bind"
	.text
	.globl	ifup_start_listening
	.type	ifup_start_listening, @function
ifup_start_listening:
.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	DWORD PTR -36[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -20[rbp]
	mov	edx, 12
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -20[rbp], 16
	mov	DWORD PTR -12[rbp], 257
	lea	rax, -20[rbp]
	mov	rcx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 12
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L4
.L2:
	mov	eax, 1
.L4:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ifup_start_listening, .-ifup_start_listening
	.globl	ifup_scan_event
	.type	ifup_scan_event, @function
ifup_scan_event:
.LFB7:
	.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	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	jmp	.L7
.L14:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, WORD PTR 4[rax]
	movzx	eax, ax
	cmp	eax, 20
	je	.L8
	cmp	eax, 20
	jg	.L9
	cmp	eax, 16
	je	.L10
	cmp	eax, 16
	jg	.L9
	cmp	eax, 2
	je	.L15
	cmp	eax, 3
	jne	.L9
	jmp	.L6
.L10:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	and	eax, 64
	test	eax, eax
	je	.L16
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	or	eax, 1
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L16
.L8:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	or	eax, 2
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L9
.L16:
	nop
.L9:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	add	eax, 3
	and	eax, -4
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	add	eax, 3
	mov	eax, eax
	and	eax, 4294967292
	add	QWORD PTR -24[rbp], rax
.L7:
	cmp	DWORD PTR -28[rbp], 15
	jle	.L6
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 15
	jbe	.L6
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cmp	edx, eax
	jbe	.L14
	jmp	.L6
.L15:
	nop
.L6:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ifup_scan_event, .-ifup_scan_event
	.section	.rodata
.LC1:
	.string	"poll"
.LC2:
	.string	"recvmsg"
	.text
	.globl	ifup_read_event
	.type	ifup_read_event, @function
ifup_read_event:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 144
	mov	DWORD PTR -4228[rbp], edi
	mov	QWORD PTR -4240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4112[rbp]
	mov	QWORD PTR -4192[rbp], rax
	mov	QWORD PTR -4184[rbp], 4096
	mov	eax, DWORD PTR -4228[rbp]
	mov	DWORD PTR -4200[rbp], eax
	mov	WORD PTR -4196[rbp], 1
.L19:
	lea	rax, -4200[rbp]
	mov	edx, -1
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	cdqe
	mov	QWORD PTR -4208[rbp], rax
	cmp	QWORD PTR -4208[rbp], -1
	jne	.L18
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L19
.L18:
	mov	rax, QWORD PTR -4208[rbp]
	test	rax, rax
	jns	.L20
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L24
.L20:
	lea	rax, -4176[rbp]
	mov	edx, 56
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -4192[rbp]
	mov	QWORD PTR -4160[rbp], rax
	mov	QWORD PTR -4152[rbp], 1
	lea	rcx, -4176[rbp]
	mov	eax, DWORD PTR -4228[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	recvmsg@PLT
	mov	DWORD PTR -4212[rbp], eax
	cmp	DWORD PTR -4212[rbp], 0
	jns	.L22
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L24
.L22:
	cmp	QWORD PTR -4240[rbp], 0
	je	.L23
	mov	rdx, QWORD PTR -4240[rbp]
	mov	ecx, DWORD PTR -4212[rbp]
	lea	rax, -4112[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	ifup_scan_event
.L23:
	mov	eax, 1
.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
.LFE8:
	.size	ifup_read_event, .-ifup_read_event
	.section	.rodata
.LC3:
	.string	"socket"
.LC4:
	.string	"ioctl"
	.align 8
.LC5:
	.string	"netkeyscript: waiting for eth0 to be running with an address assigned\n"
	.align 8
.LC6:
	.string	"netkeyscript: eth0 still not running but continuing anyway\n"
	.text
	.globl	ifup
	.type	ifup, @function
ifup:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -60[rbp], 0
	mov	edx, 0
	mov	esi, 2
	mov	edi, 10
	call	socket@PLT
	mov	DWORD PTR -56[rbp], eax
	cmp	DWORD PTR -56[rbp], 0
	jns	.L27
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L37
.L27:
	mov	edx, 0
	mov	esi, 3
	mov	edi, 16
	call	socket@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jns	.L29
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L37
.L29:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	ifup_start_listening
	test	eax, eax
	jne	.L30
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L37
.L30:
	lea	rax, -48[rbp]
	mov	edx, 40
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -48[rbp]
	mov	DWORD PTR [rax], 812151909
	mov	BYTE PTR 4[rax], 0
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, 35091
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L31
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L37
.L31:
	movzx	eax, WORD PTR -32[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	jne	.L32
	movzx	eax, WORD PTR -32[rbp]
	or	eax, 1
	mov	WORD PTR -32[rbp], ax
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, 35092
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L32
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L37
.L32:
	movzx	eax, WORD PTR -32[rbp]
	cwde
	and	eax, 64
	test	eax, eax
	jne	.L33
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 70
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	jmp	.L34
.L35:
	lea	rdx, -60[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ifup_read_event
	test	eax, eax
	jne	.L34
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L37
.L34:
	mov	eax, DWORD PTR -60[rbp]
	and	eax, 3
	cmp	eax, 3
	jne	.L35
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, 35091
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L36
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L37
.L36:
	movzx	eax, WORD PTR -32[rbp]
	cwde
	and	eax, 64
	test	eax, eax
	jne	.L33
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 59
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
.L33:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 1
.L37:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ifup, .-ifup
	.globl	ifdown
	.type	ifdown, @function
ifdown:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 2
	mov	edi, 10
	call	socket@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jns	.L40
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L44
.L40:
	lea	rax, -48[rbp]
	mov	edx, 40
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -48[rbp]
	mov	DWORD PTR [rax], 812151909
	mov	BYTE PTR 4[rax], 0
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 35091
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L42
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L44
.L42:
	movzx	eax, WORD PTR -32[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L43
	movzx	eax, WORD PTR -32[rbp]
	and	eax, -2
	mov	WORD PTR -32[rbp], ax
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 35092
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L43
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L44
.L43:
	mov	eax, 1
.L44:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L45
	call	__stack_chk_fail@PLT
.L45:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	ifdown, .-ifdown
	.section	.rodata
.LC7:
	.string	"ff02::1"
.LC8:
	.string	"inet_pton"
.LC9:
	.string	"sendto"
	.text
	.globl	send_command
	.type	send_command, @function
send_command:
.LFB11:
	.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	DWORD PTR -68[rbp], edi
	mov	eax, esi
	mov	BYTE PTR -72[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	mov	edx, 28
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -48[rbp], 10
	lea	rax, -48[rbp]
	add	rax, 8
	mov	rdx, rax
	lea	rsi, .LC7[rip]
	mov	edi, 10
	call	inet_pton@PLT
	test	eax, eax
	jne	.L47
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L50
.L47:
	mov	edi, 30621
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	lea	rax, -48[rbp]
	mov	rdx, rax
	lea	rsi, -72[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	r9d, 28
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	sendto@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jns	.L49
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L50
.L49:
	mov	eax, 1
.L50:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	send_command, .-send_command
	.section	.rodata
.LC10:
	.string	"select"
.LC11:
	.string	"recv"
	.text
	.globl	read_passphrase
	.type	read_passphrase, @function
read_passphrase:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	QWORD PTR -200[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L58:
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 7
	call	fputc@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	esi, 1
	mov	edi, eax
	call	send_command
	test	eax, eax
	jne	.L53
	mov	rax, -1
	jmp	.L59
.L53:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 242 "the_stack_data/357661.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -176[rbp], edx
	mov	DWORD PTR -172[rbp], eax
	mov	eax, DWORD PTR -180[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 -180[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	QWORD PTR -160[rbp], 10
	mov	QWORD PTR -152[rbp], 0
	mov	eax, DWORD PTR -180[rbp]
	lea	edi, 1[rax]
	lea	rdx, -160[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	cdqe
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jns	.L55
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L55
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	rax, -1
	jmp	.L59
.L55:
	cmp	QWORD PTR -168[rbp], 0
	jle	.L58
	mov	rdx, QWORD PTR -200[rbp]
	mov	rsi, QWORD PTR -192[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jns	.L57
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	rax, -1
	jmp	.L59
.L57:
	cmp	QWORD PTR -200[rbp], 0
	jle	.L58
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L58
	mov	eax, DWORD PTR -180[rbp]
	mov	esi, 2
	mov	edi, eax
	call	send_command
	mov	rax, QWORD PTR -168[rbp]
.L59:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	read_passphrase, .-read_passphrase
	.section	.rodata
.LC12:
	.string	"setsockopt"
	.align 8
.LC13:
	.string	"netkeyscript: waiting for passphrase\n"
.LC14:
	.string	"fwrite: error\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2160
	mov	DWORD PTR -2148[rbp], edi
	mov	QWORD PTR -2160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2144[rbp], 0
	call	ifup
	test	eax, eax
	jne	.L62
	mov	eax, 1
	jmp	.L71
.L62:
	mov	edx, 0
	mov	esi, 2
	mov	edi, 10
	call	socket@PLT
	mov	DWORD PTR -2140[rbp], eax
	cmp	DWORD PTR -2140[rbp], 0
	jns	.L64
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L71
.L64:
	lea	rax, -2096[rbp]
	mov	edx, 28
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -2096[rbp], 10
	mov	rax, QWORD PTR in6addr_any[rip]
	mov	rdx, QWORD PTR in6addr_any[rip+8]
	mov	QWORD PTR -2088[rbp], rax
	mov	QWORD PTR -2080[rbp], rdx
	mov	edi, 30621
	call	htons@PLT
	mov	WORD PTR -2094[rbp], ax
	lea	rax, -2096[rbp]
	mov	rcx, rax
	mov	eax, DWORD PTR -2140[rbp]
	mov	edx, 28
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L65
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L71
.L65:
	lea	rax, -2128[rbp]
	mov	edx, 20
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -2128[rbp]
	mov	rdx, rax
	lea	rsi, .LC7[rip]
	mov	edi, 10
	call	inet_pton@PLT
	test	eax, eax
	jne	.L66
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L71
.L66:
	lea	rdx, -2128[rbp]
	mov	eax, DWORD PTR -2140[rbp]
	mov	r8d, 20
	mov	rcx, rdx
	mov	edx, 20
	mov	esi, 41
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L67
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L71
.L67:
	lea	rdx, -2144[rbp]
	mov	eax, DWORD PTR -2140[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 19
	mov	esi, 41
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	je	.L68
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L71
.L68:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2140[rbp]
	mov	edx, 2048
	mov	rsi, rcx
	mov	edi, eax
	call	read_passphrase
	mov	QWORD PTR -2136[rbp], rax
	cmp	QWORD PTR -2136[rbp], 0
	jns	.L69
	mov	eax, 1
	jmp	.L71
.L69:
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -2136[rbp]
	sub	rax, 1
	mov	rsi, rax
	lea	rax, -2064[rbp]
	add	rax, 1
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	test	rax, rax
	jne	.L70
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L71
.L70:
	call	ifdown
	mov	eax, 0
.L71:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L72
	call	__stack_chk_fail@PLT
.L72:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	"357661.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"bind\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ifup_start_listening
	.syntax unified
	.arm
	.fpu softvfp
	.type	ifup_start_listening, %function
ifup_start_listening:
	@ 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, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #20
	mov	r2, #12
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #16
	strh	r3, [fp, #-20]	@ movhi
	ldr	r3, .L6+4
	str	r3, [fp, #-12]
	sub	r3, fp, #20
	mov	r2, #12
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L6+8
	bl	perror
	mov	r3, #0
	b	.L4
.L2:
	mov	r3, #1
.L4:
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	257
	.word	.LC0
	.size	ifup_start_listening, .-ifup_start_listening
	.align	2
	.global	ifup_scan_event
	.syntax unified
	.arm
	.fpu softvfp
	.type	ifup_scan_event, %function
ifup_scan_event:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	b	.L9
.L18:
	ldr	r3, [fp, #-16]
	ldrh	r3, [r3, #4]
	sub	r3, r3, #2
	cmp	r3, #18
	ldrls	pc, [pc, r3, asl #2]
	b	.L10
.L12:
	.word	.L19
	.word	.L19
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L13
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L11
.L13:
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	and	r3, r3, #64
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	orr	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	b	.L20
.L11:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	orr	r2, r3, #2
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	b	.L10
.L20:
	nop
.L10:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #3
	bic	r3, r3, #3
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #3
	bic	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-20]
	cmp	r3, #15
	ble	.L8
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #15
	bls	.L8
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bls	.L18
	b	.L8
.L19:
	nop
.L8:
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ifup_scan_event, .-ifup_scan_event
	.section	.rodata
	.align	2
.LC2:
	.ascii	"poll\000"
	.align	2
.LC3:
	.ascii	"recvmsg\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ifup_read_event
	.syntax unified
	.arm
	.fpu softvfp
	.type	ifup_read_event, %function
ifup_read_event:
	@ args = 0, pretend = 0, frame = 4160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4160
	sub	sp, sp, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-60]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-64]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	str	r3, [r2, #-40]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #4096
	str	r3, [r2, #-36]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-60]
	str	r3, [r2, #-48]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #1
	strh	r2, [r3, #-44]	@ movhi
.L23:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #48
	mvn	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [r4, #-56]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	cmn	r3, #1
	bne	.L22
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L23
.L22:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	cmp	r3, #0
	bge	.L24
	ldr	r0, .L30+4
	bl	perror
	mov	r3, #0
	b	.L28
.L24:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #32
	mov	r2, #28
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #40
	str	r3, [r2, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #32
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [r0, #-60]
	bl	recvmsg
	str	r0, [r4, #-52]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-52]
	cmp	r3, #0
	bge	.L26
	ldr	r0, .L30+8
	bl	perror
	mov	r3, #0
	b	.L28
.L26:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #0
	beq	.L27
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-64]
	ldr	r1, [r1, #-52]
	mov	r0, r3
	bl	ifup_scan_event
.L27:
	mov	r3, #1
.L28:
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.size	ifup_read_event, .-ifup_read_event
	.section	.rodata
	.align	2
.LC5:
	.ascii	"socket\000"
	.align	2
.LC6:
	.ascii	"eth0\000"
	.align	2
.LC7:
	.ascii	"ioctl\000"
	.align	2
.LC8:
	.ascii	"netkeyscript: waiting for eth0 to be running with a"
	.ascii	"n address assigned\012\000"
	.align	2
.LC9:
	.ascii	"netkeyscript: eth0 still not running but continuing"
	.ascii	" anyway\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ifup
	.syntax unified
	.arm
	.fpu softvfp
	.type	ifup, %function
ifup:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r2, #0
	mov	r1, #2
	mov	r0, #10
	bl	socket
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L33
	ldr	r0, .L45+4
	bl	perror
	mov	r3, #0
	b	.L43
.L33:
	mov	r2, #0
	mov	r1, #3
	mov	r0, #16
	bl	socket
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L35
	ldr	r0, .L45+4
	bl	perror
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	b	.L43
.L35:
	ldr	r0, [fp, #-44]
	bl	ifup_start_listening
	mov	r3, r0
	cmp	r3, #0
	bne	.L36
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	b	.L43
.L36:
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #40
	ldr	r2, .L45+8
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L45+12
	ldr	r0, [fp, #-48]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L37
	ldr	r0, .L45+16
	bl	perror
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	b	.L43
.L37:
	ldrsh	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L38
	ldrsh	r3, [fp, #-24]
	orr	r3, r3, #1
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-24]	@ movhi
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L45+20
	ldr	r0, [fp, #-48]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L38
	ldr	r0, .L45+16
	bl	perror
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	b	.L43
.L38:
	ldrsh	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #64
	cmp	r3, #0
	bne	.L39
	ldr	r3, .L45+24
	ldr	r3, [r3]
	mov	r2, #70
	mov	r1, #1
	ldr	r0, .L45+28
	bl	fwrite
	b	.L40
.L41:
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	ifup_read_event
	mov	r3, r0
	cmp	r3, #0
	bne	.L40
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	b	.L43
.L40:
	ldr	r3, [fp, #-52]
	and	r3, r3, #3
	cmp	r3, #3
	bne	.L41
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L45+12
	ldr	r0, [fp, #-48]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L42
	ldr	r0, .L45+16
	bl	perror
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #0
	b	.L43
.L42:
	ldrsh	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #64
	cmp	r3, #0
	bne	.L39
	ldr	r3, .L45+24
	ldr	r3, [r3]
	mov	r2, #59
	mov	r1, #1
	ldr	r0, .L45+32
	bl	fwrite
.L39:
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-48]
	bl	close
	mov	r3, #1
.L43:
	ldr	r2, .L45
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L44
	bl	__stack_chk_fail
.L44:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC10
	.word	.LC5
	.word	.LC6
	.word	35091
	.word	.LC7
	.word	35092
	.word	stderr
	.word	.LC8
	.word	.LC9
	.size	ifup, .-ifup
	.section	.rodata
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ifdown
	.syntax unified
	.arm
	.fpu softvfp
	.type	ifdown, %function
ifdown:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L54
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #2
	mov	r0, #10
	bl	socket
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L48
	ldr	r0, .L54+4
	bl	perror
	mov	r3, #0
	b	.L52
.L48:
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #40
	ldr	r2, .L54+8
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L54+12
	ldr	r0, [fp, #-44]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L50
	ldr	r0, .L54+16
	bl	perror
	ldr	r0, [fp, #-44]
	bl	close
	mov	r3, #0
	b	.L52
.L50:
	ldrsh	r3, [fp, #-24]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L51
	ldrsh	r3, [fp, #-24]
	bic	r3, r3, #1
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-24]	@ movhi
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L54+20
	ldr	r0, [fp, #-44]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L51
	ldr	r0, .L54+16
	bl	perror
	ldr	r0, [fp, #-44]
	bl	close
	mov	r3, #0
	b	.L52
.L51:
	mov	r3, #1
.L52:
	ldr	r2, .L54
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L53
	bl	__stack_chk_fail
.L53:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC11
	.word	.LC5
	.word	.LC6
	.word	35091
	.word	.LC7
	.word	35092
	.size	ifdown, .-ifdown
	.section	.rodata
	.align	2
.LC12:
	.ascii	"ff02::1\000"
	.align	2
.LC13:
	.ascii	"inet_pton\000"
	.align	2
.LC14:
	.ascii	"sendto\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	send_command
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_command, %function
send_command:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-49]
	ldr	r3, .L62
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #36
	mov	r2, #28
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #10
	strh	r3, [fp, #-36]	@ movhi
	sub	r3, fp, #36
	add	r3, r3, #8
	mov	r2, r3
	ldr	r1, .L62+4
	mov	r0, #10
	bl	inet_pton
	mov	r3, r0
	cmp	r3, #0
	bne	.L57
	ldr	r0, .L62+8
	bl	perror
	mov	r3, #0
	b	.L60
.L57:
	ldr	r0, .L62+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-34]	@ movhi
	sub	r3, fp, #36
	mov	r2, r3
	sub	r1, fp, #49
	mov	r3, #28
	str	r3, [sp, #4]
	str	r2, [sp]
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [fp, #-48]
	bl	sendto
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L59
	ldr	r0, .L62+16
	bl	perror
	mov	r3, #0
	b	.L60
.L59:
	mov	r3, #1
.L60:
	ldr	r2, .L62
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L61
	bl	__stack_chk_fail
.L61:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L63:
	.align	2
.L62:
	.word	.LC15
	.word	.LC12
	.word	.LC13
	.word	30621
	.word	.LC14
	.size	send_command, .-send_command
	.section	.rodata
	.align	2
.LC16:
	.ascii	"select\000"
	.align	2
.LC17:
	.ascii	"recv\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_passphrase
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_passphrase, %function
read_passphrase:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #176
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	str	r2, [fp, #-168]
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L72:
	ldr	r3, .L75+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #7
	bl	fputc
	mov	r1, #1
	ldr	r0, [fp, #-160]
	bl	send_command
	mov	r3, r0
	cmp	r3, #0
	bne	.L65
	mvn	r3, #0
	b	.L73
.L65:
	sub	r3, fp, #136
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L67
.L68:
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-156]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L67:
	ldr	r3, [fp, #-156]
	cmp	r3, #31
	bls	.L68
	ldr	r3, [fp, #-160]
	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, #-160]
	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]
	mov	r3, #10
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-160]
	add	r0, r3, #1
	sub	r1, fp, #136
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bge	.L69
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L69
	ldr	r0, .L75+8
	bl	perror
	mvn	r3, #0
	b	.L73
.L69:
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	ble	.L72
	ldr	r2, [fp, #-168]
	mov	r3, #0
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-160]
	bl	recv
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bge	.L71
	ldr	r0, .L75+12
	bl	perror
	mvn	r3, #0
	b	.L73
.L71:
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	ble	.L72
	ldr	r3, [fp, #-164]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L72
	mov	r1, #2
	ldr	r0, [fp, #-160]
	bl	send_command
	ldr	r3, [fp, #-148]
.L73:
	ldr	r2, .L75
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC18
	.word	stderr
	.word	.LC16
	.word	.LC17
	.size	read_passphrase, .-read_passphrase
	.section	.rodata
	.align	2
.LC19:
	.ascii	"setsockopt\000"
	.align	2
.LC20:
	.ascii	"netkeyscript: waiting for passphrase\012\000"
	.align	2
.LC21:
	.ascii	"fwrite: error\012\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2128
	str	r0, [fp, #-2120]
	str	r1, [fp, #-2124]
	ldr	r3, .L89
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2116]
	bl	ifup
	mov	r3, r0
	cmp	r3, #0
	bne	.L78
	mov	r3, #1
	b	.L87
.L78:
	mov	r2, #0
	mov	r1, #2
	mov	r0, #10
	bl	socket
	str	r0, [fp, #-2112]
	ldr	r3, [fp, #-2112]
	cmp	r3, #0
	bge	.L80
	ldr	r0, .L89+4
	bl	perror
	mov	r3, #1
	b	.L87
.L80:
	sub	r3, fp, #2080
	sub	r3, r3, #4
	mov	r2, #28
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #2080
	mov	r2, #10
	strh	r2, [r3]	@ movhi
	ldr	r3, .L89+8
	sub	ip, fp, #2064
	sub	ip, ip, #4
	sub	ip, ip, #8
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, .L89+12
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #2080
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #2080
	sub	r3, r3, #4
	mov	r2, #28
	mov	r1, r3
	ldr	r0, [fp, #-2112]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L81
	ldr	r0, .L89+16
	bl	perror
	mov	r3, #1
	b	.L87
.L81:
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L89+20
	mov	r0, #10
	bl	inet_pton
	mov	r3, r0
	cmp	r3, #0
	bne	.L82
	ldr	r0, .L89+24
	bl	perror
	mov	r3, #1
	b	.L87
.L82:
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #20
	str	r2, [sp]
	mov	r2, #20
	mov	r1, #41
	ldr	r0, [fp, #-2112]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L83
	ldr	r0, .L89+28
	bl	perror
	mov	r3, #1
	b	.L87
.L83:
	sub	r3, fp, #2112
	sub	r3, r3, #4
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #19
	mov	r1, #41
	ldr	r0, [fp, #-2112]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L84
	ldr	r0, .L89+28
	bl	perror
	mov	r3, #1
	b	.L87
.L84:
	ldr	r3, .L89+32
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L89+36
	bl	fwrite
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #2048
	mov	r1, r3
	ldr	r0, [fp, #-2112]
	bl	read_passphrase
	str	r0, [fp, #-2108]
	ldr	r3, [fp, #-2108]
	cmp	r3, #0
	bge	.L85
	mov	r3, #1
	b	.L87
.L85:
	sub	r0, fp, #2048
	sub	r0, r0, #4
	sub	r0, r0, #4
	add	r0, r0, #1
	ldr	r3, [fp, #-2108]
	sub	r3, r3, #1
	mov	r1, r3
	ldr	r3, .L89+40
	ldr	r3, [r3]
	mov	r2, #1
	bl	fwrite
	mov	r3, r0
	cmp	r3, #0
	bne	.L86
	ldr	r3, .L89+32
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L89+44
	bl	fwrite
	mov	r3, #1
	b	.L87
.L86:
	bl	ifdown
	mov	r3, #0
.L87:
	ldr	r2, .L89
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L88
	bl	__stack_chk_fail
.L88:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L90:
	.align	2
.L89:
	.word	.LC22
	.word	.LC5
	.word	in6addr_any
	.word	30621
	.word	.LC0
	.word	.LC12
	.word	.LC13
	.word	.LC19
	.word	stderr
	.word	.LC20
	.word	stdout
	.word	.LC21
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
