// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/dbeacon.cpp
// Function: process_param(param_tok const*, char const*)
static void process_param(const param_tok *tok, const char *arg) {
	switch (tok->name) {
	case NAME:
		beaconName = check_good_string("name", arg);
		break;
	case CONTACT:
		if (!strchr(arg, '@'))
			fatal("Not a valid email address.");

		adminContact = check_good_string("admin contact", arg);
		break;
	case INTERFACE:
		mcastInterface = if_nametoindex(arg);
		if (mcastInterface <= 0)
			fatal("Invalid interface name.");
		break;
	case BEACONADDR:
		probeAddrLiteral = arg;
		break;
	case SSMADDR:
		if (arg)
			probeSSMAddrLiteral = arg;
		useSSM = true;
		listenForSSM = true;
		break;
	case SSMSENDONLY:
		useSSM = true;
		listenForSSM = parse_bool("SSMSendOnly", arg, false);
		break;
	case BOOTSTRAP:
		add_bootstrap_address(arg);
		break;
	case ENABLESSMPING:
		useSSMPing = parse_bool("SSMPing", arg, true);
		break;
	case SOURCEADDR:
		parse_or_fail(&beaconUnicastAddr, arg, false, false);
		break;
	case DUMP:
		dumpFile = arg ? arg : defaultDumpFile;
		break;
	case DUMPINTERVAL:
		dumpInterval = parse_u32("Dump interval", arg);
		if (dumpInterval < 5)
			dumpInterval = 5;
		break;
	case DUMPEXEC:
		launchSomething = arg;
		break;
	case SPECWEBSITE:
		if (strncmp(arg, "lg$", 3) == 0) {
			webSites[T_WEBSITE_LG] =
				check_good_string("LG website", arg + 3);
		} else if (strncmp(arg, "matrix$", 7) == 0) {
			webSites[T_WEBSITE_MATRIX] =
				check_good_string("matrix url", arg + 7);
		} else {
			webSites[T_WEBSITE_GENERIC] =
				check_good_string("website", arg);
		}
		break;
	case SPECMATRIX:
		webSites[T_WEBSITE_MATRIX] =
			check_good_string("matrix url", arg);
		break;
	case SPECLG:
		webSites[T_WEBSITE_LG] =
			check_good_string("lg url", arg);
		break;
	case COUNTRY:
		if (strlen(arg) != 2)
			fatal("Bad country code.");
		twoLetterCC = check_good_string("country", arg);
		break;
	case SPECFLAG:
		if (!strcmp(arg, "ssmping")) {
			flags |= SSMPING_CAPABLE;
		} else {
			fprintf(stderr, "Unknown flag \"%s\"\n", arg);
		}
		break;
	case VERBOSE:
		if (arg)
			verbose = parse_u32("Verbose", arg);
		else
			verbose ++;
		break;
	case DUMPBW:
		dumpBwReport = parse_bool("DumpBandwidth", arg, true);
		break;
	case HELP:
		usage();
		break;
	case FORCEv4:
		forceFamily = AF_INET;
		break;
	case FORCEv6:
		forceFamily = AF_INET6;
		break;
	case SHOWVERSION:
		show_version();
		break;
	case DAEMON:
		daemonize = true;
		break;
	case PIDFILE:
		pidfile = check_good_string("pidfile", arg);
		break;
	case USE_SYSLOG:
		use_syslog = true;
		break;
	case CONFFILE:
		parse_config_file(arg);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl (%rdi), %eax
decl %eax
cmpl $0x1a, %eax
ja 0x6ed6
movq %rsi, %rbx
leaq 0x463a(%rip), %rcx      # 0xb0ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x501f(%rip), %rdi      # 0xbae1
movq %rbx, %rsi
callq 0x6f4f
leaq 0xb927(%rip), %rdi      # 0x123f8
jmp 0x6c19
leaq 0x546f(%rip), %rdi      # 0xbf4c
movq %rbx, %rsi
callq 0x6f4f
movq %rbx, 0xbc5c(%rip)      # 0x12748
jmp 0x6ed6
movb $0x1, 0xbc4c(%rip)      # 0x12744
jmp 0x6ed6
leaq 0x53ea(%rip), %rsi      # 0xbeee
movq %rbx, %rdi
callq 0x34e0
testl %eax, %eax
jne 0x6ee8
orb $0x2, 0xba21(%rip)      # 0x1253c
jmp 0x6ed6
leaq 0x5522(%rip), %rdi      # 0xc049
movq %rbx, %rsi
callq 0x6f4f
movq %rsp, %rsi
movl $0x4c, (%rsi)
jmp 0x6ebf
leaq 0xbb44(%rip), %rdi      # 0x12688
jmp 0x6c19
testq %rbx, %rbx
je 0x6b5d
leaq 0xba93(%rip), %rdi      # 0x125e8
movq %rbx, %rsi
callq 0x3650
movb $0x1, %al
movb %al, 0xbceb(%rip)       # 0x12850
jmp 0x6c66
testq %rbx, %rbx
leaq 0x54a0(%rip), %rsi      # 0xc014
cmovneq %rbx, %rsi
leaq 0xbb29(%rip), %rdi      # 0x126a8
jmp 0x6c1c
movq %rbx, %rdi
callq 0x30b0
movl %eax, 0xb9ae(%rip)      # 0x12540
testl %eax, %eax
jg 0x6ed6
leaq 0x5453(%rip), %rdi      # 0xbff4
jmp 0x6f48
movq %rbx, %rdi
callq 0x3180
cmpq $0x2, %rax
jne 0x6f2f
leaq 0x54a3(%rip), %rdi      # 0xc062
movq %rbx, %rsi
callq 0x6f4f
leaq 0xb86a(%rip), %rdi      # 0x12438
jmp 0x6c19
leaq 0xb9f1(%rip), %rdi      # 0x125c8
jmp 0x6c19
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6fba
movb %al, 0xbc72(%rip)       # 0x1285c
jmp 0x6ed6
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x3160
testq %rax, %rax
je 0x6f38
leaq 0x53dc(%rip), %rdi      # 0xbfe6
movq %rbx, %rsi
callq 0x6f4f
leaq 0xb7ff(%rip), %rdi      # 0x12418
movq %rbx, %rsi
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3650
testq %rbx, %rbx
je 0x6e9b
leaq 0x543b(%rip), %rdi      # 0xc07d
movq %rbx, %rsi
callq 0x7072
movl %eax, 0xb8e8(%rip)      # 0x12538
jmp 0x6ed6
movb $0x1, 0xbbf4(%rip)      # 0x12850
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6fba
movb %al, 0xbbe5(%rip)       # 0x12851
jmp 0x6ed6
cmpb $0x6c, (%rbx)
jne 0x6e6b
cmpb $0x67, 0x1(%rbx)
jne 0x6e6b
cmpb $0x24, 0x2(%rbx)
jne 0x6e6b
addq $0x3, %rbx
leaq 0x5392(%rip), %rdi      # 0xc02b
jmp 0x6b27
movq %rsp, %r14
movq %r14, %rdi
callq 0x9c00
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7054
leaq 0xba6a(%rip), %rdi      # 0x12728
movq %r14, %rsi
callq 0x71d8
jmp 0x6ed6
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6fba
movb %al, 0xbb81(%rip)       # 0x1285d
jmp 0x6ed6
leaq 0x5335(%rip), %rdi      # 0xc01d
movq %rbx, %rsi
callq 0x7072
cmpl $0x6, %eax
pushq $0x5
popq %rcx
cmovgel %eax, %ecx
movl %ecx, 0xb6b1(%rip)      # 0x123b0
jmp 0x6ed6
leaq 0xb7ad(%rip), %rdi      # 0x124b8
movq %rbx, %rsi
xorl %edx, %edx
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7054
movb $0x1, 0xba18(%rip)      # 0x12745
jmp 0x6ed6
movl $0x2, 0xba04(%rip)      # 0x12740
jmp 0x6ed6
leaq 0x59af(%rip), %rsi      # 0xc6f7
movq %rbx, %rdi
callq 0x3430
testq %rax, %rax
je 0x6f41
movq %rax, %rbx
movq %rsp, %r14
pushq $0x1
popq %r15
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x3550
testq %rax, %rax
je 0x6e61
movq %r14, %rdi
callq 0x70ab
movq %rax, %r12
movq %rax, %rdi
callq 0x3180
movzbl (%r12), %ecx
testl %ecx, %ecx
je 0x6d63
cmpl $0x23, %ecx
je 0x6d63
movq %r12, %rbp
cmpl $0x2f, %ecx
jne 0x6dab
cmpb $0x2f, 0x1(%rbp)
je 0x6d63
addq %rax, %r12
movq %rbp, %rdi
pushq $0x3a
popq %rsi
callq 0x3160
testq %rax, %rax
je 0x6deb
movq %rax, %r13
leaq -0x1(%rax), %rsi
movq %rbp, %rdi
callq 0x70c7
incq %r13
movq %r13, %rdi
callq 0x70ab
movq %rax, %r13
decq %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x70c7
jmp 0x6dfc
decq %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x70c7
xorl %r13d, %r13d
movq %rbp, %rdi
movl %r15d, %esi
callq 0x69bf
movq %rax, %r12
movq %rax, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x6a3e
testq %r13, %r13
je 0x6e42
cmpb $0x22, (%r13)
jne 0x6e45
incq %r13
movq %r13, %rax
cmpb $0x22, (%rax)
leaq 0x1(%rax), %rax
jne 0x6e2a
cmpb $0x0, (%rax)
jne 0x6f14
movb $0x0, -0x1(%rax)
jmp 0x6e45
xorl %r13d, %r13d
movq %r12, %rdi
movq %r13, %rsi
callq 0x6a8a
jmp 0x6d63
movl $0xa, 0xb8e1(%rip)      # 0x12740
jmp 0x6ed6
movq %rbx, %rdi
callq 0x33b0
jmp 0x6ed6
leaq 0x51c4(%rip), %rsi      # 0xc036
pushq $0x7
popq %rdx
movq %rbx, %rdi
callq 0x31b0
testl %eax, %eax
je 0x6ea3
leaq 0x51a6(%rip), %rdi      # 0xc02e
movq %rbx, %rsi
callq 0x6f4f
movq %rsp, %rsi
movl $0x47, (%rsi)
jmp 0x6ebf
incl 0xb697(%rip)            # 0x12538
jmp 0x6ed6
addq $0x7, %rbx
leaq 0x5190(%rip), %rdi      # 0xc03e
movq %rbx, %rsi
callq 0x6f4f
movq %rsp, %rsi
movl $0x4d, (%rsi)
leaq 0xb5c2(%rip), %rdi      # 0x12488
callq 0x7800
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3650
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb0e1(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
leaq 0x5171(%rip), %rsi      # 0xc06a
movq %rbx, %rdx
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34f0
leaq 0x521e(%rip), %rdi      # 0xc139
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3fc2
callq 0x5d76
callq 0x3b15
leaq 0x511a(%rip), %rdi      # 0xc050
jmp 0x6f48
leaq 0x508c(%rip), %rdi      # 0xbfcb
jmp 0x6f48
leaq 0x51ce(%rip), %rdi      # 0xc116
xorl %eax, %eax
callq 0x3fc2