blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
357
content_id
stringlengths
40
40
detected_licenses
listlengths
0
58
license_type
stringclasses
2 values
repo_name
stringlengths
4
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-14 21:31:45
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2023-09-05 23:26:37
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2023-09-05 23:26:37
github_id
int64
966
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-02-03 21:17:16
2023-08-24 19:49:39
gha_language
stringclasses
180 values
src_encoding
stringclasses
35 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
6
10.4M
extension
stringclasses
121 values
filename
stringlengths
1
148
content
stringlengths
6
10.4M
ef8777e6c3aafefc30c70a5fdabf724309f9b741
5830400f08e886be13cff423fef87ac4e147476a
/Apps/eegoSports_Link_Amp/eemagine/sdk/version.h
7ef121c2b57deb1afb3b7db696394b97559bf3f2
[]
no_license
FloThoHub/eegoApps
bf015c196cb8be9b728a4500ec270e6cbe80c0ca
2d6e6e2b9f6f538e3bead3f2857a2db34786dd9d
refs/heads/master
2021-01-19T15:08:30.749296
2018-03-29T11:04:49
2018-03-29T11:04:49
100,945,244
9
8
null
null
null
null
UTF-8
C
false
false
215
h
version.h
#ifndef __eemagine_sdk_version_h__ #define __eemagine_sdk_version_h__ #define EEGO_SDK_VERSION_MAJOR 1 #define EEGO_SDK_VERSION_MINOR 3 #define EEGO_SDK_VERSION_MICRO 4 #define EEGO_SDK_VERSION 31165 #endif
77a4e34434de2aa7a190d2894e4c42abd117199a
d1dc408f6b65c4e5209041b62cd32fb5083fe140
/src/utils/utilsh.h
a8867b465f0ccfb43e104dc0d2998a7f9286f495
[]
no_license
dmitrygerasimuk/dune2themaker-fossfriendly
7b4bed2dfb2b42590e4b72bd34bb0f37f6c81e37
89a6920b216f3964241eeab7cf1a631e1e63f110
refs/heads/master
2020-03-12T03:23:40.821001
2011-02-19T12:01:30
2011-02-19T12:01:30
null
0
0
null
null
null
null
UTF-8
C
false
false
824
h
utilsh.h
/* * utilsh.h * * Created on: 7-nov-2010 * Author: Stefan */ #ifndef UTILSH_H_ #define UTILSH_H_ // TODO: Rethink this, perhaps other global dir is needed #include "common.h" // commonly used functions #include "../ini.h" // INI loading #include "cScreenResolution.h" #include "cBestScreenResolutionFinder.h" #include "cCellCalculator.h" /** math with cells , with handy references to structures and units **/ #include "cSeedMap.h" #include "cSeedMapGenerator.h" #include "cSimpleCalculator.h" #include "cStructureUtils.h" #include "cHitpointCalculator.h" /** math for hitpoints **/ #include "cTimeManager.h" #include "cUpgradeUtils.h" #include "cMapUtils.h" #include "cPlayerUtils.h" #include "cListUtils.h" #include "cMouseUtils.h" #endif /* UTILSH_H_ */
4dd205b84e235bfee85270172dfb612a322c7ccb
0ee15da266403cb911feeb6d53a85d5a76cb87cf
/Documents/카카오톡 받은 파일/Tue_HW5_2011722005_leesooah/5-2/proc_info.c
c4994b091f0cdeb8a5bb1029c9f534d3bee70eea
[]
no_license
Domaksaramu/BlueColorPicker
3c68a1ba4d8b93a01499c359dd069eb19834ab6d
d438a375163a73f6cb1ce64f57594663dab5f15c
refs/heads/master
2021-05-28T19:11:33.117518
2015-03-21T10:10:19
2015-03-21T10:10:19
null
0
0
null
null
null
null
UTF-8
C
false
false
6,716
c
proc_info.c
#include <linux/module.h> #include <linux/types.h> #include <linux/errno.h> #include <linux/time.h> #include <linux/kernel.h> #include <linux/kernel_stat.h> #include <linux/tty.h> #include <linux/string.h> #include <linux/mman.h> #include <linux/proc_fs.h> #include <linux/ioport.h> #include <linux/uaccess.h> #include <linux/io.h> #include <linux/mm.h> #include <linux/hugetlb.h> #include <linux/pagemap.h> #include <linux/swap.h> #include <linux/smp.h> #include <linux/signal.h> #include <linux/highmem.h> #include <linux/file.h> #include <linux/fdtable.h> #include <linux/times.h> #include <linux/cpuset.h> #include <linux/rcupdate.h> #include <linux/delayacct.h> #include <linux/seq_file.h> #include <linux/pid_namespace.h> #include <linux/ptrace.h> #include <linux/tracehook.h> #include <linux/hugetlb.h> #include <linux/huge_mm.h> #include <linux/mount.h> #include <linux/seq_file.h> #include <linux/highmem.h> #include <linux/ptrace.h> #include <linux/slab.h> #include <linux/pagemap.h> #include <linux/mempolicy.h> #include <linux/rmap.h> #include <linux/swap.h> #include <linux/swapops.h> #include <linux/mman.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/elf.h> #include <asm/uaccess.h> #include <asm/tlbflush.h> struct proc_dir_entry *dir_fp; struct proc_dir_entry *pid_fp; struct proc_dir_entry *fd; int *data_pid; /////// task_state_array ////////////////// static const char * const task_state_array[] = { "R (running)", /* 0 */ "S (sleeping)", /* 1 */ "D (disk sleep)", /* 2 */ "T (stopped)", /* 4 */ "t (tracing stop)", /* 8 */ "Z (zombie)", /* 16 */ "X (dead)", /* 32 */ "x (dead)", /* 64 */ "K (wakekill)", /* 128 */ "W (waking)", /* 256 */ }; //////////// get_task_ state function //////////////// static inline const char *get_task_state(struct task_struct *tsk) { unsigned int state = (tsk->state & TASK_REPORT) | tsk->exit_state; const char * const *p = &task_state_array[0]; BUILD_BUG_ON(1 + ilog2(TASK_STATE_MAX) != ARRAY_SIZE(task_state_array)); while (state) { p++; state >>= 1; } return *p; } ///////////// get_task_cred function //////////////////// const struct cred *get_task_cred(struct task_struct *task) { const struct cred *cred; rcu_read_lock(); do { cred = __task_cred((task)); BUG_ON(!cred); } while (!atomic_inc_not_zero(&((struct cred *)cred)->usage)); rcu_read_unlock(); return cred; } //////////// get_mm_counter function ////////////////// unsigned long get_mm_counter(struct mm_struct *mm, int member) { long val = 0; /* * Don't use task->mm here...for avoiding to use task_get_mm().. * The caller must guarantee task->mm is not invalid. */ val = atomic_long_read(&mm->rss_stat.count[member]); /* * counter is updated in asynchronous manner and may go to minus. * But it's never be expected number for users. */ if (val < 0) return 0; return (unsigned long)val; } int read_infor(char * page, char ** start, off_t off, int count, int *eof, void * data) { int len; unsigned long infor, text, lib, swap; unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss; struct task_struct *p; struct mm_struct *mm; const struct cred *cred; pid_t ppid, tpid; struct pid_namespace *ns; int i; p = pid_task(find_vpid((int)data),PIDTYPE_PID); // get task_struct information mm = get_task_mm(p); // get mm_struct information ns = task_active_pid_ns(p); // get pid_namespace information len = sprintf(page, "Name: %s\n", p->comm); rcu_read_lock(); ppid = pid_alive(p)?task_tgid_nr_ns(rcu_dereference(p->real_parent), ns):0; tpid = 0; if (pid_alive(p)) { struct task_struct *tracer = ptrace_parent(p); if (tracer) tpid = task_pid_nr_ns(tracer, ns); } cred = get_task_cred(p); len += sprintf(page+len, "State:\t%s\nTgid:\t%d\nPid:\t%d\nPPid:\t%d\nTracerPid:\t%d\nUid:\t%d\t%d\t%d\t%d\nGid:\t%d\t%d\t%d\t%d\n", get_task_state(p), task_tgid_nr_ns(p, ns), (int)data, ppid, tpid, cred->uid, cred->euid, cred->suid, cred->fsuid, cred->gid, cred->egid, cred->sgid, cred->fsgid); rcu_read_unlock(); if(mm) { hiwater_vm = total_vm = mm->total_vm; if (hiwater_vm < mm->hiwater_vm) hiwater_vm = mm->hiwater_vm; hiwater_rss = total_rss = get_mm_rss(mm); if (hiwater_rss < mm->hiwater_rss) hiwater_rss = mm->hiwater_rss; infor = mm->total_vm - mm->shared_vm - mm->stack_vm; text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; swap = get_mm_counter(mm, MM_SWAPENTS); len += sprintf(page+len, "VmPeak:\t%8lu kB\nVmSize:\t%8lu kB\nVmLck:\t%8lu kB\nVmPin:\t%8lu kB\nVmHWM:\t%8lu kB\nVmRSS:\t%8lu kB\nVmData:\t%8lu kB\nVmStk:\t%8lu kB\nVmExe:\t%8lu kB\nVmLib:\t%8lu kB\nVmPTE:\t%8lu kB\nVmSwap:\t%8lu kB\n", hiwater_vm << (PAGE_SHIFT-10), (total_vm - mm->reserved_vm) << (PAGE_SHIFT-10), mm->locked_vm << (PAGE_SHIFT-10), mm->pinned_vm << (PAGE_SHIFT-10), hiwater_rss << (PAGE_SHIFT-10), total_rss << (PAGE_SHIFT-10), infor << (PAGE_SHIFT-10), mm->stack_vm << (PAGE_SHIFT-10), text, lib,(PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10, swap << (PAGE_SHIFT-10)); } return len; } int write_infor(struct file *file, const char *buffer, unsigned long count, void *data) { char *kdata; kdata = (char *)data; copy_from_user(kdata, buffer, count); // copy to kernel from user kdata[count] = '\n'; return count; } int init_proc(void) { char buf[20] = {0,}; struct task_struct * findtask = &init_task; // init task dir_fp = proc_mkdir("m2011722005",NULL); do { sprintf(buf,"m%d",findtask->pid); pid_fp = proc_mkdir(buf,dir_fp); // make directory fd = create_proc_entry("INFO",0666,pid_fp); // make file data_pid = findtask->pid; if(fd) { fd->data = data_pid; fd->read_proc = read_infor; fd->write_proc = write_infor; } findtask = next_task(findtask); // go to next task }while((findtask->pid != init_task.pid)); return 0; } void exit_proc(void) { remove_proc_entry("m2011722005",NULL); } module_init(init_proc); module_exit(exit_proc); MODULE_LICENSE("GPL");
1f5b160245c795be64b81d85a699a6503a9a593a
6f6e690939fed35dcb7f949457192a0f6bc3ba64
/test/cp.c
d8dd56a6127606e14a8ddf0e82137cd32fc65688
[]
no_license
jeche/OPS
cc6e32bc8941cd56acd87a00b19a53923b0102a4
c34c4791623188e93269f5306eeba2ff51088e8b
refs/heads/master
2021-01-18T11:14:59.553695
2014-04-08T05:16:42
2014-04-08T05:16:42
13,136,205
0
0
null
2014-03-31T04:38:24
2013-09-26T22:54:20
C++
UTF-8
C
false
false
591
c
cp.c
/* cp.c * * Parent in simple argument test. * */ #include "syscall.h" int main(int argc, char **argv) { OpenFileId from; OpenFileId to; char ch; if (argc != 3) { Write("Incorrect number of arguments", 29, ConsoleOutput); Exit(-1); } else { from = Open(argv[1]); if (from == -1) { Write("Could not open file", 19, ConsoleOutput); Exit(-1); } else { to = Open(argv[2]); if (to == -1) { Create(argv[2]); to = Open(argv[2]); } while (Read(&ch, 1, from) == 1) { Write(&ch, 1, to); } Close(from); Close(to); } } Exit(0); }
82b2888ff4db2812e2148465035dc18c8489b496
e814383d36a10839104efaa4df277996ab220fa3
/3rd-party/romio341/adio/ad_gpfs/ad_gpfs_aggrs.h
234e5c5b1d80a092b213ef3d76954b61d226dd32
[ "mpich2", "BSD-3-Clause-Open-MPI" ]
permissive
open-mpi/ompi
a1d7483ae1d83dd8fd8ae3ee95e832e0a0ee04e3
1edfdb025c4450f694600083ad871cf06c8d45cd
refs/heads/main
2023-09-01T01:30:02.040705
2023-08-29T17:32:18
2023-08-29T17:32:18
24,107,001
2,008
973
NOASSERTION
2023-09-14T20:59:26
2014-09-16T16:08:30
C
UTF-8
C
false
false
3,557
h
ad_gpfs_aggrs.h
/* * Copyright (C) by Argonne National Laboratory * See COPYRIGHT in top-level directory */ /** * \file ad_gpfs_aggrs.h * \brief ??? */ /* * File: ad_gpfs_aggrs.h * * Declares functions optimized specifically for GPFS parallel I/O solution. * */ #ifndef AD_GPFS_AGGRS_H_INCLUDED #define AD_GPFS_AGGRS_H_INCLUDED #include "adio.h" #include <sys/stat.h> #ifdef HAVE_GPFS_H #include <gpfs.h> #endif /* overriding ADIOI_Calc_file_domains() to apply 'aligned file domain partitioning'. */ void ADIOI_GPFS_Calc_file_domains(ADIO_File fd, ADIO_Offset * st_offsets, ADIO_Offset * end_offsets, int nprocs, int nprocs_for_coll, ADIO_Offset * min_st_offset_ptr, ADIO_Offset ** fd_start_ptr, ADIO_Offset ** fd_end_ptr, ADIO_Offset * fd_size_ptr, void *fs_ptr); /* overriding ADIOI_Calc_aggregator() for the default implementation is specific for * static file domain partitioning */ int ADIOI_GPFS_Calc_aggregator(ADIO_File fd, ADIO_Offset off, ADIO_Offset min_off, ADIO_Offset * len, ADIO_Offset fd_size, ADIO_Offset * fd_start, ADIO_Offset * fd_end); /* overriding ADIOI_Calc_my_req for the default implementation is specific for * static file domain partitioning */ void ADIOI_GPFS_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, ADIO_Offset * len_list, int contig_access_count, ADIO_Offset min_st_offset, ADIO_Offset * fd_start, ADIO_Offset * fd_end, ADIO_Offset fd_size, int nprocs, int *count_my_req_procs_ptr, int **count_my_req_per_proc_ptr, ADIOI_Access ** my_req_ptr, MPI_Aint ** buf_idx_ptr); /* * ADIOI_Calc_others_req * * param[in] count_my_req_procs Number of processes whose file domain my * request touches. * param[in] count_my_req_per_proc count_my_req_per_proc[i] gives the no. of * contig. requests of this process in * process i's file domain. * param[in] my_req A structure defining my request * param[in] nprocs Number of nodes in the block * param[in] myrank Rank of this node * param[out] count_others_req_proc_ptr Number of processes whose requests lie in * my process's file domain (including my * process itself) * param[out] others_req_ptr Array of other process' requests that lie * in my process's file domain */ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs, int *count_my_req_per_proc, ADIOI_Access * my_req, int nprocs, int myrank, int *count_others_req_procs_ptr, ADIOI_Access ** others_req_ptr); #endif /* AD_GPFS_AGGRS_H_INCLUDED */
d2c46e1b92ddffeb1aafe2cd3eefa3030fa517f4
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/linux/drivers/gpu/drm/panfrost/extr_panfrost_drv.c_panfrost_drm_mm_color_adjust.c
56e50fde3e09a488bf99ff8bc7a30a99ae75bfdb
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,185
c
extr_panfrost_drv.c_panfrost_drm_mm_color_adjust.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ typedef scalar_t__ u64 ; struct drm_mm_node {int dummy; } ; /* Variables and functions */ scalar_t__ ALIGN (scalar_t__,int /*<<< orphan*/ ) ; unsigned long PANFROST_BO_NOEXEC ; scalar_t__ PFN_16M ; int /*<<< orphan*/ PFN_4G ; scalar_t__ PFN_4G_MASK ; scalar_t__ min (scalar_t__,scalar_t__) ; __attribute__((used)) static void panfrost_drm_mm_color_adjust(const struct drm_mm_node *node, unsigned long color, u64 *start, u64 *end) { /* Executable buffers can't start or end on a 4GB boundary */ if (!(color & PANFROST_BO_NOEXEC)) { u64 next_seg; if ((*start & PFN_4G_MASK) == 0) (*start)++; if ((*end & PFN_4G_MASK) == 0) (*end)--; next_seg = ALIGN(*start, PFN_4G); if (next_seg - *start <= PFN_16M) *start = next_seg + 1; *end = min(*end, ALIGN(*start, PFN_4G) - 1); } }
1b9fd7bc4c723f426b7452a3f20357ab36024bc4
2cdfded586158b7fcec3e5293c15fc79f34cd3cb
/assignment6/producerConsumer.c
2fa13622747a532a6891abd2f521811940aea51d
[]
no_license
xuan-liu/ICS53HW
3f3d471fb453a2c4d2c9d8112136fdf68a7c96e9
6aa4463c7f58cc64ae29bd34008da6109b74b1cf
refs/heads/master
2021-02-26T11:58:48.026497
2020-03-16T03:36:13
2020-03-16T03:36:13
245,523,792
0
0
null
null
null
null
UTF-8
C
false
false
3,634
c
producerConsumer.c
// name: Xuan Liu, student ID: 35689116 #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include <semaphore.h> #include <time.h> #define BUFFER_SIZE 20 unsigned int mSeconds = 500000; // global variables int buffer[BUFFER_SIZE]; sem_t mutex; // protects accesses to buffer sem_t slots; // counts available slots sem_t items; // counts available items int front, rear; // buffer[(front+1)%BUFFER_SIZE] is the first item, buffer[rear%BUFFER_SIZE] is the last item int num_producer; int num_consumer; int num_item_producer; int num_item_consumer; int delay_option; // declare functions void *producer(void *vargp); void *consumer(void *vargp); void insert_item(int item_value, int pid); int remove_item(int pid); int main(int argc, char **argv){ if (argc != 5){ printf("ERROR: Please provide exactly four arguments.\n"); exit(1); } // Retrieve command line arguments num_producer = strtol(argv[1], NULL, 0); num_consumer = strtol(argv[2], NULL, 0); num_item_producer = strtol(argv[3], NULL, 0); delay_option = strtol(argv[4], NULL, 0); num_item_consumer = (int) (num_producer * num_item_producer)/num_consumer; printf("%d %d %d %d %d\n", num_producer, num_consumer, num_item_producer, num_item_consumer, delay_option); // Initialize sem_init(&mutex, 0, 1); sem_init(&slots, 0, BUFFER_SIZE); // initially, buf has n empty slots sem_init(&items, 0, 0); // initially, buf has 0 items front = rear = 0; int a, b; sem_getvalue(&slots, &a); sem_getvalue(&items, &b); printf("slots: %d, items: %d\n", a, b); // Create the producer and consumer threads int i; pthread_t producers[num_producer]; pthread_t consumers[num_consumer]; for (i = 0; i < num_producer; i++) { int *arg = malloc(sizeof(*arg)); *arg = i; pthread_create(&producers[i], NULL, producer, arg); } for (i = 0; i < num_consumer; i++) { int *arg = malloc(sizeof(*arg)); *arg = i; pthread_create(&consumers[i], NULL, consumer, arg); } // reap the threads for(i = 0; i < num_producer; i++){ pthread_join(producers[i], NULL); } for(i = 0; i < num_consumer; i++){ pthread_join(consumers[i], NULL); } return 0; } /* producer thread routine */ void *producer(void *vargp){ int n = *((int *) vargp); free(vargp); int i; for (i = 0; i < num_item_producer; i++){ int item_value = n * num_item_producer + i; insert_item(item_value, n); // add delay if (delay_option == 0){ usleep(mSeconds); } } } /* consumer thread routine */ void *consumer(void *vargp){ int n = *((int *) vargp); free(vargp); int i; for (i = 0; i < num_item_consumer; i++){ int value = remove_item(n); // add delay if (delay_option == 1){ usleep(mSeconds); } } } /* Insert item into buffer */ void insert_item(int item_value, int pid){ sem_wait(&slots); sem_wait(&mutex); // Add item to buffer rear += 1; buffer[rear % BUFFER_SIZE] = item_value; printf("producer_​%d ​produced item %d\n", pid, item_value); sem_post(&mutex); sem_post(&items); } /* remove item into buffer and return the item value*/ int remove_item(int pid){ sem_wait(&items); sem_wait(&mutex); // remove the item from buffer front += 1; int value = buffer[front % BUFFER_SIZE]; printf("consumer_%d consumed item %d\n", pid, value); sem_post(&mutex); sem_post(&slots); return value; }
5d786af1be78feaa315b7b7d1bad0da38f7f38e5
d66c1ef096b14ab94df585cf43b9b3ac3282596d
/nodes/libraries/FUSION/src/FUSION_WIFI.h
00574d7101021da830d9de0ac9d1afbe54676dd6
[ "MIT" ]
permissive
A-Schmid/FUSION_EUP
eb843a3f265c71051e8d0b8bced25a12e9806ec9
8f607893cb46bdf01ca595123502142c4feaaa22
refs/heads/master
2021-06-26T12:14:46.510902
2019-05-23T14:22:37
2019-05-23T14:22:37
142,781,698
1
1
null
null
null
null
UTF-8
C
false
false
837
h
FUSION_WIFI.h
#ifndef FUSION_WIFI_H #define FUSION_WIFI_H #include <ESP8266WiFi.h> #include <WiFiUdp.h> #define INDEX_FRAME_BEGIN 0 #define INDEX_MSG_TYPE 1 #define INDEX_MSG_ID 2 #define INDEX_NI 3 #define INDEX_NMB_DATA 4 #define INDEX_DATA 5 #define FRAME_HEAD_LENGTH 4 #define FRAME_CHECKSUM_LENGTH 2 #define FRAME_BEGIN 0xAA #define MSG_TYPE_HANDSHAKE 0 #define MSG_TYPE_LENGTH 1 #define MSG_TYPE_PACKET 2 #define WIFI_MODE_UDP 1 #define WIFI_MODE_TCP 2 #define ssid "FUSION" #define pw "fusionjazz" #define IP "192.168.4.1" #define udp_port 5005 #define tcp_port 5006 bool initWifi(); bool sendPacket(char* data, unsigned int length); bool sendPacket(char* data, unsigned int length, unsigned int mode); void sendHandshake(int node_id); bool checkConnection(); int readPacket(char* data); int readLengthPacket(); #endif // FUSION_WIFI_H
40bebf20c306430674ee565a8b3968b66433cc56
dc19d91b895c37310b5db7311fb71607f1877553
/PS/at/at_wiota_gateway_api.c
9165f41302b38b9232533b7b26b8c6249ec64c04
[]
no_license
ucchip/wiota_dev_customer
b0db2548914aab645a994300d3a79f6cb1210ad2
830a10f7e9ff29451a2862637e3993ba56dfe601
refs/heads/master
2023-08-27T21:36:21.707613
2023-08-11T08:26:51
2023-08-11T08:26:51
428,879,139
11
2
null
null
null
null
UTF-8
C
false
false
5,099
c
at_wiota_gateway_api.c
#include <rtthread.h> #ifdef AT_WIOTA_GATEWAY_API #ifdef RT_USING_AT #ifdef UC8288_MODULE #ifdef AT_WIOTA_GATEWAY #ifdef _RT_THREAD_ #include <rtdevice.h> #endif #include "string.h" #include "ati_prs.h" #include "at.h" #include "uc_wiota_api.h" #include "uc_wiota_gateway_api.h" #define AUTH_KEY_LEN 18 #define WIOTA_GATEWAY_WAIT_DATA_TIMEOUT 10000 extern void at_wiota_get_avail_freq_list(unsigned char *output_list, unsigned char list_len); static void user_recv_data(void *data, unsigned int len, unsigned char data_type) { at_server_printf("+GATEWAYRECV:0x%x, %d, %s\n", data_type, len, data); } static void user_get_exception_state(unsigned char exception_type) { const char exception_string[5][24] = { "GATEWAY_DEFAULT", "GATEWAY_NORMAL", "GATEWAY_FAILED", "GATEWAY_END", "GATEWAY_RECONNECT" }; at_server_printfln("+GATEWAYSTATE:%s", exception_string[exception_type]); } static at_result_t at_wiota_gateway_api_init(const char *args) { char auth_key[AUTH_KEY_LEN] = {0xFF}; unsigned char auth_key_len = 0; int init_state = 0; unsigned mode = 0; unsigned char list[8] = {0xff}; args = parse((char *)(++args), "d,s", &mode, AUTH_KEY_LEN, auth_key); if (!args) { rt_kprintf("gw error para.\n"); return AT_RESULT_PARSE_FAILE; } if (mode != UC_GATEWAY_MODE && mode != UC_TRANSMISSION_MODE) { return AT_RESULT_PARSE_FAILE; } auth_key_len = rt_strlen(auth_key); auth_key[auth_key_len -2] = '\0'; // remove '\r\n' auth_key[auth_key_len -1] = '\0'; uc_wiota_gateway_register_user_recv_cb(user_recv_data, user_get_exception_state); //uc_wiota_get_freq_list(list); #ifdef RT_USING_AT at_wiota_get_avail_freq_list(list, APP_CONNECT_FREQ_NUM); #endif init_state = uc_wiota_gateway_start(mode, auth_key, list); //rt_kprintf("%s line %d init_state %d\n", __FUNCTION__, __LINE__, init_state); rt_thread_delay(2); if(UC_GATEWAY_OK == init_state) { return AT_RESULT_OK; } return AT_RESULT_FAILE; } static at_result_t at_wiota_gateway_api_deinit(void) { uc_wiota_gateway_end(); return AT_RESULT_OK; } extern at_server_t at_get_server(void); static rt_err_t gateway_get_char_timeout(rt_tick_t timeout, char *chr) { at_server_t at_server = at_get_server(); return at_server->get_char(at_server, chr, timeout); } static at_result_t at_wiota_gateway_api_send_data(const char *args) { unsigned int timeout = 0; unsigned int buf_len = 0; unsigned int data_len = 0; int send_state = 0; // add crc data len char send_buf[GATEWAY_SEND_MAX_LEN+2] = {0}; char *psendbuffer = send_buf; args = parse((char *)(++args), "d,d", &timeout, &buf_len); if (!args) { return AT_RESULT_PARSE_FAILE; } if (buf_len > GATEWAY_SEND_MAX_LEN) { rt_kprintf("len %d error\n", buf_len); return AT_RESULT_PARSE_FAILE; } data_len = buf_len; at_server_printf(">"); while (buf_len) { if (gateway_get_char_timeout(rt_tick_from_millisecond(WIOTA_GATEWAY_WAIT_DATA_TIMEOUT), (char *)psendbuffer) != RT_EOK) { at_server_printfln("WAIT TIMEOUT"); return AT_RESULT_NULL; } buf_len--; psendbuffer++; } send_state = uc_wiota_gateway_send_data(send_buf, data_len, timeout); if(send_state == 0) { at_server_printfln("SEND FAIL"); return AT_RESULT_FAILE; } at_server_printfln("SEND SUCC"); return AT_RESULT_OK; } static at_result_t at_wiota_gateway_api_ota_req(void) { int ret = 0; ret = uc_wiota_gateway_ota_req(); if(ret) { return AT_RESULT_OK; } return AT_RESULT_FAILE; } static at_result_t at_wiota_gateway_api_report_state(void) { int ret = 0; ret = uc_wiota_gateway_state_update_info_msg(); if(ret) { return AT_RESULT_OK; } return AT_RESULT_FAILE; } static at_result_t at_wiota_gateway_set_ota_req_period(const char *args) { unsigned int ota_req_period = 0; int send_state = 0; args = parse((char *)(++args), "d", &ota_req_period); send_state = uc_wiota_gateway_set_ota_period(ota_req_period*60000); if(send_state == 0) { return AT_RESULT_FAILE; } return AT_RESULT_OK; } AT_CMD_EXPORT("AT+GATEWAYINIT", "=<mode>,<auth_key>", RT_NULL, RT_NULL, at_wiota_gateway_api_init, RT_NULL); AT_CMD_EXPORT("AT+GATEWAYDEINIT", RT_NULL, RT_NULL, RT_NULL, RT_NULL, at_wiota_gateway_api_deinit); AT_CMD_EXPORT("AT+GATEWAYSEND", "=<timeout>,<len>", RT_NULL, RT_NULL, at_wiota_gateway_api_send_data, RT_NULL); AT_CMD_EXPORT("AT+GATEWAYOTAREQ", RT_NULL, RT_NULL, RT_NULL, RT_NULL, at_wiota_gateway_api_ota_req); AT_CMD_EXPORT("AT+GATEWAYSTATE", RT_NULL, RT_NULL, RT_NULL, RT_NULL, at_wiota_gateway_api_report_state); AT_CMD_EXPORT("AT+GATEWAYSETOTAPERIOD", "=<ota_req_period>", RT_NULL, RT_NULL, at_wiota_gateway_set_ota_req_period, RT_NULL); #endif #endif #endif #endif
3618c845f63bded12f0e962c99b278d552207f51
c2bf53e9c74ce9732bcf283e7c0915ed72509a90
/Base/unprndh.h
4455318ab90f3dace5f67acc0ca41b1807ca9b22
[ "MIT" ]
permissive
TheMetalMage/KeyKos
0497af5cd32f5356abcb60a8e4cc2f773a446946
372b71fb658936e0dddd22aa01decbca830bd4f7
refs/heads/master
2021-01-17T19:52:39.641460
2016-10-23T18:43:42
2016-10-23T18:43:42
71,721,566
1
0
null
null
null
null
UTF-8
C
false
false
377
h
unprndh.h
#ifndef _H_unprndh #define _H_unprndh typedef enum { unprnode_unprepared, /* node has been unprepared */ unprnode_cant /* Can't unprepare because of preplocked node */ } unprnode_ret; unprnode_ret unprnode( NODE *node ); unprnode_ret superzap( /* Uninvolve a slot */ struct Key *key /* The key (and slot) to uninvolve */ ); #endif
e7c83496a42838c7fc7bea85456689839d374dfa
d36b3599e945c49f3e1051928bee95b9066738e5
/nrf51/external/lwip/src/app/mqtt/mqtt.c
7f926ce5d99eb7351d84cfd4b45ba13ddf3c8144
[ "BSD-3-Clause" ]
permissive
mkovatsc/wot-demo-devices
e6d900c9a44888ce95c4785b147a897d1952dfcb
4624c44648b5434ebab3d20207fb76bf34be9ca9
refs/heads/master
2020-12-28T23:23:49.539202
2016-04-19T13:33:13
2016-04-19T13:33:13
34,436,510
4
3
null
2020-03-07T20:53:08
2015-04-23T05:50:06
C
UTF-8
C
false
false
24,324
c
mqtt.c
/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. * * The information contained herein is property of Nordic Semiconductor ASA. * Terms and conditions of usage are described in detail in NORDIC * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. * * Licensees are granted free, non-transferable use of the information. NO * WARRANTY of ANY KIND is provided. This heading must NOT be removed from * the file. * */ /** @file * * @brief MQTT Client Implementation over LwIP Stack port on nrf51. * * This file contains the source code for MQTT Protocol over LwIP Stack for a nrf51 device. * The implementation is limited to MQTT Client role only. */ #include "mqtt.h" #include "lwip/opt.h" #include "lwip/stats.h" #include "lwip/sys.h" #include "lwip/pbuf.h" /*lint -save -e607 */ #include "lwip/tcp.h" /*lint -restore -e607 */ #include "app_trace.h" #include <stdint.h> #include <string.h> //#define MQTT_TRC app_trace_log #define MQTT_TRC(...) /**@brief MQTT Control Packet Types. */ #define MQTT_PKT_TYPE_CONNECT 0x10 #define MQTT_PKT_TYPE_CONNACK 0x20 #define MQTT_PKT_TYPE_PUBLISH 0x30 #define MQTT_PKT_TYPE_PUBACK 0x40 #define MQTT_PKT_TYPE_PUBREC 0x50 #define MQTT_PKT_TYPE_PUBREL 0x60 #define MQTT_PKT_TYPE_PUBCOMP 0x70 #define MQTT_PKT_TYPE_SUBSCRIBE 0x82 // QoS 1 for subscribe #define MQTT_PKT_TYPE_SUBACK 0x90 #define MQTT_PKT_TYPE_UNSUBSCRIBE 0xA2 #define MQTT_PKT_TYPE_UNSUBACK 0xB0 #define MQTT_PKT_TYPE_PINGREQ 0xC0 #define MQTT_PKT_TYPE_PINGRSP 0xD0 #define MQTT_PKT_TYPE_DISCONNECT 0xE0 /**@brief MQTT Header Masks. */ #define MQTT_HEADER_QOS_MASK 0x06 /**@brief MQTT States. */ typedef enum { MQTT_STATE_IDLE, /**< Idle state, implying the client entry in the table is unused/free. */ MQTT_STATE_TCP_CONNECTING, /**< TCP Connection has been requested, awaiting result of the request. */ MQTT_STATE_TCP_CONNECTED, /**< TCP Connection successfully established. */ MQTT_STATE_CONNECTING, /**< MQTT Connect Request Sent, ACK awaited. */ MQTT_STATE_CONNECTED, /**< MQTT Connection successful. */ MQTT_STATE_PENDING_WRITE = 0x80 /**< State that indicates write callback is awaited for an issued request. */ }mqtt_state_t; /**@brief MQTT Client definition to maintain information relevant to the client. */ typedef struct { const char * device_id; /**< Client Id used by the Client for its unique identification with the broker. */ struct tcp_pcb * pcb; /**< TCP Connection Reference provided by LwIP Stack. */ const char * p_user_name; /**< User name used for the MQTT connection. */ mqtt_data_t * p_password; /**< Password used for the MQTT connection. */ mqtt_evt_cb_t evt_cb; /**< Application callback registered with the module to get MQTT events. */ uint32_t last_activity; /**< Ticks based on on sys_now of LwIP to maintain last activity information. */ ip6_addr_t broker_addr; /**< Address of MQTT broker that the client is connected to. */ uint16_t broker_port; /**< Broker's Port number. */ uint8_t state; /**< Client's state in the connection refer \ref mqtt_state_t for possible states . */ uint8_t poll_abort_counter; /**< Poll abort counter maintained for the TCP connection. */ }mqtt_t; #define MAX_PACKET_SIZE_IN_WORDS (MQTT_MAX_PACKET_LENGTH/4) static mqtt_t mqtt_client[MQTT_MAX_CLIENTS]; /**< MQTT Client table.*/ static uint32_t m_packet[MAX_PACKET_SIZE_IN_WORDS]; /**< Buffer for creating packets on a TCP write. */ static const uint8_t m_ping_packet[2] = {MQTT_PKT_TYPE_PINGREQ, 0x00}; /**@brief Initialize MQTT Client instance. */ static void mqtt_client_instance_init(uint32_t index) { mqtt_client[index].state = MQTT_STATE_IDLE; mqtt_client[index].poll_abort_counter = 0; mqtt_client[index].p_password = NULL; mqtt_client[index].p_user_name = NULL; mqtt_client[index].device_id = NULL; } /**@brief Encode MQTT Remaining Length. */ static void remaining_length_encode(uint16_t remaining_length, uint8_t * p_buff, uint16_t * p_digits) { uint16_t index = 0; do { p_buff[index] = remaining_length % 0x80; remaining_length /= 0x80; if(remaining_length > 0) { p_buff[index] |= 0x80; } index++; } while (remaining_length > 0); *p_digits = index; } /**@brief Decode MQTT Remaining Length. */ static void remaining_length_decode(uint8_t * p_buff, uint16_t * p_remaining_length, uint16_t * p_digits) { uint16_t index = 0; uint16_t remaining_length = 0; uint16_t multiplier = 1; do { remaining_length += (p_buff[index] & 0x7F) * multiplier; multiplier *= 0x80; } while ((p_buff[index++] & 0x80) != 0); *p_digits = index; *p_remaining_length = remaining_length; } err_t tcp_write_complete_cb(void *p_arg, struct tcp_pcb *tpcb, u16_t len) { mqtt_client_t index = (mqtt_client_t)(p_arg); mqtt_client[index].state &= (~MQTT_STATE_PENDING_WRITE); return MQTT_SUCCESS; } static uint32_t transport_write(mqtt_t * p_client, uint8_t * data, uint16_t data_len) { uint32_t err; if ((p_client ->state & MQTT_STATE_PENDING_WRITE) == MQTT_STATE_PENDING_WRITE) { err = MQTT_ERR_BUSY; } else { tcp_sent(p_client->pcb, tcp_write_complete_cb); err = tcp_write(p_client->pcb, data, data_len, TCP_WRITE_FLAG_COPY); if(err == ERR_OK) { p_client->last_activity = sys_now(); p_client->state |= MQTT_STATE_PENDING_WRITE; } } return err; } /**@brief Notifies application of disconnection. In case connection is not yet established, connection event is used with failure result. */ void notify_disconnection(const mqtt_client_t * p_id, uint32_t result) { mqtt_evt_t evt; mqtt_t * p_client = &mqtt_client[*p_id]; if((p_client->state & MQTT_STATE_CONNECTED) != MQTT_STATE_CONNECTED) { evt.id = MQTT_EVT_CONNECTED; evt.result = MQTT_CONNECTION_FAILED; } else { evt.id = MQTT_EVT_DISCONNECTED; evt.result = result; } p_client->evt_cb(p_id, (const mqtt_evt_t *)&evt); } /**@breif Close TCP connection and clean up client instance. */ static void tcp_close_connection(const mqtt_client_t * p_id, uint32_t result) { mqtt_t * p_client = &mqtt_client[*p_id]; tcp_arg(p_client->pcb, NULL); tcp_sent(p_client->pcb, NULL); tcp_recv(p_client->pcb, NULL); UNUSED_VARIABLE(tcp_close(p_client->pcb)); notify_disconnection(p_id, result); mqtt_client_instance_init(*p_id); } /**@brief Callback registered with TCP to handle incoming data on the connection. */ err_t recv_callback(void * p_arg, struct tcp_pcb * p_pcb, struct pbuf * p_buffer, err_t err) { mqtt_evt_t evt; mqtt_client_t index = (mqtt_client_t)(p_arg); mqtt_data_t mqtt_data; mqtt_topic_t mqtt_topic; uint8_t * payload; uint32_t err_code; uint16_t remaining_length; uint16_t rl_digits; MQTT_TRC("[MQTT]: >> recv_callback, result 0x%08x, buffer %p\r\n", err, p_buffer); if (err == ERR_OK && p_buffer != NULL) { MQTT_TRC("[MQTT]: >> Packet buffer length 0x%08x \r\n", p_buffer->tot_len); tcp_recved(p_pcb, p_buffer->tot_len); payload = (uint8_t*)(p_buffer->payload); switch(payload[0] & 0xF0) { case MQTT_PKT_TYPE_PINGRSP: { MQTT_TRC("[MQTT]: Received PINGRSP!\r\n"); break; } case MQTT_PKT_TYPE_PUBLISH: { remaining_length_decode(&payload[1], &remaining_length, &rl_digits); // Offset consists header, remaining length and topic length uint8_t offset = 1 + rl_digits + 2; mqtt_topic.p_topic = payload + offset; mqtt_topic.topic_len = (payload[rl_digits + 1] << 8) | payload[rl_digits + 2]; // Packet to send ACK for publish. uint8_t packet[4]; packet[0] = MQTT_PKT_TYPE_PUBACK; packet[1] = 0x02; if (payload[0] & MQTT_HEADER_QOS_MASK) { // QoS different from 0, Message Id present. offset += 2; packet[2] = payload[2]; packet[3] = payload[3]; } mqtt_data.p_data = &payload[offset + mqtt_topic.topic_len]; mqtt_data.data_len = p_buffer->tot_len - (offset + mqtt_topic.topic_len); MQTT_TRC("[MQTT]: Received PUBLISH! %lx %lx\r\n", mqtt_data.data_len, mqtt_topic.topic_len); evt.param.rx_param.p_data = &mqtt_data; evt.param.rx_param.p_topic = &mqtt_topic; evt.id = MQTT_EVT_DATA_RX; evt.result = MQTT_SUCCESS; err_code = tcp_write(mqtt_client[index].pcb, packet, 4, 1); if (err_code == ERR_OK) { mqtt_client[index].last_activity = sys_now(); } else { MQTT_TRC("[MQTT]: Failed to send PUBACK!\r\n"); } mqtt_client[index].evt_cb(&index, (const mqtt_evt_t *)&evt); break; } case MQTT_PKT_TYPE_CONNACK: { MQTT_TRC("[MQTT]: Received CONACK, MQTT connection up!\r\n"); mqtt_client[index].state = MQTT_STATE_CONNECTED; evt.id = MQTT_EVT_CONNECTED; evt.result = MQTT_SUCCESS; mqtt_client[index].evt_cb(&index, (const mqtt_evt_t *)&evt); break; } case MQTT_PKT_TYPE_DISCONNECT: { MQTT_TRC("[MQTT]: Received DISCONNECT\r\n"); tcp_close_connection(&index, MQTT_SUCCESS); break; } default: { break; } } } else { MQTT_TRC("[MQTT]: Error receiving data, closing connection\r\n"); tcp_close_connection(&index, MQTT_ERR_TRANSPORT_CLOSED); } UNUSED_VARIABLE(pbuf_free(p_buffer)); return ERR_OK; } /**@brief TCP Connection Callback. MQTT Connection */ static err_t tcp_connection_callback(void * p_arg, struct tcp_pcb * p_pcb, err_t err) { mqtt_client_t index = (mqtt_client_t)(p_arg); mqtt_t * p_client = &mqtt_client[0]; if (err == ERR_OK) { //Register callback. tcp_recv(p_pcb, recv_callback); uint8_t * payload = (uint8_t *)m_packet; uint8_t connect_flags = 0x02; uint16_t usr_name_len = 0; uint8_t offset = 0; uint8_t did_len = strlen(p_client->device_id); #ifdef MQTT_3_1_1 uint8_t remaining_length = 10 + did_len + 2; #else // then fall back to MQTT_3_1_0 uint8_t remaining_length = 12 + did_len + 2; #endif //MQTT_3_1_1 if (NULL != p_client->p_user_name) { connect_flags |= 0x80; usr_name_len = strlen(p_client->p_user_name); remaining_length += 2 + usr_name_len; if (NULL != p_client->p_password) { remaining_length += (2 + p_client->p_password->data_len); connect_flags |= 0x40; } } MQTT_TRC("[MQTT]: Client ID len 0x%04x, Remaining Length 0x%02x\r\n", did_len, remaining_length); memset(payload, 0, MQTT_MAX_PACKET_LENGTH); MQTT_TRC("[MQTT]: Allocated packet %p, packet size 0x%08x\r\n", payload, remaining_length + 2); #ifdef MQTT_3_1_1 //Variable header const uint8_t connect_header[] = { // Control packet. MQTT_PKT_TYPE_CONNECT, // Remaining length remaining_length, // Protocol name. 0x00,0x04,'M','Q', 'T', 'T', //Protocol level 0x04, //Connect flag connect_flags, //Keep alive in seconds. 0x00, MQTT_KEEPALIVE}; #else //Variable header const uint8_t connect_header[] = { // Control packet. MQTT_PKT_TYPE_CONNECT, // Remaining length remaining_length, // Protocol name 0x00, 0x06, 'M', 'Q', 'I', 's', 'd', 'p', //Protocol level 0x03, //Connect flag connect_flags, //Keep alive in seconds. 0x00, MQTT_KEEPALIVE}; #endif //MQTT_3_1_1 MQTT_TRC("[MQTT]: Packing connect_header of size 0x%08x\r\n", sizeof(connect_header)); //Copy fixed and variable header. memcpy(payload,connect_header, sizeof(connect_header)); offset = sizeof(connect_header); //Pack Payload and deviceId. payload[offset] = 0x00; offset++; payload[offset] = did_len; offset++; MQTT_TRC("[MQTT]: Packing client id of length 0x%08x\r\n", did_len); memcpy(&payload[offset],p_client->device_id,did_len); offset += did_len; //Pack User id (if any) if (NULL != p_client->p_user_name) { MQTT_TRC("[MQTT]: Packing user name of length 0x%08x\r\n", usr_name_len); payload[offset] = (usr_name_len & 0xFF00) >> 8; offset++; payload[offset] = (usr_name_len & 0x00FF); offset++; memcpy(&payload[offset], p_client->p_user_name, usr_name_len); //Pack password (if any) if (NULL != p_client->p_password) { MQTT_TRC("[MQTT]: Packing password of length 0x%08lx\r\n", p_client->p_password->data_len); payload[offset] = (p_client->p_password->data_len & 0xFF00) >> 8; offset++; payload[offset] = (p_client->p_password->data_len & 0x00FF); offset++; memcpy(&payload[offset], p_client->p_password->p_data, p_client->p_password->data_len); } } MQTT_TRC("[MQTT]: Writing connect packet of length 0x%08x\r\n", remaining_length + 2); //Send MQTT identification message to broker. err = transport_write(&mqtt_client[index], payload, remaining_length + 2); if (err != ERR_OK) { UNUSED_VARIABLE(mqtt_abort(&index)); } } return err; } uint32_t mqtt_abort(const mqtt_client_t * p_client) { mqtt_client_t index = (*p_client); uint8_t state = (mqtt_client[index].state & (~MQTT_STATE_PENDING_WRITE)); if (state != MQTT_STATE_IDLE) { tcp_abort(mqtt_client[index].pcb); mqtt_client[index].state = MQTT_STATE_IDLE; } return MQTT_SUCCESS; } void mqtt_init(void) { uint32_t index; for (index = 0; index < MQTT_MAX_CLIENTS; index++) { mqtt_client_instance_init(index); } } static void tcp_error_handler(void * p_arg, err_t err) { mqtt_client_t index = (mqtt_client_t)(p_arg); mqtt_client[index].state = MQTT_STATE_IDLE; } static err_t tcp_connection_poll(void * p_arg, struct tcp_pcb * p_pcb) { mqtt_client_t index = (mqtt_client_t)(p_arg); mqtt_client[index].poll_abort_counter++; return ERR_OK; } static uint32_t tcp_request_connection(mqtt_client_t * p_client) { mqtt_client_t index = (*p_client); mqtt_client[index].poll_abort_counter = 0; mqtt_client[index].pcb = tcp_new_ip6(); err_t err = tcp_connect_ip6(mqtt_client[index].pcb, &mqtt_client[index].broker_addr, mqtt_client[index].broker_port, tcp_connection_callback); if(err != ERR_OK) { UNUSED_VARIABLE(mqtt_abort(&index)); } else { tcp_arg(mqtt_client[index].pcb, (void *)index); tcp_err(mqtt_client[index].pcb, tcp_error_handler); tcp_poll(mqtt_client[index].pcb, tcp_connection_poll, 10); tcp_accept(mqtt_client[index].pcb, tcp_connection_callback); mqtt_client[index].state = MQTT_STATE_TCP_CONNECTING; } return err; } uint32_t mqtt_connect(mqtt_client_t * p_client, const mqtt_connect_t * p_param) { // Look for a free instance if available. uint32_t index = 0; uint32_t err_code = MQTT_ERR_NO_FREE_INSTANCE; if (p_client == NULL) { err_code = MQTT_NULL_PARAM; } for (index = 0; index < MQTT_MAX_CLIENTS; index++) { if (mqtt_client[index].state == MQTT_STATE_IDLE) { // Found a free instance, allocate for new connection. err_code = MQTT_SUCCESS; break; } } if (index < MQTT_MAX_CLIENTS) { mqtt_client[index].broker_addr = p_param->broker_addr; mqtt_client[index].broker_port = p_param->broker_port; mqtt_client[index].evt_cb = p_param->evt_cb; mqtt_client[index].device_id = p_param->device_id; mqtt_client[index].p_user_name = p_param->p_user_name; mqtt_client[index].p_password = p_param->p_password; err_code = tcp_request_connection((mqtt_client_t *)&index); if(err_code != ERR_OK) { //Free instance. mqtt_client_instance_init(index); } else { p_client = &index; } } UNUSED_VARIABLE(p_client); return err_code; } uint32_t mqtt_publish(const mqtt_client_t * p_id, const mqtt_topic_t * p_topic, const mqtt_data_t * p_data) { uint32_t err_code = MQTT_ERR_NOT_CONNECTED; mqtt_t * p_client = &mqtt_client[*p_id]; uint8_t * payload = (uint8_t *) m_packet; uint16_t rl_digits; MQTT_TRC("[MQTT]:[CID 0x%02lx]: >> mqtt_publish Topic size 0x%08lx, Data size 0x%08lx\r\n", (*p_id), p_topic->topic_len, p_data->data_len); if((p_client->state & MQTT_STATE_PENDING_WRITE) == MQTT_STATE_PENDING_WRITE) { err_code = MQTT_ERR_BUSY; } else if (p_client->state == MQTT_STATE_CONNECTED) { uint8_t remaining_length = p_topic->topic_len + 2 + p_data->data_len; // No packet Identifier. uint8_t offset = 0; memset(payload, 0, MQTT_MAX_PACKET_LENGTH); payload[offset] = MQTT_PKT_TYPE_PUBLISH; offset++; MQTT_TRC("[MQTT]: Packing Remaining Header of size 0x%02x at offset 0x%02x\r\n", remaining_length, offset); remaining_length_encode(remaining_length, &payload[offset], &rl_digits); payload[offset] = remaining_length; offset += rl_digits; MQTT_TRC("[MQTT]: Packing Topic length of size 0x%04lx at offset 0x%02x\r\n", p_topic->topic_len, offset); payload[offset] = (p_topic->topic_len & 0xFF00) >> 8; offset++; payload[offset] = (p_topic->topic_len & 0x00FF); offset++; MQTT_TRC("[MQTT]: Packing Topic offset 0x%02x\r\n", offset); memcpy(&payload[offset], p_topic->p_topic, p_topic->topic_len); offset+= p_topic->topic_len; MQTT_TRC("[MQTT]: Packing Data offset 0x%02x\r\n", offset); memcpy(&payload[offset], p_data->p_data, p_data->data_len); MQTT_TRC("[MQTT]: tcp_write of size 0x%08X\r\n", (remaining_length + 2)); //Publish message err_code = transport_write(p_client, payload, (remaining_length + 2)); } else { MQTT_TRC("[MQTT]: Packet allocation failed!\r\n"); err_code = MQTT_NO_MEM; } MQTT_TRC("[MQTT]: << mqtt_publish\r\n"); return err_code; } uint32_t mqtt_disconnect(const mqtt_client_t * p_id) { uint32_t err_code = MQTT_ERR_NOT_CONNECTED; mqtt_t * p_client = &mqtt_client[*p_id]; if ((p_client->state & MQTT_STATE_CONNECTED) == MQTT_STATE_CONNECTED) { const uint8_t packet[] = {MQTT_PKT_TYPE_DISCONNECT, 0x00}; UNUSED_VARIABLE(tcp_write(p_client->pcb, (void *)packet, sizeof(packet), 1)); tcp_close_connection(p_id, MQTT_SUCCESS); err_code = MQTT_SUCCESS; } else if (p_client->state == MQTT_STATE_TCP_CONNECTED) { tcp_close_connection(p_id, MQTT_SUCCESS); err_code = MQTT_SUCCESS; } return err_code; } uint32_t mqtt_subscribe(const mqtt_client_t * p_id, const mqtt_topic_t * p_topic, uint16_t packet_id) { uint32_t err_code = MQTT_ERR_NOT_CONNECTED; mqtt_t * p_client = &mqtt_client[*p_id]; uint8_t * payload = (uint8_t *)m_packet; if((p_client->state & MQTT_STATE_PENDING_WRITE) == MQTT_STATE_PENDING_WRITE) { err_code = MQTT_ERR_BUSY; } else if (p_client->state == MQTT_STATE_CONNECTED) { memset(payload, 0, MQTT_MAX_PACKET_LENGTH); payload[0] = MQTT_PKT_TYPE_SUBSCRIBE; payload[1] = (4 + p_topic->topic_len + 1); payload[2] = (packet_id & 0xFF00) << 8; payload[3] = (packet_id & 0x00FF); payload[4] = (p_topic->topic_len & 0xFF00) << 8; payload[5] = (p_topic->topic_len & 0x00FF); memcpy (&payload[6], p_topic->p_topic, p_topic->topic_len); payload[6 + p_topic->topic_len] = 0x01; //Qos 1 //Send message err_code = transport_write(p_client, payload, (6 + p_topic->topic_len + 1)); } return err_code; } uint32_t mqtt_unsubscribe(const mqtt_client_t * p_id, uint16_t packet_id) { uint32_t err_code = MQTT_ERR_NOT_CONNECTED; mqtt_t * p_client = &mqtt_client[*p_id]; uint8_t * payload = (uint8_t *)m_packet; if((p_client->state & MQTT_STATE_PENDING_WRITE) == MQTT_STATE_PENDING_WRITE) { err_code = MQTT_ERR_BUSY; } else if (p_client->state == MQTT_STATE_CONNECTED) { memset(payload, 0, MQTT_MAX_PACKET_LENGTH); payload[0] = MQTT_PKT_TYPE_UNSUBSCRIBE; payload[1] = 0x02; payload[2] = (packet_id & 0xFF00) << 8; payload[3] = (packet_id & 0x00FF); err_code = transport_write(p_client, payload, 4); } return err_code; } uint32_t mqtt_ping(const mqtt_client_t * p_id) { mqtt_t * p_client = &mqtt_client[*p_id]; uint32_t err_code; if((p_client->state & MQTT_STATE_PENDING_WRITE) == MQTT_STATE_PENDING_WRITE) { err_code = MQTT_ERR_BUSY; } else if(p_client->state != MQTT_STATE_CONNECTED) { err_code = MQTT_ERR_NOT_CONNECTED; } //Ping err_code = transport_write(p_client, (uint8_t *)m_ping_packet, 2); return err_code; } uint32_t mqtt_live(void) { uint32_t current_time = sys_now(); uint32_t index; for (index = 0; index < MQTT_MAX_CLIENTS; index++) { if ((current_time - mqtt_client[index].last_activity) > ((MQTT_KEEPALIVE - 2)* 1000)) { if (mqtt_client[index].state == MQTT_STATE_CONNECTED) { UNUSED_VARIABLE(mqtt_ping((mqtt_client_t *)&index)); } } } return MQTT_SUCCESS; }
ef449792309d439264c2a8ee4e96e49c243c0b9a
6d258d9abc888d6c4640b77afa23355f9bafb5a0
/network/udp/ipaddr.h
c01f276bda13cef1d7b2662d5dd918f69323a711
[]
no_license
ohwada/MAC_cpp_Samples
e281130c8fd339ec327d4fad6d8cdf4e9bab4edc
74699e40343f13464d64cf5eb3e965140a6b31a2
refs/heads/master
2023-02-05T00:50:47.447668
2023-01-28T05:09:34
2023-01-28T05:09:34
237,116,830
15
1
null
null
null
null
UTF-8
C
false
false
960
h
ipaddr.h
/** * network sample * 2020-07-01 K.OHWADA */ // Get the IP Address from the host name // using getaddrinfo #include <stdbool.h> #include <string.h> #include <unistd.h> #include <netdb.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> // prototype bool get_ipaddress(char *hostname, char *service, char *ipaddress, char*error); /** * get_ipaddress */ bool get_ipaddress(char *hostname, char *service, char *ipaddress, char*error) { struct addrinfo hints, *info; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; int err = getaddrinfo(hostname, service, &hints, &info); if (err != 0) { strcpy( error, gai_strerror(err) ); return false; } struct in_addr addr; addr.s_addr = ((struct sockaddr_in *)(info->ai_addr))->sin_addr.s_addr; strcpy( ipaddress, inet_ntoa(addr) ); freeaddrinfo(info); return true; }
6781f226ddde106c7358557e78c85d53d1da9755
84c498e7a634f1c54c0caaf18ede3f20f8852dc8
/NeXAS/pac_pack/Huffman_comp.h
70f096f938a0fddbdaf924acc7fdfe1d38adff5f
[]
no_license
Yggdrasill-Moe/Niflheim
4697e8d5cea5da7e5732f925b190c9d47ef94071
51048e7af2ae2c69db772ff59ac26390ab0ea73b
refs/heads/master
2023-07-19T18:34:26.398212
2023-07-17T01:11:04
2023-07-17T01:11:04
163,126,766
103
23
null
null
null
null
GB18030
C
false
false
7,324
h
Huffman_comp.h
//base on Giga_pac_Assage #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> #include <stdlib.h> #include <io.h> #include <direct.h> #include <windows.h> typedef unsigned char unit8; typedef unsigned short unit16; typedef unsigned int unit32; struct bits { unsigned long curbits; unsigned long curbyte; unsigned char cache; unsigned char *stream; unsigned long stream_length; }; void bits_init(struct bits *bits, unsigned char *stream, unsigned long stream_length) { memset(bits, 0, sizeof(*bits)); bits->stream = stream; bits->stream_length = stream_length; } /* 把setval的最低位设置到离最高位最近的地方开始 */ int bit_put_high(struct bits *bits, unsigned char setval) { bits->curbits++; bits->cache |= (setval & 1) << (8 - bits->curbits); if (bits->curbits == 8) { if (bits->curbyte >= bits->stream_length) return -1; bits->stream[bits->curbyte++] = bits->cache; bits->curbits = 0; bits->cache = 0; } return 0; } /* 按照从高字节到低字节的顺序把setval中的值设置到离最高位最近的地方开始 */ int bits_put_high(struct bits *bits, unsigned int req_bits, void *setval) { unsigned int this_bits; unsigned int this_byte; unsigned int i; this_byte = req_bits / 8; this_bits = req_bits & 7; for (int k = (int)this_bits - 1; k >= 0; k--) { unsigned char bitval; bitval = !!(((unsigned char *)setval)[this_byte] & (1 << k)); if (bit_put_high(bits, bitval)) return -1; } this_bits = req_bits & ~7; this_byte--; for (i = 0; i < this_bits; i++) { unsigned char bitval; bitval = !!(((unsigned char *)setval)[this_byte - i / 8] & (1 << (7 - (i & 7)))); if (bit_put_high(bits, bitval)) return -1; } return 0; } void bits_flush(struct bits *bits) { bits->stream[bits->curbyte] = bits->cache; } typedef struct huffman_node { unit32 weight; unit8 ascii; unit32 code; /* 哈夫曼编码值 */ unit32 code_lengths; /* 哈夫曼编码值的位数 */ struct huffman_node *parent; struct huffman_node *left_child; struct huffman_node *right_child; }huffman_node_t; static void huffman1_node_encode(huffman_node_t *node, unsigned int code, unsigned int code_lengths) { /* 最先编码左下角的叶节点开始 */ if (node->left_child) { code <<= 1; code_lengths++; huffman1_node_encode(node->left_child, code, code_lengths); code |= 1; huffman1_node_encode(node->right_child, code, code_lengths); } else { /* 页结点 */ node->code = code; node->code_lengths = code_lengths; } } static int huffman_code_tree_encode(struct bits *bits, huffman_node_t *parent) { if (parent->left_child) { if (bit_put_high(bits, 1)) /* 表示当前父节点有孩子 */ return -1; if (huffman_code_tree_encode(bits, parent->left_child)) return -1; if (huffman_code_tree_encode(bits, parent->right_child)) return -1; } else { /* 页节点 */ if (bit_put_high(bits, 0)) /* 位0标志表示是页节点 */ return -1; /* 写入页节点的ascii值 */ if (bits_put_high(bits, 8, (unsigned char *)&parent->ascii)) return -1; } return 0; } static huffman_node_t *huffman_child_init(huffman_node_t *child_node, unsigned int is_right_child) { #ifdef MY_CUSTOM_0 child_node->code = is_right_child; /* 顺便标上编码值(只标明左(0)或右(1)) */ child_node->code_lengths = 1; #endif return child_node; } static unsigned int huffman_tree_create(huffman_node_t *nodes) { huffman_node_t *pnodes[256],*pnode = 0; int leaves_node; /* 有效的叶结点计数 */ int parent_node; /* 合并时新结点的位置索引 */ int child_node; /* 叶结点位置计数 */ int i; /* 将出现过的(权值不为0的)叶节点放入队列 */ for (i = 0; nodes[i].weight && i < 256; i++) pnodes[i] = &nodes[i]; leaves_node = i; if (leaves_node < 2) { printf("有效的叶结点数目过少\n"); return -1; } parent_node = leaves_node; child_node = parent_node - 1; while (child_node > 0) { pnode = &nodes[parent_node++]; /* 合并左右叶结点以后的新结点 */ /* CUSTOM!! */ pnode->left_child = huffman_child_init(pnodes[child_node--], 0); /* 第1个child结点作为左结点 */ pnode->right_child = huffman_child_init(pnodes[child_node--], 1); /* 第2个child结点作为右结点 */ pnode->left_child->parent = pnode->right_child->parent = pnode; /* 新结点成为父结点 */ pnode->weight = pnode->left_child->weight + pnode->right_child->weight;/* 父结点权值为2个孩子的权值之和 */ /* 找到一个合适的插入点, 将父结点插入剩余结点组成的森林中 */ for (i = child_node; i >= 0; i--) { /* 找到一个合适的插入点 */ /* custom!! */ if (pnodes[i]->weight >= pnode->weight) break; } /* 将新的节点插入这个位置 */ memmove(pnodes + i + 2, pnodes + i + 1, (child_node - i) * sizeof(huffman_node_t *)); pnodes[i + 1] = pnode; child_node++; } /* pnode就是根结点 */ /* 到了这里,生成了一个按降序排列的2n - 1个结点的队列pnodes */ huffman1_node_encode(pnode, 0, 0); return leaves_node; } /* 按降序排列 */ static int huffman_weight_compare(const void *node1, const void *node2) { huffman_node_t *nodes[2] = { (huffman_node_t *)node1, (huffman_node_t *)node2 }; /* 这里比较的前后2项顺序决定了排序是升序或降序 */ return (int)nodes[1]->weight - (int)nodes[0]->weight; } static int huffman_ascii_compare(const void *node1, const void *node2) { huffman_node_t *nodes[2] = { (huffman_node_t *)node1, (huffman_node_t *)node2 }; return (int)nodes[0]->ascii - (int)nodes[1]->ascii; } int huffman_compress(unsigned char *compr, unsigned long *comprlen, unsigned char *uncompr, unsigned long uncomprlen) { /* n个叶子的哈夫曼树要经过n-1次合并,产生n-1个新结点。 * 最终求得的哈夫曼树中共有2n-1个结点。*/ huffman_node_t nodes[2 * 256 - 1]; /* huffman树的最大结点数(2 ^ N - 1) */ unsigned int leaves; unsigned int output_bits; unsigned long i; huffman_node_t *root; struct bits bits; memset(nodes, 0, sizeof(nodes)); /* 前256个结点(N的最大可能值)用于存放哈夫曼树的叶结点 */ for (i = 0; i < 256; i++) nodes[i].ascii = (unit8)i; /* for debug: 标记该叶结点所代表的ascii值 */ /* 计算输入的字节数据的出现频度 */ for (i = 0; i < uncomprlen; i++) nodes[uncompr[i]].weight++; /* 按照频度(权)降序排序 */ qsort(nodes, 256, sizeof(huffman_node_t), huffman_weight_compare); /* 创建huffman树 */ leaves = huffman_tree_create(nodes); root = &nodes[0]; while (root->parent) root = root->parent; bits_init(&bits, compr, *comprlen); if (huffman_code_tree_encode(&bits, root)) return -1; // sort nodes depending on ascii to can index nodes with its ascii value // 以便下面进行索引 qsort(nodes, 256, sizeof(huffman_node_t), huffman_ascii_compare); output_bits = bits.curbyte * 8 + bits.curbits; for (i = 0; i < uncomprlen; i++) { if (bits_put_high(&bits, nodes[uncompr[i]].code_lengths, (unsigned char *)&nodes[uncompr[i]].code)) break; output_bits += nodes[uncompr[i]].code_lengths; } if (i != uncomprlen) return -1; *comprlen = ((output_bits + 8 - 1) & ~(8 - 1)) / 8; bits_flush(&bits); return 0; }
fa0b5ac9fb6f246ffc5da1cf39f4acd1ba064f67
5485ed975f43babd672bfb75de74013c31345ea9
/src/FLASH_prog.c
3d979c36191fc0af410ede8f51978ac04355674a
[]
no_license
KhaledHamada1997/hex20
deef09c1cb8ff0ffdf86cbf7d65a9d220891fd49
d6187379632d56edb597bdf30dab91fa449c3c73
refs/heads/master
2020-09-05T19:12:31.765122
2019-11-07T08:45:50
2019-11-07T08:45:50
220,189,748
0
0
null
null
null
null
UTF-8
C
false
false
7,308
c
FLASH_prog.c
/* * FLASH_prog.c * * Created on: Sep 26, 2019 * Author: sondo */ #include "util.h" #include "STD_Types.h" //#include "DEBUG_int.h" #include "FLASH_priv.h" #include "FLASH_cfg.h" #include "FLASH_int.h" /*****************************************/ /***********Public Variables**************/ /*****************************************/ const u8 u8Version[]= "V02"; /*****************************************/ /***********Public Functions**************/ /*****************************************/ /****************************************************************************************/ /* Description: Log the Driver Version */ /* Input : Void */ /* Output : Void */ /* Scope : Public */ /****************************************************************************************/ //void Flash_vidGetVersionInfo(void) //{ // Debug_LogVersion(u8Version); //} /****************************************************************************************/ /* Description: Write one word in the Flash Memory */ /* Input : u32* pu32address */ /* Description: Address to write in the flash */ /* u32 u32value */ /* Description: Word to write in flash */ /* Output : Void */ /* Scope : Public */ /****************************************************************************************/ void FLASH_vidWriteWord(u32* pu32address, u32 u32value) { u16* address = (u16*)pu32address; /* Perform Unlock Sequence */ if (GET_BIT(FLASH_CR,LOCK) == FLASH_u8LOCKED) { FLASH_KEYR = FLASH_u32KEY1; FLASH_KEYR = FLASH_u32KEY2; } /* Set Programming Bit */ SET_BIT(FLASH_CR, PG); /* Put first half-word int he address */ *address = (u16)(u32value & HALFWORDMASK); /* Wait for the busy flag */ while (GET_BIT(FLASH_SR,BSY) == FLASH_u8BSY); /* Write second half-word in the address */ *(address+1) = (u16)(u32value >> HALFWORDOFFSET); /* Wait for busy bit */ while (GET_BIT(FLASH_SR,BSY) == FLASH_u8BSY); /* Reset programming Bit */ CLR_BIT(FLASH_CR,PG); } /****************************************************************************************/ /* Description: Write an array in the Flash memory */ /* Input : u32* pu32address */ /* Description: address to write in the flash */ /* u32* pu32array */ /* Description:array address to write in flash */ /* u8 u8arraysize */ /* Description: Size of the array to write in the flash */ /* Output : Void */ /* Scope : Public */ /****************************************************************************************/ void FLASH_vidWriteArray(u32* pu32address, u32* pu32array, u8 u8arraysize) { u8 u8counter = 0; u16* address = (u16*)pu32address; /* Perform Unlock Sequence */ if (GET_BIT(FLASH_CR,LOCK) == FLASH_u8LOCKED) { FLASH_KEYR = FLASH_u32KEY1; FLASH_KEYR = FLASH_u32KEY2; } /* Set Programming Bit */ SET_BIT(FLASH_CR, PG); for (u8counter = 0 ; u8counter < u8arraysize; u8counter++) { /* Put first half-word in the address */ *(address+(u8counter*2)) = (u16)(pu32array[u8counter] & HALFWORDMASK); /* Wait for the busy flag */ while (GET_BIT(FLASH_SR,BSY) == FLASH_u8BSY); /* Write second half-word in the address */ *(address+1+(u8counter*2)) = (u16)(pu32array[u8counter] >> HALFWORDOFFSET); /* Wait for busy bit */ while (GET_BIT(FLASH_SR,BSY) == FLASH_u8BSY); } /* Reset programming Bit */ CLR_BIT(FLASH_CR,PG); } /****************************************************************************************/ /* Description: Erase Page in Flash Memory */ /* Input : u8 u8PageNumber */ /* Description: Page to erase in the Flash */ /* Range: 0 ~ 127 */ /* Output : Void */ /* Scope : Public */ /****************************************************************************************/ void FLASH_vidErasePage(u8 u8PageNumber) { u32 u32FlashBaseAddress = FLASH_u32BASEADDRESS; /* Perform Unlock Sequence */ if (GET_BIT(FLASH_CR,LOCK) == FLASH_u8LOCKED) { FLASH_KEYR = FLASH_u32KEY1; FLASH_KEYR = FLASH_u32KEY2; } /* Set Erase Bit */ SET_BIT(FLASH_CR, PER); /* Wait for busy bit */ while (GET_BIT(FLASH_SR,BSY) == FLASH_u8BSY); /* Write page address in the Address Register*/ FLASH_AR = u32FlashBaseAddress + (u32)(FLASH_u16PAGESIZE * (u16)u8PageNumber); /* Set Start Bit */ SET_BIT(FLASH_CR, STRT); /* Wait for Busy Flag */ while (GET_BIT(FLASH_SR,BSY) == FLASH_u8BSY); /* Reset Erase Bit */ CLR_BIT(FLASH_CR, PER); } /****************************************************************************************/ /* Description: Read one word from the Flash Memory */ /* Input : u32* pu32address */ /* Description: Address to read in the flash */ /* Output : Void */ /* Scope : Public */ /****************************************************************************************/ u32 FLASH_u32ReadWord(u32* pu32address) { return *(pu32address); } /****************************************************************************************/ /* Description: Read an array from the Flash memory */ /* Input : u32* pu32address */ /* Description: address to read from the flash */ /* u32* pu32array */ /* Description:array address to put in data from flash */ /* u8 u8arraysize */ /* Description: Size of the array to read from the flash */ /* Output : Void */ /* Scope : Public */ /****************************************************************************************/ void FLASH_vidReadArray(u32* pu32address, u32* pu32array, u8 u8arraysize) { u8 u8counter = 0; for (u8counter = 0; u8counter < u8arraysize; u8counter++) { pu32array[u8counter] = *(pu32address + u8counter); } }
4c272efd634f889a3cda8614251cfc45b6f4afda
f05532559afa1277f249885da90a5339c11dc9a5
/chapter_10_array_pointer/10.12_review_questions/p_3.c
ca962d7ccceaa6d0d87f07b743f013081c64c692
[]
no_license
MonsterDragon/c-cplus_study
76a7a3b7896a4b6f74c708a986e70a08e356f963
7005b51d54a934740419532874fadb9b7514fb31
refs/heads/master
2020-06-16T07:39:24.925890
2020-01-19T15:32:42
2020-01-19T15:32:42
195,514,274
1
0
null
null
null
null
UTF-8
C
false
false
581
c
p_3.c
/* p_3.c -- 第四题b */ #include <stdio.h> int main(void) { int * ptr; int fort[2][2] = { {12}, {15, 16} }; ptr = fort[0]; printf("&ptr == fort = %p, fort[1] = %p\n", fort, fort[1]); printf("*fort = %p, *fort[1] = %d, *fort[1][1] = %d\n", *fort, *fort[1], fort[1][1]); printf("*ptr = %d, *ptr + 1 = %d, *ptr + 2 = %d\n", *ptr, *ptr + 1, *ptr + 2); printf("*ptr = %d, *(ptr + 1) = %d, *(ptr + 2) = %d\n", *ptr, *(ptr + 1), *(ptr + 2)); printf("fort[0] = %p, &fort[0][1] = %p, fort[1] = %p, &fort[1][1] = %p\n", fort[0], &fort[0][1], fort[1], &fort[1][1]); return 0; }
238454cac939a87efebb06c72a90f41a068ee519
f3d72801dba90a1dd6c59d216ee7b2a11441ca1a
/ClientSelf.c
84adfb984b72676282048e71aba1d54d61277997
[]
no_license
Kusfaizlul/Lab-4
f1e2cb25942bb9955faa73e141f92c1fe716ef74
e3b1cf3ddb46fd7156c841cd6a7ff05ed6926fd5
refs/heads/master
2023-01-09T05:47:39.520894
2020-11-11T06:12:57
2020-11-11T06:12:57
310,299,155
0
0
null
null
null
null
UTF-8
C
false
false
1,986
c
ClientSelf.c
#include<stdio.h> #include<sys/socket.h> #include<arpa/inet.h> #include<string.h> #include<unistd.h> #include<stdlib.h> int main(int argc, char *argv[]){ int soc; struct sockaddr_in server; char serply[2000],msg[2000],temp[10] = "Client 1" ,k[] = "STOP"; //Creating socket soc = socket(AF_INET,SOCK_STREAM,0); if (soc == -1 ){ perror("\n Creating Socket Error "); exit(EXIT_FAILURE); } server.sin_addr.s_addr = inet_addr("192.168.14.10"); server.sin_family = AF_INET; server.sin_port = htons(8190); //Connect to remote server if (connect(soc ,(struct sockaddr *)&server ,sizeof(server)) < 0) { perror("\n Connection error "); close(soc); exit(EXIT_FAILURE); } puts("\n---- Congrats!Your socket is connected ----"); puts(" Enter 'stop' to stop chating " ); send(soc,temp,sizeof(temp),0); int i = 0; while(1){ if ( i == 0){ printf(" Say Hi : ");} else printf("\n Reply : "); fgets(msg,sizeof(msg),stdin); if ( send(soc ,msg,2000,0) < 0 ){ perror("\n Send failed\n"); close(soc); exit(EXIT_FAILURE); } if (strcmp(msg,"stop\n") == 0){ // If user input stop the program will exit printf("\n --- BYE BYE --- \n"); break; } //Receive a reply from the server if ( recv(soc, serply , 2000 , 0 ) < 0 ){ perror("\n Receving Failed\n"); close(soc); exit(EXIT_FAILURE); } printf("\n Server : %s ",serply); i = 1; } }
cf4680486d2d86a2a63e7175559f570bcd61b125
0605b9fa82fae8785baa2583e78baffa12e5eb83
/src/heap/hh_shared.c
3e8ee2e891a9d2bdcad48b03deceb66911fe7734
[ "MIT", "CC-BY-4.0" ]
permissive
facebook/flow
18f01601a72f61c1f6736782e992387487689300
7b17e57edec4d6a3db43c012ad2d39fafc5b2513
refs/heads/main
2023-09-01T11:48:01.965821
2023-09-01T04:16:56
2023-09-01T04:16:56
25,880,891
21,810
2,453
MIT
2023-09-10T00:33:03
2014-10-28T17:17:45
OCaml
UTF-8
C
false
false
68,317
c
hh_shared.c
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /*****************************************************************************/ /* File Implementing the shared memory system for Hack. * * THIS CODE ONLY WORKS WITH HACK, IT MAY LOOK LIKE A GENERIC ATOMIC * HASHTABLE FOR OCAML: IT IS NOT! * BUT ... YOU WERE GOING TO SAY BUT? BUT ... * THERE IS NO BUT! DONNY YOU'RE OUT OF YOUR ELEMENT! * * The lock-free data structures implemented here only work because of how the * Hack phases are synchronized. * * The hashtable maps string keys to string values. (The strings are really * serialized / marshalled representations of OCaml structures.) Key observation * of the table is that data with the same key are considered equivalent, and so * you can arbitrarily get any copy of it; furthermore if data is missing it can * be recomputed, so incorrectly saying data is missing when it is being written * is only a potential perf loss. Note that "equivalent" doesn't necessarily * mean "identical", e.g., two alpha-converted types are "equivalent" though not * literally byte- identical. (That said, I'm pretty sure the Hack typechecker * actually does always write identical data, but the hashtable doesn't need * quite that strong of an invariant.) * * The operations implemented, and their limitations: * * -) Concurrent writes: SUPPORTED One will win and the other will get * dropped on the floor. There is no way to tell which happened. Only promise * is that after a write, the one thread which did the write will see data in * the table (though it may be slightly different data than what was written, * see above about equivalent data). * * -) Concurrent reads: SUPPORTED If interleaved with a concurrent write, the * read will arbitrarily say that there is no data at that slot or return the * entire new data written by the concurrent writer. * * -) Concurrent removes: NOT SUPPORTED Only the master can remove, and can * only do so if there are no other concurrent operations (reads or writes). * * Since the values are variably sized and can get quite large, they are * stored separately from the hashes in a garbage-collected heap. * * Hash collisions are resolved via linear probing. */ /*****************************************************************************/ /* define CAML_NAME_SPACE to ensure all the caml imports are prefixed with * 'caml_' */ #define CAML_NAME_SPACE #include <caml/alloc.h> #include <caml/bigarray.h> #include <caml/callback.h> #include <caml/fail.h> #include <caml/intext.h> #include <caml/memory.h> #include <caml/mlvalues.h> #include <caml/unixsupport.h> #ifdef _WIN32 #include <windows.h> #else #define _GNU_SOURCE 1 #include <fcntl.h> #include <signal.h> #include <stdio.h> #include <string.h> #include <sys/errno.h> #include <sys/mman.h> #include <sys/syscall.h> #include <sys/types.h> #include <unistd.h> #endif #include <inttypes.h> #include <limits.h> #include <lz4.h> #include <stdalign.h> #include <sys/time.h> #include <time.h> #include "hh_assert.h" // Ideally these would live in a handle.h file but our internal build system // can't support that at the moment. These are shared with handle_stubs.c #ifdef _WIN32 #define Val_handle(fd) (win_alloc_handle(fd)) #else #define Handle_val(fd) (Long_val(fd)) #define Val_handle(fd) (Val_long(fd)) #endif /**************************************************************************** * Quoting the linux manpage: memfd_create() creates an anonymous file * and returns a file descriptor that refers to it. The file behaves * like a regular file, and so can be modified, truncated, * memory-mapped, and so on. However, unlike a regular file, it lives * in RAM and has a volatile backing storage. Once all references to * the file are dropped, it is automatically released. Anonymous * memory is used for all backing pages of the file. Therefore, files * created by memfd_create() have the same semantics as other * anonymous memory allocations such as those allocated using mmap(2) * with the MAP_ANONYMOUS flag. The memfd_create() system call first * appeared in Linux 3.17. ****************************************************************************/ #ifdef __linux__ #define MEMFD_CREATE 1 // glibc only added support for memfd_create in version 2.27. #ifndef MFD_CLOEXEC // Linux version for the architecture must support syscall memfd_create #ifndef SYS_memfd_create #if defined(__x86_64__) #define SYS_memfd_create 319 #elif defined(__powerpc64__) #define SYS_memfd_create 360 #elif defined(__aarch64__) #define SYS_memfd_create 385 #else #error "hh_shared.c requires an architecture that supports memfd_create" #endif #endif #include <asm/unistd.h> /* Originally this function would call uname(), parse the linux * kernel release version and make a decision based on whether * the kernel was >= 3.17 or not. However, syscall will return -1 * with an strerr(errno) of "Function not implemented" if the * kernel is < 3.17, and that's good enough. */ static int memfd_create(const char* name, unsigned int flags) { return syscall(SYS_memfd_create, name, flags); } #endif #endif #ifndef MAP_NORESERVE // This flag was unimplemented in FreeBSD and then later removed #define MAP_NORESERVE 0 #endif #ifdef _WIN32 static int win32_getpagesize(void) { SYSTEM_INFO siSysInfo; GetSystemInfo(&siSysInfo); return siSysInfo.dwPageSize; } #define getpagesize win32_getpagesize #endif /* Too lazy to use getconf */ #define CACHE_LINE_SIZE (1 << 6) #define WORD_SIZE sizeof(value) #define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1) #define CACHE_ALIGN(x) ALIGN(x, CACHE_LINE_SIZE) #define WORD_ALIGN(x) ALIGN(x, WORD_SIZE) /* Each process reserves a range of values at a time from the shared counter. * Should be a power of two for more efficient modulo calculation. */ #define COUNTER_RANGE 2048 /*****************************************************************************/ /* Types */ /*****************************************************************************/ /* Convention: bsize = size in bytes, wsize = size in words. */ // Locations in the heap are encoded as byte offsets from the beginning of the // hash table. Because all data in the heap is word-aligned, these offsets will // always have 0 in the 3 low bits. // // Currently, we rely on the least significant bit being 0 to distinguish these // addresses from headers. Eventually we may want to rely on the 2 lower bits, // to represent 4 states in the GC tags instead of 3 (e.g., a gray color state // for incremental marking.) // // Note that the offsets do not start at the beginning of the heap, but the // start of the hash table. This has two important implications: // // 1. The offset 0 will always point to the hash of the first hash table entry, // which is never a meaningful offset. Because of this, we can take the address // 0 to be the "null" address. // // 2. During garbage collection, it is necessary to point from the heap to the // hash table itself, since we temporarily store heap headers in the addr field // of helt_t. By starting the offsets at the beginning of the hash table, we can // represent offsets into the hash table itself. typedef uintnat addr_t; // A field is either an address or a tagged integer, distinguished by low bit. typedef uintnat field_t; typedef struct { /* Layout information, used by workers to create memory mappings. */ size_t locals_bsize; size_t hashtbl_bsize; size_t heap_bsize; size_t shared_mem_bsize; /* Maximum number of hashtable elements */ size_t hashtbl_slots; /* Where the heap started (bottom), offset from hashtbl pointer */ addr_t heap_init; /* Where the heap will end (top), offset from hashtbl pointer */ addr_t heap_max; uintnat gc_phase; /* When we start a GC, we record the heap pointer here. We use this to * identify allocations performed during marking. These objects are not * explicitly marked, but are treated as reachable during the current * collection pass. * * This address should always fall between info->heap_init and info->heap. * This invariant is set up in hh_shared_init and maintained in * hh_start_cycle. */ addr_t gc_end; /* Bytes which are free (color=Blue). This quantity is initially 0 and * incremented during the GC sweep phase. The number will increase * monotonically until compaction, when all free space is reclaimed. */ uintnat free_bsize; /* Transaction counter. Entities being written by the current transaction will * have an entity version >= this counter. Committed entities will have a * version < this counter. */ intnat next_version; /* Logging level for shared memory statistics * 0 = nothing * 1 = log totals, averages, min, max bytes marshalled and unmarshalled * 2+ = log size of deserialized values in OCaml heap */ size_t log_level; /* Initially 0; set to 1 to signal that workers should cancel */ size_t workers_should_cancel; /* A counter increasing globally across all forks. */ alignas(128) uintnat counter; /* The number of nonempty slots in the hashtable. A nonempty slot has a * non-zero hash. We never clear hashes so this monotonically increases */ alignas(128) uintnat hcounter; /* The number of nonempty filled slots in the hashtable. A nonempty filled * slot has a non-zero hash AND a non-null addr. It increments when we write * data into a slot with addr==NULL and decrements when we clear data from a * slot */ alignas(128) uintnat hcounter_filled; /* The top of the heap, offset from hashtbl pointer */ alignas(128) addr_t heap; /* Head of the mark stack. */ alignas(128) uintnat mark_ptr; } shmem_info_t; /* Per-worker data which can be quickly updated non-atomically. Will be placed * in cache-aligned array in the first few pages of shared memory, indexed by * worker id. * * The first member of this struct is over-aligned to ensure that each element * of the global locals array is on a separate cache line. */ typedef struct { alignas(128) uint64_t counter; } local_t; // Every heap entry starts with a 64-bit header with the following layout: // // 6 3 0 0 0 00 // 3 6 8 7 2 10 // +-------------------------------+--------------------------------+------+--+ // |11111111 11111111 11111111 1111|1111 11111111 11111111 11111111 |111111|11| // +-------------------------------+--------------------------------+------+--+ // | | | | // | | | * 0-1 // | | | GC // | | * 2-7 tag // | * 31-1 decompress capacity (in words) // * 63-32 compressed size (in words) // // For GC, to distinguish headers from (word-aligned) pointers, the least bits // are never 00. The remaining 6 bits of the low word are used to encode a tag, // describing the type of object. // // For serialized objects (tag = 0), the remaining 7 bytes of the header word // encode two sizes, as outlined above, but other kinds of objects can use these // bytes differently, as long as it's possible to recover the size of the heap // object -- i.e., implement Obj_wosize, below. typedef uintnat hh_header_t; // The reserved header bits contain a tag used to distinguish between different // object layouts and find pointers within the object. typedef uintnat hh_tag_t; // Keep these in sync with "tag" type definition in sharedMem.ml #define Entity_tag 0 #define Heap_string_tag 13 #define Serialized_tag 19 static _Bool should_scan(hh_tag_t tag) { // The zero tag represents "entities" which need to be handled specially. // Callers to this function should first check for 0. assert(tag != Entity_tag); // By convention, only tags below Heap_string_tag contain pointers. We can // exploit this fact to reduce pointer finding to a single branch. // // In the future, if we add different layouts with a mixture of pointers and // other data, scanning for pointers will probably require a jump table. return tag < Heap_string_tag; } #define NULL_ADDR 0 #define Addr_of_ptr(entry) ((char*)(entry) - (char*)hashtbl) #define Ptr_of_addr(addr) ((char*)hashtbl + (addr)) #define Entry_of_addr(addr) ((heap_entry_t*)Ptr_of_addr(addr)) #define Deref(addr) (*(uintnat*)(Ptr_of_addr(addr))) /* also an l-value */ // During GC, we read words from the heap which might be an addr or a header, // and we need to distinguish between them. #define Is_addr(x) (((x)&0b11) == 0) // The low 2 bits of headers are reserved for GC. The white bit pattern // denotes an unmarked object, black denotes a marked object, and blue denotes a // free object. #define Color_white 0b01 #define Color_black 0b11 #define Color_blue 0b10 #define Color_hd(hd) ((hd)&0b11) #define Is_white(hd) (Color_hd(hd) == Color_white) #define Is_black(hd) (Color_hd(hd) == Color_black) #define Is_blue(hd) (Color_hd(hd) == Color_blue) #define White_hd(hd) (((hd) & ~0b11) | Color_white) #define Black_hd(hd) ((hd) | Color_black) #define Blue_hd(hd) (((hd) & ~0b11) | Color_blue) // Object headers contain a mark bit, tag, and size information. Objects with // the serialized tag contain the size information in a slightly different place // from other objects, so we need to look up the tag to read the size. #define Obj_tag(hd) (((hd) >> 2) & 0x3F) #define Obj_wosize_shift(tag) ((tag) < Serialized_tag ? 8 : 36) #define Obj_wosize_tag(hd, tag) ((hd) >> Obj_wosize_shift(tag)) #define Obj_wosize(hd) (Obj_wosize_tag(hd, Obj_tag(hd))) #define Obj_whsize(hd) (1 + Obj_wosize(hd)) #define Obj_bosize(hd) (Bsize_wsize(Obj_wosize(hd))) #define Obj_bhsize(hd) (Bsize_wsize(Obj_whsize(hd))) // Addrs point to the object header, so field 0 is +1 word. We should consider // making addrs point to the first field, and accessing the header at a -1 word // offset instead. #define Obj_field(addr, i) ((addr) + ((i) + 1) * WORD_SIZE) // Each heap entry starts with a word-sized header. The header encodes the size // (in words) of the entry in the heap and the capacity (in words) of the buffer // needed to decompress the entry. #define Entry_wsize(header) ((header) >> 36) #define Entry_decompress_capacity(header) \ (Bsize_wsize(((header) >> 8) & 0xFFFFFFF)) // The distance (in bytes) from one hh_entry_t* to the next. Entries are laid // out contiguously in memory. #define Heap_entry_slot_size(header) \ (sizeof(heap_entry_t) + Bsize_wsize(Entry_wsize(header))) /* Shared memory structures. hh_shared.h typedefs this to heap_entry_t. */ typedef struct { hh_header_t header; char data[]; } heap_entry_t; /* The hash table supports lock-free writes by performing a 16-byte CAS, * ensuring that the hash and address are written together atomically. */ typedef struct { uint64_t hash; addr_t addr; } helt_t; /*****************************************************************************/ /* GC */ /*****************************************************************************/ // The possible values of info->gc_phase #define Phase_idle 0 #define Phase_mark 1 #define Phase_sweep 2 // The max size is explicit to avoid exhausting available memory in the event of // a programmer error. We should not hit this limit, or come close to it. It // might become necessary to handle a mark stack overflow without crashing, but // this is not implemented. #define MARK_STACK_INIT_SIZE 512 // 4096 KiB #define MARK_STACK_MAX_SIZE (MARK_STACK_INIT_SIZE << 16) // 256 MiB // Note: because collection only happens on the master process, the following // values are only maintained in the master process and updates will not be // reflected in workers. // The marking phase treats the shared hash table as GC roots, but these are // marked incrementally. Because we might modify the hash table between mark // slices, we insert a write barrier in hh_remove. static uintnat roots_ptr = 0; // Holds the current position of the sweep phase between slices. static addr_t sweep_ptr = NULL_ADDR; /*****************************************************************************/ /* Globals */ /*****************************************************************************/ /* Shared memory metadata */ static shmem_info_t* info = NULL; /* Beginning of shared memory */ static char* shared_mem = NULL; /* Worker-local storage is cache line aligned. */ static local_t* locals = NULL; /* Base of the mark stack. */ static addr_t* mark_stack = NULL; /* The hashtable containing the shared values. */ static helt_t* hashtbl = NULL; /* This should only be used before forking */ static uintnat early_counter = 0; /* This is a process-local value. The master process is 0, workers are numbered * starting at 1. This is an offset into the worker local values in the heap. */ static size_t worker_id = 0; static size_t worker_can_cancel = 1; CAMLprim value hh_used_heap_size(value unit) { CAMLparam1(unit); assert(info != NULL); CAMLreturn(Val_long(info->heap - info->heap_init)); } CAMLprim value hh_new_alloc_size(value unit) { CAMLparam1(unit); assert(info != NULL); CAMLreturn(Val_long(info->heap - info->gc_end)); } CAMLprim value hh_free_heap_size(value unit) { CAMLparam1(unit); assert(info != NULL); CAMLreturn(Val_long(info->free_bsize)); } CAMLprim value hh_gc_phase(value unit) { CAMLparam1(unit); assert(info != NULL); CAMLreturn(Val_long(info->gc_phase)); } CAMLprim value hh_log_level(value unit) { CAMLparam1(unit); assert(info != NULL); CAMLreturn(Val_long(info->log_level)); } CAMLprim value hh_next_version(value unit) { intnat v = 0; if (info) { v = info->next_version; } return Val_long(v); } CAMLprim value hh_commit_transaction(value unit) { CAMLparam1(unit); assert(info != NULL); info->next_version += 2; CAMLreturn(Val_unit); } CAMLprim value hh_hash_stats(value unit) { CAMLparam1(unit); CAMLlocal1(stats); stats = caml_alloc_tuple(3); Store_field(stats, 0, Val_long(info->hcounter)); Store_field(stats, 1, Val_long(info->hcounter_filled)); Store_field(stats, 2, Val_long(info->hashtbl_slots)); CAMLreturn(stats); } static void raise_failed_memfd_init(int errcode) { static const value* exn = NULL; if (!exn) exn = caml_named_value("failed_memfd_init"); caml_raise_with_arg(*exn, unix_error_of_code(errcode)); } #ifdef _WIN32 static HANDLE memfd; /************************************************************************** * We create an anonymous memory file, whose `handle` might be * inherited by subprocesses. * * This memory file is tagged "reserved" but not "committed". This * means that the memory space will be reserved in the virtual memory * table but the pages will not be bound to any physical memory * yet. Further calls to 'VirtualAlloc' will "commit" pages, meaning * they will be bound to physical memory. * * This is behavior that should reflect the 'MAP_NORESERVE' flag of * 'mmap' on Unix. But, on Unix, the "commit" is implicit. * * Committing the whole shared heap at once would require the same * amount of free space in memory (or in swap file). **************************************************************************/ static void memfd_init(size_t shared_mem_size) { memfd = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE | SEC_RESERVE, shared_mem_size >> 32, shared_mem_size & ((1ll << 32) - 1), NULL); if (memfd == NULL) { win32_maperr(GetLastError()); raise_failed_memfd_init(errno); } if (!SetHandleInformation(memfd, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT)) { win32_maperr(GetLastError()); raise_failed_memfd_init(errno); } } #else static int memfd = -1; /************************************************************************** * The memdfd_init function creates a anonymous memory file that might * be inherited by `Daemon.spawned` processus (contrary to a simple * anonymous mmap). * * The preferred mechanism is memfd_create(2) (see the upper * description). Then we try shm_open(3). * * The resulting file descriptor should be mmaped with the memfd_map * function (see below). ****************************************************************************/ static void memfd_init(size_t shared_mem_size) { #if defined(MEMFD_CREATE) memfd = memfd_create("fb_heap", 0); #endif if (memfd < 0) { char memname[255]; snprintf(memname, sizeof(memname), "/fb_heap.%d", getpid()); // the ftruncate below will fail with errno EINVAL if you try to // ftruncate the same sharedmem fd more than once. We're seeing this in // some tests, which might imply that two flow processes with the same // pid are starting up. This shm_unlink should prevent that from // happening. Here's a stackoverflow about it // http://stackoverflow.com/questions/25502229/ftruncate-not-working-on-posix-shared-memory-in-mac-os-x shm_unlink(memname); memfd = shm_open(memname, O_CREAT | O_RDWR, 0666); if (memfd < 0) { raise_failed_memfd_init(errno); } // shm_open sets FD_CLOEXEC automatically. This is undesirable, because // we want this fd to be open for other processes, so that they can // reconnect to the shared memory. int flags = fcntl(memfd, F_GETFD); if (flags == -1) { raise_failed_memfd_init(errno); } // Unset close-on-exec if (fcntl(memfd, F_SETFD, flags & ~FD_CLOEXEC) == -1) { raise_failed_memfd_init(errno); }; } if (ftruncate(memfd, shared_mem_size) == -1) { raise_failed_memfd_init(errno); } } #endif #ifdef _WIN32 static char* memfd_map(size_t size) { char* mem = NULL; mem = MapViewOfFile(memfd, FILE_MAP_ALL_ACCESS, 0, 0, size); if (mem == NULL) { win32_maperr(GetLastError()); uerror("MapViewOfFile", Nothing); } return mem; } #else static char* memfd_map(size_t size) { char* mem = NULL; /* MAP_NORESERVE is because we want a lot more virtual memory than what * we are actually going to use. */ int flags = MAP_SHARED | MAP_NORESERVE; int prot = PROT_READ | PROT_WRITE; mem = (char*)mmap(NULL, size, prot, flags, memfd, 0); if (mem == MAP_FAILED) { printf("Error initializing: %s\n", strerror(errno)); exit(2); } return mem; } #endif /**************************************************************************** * The function memfd_reserve force allocation of (mem -> mem+sz) in * the shared heap. This is mandatory on Windows. This is optional on * Linux but it allows to have explicit "Out of memory" error * messages. Otherwise, the kernel might terminate the process with * `SIGBUS`. ****************************************************************************/ static void raise_out_of_shared_memory(void) { static const value* exn = NULL; if (!exn) exn = caml_named_value("out_of_shared_memory"); caml_raise_constant(*exn); } #ifdef _WIN32 /* On Linux, memfd_reserve is only used to reserve memory that is mmap'd to the * memfd file. On Windows, this is required. */ static void memfd_reserve(char* base, char* mem, size_t sz) { (void)base; if (!VirtualAlloc(mem, sz, MEM_COMMIT, PAGE_READWRITE)) { win32_maperr(GetLastError()); raise_out_of_shared_memory(); } } #elif defined(__APPLE__) /* So OSX lacks fallocate, but in general you can do * fcntl(fd, F_PREALLOCATE, &store) * however it doesn't seem to work for a shm_open fd, so this function is * currently a no-op. This means that our OOM handling for OSX is a little * weaker than the other OS's */ static void memfd_reserve(char* base, char* mem, size_t sz) { (void)base; (void)mem; (void)sz; } #else static void memfd_reserve(char* base, char* mem, size_t sz) { off_t offset = (off_t)(mem - base); int err; do { err = posix_fallocate(memfd, offset, sz); } while (err == EINTR); if (err) { raise_out_of_shared_memory(); } } #endif static void map_info_page(int page_bsize) { // The first page of shared memory contains (1) size information describing // the layout of the rest of the shared file; (2) values which are atomically // updated by workers, like the heap pointer; and (3) various configuration // which is convenient to stick here, like the log level. assert(page_bsize >= sizeof(shmem_info_t)); info = (shmem_info_t*)memfd_map(page_bsize); } static void define_mappings(int page_bsize) { assert(info != NULL); size_t locals_bsize = info->locals_bsize; size_t mark_stack_max_bsize = MARK_STACK_MAX_SIZE * sizeof(mark_stack[0]); shared_mem = memfd_map(info->shared_mem_bsize); locals = (local_t*)(shared_mem + page_bsize); mark_stack = (addr_t*)(shared_mem + page_bsize + locals_bsize); hashtbl = (helt_t*)(shared_mem + page_bsize + locals_bsize + mark_stack_max_bsize); } static value alloc_heap_bigarray(void) { CAMLparam0(); CAMLlocal1(heap); int heap_flags = CAML_BA_CHAR | CAML_BA_C_LAYOUT | CAML_BA_EXTERNAL; intnat heap_dim[1] = {info->hashtbl_bsize + info->heap_bsize}; heap = caml_ba_alloc(heap_flags, 1, hashtbl, heap_dim); CAMLreturn(heap); } /*****************************************************************************/ /* Must be called by the master BEFORE forking the workers! */ /*****************************************************************************/ CAMLprim value hh_shared_init(value config_val, value num_workers_val) { CAMLparam2(config_val, num_workers_val); CAMLlocal1(result); int page_bsize = getpagesize(); /* Calculate layout information. We need to figure out how big the shared file * needs to be in order to create the file. We will also store enough of the * layout information in the first page of the shared file so that workers can * create mappings for the rest of the shared data. */ size_t num_workers = Long_val(num_workers_val); size_t locals_bsize = CACHE_ALIGN((1 + num_workers) * sizeof(local_t)); size_t hashtbl_slots = 1ul << Long_val(Field(config_val, 1)); size_t mark_stack_max_bsize = MARK_STACK_MAX_SIZE * sizeof(mark_stack[0]); size_t hashtbl_bsize = CACHE_ALIGN(hashtbl_slots * sizeof(helt_t)); size_t heap_bsize = Long_val(Field(config_val, 0)); /* The total size of the shared file must have space for the info page, local * data, the mark stack, the hash table, and the heap. */ size_t shared_mem_bsize = page_bsize + locals_bsize + mark_stack_max_bsize + hashtbl_bsize + heap_bsize; memfd_init(shared_mem_bsize); /* The info page contains (1) size information describing the layout of the * rest of the shared file; (2) values which are atomically updated by * workers, like the heap pointer; and (3) various configuration which is * conventient to stick here, like the log level. */ map_info_page(page_bsize); memfd_reserve((char*)info, (char*)info, page_bsize); info->locals_bsize = locals_bsize; info->hashtbl_bsize = hashtbl_bsize; info->heap_bsize = heap_bsize; info->shared_mem_bsize = shared_mem_bsize; info->hashtbl_slots = hashtbl_slots; info->heap_init = hashtbl_bsize; info->heap_max = info->heap_init + heap_bsize; info->gc_phase = Phase_idle; info->log_level = Long_val(Field(config_val, 2)); // Ensure the global counter starts on a COUNTER_RANGE boundary info->counter = ALIGN(early_counter + 1, COUNTER_RANGE); // Initialize top heap pointers info->heap = info->heap_init; // Invariant: info->heap_init <= info->gc_end <= info->heap // See declaration of gc_end info->gc_end = info->heap; define_mappings(page_bsize); // Reserve memory for locals, the initial mark stack, and hashtbl. // This is required on Windows. memfd_reserve(shared_mem, (char*)locals, locals_bsize); memfd_reserve( shared_mem, (char*)mark_stack, MARK_STACK_INIT_SIZE * sizeof(mark_stack[0])); memfd_reserve(shared_mem, (char*)hashtbl, hashtbl_bsize); #ifdef MADV_DONTDUMP // We are unlikely to get much useful information out of the shared heap in // a core file. Moreover, it can be HUGE, and the extensive work done dumping // it once for each CPU can mean that the user will reboot their machine // before the much more useful stack gets dumped! madvise(hashtbl, hashtbl_bsize + heap_bsize, MADV_DONTDUMP); #endif #ifndef _WIN32 // Uninstall ocaml's segfault handler. It's supposed to throw an exception on // stack overflow, but we don't actually handle that exception, so what // happens in practice is we terminate at toplevel with an unhandled exception // and a useless ocaml backtrace. A core dump is actually more useful. Sigh. struct sigaction sigact = {0}; sigact.sa_handler = SIG_DFL; sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; sigaction(SIGSEGV, &sigact, NULL); #endif result = caml_alloc_tuple(2); Store_field(result, 0, alloc_heap_bigarray()); Store_field(result, 1, Val_handle(memfd)); CAMLreturn(result); } /* Must be called by every worker before any operation is performed */ value hh_connect(value handle_val, value worker_id_val) { CAMLparam2(handle_val, worker_id_val); memfd = Handle_val(handle_val); worker_id = Long_val(worker_id_val); // Avoid confusion with master process, which is designated 0 assert(worker_id > 0); int page_bsize = getpagesize(); map_info_page(page_bsize); define_mappings(page_bsize); CAMLreturn(alloc_heap_bigarray()); } /*****************************************************************************/ /* Counter * * Provides a counter intended to be increasing over the lifetime of the program * including all forks. Uses a global variable until hh_shared_init is called, * so it's safe to use in the early init stages of the program (as long as you * fork after hh_shared_init of course). Wraps around at the maximum value of an * ocaml int, which is something like 30 or 62 bits on 32 and 64-bit * architectures respectively. */ /*****************************************************************************/ CAMLprim value hh_counter_next(value unit) { CAMLparam1(unit); CAMLlocal1(result); uintptr_t v = 0; if (info) { v = locals[worker_id].counter; if (v % COUNTER_RANGE == 0) { v = __atomic_fetch_add(&info->counter, COUNTER_RANGE, __ATOMIC_RELAXED); } ++v; locals[worker_id].counter = v; } else { v = ++early_counter; } result = Val_long(v % Max_long); // Wrap around. CAMLreturn(result); } /*****************************************************************************/ /* There are a bunch of operations that only the designated master thread is * allowed to do. This assert will fail if the current process is not the master * process */ /*****************************************************************************/ static void assert_master(void) { assert(worker_id == 0); } static void assert_not_master(void) { assert(worker_id != 0); } /*****************************************************************************/ CAMLprim value hh_stop_workers(value unit) { CAMLparam1(unit); assert_master(); info->workers_should_cancel = 1; CAMLreturn(Val_unit); } CAMLprim value hh_resume_workers(value unit) { CAMLparam1(unit); assert_master(); info->workers_should_cancel = 0; CAMLreturn(Val_unit); } CAMLprim value hh_set_can_worker_stop(value val) { CAMLparam1(val); worker_can_cancel = Bool_val(val); CAMLreturn(Val_unit); } CAMLprim value hh_get_can_worker_stop(value unit) { CAMLparam1(unit); CAMLreturn(Val_bool(worker_can_cancel)); } static void check_should_cancel(void) { assert(info != NULL); if (worker_can_cancel && info->workers_should_cancel) { static const value* exn = NULL; if (!exn) exn = caml_named_value("worker_should_cancel"); caml_raise_constant(*exn); } } CAMLprim value hh_check_should_cancel(value unit) { CAMLparam1(unit); check_should_cancel(); CAMLreturn(Val_unit); } /*****************************************************************************/ /* GC: Incremental Mark and Sweep * * Before compacting the heap, we must first find all live values. We can mark * all live values in the heap by starting with the root objects in the hash * table, then traversing the graph of all reachable objects from those roots. * * To avoid long pauses, we do this work incrementally. Between commands, we * perform "slices" of mark and sweep work. After a slice of work, we return * back to the server, which can either handle another request of perform * another slice. * * Because the program can modify the heap between slices of mark and sweep, we * need to be careful that all reachable objects are marked. We use a shapshot- * at-the-beginning approach, which ensures that all reachable objects at the * beginning of GC pass are marked. We also use an "allocate black" strategy, * meaning that any new objects allocated during a collection are considered * reachable. * * For snapshot-at-the-beginning, we use a Yuasa style deletion barrier. If a * field is modified during collection, the "old" reference is added to the mark * stack. The only modification that happens during a GC pass is hh_remove, * which is only called from the main server process, meaning we don't need to * store the mark stack in shared memory. * * The "allocate black" strategy is a bit non-standard. Because the shared heap * is a bump allocator, we don't actually use the black color for new * allocations. Instead, we record the location of the heap pointer at the * beginning of a collection. Any addresses below that address need to be * marked, while any addresses above that address are assumed to be live. */ /*****************************************************************************/ // Trigger the start of a new cycle (idle -> mark) CAMLprim value hh_start_cycle(value unit) { CAMLparam1(unit); assert(info->gc_phase == Phase_idle); info->gc_end = info->heap; roots_ptr = 0; sweep_ptr = info->heap_init; info->gc_phase = Phase_mark; CAMLreturn(Val_unit); } CAMLnoreturn_start static void mark_stack_overflow() CAMLnoreturn_end; static void mark_stack_overflow() { caml_failwith("mark_stack_resize: could not allocate space for mark stack"); } // Check if the mark stack needs to be resized // // The mark stack has an initial size of 4KiB. When we reach the end of the mark // stack, we double the size until we reach the maximum size of 256MiB. Notice // that the capacity of the mark stack is always a power of 2. // // The expression `x & (-x)` returns the least set bit in `x`. When this number // is equal to `x`, we know that `x` is a power of 2. // // Thus, when the mark stack pointer is a power of 2, we know that we are at // capacity and need to resize. We resize by doubling the capacity. // // Note that this operation is idempotent because `memfd_reserve` is idempotent. static void mark_stack_try_resize(uintnat mark_ptr) { if (mark_ptr >= MARK_STACK_INIT_SIZE && ((mark_ptr & (-mark_ptr)) == mark_ptr)) { if (mark_ptr == MARK_STACK_MAX_SIZE) { mark_stack_overflow(); } // Double the size of the mark stack by reserving `mark_ptr` amount of space // starting at `mark_ptr`. memfd_reserve( shared_mem, (char*)&mark_stack[mark_ptr], mark_ptr * sizeof(mark_stack[0])); } } // When an address is overwritten during the mark phase, we add the old value to // the mark stack. This function can be called concurrently from workers when // they modify the heap. static void write_barrier(addr_t old) { if (old != NULL_ADDR && info->gc_phase == Phase_mark && old < info->gc_end) { hh_header_t hd = Deref(old); if (Is_white(hd)) { // Color the object black. Note that two workers might both enter this // branch for the same value. Both workers will color the object black and // both workers will add the value to the mark stack. // // This is okay, because marking is idempotent. Deref(old) = Black_hd(hd); // Add to mark stack. We need a CAS here instead of simply a fetch-add // because we need to know whether to resize the mark stack. // // We resize the mark stack at power-of-2 boundaries. Note that two // workers might observe the same power-of-2 value for mark_ptr, and both // try to resize. This is okay because `mark_stack_try_resize` is // idempotent. uintnat mark_ptr = __atomic_load_n(&info->mark_ptr, __ATOMIC_ACQUIRE); while (1) { mark_stack_try_resize(mark_ptr); if (__atomic_compare_exchange_n( &info->mark_ptr, &mark_ptr, mark_ptr + 1, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) { mark_stack[mark_ptr] = old; break; } } } } } // Add a reachable object to the mark stack. // // Objects allocated during marking will have an address greater than gc_end // and are treated as reachable. This is morally an "allocate black" scheme, // except we allocate white to avoid needing to sweep. Because we allocate // white and don't sweep these addresses, it's important that they are not // darkened. static inline void mark_slice_darken(field_t fld) { if ((fld & 1) == 0 && fld != NULL_ADDR && fld < info->gc_end) { hh_header_t hd = Deref(fld); if (Is_white(hd)) { Deref(fld) = Black_hd(hd); uintnat mark_ptr = info->mark_ptr; mark_stack_try_resize(mark_ptr); mark_stack[mark_ptr] = fld; info->mark_ptr = mark_ptr + 1; } } } // Entities have a committed value and potentially a "latest" value which is // being written by the current transaction. There are two cases: // // 1. entity_version < next_version // // The data at `entity_version & 1` is the committed value and is reachable. // The other slot is unreachable. // // 2. entity_version >= next_version // // The data at `entity_version & 1` is the latest value and is reachable. The // other slot is the committed and is also reachable. static void mark_entity(addr_t v, intnat next_version) { intnat entity_version = Deref(Obj_field(v, 2)); mark_slice_darken(Deref(Obj_field(v, entity_version & 1))); if (entity_version >= next_version) { mark_slice_darken(Deref(Obj_field(v, ~entity_version & 1))); } } // Perform a bounded amount of marking work, incrementally. During the marking // phase, this function is called repeatedly until marking is complete. Once // complete, this function will transition to the sweep phase. // // This function will mark at most `work` words before returning. This includes // the hash table and heap. CAMLprim value hh_mark_slice(value work_val) { CAMLparam1(work_val); assert(info->gc_phase == Phase_mark); // We are able to partially scan an object for pointers and resume scanning in // a subsequent slice. This is useful in the event of large objects which // would otherwise cause long pauses if we needed to scan them all at once. // // If we stop in the middle of an object, we will store the address of that // object and the index of the field where we should resume. Otherwise, these // values will be NULL_ADDR and 0 respectively. static addr_t current_value = NULL_ADDR; static uintnat current_index = 0; intnat work = Long_val(work_val); intnat hashtbl_slots = info->hashtbl_slots; intnat next_version = info->next_version; addr_t v; hh_header_t hd; hh_tag_t tag; uintnat i, size, start, end; // If the previous slice stopped in the middle of scanning an object, the // first thing we do in this slice is resume scanning where we left off. v = current_value; start = current_index; // Work through the mark stack, scanning all gray objects for pointers. // Because roots are colored gray but not added to the mark stack, also walk // the heap to find marked roots. while (work > 0) { if (v == NULL_ADDR && info->mark_ptr > 0) { v = mark_stack[--info->mark_ptr]; work--; // header word } if (v != NULL_ADDR) { hd = Deref(v); tag = Obj_tag(hd); size = Obj_wosize_tag(hd, tag); if (tag == Entity_tag) { mark_entity(v, next_version); v = NULL_ADDR; start = 0; work -= size; } else if (should_scan(tag)) { // Avoid scanning large objects all at once end = start + work; if (size < end) { end = size; } work -= end - start; for (i = start; i < end; i++) { mark_slice_darken(Deref(Obj_field(v, i))); } if (end < size) { // We did not finish scanning this object. We will resume scanning // this object in the next slice. start = end; } else { v = NULL_ADDR; start = 0; } } else { v = NULL_ADDR; work -= size; } } else if (roots_ptr < hashtbl_slots) { // Visit roots in shared hash table mark_slice_darken(hashtbl[roots_ptr++].addr); work--; } else { // Done marking, transition to sweep phase. info->gc_phase = Phase_sweep; break; } } current_value = v; current_index = start; CAMLreturn(Val_long(work)); } // Perform a bounded amount of sweeping work, incrementally. During the sweeping // phase, this function is called repeatedly until sweeping is complete. Once // complete, this function will transition to the idle phase. CAMLprim value hh_sweep_slice(value work_val) { CAMLparam1(work_val); assert(info->gc_phase == Phase_sweep); intnat work = Long_val(work_val); while (work > 0) { if (sweep_ptr < info->gc_end) { uintnat hd = Deref(sweep_ptr); uintnat whsize = Obj_whsize(hd); uintnat bhsize = Bsize_wsize(whsize); switch (Color_hd(hd)) { case Color_white: Deref(sweep_ptr) = Blue_hd(hd); info->free_bsize += bhsize; break; case Color_black: Deref(sweep_ptr) = White_hd(hd); break; case Color_blue: break; } sweep_ptr += bhsize; work -= whsize; } else { // Done sweeping info->gc_phase = Phase_idle; break; } } CAMLreturn(Val_long(work)); } /*****************************************************************************/ /* GC: Compact * * We collect the shared heap by compacting: moving live values "to the left" * until there is no more free space. We can then continue to bump allocate from * the end. * * The compaction algorithm is a Jonkers collector which performs the compaction * "in place" without allocating additional memory to maintain state. * * The algorithm is published, unfortunately, behind a costly subscription. * https://doi.org/10.1016/0020-0190(79)90103-0 * * Happily, an excellent description of the algorithm can be found in a freely * accessible paper by Benedikt Meurer, along with an extension for interior * pointers which is unused here: * https://benediktmeurer.de/files/fast-garbage-compaction-with-interior-pointers.pdf * * This particular algorithm has some nice properties, namely: * - Heap objects can have varying size * - We can compact the heap in-place without auxiliary storage * - The compacted heap preserves order, keeping related objects close together * - Is actually pretty simple, in the sense that it has few moving pieces, * although pointer reversal can take a moment to "click" * * However, there are also downsides to this choice: * - Is fully stop-the-world and non-incremental * - Pointer reversal techniques are not cache-friendly, and generally slow * compared to both contemporary and modern techniques * * Happily, the bursty nature of the type checker means that there are long (in * human scale) periods of down time between requests, so a long pause is not a * problem as long as it is well timed. * * For future work, it might be worthwhile to explore more incremental GC * strategies, which could spread the work over more small pauses instead. */ /*****************************************************************************/ // Threading is the fundamental operation of the GC. Moving objects potentially // invalidates every address in the heap. Threading makes it possible to update // those addresses without requiring extra storage. // // In a single step, threading replaces a pointer to a value with the value // itself. Where the value was, we insert a pointer to original pointer. This // swap is more easily understood when visualized: // // P Q // +---+ +---+ // | * |-->| X | // +---+ +---+ // // becomes // // P Q // +---+ +---+ // | X |<--| * | // +---+ +---+ // // Performing this single step repeatedly has the effect of replacing multiple // pointers to a given value with a linked list (or "thread") of pointers to the // value. For example: // // P Q R // +---+ +---+ +---+ // | * | | * |-->| X | // +---+ +---+ +---+ // | ^ // +-------------+ // // becomes (in two steps) // // P Q R // +---+ +---+ +---+ // | X |<--| * |<--| * | // +---+ +---+ +---+ static void gc_thread(addr_t p) { field_t q = Deref(p); if ((q & 1) == 0 && q != NULL_ADDR) { Deref(p) = Deref(q); Deref(q) = p; } } // See comment above `mark_entity` static void gc_scan_entity(addr_t v, intnat next_version) { intnat entity_version = Deref(Obj_field(v, 2)); gc_thread(Obj_field(v, entity_version & 1)); if (entity_version >= next_version) { gc_thread(Obj_field(v, ~entity_version & 1)); } } // As we walk the heap, we must be sure to thread every pointer to live data, as // any live object may be relocated. static void gc_scan(addr_t v, intnat next_version) { hh_header_t hd = Deref(v); hh_tag_t tag = Obj_tag(hd); if (tag == Entity_tag) { gc_scan_entity(v, next_version); } else if (should_scan(tag)) { for (int i = 0; i < Obj_wosize_tag(hd, tag); i++) { gc_thread(Obj_field(v, i)); } } } // With the heap threaded, we can now relocate "R" to a different known address // by "unthreading," or following the linked list of pointers until we reach the // original value X. Each word in the thread is replaced with the new address // and the original value is copied back into place. static void gc_update(addr_t src, addr_t dst) { uintnat p = Deref(src); while (Is_addr(p)) { uintnat q = Deref(p); Deref(p) = dst; p = q; } Deref(src) = p; } // Compacting the heap proceeds in three phases: // 1. Thread the root set // 2. Walk heap, update forward pointers // 3. Walk heap, update backward pointers and move objects CAMLprim value hh_compact(value unit) { CAMLparam1(unit); assert_master(); assert(info->gc_phase == Phase_idle); intnat hashtbl_slots = info->hashtbl_slots; intnat next_version = info->next_version; // Step 1: Scan the root set, threading any pointers to the heap. The // threading performed during this step will be unthreaded in the next step, // updating the hash table to point to the updated locations. for (intnat i = 0; i < hashtbl_slots; i++) { addr_t hashtbl_addr = Addr_of_ptr(&hashtbl[i].addr); gc_thread(hashtbl_addr); } // Step 2: Scan the heap object-by-object from bottom to top. The dst pointer // keeps track of where objects will move to, but we do not move anything // during this step. // // If we encounter an unmarked header, the object is unreachable, so do not // update the dst pointer. // // If we encounter an address, then this object was reachable via "forward" // reference, i.e., a pointer stored at a lower address. Because we know where // the object will move to (dst), we eagerly update the forward references and // copy the original header back. // // If we encounter a marked header, then the object is reachable only via // "backwards" reference. These backwards references will be handled in the // next step. // // NB: Instead of scanning the entire heap, it may be worthwhile to track the // min/max live addresses during the marking phase, and only scan that part. // Possible that the extra marking work would be more expensive than a linear // memory scan, but worth experimenting. // // NB: Also worth experimenting with explicit prefetching. addr_t src = info->heap_init; addr_t dst = info->heap_init; addr_t heap_ptr = info->heap; while (src < heap_ptr) { hh_header_t hd = Deref(src); intnat size; if (Is_blue(hd)) { size = Obj_bhsize(hd); } else { gc_update(src, dst); hd = Deref(src); size = Obj_bhsize(hd); gc_scan(src, next_version); dst += size; } src += size; } // Step 3: Scan the heap object-by-object again, actually moving objects this // time around. // // Unmarked headers still indicate unreachable data and is not moved. // // If we encounter an address, then the object was reachable via a "backwards" // reference from the previous step, and we fix up those references to point // to the new location and copy the original header back. // // Finally we can move the object. We unset the mark bit on the header so that // future collections can free the space if the object becomes unreachable. src = info->heap_init; dst = info->heap_init; while (src < heap_ptr) { hh_header_t hd = Deref(src); intnat size; if (Is_blue(hd)) { size = Obj_bhsize(hd); } else { gc_update(src, dst); hd = Deref(src); size = Obj_bhsize(hd); if (Obj_tag(hd) == Entity_tag) { // Move entities manually, resetting the entity version to 0 and writing // the previous entity data to the correct offset. If the entity version // is >= the next version, that means we're compacting after a canceled // recheck, so we must preserve the committed and latest data. intnat v = Deref(Obj_field(src, 2)); addr_t data0 = Deref(Obj_field(src, v & 1)); addr_t data1 = NULL_ADDR; if (v >= next_version) { data1 = Deref(Obj_field(src, ~v & 1)); v = 2; } else { v = 0; } Deref(dst) = hd; Deref(Obj_field(dst, 0)) = data0; Deref(Obj_field(dst, 1)) = data1; Deref(Obj_field(dst, 2)) = v; } else { memmove(Ptr_of_addr(dst), Ptr_of_addr(src), size); } dst += size; } src += size; } // TODO: Space between dst and info->heap is unused, but will almost certainly // become used again soon. Currently we will never decommit, which may cause // issues when there is memory pressure. // // If the kernel supports it, we might consider using madvise(MADV_FREE), // which allows the kernel to reclaim the memory lazily under pressure, but // would not force page faults under healthy operation. info->heap = dst; // Invariant: info->heap_init <= info->gc_end <= info->heap // See declaration of gc_end info->gc_end = dst; info->free_bsize = 0; // All live entities have been reset to version 0, so we can also reset the // global version counter. info->next_version = 2; CAMLreturn(Val_unit); } static void raise_heap_full(void) { static const value* exn = NULL; if (!exn) exn = caml_named_value("heap_full"); caml_raise_constant(*exn); } /*****************************************************************************/ /* Allocates a slot in the shared heap, given a size (in words). The caller is * responsible for initializing the allocated space with valid heap objects. */ /*****************************************************************************/ static addr_t hh_alloc(size_t wsize) { if (wsize == 0) return info->heap; size_t slot_size = Bsize_wsize(wsize); addr_t addr = __sync_fetch_and_add(&info->heap, slot_size); if (addr + slot_size > info->heap_max) { raise_heap_full(); } memfd_reserve(shared_mem, Ptr_of_addr(addr), slot_size); return addr; } CAMLprim value hh_ml_alloc(value wsize) { CAMLparam1(wsize); addr_t addr = hh_alloc(Long_val(wsize)); CAMLreturn(Val_long(addr)); } /*****************************************************************************/ /* Allocates an ocaml value in the shared heap. * Any ocaml value is valid, except closures. It returns the address of * the allocated chunk. */ /*****************************************************************************/ CAMLprim value hh_store_ocaml(value v, value tag_val) { CAMLparam1(v); check_should_cancel(); char *serialized, *compressed; intnat serialized_size; int compress_bound, compressed_size; caml_output_value_to_malloc( v, Val_int(0) /*flags*/, &serialized, &serialized_size); // Compress the serialized data. LZ4's maximum input size is ~2GB. If the // input is larger than that, LZ4_compressBound will return 0 and the // compression itself will do nothing. if (serialized_size > LZ4_MAX_INPUT_SIZE) { caml_invalid_argument("hh_store_ocaml: value larger than max input size"); } compress_bound = LZ4_compressBound(serialized_size); compressed = malloc(compress_bound); compressed_size = LZ4_compress_default( serialized, compressed, serialized_size, compress_bound); assert(compressed_size > 0); // Construct a header to describe the serialized and compressed data: // // A header is a single word where The low-order byte is reserved, meaning we // have 56 bits to store the serialized size and compressed size. Is it // enough? // // In the worst case, we try to compress uncompressible input of // LZ4_MAX_INPUT_SIZE, consuming the entire compress bound. That would be // 0x7E7E7E8E bytes compressed size. // // NOTE: The compressed size might actually be bigger than the serialized // size, in a worst case scenario where the input is not compressible. This // shouldn't happen in practice, but we account for it in the worse case. // // If we store the size in words instead of bytes, the max size is 0xFCFCFD2 // words, which fits in 2^28, so we can fit both sizes (in words) in 56 bits. // // All this is somewhat academic, since we have bigger problems if we're // trying to store 2 gig entries. // The compressed size is not necessarily word sized. To accommodate this, we // use a trick lifted from OCaml's own representation of strings, which also // have a header that stores the size in words. // // In the last byte of the block, we store a value which we can use to recover // the exact byte size of the string. If the string is exactly word sized, we // add another word to hold the final byte. size_t compressed_wsize = (compressed_size + WORD_SIZE) / WORD_SIZE; // Similarly, the serialized size might not necessarily be a multiple of the // word size. To decompress, we only need to provide a buffer that is large // enough, so we round up to the nearest word. size_t decompress_capacity = Wsize_bsize(WORD_ALIGN(serialized_size)); // Just in case the math above doesn't check out assert(compressed_size < 0x10000000); assert(decompress_capacity < 0x10000000); // Ensure tag fits in high 6 bits of low bytes int tag = Long_val(tag_val); assert(tag < 0x40); hh_header_t header = compressed_wsize << 36 | decompress_capacity << 8 | tag << 2 | Color_white; // Allocate space for the header and compressed data heap_entry_t* entry = Entry_of_addr(hh_alloc(1 + compressed_wsize)); // Write header and data into allocated space. entry->header = header; memcpy(&entry->data, compressed, compressed_size); // Write offset into final byte for byte size calculation // See entry_compressed_bsize for how this is used. size_t offset_index = Bsize_wsize(compressed_wsize) - 1; entry->data[offset_index] = offset_index - compressed_size; free(serialized); free(compressed); CAMLreturn(Val_long(Addr_of_ptr(entry))); } // The final byte of a compressed heap entry contains an offset, which we can // use to convert the approximate size in words to the precise size in bytes. static size_t entry_compressed_bsize(heap_entry_t* entry) { size_t compressed_wsize = Entry_wsize(entry->header); size_t offset_index = Bsize_wsize(compressed_wsize) - 1; return offset_index - entry->data[offset_index]; } /*****************************************************************************/ /* Given an OCaml string, returns the 8 first bytes in an unsigned long. * The key is generated using MD5, but we only use the first 8 bytes because * it allows us to use atomic operations. */ /*****************************************************************************/ static uint64_t get_hash(value key) { return *((uint64_t*)String_val(key)); } static void raise_hash_table_full(void) { static const value* exn = NULL; if (!exn) exn = caml_named_value("hash_table_full"); caml_raise_constant(*exn); } /*****************************************************************************/ /* Adds a key value to the hashtable. This code is perf sensitive, please * check the perf before modifying. * * Returns the address associated with this key in the hash table, which may not * be the same as the address passed in by the caller. */ /*****************************************************************************/ CAMLprim value hh_add(value key, value addr) { CAMLparam2(key, addr); check_should_cancel(); uint64_t elt_hash = get_hash(key); addr_t elt_addr = Long_val(addr); size_t hashtbl_slots = info->hashtbl_slots; size_t slot = elt_hash & (hashtbl_slots - 1); size_t init_slot = slot; while (1) { uint64_t old_hash = __atomic_load_n(&hashtbl[slot].hash, __ATOMIC_ACQUIRE); // If this slot looks free, try to take it. If we are racing with another // thread and lose, the CAS operation will write the current value of the // hash slot into `old_hash`. if (old_hash == 0 && __atomic_compare_exchange_n( &hashtbl[slot].hash, &old_hash, elt_hash, 0, /* strong */ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) { __atomic_fetch_add(&info->hcounter, 1, __ATOMIC_RELAXED); old_hash = elt_hash; // Try to take the addr slot next } if (old_hash == elt_hash) { // Try to acquire the addr slot if needed. If the slot is already taken or // we lose a race to acquire it, we want to return the value of the addr // slot to the caller. addr_t old_addr = __atomic_load_n(&hashtbl[slot].addr, __ATOMIC_ACQUIRE); if (old_addr == NULL_ADDR && __atomic_compare_exchange_n( &hashtbl[slot].addr, &old_addr, elt_addr, 0, /* strong */ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) { __atomic_fetch_add(&info->hcounter_filled, 1, __ATOMIC_RELAXED); } else { addr = Val_long(old_addr); } break; } slot = (slot + 1) & (hashtbl_slots - 1); if (slot == init_slot) { // We're never going to find a spot raise_hash_table_full(); } } CAMLreturn(addr); } /*****************************************************************************/ /* Finds the slot corresponding to the key in a hash table. The returned slot * is either free or points to the key. */ /*****************************************************************************/ static size_t find_slot(value key, helt_t* elt) { size_t hashtbl_slots = info->hashtbl_slots; uint64_t hash = get_hash(key); size_t slot = hash & (hashtbl_slots - 1); size_t init_slot = slot; while (1) { *elt = hashtbl[slot]; if (elt->hash == hash || elt->hash == 0) { return slot; } slot = (slot + 1) & (hashtbl_slots - 1); if (slot == init_slot) { raise_hash_table_full(); } } } /*****************************************************************************/ /* Returns true if the key is present. We need to check both the hash and * the address of the data. This is due to the fact that we remove by setting * the address slot to NULL (we never remove a hash from the table, outside * of garbage collection). */ /*****************************************************************************/ CAMLprim value hh_mem(value key) { CAMLparam1(key); check_should_cancel(); helt_t elt; find_slot(key, &elt); CAMLreturn(Val_bool(elt.hash != 0 && elt.addr != NULL_ADDR)); } /*****************************************************************************/ /* Deserializes the value at the given address. */ /*****************************************************************************/ CAMLprim value hh_deserialize(value addr_val) { CAMLparam1(addr_val); CAMLlocal1(result); check_should_cancel(); heap_entry_t* entry = Entry_of_addr(Long_val(addr_val)); size_t compressed_bsize = entry_compressed_bsize(entry); size_t decompress_capacity = Entry_decompress_capacity(entry->header); char* decompressed = malloc(decompress_capacity); size_t serialized_size = LZ4_decompress_safe( entry->data, decompressed, compressed_bsize, decompress_capacity); result = caml_input_value_from_block(decompressed, serialized_size); free(decompressed); CAMLreturn(result); } /*****************************************************************************/ /* Returns the address associated to a given key. */ /* The key MUST be present. */ /*****************************************************************************/ CAMLprim value hh_get(value key) { CAMLparam1(key); check_should_cancel(); helt_t elt; find_slot(key, &elt); CAMLreturn(Val_long(elt.hash == 0 ? NULL_ADDR : elt.addr)); } /*****************************************************************************/ /* Removes a key from the hash table. * Only the master can perform this operation. */ /*****************************************************************************/ CAMLprim value hh_remove(value key) { CAMLparam1(key); assert_master(); helt_t elt; size_t slot = find_slot(key, &elt); if (elt.hash != 0 && elt.addr != NULL_ADDR) { // GC write barrier if (info->gc_phase == Phase_mark) { mark_slice_darken(elt.addr); } hashtbl[slot].addr = NULL_ADDR; info->hcounter_filled -= 1; } CAMLreturn(Val_unit); } /*****************************************************************************/ /* Blits an OCaml string representation into the shared heap. * * Note that, like OCaml's heap, the shared heap is word-addressible. Like * OCaml's strings, strings in the shared heap are encoded with a header * containing the size in words, where the last byte of the last word contains * an offset used to calculate the exact bytes size. */ /*****************************************************************************/ CAMLprim value hh_write_string(value addr, value s) { memcpy(Ptr_of_addr(Long_val(addr)), String_val(s), Bosize_val(s)); return Val_unit; } /*****************************************************************************/ /* Blits bytes into the shared heap. * * Unlike `hh_write_string` above, which writes the entire string representation * into shared memory, this function takes `pos`, an offset from the beginning * of the byte array, and `len`, the number of bytes to write starting at `pos`. * * Callers is responsible for ensuring the heap space is allocated and for * bounds checking the buffer, offset, and length. */ /*****************************************************************************/ CAMLprim value hh_write_bytes(value addr, value buf, value pos, value len) { memcpy( Ptr_of_addr(Long_val(addr)), Bytes_val(buf) + Long_val(pos), Long_val(len)); return Val_unit; } /*****************************************************************************/ /* Reads a string in the shared heap into a the OCaml heap. * * Because we store string data in the shared heap in the same format as OCaml * does for it's own heap, we can simply blit the data directly into the OCaml * heap, instead of using the designated caml_alloc_string function. */ /*****************************************************************************/ CAMLprim value hh_read_string(value addr, value wsize) { CAMLparam2(addr, wsize); CAMLlocal1(s); s = caml_alloc(Long_val(wsize), String_tag); memcpy( (char*)String_val(s), Ptr_of_addr(Long_val(addr)), Bsize_wsize(Long_val(wsize))); CAMLreturn(s); } static size_t hh_string_len(addr_t addr, char** ptr) { *ptr = Ptr_of_addr(Obj_field(addr, 0)); size_t tmp = Obj_bosize(Deref(addr)) - 1; return tmp - (*ptr)[tmp]; } CAMLprim value hh_compare_string(value addr1_val, value addr2_val) { if (addr1_val == addr2_val) return Val_int(0); char *ptr1, *ptr2; size_t len1 = hh_string_len(Long_val(addr1_val), &ptr1); size_t len2 = hh_string_len(Long_val(addr2_val), &ptr2); int res = memcmp(ptr1, ptr2, len1 <= len2 ? len1 : len2); return Val_int(res ? res : len1 - len2); } CAMLprim value hh_entity_advance(value entity_val, value data_val) { CAMLparam2(entity_val, data_val); addr_t entity = Long_val(entity_val); addr_t data = Long_val(data_val); intnat next_version = info->next_version; intnat entity_version_fld = Obj_field(entity, 2); intnat entity_version = Deref(entity_version_fld); intnat slot = entity_version & 1; if (entity_version < next_version) { // By updating the version, we are doing a kind of deferred logical deletion // of the committed data. Once we commit this transaction, the data in // `slot` will no longer be reachable. write_barrier(Deref(Obj_field(entity, slot))); slot = 1 - slot; Deref(entity_version_fld) = next_version | slot; } Deref(Obj_field(entity, slot)) = data; CAMLreturn(Val_unit); } CAMLprim value hh_load_acquire(value addr_val) { int64_t* ptr = (int64_t*)Ptr_of_addr(Long_val(addr_val)); return __atomic_load_n(ptr, __ATOMIC_ACQUIRE); } CAMLprim value hh_store_release(value addr_val, int64_t v) { int64_t* ptr = (int64_t*)Ptr_of_addr(Long_val(addr_val)); __atomic_store_n(ptr, v, __ATOMIC_RELEASE); return Val_unit; } CAMLprim value hh_compare_exchange( value weak_val, value addr_val, int64_t expected, int64_t desired) { int64_t* ptr = (int64_t*)Ptr_of_addr(Long_val(addr_val)); return Val_bool(__atomic_compare_exchange_n( ptr, &expected, desired, Bool_val(weak_val), __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)); } CAMLprim value hh_compare_modify_addr( value weak_val, value addr_val, value expected_val, int64_t desired) { CAMLparam3(weak_val, addr_val, expected_val); int64_t* ptr = (int64_t*)Ptr_of_addr(Long_val(addr_val)); int64_t expected = Long_val(expected_val); int success = __atomic_compare_exchange_n( ptr, &expected, desired, Bool_val(weak_val), __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); if (success) { write_barrier(expected); } CAMLreturn(Val_bool(success)); } CAMLprim value hh_load_acquire_byte(value addr_val) { return caml_copy_int64(hh_load_acquire(addr_val)); } CAMLprim value hh_store_release_byte(value addr_val, value v) { return hh_store_release(addr_val, Int64_val(v)); } CAMLprim value hh_compare_exchange_byte( value weak_val, value addr_val, value expected_val, value desired_val) { return hh_compare_exchange( weak_val, addr_val, Int64_val(expected_val), Int64_val(desired_val)); } CAMLprim value hh_compare_modify_addr_byte( value weak_val, value addr_val, value expected_val, value desired_val) { return hh_compare_modify_addr( weak_val, addr_val, expected_val, Int64_val(desired_val)); }
93669060e3e4440ccc6bbab7908a60b1f4c4ea0b
912cc20148bc199f1def39e69738f7811e1b47bb
/tests/primes.h
b43cdf9beb30740d19f197f2638dd4cf05afc738
[ "MIT" ]
permissive
GabrielGanne/hash-sandbox
018f3498db701c0d34245e934adb2a6f7b5a760e
03bc94248c0d2604e0fb0e8852f8872179cc9515
refs/heads/master
2021-11-12T12:46:45.867434
2021-10-27T06:52:06
2021-10-27T06:52:06
236,455,145
0
1
MIT
2020-01-30T16:09:47
2020-01-27T09:21:57
C
UTF-8
C
false
false
425,257
h
primes.h
#include <stddef.h> #include "common.h" const int primes[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, 17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, 17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, 17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, 17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, 17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, 17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, 17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, 18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, 18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, 18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, 18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, 18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, 18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, 18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, 18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, 18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, 19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, 19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, 19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, 19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, 19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, 19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, 19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, 19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, 19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, 19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, 19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, 20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, 20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, 20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, 20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, 20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, 20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, 20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, 20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, 20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, 21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, 21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, 21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, 21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, 21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, 21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, 21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, 21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, 21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, 21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, 21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, 22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, 22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, 22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, 22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, 22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, 22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, 22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, 22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, 22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, 23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, 23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, 23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, 23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, 23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, 23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, 23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, 23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, 23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, 23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, 24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, 24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, 24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, 24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, 24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, 24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, 24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, 24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, 24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, 24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, 25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, 25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, 25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, 25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, 25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, 25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, 25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, 25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, 25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, 26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, 26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, 26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, 26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, 26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, 26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, 26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, 26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, 26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, 26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, 26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, 27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, 27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, 27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, 27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, 27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, 27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, 27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, 27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, 27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, 28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, 28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, 28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, 28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, 28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, 28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, 28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, 28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, 28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, 28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, 29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, 29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, 29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, 29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, 29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, 29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, 29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, 29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, 29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, 30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, 30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, 30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, 30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, 30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, 30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, 30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, 30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, 30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, 31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, 31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, 31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, 31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, 31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, 31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, 31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, 31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, 31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, 31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, 32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, 32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, 32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, 32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, 32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, 32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, 32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, 32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, 32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, 32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, 33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, 33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, 33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, 33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, 33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, 33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, 33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, 33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, 33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, 33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, 34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, 34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, 34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, 34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, 34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, 34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, 34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, 34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, 34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, 34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, 35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, 35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, 35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, 35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, 35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, 35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, 35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, 35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, 35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, 36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, 36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, 36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, 36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, 36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, 36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, 36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, 36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, 36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, 36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, 37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, 37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, 37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, 37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, 37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, 37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, 37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, 37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, 37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, 38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, 38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, 38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, 38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, 38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, 38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, 38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, 38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, 38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, 39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, 39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, 39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, 39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, 39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, 39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, 39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, 39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, 39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, 39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, 40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, 40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, 40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, 40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, 40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, 40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, 40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, 40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, 40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, 41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, 41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, 41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, 41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, 41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, 41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, 41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, 41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, 41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, 41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, 42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, 42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, 42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, 42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, 42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, 42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, 42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, 42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, 42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, 42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, 43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, 43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, 43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, 43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, 43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, 43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, 43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, 43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, 44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, 44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, 44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, 44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, 44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, 44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, 44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, 44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, 44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, 44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, 45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, 45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, 45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, 45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, 45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, 45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, 45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, 45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, 45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, 46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, 46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, 46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, 46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, 46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, 46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, 46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, 46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, 46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, 47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, 47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, 47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, 47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, 47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, 47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, 47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, 47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, 47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, 48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, 48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, 48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, 48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, 48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, 48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, 48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, 48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, 48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, 49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, 49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, 49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, 49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, 49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, 49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, 49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, 49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, 49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, 49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051, 50053, 50069, 50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131, 50147, 50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273, 50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, 50383, 50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, 50513, 50527, 50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, 50599, 50627, 50647, 50651, 50671, 50683, 50707, 50723, 50741, 50753, 50767, 50773, 50777, 50789, 50821, 50833, 50839, 50849, 50857, 50867, 50873, 50891, 50893, 50909, 50923, 50929, 50951, 50957, 50969, 50971, 50989, 50993, 51001, 51031, 51043, 51047, 51059, 51061, 51071, 51109, 51131, 51133, 51137, 51151, 51157, 51169, 51193, 51197, 51199, 51203, 51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287, 51307, 51329, 51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419, 51421, 51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487, 51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, 51599, 51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, 51691, 51713, 51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, 51817, 51827, 51829, 51839, 51853, 51859, 51869, 51871, 51893, 51899, 51907, 51913, 51929, 51941, 51949, 51971, 51973, 51977, 51991, 52009, 52021, 52027, 52051, 52057, 52067, 52069, 52081, 52103, 52121, 52127, 52147, 52153, 52163, 52177, 52181, 52183, 52189, 52201, 52223, 52237, 52249, 52253, 52259, 52267, 52289, 52291, 52301, 52313, 52321, 52361, 52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457, 52489, 52501, 52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571, 52579, 52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709, 52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, 52817, 52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, 52937, 52951, 52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, 53047, 53051, 53069, 53077, 53087, 53089, 53093, 53101, 53113, 53117, 53129, 53147, 53149, 53161, 53171, 53173, 53189, 53197, 53201, 53231, 53233, 53239, 53267, 53269, 53279, 53281, 53299, 53309, 53323, 53327, 53353, 53359, 53377, 53381, 53401, 53407, 53411, 53419, 53437, 53441, 53453, 53479, 53503, 53507, 53527, 53549, 53551, 53569, 53591, 53593, 53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639, 53653, 53657, 53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777, 53783, 53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891, 53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, 54001, 54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, 54133, 54139, 54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, 54277, 54287, 54293, 54311, 54319, 54323, 54331, 54347, 54361, 54367, 54371, 54377, 54401, 54403, 54409, 54413, 54419, 54421, 54437, 54443, 54449, 54469, 54493, 54497, 54499, 54503, 54517, 54521, 54539, 54541, 54547, 54559, 54563, 54577, 54581, 54583, 54601, 54617, 54623, 54629, 54631, 54647, 54667, 54673, 54679, 54709, 54713, 54721, 54727, 54751, 54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851, 54869, 54877, 54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979, 54983, 55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103, 55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, 55219, 55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, 55339, 55343, 55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, 55469, 55487, 55501, 55511, 55529, 55541, 55547, 55579, 55589, 55603, 55609, 55619, 55621, 55631, 55633, 55639, 55661, 55663, 55667, 55673, 55681, 55691, 55697, 55711, 55717, 55721, 55733, 55763, 55787, 55793, 55799, 55807, 55813, 55817, 55819, 55823, 55829, 55837, 55843, 55849, 55871, 55889, 55897, 55901, 55903, 55921, 55927, 55931, 55933, 55949, 55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053, 56081, 56087, 56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171, 56179, 56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299, 56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, 56437, 56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, 56509, 56519, 56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, 56611, 56629, 56633, 56659, 56663, 56671, 56681, 56687, 56701, 56711, 56713, 56731, 56737, 56747, 56767, 56773, 56779, 56783, 56807, 56809, 56813, 56821, 56827, 56843, 56857, 56873, 56891, 56893, 56897, 56909, 56911, 56921, 56923, 56929, 56941, 56951, 56957, 56963, 56983, 56989, 56993, 56999, 57037, 57041, 57047, 57059, 57073, 57077, 57089, 57097, 57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173, 57179, 57191, 57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271, 57283, 57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389, 57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, 57557, 57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, 57667, 57679, 57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, 57751, 57773, 57781, 57787, 57791, 57793, 57803, 57809, 57829, 57839, 57847, 57853, 57859, 57881, 57899, 57901, 57917, 57923, 57943, 57947, 57973, 57977, 57991, 58013, 58027, 58031, 58043, 58049, 58057, 58061, 58067, 58073, 58099, 58109, 58111, 58129, 58147, 58151, 58153, 58169, 58171, 58189, 58193, 58199, 58207, 58211, 58217, 58229, 58231, 58237, 58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367, 58369, 58379, 58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451, 58453, 58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601, 58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, 58727, 58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, 58897, 58901, 58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, 58979, 58991, 58997, 59009, 59011, 59021, 59023, 59029, 59051, 59053, 59063, 59069, 59077, 59083, 59093, 59107, 59113, 59119, 59123, 59141, 59149, 59159, 59167, 59183, 59197, 59207, 59209, 59219, 59221, 59233, 59239, 59243, 59263, 59273, 59281, 59333, 59341, 59351, 59357, 59359, 59369, 59377, 59387, 59393, 59399, 59407, 59417, 59419, 59441, 59443, 59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513, 59539, 59557, 59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651, 59659, 59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747, 59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, 59921, 59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, 60037, 60041, 60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, 60133, 60139, 60149, 60161, 60167, 60169, 60209, 60217, 60223, 60251, 60257, 60259, 60271, 60289, 60293, 60317, 60331, 60337, 60343, 60353, 60373, 60383, 60397, 60413, 60427, 60443, 60449, 60457, 60493, 60497, 60509, 60521, 60527, 60539, 60589, 60601, 60607, 60611, 60617, 60623, 60631, 60637, 60647, 60649, 60659, 60661, 60679, 60689, 60703, 60719, 60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779, 60793, 60811, 60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917, 60919, 60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043, 61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, 61211, 61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, 61339, 61343, 61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, 61463, 61469, 61471, 61483, 61487, 61493, 61507, 61511, 61519, 61543, 61547, 61553, 61559, 61561, 61583, 61603, 61609, 61613, 61627, 61631, 61637, 61643, 61651, 61657, 61667, 61673, 61681, 61687, 61703, 61717, 61723, 61729, 61751, 61757, 61781, 61813, 61819, 61837, 61843, 61861, 61871, 61879, 61909, 61927, 61933, 61949, 61961, 61967, 61979, 61981, 61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053, 62057, 62071, 62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171, 62189, 62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303, 62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, 62467, 62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, 62563, 62581, 62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, 62659, 62683, 62687, 62701, 62723, 62731, 62743, 62753, 62761, 62773, 62791, 62801, 62819, 62827, 62851, 62861, 62869, 62873, 62897, 62903, 62921, 62927, 62929, 62939, 62969, 62971, 62981, 62983, 62987, 62989, 63029, 63031, 63059, 63067, 63073, 63079, 63097, 63103, 63113, 63127, 63131, 63149, 63179, 63197, 63199, 63211, 63241, 63247, 63277, 63281, 63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353, 63361, 63367, 63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443, 63463, 63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559, 63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, 63649, 63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, 63727, 63737, 63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, 63823, 63839, 63841, 63853, 63857, 63863, 63901, 63907, 63913, 63929, 63949, 63977, 63997, 64007, 64013, 64019, 64033, 64037, 64063, 64067, 64081, 64091, 64109, 64123, 64151, 64153, 64157, 64171, 64187, 64189, 64217, 64223, 64231, 64237, 64271, 64279, 64283, 64301, 64303, 64319, 64327, 64333, 64373, 64381, 64399, 64403, 64433, 64439, 64451, 64453, 64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579, 64591, 64601, 64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679, 64693, 64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849, 64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, 64951, 64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, 65071, 65089, 65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, 65519, 65521, 65537, 65539, 65543, 65551, 65557, 65563, 65579, 65581, 65587, 65599, 65609, 65617, 65629, 65633, 65647, 65651, 65657, 65677, 65687, 65699, 65701, 65707, 65713, 65717, 65719, 65729, 65731, 65761, 65777, 65789, 65809, 65827, 65831, 65837, 65839, 65843, 65851, 65867, 65881, 65899, 65921, 65927, 65929, 65951, 65957, 65963, 65981, 65983, 65993, 66029, 66037, 66041, 66047, 66067, 66071, 66083, 66089, 66103, 66107, 66109, 66137, 66161, 66169, 66173, 66179, 66191, 66221, 66239, 66271, 66293, 66301, 66337, 66343, 66347, 66359, 66361, 66373, 66377, 66383, 66403, 66413, 66431, 66449, 66457, 66463, 66467, 66491, 66499, 66509, 66523, 66529, 66533, 66541, 66553, 66569, 66571, 66587, 66593, 66601, 66617, 66629, 66643, 66653, 66683, 66697, 66701, 66713, 66721, 66733, 66739, 66749, 66751, 66763, 66791, 66797, 66809, 66821, 66841, 66851, 66853, 66863, 66877, 66883, 66889, 66919, 66923, 66931, 66943, 66947, 66949, 66959, 66973, 66977, 67003, 67021, 67033, 67043, 67049, 67057, 67061, 67073, 67079, 67103, 67121, 67129, 67139, 67141, 67153, 67157, 67169, 67181, 67187, 67189, 67211, 67213, 67217, 67219, 67231, 67247, 67261, 67271, 67273, 67289, 67307, 67339, 67343, 67349, 67369, 67391, 67399, 67409, 67411, 67421, 67427, 67429, 67433, 67447, 67453, 67477, 67481, 67489, 67493, 67499, 67511, 67523, 67531, 67537, 67547, 67559, 67567, 67577, 67579, 67589, 67601, 67607, 67619, 67631, 67651, 67679, 67699, 67709, 67723, 67733, 67741, 67751, 67757, 67759, 67763, 67777, 67783, 67789, 67801, 67807, 67819, 67829, 67843, 67853, 67867, 67883, 67891, 67901, 67927, 67931, 67933, 67939, 67943, 67957, 67961, 67967, 67979, 67987, 67993, 68023, 68041, 68053, 68059, 68071, 68087, 68099, 68111, 68113, 68141, 68147, 68161, 68171, 68207, 68209, 68213, 68219, 68227, 68239, 68261, 68279, 68281, 68311, 68329, 68351, 68371, 68389, 68399, 68437, 68443, 68447, 68449, 68473, 68477, 68483, 68489, 68491, 68501, 68507, 68521, 68531, 68539, 68543, 68567, 68581, 68597, 68611, 68633, 68639, 68659, 68669, 68683, 68687, 68699, 68711, 68713, 68729, 68737, 68743, 68749, 68767, 68771, 68777, 68791, 68813, 68819, 68821, 68863, 68879, 68881, 68891, 68897, 68899, 68903, 68909, 68917, 68927, 68947, 68963, 68993, 69001, 69011, 69019, 69029, 69031, 69061, 69067, 69073, 69109, 69119, 69127, 69143, 69149, 69151, 69163, 69191, 69193, 69197, 69203, 69221, 69233, 69239, 69247, 69257, 69259, 69263, 69313, 69317, 69337, 69341, 69371, 69379, 69383, 69389, 69401, 69403, 69427, 69431, 69439, 69457, 69463, 69467, 69473, 69481, 69491, 69493, 69497, 69499, 69539, 69557, 69593, 69623, 69653, 69661, 69677, 69691, 69697, 69709, 69737, 69739, 69761, 69763, 69767, 69779, 69809, 69821, 69827, 69829, 69833, 69847, 69857, 69859, 69877, 69899, 69911, 69929, 69931, 69941, 69959, 69991, 69997, 70001, 70003, 70009, 70019, 70039, 70051, 70061, 70067, 70079, 70099, 70111, 70117, 70121, 70123, 70139, 70141, 70157, 70163, 70177, 70181, 70183, 70199, 70201, 70207, 70223, 70229, 70237, 70241, 70249, 70271, 70289, 70297, 70309, 70313, 70321, 70327, 70351, 70373, 70379, 70381, 70393, 70423, 70429, 70439, 70451, 70457, 70459, 70481, 70487, 70489, 70501, 70507, 70529, 70537, 70549, 70571, 70573, 70583, 70589, 70607, 70619, 70621, 70627, 70639, 70657, 70663, 70667, 70687, 70709, 70717, 70729, 70753, 70769, 70783, 70793, 70823, 70841, 70843, 70849, 70853, 70867, 70877, 70879, 70891, 70901, 70913, 70919, 70921, 70937, 70949, 70951, 70957, 70969, 70979, 70981, 70991, 70997, 70999, 71011, 71023, 71039, 71059, 71069, 71081, 71089, 71119, 71129, 71143, 71147, 71153, 71161, 71167, 71171, 71191, 71209, 71233, 71237, 71249, 71257, 71261, 71263, 71287, 71293, 71317, 71327, 71329, 71333, 71339, 71341, 71347, 71353, 71359, 71363, 71387, 71389, 71399, 71411, 71413, 71419, 71429, 71437, 71443, 71453, 71471, 71473, 71479, 71483, 71503, 71527, 71537, 71549, 71551, 71563, 71569, 71593, 71597, 71633, 71647, 71663, 71671, 71693, 71699, 71707, 71711, 71713, 71719, 71741, 71761, 71777, 71789, 71807, 71809, 71821, 71837, 71843, 71849, 71861, 71867, 71879, 71881, 71887, 71899, 71909, 71917, 71933, 71941, 71947, 71963, 71971, 71983, 71987, 71993, 71999, 72019, 72031, 72043, 72047, 72053, 72073, 72077, 72089, 72091, 72101, 72103, 72109, 72139, 72161, 72167, 72169, 72173, 72211, 72221, 72223, 72227, 72229, 72251, 72253, 72269, 72271, 72277, 72287, 72307, 72313, 72337, 72341, 72353, 72367, 72379, 72383, 72421, 72431, 72461, 72467, 72469, 72481, 72493, 72497, 72503, 72533, 72547, 72551, 72559, 72577, 72613, 72617, 72623, 72643, 72647, 72649, 72661, 72671, 72673, 72679, 72689, 72701, 72707, 72719, 72727, 72733, 72739, 72763, 72767, 72797, 72817, 72823, 72859, 72869, 72871, 72883, 72889, 72893, 72901, 72907, 72911, 72923, 72931, 72937, 72949, 72953, 72959, 72973, 72977, 72997, 73009, 73013, 73019, 73037, 73039, 73043, 73061, 73063, 73079, 73091, 73121, 73127, 73133, 73141, 73181, 73189, 73237, 73243, 73259, 73277, 73291, 73303, 73309, 73327, 73331, 73351, 73361, 73363, 73369, 73379, 73387, 73417, 73421, 73433, 73453, 73459, 73471, 73477, 73483, 73517, 73523, 73529, 73547, 73553, 73561, 73571, 73583, 73589, 73597, 73607, 73609, 73613, 73637, 73643, 73651, 73673, 73679, 73681, 73693, 73699, 73709, 73721, 73727, 73751, 73757, 73771, 73783, 73819, 73823, 73847, 73849, 73859, 73867, 73877, 73883, 73897, 73907, 73939, 73943, 73951, 73961, 73973, 73999, 74017, 74021, 74027, 74047, 74051, 74071, 74077, 74093, 74099, 74101, 74131, 74143, 74149, 74159, 74161, 74167, 74177, 74189, 74197, 74201, 74203, 74209, 74219, 74231, 74257, 74279, 74287, 74293, 74297, 74311, 74317, 74323, 74353, 74357, 74363, 74377, 74381, 74383, 74411, 74413, 74419, 74441, 74449, 74453, 74471, 74489, 74507, 74509, 74521, 74527, 74531, 74551, 74561, 74567, 74573, 74587, 74597, 74609, 74611, 74623, 74653, 74687, 74699, 74707, 74713, 74717, 74719, 74729, 74731, 74747, 74759, 74761, 74771, 74779, 74797, 74821, 74827, 74831, 74843, 74857, 74861, 74869, 74873, 74887, 74891, 74897, 74903, 74923, 74929, 74933, 74941, 74959, 75011, 75013, 75017, 75029, 75037, 75041, 75079, 75083, 75109, 75133, 75149, 75161, 75167, 75169, 75181, 75193, 75209, 75211, 75217, 75223, 75227, 75239, 75253, 75269, 75277, 75289, 75307, 75323, 75329, 75337, 75347, 75353, 75367, 75377, 75389, 75391, 75401, 75403, 75407, 75431, 75437, 75479, 75503, 75511, 75521, 75527, 75533, 75539, 75541, 75553, 75557, 75571, 75577, 75583, 75611, 75617, 75619, 75629, 75641, 75653, 75659, 75679, 75683, 75689, 75703, 75707, 75709, 75721, 75731, 75743, 75767, 75773, 75781, 75787, 75793, 75797, 75821, 75833, 75853, 75869, 75883, 75913, 75931, 75937, 75941, 75967, 75979, 75983, 75989, 75991, 75997, 76001, 76003, 76031, 76039, 76079, 76081, 76091, 76099, 76103, 76123, 76129, 76147, 76157, 76159, 76163, 76207, 76213, 76231, 76243, 76249, 76253, 76259, 76261, 76283, 76289, 76303, 76333, 76343, 76367, 76369, 76379, 76387, 76403, 76421, 76423, 76441, 76463, 76471, 76481, 76487, 76493, 76507, 76511, 76519, 76537, 76541, 76543, 76561, 76579, 76597, 76603, 76607, 76631, 76649, 76651, 76667, 76673, 76679, 76697, 76717, 76733, 76753, 76757, 76771, 76777, 76781, 76801, 76819, 76829, 76831, 76837, 76847, 76871, 76873, 76883, 76907, 76913, 76919, 76943, 76949, 76961, 76963, 76991, 77003, 77017, 77023, 77029, 77041, 77047, 77069, 77081, 77093, 77101, 77137, 77141, 77153, 77167, 77171, 77191, 77201, 77213, 77237, 77239, 77243, 77249, 77261, 77263, 77267, 77269, 77279, 77291, 77317, 77323, 77339, 77347, 77351, 77359, 77369, 77377, 77383, 77417, 77419, 77431, 77447, 77471, 77477, 77479, 77489, 77491, 77509, 77513, 77521, 77527, 77543, 77549, 77551, 77557, 77563, 77569, 77573, 77587, 77591, 77611, 77617, 77621, 77641, 77647, 77659, 77681, 77687, 77689, 77699, 77711, 77713, 77719, 77723, 77731, 77743, 77747, 77761, 77773, 77783, 77797, 77801, 77813, 77839, 77849, 77863, 77867, 77893, 77899, 77929, 77933, 77951, 77969, 77977, 77983, 77999, 78007, 78017, 78031, 78041, 78049, 78059, 78079, 78101, 78121, 78137, 78139, 78157, 78163, 78167, 78173, 78179, 78191, 78193, 78203, 78229, 78233, 78241, 78259, 78277, 78283, 78301, 78307, 78311, 78317, 78341, 78347, 78367, 78401, 78427, 78437, 78439, 78467, 78479, 78487, 78497, 78509, 78511, 78517, 78539, 78541, 78553, 78569, 78571, 78577, 78583, 78593, 78607, 78623, 78643, 78649, 78653, 78691, 78697, 78707, 78713, 78721, 78737, 78779, 78781, 78787, 78791, 78797, 78803, 78809, 78823, 78839, 78853, 78857, 78877, 78887, 78889, 78893, 78901, 78919, 78929, 78941, 78977, 78979, 78989, 79031, 79039, 79043, 79063, 79087, 79103, 79111, 79133, 79139, 79147, 79151, 79153, 79159, 79181, 79187, 79193, 79201, 79229, 79231, 79241, 79259, 79273, 79279, 79283, 79301, 79309, 79319, 79333, 79337, 79349, 79357, 79367, 79379, 79393, 79397, 79399, 79411, 79423, 79427, 79433, 79451, 79481, 79493, 79531, 79537, 79549, 79559, 79561, 79579, 79589, 79601, 79609, 79613, 79621, 79627, 79631, 79633, 79657, 79669, 79687, 79691, 79693, 79697, 79699, 79757, 79769, 79777, 79801, 79811, 79813, 79817, 79823, 79829, 79841, 79843, 79847, 79861, 79867, 79873, 79889, 79901, 79903, 79907, 79939, 79943, 79967, 79973, 79979, 79987, 79997, 79999, 80021, 80039, 80051, 80071, 80077, 80107, 80111, 80141, 80147, 80149, 80153, 80167, 80173, 80177, 80191, 80207, 80209, 80221, 80231, 80233, 80239, 80251, 80263, 80273, 80279, 80287, 80309, 80317, 80329, 80341, 80347, 80363, 80369, 80387, 80407, 80429, 80447, 80449, 80471, 80473, 80489, 80491, 80513, 80527, 80537, 80557, 80567, 80599, 80603, 80611, 80621, 80627, 80629, 80651, 80657, 80669, 80671, 80677, 80681, 80683, 80687, 80701, 80713, 80737, 80747, 80749, 80761, 80777, 80779, 80783, 80789, 80803, 80809, 80819, 80831, 80833, 80849, 80863, 80897, 80909, 80911, 80917, 80923, 80929, 80933, 80953, 80963, 80989, 81001, 81013, 81017, 81019, 81023, 81031, 81041, 81043, 81047, 81049, 81071, 81077, 81083, 81097, 81101, 81119, 81131, 81157, 81163, 81173, 81181, 81197, 81199, 81203, 81223, 81233, 81239, 81281, 81283, 81293, 81299, 81307, 81331, 81343, 81349, 81353, 81359, 81371, 81373, 81401, 81409, 81421, 81439, 81457, 81463, 81509, 81517, 81527, 81533, 81547, 81551, 81553, 81559, 81563, 81569, 81611, 81619, 81629, 81637, 81647, 81649, 81667, 81671, 81677, 81689, 81701, 81703, 81707, 81727, 81737, 81749, 81761, 81769, 81773, 81799, 81817, 81839, 81847, 81853, 81869, 81883, 81899, 81901, 81919, 81929, 81931, 81937, 81943, 81953, 81967, 81971, 81973, 82003, 82007, 82009, 82013, 82021, 82031, 82037, 82039, 82051, 82067, 82073, 82129, 82139, 82141, 82153, 82163, 82171, 82183, 82189, 82193, 82207, 82217, 82219, 82223, 82231, 82237, 82241, 82261, 82267, 82279, 82301, 82307, 82339, 82349, 82351, 82361, 82373, 82387, 82393, 82421, 82457, 82463, 82469, 82471, 82483, 82487, 82493, 82499, 82507, 82529, 82531, 82549, 82559, 82561, 82567, 82571, 82591, 82601, 82609, 82613, 82619, 82633, 82651, 82657, 82699, 82721, 82723, 82727, 82729, 82757, 82759, 82763, 82781, 82787, 82793, 82799, 82811, 82813, 82837, 82847, 82883, 82889, 82891, 82903, 82913, 82939, 82963, 82981, 82997, 83003, 83009, 83023, 83047, 83059, 83063, 83071, 83077, 83089, 83093, 83101, 83117, 83137, 83177, 83203, 83207, 83219, 83221, 83227, 83231, 83233, 83243, 83257, 83267, 83269, 83273, 83299, 83311, 83339, 83341, 83357, 83383, 83389, 83399, 83401, 83407, 83417, 83423, 83431, 83437, 83443, 83449, 83459, 83471, 83477, 83497, 83537, 83557, 83561, 83563, 83579, 83591, 83597, 83609, 83617, 83621, 83639, 83641, 83653, 83663, 83689, 83701, 83717, 83719, 83737, 83761, 83773, 83777, 83791, 83813, 83833, 83843, 83857, 83869, 83873, 83891, 83903, 83911, 83921, 83933, 83939, 83969, 83983, 83987, 84011, 84017, 84047, 84053, 84059, 84061, 84067, 84089, 84121, 84127, 84131, 84137, 84143, 84163, 84179, 84181, 84191, 84199, 84211, 84221, 84223, 84229, 84239, 84247, 84263, 84299, 84307, 84313, 84317, 84319, 84347, 84349, 84377, 84389, 84391, 84401, 84407, 84421, 84431, 84437, 84443, 84449, 84457, 84463, 84467, 84481, 84499, 84503, 84509, 84521, 84523, 84533, 84551, 84559, 84589, 84629, 84631, 84649, 84653, 84659, 84673, 84691, 84697, 84701, 84713, 84719, 84731, 84737, 84751, 84761, 84787, 84793, 84809, 84811, 84827, 84857, 84859, 84869, 84871, 84913, 84919, 84947, 84961, 84967, 84977, 84979, 84991, 85009, 85021, 85027, 85037, 85049, 85061, 85081, 85087, 85091, 85093, 85103, 85109, 85121, 85133, 85147, 85159, 85193, 85199, 85201, 85213, 85223, 85229, 85237, 85243, 85247, 85259, 85297, 85303, 85313, 85331, 85333, 85361, 85363, 85369, 85381, 85411, 85427, 85429, 85439, 85447, 85451, 85453, 85469, 85487, 85513, 85517, 85523, 85531, 85549, 85571, 85577, 85597, 85601, 85607, 85619, 85621, 85627, 85639, 85643, 85661, 85667, 85669, 85691, 85703, 85711, 85717, 85733, 85751, 85781, 85793, 85817, 85819, 85829, 85831, 85837, 85843, 85847, 85853, 85889, 85903, 85909, 85931, 85933, 85991, 85999, 86011, 86017, 86027, 86029, 86069, 86077, 86083, 86111, 86113, 86117, 86131, 86137, 86143, 86161, 86171, 86179, 86183, 86197, 86201, 86209, 86239, 86243, 86249, 86257, 86263, 86269, 86287, 86291, 86293, 86297, 86311, 86323, 86341, 86351, 86353, 86357, 86369, 86371, 86381, 86389, 86399, 86413, 86423, 86441, 86453, 86461, 86467, 86477, 86491, 86501, 86509, 86531, 86533, 86539, 86561, 86573, 86579, 86587, 86599, 86627, 86629, 86677, 86689, 86693, 86711, 86719, 86729, 86743, 86753, 86767, 86771, 86783, 86813, 86837, 86843, 86851, 86857, 86861, 86869, 86923, 86927, 86929, 86939, 86951, 86959, 86969, 86981, 86993, 87011, 87013, 87037, 87041, 87049, 87071, 87083, 87103, 87107, 87119, 87121, 87133, 87149, 87151, 87179, 87181, 87187, 87211, 87221, 87223, 87251, 87253, 87257, 87277, 87281, 87293, 87299, 87313, 87317, 87323, 87337, 87359, 87383, 87403, 87407, 87421, 87427, 87433, 87443, 87473, 87481, 87491, 87509, 87511, 87517, 87523, 87539, 87541, 87547, 87553, 87557, 87559, 87583, 87587, 87589, 87613, 87623, 87629, 87631, 87641, 87643, 87649, 87671, 87679, 87683, 87691, 87697, 87701, 87719, 87721, 87739, 87743, 87751, 87767, 87793, 87797, 87803, 87811, 87833, 87853, 87869, 87877, 87881, 87887, 87911, 87917, 87931, 87943, 87959, 87961, 87973, 87977, 87991, 88001, 88003, 88007, 88019, 88037, 88069, 88079, 88093, 88117, 88129, 88169, 88177, 88211, 88223, 88237, 88241, 88259, 88261, 88289, 88301, 88321, 88327, 88337, 88339, 88379, 88397, 88411, 88423, 88427, 88463, 88469, 88471, 88493, 88499, 88513, 88523, 88547, 88589, 88591, 88607, 88609, 88643, 88651, 88657, 88661, 88663, 88667, 88681, 88721, 88729, 88741, 88747, 88771, 88789, 88793, 88799, 88801, 88807, 88811, 88813, 88817, 88819, 88843, 88853, 88861, 88867, 88873, 88883, 88897, 88903, 88919, 88937, 88951, 88969, 88993, 88997, 89003, 89009, 89017, 89021, 89041, 89051, 89057, 89069, 89071, 89083, 89087, 89101, 89107, 89113, 89119, 89123, 89137, 89153, 89189, 89203, 89209, 89213, 89227, 89231, 89237, 89261, 89269, 89273, 89293, 89303, 89317, 89329, 89363, 89371, 89381, 89387, 89393, 89399, 89413, 89417, 89431, 89443, 89449, 89459, 89477, 89491, 89501, 89513, 89519, 89521, 89527, 89533, 89561, 89563, 89567, 89591, 89597, 89599, 89603, 89611, 89627, 89633, 89653, 89657, 89659, 89669, 89671, 89681, 89689, 89753, 89759, 89767, 89779, 89783, 89797, 89809, 89819, 89821, 89833, 89839, 89849, 89867, 89891, 89897, 89899, 89909, 89917, 89923, 89939, 89959, 89963, 89977, 89983, 89989, 90001, 90007, 90011, 90017, 90019, 90023, 90031, 90053, 90059, 90067, 90071, 90073, 90089, 90107, 90121, 90127, 90149, 90163, 90173, 90187, 90191, 90197, 90199, 90203, 90217, 90227, 90239, 90247, 90263, 90271, 90281, 90289, 90313, 90353, 90359, 90371, 90373, 90379, 90397, 90401, 90403, 90407, 90437, 90439, 90469, 90473, 90481, 90499, 90511, 90523, 90527, 90529, 90533, 90547, 90583, 90599, 90617, 90619, 90631, 90641, 90647, 90659, 90677, 90679, 90697, 90703, 90709, 90731, 90749, 90787, 90793, 90803, 90821, 90823, 90833, 90841, 90847, 90863, 90887, 90901, 90907, 90911, 90917, 90931, 90947, 90971, 90977, 90989, 90997, 91009, 91019, 91033, 91079, 91081, 91097, 91099, 91121, 91127, 91129, 91139, 91141, 91151, 91153, 91159, 91163, 91183, 91193, 91199, 91229, 91237, 91243, 91249, 91253, 91283, 91291, 91297, 91303, 91309, 91331, 91367, 91369, 91373, 91381, 91387, 91393, 91397, 91411, 91423, 91433, 91453, 91457, 91459, 91463, 91493, 91499, 91513, 91529, 91541, 91571, 91573, 91577, 91583, 91591, 91621, 91631, 91639, 91673, 91691, 91703, 91711, 91733, 91753, 91757, 91771, 91781, 91801, 91807, 91811, 91813, 91823, 91837, 91841, 91867, 91873, 91909, 91921, 91939, 91943, 91951, 91957, 91961, 91967, 91969, 91997, 92003, 92009, 92033, 92041, 92051, 92077, 92083, 92107, 92111, 92119, 92143, 92153, 92173, 92177, 92179, 92189, 92203, 92219, 92221, 92227, 92233, 92237, 92243, 92251, 92269, 92297, 92311, 92317, 92333, 92347, 92353, 92357, 92363, 92369, 92377, 92381, 92383, 92387, 92399, 92401, 92413, 92419, 92431, 92459, 92461, 92467, 92479, 92489, 92503, 92507, 92551, 92557, 92567, 92569, 92581, 92593, 92623, 92627, 92639, 92641, 92647, 92657, 92669, 92671, 92681, 92683, 92693, 92699, 92707, 92717, 92723, 92737, 92753, 92761, 92767, 92779, 92789, 92791, 92801, 92809, 92821, 92831, 92849, 92857, 92861, 92863, 92867, 92893, 92899, 92921, 92927, 92941, 92951, 92957, 92959, 92987, 92993, 93001, 93047, 93053, 93059, 93077, 93083, 93089, 93097, 93103, 93113, 93131, 93133, 93139, 93151, 93169, 93179, 93187, 93199, 93229, 93239, 93241, 93251, 93253, 93257, 93263, 93281, 93283, 93287, 93307, 93319, 93323, 93329, 93337, 93371, 93377, 93383, 93407, 93419, 93427, 93463, 93479, 93481, 93487, 93491, 93493, 93497, 93503, 93523, 93529, 93553, 93557, 93559, 93563, 93581, 93601, 93607, 93629, 93637, 93683, 93701, 93703, 93719, 93739, 93761, 93763, 93787, 93809, 93811, 93827, 93851, 93871, 93887, 93889, 93893, 93901, 93911, 93913, 93923, 93937, 93941, 93949, 93967, 93971, 93979, 93983, 93997, 94007, 94009, 94033, 94049, 94057, 94063, 94079, 94099, 94109, 94111, 94117, 94121, 94151, 94153, 94169, 94201, 94207, 94219, 94229, 94253, 94261, 94273, 94291, 94307, 94309, 94321, 94327, 94331, 94343, 94349, 94351, 94379, 94397, 94399, 94421, 94427, 94433, 94439, 94441, 94447, 94463, 94477, 94483, 94513, 94529, 94531, 94541, 94543, 94547, 94559, 94561, 94573, 94583, 94597, 94603, 94613, 94621, 94649, 94651, 94687, 94693, 94709, 94723, 94727, 94747, 94771, 94777, 94781, 94789, 94793, 94811, 94819, 94823, 94837, 94841, 94847, 94849, 94873, 94889, 94903, 94907, 94933, 94949, 94951, 94961, 94993, 94999, 95003, 95009, 95021, 95027, 95063, 95071, 95083, 95087, 95089, 95093, 95101, 95107, 95111, 95131, 95143, 95153, 95177, 95189, 95191, 95203, 95213, 95219, 95231, 95233, 95239, 95257, 95261, 95267, 95273, 95279, 95287, 95311, 95317, 95327, 95339, 95369, 95383, 95393, 95401, 95413, 95419, 95429, 95441, 95443, 95461, 95467, 95471, 95479, 95483, 95507, 95527, 95531, 95539, 95549, 95561, 95569, 95581, 95597, 95603, 95617, 95621, 95629, 95633, 95651, 95701, 95707, 95713, 95717, 95723, 95731, 95737, 95747, 95773, 95783, 95789, 95791, 95801, 95803, 95813, 95819, 95857, 95869, 95873, 95881, 95891, 95911, 95917, 95923, 95929, 95947, 95957, 95959, 95971, 95987, 95989, 96001, 96013, 96017, 96043, 96053, 96059, 96079, 96097, 96137, 96149, 96157, 96167, 96179, 96181, 96199, 96211, 96221, 96223, 96233, 96259, 96263, 96269, 96281, 96289, 96293, 96323, 96329, 96331, 96337, 96353, 96377, 96401, 96419, 96431, 96443, 96451, 96457, 96461, 96469, 96479, 96487, 96493, 96497, 96517, 96527, 96553, 96557, 96581, 96587, 96589, 96601, 96643, 96661, 96667, 96671, 96697, 96703, 96731, 96737, 96739, 96749, 96757, 96763, 96769, 96779, 96787, 96797, 96799, 96821, 96823, 96827, 96847, 96851, 96857, 96893, 96907, 96911, 96931, 96953, 96959, 96973, 96979, 96989, 96997, 97001, 97003, 97007, 97021, 97039, 97073, 97081, 97103, 97117, 97127, 97151, 97157, 97159, 97169, 97171, 97177, 97187, 97213, 97231, 97241, 97259, 97283, 97301, 97303, 97327, 97367, 97369, 97373, 97379, 97381, 97387, 97397, 97423, 97429, 97441, 97453, 97459, 97463, 97499, 97501, 97511, 97523, 97547, 97549, 97553, 97561, 97571, 97577, 97579, 97583, 97607, 97609, 97613, 97649, 97651, 97673, 97687, 97711, 97729, 97771, 97777, 97787, 97789, 97813, 97829, 97841, 97843, 97847, 97849, 97859, 97861, 97871, 97879, 97883, 97919, 97927, 97931, 97943, 97961, 97967, 97973, 97987, 98009, 98011, 98017, 98041, 98047, 98057, 98081, 98101, 98123, 98129, 98143, 98179, 98207, 98213, 98221, 98227, 98251, 98257, 98269, 98297, 98299, 98317, 98321, 98323, 98327, 98347, 98369, 98377, 98387, 98389, 98407, 98411, 98419, 98429, 98443, 98453, 98459, 98467, 98473, 98479, 98491, 98507, 98519, 98533, 98543, 98561, 98563, 98573, 98597, 98621, 98627, 98639, 98641, 98663, 98669, 98689, 98711, 98713, 98717, 98729, 98731, 98737, 98773, 98779, 98801, 98807, 98809, 98837, 98849, 98867, 98869, 98873, 98887, 98893, 98897, 98899, 98909, 98911, 98927, 98929, 98939, 98947, 98953, 98963, 98981, 98993, 98999, 99013, 99017, 99023, 99041, 99053, 99079, 99083, 99089, 99103, 99109, 99119, 99131, 99133, 99137, 99139, 99149, 99173, 99181, 99191, 99223, 99233, 99241, 99251, 99257, 99259, 99277, 99289, 99317, 99347, 99349, 99367, 99371, 99377, 99391, 99397, 99401, 99409, 99431, 99439, 99469, 99487, 99497, 99523, 99527, 99529, 99551, 99559, 99563, 99571, 99577, 99581, 99607, 99611, 99623, 99643, 99661, 99667, 99679, 99689, 99707, 99709, 99713, 99719, 99721, 99733, 99761, 99767, 99787, 99793, 99809, 99817, 99823, 99829, 99833, 99839, 99859, 99871, 99877, 99881, 99901, 99907, 99923, 99929, 99961, 99971, 99989, 99991, 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, 100129, 100151, 100153, 100169, 100183, 100189, 100193, 100207, 100213, 100237, 100267, 100271, 100279, 100291, 100297, 100313, 100333, 100343, 100357, 100361, 100363, 100379, 100391, 100393, 100403, 100411, 100417, 100447, 100459, 100469, 100483, 100493, 100501, 100511, 100517, 100519, 100523, 100537, 100547, 100549, 100559, 100591, 100609, 100613, 100621, 100649, 100669, 100673, 100693, 100699, 100703, 100733, 100741, 100747, 100769, 100787, 100799, 100801, 100811, 100823, 100829, 100847, 100853, 100907, 100913, 100927, 100931, 100937, 100943, 100957, 100981, 100987, 100999, 101009, 101021, 101027, 101051, 101063, 101081, 101089, 101107, 101111, 101113, 101117, 101119, 101141, 101149, 101159, 101161, 101173, 101183, 101197, 101203, 101207, 101209, 101221, 101267, 101273, 101279, 101281, 101287, 101293, 101323, 101333, 101341, 101347, 101359, 101363, 101377, 101383, 101399, 101411, 101419, 101429, 101449, 101467, 101477, 101483, 101489, 101501, 101503, 101513, 101527, 101531, 101533, 101537, 101561, 101573, 101581, 101599, 101603, 101611, 101627, 101641, 101653, 101663, 101681, 101693, 101701, 101719, 101723, 101737, 101741, 101747, 101749, 101771, 101789, 101797, 101807, 101833, 101837, 101839, 101863, 101869, 101873, 101879, 101891, 101917, 101921, 101929, 101939, 101957, 101963, 101977, 101987, 101999, 102001, 102013, 102019, 102023, 102031, 102043, 102059, 102061, 102071, 102077, 102079, 102101, 102103, 102107, 102121, 102139, 102149, 102161, 102181, 102191, 102197, 102199, 102203, 102217, 102229, 102233, 102241, 102251, 102253, 102259, 102293, 102299, 102301, 102317, 102329, 102337, 102359, 102367, 102397, 102407, 102409, 102433, 102437, 102451, 102461, 102481, 102497, 102499, 102503, 102523, 102533, 102539, 102547, 102551, 102559, 102563, 102587, 102593, 102607, 102611, 102643, 102647, 102653, 102667, 102673, 102677, 102679, 102701, 102761, 102763, 102769, 102793, 102797, 102811, 102829, 102841, 102859, 102871, 102877, 102881, 102911, 102913, 102929, 102931, 102953, 102967, 102983, 103001, 103007, 103043, 103049, 103067, 103069, 103079, 103087, 103091, 103093, 103099, 103123, 103141, 103171, 103177, 103183, 103217, 103231, 103237, 103289, 103291, 103307, 103319, 103333, 103349, 103357, 103387, 103391, 103393, 103399, 103409, 103421, 103423, 103451, 103457, 103471, 103483, 103511, 103529, 103549, 103553, 103561, 103567, 103573, 103577, 103583, 103591, 103613, 103619, 103643, 103651, 103657, 103669, 103681, 103687, 103699, 103703, 103723, 103769, 103787, 103801, 103811, 103813, 103837, 103841, 103843, 103867, 103889, 103903, 103913, 103919, 103951, 103963, 103967, 103969, 103979, 103981, 103991, 103993, 103997, 104003, 104009, 104021, 104033, 104047, 104053, 104059, 104087, 104089, 104107, 104113, 104119, 104123, 104147, 104149, 104161, 104173, 104179, 104183, 104207, 104231, 104233, 104239, 104243, 104281, 104287, 104297, 104309, 104311, 104323, 104327, 104347, 104369, 104381, 104383, 104393, 104399, 104417, 104459, 104471, 104473, 104479, 104491, 104513, 104527, 104537, 104543, 104549, 104551, 104561, 104579, 104593, 104597, 104623, 104639, 104651, 104659, 104677, 104681, 104683, 104693, 104701, 104707, 104711, 104717, 104723, 104729, 104743, 104759, 104761, 104773, 104779, 104789, 104801, 104803, 104827, 104831, 104849, 104851, 104869, 104879, 104891, 104911, 104917, 104933, 104947, 104953, 104959, 104971, 104987, 104999, 105019, 105023, 105031, 105037, 105071, 105097, 105107, 105137, 105143, 105167, 105173, 105199, 105211, 105227, 105229, 105239, 105251, 105253, 105263, 105269, 105277, 105319, 105323, 105331, 105337, 105341, 105359, 105361, 105367, 105373, 105379, 105389, 105397, 105401, 105407, 105437, 105449, 105467, 105491, 105499, 105503, 105509, 105517, 105527, 105529, 105533, 105541, 105557, 105563, 105601, 105607, 105613, 105619, 105649, 105653, 105667, 105673, 105683, 105691, 105701, 105727, 105733, 105751, 105761, 105767, 105769, 105817, 105829, 105863, 105871, 105883, 105899, 105907, 105913, 105929, 105943, 105953, 105967, 105971, 105977, 105983, 105997, 106013, 106019, 106031, 106033, 106087, 106103, 106109, 106121, 106123, 106129, 106163, 106181, 106187, 106189, 106207, 106213, 106217, 106219, 106243, 106261, 106273, 106277, 106279, 106291, 106297, 106303, 106307, 106319, 106321, 106331, 106349, 106357, 106363, 106367, 106373, 106391, 106397, 106411, 106417, 106427, 106433, 106441, 106451, 106453, 106487, 106501, 106531, 106537, 106541, 106543, 106591, 106619, 106621, 106627, 106637, 106649, 106657, 106661, 106663, 106669, 106681, 106693, 106699, 106703, 106721, 106727, 106739, 106747, 106751, 106753, 106759, 106781, 106783, 106787, 106801, 106823, 106853, 106859, 106861, 106867, 106871, 106877, 106903, 106907, 106921, 106937, 106949, 106957, 106961, 106963, 106979, 106993, 107021, 107033, 107053, 107057, 107069, 107071, 107077, 107089, 107099, 107101, 107119, 107123, 107137, 107171, 107183, 107197, 107201, 107209, 107227, 107243, 107251, 107269, 107273, 107279, 107309, 107323, 107339, 107347, 107351, 107357, 107377, 107441, 107449, 107453, 107467, 107473, 107507, 107509, 107563, 107581, 107599, 107603, 107609, 107621, 107641, 107647, 107671, 107687, 107693, 107699, 107713, 107717, 107719, 107741, 107747, 107761, 107773, 107777, 107791, 107827, 107837, 107839, 107843, 107857, 107867, 107873, 107881, 107897, 107903, 107923, 107927, 107941, 107951, 107971, 107981, 107999, 108007, 108011, 108013, 108023, 108037, 108041, 108061, 108079, 108089, 108107, 108109, 108127, 108131, 108139, 108161, 108179, 108187, 108191, 108193, 108203, 108211, 108217, 108223, 108233, 108247, 108263, 108271, 108287, 108289, 108293, 108301, 108343, 108347, 108359, 108377, 108379, 108401, 108413, 108421, 108439, 108457, 108461, 108463, 108497, 108499, 108503, 108517, 108529, 108533, 108541, 108553, 108557, 108571, 108587, 108631, 108637, 108643, 108649, 108677, 108707, 108709, 108727, 108739, 108751, 108761, 108769, 108791, 108793, 108799, 108803, 108821, 108827, 108863, 108869, 108877, 108881, 108883, 108887, 108893, 108907, 108917, 108923, 108929, 108943, 108947, 108949, 108959, 108961, 108967, 108971, 108991, 109001, 109013, 109037, 109049, 109063, 109073, 109097, 109103, 109111, 109121, 109133, 109139, 109141, 109147, 109159, 109169, 109171, 109199, 109201, 109211, 109229, 109253, 109267, 109279, 109297, 109303, 109313, 109321, 109331, 109357, 109363, 109367, 109379, 109387, 109391, 109397, 109423, 109433, 109441, 109451, 109453, 109469, 109471, 109481, 109507, 109517, 109519, 109537, 109541, 109547, 109567, 109579, 109583, 109589, 109597, 109609, 109619, 109621, 109639, 109661, 109663, 109673, 109717, 109721, 109741, 109751, 109789, 109793, 109807, 109819, 109829, 109831, 109841, 109843, 109847, 109849, 109859, 109873, 109883, 109891, 109897, 109903, 109913, 109919, 109937, 109943, 109961, 109987, 110017, 110023, 110039, 110051, 110059, 110063, 110069, 110083, 110119, 110129, 110161, 110183, 110221, 110233, 110237, 110251, 110261, 110269, 110273, 110281, 110291, 110311, 110321, 110323, 110339, 110359, 110419, 110431, 110437, 110441, 110459, 110477, 110479, 110491, 110501, 110503, 110527, 110533, 110543, 110557, 110563, 110567, 110569, 110573, 110581, 110587, 110597, 110603, 110609, 110623, 110629, 110641, 110647, 110651, 110681, 110711, 110729, 110731, 110749, 110753, 110771, 110777, 110807, 110813, 110819, 110821, 110849, 110863, 110879, 110881, 110899, 110909, 110917, 110921, 110923, 110927, 110933, 110939, 110947, 110951, 110969, 110977, 110989, 111029, 111031, 111043, 111049, 111053, 111091, 111103, 111109, 111119, 111121, 111127, 111143, 111149, 111187, 111191, 111211, 111217, 111227, 111229, 111253, 111263, 111269, 111271, 111301, 111317, 111323, 111337, 111341, 111347, 111373, 111409, 111427, 111431, 111439, 111443, 111467, 111487, 111491, 111493, 111497, 111509, 111521, 111533, 111539, 111577, 111581, 111593, 111599, 111611, 111623, 111637, 111641, 111653, 111659, 111667, 111697, 111721, 111731, 111733, 111751, 111767, 111773, 111779, 111781, 111791, 111799, 111821, 111827, 111829, 111833, 111847, 111857, 111863, 111869, 111871, 111893, 111913, 111919, 111949, 111953, 111959, 111973, 111977, 111997, 112019, 112031, 112061, 112067, 112069, 112087, 112097, 112103, 112111, 112121, 112129, 112139, 112153, 112163, 112181, 112199, 112207, 112213, 112223, 112237, 112241, 112247, 112249, 112253, 112261, 112279, 112289, 112291, 112297, 112303, 112327, 112331, 112337, 112339, 112349, 112361, 112363, 112397, 112403, 112429, 112459, 112481, 112501, 112507, 112543, 112559, 112571, 112573, 112577, 112583, 112589, 112601, 112603, 112621, 112643, 112657, 112663, 112687, 112691, 112741, 112757, 112759, 112771, 112787, 112799, 112807, 112831, 112843, 112859, 112877, 112901, 112909, 112913, 112919, 112921, 112927, 112939, 112951, 112967, 112979, 112997, 113011, 113017, 113021, 113023, 113027, 113039, 113041, 113051, 113063, 113081, 113083, 113089, 113093, 113111, 113117, 113123, 113131, 113143, 113147, 113149, 113153, 113159, 113161, 113167, 113171, 113173, 113177, 113189, 113209, 113213, 113227, 113233, 113279, 113287, 113327, 113329, 113341, 113357, 113359, 113363, 113371, 113381, 113383, 113417, 113437, 113453, 113467, 113489, 113497, 113501, 113513, 113537, 113539, 113557, 113567, 113591, 113621, 113623, 113647, 113657, 113683, 113717, 113719, 113723, 113731, 113749, 113759, 113761, 113777, 113779, 113783, 113797, 113809, 113819, 113837, 113843, 113891, 113899, 113903, 113909, 113921, 113933, 113947, 113957, 113963, 113969, 113983, 113989, 114001, 114013, 114031, 114041, 114043, 114067, 114073, 114077, 114083, 114089, 114113, 114143, 114157, 114161, 114167, 114193, 114197, 114199, 114203, 114217, 114221, 114229, 114259, 114269, 114277, 114281, 114299, 114311, 114319, 114329, 114343, 114371, 114377, 114407, 114419, 114451, 114467, 114473, 114479, 114487, 114493, 114547, 114553, 114571, 114577, 114593, 114599, 114601, 114613, 114617, 114641, 114643, 114649, 114659, 114661, 114671, 114679, 114689, 114691, 114713, 114743, 114749, 114757, 114761, 114769, 114773, 114781, 114797, 114799, 114809, 114827, 114833, 114847, 114859, 114883, 114889, 114901, 114913, 114941, 114967, 114973, 114997, 115001, 115013, 115019, 115021, 115057, 115061, 115067, 115079, 115099, 115117, 115123, 115127, 115133, 115151, 115153, 115163, 115183, 115201, 115211, 115223, 115237, 115249, 115259, 115279, 115301, 115303, 115309, 115319, 115321, 115327, 115331, 115337, 115343, 115361, 115363, 115399, 115421, 115429, 115459, 115469, 115471, 115499, 115513, 115523, 115547, 115553, 115561, 115571, 115589, 115597, 115601, 115603, 115613, 115631, 115637, 115657, 115663, 115679, 115693, 115727, 115733, 115741, 115751, 115757, 115763, 115769, 115771, 115777, 115781, 115783, 115793, 115807, 115811, 115823, 115831, 115837, 115849, 115853, 115859, 115861, 115873, 115877, 115879, 115883, 115891, 115901, 115903, 115931, 115933, 115963, 115979, 115981, 115987, 116009, 116027, 116041, 116047, 116089, 116099, 116101, 116107, 116113, 116131, 116141, 116159, 116167, 116177, 116189, 116191, 116201, 116239, 116243, 116257, 116269, 116273, 116279, 116293, 116329, 116341, 116351, 116359, 116371, 116381, 116387, 116411, 116423, 116437, 116443, 116447, 116461, 116471, 116483, 116491, 116507, 116531, 116533, 116537, 116539, 116549, 116579, 116593, 116639, 116657, 116663, 116681, 116687, 116689, 116707, 116719, 116731, 116741, 116747, 116789, 116791, 116797, 116803, 116819, 116827, 116833, 116849, 116867, 116881, 116903, 116911, 116923, 116927, 116929, 116933, 116953, 116959, 116969, 116981, 116989, 116993, 117017, 117023, 117037, 117041, 117043, 117053, 117071, 117101, 117109, 117119, 117127, 117133, 117163, 117167, 117191, 117193, 117203, 117209, 117223, 117239, 117241, 117251, 117259, 117269, 117281, 117307, 117319, 117329, 117331, 117353, 117361, 117371, 117373, 117389, 117413, 117427, 117431, 117437, 117443, 117497, 117499, 117503, 117511, 117517, 117529, 117539, 117541, 117563, 117571, 117577, 117617, 117619, 117643, 117659, 117671, 117673, 117679, 117701, 117703, 117709, 117721, 117727, 117731, 117751, 117757, 117763, 117773, 117779, 117787, 117797, 117809, 117811, 117833, 117839, 117841, 117851, 117877, 117881, 117883, 117889, 117899, 117911, 117917, 117937, 117959, 117973, 117977, 117979, 117989, 117991, 118033, 118037, 118043, 118051, 118057, 118061, 118081, 118093, 118127, 118147, 118163, 118169, 118171, 118189, 118211, 118213, 118219, 118247, 118249, 118253, 118259, 118273, 118277, 118297, 118343, 118361, 118369, 118373, 118387, 118399, 118409, 118411, 118423, 118429, 118453, 118457, 118463, 118471, 118493, 118529, 118543, 118549, 118571, 118583, 118589, 118603, 118619, 118621, 118633, 118661, 118669, 118673, 118681, 118687, 118691, 118709, 118717, 118739, 118747, 118751, 118757, 118787, 118799, 118801, 118819, 118831, 118843, 118861, 118873, 118891, 118897, 118901, 118903, 118907, 118913, 118927, 118931, 118967, 118973, 119027, 119033, 119039, 119047, 119057, 119069, 119083, 119087, 119089, 119099, 119101, 119107, 119129, 119131, 119159, 119173, 119179, 119183, 119191, 119227, 119233, 119237, 119243, 119267, 119291, 119293, 119297, 119299, 119311, 119321, 119359, 119363, 119389, 119417, 119419, 119429, 119447, 119489, 119503, 119513, 119533, 119549, 119551, 119557, 119563, 119569, 119591, 119611, 119617, 119627, 119633, 119653, 119657, 119659, 119671, 119677, 119687, 119689, 119699, 119701, 119723, 119737, 119747, 119759, 119771, 119773, 119783, 119797, 119809, 119813, 119827, 119831, 119839, 119849, 119851, 119869, 119881, 119891, 119921, 119923, 119929, 119953, 119963, 119971, 119981, 119983, 119993, 120011, 120017, 120041, 120047, 120049, 120067, 120077, 120079, 120091, 120097, 120103, 120121, 120157, 120163, 120167, 120181, 120193, 120199, 120209, 120223, 120233, 120247, 120277, 120283, 120293, 120299, 120319, 120331, 120349, 120371, 120383, 120391, 120397, 120401, 120413, 120427, 120431, 120473, 120503, 120511, 120539, 120551, 120557, 120563, 120569, 120577, 120587, 120607, 120619, 120623, 120641, 120647, 120661, 120671, 120677, 120689, 120691, 120709, 120713, 120721, 120737, 120739, 120749, 120763, 120767, 120779, 120811, 120817, 120823, 120829, 120833, 120847, 120851, 120863, 120871, 120877, 120889, 120899, 120907, 120917, 120919, 120929, 120937, 120941, 120943, 120947, 120977, 120997, 121001, 121007, 121013, 121019, 121021, 121039, 121061, 121063, 121067, 121081, 121123, 121139, 121151, 121157, 121169, 121171, 121181, 121189, 121229, 121259, 121267, 121271, 121283, 121291, 121309, 121313, 121321, 121327, 121333, 121343, 121349, 121351, 121357, 121367, 121369, 121379, 121403, 121421, 121439, 121441, 121447, 121453, 121469, 121487, 121493, 121501, 121507, 121523, 121531, 121547, 121553, 121559, 121571, 121577, 121579, 121591, 121607, 121609, 121621, 121631, 121633, 121637, 121661, 121687, 121697, 121711, 121721, 121727, 121763, 121787, 121789, 121843, 121853, 121867, 121883, 121889, 121909, 121921, 121931, 121937, 121949, 121951, 121963, 121967, 121993, 121997, 122011, 122021, 122027, 122029, 122033, 122039, 122041, 122051, 122053, 122069, 122081, 122099, 122117, 122131, 122147, 122149, 122167, 122173, 122201, 122203, 122207, 122209, 122219, 122231, 122251, 122263, 122267, 122273, 122279, 122299, 122321, 122323, 122327, 122347, 122363, 122387, 122389, 122393, 122399, 122401, 122443, 122449, 122453, 122471, 122477, 122489, 122497, 122501, 122503, 122509, 122527, 122533, 122557, 122561, 122579, 122597, 122599, 122609, 122611, 122651, 122653, 122663, 122693, 122701, 122719, 122741, 122743, 122753, 122761, 122777, 122789, 122819, 122827, 122833, 122839, 122849, 122861, 122867, 122869, 122887, 122891, 122921, 122929, 122939, 122953, 122957, 122963, 122971, 123001, 123007, 123017, 123031, 123049, 123059, 123077, 123083, 123091, 123113, 123121, 123127, 123143, 123169, 123191, 123203, 123209, 123217, 123229, 123239, 123259, 123269, 123289, 123307, 123311, 123323, 123341, 123373, 123377, 123379, 123397, 123401, 123407, 123419, 123427, 123433, 123439, 123449, 123457, 123479, 123491, 123493, 123499, 123503, 123517, 123527, 123547, 123551, 123553, 123581, 123583, 123593, 123601, 123619, 123631, 123637, 123653, 123661, 123667, 123677, 123701, 123707, 123719, 123727, 123731, 123733, 123737, 123757, 123787, 123791, 123803, 123817, 123821, 123829, 123833, 123853, 123863, 123887, 123911, 123923, 123931, 123941, 123953, 123973, 123979, 123983, 123989, 123997, 124001, 124021, 124067, 124087, 124097, 124121, 124123, 124133, 124139, 124147, 124153, 124171, 124181, 124183, 124193, 124199, 124213, 124231, 124247, 124249, 124277, 124291, 124297, 124301, 124303, 124309, 124337, 124339, 124343, 124349, 124351, 124363, 124367, 124427, 124429, 124433, 124447, 124459, 124471, 124477, 124489, 124493, 124513, 124529, 124541, 124543, 124561, 124567, 124577, 124601, 124633, 124643, 124669, 124673, 124679, 124693, 124699, 124703, 124717, 124721, 124739, 124753, 124759, 124769, 124771, 124777, 124781, 124783, 124793, 124799, 124819, 124823, 124847, 124853, 124897, 124907, 124909, 124919, 124951, 124979, 124981, 124987, 124991, 125003, 125017, 125029, 125053, 125063, 125093, 125101, 125107, 125113, 125117, 125119, 125131, 125141, 125149, 125183, 125197, 125201, 125207, 125219, 125221, 125231, 125243, 125261, 125269, 125287, 125299, 125303, 125311, 125329, 125339, 125353, 125371, 125383, 125387, 125399, 125407, 125423, 125429, 125441, 125453, 125471, 125497, 125507, 125509, 125527, 125539, 125551, 125591, 125597, 125617, 125621, 125627, 125639, 125641, 125651, 125659, 125669, 125683, 125687, 125693, 125707, 125711, 125717, 125731, 125737, 125743, 125753, 125777, 125789, 125791, 125803, 125813, 125821, 125863, 125887, 125897, 125899, 125921, 125927, 125929, 125933, 125941, 125959, 125963, 126001, 126011, 126013, 126019, 126023, 126031, 126037, 126041, 126047, 126067, 126079, 126097, 126107, 126127, 126131, 126143, 126151, 126173, 126199, 126211, 126223, 126227, 126229, 126233, 126241, 126257, 126271, 126307, 126311, 126317, 126323, 126337, 126341, 126349, 126359, 126397, 126421, 126433, 126443, 126457, 126461, 126473, 126481, 126487, 126491, 126493, 126499, 126517, 126541, 126547, 126551, 126583, 126601, 126611, 126613, 126631, 126641, 126653, 126683, 126691, 126703, 126713, 126719, 126733, 126739, 126743, 126751, 126757, 126761, 126781, 126823, 126827, 126839, 126851, 126857, 126859, 126913, 126923, 126943, 126949, 126961, 126967, 126989, 127031, 127033, 127037, 127051, 127079, 127081, 127103, 127123, 127133, 127139, 127157, 127163, 127189, 127207, 127217, 127219, 127241, 127247, 127249, 127261, 127271, 127277, 127289, 127291, 127297, 127301, 127321, 127331, 127343, 127363, 127373, 127399, 127403, 127423, 127447, 127453, 127481, 127487, 127493, 127507, 127529, 127541, 127549, 127579, 127583, 127591, 127597, 127601, 127607, 127609, 127637, 127643, 127649, 127657, 127663, 127669, 127679, 127681, 127691, 127703, 127709, 127711, 127717, 127727, 127733, 127739, 127747, 127763, 127781, 127807, 127817, 127819, 127837, 127843, 127849, 127859, 127867, 127873, 127877, 127913, 127921, 127931, 127951, 127973, 127979, 127997, 128021, 128033, 128047, 128053, 128099, 128111, 128113, 128119, 128147, 128153, 128159, 128173, 128189, 128201, 128203, 128213, 128221, 128237, 128239, 128257, 128273, 128287, 128291, 128311, 128321, 128327, 128339, 128341, 128347, 128351, 128377, 128389, 128393, 128399, 128411, 128413, 128431, 128437, 128449, 128461, 128467, 128473, 128477, 128483, 128489, 128509, 128519, 128521, 128549, 128551, 128563, 128591, 128599, 128603, 128621, 128629, 128657, 128659, 128663, 128669, 128677, 128683, 128693, 128717, 128747, 128749, 128761, 128767, 128813, 128819, 128831, 128833, 128837, 128857, 128861, 128873, 128879, 128903, 128923, 128939, 128941, 128951, 128959, 128969, 128971, 128981, 128983, 128987, 128993, 129001, 129011, 129023, 129037, 129049, 129061, 129083, 129089, 129097, 129113, 129119, 129121, 129127, 129169, 129187, 129193, 129197, 129209, 129221, 129223, 129229, 129263, 129277, 129281, 129287, 129289, 129293, 129313, 129341, 129347, 129361, 129379, 129401, 129403, 129419, 129439, 129443, 129449, 129457, 129461, 129469, 129491, 129497, 129499, 129509, 129517, 129527, 129529, 129533, 129539, 129553, 129581, 129587, 129589, 129593, 129607, 129629, 129631, 129641, 129643, 129671, 129707, 129719, 129733, 129737, 129749, 129757, 129763, 129769, 129793, 129803, 129841, 129853, 129887, 129893, 129901, 129917, 129919, 129937, 129953, 129959, 129967, 129971, 130003, 130021, 130027, 130043, 130051, 130057, 130069, 130073, 130079, 130087, 130099, 130121, 130127, 130147, 130171, 130183, 130199, 130201, 130211, 130223, 130241, 130253, 130259, 130261, 130267, 130279, 130303, 130307, 130337, 130343, 130349, 130363, 130367, 130369, 130379, 130399, 130409, 130411, 130423, 130439, 130447, 130457, 130469, 130477, 130483, 130489, 130513, 130517, 130523, 130531, 130547, 130553, 130579, 130589, 130619, 130621, 130631, 130633, 130639, 130643, 130649, 130651, 130657, 130681, 130687, 130693, 130699, 130729, 130769, 130783, 130787, 130807, 130811, 130817, 130829, 130841, 130843, 130859, 130873, 130927, 130957, 130969, 130973, 130981, 130987, 131009, 131011, 131023, 131041, 131059, 131063, 131071, 131101, 131111, 131113, 131129, 131143, 131149, 131171, 131203, 131213, 131221, 131231, 131249, 131251, 131267, 131293, 131297, 131303, 131311, 131317, 131321, 131357, 131363, 131371, 131381, 131413, 131431, 131437, 131441, 131447, 131449, 131477, 131479, 131489, 131497, 131501, 131507, 131519, 131543, 131561, 131581, 131591, 131611, 131617, 131627, 131639, 131641, 131671, 131687, 131701, 131707, 131711, 131713, 131731, 131743, 131749, 131759, 131771, 131777, 131779, 131783, 131797, 131837, 131839, 131849, 131861, 131891, 131893, 131899, 131909, 131927, 131933, 131939, 131941, 131947, 131959, 131969, 132001, 132019, 132047, 132049, 132059, 132071, 132103, 132109, 132113, 132137, 132151, 132157, 132169, 132173, 132199, 132229, 132233, 132241, 132247, 132257, 132263, 132283, 132287, 132299, 132313, 132329, 132331, 132347, 132361, 132367, 132371, 132383, 132403, 132409, 132421, 132437, 132439, 132469, 132491, 132499, 132511, 132523, 132527, 132529, 132533, 132541, 132547, 132589, 132607, 132611, 132619, 132623, 132631, 132637, 132647, 132661, 132667, 132679, 132689, 132697, 132701, 132707, 132709, 132721, 132739, 132749, 132751, 132757, 132761, 132763, 132817, 132833, 132851, 132857, 132859, 132863, 132887, 132893, 132911, 132929, 132947, 132949, 132953, 132961, 132967, 132971, 132989, 133013, 133033, 133039, 133051, 133069, 133073, 133087, 133097, 133103, 133109, 133117, 133121, 133153, 133157, 133169, 133183, 133187, 133201, 133213, 133241, 133253, 133261, 133271, 133277, 133279, 133283, 133303, 133319, 133321, 133327, 133337, 133349, 133351, 133379, 133387, 133391, 133403, 133417, 133439, 133447, 133451, 133481, 133493, 133499, 133519, 133541, 133543, 133559, 133571, 133583, 133597, 133631, 133633, 133649, 133657, 133669, 133673, 133691, 133697, 133709, 133711, 133717, 133723, 133733, 133769, 133781, 133801, 133811, 133813, 133831, 133843, 133853, 133873, 133877, 133919, 133949, 133963, 133967, 133979, 133981, 133993, 133999, 134033, 134039, 134047, 134053, 134059, 134077, 134081, 134087, 134089, 134093, 134129, 134153, 134161, 134171, 134177, 134191, 134207, 134213, 134219, 134227, 134243, 134257, 134263, 134269, 134287, 134291, 134293, 134327, 134333, 134339, 134341, 134353, 134359, 134363, 134369, 134371, 134399, 134401, 134417, 134437, 134443, 134471, 134489, 134503, 134507, 134513, 134581, 134587, 134591, 134593, 134597, 134609, 134639, 134669, 134677, 134681, 134683, 134699, 134707, 134731, 134741, 134753, 134777, 134789, 134807, 134837, 134839, 134851, 134857, 134867, 134873, 134887, 134909, 134917, 134921, 134923, 134947, 134951, 134989, 134999, 135007, 135017, 135019, 135029, 135043, 135049, 135059, 135077, 135089, 135101, 135119, 135131, 135151, 135173, 135181, 135193, 135197, 135209, 135211, 135221, 135241, 135257, 135271, 135277, 135281, 135283, 135301, 135319, 135329, 135347, 135349, 135353, 135367, 135389, 135391, 135403, 135409, 135427, 135431, 135433, 135449, 135461, 135463, 135467, 135469, 135479, 135497, 135511, 135533, 135559, 135571, 135581, 135589, 135593, 135599, 135601, 135607, 135613, 135617, 135623, 135637, 135647, 135649, 135661, 135671, 135697, 135701, 135719, 135721, 135727, 135731, 135743, 135757, 135781, 135787, 135799, 135829, 135841, 135851, 135859, 135887, 135893, 135899, 135911, 135913, 135929, 135937, 135977, 135979, 136013, 136027, 136033, 136043, 136057, 136067, 136069, 136093, 136099, 136111, 136133, 136139, 136163, 136177, 136189, 136193, 136207, 136217, 136223, 136237, 136247, 136261, 136273, 136277, 136303, 136309, 136319, 136327, 136333, 136337, 136343, 136351, 136361, 136373, 136379, 136393, 136397, 136399, 136403, 136417, 136421, 136429, 136447, 136453, 136463, 136471, 136481, 136483, 136501, 136511, 136519, 136523, 136531, 136537, 136541, 136547, 136559, 136573, 136601, 136603, 136607, 136621, 136649, 136651, 136657, 136691, 136693, 136709, 136711, 136727, 136733, 136739, 136751, 136753, 136769, 136777, 136811, 136813, 136841, 136849, 136859, 136861, 136879, 136883, 136889, 136897, 136943, 136949, 136951, 136963, 136973, 136979, 136987, 136991, 136993, 136999, 137029, 137077, 137087, 137089, 137117, 137119, 137131, 137143, 137147, 137153, 137177, 137183, 137191, 137197, 137201, 137209, 137219, 137239, 137251, 137273, 137279, 137303, 137321, 137339, 137341, 137353, 137359, 137363, 137369, 137383, 137387, 137393, 137399, 137413, 137437, 137443, 137447, 137453, 137477, 137483, 137491, 137507, 137519, 137537, 137567, 137573, 137587, 137593, 137597, 137623, 137633, 137639, 137653, 137659, 137699, 137707, 137713, 137723, 137737, 137743, 137771, 137777, 137791, 137803, 137827, 137831, 137849, 137867, 137869, 137873, 137909, 137911, 137927, 137933, 137941, 137947, 137957, 137983, 137993, 137999, 138007, 138041, 138053, 138059, 138071, 138077, 138079, 138101, 138107, 138113, 138139, 138143, 138157, 138163, 138179, 138181, 138191, 138197, 138209, 138239, 138241, 138247, 138251, 138283, 138289, 138311, 138319, 138323, 138337, 138349, 138371, 138373, 138389, 138401, 138403, 138407, 138427, 138433, 138449, 138451, 138461, 138469, 138493, 138497, 138511, 138517, 138547, 138559, 138563, 138569, 138571, 138577, 138581, 138587, 138599, 138617, 138629, 138637, 138641, 138647, 138661, 138679, 138683, 138727, 138731, 138739, 138763, 138793, 138797, 138799, 138821, 138829, 138841, 138863, 138869, 138883, 138889, 138893, 138899, 138917, 138923, 138937, 138959, 138967, 138977, 139021, 139033, 139067, 139079, 139091, 139109, 139121, 139123, 139133, 139169, 139177, 139187, 139199, 139201, 139241, 139267, 139273, 139291, 139297, 139301, 139303, 139309, 139313, 139333, 139339, 139343, 139361, 139367, 139369, 139387, 139393, 139397, 139409, 139423, 139429, 139439, 139457, 139459, 139483, 139487, 139493, 139501, 139511, 139537, 139547, 139571, 139589, 139591, 139597, 139609, 139619, 139627, 139661, 139663, 139681, 139697, 139703, 139709, 139721, 139729, 139739, 139747, 139753, 139759, 139787, 139801, 139813, 139831, 139837, 139861, 139871, 139883, 139891, 139901, 139907, 139921, 139939, 139943, 139967, 139969, 139981, 139987, 139991, 139999, 140009, 140053, 140057, 140069, 140071, 140111, 140123, 140143, 140159, 140167, 140171, 140177, 140191, 140197, 140207, 140221, 140227, 140237, 140249, 140263, 140269, 140281, 140297, 140317, 140321, 140333, 140339, 140351, 140363, 140381, 140401, 140407, 140411, 140417, 140419, 140423, 140443, 140449, 140453, 140473, 140477, 140521, 140527, 140533, 140549, 140551, 140557, 140587, 140593, 140603, 140611, 140617, 140627, 140629, 140639, 140659, 140663, 140677, 140681, 140683, 140689, 140717, 140729, 140731, 140741, 140759, 140761, 140773, 140779, 140797, 140813, 140827, 140831, 140837, 140839, 140863, 140867, 140869, 140891, 140893, 140897, 140909, 140929, 140939, 140977, 140983, 140989, 141023, 141041, 141061, 141067, 141073, 141079, 141101, 141107, 141121, 141131, 141157, 141161, 141179, 141181, 141199, 141209, 141221, 141223, 141233, 141241, 141257, 141263, 141269, 141277, 141283, 141301, 141307, 141311, 141319, 141353, 141359, 141371, 141397, 141403, 141413, 141439, 141443, 141461, 141481, 141497, 141499, 141509, 141511, 141529, 141539, 141551, 141587, 141601, 141613, 141619, 141623, 141629, 141637, 141649, 141653, 141667, 141671, 141677, 141679, 141689, 141697, 141707, 141709, 141719, 141731, 141761, 141767, 141769, 141773, 141793, 141803, 141811, 141829, 141833, 141851, 141853, 141863, 141871, 141907, 141917, 141931, 141937, 141941, 141959, 141961, 141971, 141991, 142007, 142019, 142031, 142039, 142049, 142057, 142061, 142067, 142097, 142099, 142111, 142123, 142151, 142157, 142159, 142169, 142183, 142189, 142193, 142211, 142217, 142223, 142231, 142237, 142271, 142297, 142319, 142327, 142357, 142369, 142381, 142391, 142403, 142421, 142427, 142433, 142453, 142469, 142501, 142529, 142537, 142543, 142547, 142553, 142559, 142567, 142573, 142589, 142591, 142601, 142607, 142609, 142619, 142657, 142673, 142697, 142699, 142711, 142733, 142757, 142759, 142771, 142787, 142789, 142799, 142811, 142837, 142841, 142867, 142871, 142873, 142897, 142903, 142907, 142939, 142949, 142963, 142969, 142973, 142979, 142981, 142993, 143053, 143063, 143093, 143107, 143111, 143113, 143137, 143141, 143159, 143177, 143197, 143239, 143243, 143249, 143257, 143261, 143263, 143281, 143287, 143291, 143329, 143333, 143357, 143387, 143401, 143413, 143419, 143443, 143461, 143467, 143477, 143483, 143489, 143501, 143503, 143509, 143513, 143519, 143527, 143537, 143551, 143567, 143569, 143573, 143593, 143609, 143617, 143629, 143651, 143653, 143669, 143677, 143687, 143699, 143711, 143719, 143729, 143743, 143779, 143791, 143797, 143807, 143813, 143821, 143827, 143831, 143833, 143873, 143879, 143881, 143909, 143947, 143953, 143971, 143977, 143981, 143999, 144013, 144031, 144037, 144061, 144071, 144073, 144103, 144139, 144161, 144163, 144167, 144169, 144173, 144203, 144223, 144241, 144247, 144253, 144259, 144271, 144289, 144299, 144307, 144311, 144323, 144341, 144349, 144379, 144383, 144407, 144409, 144413, 144427, 144439, 144451, 144461, 144479, 144481, 144497, 144511, 144539, 144541, 144563, 144569, 144577, 144583, 144589, 144593, 144611, 144629, 144659, 144667, 144671, 144701, 144709, 144719, 144731, 144737, 144751, 144757, 144763, 144773, 144779, 144791, 144817, 144829, 144839, 144847, 144883, 144887, 144889, 144899, 144917, 144931, 144941, 144961, 144967, 144973, 144983, 145007, 145009, 145021, 145031, 145037, 145043, 145063, 145069, 145091, 145109, 145121, 145133, 145139, 145177, 145193, 145207, 145213, 145219, 145253, 145259, 145267, 145283, 145289, 145303, 145307, 145349, 145361, 145381, 145391, 145399, 145417, 145423, 145433, 145441, 145451, 145459, 145463, 145471, 145477, 145487, 145501, 145511, 145513, 145517, 145531, 145543, 145547, 145549, 145577, 145589, 145601, 145603, 145633, 145637, 145643, 145661, 145679, 145681, 145687, 145703, 145709, 145721, 145723, 145753, 145757, 145759, 145771, 145777, 145799, 145807, 145819, 145823, 145829, 145861, 145879, 145897, 145903, 145931, 145933, 145949, 145963, 145967, 145969, 145987, 145991, 146009, 146011, 146021, 146023, 146033, 146051, 146057, 146059, 146063, 146077, 146093, 146099, 146117, 146141, 146161, 146173, 146191, 146197, 146203, 146213, 146221, 146239, 146249, 146273, 146291, 146297, 146299, 146309, 146317, 146323, 146347, 146359, 146369, 146381, 146383, 146389, 146407, 146417, 146423, 146437, 146449, 146477, 146513, 146519, 146521, 146527, 146539, 146543, 146563, 146581, 146603, 146609, 146617, 146639, 146647, 146669, 146677, 146681, 146683, 146701, 146719, 146743, 146749, 146767, 146777, 146801, 146807, 146819, 146833, 146837, 146843, 146849, 146857, 146891, 146893, 146917, 146921, 146933, 146941, 146953, 146977, 146983, 146987, 146989, 147011, 147029, 147031, 147047, 147073, 147083, 147089, 147097, 147107, 147137, 147139, 147151, 147163, 147179, 147197, 147209, 147211, 147221, 147227, 147229, 147253, 147263, 147283, 147289, 147293, 147299, 147311, 147319, 147331, 147341, 147347, 147353, 147377, 147391, 147397, 147401, 147409, 147419, 147449, 147451, 147457, 147481, 147487, 147503, 147517, 147541, 147547, 147551, 147557, 147571, 147583, 147607, 147613, 147617, 147629, 147647, 147661, 147671, 147673, 147689, 147703, 147709, 147727, 147739, 147743, 147761, 147769, 147773, 147779, 147787, 147793, 147799, 147811, 147827, 147853, 147859, 147863, 147881, 147919, 147937, 147949, 147977, 147997, 148013, 148021, 148061, 148063, 148073, 148079, 148091, 148123, 148139, 148147, 148151, 148153, 148157, 148171, 148193, 148199, 148201, 148207, 148229, 148243, 148249, 148279, 148301, 148303, 148331, 148339, 148361, 148367, 148381, 148387, 148399, 148403, 148411, 148429, 148439, 148457, 148469, 148471, 148483, 148501, 148513, 148517, 148531, 148537, 148549, 148573, 148579, 148609, 148627, 148633, 148639, 148663, 148667, 148669, 148691, 148693, 148711, 148721, 148723, 148727, 148747, 148763, 148781, 148783, 148793, 148817, 148829, 148853, 148859, 148861, 148867, 148873, 148891, 148913, 148921, 148927, 148931, 148933, 148949, 148957, 148961, 148991, 148997, 149011, 149021, 149027, 149033, 149053, 149057, 149059, 149069, 149077, 149087, 149099, 149101, 149111, 149113, 149119, 149143, 149153, 149159, 149161, 149173, 149183, 149197, 149213, 149239, 149249, 149251, 149257, 149269, 149287, 149297, 149309, 149323, 149333, 149341, 149351, 149371, 149377, 149381, 149393, 149399, 149411, 149417, 149419, 149423, 149441, 149459, 149489, 149491, 149497, 149503, 149519, 149521, 149531, 149533, 149543, 149551, 149561, 149563, 149579, 149603, 149623, 149627, 149629, 149689, 149711, 149713, 149717, 149729, 149731, 149749, 149759, 149767, 149771, 149791, 149803, 149827, 149837, 149839, 149861, 149867, 149873, 149893, 149899, 149909, 149911, 149921, 149939, 149953, 149969, 149971, 149993, 150001, 150011, 150041, 150053, 150061, 150067, 150077, 150083, 150089, 150091, 150097, 150107, 150131, 150151, 150169, 150193, 150197, 150203, 150209, 150211, 150217, 150221, 150223, 150239, 150247, 150287, 150299, 150301, 150323, 150329, 150343, 150373, 150377, 150379, 150383, 150401, 150407, 150413, 150427, 150431, 150439, 150473, 150497, 150503, 150517, 150523, 150533, 150551, 150559, 150571, 150583, 150587, 150589, 150607, 150611, 150617, 150649, 150659, 150697, 150707, 150721, 150743, 150767, 150769, 150779, 150791, 150797, 150827, 150833, 150847, 150869, 150881, 150883, 150889, 150893, 150901, 150907, 150919, 150929, 150959, 150961, 150967, 150979, 150989, 150991, 151007, 151009, 151013, 151027, 151049, 151051, 151057, 151091, 151121, 151141, 151153, 151157, 151163, 151169, 151171, 151189, 151201, 151213, 151237, 151241, 151243, 151247, 151253, 151273, 151279, 151289, 151303, 151337, 151339, 151343, 151357, 151379, 151381, 151391, 151397, 151423, 151429, 151433, 151451, 151471, 151477, 151483, 151499, 151507, 151517, 151523, 151531, 151537, 151549, 151553, 151561, 151573, 151579, 151597, 151603, 151607, 151609, 151631, 151637, 151643, 151651, 151667, 151673, 151681, 151687, 151693, 151703, 151717, 151729, 151733, 151769, 151771, 151783, 151787, 151799, 151813, 151817, 151841, 151847, 151849, 151871, 151883, 151897, 151901, 151903, 151909, 151937, 151939, 151967, 151969, 152003, 152017, 152027, 152029, 152039, 152041, 152063, 152077, 152081, 152083, 152093, 152111, 152123, 152147, 152183, 152189, 152197, 152203, 152213, 152219, 152231, 152239, 152249, 152267, 152287, 152293, 152297, 152311, 152363, 152377, 152381, 152389, 152393, 152407, 152417, 152419, 152423, 152429, 152441, 152443, 152459, 152461, 152501, 152519, 152531, 152533, 152539, 152563, 152567, 152597, 152599, 152617, 152623, 152629, 152639, 152641, 152657, 152671, 152681, 152717, 152723, 152729, 152753, 152767, 152777, 152783, 152791, 152809, 152819, 152821, 152833, 152837, 152839, 152843, 152851, 152857, 152879, 152897, 152899, 152909, 152939, 152941, 152947, 152953, 152959, 152981, 152989, 152993, 153001, 153059, 153067, 153071, 153073, 153077, 153089, 153107, 153113, 153133, 153137, 153151, 153191, 153247, 153259, 153269, 153271, 153277, 153281, 153287, 153313, 153319, 153337, 153343, 153353, 153359, 153371, 153379, 153407, 153409, 153421, 153427, 153437, 153443, 153449, 153457, 153469, 153487, 153499, 153509, 153511, 153521, 153523, 153529, 153533, 153557, 153563, 153589, 153607, 153611, 153623, 153641, 153649, 153689, 153701, 153719, 153733, 153739, 153743, 153749, 153757, 153763, 153817, 153841, 153871, 153877, 153887, 153889, 153911, 153913, 153929, 153941, 153947, 153949, 153953, 153991, 153997, 154001, 154027, 154043, 154057, 154061, 154067, 154073, 154079, 154081, 154087, 154097, 154111, 154127, 154153, 154157, 154159, 154181, 154183, 154211, 154213, 154229, 154243, 154247, 154267, 154277, 154279, 154291, 154303, 154313, 154321, 154333, 154339, 154351, 154369, 154373, 154387, 154409, 154417, 154423, 154439, 154459, 154487, 154493, 154501, 154523, 154543, 154571, 154573, 154579, 154589, 154591, 154613, 154619, 154621, 154643, 154667, 154669, 154681, 154691, 154699, 154723, 154727, 154733, 154747, 154753, 154769, 154787, 154789, 154799, 154807, 154823, 154841, 154849, 154871, 154873, 154877, 154883, 154897, 154927, 154933, 154937, 154943, 154981, 154991, 155003, 155009, 155017, 155027, 155047, 155069, 155081, 155083, 155087, 155119, 155137, 155153, 155161, 155167, 155171, 155191, 155201, 155203, 155209, 155219, 155231, 155251, 155269, 155291, 155299, 155303, 155317, 155327, 155333, 155371, 155377, 155381, 155383, 155387, 155399, 155413, 155423, 155443, 155453, 155461, 155473, 155501, 155509, 155521, 155537, 155539, 155557, 155569, 155579, 155581, 155593, 155599, 155609, 155621, 155627, 155653, 155657, 155663, 155671, 155689, 155693, 155699, 155707, 155717, 155719, 155723, 155731, 155741, 155747, 155773, 155777, 155783, 155797, 155801, 155809, 155821, 155833, 155849, 155851, 155861, 155863, 155887, 155891, 155893, 155921, 156007, 156011, 156019, 156041, 156059, 156061, 156071, 156089, 156109, 156119, 156127, 156131, 156139, 156151, 156157, 156217, 156227, 156229, 156241, 156253, 156257, 156259, 156269, 156307, 156319, 156329, 156347, 156353, 156361, 156371, 156419, 156421, 156437, 156467, 156487, 156491, 156493, 156511, 156521, 156539, 156577, 156589, 156593, 156601, 156619, 156623, 156631, 156641, 156659, 156671, 156677, 156679, 156683, 156691, 156703, 156707, 156719, 156727, 156733, 156749, 156781, 156797, 156799, 156817, 156823, 156833, 156841, 156887, 156899, 156901, 156913, 156941, 156943, 156967, 156971, 156979, 157007, 157013, 157019, 157037, 157049, 157051, 157057, 157061, 157081, 157103, 157109, 157127, 157133, 157141, 157163, 157177, 157181, 157189, 157207, 157211, 157217, 157219, 157229, 157231, 157243, 157247, 157253, 157259, 157271, 157273, 157277, 157279, 157291, 157303, 157307, 157321, 157327, 157349, 157351, 157363, 157393, 157411, 157427, 157429, 157433, 157457, 157477, 157483, 157489, 157513, 157519, 157523, 157543, 157559, 157561, 157571, 157579, 157627, 157637, 157639, 157649, 157667, 157669, 157679, 157721, 157733, 157739, 157747, 157769, 157771, 157793, 157799, 157813, 157823, 157831, 157837, 157841, 157867, 157877, 157889, 157897, 157901, 157907, 157931, 157933, 157951, 157991, 157999, 158003, 158009, 158017, 158029, 158047, 158071, 158077, 158113, 158129, 158141, 158143, 158161, 158189, 158201, 158209, 158227, 158231, 158233, 158243, 158261, 158269, 158293, 158303, 158329, 158341, 158351, 158357, 158359, 158363, 158371, 158393, 158407, 158419, 158429, 158443, 158449, 158489, 158507, 158519, 158527, 158537, 158551, 158563, 158567, 158573, 158581, 158591, 158597, 158611, 158617, 158621, 158633, 158647, 158657, 158663, 158699, 158731, 158747, 158749, 158759, 158761, 158771, 158777, 158791, 158803, 158843, 158849, 158863, 158867, 158881, 158909, 158923, 158927, 158941, 158959, 158981, 158993, 159013, 159017, 159023, 159059, 159073, 159079, 159097, 159113, 159119, 159157, 159161, 159167, 159169, 159179, 159191, 159193, 159199, 159209, 159223, 159227, 159233, 159287, 159293, 159311, 159319, 159337, 159347, 159349, 159361, 159389, 159403, 159407, 159421, 159431, 159437, 159457, 159463, 159469, 159473, 159491, 159499, 159503, 159521, 159539, 159541, 159553, 159563, 159569, 159571, 159589, 159617, 159623, 159629, 159631, 159667, 159671, 159673, 159683, 159697, 159701, 159707, 159721, 159737, 159739, 159763, 159769, 159773, 159779, 159787, 159791, 159793, 159799, 159811, 159833, 159839, 159853, 159857, 159869, 159871, 159899, 159911, 159931, 159937, 159977, 159979, 160001, 160009, 160019, 160031, 160033, 160049, 160073, 160079, 160081, 160087, 160091, 160093, 160117, 160141, 160159, 160163, 160169, 160183, 160201, 160207, 160217, 160231, 160243, 160253, 160309, 160313, 160319, 160343, 160357, 160367, 160373, 160387, 160397, 160403, 160409, 160423, 160441, 160453, 160481, 160483, 160499, 160507, 160541, 160553, 160579, 160583, 160591, 160603, 160619, 160621, 160627, 160637, 160639, 160649, 160651, 160663, 160669, 160681, 160687, 160697, 160709, 160711, 160723, 160739, 160751, 160753, 160757, 160781, 160789, 160807, 160813, 160817, 160829, 160841, 160861, 160877, 160879, 160883, 160903, 160907, 160933, 160967, 160969, 160981, 160997, 161009, 161017, 161033, 161039, 161047, 161053, 161059, 161071, 161087, 161093, 161123, 161137, 161141, 161149, 161159, 161167, 161201, 161221, 161233, 161237, 161263, 161267, 161281, 161303, 161309, 161323, 161333, 161339, 161341, 161363, 161377, 161387, 161407, 161411, 161453, 161459, 161461, 161471, 161503, 161507, 161521, 161527, 161531, 161543, 161561, 161563, 161569, 161573, 161591, 161599, 161611, 161627, 161639, 161641, 161659, 161683, 161717, 161729, 161731, 161741, 161743, 161753, 161761, 161771, 161773, 161779, 161783, 161807, 161831, 161839, 161869, 161873, 161879, 161881, 161911, 161921, 161923, 161947, 161957, 161969, 161971, 161977, 161983, 161999, 162007, 162011, 162017, 162053, 162059, 162079, 162091, 162109, 162119, 162143, 162209, 162221, 162229, 162251, 162257, 162263, 162269, 162277, 162287, 162289, 162293, 162343, 162359, 162389, 162391, 162413, 162419, 162439, 162451, 162457, 162473, 162493, 162499, 162517, 162523, 162527, 162529, 162553, 162557, 162563, 162577, 162593, 162601, 162611, 162623, 162629, 162641, 162649, 162671, 162677, 162683, 162691, 162703, 162709, 162713, 162727, 162731, 162739, 162749, 162751, 162779, 162787, 162791, 162821, 162823, 162829, 162839, 162847, 162853, 162859, 162881, 162889, 162901, 162907, 162917, 162937, 162947, 162971, 162973, 162989, 162997, 163003, 163019, 163021, 163027, 163061, 163063, 163109, 163117, 163127, 163129, 163147, 163151, 163169, 163171, 163181, 163193, 163199, 163211, 163223, 163243, 163249, 163259, 163307, 163309, 163321, 163327, 163337, 163351, 163363, 163367, 163393, 163403, 163409, 163411, 163417, 163433, 163469, 163477, 163481, 163483, 163487, 163517, 163543, 163561, 163567, 163573, 163601, 163613, 163621, 163627, 163633, 163637, 163643, 163661, 163673, 163679, 163697, 163729, 163733, 163741, 163753, 163771, 163781, 163789, 163811, 163819, 163841, 163847, 163853, 163859, 163861, 163871, 163883, 163901, 163909, 163927, 163973, 163979, 163981, 163987, 163991, 163993, 163997, 164011, 164023, 164039, 164051, 164057, 164071, 164089, 164093, 164113, 164117, 164147, 164149, 164173, 164183, 164191, 164201, 164209, 164231, 164233, 164239, 164249, 164251, 164267, 164279, 164291, 164299, 164309, 164321, 164341, 164357, 164363, 164371, 164377, 164387, 164413, 164419, 164429, 164431, 164443, 164447, 164449, 164471, 164477, 164503, 164513, 164531, 164569, 164581, 164587, 164599, 164617, 164621, 164623, 164627, 164653, 164663, 164677, 164683, 164701, 164707, 164729, 164743, 164767, 164771, 164789, 164809, 164821, 164831, 164837, 164839, 164881, 164893, 164911, 164953, 164963, 164987, 164999, 165001, 165037, 165041, 165047, 165049, 165059, 165079, 165083, 165089, 165103, 165133, 165161, 165173, 165181, 165203, 165211, 165229, 165233, 165247, 165287, 165293, 165311, 165313, 165317, 165331, 165343, 165349, 165367, 165379, 165383, 165391, 165397, 165437, 165443, 165449, 165457, 165463, 165469, 165479, 165511, 165523, 165527, 165533, 165541, 165551, 165553, 165559, 165569, 165587, 165589, 165601, 165611, 165617, 165653, 165667, 165673, 165701, 165703, 165707, 165709, 165713, 165719, 165721, 165749, 165779, 165799, 165811, 165817, 165829, 165833, 165857, 165877, 165883, 165887, 165901, 165931, 165941, 165947, 165961, 165983, 166013, 166021, 166027, 166031, 166043, 166063, 166081, 166099, 166147, 166151, 166157, 166169, 166183, 166189, 166207, 166219, 166237, 166247, 166259, 166273, 166289, 166297, 166301, 166303, 166319, 166349, 166351, 166357, 166363, 166393, 166399, 166403, 166409, 166417, 166429, 166457, 166471, 166487, 166541, 166561, 166567, 166571, 166597, 166601, 166603, 166609, 166613, 166619, 166627, 166631, 166643, 166657, 166667, 166669, 166679, 166693, 166703, 166723, 166739, 166741, 166781, 166783, 166799, 166807, 166823, 166841, 166843, 166847, 166849, 166853, 166861, 166867, 166871, 166909, 166919, 166931, 166949, 166967, 166973, 166979, 166987, 167009, 167017, 167021, 167023, 167033, 167039, 167047, 167051, 167071, 167077, 167081, 167087, 167099, 167107, 167113, 167117, 167119, 167149, 167159, 167173, 167177, 167191, 167197, 167213, 167221, 167249, 167261, 167267, 167269, 167309, 167311, 167317, 167329, 167339, 167341, 167381, 167393, 167407, 167413, 167423, 167429, 167437, 167441, 167443, 167449, 167471, 167483, 167491, 167521, 167537, 167543, 167593, 167597, 167611, 167621, 167623, 167627, 167633, 167641, 167663, 167677, 167683, 167711, 167729, 167747, 167759, 167771, 167777, 167779, 167801, 167809, 167861, 167863, 167873, 167879, 167887, 167891, 167899, 167911, 167917, 167953, 167971, 167987, 168013, 168023, 168029, 168037, 168043, 168067, 168071, 168083, 168089, 168109, 168127, 168143, 168151, 168193, 168197, 168211, 168227, 168247, 168253, 168263, 168269, 168277, 168281, 168293, 168323, 168331, 168347, 168353, 168391, 168409, 168433, 168449, 168451, 168457, 168463, 168481, 168491, 168499, 168523, 168527, 168533, 168541, 168559, 168599, 168601, 168617, 168629, 168631, 168643, 168673, 168677, 168697, 168713, 168719, 168731, 168737, 168743, 168761, 168769, 168781, 168803, 168851, 168863, 168869, 168887, 168893, 168899, 168901, 168913, 168937, 168943, 168977, 168991, 169003, 169007, 169009, 169019, 169049, 169063, 169067, 169069, 169079, 169093, 169097, 169111, 169129, 169151, 169159, 169177, 169181, 169199, 169217, 169219, 169241, 169243, 169249, 169259, 169283, 169307, 169313, 169319, 169321, 169327, 169339, 169343, 169361, 169369, 169373, 169399, 169409, 169427, 169457, 169471, 169483, 169489, 169493, 169501, 169523, 169531, 169553, 169567, 169583, 169591, 169607, 169627, 169633, 169639, 169649, 169657, 169661, 169667, 169681, 169691, 169693, 169709, 169733, 169751, 169753, 169769, 169777, 169783, 169789, 169817, 169823, 169831, 169837, 169843, 169859, 169889, 169891, 169909, 169913, 169919, 169933, 169937, 169943, 169951, 169957, 169987, 169991, 170003, 170021, 170029, 170047, 170057, 170063, 170081, 170099, 170101, 170111, 170123, 170141, 170167, 170179, 170189, 170197, 170207, 170213, 170227, 170231, 170239, 170243, 170249, 170263, 170267, 170279, 170293, 170299, 170327, 170341, 170347, 170351, 170353, 170363, 170369, 170371, 170383, 170389, 170393, 170413, 170441, 170447, 170473, 170483, 170497, 170503, 170509, 170537, 170539, 170551, 170557, 170579, 170603, 170609, 170627, 170633, 170641, 170647, 170669, 170689, 170701, 170707, 170711, 170741, 170749, 170759, 170761, 170767, 170773, 170777, 170801, 170809, 170813, 170827, 170837, 170843, 170851, 170857, 170873, 170881, 170887, 170899, 170921, 170927, 170953, 170957, 170971, 171007, 171023, 171029, 171043, 171047, 171049, 171053, 171077, 171079, 171091, 171103, 171131, 171161, 171163, 171167, 171169, 171179, 171203, 171233, 171251, 171253, 171263, 171271, 171293, 171299, 171317, 171329, 171341, 171383, 171401, 171403, 171427, 171439, 171449, 171467, 171469, 171473, 171481, 171491, 171517, 171529, 171539, 171541, 171553, 171559, 171571, 171583, 171617, 171629, 171637, 171641, 171653, 171659, 171671, 171673, 171679, 171697, 171707, 171713, 171719, 171733, 171757, 171761, 171763, 171793, 171799, 171803, 171811, 171823, 171827, 171851, 171863, 171869, 171877, 171881, 171889, 171917, 171923, 171929, 171937, 171947, 172001, 172009, 172021, 172027, 172031, 172049, 172069, 172079, 172093, 172097, 172127, 172147, 172153, 172157, 172169, 172171, 172181, 172199, 172213, 172217, 172219, 172223, 172243, 172259, 172279, 172283, 172297, 172307, 172313, 172321, 172331, 172343, 172351, 172357, 172373, 172399, 172411, 172421, 172423, 172427, 172433, 172439, 172441, 172489, 172507, 172517, 172519, 172541, 172553, 172561, 172573, 172583, 172589, 172597, 172603, 172607, 172619, 172633, 172643, 172649, 172657, 172663, 172673, 172681, 172687, 172709, 172717, 172721, 172741, 172751, 172759, 172787, 172801, 172807, 172829, 172849, 172853, 172859, 172867, 172871, 172877, 172883, 172933, 172969, 172973, 172981, 172987, 172993, 172999, 173021, 173023, 173039, 173053, 173059, 173081, 173087, 173099, 173137, 173141, 173149, 173177, 173183, 173189, 173191, 173207, 173209, 173219, 173249, 173263, 173267, 173273, 173291, 173293, 173297, 173309, 173347, 173357, 173359, 173429, 173431, 173473, 173483, 173491, 173497, 173501, 173531, 173539, 173543, 173549, 173561, 173573, 173599, 173617, 173629, 173647, 173651, 173659, 173669, 173671, 173683, 173687, 173699, 173707, 173713, 173729, 173741, 173743, 173773, 173777, 173779, 173783, 173807, 173819, 173827, 173839, 173851, 173861, 173867, 173891, 173897, 173909, 173917, 173923, 173933, 173969, 173977, 173981, 173993, 174007, 174017, 174019, 174047, 174049, 174061, 174067, 174071, 174077, 174079, 174091, 174101, 174121, 174137, 174143, 174149, 174157, 174169, 174197, 174221, 174241, 174257, 174259, 174263, 174281, 174289, 174299, 174311, 174329, 174331, 174337, 174347, 174367, 174389, 174407, 174413, 174431, 174443, 174457, 174467, 174469, 174481, 174487, 174491, 174527, 174533, 174569, 174571, 174583, 174599, 174613, 174617, 174631, 174637, 174649, 174653, 174659, 174673, 174679, 174703, 174721, 174737, 174749, 174761, 174763, 174767, 174773, 174799, 174821, 174829, 174851, 174859, 174877, 174893, 174901, 174907, 174917, 174929, 174931, 174943, 174959, 174989, 174991, 175003, 175013, 175039, 175061, 175067, 175069, 175079, 175081, 175103, 175129, 175141, 175211, 175229, 175261, 175267, 175277, 175291, 175303, 175309, 175327, 175333, 175349, 175361, 175391, 175393, 175403, 175411, 175433, 175447, 175453, 175463, 175481, 175493, 175499, 175519, 175523, 175543, 175573, 175601, 175621, 175631, 175633, 175649, 175663, 175673, 175687, 175691, 175699, 175709, 175723, 175727, 175753, 175757, 175759, 175781, 175783, 175811, 175829, 175837, 175843, 175853, 175859, 175873, 175891, 175897, 175909, 175919, 175937, 175939, 175949, 175961, 175963, 175979, 175991, 175993, 176017, 176021, 176023, 176041, 176047, 176051, 176053, 176063, 176081, 176087, 176089, 176123, 176129, 176153, 176159, 176161, 176179, 176191, 176201, 176207, 176213, 176221, 176227, 176237, 176243, 176261, 176299, 176303, 176317, 176321, 176327, 176329, 176333, 176347, 176353, 176357, 176369, 176383, 176389, 176401, 176413, 176417, 176419, 176431, 176459, 176461, 176467, 176489, 176497, 176503, 176507, 176509, 176521, 176531, 176537, 176549, 176551, 176557, 176573, 176591, 176597, 176599, 176609, 176611, 176629, 176641, 176651, 176677, 176699, 176711, 176713, 176741, 176747, 176753, 176777, 176779, 176789, 176791, 176797, 176807, 176809, 176819, 176849, 176857, 176887, 176899, 176903, 176921, 176923, 176927, 176933, 176951, 176977, 176983, 176989, 177007, 177011, 177013, 177019, 177043, 177091, 177101, 177109, 177113, 177127, 177131, 177167, 177173, 177209, 177211, 177217, 177223, 177239, 177257, 177269, 177283, 177301, 177319, 177323, 177337, 177347, 177379, 177383, 177409, 177421, 177427, 177431, 177433, 177467, 177473, 177481, 177487, 177493, 177511, 177533, 177539, 177553, 177589, 177601, 177623, 177647, 177677, 177679, 177691, 177739, 177743, 177761, 177763, 177787, 177791, 177797, 177811, 177823, 177839, 177841, 177883, 177887, 177889, 177893, 177907, 177913, 177917, 177929, 177943, 177949, 177953, 177967, 177979, 178001, 178021, 178037, 178039, 178067, 178069, 178091, 178093, 178103, 178117, 178127, 178141, 178151, 178169, 178183, 178187, 178207, 178223, 178231, 178247, 178249, 178259, 178261, 178289, 178301, 178307, 178327, 178333, 178349, 178351, 178361, 178393, 178397, 178403, 178417, 178439, 178441, 178447, 178469, 178481, 178487, 178489, 178501, 178513, 178531, 178537, 178559, 178561, 178567, 178571, 178597, 178601, 178603, 178609, 178613, 178621, 178627, 178639, 178643, 178681, 178691, 178693, 178697, 178753, 178757, 178781, 178793, 178799, 178807, 178813, 178817, 178819, 178831, 178853, 178859, 178873, 178877, 178889, 178897, 178903, 178907, 178909, 178921, 178931, 178933, 178939, 178951, 178973, 178987, 179021, 179029, 179033, 179041, 179051, 179057, 179083, 179089, 179099, 179107, 179111, 179119, 179143, 179161, 179167, 179173, 179203, 179209, 179213, 179233, 179243, 179261, 179269, 179281, 179287, 179317, 179321, 179327, 179351, 179357, 179369, 179381, 179383, 179393, 179407, 179411, 179429, 179437, 179441, 179453, 179461, 179471, 179479, 179483, 179497, 179519, 179527, 179533, 179549, 179563, 179573, 179579, 179581, 179591, 179593, 179603, 179623, 179633, 179651, 179657, 179659, 179671, 179687, 179689, 179693, 179717, 179719, 179737, 179743, 179749, 179779, 179801, 179807, 179813, 179819, 179821, 179827, 179833, 179849, 179897, 179899, 179903, 179909, 179917, 179923, 179939, 179947, 179951, 179953, 179957, 179969, 179981, 179989, 179999, 180001, 180007, 180023, 180043, 180053, 180071, 180073, 180077, 180097, 180137, 180161, 180179, 180181, 180211, 180221, 180233, 180239, 180241, 180247, 180259, 180263, 180281, 180287, 180289, 180307, 180311, 180317, 180331, 180337, 180347, 180361, 180371, 180379, 180391, 180413, 180419, 180437, 180463, 180473, 180491, 180497, 180503, 180511, 180533, 180539, 180541, 180547, 180563, 180569, 180617, 180623, 180629, 180647, 180667, 180679, 180701, 180731, 180749, 180751, 180773, 180779, 180793, 180797, 180799, 180811, 180847, 180871, 180883, 180907, 180949, 180959, 181001, 181003, 181019, 181031, 181039, 181061, 181063, 181081, 181087, 181123, 181141, 181157, 181183, 181193, 181199, 181201, 181211, 181213, 181219, 181243, 181253, 181273, 181277, 181283, 181297, 181301, 181303, 181361, 181387, 181397, 181399, 181409, 181421, 181439, 181457, 181459, 181499, 181501, 181513, 181523, 181537, 181549, 181553, 181603, 181607, 181609, 181619, 181639, 181667, 181669, 181693, 181711, 181717, 181721, 181729, 181739, 181751, 181757, 181759, 181763, 181777, 181787, 181789, 181813, 181837, 181871, 181873, 181889, 181891, 181903, 181913, 181919, 181927, 181931, 181943, 181957, 181967, 181981, 181997, 182009, 182011, 182027, 182029, 182041, 182047, 182057, 182059, 182089, 182099, 182101, 182107, 182111, 182123, 182129, 182131, 182141, 182159, 182167, 182177, 182179, 182201, 182209, 182233, 182239, 182243, 182261, 182279, 182297, 182309, 182333, 182339, 182341, 182353, 182387, 182389, 182417, 182423, 182431, 182443, 182453, 182467, 182471, 182473, 182489, 182503, 182509, 182519, 182537, 182549, 182561, 182579, 182587, 182593, 182599, 182603, 182617, 182627, 182639, 182641, 182653, 182657, 182659, 182681, 182687, 182701, 182711, 182713, 182747, 182773, 182779, 182789, 182803, 182813, 182821, 182839, 182851, 182857, 182867, 182887, 182893, 182899, 182921, 182927, 182929, 182933, 182953, 182957, 182969, 182981, 182999, 183023, 183037, 183041, 183047, 183059, 183067, 183089, 183091, 183119, 183151, 183167, 183191, 183203, 183247, 183259, 183263, 183283, 183289, 183299, 183301, 183307, 183317, 183319, 183329, 183343, 183349, 183361, 183373, 183377, 183383, 183389, 183397, 183437, 183439, 183451, 183461, 183473, 183479, 183487, 183497, 183499, 183503, 183509, 183511, 183523, 183527, 183569, 183571, 183577, 183581, 183587, 183593, 183611, 183637, 183661, 183683, 183691, 183697, 183707, 183709, 183713, 183761, 183763, 183797, 183809, 183823, 183829, 183871, 183877, 183881, 183907, 183917, 183919, 183943, 183949, 183959, 183971, 183973, 183979, 184003, 184007, 184013, 184031, 184039, 184043, 184057, 184073, 184081, 184087, 184111, 184117, 184133, 184153, 184157, 184181, 184187, 184189, 184199, 184211, 184231, 184241, 184259, 184271, 184273, 184279, 184291, 184309, 184321, 184333, 184337, 184351, 184369, 184409, 184417, 184441, 184447, 184463, 184477, 184487, 184489, 184511, 184517, 184523, 184553, 184559, 184567, 184571, 184577, 184607, 184609, 184627, 184631, 184633, 184649, 184651, 184669, 184687, 184693, 184703, 184711, 184721, 184727, 184733, 184753, 184777, 184823, 184829, 184831, 184837, 184843, 184859, 184879, 184901, 184903, 184913, 184949, 184957, 184967, 184969, 184993, 184997, 184999, 185021, 185027, 185051, 185057, 185063, 185069, 185071, 185077, 185089, 185099, 185123, 185131, 185137, 185149, 185153, 185161, 185167, 185177, 185183, 185189, 185221, 185233, 185243, 185267, 185291, 185299, 185303, 185309, 185323, 185327, 185359, 185363, 185369, 185371, 185401, 185429, 185441, 185467, 185477, 185483, 185491, 185519, 185527, 185531, 185533, 185539, 185543, 185551, 185557, 185567, 185569, 185593, 185599, 185621, 185641, 185651, 185677, 185681, 185683, 185693, 185699, 185707, 185711, 185723, 185737, 185747, 185749, 185753, 185767, 185789, 185797, 185813, 185819, 185821, 185831, 185833, 185849, 185869, 185873, 185893, 185897, 185903, 185917, 185923, 185947, 185951, 185957, 185959, 185971, 185987, 185993, 186007, 186013, 186019, 186023, 186037, 186041, 186049, 186071, 186097, 186103, 186107, 186113, 186119, 186149, 186157, 186161, 186163, 186187, 186191, 186211, 186227, 186229, 186239, 186247, 186253, 186259, 186271, 186283, 186299, 186301, 186311, 186317, 186343, 186377, 186379, 186391, 186397, 186419, 186437, 186451, 186469, 186479, 186481, 186551, 186569, 186581, 186583, 186587, 186601, 186619, 186629, 186647, 186649, 186653, 186671, 186679, 186689, 186701, 186707, 186709, 186727, 186733, 186743, 186757, 186761, 186763, 186773, 186793, 186799, 186841, 186859, 186869, 186871, 186877, 186883, 186889, 186917, 186947, 186959, 187003, 187009, 187027, 187043, 187049, 187067, 187069, 187073, 187081, 187091, 187111, 187123, 187127, 187129, 187133, 187139, 187141, 187163, 187171, 187177, 187181, 187189, 187193, 187211, 187217, 187219, 187223, 187237, 187273, 187277, 187303, 187337, 187339, 187349, 187361, 187367, 187373, 187379, 187387, 187393, 187409, 187417, 187423, 187433, 187441, 187463, 187469, 187471, 187477, 187507, 187513, 187531, 187547, 187559, 187573, 187597, 187631, 187633, 187637, 187639, 187651, 187661, 187669, 187687, 187699, 187711, 187721, 187751, 187763, 187787, 187793, 187823, 187843, 187861, 187871, 187877, 187883, 187897, 187907, 187909, 187921, 187927, 187931, 187951, 187963, 187973, 187987, 188011, 188017, 188021, 188029, 188107, 188137, 188143, 188147, 188159, 188171, 188179, 188189, 188197, 188249, 188261, 188273, 188281, 188291, 188299, 188303, 188311, 188317, 188323, 188333, 188351, 188359, 188369, 188389, 188401, 188407, 188417, 188431, 188437, 188443, 188459, 188473, 188483, 188491, 188519, 188527, 188533, 188563, 188579, 188603, 188609, 188621, 188633, 188653, 188677, 188681, 188687, 188693, 188701, 188707, 188711, 188719, 188729, 188753, 188767, 188779, 188791, 188801, 188827, 188831, 188833, 188843, 188857, 188861, 188863, 188869, 188891, 188911, 188927, 188933, 188939, 188941, 188953, 188957, 188983, 188999, 189011, 189017, 189019, 189041, 189043, 189061, 189067, 189127, 189139, 189149, 189151, 189169, 189187, 189199, 189223, 189229, 189239, 189251, 189253, 189257, 189271, 189307, 189311, 189337, 189347, 189349, 189353, 189361, 189377, 189389, 189391, 189401, 189407, 189421, 189433, 189437, 189439, 189463, 189467, 189473, 189479, 189491, 189493, 189509, 189517, 189523, 189529, 189547, 189559, 189583, 189593, 189599, 189613, 189617, 189619, 189643, 189653, 189661, 189671, 189691, 189697, 189701, 189713, 189733, 189743, 189757, 189767, 189797, 189799, 189817, 189823, 189851, 189853, 189859, 189877, 189881, 189887, 189901, 189913, 189929, 189947, 189949, 189961, 189967, 189977, 189983, 189989, 189997, 190027, 190031, 190051, 190063, 190093, 190097, 190121, 190129, 190147, 190159, 190181, 190207, 190243, 190249, 190261, 190271, 190283, 190297, 190301, 190313, 190321, 190331, 190339, 190357, 190367, 190369, 190387, 190391, 190403, 190409, 190471, 190507, 190523, 190529, 190537, 190543, 190573, 190577, 190579, 190583, 190591, 190607, 190613, 190633, 190639, 190649, 190657, 190667, 190669, 190699, 190709, 190711, 190717, 190753, 190759, 190763, 190769, 190783, 190787, 190793, 190807, 190811, 190823, 190829, 190837, 190843, 190871, 190889, 190891, 190901, 190909, 190913, 190921, 190979, 190997, 191021, 191027, 191033, 191039, 191047, 191057, 191071, 191089, 191099, 191119, 191123, 191137, 191141, 191143, 191161, 191173, 191189, 191227, 191231, 191237, 191249, 191251, 191281, 191297, 191299, 191339, 191341, 191353, 191413, 191441, 191447, 191449, 191453, 191459, 191461, 191467, 191473, 191491, 191497, 191507, 191509, 191519, 191531, 191533, 191537, 191551, 191561, 191563, 191579, 191599, 191621, 191627, 191657, 191669, 191671, 191677, 191689, 191693, 191699, 191707, 191717, 191747, 191749, 191773, 191783, 191791, 191801, 191803, 191827, 191831, 191833, 191837, 191861, 191899, 191903, 191911, 191929, 191953, 191969, 191977, 191999, 192007, 192013, 192029, 192037, 192043, 192047, 192053, 192091, 192097, 192103, 192113, 192121, 192133, 192149, 192161, 192173, 192187, 192191, 192193, 192229, 192233, 192239, 192251, 192259, 192263, 192271, 192307, 192317, 192319, 192323, 192341, 192343, 192347, 192373, 192377, 192383, 192391, 192407, 192431, 192461, 192463, 192497, 192499, 192529, 192539, 192547, 192553, 192557, 192571, 192581, 192583, 192587, 192601, 192611, 192613, 192617, 192629, 192631, 192637, 192667, 192677, 192697, 192737, 192743, 192749, 192757, 192767, 192781, 192791, 192799, 192811, 192817, 192833, 192847, 192853, 192859, 192877, 192883, 192887, 192889, 192917, 192923, 192931, 192949, 192961, 192971, 192977, 192979, 192991, 193003, 193009, 193013, 193031, 193043, 193051, 193057, 193073, 193093, 193133, 193139, 193147, 193153, 193163, 193181, 193183, 193189, 193201, 193243, 193247, 193261, 193283, 193301, 193327, 193337, 193357, 193367, 193373, 193379, 193381, 193387, 193393, 193423, 193433, 193441, 193447, 193451, 193463, 193469, 193493, 193507, 193513, 193541, 193549, 193559, 193573, 193577, 193597, 193601, 193603, 193607, 193619, 193649, 193663, 193679, 193703, 193723, 193727, 193741, 193751, 193757, 193763, 193771, 193789, 193793, 193799, 193811, 193813, 193841, 193847, 193859, 193861, 193871, 193873, 193877, 193883, 193891, 193937, 193939, 193943, 193951, 193957, 193979, 193993, 194003, 194017, 194027, 194057, 194069, 194071, 194083, 194087, 194093, 194101, 194113, 194119, 194141, 194149, 194167, 194179, 194197, 194203, 194239, 194263, 194267, 194269, 194309, 194323, 194353, 194371, 194377, 194413, 194431, 194443, 194471, 194479, 194483, 194507, 194521, 194527, 194543, 194569, 194581, 194591, 194609, 194647, 194653, 194659, 194671, 194681, 194683, 194687, 194707, 194713, 194717, 194723, 194729, 194749, 194767, 194771, 194809, 194813, 194819, 194827, 194839, 194861, 194863, 194867, 194869, 194891, 194899, 194911, 194917, 194933, 194963, 194977, 194981, 194989, 195023, 195029, 195043, 195047, 195049, 195053, 195071, 195077, 195089, 195103, 195121, 195127, 195131, 195137, 195157, 195161, 195163, 195193, 195197, 195203, 195229, 195241, 195253, 195259, 195271, 195277, 195281, 195311, 195319, 195329, 195341, 195343, 195353, 195359, 195389, 195401, 195407, 195413, 195427, 195443, 195457, 195469, 195479, 195493, 195497, 195511, 195527, 195539, 195541, 195581, 195593, 195599, 195659, 195677, 195691, 195697, 195709, 195731, 195733, 195737, 195739, 195743, 195751, 195761, 195781, 195787, 195791, 195809, 195817, 195863, 195869, 195883, 195887, 195893, 195907, 195913, 195919, 195929, 195931, 195967, 195971, 195973, 195977, 195991, 195997, 196003, 196033, 196039, 196043, 196051, 196073, 196081, 196087, 196111, 196117, 196139, 196159, 196169, 196171, 196177, 196181, 196187, 196193, 196201, 196247, 196271, 196277, 196279, 196291, 196303, 196307, 196331, 196337, 196379, 196387, 196429, 196439, 196453, 196459, 196477, 196499, 196501, 196519, 196523, 196541, 196543, 196549, 196561, 196579, 196583, 196597, 196613, 196643, 196657, 196661, 196663, 196681, 196687, 196699, 196709, 196717, 196727, 196739, 196751, 196769, 196771, 196799, 196817, 196831, 196837, 196853, 196871, 196873, 196879, 196901, 196907, 196919, 196927, 196961, 196991, 196993, 197003, 197009, 197023, 197033, 197059, 197063, 197077, 197083, 197089, 197101, 197117, 197123, 197137, 197147, 197159, 197161, 197203, 197207, 197221, 197233, 197243, 197257, 197261, 197269, 197273, 197279, 197293, 197297, 197299, 197311, 197339, 197341, 197347, 197359, 197369, 197371, 197381, 197383, 197389, 197419, 197423, 197441, 197453, 197479, 197507, 197521, 197539, 197551, 197567, 197569, 197573, 197597, 197599, 197609, 197621, 197641, 197647, 197651, 197677, 197683, 197689, 197699, 197711, 197713, 197741, 197753, 197759, 197767, 197773, 197779, 197803, 197807, 197831, 197837, 197887, 197891, 197893, 197909, 197921, 197927, 197933, 197947, 197957, 197959, 197963, 197969, 197971, 198013, 198017, 198031, 198043, 198047, 198073, 198083, 198091, 198097, 198109, 198127, 198139, 198173, 198179, 198193, 198197, 198221, 198223, 198241, 198251, 198257, 198259, 198277, 198281, 198301, 198313, 198323, 198337, 198347, 198349, 198377, 198391, 198397, 198409, 198413, 198427, 198437, 198439, 198461, 198463, 198469, 198479, 198491, 198503, 198529, 198533, 198553, 198571, 198589, 198593, 198599, 198613, 198623, 198637, 198641, 198647, 198659, 198673, 198689, 198701, 198719, 198733, 198761, 198769, 198811, 198817, 198823, 198827, 198829, 198833, 198839, 198841, 198851, 198859, 198899, 198901, 198929, 198937, 198941, 198943, 198953, 198959, 198967, 198971, 198977, 198997, 199021, 199033, 199037, 199039, 199049, 199081, 199103, 199109, 199151, 199153, 199181, 199193, 199207, 199211, 199247, 199261, 199267, 199289, 199313, 199321, 199337, 199343, 199357, 199373, 199379, 199399, 199403, 199411, 199417, 199429, 199447, 199453, 199457, 199483, 199487, 199489, 199499, 199501, 199523, 199559, 199567, 199583, 199601, 199603, 199621, 199637, 199657, 199669, 199673, 199679, 199687, 199697, 199721, 199729, 199739, 199741, 199751, 199753, 199777, 199783, 199799, 199807, 199811, 199813, 199819, 199831, 199853, 199873, 199877, 199889, 199909, 199921, 199931, 199933, 199961, 199967, 199999, 200003, 200009, 200017, 200023, 200029, 200033, 200041, 200063, 200087, 200117, 200131, 200153, 200159, 200171, 200177, 200183, 200191, 200201, 200227, 200231, 200237, 200257, 200273, 200293, 200297, 200323, 200329, 200341, 200351, 200357, 200363, 200371, 200381, 200383, 200401, 200407, 200437, 200443, 200461, 200467, 200483, 200513, 200569, 200573, 200579, 200587, 200591, 200597, 200609, 200639, 200657, 200671, 200689, 200699, 200713, 200723, 200731, 200771, 200779, 200789, 200797, 200807, 200843, 200861, 200867, 200869, 200881, 200891, 200899, 200903, 200909, 200927, 200929, 200971, 200983, 200987, 200989, 201007, 201011, 201031, 201037, 201049, 201073, 201101, 201107, 201119, 201121, 201139, 201151, 201163, 201167, 201193, 201203, 201209, 201211, 201233, 201247, 201251, 201281, 201287, 201307, 201329, 201337, 201359, 201389, 201401, 201403, 201413, 201437, 201449, 201451, 201473, 201491, 201493, 201497, 201499, 201511, 201517, 201547, 201557, 201577, 201581, 201589, 201599, 201611, 201623, 201629, 201653, 201661, 201667, 201673, 201683, 201701, 201709, 201731, 201743, 201757, 201767, 201769, 201781, 201787, 201791, 201797, 201809, 201821, 201823, 201827, 201829, 201833, 201847, 201881, 201889, 201893, 201907, 201911, 201919, 201923, 201937, 201947, 201953, 201961, 201973, 201979, 201997, 202001, 202021, 202031, 202049, 202061, 202063, 202067, 202087, 202099, 202109, 202121, 202127, 202129, 202183, 202187, 202201, 202219, 202231, 202243, 202277, 202289, 202291, 202309, 202327, 202339, 202343, 202357, 202361, 202381, 202387, 202393, 202403, 202409, 202441, 202471, 202481, 202493, 202519, 202529, 202549, 202567, 202577, 202591, 202613, 202621, 202627, 202637, 202639, 202661, 202667, 202679, 202693, 202717, 202729, 202733, 202747, 202751, 202753, 202757, 202777, 202799, 202817, 202823, 202841, 202859, 202877, 202879, 202889, 202907, 202921, 202931, 202933, 202949, 202967, 202973, 202981, 202987, 202999, 203011, 203017, 203023, 203039, 203051, 203057, 203117, 203141, 203173, 203183, 203207, 203209, 203213, 203221, 203227, 203233, 203249, 203279, 203293, 203309, 203311, 203317, 203321, 203323, 203339, 203341, 203351, 203353, 203363, 203381, 203383, 203387, 203393, 203417, 203419, 203429, 203431, 203449, 203459, 203461, 203531, 203549, 203563, 203569, 203579, 203591, 203617, 203627, 203641, 203653, 203657, 203659, 203663, 203669, 203713, 203761, 203767, 203771, 203773, 203789, 203807, 203809, 203821, 203843, 203857, 203869, 203873, 203897, 203909, 203911, 203921, 203947, 203953, 203969, 203971, 203977, 203989, 203999, 204007, 204013, 204019, 204023, 204047, 204059, 204067, 204101, 204107, 204133, 204137, 204143, 204151, 204161, 204163, 204173, 204233, 204251, 204299, 204301, 204311, 204319, 204329, 204331, 204353, 204359, 204361, 204367, 204371, 204377, 204397, 204427, 204431, 204437, 204439, 204443, 204461, 204481, 204487, 204509, 204511, 204517, 204521, 204557, 204563, 204583, 204587, 204599, 204601, 204613, 204623, 204641, 204667, 204679, 204707, 204719, 204733, 204749, 204751, 204781, 204791, 204793, 204797, 204803, 204821, 204857, 204859, 204871, 204887, 204913, 204917, 204923, 204931, 204947, 204973, 204979, 204983, 205019, 205031, 205033, 205043, 205063, 205069, 205081, 205097, 205103, 205111, 205129, 205133, 205141, 205151, 205157, 205171, 205187, 205201, 205211, 205213, 205223, 205237, 205253, 205267, 205297, 205307, 205319, 205327, 205339, 205357, 205391, 205397, 205399, 205417, 205421, 205423, 205427, 205433, 205441, 205453, 205463, 205477, 205483, 205487, 205493, 205507, 205519, 205529, 205537, 205549, 205553, 205559, 205589, 205603, 205607, 205619, 205627, 205633, 205651, 205657, 205661, 205663, 205703, 205721, 205759, 205763, 205783, 205817, 205823, 205837, 205847, 205879, 205883, 205913, 205937, 205949, 205951, 205957, 205963, 205967, 205981, 205991, 205993, 206009, 206021, 206027, 206033, 206039, 206047, 206051, 206069, 206077, 206081, 206083, 206123, 206153, 206177, 206179, 206183, 206191, 206197, 206203, 206209, 206221, 206233, 206237, 206249, 206251, 206263, 206273, 206279, 206281, 206291, 206299, 206303, 206341, 206347, 206351, 206369, 206383, 206399, 206407, 206411, 206413, 206419, 206447, 206461, 206467, 206477, 206483, 206489, 206501, 206519, 206527, 206543, 206551, 206593, 206597, 206603, 206623, 206627, 206639, 206641, 206651, 206699, 206749, 206779, 206783, 206803, 206807, 206813, 206819, 206821, 206827, 206879, 206887, 206897, 206909, 206911, 206917, 206923, 206933, 206939, 206951, 206953, 206993, 207013, 207017, 207029, 207037, 207041, 207061, 207073, 207079, 207113, 207121, 207127, 207139, 207169, 207187, 207191, 207197, 207199, 207227, 207239, 207241, 207257, 207269, 207287, 207293, 207301, 207307, 207329, 207331, 207341, 207343, 207367, 207371, 207377, 207401, 207409, 207433, 207443, 207457, 207463, 207469, 207479, 207481, 207491, 207497, 207509, 207511, 207517, 207521, 207523, 207541, 207547, 207551, 207563, 207569, 207589, 207593, 207619, 207629, 207643, 207653, 207661, 207671, 207673, 207679, 207709, 207719, 207721, 207743, 207763, 207769, 207797, 207799, 207811, 207821, 207833, 207847, 207869, 207877, 207923, 207931, 207941, 207947, 207953, 207967, 207971, 207973, 207997, 208001, 208003, 208009, 208037, 208049, 208057, 208067, 208073, 208099, 208111, 208121, 208129, 208139, 208141, 208147, 208189, 208207, 208213, 208217, 208223, 208231, 208253, 208261, 208277, 208279, 208283, 208291, 208309, 208319, 208333, 208337, 208367, 208379, 208387, 208391, 208393, 208409, 208433, 208441, 208457, 208459, 208463, 208469, 208489, 208493, 208499, 208501, 208511, 208513, 208519, 208529, 208553, 208577, 208589, 208591, 208609, 208627, 208631, 208657, 208667, 208673, 208687, 208697, 208699, 208721, 208729, 208739, 208759, 208787, 208799, 208807, 208837, 208843, 208877, 208889, 208891, 208907, 208927, 208931, 208933, 208961, 208963, 208991, 208993, 208997, 209021, 209029, 209039, 209063, 209071, 209089, 209123, 209147, 209159, 209173, 209179, 209189, 209201, 209203, 209213, 209221, 209227, 209233, 209249, 209257, 209263, 209267, 209269, 209299, 209311, 209317, 209327, 209333, 209347, 209353, 209357, 209359, 209371, 209381, 209393, 209401, 209431, 209441, 209449, 209459, 209471, 209477, 209497, 209519, 209533, 209543, 209549, 209563, 209567, 209569, 209579, 209581, 209597, 209621, 209623, 209639, 209647, 209659, 209669, 209687, 209701, 209707, 209717, 209719, 209743, 209767, 209771, 209789, 209801, 209809, 209813, 209819, 209821, 209837, 209851, 209857, 209861, 209887, 209917, 209927, 209929, 209939, 209953, 209959, 209971, 209977, 209983, 209987, 210011, 210019, 210031, 210037, 210053, 210071, 210097, 210101, 210109, 210113, 210127, 210131, 210139, 210143, 210157, 210169, 210173, 210187, 210191, 210193, 210209, 210229, 210233, 210241, 210247, 210257, 210263, 210277, 210283, 210299, 210317, 210319, 210323, 210347, 210359, 210361, 210391, 210401, 210403, 210407, 210421, 210437, 210461, 210467, 210481, 210487, 210491, 210499, 210523, 210527, 210533, 210557, 210599, 210601, 210619, 210631, 210643, 210659, 210671, 210709, 210713, 210719, 210731, 210739, 210761, 210773, 210803, 210809, 210811, 210823, 210827, 210839, 210853, 210857, 210869, 210901, 210907, 210911, 210913, 210923, 210929, 210943, 210961, 210967, 211007, 211039, 211049, 211051, 211061, 211063, 211067, 211073, 211093, 211097, 211129, 211151, 211153, 211177, 211187, 211193, 211199, 211213, 211217, 211219, 211229, 211231, 211241, 211247, 211271, 211283, 211291, 211297, 211313, 211319, 211333, 211339, 211349, 211369, 211373, 211403, 211427, 211433, 211441, 211457, 211469, 211493, 211499, 211501, 211507, 211543, 211559, 211571, 211573, 211583, 211597, 211619, 211639, 211643, 211657, 211661, 211663, 211681, 211691, 211693, 211711, 211723, 211727, 211741, 211747, 211777, 211781, 211789, 211801, 211811, 211817, 211859, 211867, 211873, 211877, 211879, 211889, 211891, 211927, 211931, 211933, 211943, 211949, 211969, 211979, 211997, 212029, 212039, 212057, 212081, 212099, 212117, 212123, 212131, 212141, 212161, 212167, 212183, 212203, 212207, 212209, 212227, 212239, 212243, 212281, 212293, 212297, 212353, 212369, 212383, 212411, 212419, 212423, 212437, 212447, 212453, 212461, 212467, 212479, 212501, 212507, 212557, 212561, 212573, 212579, 212587, 212593, 212627, 212633, 212651, 212669, 212671, 212677, 212683, 212701, 212777, 212791, 212801, 212827, 212837, 212843, 212851, 212867, 212869, 212873, 212881, 212897, 212903, 212909, 212917, 212923, 212969, 212981, 212987, 212999, 213019, 213023, 213029, 213043, 213067, 213079, 213091, 213097, 213119, 213131, 213133, 213139, 213149, 213173, 213181, 213193, 213203, 213209, 213217, 213223, 213229, 213247, 213253, 213263, 213281, 213287, 213289, 213307, 213319, 213329, 213337, 213349, 213359, 213361, 213383, 213391, 213397, 213407, 213449, 213461, 213467, 213481, 213491, 213523, 213533, 213539, 213553, 213557, 213589, 213599, 213611, 213613, 213623, 213637, 213641, 213649, 213659, 213713, 213721, 213727, 213737, 213751, 213791, 213799, 213821, 213827, 213833, 213847, 213859, 213881, 213887, 213901, 213919, 213929, 213943, 213947, 213949, 213953, 213973, 213977, 213989, 214003, 214007, 214009, 214021, 214031, 214033, 214043, 214051, 214063, 214069, 214087, 214091, 214129, 214133, 214141, 214147, 214163, 214177, 214189, 214211, 214213, 214219, 214237, 214243, 214259, 214283, 214297, 214309, 214351, 214363, 214373, 214381, 214391, 214399, 214433, 214439, 214451, 214457, 214463, 214469, 214481, 214483, 214499, 214507, 214517, 214519, 214531, 214541, 214559, 214561, 214589, 214603, 214607, 214631, 214639, 214651, 214657, 214663, 214667, 214673, 214691, 214723, 214729, 214733, 214741, 214759, 214763, 214771, 214783, 214787, 214789, 214807, 214811, 214817, 214831, 214849, 214853, 214867, 214883, 214891, 214913, 214939, 214943, 214967, 214987, 214993, 215051, 215063, 215077, 215087, 215123, 215141, 215143, 215153, 215161, 215179, 215183, 215191, 215197, 215239, 215249, 215261, 215273, 215279, 215297, 215309, 215317, 215329, 215351, 215353, 215359, 215381, 215389, 215393, 215399, 215417, 215443, 215447, 215459, 215461, 215471, 215483, 215497, 215503, 215507, 215521, 215531, 215563, 215573, 215587, 215617, 215653, 215659, 215681, 215687, 215689, 215693, 215723, 215737, 215753, 215767, 215771, 215797, 215801, 215827, 215833, 215843, 215851, 215857, 215863, 215893, 215899, 215909, 215921, 215927, 215939, 215953, 215959, 215981, 215983, 216023, 216037, 216061, 216071, 216091, 216103, 216107, 216113, 216119, 216127, 216133, 216149, 216157, 216173, 216179, 216211, 216217, 216233, 216259, 216263, 216289, 216317, 216319, 216329, 216347, 216371, 216373, 216379, 216397, 216401, 216421, 216431, 216451, 216481, 216493, 216509, 216523, 216551, 216553, 216569, 216571, 216577, 216607, 216617, 216641, 216647, 216649, 216653, 216661, 216679, 216703, 216719, 216731, 216743, 216751, 216757, 216761, 216779, 216781, 216787, 216791, 216803, 216829, 216841, 216851, 216859, 216877, 216899, 216901, 216911, 216917, 216919, 216947, 216967, 216973, 216991, 217001, 217003, 217027, 217033, 217057, 217069, 217081, 217111, 217117, 217121, 217157, 217163, 217169, 217199, 217201, 217207, 217219, 217223, 217229, 217241, 217253, 217271, 217307, 217309, 217313, 217319, 217333, 217337, 217339, 217351, 217361, 217363, 217367, 217369, 217387, 217397, 217409, 217411, 217421, 217429, 217439, 217457, 217463, 217489, 217499, 217517, 217519, 217559, 217561, 217573, 217577, 217579, 217619, 217643, 217661, 217667, 217681, 217687, 217691, 217697, 217717, 217727, 217733, 217739, 217747, 217771, 217781, 217793, 217823, 217829, 217849, 217859, 217901, 217907, 217909, 217933, 217937, 217969, 217979, 217981, 218003, 218021, 218047, 218069, 218077, 218081, 218083, 218087, 218107, 218111, 218117, 218131, 218137, 218143, 218149, 218171, 218191, 218213, 218227, 218233, 218249, 218279, 218287, 218357, 218363, 218371, 218381, 218389, 218401, 218417, 218419, 218423, 218437, 218447, 218453, 218459, 218461, 218479, 218509, 218513, 218521, 218527, 218531, 218549, 218551, 218579, 218591, 218599, 218611, 218623, 218627, 218629, 218641, 218651, 218657, 218677, 218681, 218711, 218717, 218719, 218723, 218737, 218749, 218761, 218783, 218797, 218809, 218819, 218833, 218839, 218843, 218849, 218857, 218873, 218887, 218923, 218941, 218947, 218963, 218969, 218971, 218987, 218989, 218993, 219001, 219017, 219019, 219031, 219041, 219053, 219059, 219071, 219083, 219091, 219097, 219103, 219119, 219133, 219143, 219169, 219187, 219217, 219223, 219251, 219277, 219281, 219293, 219301, 219311, 219313, 219353, 219361, 219371, 219377, 219389, 219407, 219409, 219433, 219437, 219451, 219463, 219467, 219491, 219503, 219517, 219523, 219529, 219533, 219547, 219577, 219587, 219599, 219607, 219613, 219619, 219629, 219647, 219649, 219677, 219679, 219683, 219689, 219707, 219721, 219727, 219731, 219749, 219757, 219761, 219763, 219767, 219787, 219797, 219799, 219809, 219823, 219829, 219839, 219847, 219851, 219871, 219881, 219889, 219911, 219917, 219931, 219937, 219941, 219943, 219953, 219959, 219971, 219977, 219979, 219983, 220009, 220013, 220019, 220021, 220057, 220063, 220123, 220141, 220147, 220151, 220163, 220169, 220177, 220189, 220217, 220243, 220279, 220291, 220301, 220307, 220327, 220333, 220351, 220357, 220361, 220369, 220373, 220391, 220399, 220403, 220411, 220421, 220447, 220469, 220471, 220511, 220513, 220529, 220537, 220543, 220553, 220559, 220573, 220579, 220589, 220613, 220663, 220667, 220673, 220681, 220687, 220699, 220709, 220721, 220747, 220757, 220771, 220783, 220789, 220793, 220807, 220811, 220841, 220859, 220861, 220873, 220877, 220879, 220889, 220897, 220901, 220903, 220907, 220919, 220931, 220933, 220939, 220973, 221021, 221047, 221059, 221069, 221071, 221077, 221083, 221087, 221093, 221101, 221159, 221171, 221173, 221197, 221201, 221203, 221209, 221219, 221227, 221233, 221239, 221251, 221261, 221281, 221303, 221311, 221317, 221327, 221393, 221399, 221401, 221411, 221413, 221447, 221453, 221461, 221471, 221477, 221489, 221497, 221509, 221537, 221539, 221549, 221567, 221581, 221587, 221603, 221621, 221623, 221653, 221657, 221659, 221671, 221677, 221707, 221713, 221717, 221719, 221723, 221729, 221737, 221747, 221773, 221797, 221807, 221813, 221827, 221831, 221849, 221873, 221891, 221909, 221941, 221951, 221953, 221957, 221987, 221989, 221999, 222007, 222011, 222023, 222029, 222041, 222043, 222059, 222067, 222073, 222107, 222109, 222113, 222127, 222137, 222149, 222151, 222161, 222163, 222193, 222197, 222199, 222247, 222269, 222289, 222293, 222311, 222317, 222323, 222329, 222337, 222347, 222349, 222361, 222367, 222379, 222389, 222403, 222419, 222437, 222461, 222493, 222499, 222511, 222527, 222533, 222553, 222557, 222587, 222601, 222613, 222619, 222643, 222647, 222659, 222679, 222707, 222713, 222731, 222773, 222779, 222787, 222791, 222793, 222799, 222823, 222839, 222841, 222857, 222863, 222877, 222883, 222913, 222919, 222931, 222941, 222947, 222953, 222967, 222977, 222979, 222991, 223007, 223009, 223019, 223037, 223049, 223051, 223061, 223063, 223087, 223099, 223103, 223129, 223133, 223151, 223207, 223211, 223217, 223219, 223229, 223241, 223243, 223247, 223253, 223259, 223273, 223277, 223283, 223291, 223303, 223313, 223319, 223331, 223337, 223339, 223361, 223367, 223381, 223403, 223423, 223429, 223439, 223441, 223463, 223469, 223481, 223493, 223507, 223529, 223543, 223547, 223549, 223577, 223589, 223621, 223633, 223637, 223667, 223679, 223681, 223697, 223711, 223747, 223753, 223757, 223759, 223781, 223823, 223829, 223831, 223837, 223841, 223843, 223849, 223903, 223919, 223921, 223939, 223963, 223969, 223999, 224011, 224027, 224033, 224041, 224047, 224057, 224069, 224071, 224101, 224113, 224129, 224131, 224149, 224153, 224171, 224177, 224197, 224201, 224209, 224221, 224233, 224239, 224251, 224261, 224267, 224291, 224299, 224303, 224309, 224317, 224327, 224351, 224359, 224363, 224401, 224423, 224429, 224443, 224449, 224461, 224467, 224473, 224491, 224501, 224513, 224527, 224563, 224569, 224579, 224591, 224603, 224611, 224617, 224629, 224633, 224669, 224677, 224683, 224699, 224711, 224717, 224729, 224737, 224743, 224759, 224771, 224797, 224813, 224831, 224863, 224869, 224881, 224891, 224897, 224909, 224911, 224921, 224929, 224947, 224951, 224969, 224977, 224993, 225023, 225037, 225061, 225067, 225077, 225079, 225089, 225109, 225119, 225133, 225143, 225149, 225157, 225161, 225163, 225167, 225217, 225221, 225223, 225227, 225241, 225257, 225263, 225287, 225289, 225299, 225307, 225341, 225343, 225347, 225349, 225353, 225371, 225373, 225383, 225427, 225431, 225457, 225461, 225479, 225493, 225499, 225503, 225509, 225523, 225527, 225529, 225569, 225581, 225583, 225601, 225611, 225613, 225619, 225629, 225637, 225671, 225683, 225689, 225697, 225721, 225733, 225749, 225751, 225767, 225769, 225779, 225781, 225809, 225821, 225829, 225839, 225859, 225871, 225889, 225919, 225931, 225941, 225943, 225949, 225961, 225977, 225983, 225989, 226001, 226007, 226013, 226027, 226063, 226087, 226099, 226103, 226123, 226129, 226133, 226141, 226169, 226183, 226189, 226199, 226201, 226217, 226231, 226241, 226267, 226283, 226307, 226313, 226337, 226357, 226367, 226379, 226381, 226397, 226409, 226427, 226433, 226451, 226453, 226463, 226483, 226487, 226511, 226531, 226547, 226549, 226553, 226571, 226601, 226609, 226621, 226631, 226637, 226643, 226649, 226657, 226663, 226669, 226691, 226697, 226741, 226753, 226769, 226777, 226783, 226789, 226799, 226813, 226817, 226819, 226823, 226843, 226871, 226901, 226903, 226907, 226913, 226937, 226943, 226991, 227011, 227027, 227053, 227081, 227089, 227093, 227111, 227113, 227131, 227147, 227153, 227159, 227167, 227177, 227189, 227191, 227207, 227219, 227231, 227233, 227251, 227257, 227267, 227281, 227299, 227303, 227363, 227371, 227377, 227387, 227393, 227399, 227407, 227419, 227431, 227453, 227459, 227467, 227471, 227473, 227489, 227497, 227501, 227519, 227531, 227533, 227537, 227561, 227567, 227569, 227581, 227593, 227597, 227603, 227609, 227611, 227627, 227629, 227651, 227653, 227663, 227671, 227693, 227699, 227707, 227719, 227729, 227743, 227789, 227797, 227827, 227849, 227869, 227873, 227893, 227947, 227951, 227977, 227989, 227993, 228013, 228023, 228049, 228061, 228077, 228097, 228103, 228113, 228127, 228131, 228139, 228181, 228197, 228199, 228203, 228211, 228223, 228233, 228251, 228257, 228281, 228299, 228301, 228307, 228311, 228331, 228337, 228341, 228353, 228359, 228383, 228409, 228419, 228421, 228427, 228443, 228451, 228457, 228461, 228469, 228479, 228509, 228511, 228517, 228521, 228523, 228539, 228559, 228577, 228581, 228587, 228593, 228601, 228611, 228617, 228619, 228637, 228647, 228677, 228707, 228713, 228731, 228733, 228737, 228751, 228757, 228773, 228793, 228797, 228799, 228829, 228841, 228847, 228853, 228859, 228869, 228881, 228883, 228887, 228901, 228911, 228913, 228923, 228929, 228953, 228959, 228961, 228983, 228989, 229003, 229027, 229037, 229081, 229093, 229123, 229127, 229133, 229139, 229153, 229157, 229171, 229181, 229189, 229199, 229213, 229217, 229223, 229237, 229247, 229249, 229253, 229261, 229267, 229283, 229309, 229321, 229343, 229351, 229373, 229393, 229399, 229403, 229409, 229423, 229433, 229459, 229469, 229487, 229499, 229507, 229519, 229529, 229547, 229549, 229553, 229561, 229583, 229589, 229591, 229601, 229613, 229627, 229631, 229637, 229639, 229681, 229693, 229699, 229703, 229711, 229717, 229727, 229739, 229751, 229753, 229759, 229763, 229769, 229771, 229777, 229781, 229799, 229813, 229819, 229837, 229841, 229847, 229849, 229897, 229903, 229937, 229939, 229949, 229961, 229963, 229979, 229981, 230003, 230017, 230047, 230059, 230063, 230077, 230081, 230089, 230101, 230107, 230117, 230123, 230137, 230143, 230149, 230189, 230203, 230213, 230221, 230227, 230233, 230239, 230257, 230273, 230281, 230291, 230303, 230309, 230311, 230327, 230339, 230341, 230353, 230357, 230369, 230383, 230387, 230389, 230393, 230431, 230449, 230453, 230467, 230471, 230479, 230501, 230507, 230539, 230551, 230561, 230563, 230567, 230597, 230611, 230647, 230653, 230663, 230683, 230693, 230719, 230729, 230743, 230761, 230767, 230771, 230773, 230779, 230807, 230819, 230827, 230833, 230849, 230861, 230863, 230873, 230891, 230929, 230933, 230939, 230941, 230959, 230969, 230977, 230999, 231001, 231017, 231019, 231031, 231041, 231053, 231067, 231079, 231107, 231109, 231131, 231169, 231197, 231223, 231241, 231269, 231271, 231277, 231289, 231293, 231299, 231317, 231323, 231331, 231347, 231349, 231359, 231367, 231379, 231409, 231419, 231431, 231433, 231443, 231461, 231463, 231479, 231481, 231493, 231503, 231529, 231533, 231547, 231551, 231559, 231563, 231571, 231589, 231599, 231607, 231611, 231613, 231631, 231643, 231661, 231677, 231701, 231709, 231719, 231779, 231799, 231809, 231821, 231823, 231827, 231839, 231841, 231859, 231871, 231877, 231893, 231901, 231919, 231923, 231943, 231947, 231961, 231967, 232003, 232007, 232013, 232049, 232051, 232073, 232079, 232081, 232091, 232103, 232109, 232117, 232129, 232153, 232171, 232187, 232189, 232207, 232217, 232259, 232303, 232307, 232333, 232357, 232363, 232367, 232381, 232391, 232409, 232411, 232417, 232433, 232439, 232451, 232457, 232459, 232487, 232499, 232513, 232523, 232549, 232567, 232571, 232591, 232597, 232607, 232621, 232633, 232643, 232663, 232669, 232681, 232699, 232709, 232711, 232741, 232751, 232753, 232777, 232801, 232811, 232819, 232823, 232847, 232853, 232861, 232871, 232877, 232891, 232901, 232907, 232919, 232937, 232961, 232963, 232987, 233021, 233069, 233071, 233083, 233113, 233117, 233141, 233143, 233159, 233161, 233173, 233183, 233201, 233221, 233231, 233239, 233251, 233267, 233279, 233293, 233297, 233323, 233327, 233329, 233341, 233347, 233353, 233357, 233371, 233407, 233417, 233419, 233423, 233437, 233477, 233489, 233509, 233549, 233551, 233557, 233591, 233599, 233609, 233617, 233621, 233641, 233663, 233669, 233683, 233687, 233689, 233693, 233713, 233743, 233747, 233759, 233777, 233837, 233851, 233861, 233879, 233881, 233911, 233917, 233921, 233923, 233939, 233941, 233969, 233983, 233993, 234007, 234029, 234043, 234067, 234083, 234089, 234103, 234121, 234131, 234139, 234149, 234161, 234167, 234181, 234187, 234191, 234193, 234197, 234203, 234211, 234217, 234239, 234259, 234271, 234281, 234287, 234293, 234317, 234319, 234323, 234331, 234341, 234343, 234361, 234383, 234431, 234457, 234461, 234463, 234467, 234473, 234499, 234511, 234527, 234529, 234539, 234541, 234547, 234571, 234587, 234589, 234599, 234613, 234629, 234653, 234659, 234673, 234683, 234713, 234721, 234727, 234733, 234743, 234749, 234769, 234781, 234791, 234799, 234803, 234809, 234811, 234833, 234847, 234851, 234863, 234869, 234893, 234907, 234917, 234931, 234947, 234959, 234961, 234967, 234977, 234979, 234989, 235003, 235007, 235009, 235013, 235043, 235051, 235057, 235069, 235091, 235099, 235111, 235117, 235159, 235171, 235177, 235181, 235199, 235211, 235231, 235241, 235243, 235273, 235289, 235307, 235309, 235337, 235349, 235369, 235397, 235439, 235441, 235447, 235483, 235489, 235493, 235513, 235519, 235523, 235537, 235541, 235553, 235559, 235577, 235591, 235601, 235607, 235621, 235661, 235663, 235673, 235679, 235699, 235723, 235747, 235751, 235783, 235787, 235789, 235793, 235811, 235813, 235849, 235871, 235877, 235889, 235891, 235901, 235919, 235927, 235951, 235967, 235979, 235997, 236017, 236021, 236053, 236063, 236069, 236077, 236087, 236107, 236111, 236129, 236143, 236153, 236167, 236207, 236209, 236219, 236231, 236261, 236287, 236293, 236297, 236323, 236329, 236333, 236339, 236377, 236381, 236387, 236399, 236407, 236429, 236449, 236461, 236471, 236477, 236479, 236503, 236507, 236519, 236527, 236549, 236563, 236573, 236609, 236627, 236641, 236653, 236659, 236681, 236699, 236701, 236707, 236713, 236723, 236729, 236737, 236749, 236771, 236773, 236779, 236783, 236807, 236813, 236867, 236869, 236879, 236881, 236891, 236893, 236897, 236909, 236917, 236947, 236981, 236983, 236993, 237011, 237019, 237043, 237053, 237067, 237071, 237073, 237089, 237091, 237137, 237143, 237151, 237157, 237161, 237163, 237173, 237179, 237203, 237217, 237233, 237257, 237271, 237277, 237283, 237287, 237301, 237313, 237319, 237331, 237343, 237361, 237373, 237379, 237401, 237409, 237467, 237487, 237509, 237547, 237563, 237571, 237581, 237607, 237619, 237631, 237673, 237683, 237689, 237691, 237701, 237707, 237733, 237737, 237749, 237763, 237767, 237781, 237791, 237821, 237851, 237857, 237859, 237877, 237883, 237901, 237911, 237929, 237959, 237967, 237971, 237973, 237977, 237997, 238001, 238009, 238019, 238031, 238037, 238039, 238079, 238081, 238093, 238099, 238103, 238109, 238141, 238151, 238157, 238159, 238163, 238171, 238181, 238201, 238207, 238213, 238223, 238229, 238237, 238247, 238261, 238267, 238291, 238307, 238313, 238321, 238331, 238339, 238361, 238363, 238369, 238373, 238397, 238417, 238423, 238439, 238451, 238463, 238471, 238477, 238481, 238499, 238519, 238529, 238531, 238547, 238573, 238591, 238627, 238639, 238649, 238657, 238673, 238681, 238691, 238703, 238709, 238723, 238727, 238729, 238747, 238759, 238781, 238789, 238801, 238829, 238837, 238841, 238853, 238859, 238877, 238879, 238883, 238897, 238919, 238921, 238939, 238943, 238949, 238967, 238991, 239017, 239023, 239027, 239053, 239069, 239081, 239087, 239119, 239137, 239147, 239167, 239171, 239179, 239201, 239231, 239233, 239237, 239243, 239251, 239263, 239273, 239287, 239297, 239329, 239333, 239347, 239357, 239383, 239387, 239389, 239417, 239423, 239429, 239431, 239441, 239461, 239489, 239509, 239521, 239527, 239531, 239539, 239543, 239557, 239567, 239579, 239587, 239597, 239611, 239623, 239633, 239641, 239671, 239689, 239699, 239711, 239713, 239731, 239737, 239753, 239779, 239783, 239803, 239807, 239831, 239843, 239849, 239851, 239857, 239873, 239879, 239893, 239929, 239933, 239947, 239957, 239963, 239977, 239999, 240007, 240011, 240017, 240041, 240043, 240047, 240049, 240059, 240073, 240089, 240101, 240109, 240113, 240131, 240139, 240151, 240169, 240173, 240197, 240203, 240209, 240257, 240259, 240263, 240271, 240283, 240287, 240319, 240341, 240347, 240349, 240353, 240371, 240379, 240421, 240433, 240437, 240473, 240479, 240491, 240503, 240509, 240517, 240551, 240571, 240587, 240589, 240599, 240607, 240623, 240631, 240641, 240659, 240677, 240701, 240707, 240719, 240727, 240733, 240739, 240743, 240763, 240769, 240797, 240811, 240829, 240841, 240853, 240859, 240869, 240881, 240883, 240893, 240899, 240913, 240943, 240953, 240959, 240967, 240997, 241013, 241027, 241037, 241049, 241051, 241061, 241067, 241069, 241079, 241093, 241117, 241127, 241141, 241169, 241177, 241183, 241207, 241229, 241249, 241253, 241259, 241261, 241271, 241291, 241303, 241313, 241321, 241327, 241333, 241337, 241343, 241361, 241363, 241391, 241393, 241421, 241429, 241441, 241453, 241463, 241469, 241489, 241511, 241513, 241517, 241537, 241543, 241559, 241561, 241567, 241589, 241597, 241601, 241603, 241639, 241643, 241651, 241663, 241667, 241679, 241687, 241691, 241711, 241727, 241739, 241771, 241781, 241783, 241793, 241807, 241811, 241817, 241823, 241847, 241861, 241867, 241873, 241877, 241883, 241903, 241907, 241919, 241921, 241931, 241939, 241951, 241963, 241973, 241979, 241981, 241993, 242009, 242057, 242059, 242069, 242083, 242093, 242101, 242119, 242129, 242147, 242161, 242171, 242173, 242197, 242201, 242227, 242243, 242257, 242261, 242273, 242279, 242309, 242329, 242357, 242371, 242377, 242393, 242399, 242413, 242419, 242441, 242447, 242449, 242453, 242467, 242479, 242483, 242491, 242509, 242519, 242521, 242533, 242551, 242591, 242603, 242617, 242621, 242629, 242633, 242639, 242647, 242659, 242677, 242681, 242689, 242713, 242729, 242731, 242747, 242773, 242779, 242789, 242797, 242807, 242813, 242819, 242863, 242867, 242873, 242887, 242911, 242923, 242927, 242971, 242989, 242999, 243011, 243031, 243073, 243077, 243091, 243101, 243109, 243119, 243121, 243137, 243149, 243157, 243161, 243167, 243197, 243203, 243209, 243227, 243233, 243239, 243259, 243263, 243301, 243311, 243343, 243367, 243391, 243401, 243403, 243421, 243431, 243433, 243437, 243461, 243469, 243473, 243479, 243487, 243517, 243521, 243527, 243533, 243539, 243553, 243577, 243583, 243587, 243589, 243613, 243623, 243631, 243643, 243647, 243671, 243673, 243701, 243703, 243707, 243709, 243769, 243781, 243787, 243799, 243809, 243829, 243839, 243851, 243857, 243863, 243871, 243889, 243911, 243917, 243931, 243953, 243973, 243989, 244003, 244009, 244021, 244033, 244043, 244087, 244091, 244109, 244121, 244129, 244141, 244147, 244157, 244159, 244177, 244199, 244217, 244219, 244243, 244247, 244253, 244261, 244291, 244297, 244301, 244303, 244313, 244333, 244339, 244351, 244357, 244367, 244379, 244381, 244393, 244399, 244403, 244411, 244423, 244429, 244451, 244457, 244463, 244471, 244481, 244493, 244507, 244529, 244547, 244553, 244561, 244567, 244583, 244589, 244597, 244603, 244619, 244633, 244637, 244639, 244667, 244669, 244687, 244691, 244703, 244711, 244721, 244733, 244747, 244753, 244759, 244781, 244787, 244813, 244837, 244841, 244843, 244859, 244861, 244873, 244877, 244889, 244897, 244901, 244939, 244943, 244957, 244997, 245023, 245029, 245033, 245039, 245071, 245083, 245087, 245107, 245129, 245131, 245149, 245171, 245173, 245177, 245183, 245209, 245251, 245257, 245261, 245269, 245279, 245291, 245299, 245317, 245321, 245339, 245383, 245389, 245407, 245411, 245417, 245419, 245437, 245471, 245473, 245477, 245501, 245513, 245519, 245521, 245527, 245533, 245561, 245563, 245587, 245591, 245593, 245621, 245627, 245629, 245639, 245653, 245671, 245681, 245683, 245711, 245719, 245723, 245741, 245747, 245753, 245759, 245771, 245783, 245789, 245821, 245849, 245851, 245863, 245881, 245897, 245899, 245909, 245911, 245941, 245963, 245977, 245981, 245983, 245989, 246011, 246017, 246049, 246073, 246097, 246119, 246121, 246131, 246133, 246151, 246167, 246173, 246187, 246193, 246203, 246209, 246217, 246223, 246241, 246247, 246251, 246271, 246277, 246289, 246317, 246319, 246329, 246343, 246349, 246361, 246371, 246391, 246403, 246439, 246469, 246473, 246497, 246509, 246511, 246523, 246527, 246539, 246557, 246569, 246577, 246599, 246607, 246611, 246613, 246637, 246641, 246643, 246661, 246683, 246689, 246707, 246709, 246713, 246731, 246739, 246769, 246773, 246781, 246787, 246793, 246803, 246809, 246811, 246817, 246833, 246839, 246889, 246899, 246907, 246913, 246919, 246923, 246929, 246931, 246937, 246941, 246947, 246971, 246979, 247001, 247007, 247031, 247067, 247069, 247073, 247087, 247099, 247141, 247183, 247193, 247201, 247223, 247229, 247241, 247249, 247259, 247279, 247301, 247309, 247337, 247339, 247343, 247363, 247369, 247381, 247391, 247393, 247409, 247421, 247433, 247439, 247451, 247463, 247501, 247519, 247529, 247531, 247547, 247553, 247579, 247591, 247601, 247603, 247607, 247609, 247613, 247633, 247649, 247651, 247691, 247693, 247697, 247711, 247717, 247729, 247739, 247759, 247769, 247771, 247781, 247799, 247811, 247813, 247829, 247847, 247853, 247873, 247879, 247889, 247901, 247913, 247939, 247943, 247957, 247991, 247993, 247997, 247999, 248021, 248033, 248041, 248051, 248057, 248063, 248071, 248077, 248089, 248099, 248117, 248119, 248137, 248141, 248161, 248167, 248177, 248179, 248189, 248201, 248203, 248231, 248243, 248257, 248267, 248291, 248293, 248299, 248309, 248317, 248323, 248351, 248357, 248371, 248389, 248401, 248407, 248431, 248441, 248447, 248461, 248473, 248477, 248483, 248509, 248533, 248537, 248543, 248569, 248579, 248587, 248593, 248597, 248609, 248621, 248627, 248639, 248641, 248657, 248683, 248701, 248707, 248719, 248723, 248737, 248749, 248753, 248779, 248783, 248789, 248797, 248813, 248821, 248827, 248839, 248851, 248861, 248867, 248869, 248879, 248887, 248891, 248893, 248903, 248909, 248971, 248981, 248987, 249017, 249037, 249059, 249079, 249089, 249097, 249103, 249107, 249127, 249131, 249133, 249143, 249181, 249187, 249199, 249211, 249217, 249229, 249233, 249253, 249257, 249287, 249311, 249317, 249329, 249341, 249367, 249377, 249383, 249397, 249419, 249421, 249427, 249433, 249437, 249439, 249449, 249463, 249497, 249499, 249503, 249517, 249521, 249533, 249539, 249541, 249563, 249583, 249589, 249593, 249607, 249647, 249659, 249671, 249677, 249703, 249721, 249727, 249737, 249749, 249763, 249779, 249797, 249811, 249827, 249833, 249853, 249857, 249859, 249863, 249871, 249881, 249911, 249923, 249943, 249947, 249967, 249971, 249973, 249989, 250007, 250013, 250027, 250031, 250037, 250043, 250049, 250051, 250057, 250073, 250091, 250109, 250123, 250147, 250153, 250169, 250199, 250253, 250259, 250267, 250279, 250301, 250307, 250343, 250361, 250403, 250409, 250423, 250433, 250441, 250451, 250489, 250499, 250501, 250543, 250583, 250619, 250643, 250673, 250681, 250687, 250693, 250703, 250709, 250721, 250727, 250739, 250741, 250751, 250753, 250777, 250787, 250793, 250799, 250807, 250813, 250829, 250837, 250841, 250853, 250867, 250871, 250889, 250919, 250949, 250951, 250963, 250967, 250969, 250979, 250993, 251003, 251033, 251051, 251057, 251059, 251063, 251071, 251081, 251087, 251099, 251117, 251143, 251149, 251159, 251171, 251177, 251179, 251191, 251197, 251201, 251203, 251219, 251221, 251231, 251233, 251257, 251261, 251263, 251287, 251291, 251297, 251323, 251347, 251353, 251359, 251387, 251393, 251417, 251429, 251431, 251437, 251443, 251467, 251473, 251477, 251483, 251491, 251501, 251513, 251519, 251527, 251533, 251539, 251543, 251561, 251567, 251609, 251611, 251621, 251623, 251639, 251653, 251663, 251677, 251701, 251707, 251737, 251761, 251789, 251791, 251809, 251831, 251833, 251843, 251857, 251861, 251879, 251887, 251893, 251897, 251903, 251917, 251939, 251941, 251947, 251969, 251971, 251983, 252001, 252013, 252017, 252029, 252037, 252079, 252101, 252139, 252143, 252151, 252157, 252163, 252169, 252173, 252181, 252193, 252209, 252223, 252233, 252253, 252277, 252283, 252289, 252293, 252313, 252319, 252323, 252341, 252359, 252383, 252391, 252401, 252409, 252419, 252431, 252443, 252449, 252457, 252463, 252481, 252509, 252533, 252541, 252559, 252583, 252589, 252607, 252611, 252617, 252641, 252667, 252691, 252709, 252713, 252727, 252731, 252737, 252761, 252767, 252779, 252817, 252823, 252827, 252829, 252869, 252877, 252881, 252887, 252893, 252899, 252911, 252913, 252919, 252937, 252949, 252971, 252979, 252983, 253003, 253013, 253049, 253063, 253081, 253103, 253109, 253133, 253153, 253157, 253159, 253229, 253243, 253247, 253273, 253307, 253321, 253343, 253349, 253361, 253367, 253369, 253381, 253387, 253417, 253423, 253427, 253433, 253439, 253447, 253469, 253481, 253493, 253501, 253507, 253531, 253537, 253543, 253553, 253567, 253573, 253601, 253607, 253609, 253613, 253633, 253637, 253639, 253651, 253661, 253679, 253681, 253703, 253717, 253733, 253741, 253751, 253763, 253769, 253777, 253787, 253789, 253801, 253811, 253819, 253823, 253853, 253867, 253871, 253879, 253901, 253907, 253909, 253919, 253937, 253949, 253951, 253969, 253987, 253993, 253999, 254003, 254021, 254027, 254039, 254041, 254047, 254053, 254071, 254083, 254119, 254141, 254147, 254161, 254179, 254197, 254207, 254209, 254213, 254249, 254257, 254279, 254281, 254291, 254299, 254329, 254369, 254377, 254383, 254389, 254407, 254413, 254437, 254447, 254461, 254489, 254491, 254519, 254537, 254557, 254593, 254623, 254627, 254647, 254659, 254663, 254699, 254713, 254729, 254731, 254741, 254747, 254753, 254773, 254777, 254783, 254791, 254803, 254827, 254831, 254833, 254857, 254869, 254873, 254879, 254887, 254899, 254911, 254927, 254929, 254941, 254959, 254963, 254971, 254977, 254987, 254993, 255007, 255019, 255023, 255043, 255049, 255053, 255071, 255077, 255083, 255097, 255107, 255121, 255127, 255133, 255137, 255149, 255173, 255179, 255181, 255191, 255193, 255197, 255209, 255217, 255239, 255247, 255251, 255253, 255259, 255313, 255329, 255349, 255361, 255371, 255383, 255413, 255419, 255443, 255457, 255467, 255469, 255473, 255487, 255499, 255503, 255511, 255517, 255523, 255551, 255571, 255587, 255589, 255613, 255617, 255637, 255641, 255649, 255653, 255659, 255667, 255679, 255709, 255713, 255733, 255743, 255757, 255763, 255767, 255803, 255839, 255841, 255847, 255851, 255859, 255869, 255877, 255887, 255907, 255917, 255919, 255923, 255947, 255961, 255971, 255973, 255977, 255989, 256019, 256021, 256031, 256033, 256049, 256057, 256079, 256093, 256117, 256121, 256129, 256133, 256147, 256163, 256169, 256181, 256187, 256189, 256199, 256211, 256219, 256279, 256301, 256307, 256313, 256337, 256349, 256363, 256369, 256391, 256393, 256423, 256441, 256469, 256471, 256483, 256489, 256493, 256499, 256517, 256541, 256561, 256567, 256577, 256579, 256589, 256603, 256609, 256639, 256643, 256651, 256661, 256687, 256699, 256721, 256723, 256757, 256771, 256799, 256801, 256813, 256831, 256873, 256877, 256889, 256901, 256903, 256931, 256939, 256957, 256967, 256981, 257003, 257017, 257053, 257069, 257077, 257093, 257099, 257107, 257123, 257141, 257161, 257171, 257177, 257189, 257219, 257221, 257239, 257249, 257263, 257273, 257281, 257287, 257293, 257297, 257311, 257321, 257339, 257351, 257353, 257371, 257381, 257399, 257401, 257407, 257437, 257443, 257447, 257459, 257473, 257489, 257497, 257501, 257503, 257519, 257539, 257561, 257591, 257611, 257627, 257639, 257657, 257671, 257687, 257689, 257707, 257711, 257713, 257717, 257731, 257783, 257791, 257797, 257837, 257857, 257861, 257863, 257867, 257869, 257879, 257893, 257903, 257921, 257947, 257953, 257981, 257987, 257989, 257993, 258019, 258023, 258031, 258061, 258067, 258101, 258107, 258109, 258113, 258119, 258127, 258131, 258143, 258157, 258161, 258173, 258197, 258211, 258233, 258241, 258253, 258277, 258283, 258299, 258317, 258319, 258329, 258331, 258337, 258353, 258373, 258389, 258403, 258407, 258413, 258421, 258437, 258443, 258449, 258469, 258487, 258491, 258499, 258521, 258527, 258539, 258551, 258563, 258569, 258581, 258607, 258611, 258613, 258617, 258623, 258631, 258637, 258659, 258673, 258677, 258691, 258697, 258703, 258707, 258721, 258733, 258737, 258743, 258763, 258779, 258787, 258803, 258809, 258827, 258847, 258871, 258887, 258917, 258919, 258949, 258959, 258967, 258971, 258977, 258983, 258991, 259001, 259009, 259019, 259033, 259099, 259121, 259123, 259151, 259157, 259159, 259163, 259169, 259177, 259183, 259201, 259211, 259213, 259219, 259229, 259271, 259277, 259309, 259321, 259339, 259379, 259381, 259387, 259397, 259411, 259421, 259429, 259451, 259453, 259459, 259499, 259507, 259517, 259531, 259537, 259547, 259577, 259583, 259603, 259619, 259621, 259627, 259631, 259639, 259643, 259657, 259667, 259681, 259691, 259697, 259717, 259723, 259733, 259751, 259771, 259781, 259783, 259801, 259813, 259823, 259829, 259837, 259841, 259867, 259907, 259933, 259937, 259943, 259949, 259967, 259991, 259993, 260003, 260009, 260011, 260017, 260023, 260047, 260081, 260089, 260111, 260137, 260171, 260179, 260189, 260191, 260201, 260207, 260209, 260213, 260231, 260263, 260269, 260317, 260329, 260339, 260363, 260387, 260399, 260411, 260413, 260417, 260419, 260441, 260453, 260461, 260467, 260483, 260489, 260527, 260539, 260543, 260549, 260551, 260569, 260573, 260581, 260587, 260609, 260629, 260647, 260651, 260671, 260677, 260713, 260717, 260723, 260747, 260753, 260761, 260773, 260791, 260807, 260809, 260849, 260857, 260861, 260863, 260873, 260879, 260893, 260921, 260941, 260951, 260959, 260969, 260983, 260987, 260999, 261011, 261013, 261017, 261031, 261043, 261059, 261061, 261071, 261077, 261089, 261101, 261127, 261167, 261169, 261223, 261229, 261241, 261251, 261271, 261281, 261301, 261323, 261329, 261337, 261347, 261353, 261379, 261389, 261407, 261427, 261431, 261433, 261439, 261451, 261463, 261467, 261509, 261523, 261529, 261557, 261563, 261577, 261581, 261587, 261593, 261601, 261619, 261631, 261637, 261641, 261643, 261673, 261697, 261707, 261713, 261721, 261739, 261757, 261761, 261773, 261787, 261791, 261799, 261823, 261847, 261881, 261887, 261917, 261959, 261971, 261973, 261977, 261983, 262007, 262027, 262049, 262051, 262069, 262079, 262103, 262109, 262111, 262121, 262127, 262133, 262139, 262147, 262151, 262153, 262187, 262193, 262217, 262231, 262237, 262253, 262261, 262271, 262303, 262313, 262321, 262331, 262337, 262349, 262351, 262369, 262387, 262391, 262399, 262411, 262433, 262459, 262469, 262489, 262501, 262511, 262513, 262519, 262541, 262543, 262553, 262567, 262583, 262597, 262621, 262627, 262643, 262649, 262651, 262657, 262681, 262693, 262697, 262709, 262723, 262733, 262739, 262741, 262747, 262781, 262783, 262807, 262819, 262853, 262877, 262883, 262897, 262901, 262909, 262937, 262949, 262957, 262981, 263009, 263023, 263047, 263063, 263071, 263077, 263083, 263089, 263101, 263111, 263119, 263129, 263167, 263171, 263183, 263191, 263201, 263209, 263213, 263227, 263239, 263257, 263267, 263269, 263273, 263287, 263293, 263303, 263323, 263369, 263383, 263387, 263399, 263401, 263411, 263423, 263429, 263437, 263443, 263489, 263491, 263503, 263513, 263519, 263521, 263533, 263537, 263561, 263567, 263573, 263591, 263597, 263609, 263611, 263621, 263647, 263651, 263657, 263677, 263723, 263729, 263737, 263759, 263761, 263803, 263819, 263821, 263827, 263843, 263849, 263863, 263867, 263869, 263881, 263899, 263909, 263911, 263927, 263933, 263941, 263951, 263953, 263957, 263983, 264007, 264013, 264029, 264031, 264053, 264059, 264071, 264083, 264091, 264101, 264113, 264127, 264133, 264137, 264139, 264167, 264169, 264179, 264211, 264221, 264263, 264269, 264283, 264289, 264301, 264323, 264331, 264343, 264349, 264353, 264359, 264371, 264391, 264403, 264437, 264443, 264463, 264487, 264527, 264529, 264553, 264559, 264577, 264581, 264599, 264601, 264619, 264631, 264637, 264643, 264659, 264697, 264731, 264739, 264743, 264749, 264757, 264763, 264769, 264779, 264787, 264791, 264793, 264811, 264827, 264829, 264839, 264871, 264881, 264889, 264893, 264899, 264919, 264931, 264949, 264959, 264961, 264977, 264991, 264997, 265003, 265007, 265021, 265037, 265079, 265091, 265093, 265117, 265123, 265129, 265141, 265151, 265157, 265163, 265169, 265193, 265207, 265231, 265241, 265247, 265249, 265261, 265271, 265273, 265277, 265313, 265333, 265337, 265339, 265381, 265399, 265403, 265417, 265423, 265427, 265451, 265459, 265471, 265483, 265493, 265511, 265513, 265541, 265543, 265547, 265561, 265567, 265571, 265579, 265607, 265613, 265619, 265621, 265703, 265709, 265711, 265717, 265729, 265739, 265747, 265757, 265781, 265787, 265807, 265813, 265819, 265831, 265841, 265847, 265861, 265871, 265873, 265883, 265891, 265921, 265957, 265961, 265987, 266003, 266009, 266023, 266027, 266029, 266047, 266051, 266053, 266059, 266081, 266083, 266089, 266093, 266099, 266111, 266117, 266129, 266137, 266153, 266159, 266177, 266183, 266221, 266239, 266261, 266269, 266281, 266291, 266293, 266297, 266333, 266351, 266353, 266359, 266369, 266381, 266401, 266411, 266417, 266447, 266449, 266477, 266479, 266489, 266491, 266521, 266549, 266587, 266599, 266603, 266633, 266641, 266647, 266663, 266671, 266677, 266681, 266683, 266687, 266689, 266701, 266711, 266719, 266759, 266767, 266797, 266801, 266821, 266837, 266839, 266863, 266867, 266891, 266897, 266899, 266909, 266921, 266927, 266933, 266947, 266953, 266957, 266971, 266977, 266983, 266993, 266999, 267017, 267037, 267049, 267097, 267131, 267133, 267139, 267143, 267167, 267187, 267193, 267199, 267203, 267217, 267227, 267229, 267233, 267259, 267271, 267277, 267299, 267301, 267307, 267317, 267341, 267353, 267373, 267389, 267391, 267401, 267403, 267413, 267419, 267431, 267433, 267439, 267451, 267469, 267479, 267481, 267493, 267497, 267511, 267517, 267521, 267523, 267541, 267551, 267557, 267569, 267581, 267587, 267593, 267601, 267611, 267613, 267629, 267637, 267643, 267647, 267649, 267661, 267667, 267671, 267677, 267679, 267713, 267719, 267721, 267727, 267737, 267739, 267749, 267763, 267781, 267791, 267797, 267803, 267811, 267829, 267833, 267857, 267863, 267877, 267887, 267893, 267899, 267901, 267907, 267913, 267929, 267941, 267959, 267961, 268003, 268013, 268043, 268049, 268063, 268069, 268091, 268123, 268133, 268153, 268171, 268189, 268199, 268207, 268211, 268237, 268253, 268267, 268271, 268283, 268291, 268297, 268343, 268403, 268439, 268459, 268487, 268493, 268501, 268507, 268517, 268519, 268529, 268531, 268537, 268547, 268573, 268607, 268613, 268637, 268643, 268661, 268693, 268721, 268729, 268733, 268747, 268757, 268759, 268771, 268777, 268781, 268783, 268789, 268811, 268813, 268817, 268819, 268823, 268841, 268843, 268861, 268883, 268897, 268909, 268913, 268921, 268927, 268937, 268969, 268973, 268979, 268993, 268997, 268999, 269023, 269029, 269039, 269041, 269057, 269063, 269069, 269089, 269117, 269131, 269141, 269167, 269177, 269179, 269183, 269189, 269201, 269209, 269219, 269221, 269231, 269237, 269251, 269257, 269281, 269317, 269327, 269333, 269341, 269351, 269377, 269383, 269387, 269389, 269393, 269413, 269419, 269429, 269431, 269441, 269461, 269473, 269513, 269519, 269527, 269539, 269543, 269561, 269573, 269579, 269597, 269617, 269623, 269641, 269651, 269663, 269683, 269701, 269713, 269719, 269723, 269741, 269749, 269761, 269779, 269783, 269791, 269851, 269879, 269887, 269891, 269897, 269923, 269939, 269947, 269953, 269981, 269987, 270001, 270029, 270031, 270037, 270059, 270071, 270073, 270097, 270121, 270131, 270133, 270143, 270157, 270163, 270167, 270191, 270209, 270217, 270223, 270229, 270239, 270241, 270269, 270271, 270287, 270299, 270307, 270311, 270323, 270329, 270337, 270343, 270371, 270379, 270407, 270421, 270437, 270443, 270451, 270461, 270463, 270493, 270509, 270527, 270539, 270547, 270551, 270553, 270563, 270577, 270583, 270587, 270593, 270601, 270619, 270631, 270653, 270659, 270667, 270679, 270689, 270701, 270709, 270719, 270737, 270749, 270761, 270763, 270791, 270797, 270799, 270821, 270833, 270841, 270859, 270899, 270913, 270923, 270931, 270937, 270953, 270961, 270967, 270973, 271003, 271013, 271021, 271027, 271043, 271057, 271067, 271079, 271097, 271109, 271127, 271129, 271163, 271169, 271177, 271181, 271211, 271217, 271231, 271241, 271253, 271261, 271273, 271277, 271279, 271289, 271333, 271351, 271357, 271363, 271367, 271393, 271409, 271429, 271451, 271463, 271471, 271483, 271489, 271499, 271501, 271517, 271549, 271553, 271571, 271573, 271597, 271603, 271619, 271637, 271639, 271651, 271657, 271693, 271703, 271723, 271729, 271753, 271769, 271771, 271787, 271807, 271811, 271829, 271841, 271849, 271853, 271861, 271867, 271879, 271897, 271903, 271919, 271927, 271939, 271967, 271969, 271981, 272003, 272009, 272011, 272029, 272039, 272053, 272059, 272093, 272131, 272141, 272171, 272179, 272183, 272189, 272191, 272201, 272203, 272227, 272231, 272249, 272257, 272263, 272267, 272269, 272287, 272299, 272317, 272329, 272333, 272341, 272347, 272351, 272353, 272359, 272369, 272381, 272383, 272399, 272407, 272411, 272417, 272423, 272449, 272453, 272477, 272507, 272533, 272537, 272539, 272549, 272563, 272567, 272581, 272603, 272621, 272651, 272659, 272683, 272693, 272717, 272719, 272737, 272759, 272761, 272771, 272777, 272807, 272809, 272813, 272863, 272879, 272887, 272903, 272911, 272917, 272927, 272933, 272959, 272971, 272981, 272983, 272989, 272999, 273001, 273029, 273043, 273047, 273059, 273061, 273067, 273073, 273083, 273107, 273113, 273127, 273131, 273149, 273157, 273181, 273187, 273193, 273233, 273253, 273269, 273271, 273281, 273283, 273289, 273311, 273313, 273323, 273349, 273359, 273367, 273433, 273457, 273473, 273503, 273517, 273521, 273527, 273551, 273569, 273601, 273613, 273617, 273629, 273641, 273643, 273653, 273697, 273709, 273719, 273727, 273739, 273773, 273787, 273797, 273803, 273821, 273827, 273857, 273881, 273899, 273901, 273913, 273919, 273929, 273941, 273943, 273967, 273971, 273979, 273997, 274007, 274019, 274033, 274061, 274069, 274081, 274093, 274103, 274117, 274121, 274123, 274139, 274147, 274163, 274171, 274177, 274187, 274199, 274201, 274213, 274223, 274237, 274243, 274259, 274271, 274277, 274283, 274301, 274333, 274349, 274357, 274361, 274403, 274423, 274441, 274451, 274453, 274457, 274471, 274489, 274517, 274529, 274579, 274583, 274591, 274609, 274627, 274661, 274667, 274679, 274693, 274697, 274709, 274711, 274723, 274739, 274751, 274777, 274783, 274787, 274811, 274817, 274829, 274831, 274837, 274843, 274847, 274853, 274861, 274867, 274871, 274889, 274909, 274931, 274943, 274951, 274957, 274961, 274973, 274993, 275003, 275027, 275039, 275047, 275053, 275059, 275083, 275087, 275129, 275131, 275147, 275153, 275159, 275161, 275167, 275183, 275201, 275207, 275227, 275251, 275263, 275269, 275299, 275309, 275321, 275323, 275339, 275357, 275371, 275389, 275393, 275399, 275419, 275423, 275447, 275449, 275453, 275459, 275461, 275489, 275491, 275503, 275521, 275531, 275543, 275549, 275573, 275579, 275581, 275591, 275593, 275599, 275623, 275641, 275651, 275657, 275669, 275677, 275699, 275711, 275719, 275729, 275741, 275767, 275773, 275783, 275813, 275827, 275837, 275881, 275897, 275911, 275917, 275921, 275923, 275929, 275939, 275941, 275963, 275969, 275981, 275987, 275999, 276007, 276011, 276019, 276037, 276041, 276043, 276047, 276049, 276079, 276083, 276091, 276113, 276137, 276151, 276173, 276181, 276187, 276191, 276209, 276229, 276239, 276247, 276251, 276257, 276277, 276293, 276319, 276323, 276337, 276343, 276347, 276359, 276371, 276373, 276389, 276401, 276439, 276443, 276449, 276461, 276467, 276487, 276499, 276503, 276517, 276527, 276553, 276557, 276581, 276587, 276589, 276593, 276599, 276623, 276629, 276637, 276671, 276673, 276707, 276721, 276739, 276763, 276767, 276779, 276781, 276817, 276821, 276823, 276827, 276833, 276839, 276847, 276869, 276883, 276901, 276907, 276917, 276919, 276929, 276949, 276953, 276961, 276977, 277003, 277007, 277021, 277051, 277063, 277073, 277087, 277097, 277099, 277157, 277163, 277169, 277177, 277183, 277213, 277217, 277223, 277231, 277247, 277259, 277261, 277273, 277279, 277297, 277301, 277309, 277331, 277363, 277373, 277411, 277421, 277427, 277429, 277483, 277493, 277499, 277513, 277531, 277547, 277549, 277567, 277577, 277579, 277597, 277601, 277603, 277637, 277639, 277643, 277657, 277663, 277687, 277691, 277703, 277741, 277747, 277751, 277757, 277787, 277789, 277793, 277813, 277829, 277847, 277859, 277883, 277889, 277891, 277897, 277903, 277919, 277961, 277993, 277999, 278017, 278029, 278041, 278051, 278063, 278071, 278087, 278111, 278119, 278123, 278143, 278147, 278149, 278177, 278191, 278207, 278209, 278219, 278227, 278233, 278237, 278261, 278269, 278279, 278321, 278329, 278347, 278353, 278363, 278387, 278393, 278413, 278437, 278459, 278479, 278489, 278491, 278497, 278501, 278503, 278543, 278549, 278557, 278561, 278563, 278581, 278591, 278609, 278611, 278617, 278623, 278627, 278639, 278651, 278671, 278687, 278689, 278701, 278717, 278741, 278743, 278753, 278767, 278801, 278807, 278809, 278813, 278819, 278827, 278843, 278849, 278867, 278879, 278881, 278891, 278903, 278909, 278911, 278917, 278947, 278981, 279001, 279007, 279023, 279029, 279047, 279073, 279109, 279119, 279121, 279127, 279131, 279137, 279143, 279173, 279179, 279187, 279203, 279211, 279221, 279269, 279311, 279317, 279329, 279337, 279353, 279397, 279407, 279413, 279421, 279431, 279443, 279451, 279479, 279481, 279511, 279523, 279541, 279551, 279553, 279557, 279571, 279577, 279583, 279593, 279607, 279613, 279619, 279637, 279641, 279649, 279659, 279679, 279689, 279707, 279709, 279731, 279751, 279761, 279767, 279779, 279817, 279823, 279847, 279857, 279863, 279883, 279913, 279919, 279941, 279949, 279967, 279977, 279991, 280001, 280009, 280013, 280031, 280037, 280061, 280069, 280097, 280099, 280103, 280121, 280129, 280139, 280183, 280187, 280199, 280207, 280219, 280223, 280229, 280243, 280249, 280253, 280277, 280297, 280303, 280321, 280327, 280337, 280339, 280351, 280373, 280409, 280411, 280451, 280463, 280487, 280499, 280507, 280513, 280537, 280541, 280547, 280549, 280561, 280583, 280589, 280591, 280597, 280603, 280607, 280613, 280627, 280639, 280673, 280681, 280697, 280699, 280703, 280711, 280717, 280729, 280751, 280759, 280769, 280771, 280811, 280817, 280837, 280843, 280859, 280871, 280879, 280883, 280897, 280909, 280913, 280921, 280927, 280933, 280939, 280949, 280957, 280963, 280967, 280979, 280997, 281023, 281033, 281053, 281063, 281069, 281081, 281117, 281131, 281153, 281159, 281167, 281189, 281191, 281207, 281227, 281233, 281243, 281249, 281251, 281273, 281279, 281291, 281297, 281317, 281321, 281327, 281339, 281353, 281357, 281363, 281381, 281419, 281423, 281429, 281431, 281509, 281527, 281531, 281539, 281549, 281551, 281557, 281563, 281579, 281581, 281609, 281621, 281623, 281627, 281641, 281647, 281651, 281653, 281663, 281669, 281683, 281717, 281719, 281737, 281747, 281761, 281767, 281777, 281783, 281791, 281797, 281803, 281807, 281833, 281837, 281839, 281849, 281857, 281867, 281887, 281893, 281921, 281923, 281927, 281933, 281947, 281959, 281971, 281989, 281993, 282001, 282011, 282019, 282053, 282059, 282071, 282089, 282091, 282097, 282101, 282103, 282127, 282143, 282157, 282167, 282221, 282229, 282239, 282241, 282253, 282281, 282287, 282299, 282307, 282311, 282313, 282349, 282377, 282383, 282389, 282391, 282407, 282409, 282413, 282427, 282439, 282461, 282481, 282487, 282493, 282559, 282563, 282571, 282577, 282589, 282599, 282617, 282661, 282671, 282677, 282679, 282683, 282691, 282697, 282703, 282707, 282713, 282767, 282769, 282773, 282797, 282809, 282827, 282833, 282847, 282851, 282869, 282881, 282889, 282907, 282911, 282913, 282917, 282959, 282973, 282977, 282991, 283001, 283007, 283009, 283027, 283051, 283079, 283093, 283097, 283099, 283111, 283117, 283121, 283133, 283139, 283159, 283163, 283181, 283183, 283193, 283207, 283211, 283267, 283277, 283289, 283303, 283369, 283397, 283403, 283411, 283447, 283463, 283487, 283489, 283501, 283511, 283519, 283541, 283553, 283571, 283573, 283579, 283583, 283601, 283607, 283609, 283631, 283637, 283639, 283669, 283687, 283697, 283721, 283741, 283763, 283769, 283771, 283793, 283799, 283807, 283813, 283817, 283831, 283837, 283859, 283861, 283873, 283909, 283937, 283949, 283957, 283961, 283979, 284003, 284023, 284041, 284051, 284057, 284059, 284083, 284093, 284111, 284117, 284129, 284131, 284149, 284153, 284159, 284161, 284173, 284191, 284201, 284227, 284231, 284233, 284237, 284243, 284261, 284267, 284269, 284293, 284311, 284341, 284357, 284369, 284377, 284387, 284407, 284413, 284423, 284429, 284447, 284467, 284477, 284483, 284489, 284507, 284509, 284521, 284527, 284539, 284551, 284561, 284573, 284587, 284591, 284593, 284623, 284633, 284651, 284657, 284659, 284681, 284689, 284701, 284707, 284723, 284729, 284731, 284737, 284741, 284743, 284747, 284749, 284759, 284777, 284783, 284803, 284807, 284813, 284819, 284831, 284833, 284839, 284857, 284881, 284897, 284899, 284917, 284927, 284957, 284969, 284989, 285007, 285023, 285031, 285049, 285071, 285079, 285091, 285101, 285113, 285119, 285121, 285139, 285151, 285161, 285179, 285191, 285199, 285221, 285227, 285251, 285281, 285283, 285287, 285289, 285301, 285317, 285343, 285377, 285421, 285433, 285451, 285457, 285463, 285469, 285473, 285497, 285517, 285521, 285533, 285539, 285553, 285557, 285559, 285569, 285599, 285611, 285613, 285629, 285631, 285641, 285643, 285661, 285667, 285673, 285697, 285707, 285709, 285721, 285731, 285749, 285757, 285763, 285767, 285773, 285781, 285823, 285827, 285839, 285841, 285871, 285937, 285949, 285953, 285977, 285979, 285983, 285997, 286001, 286009, 286019, 286043, 286049, 286061, 286063, 286073, 286103, 286129, 286163, 286171, 286199, 286243, 286249, 286289, 286301, 286333, 286367, 286369, 286381, 286393, 286397, 286411, 286421, 286427, 286453, 286457, 286459, 286469, 286477, 286483, 286487, 286493, 286499, 286513, 286519, 286541, 286543, 286547, 286553, 286589, 286591, 286609, 286613, 286619, 286633, 286651, 286673, 286687, 286697, 286703, 286711, 286721, 286733, 286751, 286753, 286763, 286771, 286777, 286789, 286801, 286813, 286831, 286859, 286873, 286927, 286973, 286981, 286987, 286999, 287003, 287047, 287057, 287059, 287087, 287093, 287099, 287107, 287117, 287137, 287141, 287149, 287159, 287167, 287173, 287179, 287191, 287219, 287233, 287237, 287239, 287251, 287257, 287269, 287279, 287281, 287291, 287297, 287321, 287327, 287333, 287341, 287347, 287383, 287387, 287393, 287437, 287449, 287491, 287501, 287503, 287537, 287549, 287557, 287579, 287597, 287611, 287629, 287669, 287671, 287681, 287689, 287701, 287731, 287747, 287783, 287789, 287801, 287813, 287821, 287849, 287851, 287857, 287863, 287867, 287873, 287887, 287921, 287933, 287939, 287977, 288007, 288023, 288049, 288053, 288061, 288077, 288089, 288109, 288137, 288179, 288181, 288191, 288199, 288203, 288209, 288227, 288241, 288247, 288257, 288283, 288293, 288307, 288313, 288317, 288349, 288359, 288361, 288383, 288389, 288403, 288413, 288427, 288433, 288461, 288467, 288481, 288493, 288499, 288527, 288529, 288539, 288551, 288559, 288571, 288577, 288583, 288647, 288649, 288653, 288661, 288679, 288683, 288689, 288697, 288731, 288733, 288751, 288767, 288773, 288803, 288817, 288823, 288833, 288839, 288851, 288853, 288877, 288907, 288913, 288929, 288931, 288947, 288973, 288979, 288989, 288991, 288997, 289001, 289019, 289021, 289031, 289033, 289039, 289049, 289063, 289067, 289099, 289103, 289109, 289111, 289127, 289129, 289139, 289141, 289151, 289169, 289171, 289181, 289189, 289193, 289213, 289241, 289243, 289249, 289253, 289273, 289283, 289291, 289297, 289309, 289319, 289343, 289349, 289361, 289369, 289381, 289397, 289417, 289423, 289439, 289453, 289463, 289469, 289477, 289489, 289511, 289543, 289559, 289573, 289577, 289589, 289603, 289607, 289637, 289643, 289657, 289669, 289717, 289721, 289727, 289733, 289741, 289759, 289763, 289771, 289789, 289837, 289841, 289843, 289847, 289853, 289859, 289871, 289889, 289897, 289937, 289951, 289957, 289967, 289973, 289987, 289999, 290011, 290021, 290023, 290027, 290033, 290039, 290041, 290047, 290057, 290083, 290107, 290113, 290119, 290137, 290141, 290161, 290183, 290189, 290201, 290209, 290219, 290233, 290243, 290249, 290317, 290327, 290347, 290351, 290359, 290369, 290383, 290393, 290399, 290419, 290429, 290441, 290443, 290447, 290471, 290473, 290489, 290497, 290509, 290527, 290531, 290533, 290539, 290557, 290593, 290597, 290611, 290617, 290621, 290623, 290627, 290657, 290659, 290663, 290669, 290671, 290677, 290701, 290707, 290711, 290737, 290761, 290767, 290791, 290803, 290821, 290827, 290837, 290839, 290861, 290869, 290879, 290897, 290923, 290959, 290963, 290971, 290987, 290993, 290999, 291007, 291013, 291037, 291041, 291043, 291077, 291089, 291101, 291103, 291107, 291113, 291143, 291167, 291169, 291173, 291191, 291199, 291209, 291217, 291253, 291257, 291271, 291287, 291293, 291299, 291331, 291337, 291349, 291359, 291367, 291371, 291373, 291377, 291419, 291437, 291439, 291443, 291457, 291481, 291491, 291503, 291509, 291521, 291539, 291547, 291559, 291563, 291569, 291619, 291647, 291649, 291661, 291677, 291689, 291691, 291701, 291721, 291727, 291743, 291751, 291779, 291791, 291817, 291829, 291833, 291853, 291857, 291869, 291877, 291887, 291899, 291901, 291923, 291971, 291979, 291983, 291997, 292021, 292027, 292037, 292057, 292069, 292079, 292081, 292091, 292093, 292133, 292141, 292147, 292157, 292181, 292183, 292223, 292231, 292241, 292249, 292267, 292283, 292301, 292309, 292319, 292343, 292351, 292363, 292367, 292381, 292393, 292427, 292441, 292459, 292469, 292471, 292477, 292483, 292489, 292493, 292517, 292531, 292541, 292549, 292561, 292573, 292577, 292601, 292627, 292631, 292661, 292667, 292673, 292679, 292693, 292703, 292709, 292711, 292717, 292727, 292753, 292759, 292777, 292793, 292801, 292807, 292819, 292837, 292841, 292849, 292867, 292879, 292909, 292921, 292933, 292969, 292973, 292979, 292993, 293021, 293071, 293081, 293087, 293093, 293099, 293107, 293123, 293129, 293147, 293149, 293173, 293177, 293179, 293201, 293207, 293213, 293221, 293257, 293261, 293263, 293269, 293311, 293329, 293339, 293351, 293357, 293399, 293413, 293431, 293441, 293453, 293459, 293467, 293473, 293483, 293507, 293543, 293599, 293603, 293617, 293621, 293633, 293639, 293651, 293659, 293677, 293681, 293701, 293717, 293723, 293729, 293749, 293767, 293773, 293791, 293803, 293827, 293831, 293861, 293863, 293893, 293899, 293941, 293957, 293983, 293989, 293999, 294001, 294013, 294023, 294029, 294043, 294053, 294059, 294067, 294103, 294127, 294131, 294149, 294157, 294167, 294169, 294179, 294181, 294199, 294211, 294223, 294227, 294241, 294247, 294251, 294269, 294277, 294289, 294293, 294311, 294313, 294317, 294319, 294337, 294341, 294347, 294353, 294383, 294391, 294397, 294403, 294431, 294439, 294461, 294467, 294479, 294499, 294509, 294523, 294529, 294551, 294563, 294629, 294641, 294647, 294649, 294659, 294673, 294703, 294731, 294751, 294757, 294761, 294773, 294781, 294787, 294793, 294799, 294803, 294809, 294821, 294829, 294859, 294869, 294887, 294893, 294911, 294919, 294923, 294947, 294949, 294953, 294979, 294989, 294991, 294997, 295007, 295033, 295037, 295039, 295049, 295073, 295079, 295081, 295111, 295123, 295129, 295153, 295187, 295199, 295201, 295219, 295237, 295247, 295259, 295271, 295277, 295283, 295291, 295313, 295319, 295333, 295357, 295363, 295387, 295411, 295417, 295429, 295433, 295439, 295441, 295459, 295513, 295517, 295541, 295553, 295567, 295571, 295591, 295601, 295663, 295693, 295699, 295703, 295727, 295751, 295759, 295769, 295777, 295787, 295819, 295831, 295837, 295843, 295847, 295853, 295861, 295871, 295873, 295877, 295879, 295901, 295903, 295909, 295937, 295943, 295949, 295951, 295961, 295973, 295993, 296011, 296017, 296027, 296041, 296047, 296071, 296083, 296099, 296117, 296129, 296137, 296159, 296183, 296201, 296213, 296221, 296237, 296243, 296249, 296251, 296269, 296273, 296279, 296287, 296299, 296347, 296353, 296363, 296369, 296377, 296437, 296441, 296473, 296477, 296479, 296489, 296503, 296507, 296509, 296519, 296551, 296557, 296561, 296563, 296579, 296581, 296587, 296591, 296627, 296651, 296663, 296669, 296683, 296687, 296693, 296713, 296719, 296729, 296731, 296741, 296749, 296753, 296767, 296771, 296773, 296797, 296801, 296819, 296827, 296831, 296833, 296843, 296909, 296911, 296921, 296929, 296941, 296969, 296971, 296981, 296983, 296987, 297019, 297023, 297049, 297061, 297067, 297079, 297083, 297097, 297113, 297133, 297151, 297161, 297169, 297191, 297233, 297247, 297251, 297257, 297263, 297289, 297317, 297359, 297371, 297377, 297391, 297397, 297403, 297421, 297439, 297457, 297467, 297469, 297481, 297487, 297503, 297509, 297523, 297533, 297581, 297589, 297601, 297607, 297613, 297617, 297623, 297629, 297641, 297659, 297683, 297691, 297707, 297719, 297727, 297757, 297779, 297793, 297797, 297809, 297811, 297833, 297841, 297853, 297881, 297889, 297893, 297907, 297911, 297931, 297953, 297967, 297971, 297989, 297991, 298013, 298021, 298031, 298043, 298049, 298063, 298087, 298093, 298099, 298153, 298157, 298159, 298169, 298171, 298187, 298201, 298211, 298213, 298223, 298237, 298247, 298261, 298283, 298303, 298307, 298327, 298339, 298343, 298349, 298369, 298373, 298399, 298409, 298411, 298427, 298451, 298477, 298483, 298513, 298559, 298579, 298583, 298589, 298601, 298607, 298621, 298631, 298651, 298667, 298679, 298681, 298687, 298691, 298693, 298709, 298723, 298733, 298757, 298759, 298777, 298799, 298801, 298817, 298819, 298841, 298847, 298853, 298861, 298897, 298937, 298943, 298993, 298999, 299011, 299017, 299027, 299029, 299053, 299059, 299063, 299087, 299099, 299107, 299113, 299137, 299147, 299171, 299179, 299191, 299197, 299213, 299239, 299261, 299281, 299287, 299311, 299317, 299329, 299333, 299357, 299359, 299363, 299371, 299389, 299393, 299401, 299417, 299419, 299447, 299471, 299473, 299477, 299479, 299501, 299513, 299521, 299527, 299539, 299567, 299569, 299603, 299617, 299623, 299653, 299671, 299681, 299683, 299699, 299701, 299711, 299723, 299731, 299743, 299749, 299771, 299777, 299807, 299843, 299857, 299861, 299881, 299891, 299903, 299909, 299933, 299941, 299951, 299969, 299977, 299983, 299993, 300007, 300017, 300023, 300043, 300073, 300089, 300109, 300119, 300137, 300149, 300151, 300163, 300187, 300191, 300193, 300221, 300229, 300233, 300239, 300247, 300277, 300299, 300301, 300317, 300319, 300323, 300331, 300343, 300347, 300367, 300397, 300413, 300427, 300431, 300439, 300463, 300481, 300491, 300493, 300497, 300499, 300511, 300557, 300569, 300581, 300583, 300589, 300593, 300623, 300631, 300647, 300649, 300661, 300667, 300673, 300683, 300691, 300719, 300721, 300733, 300739, 300743, 300749, 300757, 300761, 300779, 300787, 300799, 300809, 300821, 300823, 300851, 300857, 300869, 300877, 300889, 300893, 300929, 300931, 300953, 300961, 300967, 300973, 300977, 300997, 301013, 301027, 301039, 301051, 301057, 301073, 301079, 301123, 301127, 301141, 301153, 301159, 301177, 301181, 301183, 301211, 301219, 301237, 301241, 301243, 301247, 301267, 301303, 301319, 301331, 301333, 301349, 301361, 301363, 301381, 301403, 301409, 301423, 301429, 301447, 301459, 301463, 301471, 301487, 301489, 301493, 301501, 301531, 301577, 301579, 301583, 301591, 301601, 301619, 301627, 301643, 301649, 301657, 301669, 301673, 301681, 301703, 301711, 301747, 301751, 301753, 301759, 301789, 301793, 301813, 301831, 301841, 301843, 301867, 301877, 301897, 301901, 301907, 301913, 301927, 301933, 301943, 301949, 301979, 301991, 301993, 301997, 301999, 302009, 302053, 302111, 302123, 302143, 302167, 302171, 302173, 302189, 302191, 302213, 302221, 302227, 302261, 302273, 302279, 302287, 302297, 302299, 302317, 302329, 302399, 302411, 302417, 302429, 302443, 302459, 302483, 302507, 302513, 302551, 302563, 302567, 302573, 302579, 302581, 302587, 302593, 302597, 302609, 302629, 302647, 302663, 302681, 302711, 302723, 302747, 302759, 302767, 302779, 302791, 302801, 302831, 302833, 302837, 302843, 302851, 302857, 302873, 302891, 302903, 302909, 302921, 302927, 302941, 302959, 302969, 302971, 302977, 302983, 302989, 302999, 303007, 303011, 303013, 303019, 303029, 303049, 303053, 303073, 303089, 303091, 303097, 303119, 303139, 303143, 303151, 303157, 303187, 303217, 303257, 303271, 303283, 303287, 303293, 303299, 303307, 303313, 303323, 303337, 303341, 303361, 303367, 303371, 303377, 303379, 303389, 303409, 303421, 303431, 303463, 303469, 303473, 303491, 303493, 303497, 303529, 303539, 303547, 303551, 303553, 303571, 303581, 303587, 303593, 303613, 303617, 303619, 303643, 303647, 303649, 303679, 303683, 303689, 303691, 303703, 303713, 303727, 303731, 303749, 303767, 303781, 303803, 303817, 303827, 303839, 303859, 303871, 303889, 303907, 303917, 303931, 303937, 303959, 303983, 303997, 304009, 304013, 304021, 304033, 304039, 304049, 304063, 304067, 304069, 304081, 304091, 304099, 304127, 304151, 304153, 304163, 304169, 304193, 304211, 304217, 304223, 304253, 304259, 304279, 304301, 304303, 304331, 304349, 304357, 304363, 304373, 304391, 304393, 304411, 304417, 304429, 304433, 304439, 304457, 304459, 304477, 304481, 304489, 304501, 304511, 304517, 304523, 304537, 304541, 304553, 304559, 304561, 304597, 304609, 304631, 304643, 304651, 304663, 304687, 304709, 304723, 304729, 304739, 304751, 304757, 304763, 304771, 304781, 304789, 304807, 304813, 304831, 304847, 304849, 304867, 304879, 304883, 304897, 304901, 304903, 304907, 304933, 304937, 304943, 304949, 304961, 304979, 304981, 305017, 305021, 305023, 305029, 305033, 305047, 305069, 305093, 305101, 305111, 305113, 305119, 305131, 305143, 305147, 305209, 305219, 305231, 305237, 305243, 305267, 305281, 305297, 305329, 305339, 305351, 305353, 305363, 305369, 305377, 305401, 305407, 305411, 305413, 305419, 305423, 305441, 305449, 305471, 305477, 305479, 305483, 305489, 305497, 305521, 305533, 305551, 305563, 305581, 305593, 305597, 305603, 305611, 305621, 305633, 305639, 305663, 305717, 305719, 305741, 305743, 305749, 305759, 305761, 305771, 305783, 305803, 305821, 305839, 305849, 305857, 305861, 305867, 305873, 305917, 305927, 305933, 305947, 305971, 305999, 306011, 306023, 306029, 306041, 306049, 306083, 306091, 306121, 306133, 306139, 306149, 306157, 306167, 306169, 306191, 306193, 306209, 306239, 306247, 306253, 306259, 306263, 306301, 306329, 306331, 306347, 306349, 306359, 306367, 306377, 306389, 306407, 306419, 306421, 306431, 306437, 306457, 306463, 306473, 306479, 306491, 306503, 306511, 306517, 306529, 306533, 306541, 306563, 306577, 306587, 306589, 306643, 306653, 306661, 306689, 306701, 306703, 306707, 306727, 306739, 306749, 306763, 306781, 306809, 306821, 306827, 306829, 306847, 306853, 306857, 306871, 306877, 306883, 306893, 306899, 306913, 306919, 306941, 306947, 306949, 306953, 306991, 307009, 307019, 307031, 307033, 307067, 307079, 307091, 307093, 307103, 307121, 307129, 307147, 307163, 307169, 307171, 307187, 307189, 307201, 307243, 307253, 307259, 307261, 307267, 307273, 307277, 307283, 307289, 307301, 307337, 307339, 307361, 307367, 307381, 307397, 307399, 307409, 307423, 307451, 307471, 307481, 307511, 307523, 307529, 307537, 307543, 307577, 307583, 307589, 307609, 307627, 307631, 307633, 307639, 307651, 307669, 307687, 307691, 307693, 307711, 307733, 307759, 307817, 307823, 307831, 307843, 307859, 307871, 307873, 307891, 307903, 307919, 307939, 307969, 308003, 308017, 308027, 308041, 308051, 308081, 308093, 308101, 308107, 308117, 308129, 308137, 308141, 308149, 308153, 308213, 308219, 308249, 308263, 308291, 308293, 308303, 308309, 308311, 308317, 308323, 308327, 308333, 308359, 308383, 308411, 308423, 308437, 308447, 308467, 308489, 308491, 308501, 308507, 308509, 308519, 308521, 308527, 308537, 308551, 308569, 308573, 308587, 308597, 308621, 308639, 308641, 308663, 308681, 308701, 308713, 308723, 308761, 308773, 308801, 308809, 308813, 308827, 308849, 308851, 308857, 308887, 308899, 308923, 308927, 308929, 308933, 308939, 308951, 308989, 308999, 309007, 309011, 309013, 309019, 309031, 309037, 309059, 309079, 309083, 309091, 309107, 309109, 309121, 309131, 309137, 309157, 309167, 309173, 309193, 309223, 309241, 309251, 309259, 309269, 309271, 309277, 309289, 309293, 309311, 309313, 309317, 309359, 309367, 309371, 309391, 309403, 309433, 309437, 309457, 309461, 309469, 309479, 309481, 309493, 309503, 309521, 309523, 309539, 309541, 309559, 309571, 309577, 309583, 309599, 309623, 309629, 309637, 309667, 309671, 309677, 309707, 309713, 309731, 309737, 309769, 309779, 309781, 309797, 309811, 309823, 309851, 309853, 309857, 309877, 309899, 309929, 309931, 309937, 309977, 309989, 310019, 310021, 310027, 310043, 310049, 310081, 310087, 310091, 310111, 310117, 310127, 310129, 310169, 310181, 310187, 310223, 310229, 310231, 310237, 310243, 310273, 310283, 310291, 310313, 310333, 310357, 310361, 310363, 310379, 310397, 310423, 310433, 310439, 310447, 310459, 310463, 310481, 310489, 310501, 310507, 310511, 310547, 310553, 310559, 310567, 310571, 310577, 310591, 310627, 310643, 310663, 310693, 310697, 310711, 310721, 310727, 310729, 310733, 310741, 310747, 310771, 310781, 310789, 310801, 310819, 310823, 310829, 310831, 310861, 310867, 310883, 310889, 310901, 310927, 310931, 310949, 310969, 310987, 310997, 311009, 311021, 311027, 311033, 311041, 311099, 311111, 311123, 311137, 311153, 311173, 311177, 311183, 311189, 311197, 311203, 311237, 311279, 311291, 311293, 311299, 311303, 311323, 311329, 311341, 311347, 311359, 311371, 311393, 311407, 311419, 311447, 311453, 311473, 311533, 311537, 311539, 311551, 311557, 311561, 311567, 311569, 311603, 311609, 311653, 311659, 311677, 311681, 311683, 311687, 311711, 311713, 311737, 311743, 311747, 311749, 311791, 311803, 311807, 311821, 311827, 311867, 311869, 311881, 311897, 311951, 311957, 311963, 311981, 312007, 312023, 312029, 312031, 312043, 312047, 312071, 312073, 312083, 312089, 312101, 312107, 312121, 312161, 312197, 312199, 312203, 312209, 312211, 312217, 312229, 312233, 312241, 312251, 312253, 312269, 312281, 312283, 312289, 312311, 312313, 312331, 312343, 312349, 312353, 312371, 312383, 312397, 312401, 312407, 312413, 312427, 312451, 312469, 312509, 312517, 312527, 312551, 312553, 312563, 312581, 312583, 312589, 312601, 312617, 312619, 312623, 312643, 312673, 312677, 312679, 312701, 312703, 312709, 312727, 312737, 312743, 312757, 312773, 312779, 312799, 312839, 312841, 312857, 312863, 312887, 312899, 312929, 312931, 312937, 312941, 312943, 312967, 312971, 312979, 312989, 313003, 313009, 313031, 313037, 313081, 313087, 313109, 313127, 313129, 313133, 313147, 313151, 313153, 313163, 313207, 313211, 313219, 313241, 313249, 313267, 313273, 313289, 313297, 313301, 313307, 313321, 313331, 313333, 313343, 313351, 313373, 313381, 313387, 313399, 313409, 313471, 313477, 313507, 313517, 313543, 313549, 313553, 313561, 313567, 313571, 313583, 313589, 313597, 313603, 313613, 313619, 313637, 313639, 313661, 313669, 313679, 313699, 313711, 313717, 313721, 313727, 313739, 313741, 313763, 313777, 313783, 313829, 313849, 313853, 313879, 313883, 313889, 313897, 313909, 313921, 313931, 313933, 313949, 313961, 313969, 313979, 313981, 313987, 313991, 313993, 313997, 314003, 314021, 314059, 314063, 314077, 314107, 314113, 314117, 314129, 314137, 314159, 314161, 314173, 314189, 314213, 314219, 314227, 314233, 314239, 314243, 314257, 314261, 314263, 314267, 314299, 314329, 314339, 314351, 314357, 314359, 314399, 314401, 314407, 314423, 314441, 314453, 314467, 314491, 314497, 314513, 314527, 314543, 314549, 314569, 314581, 314591, 314597, 314599, 314603, 314623, 314627, 314641, 314651, 314693, 314707, 314711, 314719, 314723, 314747, 314761, 314771, 314777, 314779, 314807, 314813, 314827, 314851, 314879, 314903, 314917, 314927, 314933, 314953, 314957, 314983, 314989, 315011, 315013, 315037, 315047, 315059, 315067, 315083, 315097, 315103, 315109, 315127, 315179, 315181, 315193, 315199, 315223, 315247, 315251, 315257, 315269, 315281, 315313, 315349, 315361, 315373, 315377, 315389, 315407, 315409, 315421, 315437, 315449, 315451, 315461, 315467, 315481, 315493, 315517, 315521, 315527, 315529, 315547, 315551, 315559, 315569, 315589, 315593, 315599, 315613, 315617, 315631, 315643, 315671, 315677, 315691, 315697, 315701, 315703, 315739, 315743, 315751, 315779, 315803, 315811, 315829, 315851, 315857, 315881, 315883, 315893, 315899, 315907, 315937, 315949, 315961, 315967, 315977, 316003, 316031, 316033, 316037, 316051, 316067, 316073, 316087, 316097, 316109, 316133, 316139, 316153, 316177, 316189, 316193, 316201, 316213, 316219, 316223, 316241, 316243, 316259, 316271, 316291, 316297, 316301, 316321, 316339, 316343, 316363, 316373, 316391, 316403, 316423, 316429, 316439, 316453, 316469, 316471, 316493, 316499, 316501, 316507, 316531, 316567, 316571, 316577, 316583, 316621, 316633, 316637, 316649, 316661, 316663, 316681, 316691, 316697, 316699, 316703, 316717, 316753, 316759, 316769, 316777, 316783, 316793, 316801, 316817, 316819, 316847, 316853, 316859, 316861, 316879, 316891, 316903, 316907, 316919, 316937, 316951, 316957, 316961, 316991, 317003, 317011, 317021, 317029, 317047, 317063, 317071, 317077, 317087, 317089, 317123, 317159, 317171, 317179, 317189, 317197, 317209, 317227, 317257, 317263, 317267, 317269, 317279, 317321, 317323, 317327, 317333, 317351, 317353, 317363, 317371, 317399, 317411, 317419, 317431, 317437, 317453, 317459, 317483, 317489, 317491, 317503, 317539, 317557, 317563, 317587, 317591, 317593, 317599, 317609, 317617, 317621, 317651, 317663, 317671, 317693, 317701, 317711, 317717, 317729, 317731, 317741, 317743, 317771, 317773, 317777, 317783, 317789, 317797, 317827, 317831, 317839, 317857, 317887, 317903, 317921, 317923, 317957, 317959, 317963, 317969, 317971, 317983, 317987, 318001, 318007, 318023, 318077, 318103, 318107, 318127, 318137, 318161, 318173, 318179, 318181, 318191, 318203, 318209, 318211, 318229, 318233, 318247, 318259, 318271, 318281, 318287, 318289, 318299, 318301, 318313, 318319, 318323, 318337, 318347, 318349, 318377, 318403, 318407, 318419, 318431, 318443, 318457, 318467, 318473, 318503, 318523, 318557, 318559, 318569, 318581, 318589, 318601, 318629, 318641, 318653, 318671, 318677, 318679, 318683, 318691, 318701, 318713, 318737, 318743, 318749, 318751, 318781, 318793, 318809, 318811, 318817, 318823, 318833, 318841, 318863, 318881, 318883, 318889, 318907, 318911, 318917, 318919, 318949, 318979, 319001, 319027, 319031, 319037, 319049, 319057, 319061, 319069, 319093, 319097, 319117, 319127, 319129, 319133, 319147, 319159, 319169, 319183, 319201, 319211, 319223, 319237, 319259, 319279, 319289, 319313, 319321, 319327, 319339, 319343, 319351, 319357, 319387, 319391, 319399, 319411, 319427, 319433, 319439, 319441, 319453, 319469, 319477, 319483, 319489, 319499, 319511, 319519, 319541, 319547, 319567, 319577, 319589, 319591, 319601, 319607, 319639, 319673, 319679, 319681, 319687, 319691, 319699, 319727, 319729, 319733, 319747, 319757, 319763, 319811, 319817, 319819, 319829, 319831, 319849, 319883, 319897, 319901, 319919, 319927, 319931, 319937, 319967, 319973, 319981, 319993, 320009, 320011, 320027, 320039, 320041, 320053, 320057, 320063, 320081, 320083, 320101, 320107, 320113, 320119, 320141, 320143, 320149, 320153, 320179, 320209, 320213, 320219, 320237, 320239, 320267, 320269, 320273, 320291, 320293, 320303, 320317, 320329, 320339, 320377, 320387, 320389, 320401, 320417, 320431, 320449, 320471, 320477, 320483, 320513, 320521, 320533, 320539, 320561, 320563, 320591, 320609, 320611, 320627, 320647, 320657, 320659, 320669, 320687, 320693, 320699, 320713, 320741, 320759, 320767, 320791, 320821, 320833, 320839, 320843, 320851, 320861, 320867, 320899, 320911, 320923, 320927, 320939, 320941, 320953, 321007, 321017, 321031, 321037, 321047, 321053, 321073, 321077, 321091, 321109, 321143, 321163, 321169, 321187, 321193, 321199, 321203, 321221, 321227, 321239, 321247, 321289, 321301, 321311, 321313, 321319, 321323, 321329, 321331, 321341, 321359, 321367, 321371, 321383, 321397, 321403, 321413, 321427, 321443, 321449, 321467, 321469, 321509, 321547, 321553, 321569, 321571, 321577, 321593, 321611, 321617, 321619, 321631, 321647, 321661, 321679, 321707, 321709, 321721, 321733, 321743, 321751, 321757, 321779, 321799, 321817, 321821, 321823, 321829, 321833, 321847, 321851, 321889, 321901, 321911, 321947, 321949, 321961, 321983, 321991, 322001, 322009, 322013, 322037, 322039, 322051, 322057, 322067, 322073, 322079, 322093, 322097, 322109, 322111, 322139, 322169, 322171, 322193, 322213, 322229, 322237, 322243, 322247, 322249, 322261, 322271, 322319, 322327, 322339, 322349, 322351, 322397, 322403, 322409, 322417, 322429, 322433, 322459, 322463, 322501, 322513, 322519, 322523, 322537, 322549, 322559, 322571, 322573, 322583, 322589, 322591, 322607, 322613, 322627, 322631, 322633, 322649, 322669, 322709, 322727, 322747, 322757, 322769, 322771, 322781, 322783, 322807, 322849, 322859, 322871, 322877, 322891, 322901, 322919, 322921, 322939, 322951, 322963, 322969, 322997, 322999, 323003, 323009, 323027, 323053, 323077, 323083, 323087, 323093, 323101, 323123, 323131, 323137, 323149, 323201, 323207, 323233, 323243, 323249, 323251, 323273, 323333, 323339, 323341, 323359, 323369, 323371, 323377, 323381, 323383, 323413, 323419, 323441, 323443, 323467, 323471, 323473, 323507, 323509, 323537, 323549, 323567, 323579, 323581, 323591, 323597, 323599, 323623, 323641, 323647, 323651, 323699, 323707, 323711, 323717, 323759, 323767, 323789, 323797, 323801, 323803, 323819, 323837, 323879, 323899, 323903, 323923, 323927, 323933, 323951, 323957, 323987, 324011, 324031, 324053, 324067, 324073, 324089, 324097, 324101, 324113, 324119, 324131, 324143, 324151, 324161, 324179, 324199, 324209, 324211, 324217, 324223, 324239, 324251, 324293, 324299, 324301, 324319, 324329, 324341, 324361, 324391, 324397, 324403, 324419, 324427, 324431, 324437, 324439, 324449, 324451, 324469, 324473, 324491, 324497, 324503, 324517, 324523, 324529, 324557, 324587, 324589, 324593, 324617, 324619, 324637, 324641, 324647, 324661, 324673, 324689, 324697, 324707, 324733, 324743, 324757, 324763, 324773, 324781, 324791, 324799, 324809, 324811, 324839, 324847, 324869, 324871, 324889, 324893, 324901, 324931, 324941, 324949, 324953, 324977, 324979, 324983, 324991, 324997, 325001, 325009, 325019, 325021, 325027, 325043, 325051, 325063, 325079, 325081, 325093, 325133, 325153, 325163, 325181, 325187, 325189, 325201, 325217, 325219, 325229, 325231, 325249, 325271, 325301, 325307, 325309, 325319, 325333, 325343, 325349, 325379, 325411, 325421, 325439, 325447, 325453, 325459, 325463, 325477, 325487, 325513, 325517, 325537, 325541, 325543, 325571, 325597, 325607, 325627, 325631, 325643, 325667, 325673, 325681, 325691, 325693, 325697, 325709, 325723, 325729, 325747, 325751, 325753, 325769, 325777, 325781, 325783, 325807, 325813, 325849, 325861, 325877, 325883, 325889, 325891, 325901, 325921, 325939, 325943, 325951, 325957, 325987, 325993, 325999, 326023, 326057, 326063, 326083, 326087, 326099, 326101, 326113, 326119, 326141, 326143, 326147, 326149, 326153, 326159, 326171, 326189, 326203, 326219, 326251, 326257, 326309, 326323, 326351, 326353, 326369, 326437, 326441, 326449, 326467, 326479, 326497, 326503, 326537, 326539, 326549, 326561, 326563, 326567, 326581, 326593, 326597, 326609, 326611, 326617, 326633, 326657, 326659, 326663, 326681, 326687, 326693, 326701, 326707, 326737, 326741, 326773, 326779, 326831, 326863, 326867, 326869, 326873, 326881, 326903, 326923, 326939, 326941, 326947, 326951, 326983, 326993, 326999, 327001, 327007, 327011, 327017, 327023, 327059, 327071, 327079, 327127, 327133, 327163, 327179, 327193, 327203, 327209, 327211, 327247, 327251, 327263, 327277, 327289, 327307, 327311, 327317, 327319, 327331, 327337, 327343, 327347, 327401, 327407, 327409, 327419, 327421, 327433, 327443, 327463, 327469, 327473, 327479, 327491, 327493, 327499, 327511, 327517, 327529, 327553, 327557, 327559, 327571, 327581, 327583, 327599, 327619, 327629, 327647, 327661, 327667, 327673, 327689, 327707, 327721, 327737, 327739, 327757, 327779, 327797, 327799, 327809, 327823, 327827, 327829, 327839, 327851, 327853, 327869, 327871, 327881, 327889, 327917, 327923, 327941, 327953, 327967, 327979, 327983, 328007, 328037, 328043, 328051, 328061, 328063, 328067, 328093, 328103, 328109, 328121, 328127, 328129, 328171, 328177, 328213, 328243, 328249, 328271, 328277, 328283, 328291, 328303, 328327, 328331, 328333, 328343, 328357, 328373, 328379, 328381, 328397, 328411, 328421, 328429, 328439, 328481, 328511, 328513, 328519, 328543, 328579, 328589, 328591, 328619, 328621, 328633, 328637, 328639, 328651, 328667, 328687, 328709, 328721, 328753, 328777, 328781, 328787, 328789, 328813, 328829, 328837, 328847, 328849, 328883, 328891, 328897, 328901, 328919, 328921, 328931, 328961, 328981, 329009, 329027, 329053, 329059, 329081, 329083, 329089, 329101, 329111, 329123, 329143, 329167, 329177, 329191, 329201, 329207, 329209, 329233, 329243, 329257, 329267, 329269, 329281, 329293, 329297, 329299, 329309, 329317, 329321, 329333, 329347, 329387, 329393, 329401, 329419, 329431, 329471, 329473, 329489, 329503, 329519, 329533, 329551, 329557, 329587, 329591, 329597, 329603, 329617, 329627, 329629, 329639, 329657, 329663, 329671, 329677, 329683, 329687, 329711, 329717, 329723, 329729, 329761, 329773, 329779, 329789, 329801, 329803, 329863, 329867, 329873, 329891, 329899, 329941, 329947, 329951, 329957, 329969, 329977, 329993, 329999, 330017, 330019, 330037, 330041, 330047, 330053, 330061, 330067, 330097, 330103, 330131, 330133, 330139, 330149, 330167, 330199, 330203, 330217, 330227, 330229, 330233, 330241, 330247, 330271, 330287, 330289, 330311, 330313, 330329, 330331, 330347, 330359, 330383, 330389, 330409, 330413, 330427, 330431, 330433, 330439, 330469, 330509, 330557, 330563, 330569, 330587, 330607, 330611, 330623, 330641, 330643, 330653, 330661, 330679, 330683, 330689, 330697, 330703, 330719, 330721, 330731, 330749, 330767, 330787, 330791, 330793, 330821, 330823, 330839, 330853, 330857, 330859, 330877, 330887, 330899, 330907, 330917, 330943, 330983, 330997, 331013, 331027, 331031, 331043, 331063, 331081, 331099, 331127, 331141, 331147, 331153, 331159, 331171, 331183, 331207, 331213, 331217, 331231, 331241, 331249, 331259, 331277, 331283, 331301, 331307, 331319, 331333, 331337, 331339, 331349, 331367, 331369, 331391, 331399, 331423, 331447, 331451, 331489, 331501, 331511, 331519, 331523, 331537, 331543, 331547, 331549, 331553, 331577, 331579, 331589, 331603, 331609, 331613, 331651, 331663, 331691, 331693, 331697, 331711, 331739, 331753, 331769, 331777, 331781, 331801, 331819, 331841, 331843, 331871, 331883, 331889, 331897, 331907, 331909, 331921, 331937, 331943, 331957, 331967, 331973, 331997, 331999, 332009, 332011, 332039, 332053, 332069, 332081, 332099, 332113, 332117, 332147, 332159, 332161, 332179, 332183, 332191, 332201, 332203, 332207, 332219, 332221, 332251, 332263, 332273, 332287, 332303, 332309, 332317, 332393, 332399, 332411, 332417, 332441, 332447, 332461, 332467, 332471, 332473, 332477, 332489, 332509, 332513, 332561, 332567, 332569, 332573, 332611, 332617, 332623, 332641, 332687, 332699, 332711, 332729, 332743, 332749, 332767, 332779, 332791, 332803, 332837, 332851, 332873, 332881, 332887, 332903, 332921, 332933, 332947, 332951, 332987, 332989, 332993, 333019, 333023, 333029, 333031, 333041, 333049, 333071, 333097, 333101, 333103, 333107, 333131, 333139, 333161, 333187, 333197, 333209, 333227, 333233, 333253, 333269, 333271, 333283, 333287, 333299, 333323, 333331, 333337, 333341, 333349, 333367, 333383, 333397, 333419, 333427, 333433, 333439, 333449, 333451, 333457, 333479, 333491, 333493, 333497, 333503, 333517, 333533, 333539, 333563, 333581, 333589, 333623, 333631, 333647, 333667, 333673, 333679, 333691, 333701, 333713, 333719, 333721, 333737, 333757, 333769, 333779, 333787, 333791, 333793, 333803, 333821, 333857, 333871, 333911, 333923, 333929, 333941, 333959, 333973, 333989, 333997, 334021, 334031, 334043, 334049, 334057, 334069, 334093, 334099, 334127, 334133, 334157, 334171, 334177, 334183, 334189, 334199, 334231, 334247, 334261, 334289, 334297, 334319, 334331, 334333, 334349, 334363, 334379, 334387, 334393, 334403, 334421, 334423, 334427, 334429, 334447, 334487, 334493, 334507, 334511, 334513, 334541, 334547, 334549, 334561, 334603, 334619, 334637, 334643, 334651, 334661, 334667, 334681, 334693, 334699, 334717, 334721, 334727, 334751, 334753, 334759, 334771, 334777, 334783, 334787, 334793, 334843, 334861, 334877, 334889, 334891, 334897, 334931, 334963, 334973, 334987, 334991, 334993, 335009, 335021, 335029, 335033, 335047, 335051, 335057, 335077, 335081, 335089, 335107, 335113, 335117, 335123, 335131, 335149, 335161, 335171, 335173, 335207, 335213, 335221, 335249, 335261, 335273, 335281, 335299, 335323, 335341, 335347, 335381, 335383, 335411, 335417, 335429, 335449, 335453, 335459, 335473, 335477, 335507, 335519, 335527, 335539, 335557, 335567, 335579, 335591, 335609, 335633, 335641, 335653, 335663, 335669, 335681, 335689, 335693, 335719, 335729, 335743, 335747, 335771, 335807, 335809, 335813, 335821, 335833, 335843, 335857, 335879, 335893, 335897, 335917, 335941, 335953, 335957, 335999, 336029, 336031, 336041, 336059, 336079, 336101, 336103, 336109, 336113, 336121, 336143, 336151, 336157, 336163, 336181, 336199, 336211, 336221, 336223, 336227, 336239, 336247, 336251, 336253, 336263, 336307, 336317, 336353, 336361, 336373, 336397, 336403, 336419, 336437, 336463, 336491, 336499, 336503, 336521, 336527, 336529, 336533, 336551, 336563, 336571, 336577, 336587, 336593, 336599, 336613, 336631, 336643, 336649, 336653, 336667, 336671, 336683, 336689, 336703, 336727, 336757, 336761, 336767, 336769, 336773, 336793, 336799, 336803, 336823, 336827, 336829, 336857, 336863, 336871, 336887, 336899, 336901, 336911, 336929, 336961, 336977, 336983, 336989, 336997, 337013, 337021, 337031, 337039, 337049, 337069, 337081, 337091, 337097, 337121, 337153, 337189, 337201, 337213, 337217, 337219, 337223, 337261, 337277, 337279, 337283, 337291, 337301, 337313, 337327, 337339, 337343, 337349, 337361, 337367, 337369, 337397, 337411, 337427, 337453, 337457, 337487, 337489, 337511, 337517, 337529, 337537, 337541, 337543, 337583, 337607, 337609, 337627, 337633, 337639, 337651, 337661, 337669, 337681, 337691, 337697, 337721, 337741, 337751, 337759, 337781, 337793, 337817, 337837, 337853, 337859, 337861, 337867, 337871, 337873, 337891, 337901, 337903, 337907, 337919, 337949, 337957, 337969, 337973, 337999, 338017, 338027, 338033, 338119, 338137, 338141, 338153, 338159, 338161, 338167, 338171, 338183, 338197, 338203, 338207, 338213, 338231, 338237, 338251, 338263, 338267, 338269, 338279, 338287, 338293, 338297, 338309, 338321, 338323, 338339, 338341, 338347, 338369, 338383, 338389, 338407, 338411, 338413, 338423, 338431, 338449, 338461, 338473, 338477, 338497, 338531, 338543, 338563, 338567, 338573, 338579, 338581, 338609, 338659, 338669, 338683, 338687, 338707, 338717, 338731, 338747, 338753, 338761, 338773, 338777, 338791, 338803, 338839, 338851, 338857, 338867, 338893, 338909, 338927, 338959, 338993, 338999, 339023, 339049, 339067, 339071, 339091, 339103, 339107, 339121, 339127, 339137, 339139, 339151, 339161, 339173, 339187, 339211, 339223, 339239, 339247, 339257, 339263, 339289, 339307, 339323, 339331, 339341, 339373, 339389, 339413, 339433, 339467, 339491, 339517, 339527, 339539, 339557, 339583, 339589, 339601, 339613, 339617, 339631, 339637, 339649, 339653, 339659, 339671, 339673, 339679, 339707, 339727, 339749, 339751, 339761, 339769, 339799, 339811, 339817, 339821, 339827, 339839, 339841, 339863, 339887, 339907, 339943, 339959, 339991, 340007, 340027, 340031, 340037, 340049, 340057, 340061, 340063, 340073, 340079, 340103, 340111, 340117, 340121, 340127, 340129, 340169, 340183, 340201, 340211, 340237, 340261, 340267, 340283, 340297, 340321, 340337, 340339, 340369, 340381, 340387, 340393, 340397, 340409, 340429, 340447, 340451, 340453, 340477, 340481, 340519, 340541, 340559, 340573, 340577, 340579, 340583, 340591, 340601, 340619, 340633, 340643, 340649, 340657, 340661, 340687, 340693, 340709, 340723, 340757, 340777, 340787, 340789, 340793, 340801, 340811, 340819, 340849, 340859, 340877, 340889, 340897, 340903, 340909, 340913, 340919, 340927, 340931, 340933, 340937, 340939, 340957, 340979, 340999, 341017, 341027, 341041, 341057, 341059, 341063, 341083, 341087, 341123, 341141, 341171, 341179, 341191, 341203, 341219, 341227, 341233, 341269, 341273, 341281, 341287, 341293, 341303, 341311, 341321, 341323, 341333, 341339, 341347, 341357, 341423, 341443, 341447, 341459, 341461, 341477, 341491, 341501, 341507, 341521, 341543, 341557, 341569, 341587, 341597, 341603, 341617, 341623, 341629, 341641, 341647, 341659, 341681, 341687, 341701, 341729, 341743, 341749, 341771, 341773, 341777, 341813, 341821, 341827, 341839, 341851, 341863, 341879, 341911, 341927, 341947, 341951, 341953, 341959, 341963, 341983, 341993, 342037, 342047, 342049, 342059, 342061, 342071, 342073, 342077, 342101, 342107, 342131, 342143, 342179, 342187, 342191, 342197, 342203, 342211, 342233, 342239, 342241, 342257, 342281, 342283, 342299, 342319, 342337, 342341, 342343, 342347, 342359, 342371, 342373, 342379, 342389, 342413, 342421, 342449, 342451, 342467, 342469, 342481, 342497, 342521, 342527, 342547, 342553, 342569, 342593, 342599, 342607, 342647, 342653, 342659, 342673, 342679, 342691, 342697, 342733, 342757, 342761, 342791, 342799, 342803, 342821, 342833, 342841, 342847, 342863, 342869, 342871, 342889, 342899, 342929, 342949, 342971, 342989, 343019, 343037, 343051, 343061, 343073, 343081, 343087, 343127, 343141, 343153, 343163, 343169, 343177, 343193, 343199, 343219, 343237, 343243, 343253, 343261, 343267, 343289, 343303, 343307, 343309, 343313, 343327, 343333, 343337, 343373, 343379, 343381, 343391, 343393, 343411, 343423, 343433, 343481, 343489, 343517, 343529, 343531, 343543, 343547, 343559, 343561, 343579, 343583, 343589, 343591, 343601, 343627, 343631, 343639, 343649, 343661, 343667, 343687, 343709, 343727, 343769, 343771, 343787, 343799, 343801, 343813, 343817, 343823, 343829, 343831, 343891, 343897, 343901, 343913, 343933, 343939, 343943, 343951, 343963, 343997, 344017, 344021, 344039, 344053, 344083, 344111, 344117, 344153, 344161, 344167, 344171, 344173, 344177, 344189, 344207, 344209, 344213, 344221, 344231, 344237, 344243, 344249, 344251, 344257, 344263, 344269, 344273, 344291, 344293, 344321, 344327, 344347, 344353, 344363, 344371, 344417, 344423, 344429, 344453, 344479, 344483, 344497, 344543, 344567, 344587, 344599, 344611, 344621, 344629, 344639, 344653, 344671, 344681, 344683, 344693, 344719, 344749, 344753, 344759, 344791, 344797, 344801, 344807, 344819, 344821, 344843, 344857, 344863, 344873, 344887, 344893, 344909, 344917, 344921, 344941, 344957, 344959, 344963, 344969, 344987, 345001, 345011, 345017, 345019, 345041, 345047, 345067, 345089, 345109, 345133, 345139, 345143, 345181, 345193, 345221, 345227, 345229, 345259, 345263, 345271, 345307, 345311, 345329, 345379, 345413, 345431, 345451, 345461, 345463, 345473, 345479, 345487, 345511, 345517, 345533, 345547, 345551, 345571, 345577, 345581, 345599, 345601, 345607, 345637, 345643, 345647, 345659, 345673, 345679, 345689, 345701, 345707, 345727, 345731, 345733, 345739, 345749, 345757, 345769, 345773, 345791, 345803, 345811, 345817, 345823, 345853, 345869, 345881, 345887, 345889, 345907, 345923, 345937, 345953, 345979, 345997, 346013, 346039, 346043, 346051, 346079, 346091, 346097, 346111, 346117, 346133, 346139, 346141, 346147, 346169, 346187, 346201, 346207, 346217, 346223, 346259, 346261, 346277, 346303, 346309, 346321, 346331, 346337, 346349, 346361, 346369, 346373, 346391, 346393, 346397, 346399, 346417, 346421, 346429, 346433, 346439, 346441, 346447, 346453, 346469, 346501, 346529, 346543, 346547, 346553, 346559, 346561, 346589, 346601, 346607, 346627, 346639, 346649, 346651, 346657, 346667, 346669, 346699, 346711, 346721, 346739, 346751, 346763, 346793, 346831, 346849, 346867, 346873, 346877, 346891, 346903, 346933, 346939, 346943, 346961, 346963, 347003, 347033, 347041, 347051, 347057, 347059, 347063, 347069, 347071, 347099, 347129, 347131, 347141, 347143, 347161, 347167, 347173, 347177, 347183, 347197, 347201, 347209, 347227, 347233, 347239, 347251, 347257, 347287, 347297, 347299, 347317, 347329, 347341, 347359, 347401, 347411, 347437, 347443, 347489, 347509, 347513, 347519, 347533, 347539, 347561, 347563, 347579, 347587, 347591, 347609, 347621, 347629, 347651, 347671, 347707, 347717, 347729, 347731, 347747, 347759, 347771, 347773, 347779, 347801, 347813, 347821, 347849, 347873, 347887, 347891, 347899, 347929, 347933, 347951, 347957, 347959, 347969, 347981, 347983, 347987, 347989, 347993, 348001, 348011, 348017, 348031, 348043, 348053, 348077, 348083, 348097, 348149, 348163, 348181, 348191, 348209, 348217, 348221, 348239, 348241, 348247, 348253, 348259, 348269, 348287, 348307, 348323, 348353, 348367, 348389, 348401, 348407, 348419, 348421, 348431, 348433, 348437, 348443, 348451, 348457, 348461, 348463, 348487, 348527, 348547, 348553, 348559, 348563, 348571, 348583, 348587, 348617, 348629, 348637, 348643, 348661, 348671, 348709, 348731, 348739, 348757, 348763, 348769, 348779, 348811, 348827, 348833, 348839, 348851, 348883, 348889, 348911, 348917, 348919, 348923, 348937, 348949, 348989, 348991, 349007, 349039, 349043, 349051, 349079, 349081, 349093, 349099, 349109, 349121, 349133, 349171, 349177, 349183, 349187, 349199, 349207, 349211, 349241, 349291, 349303, 349313, 349331, 349337, 349343, 349357, 349369, 349373, 349379, 349381, 349387, 349397, 349399, 349403, 349409, 349411, 349423, 349471, 349477, 349483, 349493, 349499, 349507, 349519, 349529, 349553, 349567, 349579, 349589, 349603, 349637, 349663, 349667, 349697, 349709, 349717, 349729, 349753, 349759, 349787, 349793, 349801, 349813, 349819, 349829, 349831, 349837, 349841, 349849, 349871, 349903, 349907, 349913, 349919, 349927, 349931, 349933, 349939, 349949, 349963, 349967, 349981, 350003, 350029, 350033, 350039, 350087, 350089, 350093, 350107, 350111, 350137, 350159, 350179, 350191, 350213, 350219, 350237, 350249, 350257, 350281, 350293, 350347, 350351, 350377, 350381, 350411, 350423, 350429, 350431, 350437, 350443, 350447, 350453, 350459, 350503, 350521, 350549, 350561, 350563, 350587, 350593, 350617, 350621, 350629, 350657, 350663, 350677, 350699, 350711, 350719, 350729, 350731, 350737, 350741, 350747, 350767, 350771, 350783, 350789, 350803, 350809, 350843, 350851, 350869, 350881, 350887, 350891, 350899, 350941, 350947, 350963, 350971, 350981, 350983, 350989, 351011, 351023, 351031, 351037, 351041, 351047, 351053, 351059, 351061, 351077, 351079, 351097, 351121, 351133, 351151, 351157, 351179, 351217, 351223, 351229, 351257, 351259, 351269, 351287, 351289, 351293, 351301, 351311, 351341, 351343, 351347, 351359, 351361, 351383, 351391, 351397, 351401, 351413, 351427, 351437, 351457, 351469, 351479, 351497, 351503, 351517, 351529, 351551, 351563, 351587, 351599, 351643, 351653, 351661, 351667, 351691, 351707, 351727, 351731, 351733, 351749, 351751, 351763, 351773, 351779, 351797, 351803, 351811, 351829, 351847, 351851, 351859, 351863, 351887, 351913, 351919, 351929, 351931, 351959, 351971, 351991, 352007, 352021, 352043, 352049, 352057, 352069, 352073, 352081, 352097, 352109, 352111, 352123, 352133, 352181, 352193, 352201, 352217, 352229, 352237, 352249, 352267, 352271, 352273, 352301, 352309, 352327, 352333, 352349, 352357, 352361, 352367, 352369, 352381, 352399, 352403, 352409, 352411, 352421, 352423, 352441, 352459, 352463, 352481, 352483, 352489, 352493, 352511, 352523, 352543, 352549, 352579, 352589, 352601, 352607, 352619, 352633, 352637, 352661, 352691, 352711, 352739, 352741, 352753, 352757, 352771, 352813, 352817, 352819, 352831, 352837, 352841, 352853, 352867, 352883, 352907, 352909, 352931, 352939, 352949, 352951, 352973, 352991, 353011, 353021, 353047, 353053, 353057, 353069, 353081, 353099, 353117, 353123, 353137, 353147, 353149, 353161, 353173, 353179, 353201, 353203, 353237, 353263, 353293, 353317, 353321, 353329, 353333, 353341, 353359, 353389, 353401, 353411, 353429, 353443, 353453, 353459, 353471, 353473, 353489, 353501, 353527, 353531, 353557, 353567, 353603, 353611, 353621, 353627, 353629, 353641, 353653, 353657, 353677, 353681, 353687, 353699, 353711, 353737, 353747, 353767, 353777, 353783, 353797, 353807, 353813, 353819, 353833, 353867, 353869, 353879, 353891, 353897, 353911, 353917, 353921, 353929, 353939, 353963, 354001, 354007, 354017, 354023, 354031, 354037, 354041, 354043, 354047, 354073, 354091, 354097, 354121, 354139, 354143, 354149, 354163, 354169, 354181, 354209, 354247, 354251, 354253, 354257, 354259, 354271, 354301, 354307, 354313, 354317, 354323, 354329, 354337, 354353, 354371, 354373, 354377, 354383, 354391, 354401, 354421, 354439, 354443, 354451, 354461, 354463, 354469, 354479, 354533, 354539, 354551, 354553, 354581, 354587, 354619, 354643, 354647, 354661, 354667, 354677, 354689, 354701, 354703, 354727, 354737, 354743, 354751, 354763, 354779, 354791, 354799, 354829, 354833, 354839, 354847, 354869, 354877, 354881, 354883, 354911, 354953, 354961, 354971, 354973, 354979, 354983, 354997, 355007, 355009, 355027, 355031, 355037, 355039, 355049, 355057, 355063, 355073, 355087, 355093, 355099, 355109, 355111, 355127, 355139, 355171, 355193, 355211, 355261, 355297, 355307, 355321, 355331, 355339, 355343, 355361, 355363, 355379, 355417, 355427, 355441, 355457, 355463, 355483, 355499, 355501, 355507, 355513, 355517, 355519, 355529, 355541, 355549, 355559, 355571, 355573, 355591, 355609, 355633, 355643, 355651, 355669, 355679, 355697, 355717, 355721, 355723, 355753, 355763, 355777, 355783, 355799, 355811, 355819, 355841, 355847, 355853, 355867, 355891, 355909, 355913, 355933, 355937, 355939, 355951, 355967, 355969, 356023, 356039, 356077, 356093, 356101, 356113, 356123, 356129, 356137, 356141, 356143, 356171, 356173, 356197, 356219, 356243, 356261, 356263, 356287, 356299, 356311, 356327, 356333, 356351, 356387, 356399, 356441, 356443, 356449, 356453, 356467, 356479, 356501, 356509, 356533, 356549, 356561, 356563, 356567, 356579, 356591, 356621, 356647, 356663, 356693, 356701, 356731, 356737, 356749, 356761, 356803, 356819, 356821, 356831, 356869, 356887, 356893, 356927, 356929, 356933, 356947, 356959, 356969, 356977, 356981, 356989, 356999, 357031, 357047, 357073, 357079, 357083, 357103, 357107, 357109, 357131, 357139, 357169, 357179, 357197, 357199, 357211, 357229, 357239, 357241, 357263, 357271, 357281, 357283, 357293, 357319, 357347, 357349, 357353, 357359, 357377, 357389, 357421, 357431, 357437, 357473, 357503, 357509, 357517, 357551, 357559, 357563, 357569, 357571, 357583, 357587, 357593, 357611, 357613, 357619, 357649, 357653, 357659, 357661, 357667, 357671, 357677, 357683, 357689, 357703, 357727, 357733, 357737, 357739, 357767, 357779, 357781, 357787, 357793, 357809, 357817, 357823, 357829, 357839, 357859, 357883, 357913, 357967, 357977, 357983, 357989, 357997, 358031, 358051, 358069, 358073, 358079, 358103, 358109, 358153, 358157, 358159, 358181, 358201, 358213, 358219, 358223, 358229, 358243, 358273, 358277, 358279, 358289, 358291, 358297, 358301, 358313, 358327, 358331, 358349, 358373, 358417, 358427, 358429, 358441, 358447, 358459, 358471, 358483, 358487, 358499, 358531, 358541, 358571, 358573, 358591, 358597, 358601, 358607, 358613, 358637, 358667, 358669, 358681, 358691, 358697, 358703, 358711, 358723, 358727, 358733, 358747, 358753, 358769, 358783, 358793, 358811, 358829, 358847, 358859, 358861, 358867, 358877, 358879, 358901, 358903, 358907, 358909, 358931, 358951, 358973, 358979, 358987, 358993, 358999, 359003, 359017, 359027, 359041, 359063, 359069, 359101, 359111, 359129, 359137, 359143, 359147, 359153, 359167, 359171, 359207, 359209, 359231, 359243, 359263, 359267, 359279, 359291, 359297, 359299, 359311, 359323, 359327, 359353, 359357, 359377, 359389, 359407, 359417, 359419, 359441, 359449, 359477, 359479, 359483, 359501, 359509, 359539, 359549, 359561, 359563, 359581, 359587, 359599, 359621, 359633, 359641, 359657, 359663, 359701, 359713, 359719, 359731, 359747, 359753, 359761, 359767, 359783, 359837, 359851, 359869, 359897, 359911, 359929, 359981, 359987, 360007, 360023, 360037, 360049, 360053, 360071, 360089, 360091, 360163, 360167, 360169, 360181, 360187, 360193, 360197, 360223, 360229, 360233, 360257, 360271, 360277, 360287, 360289, 360293, 360307, 360317, 360323, 360337, 360391, 360407, 360421, 360439, 360457, 360461, 360497, 360509, 360511, 360541, 360551, 360589, 360593, 360611, 360637, 360649, 360653, 360749, 360769, 360779, 360781, 360803, 360817, 360821, 360823, 360827, 360851, 360853, 360863, 360869, 360901, 360907, 360947, 360949, 360953, 360959, 360973, 360977, 360979, 360989, 361001, 361003, 361013, 361033, 361069, 361091, 361093, 361111, 361159, 361183, 361211, 361213, 361217, 361219, 361223, 361237, 361241, 361271, 361279, 361313, 361321, 361327, 361337, 361349, 361351, 361357, 361363, 361373, 361409, 361411, 361421, 361433, 361441, 361447, 361451, 361463, 361469, 361481, 361499, 361507, 361511, 361523, 361531, 361541, 361549, 361561, 361577, 361637, 361643, 361649, 361651, 361663, 361679, 361687, 361723, 361727, 361747, 361763, 361769, 361787, 361789, 361793, 361799, 361807, 361843, 361871, 361873, 361877, 361901, 361903, 361909, 361919, 361927, 361943, 361961, 361967, 361973, 361979, 361993, 362003, 362027, 362051, 362053, 362059, 362069, 362081, 362093, 362099, 362107, 362137, 362143, 362147, 362161, 362177, 362191, 362203, 362213, 362221, 362233, 362237, 362281, 362291, 362293, 362303, 362309, 362333, 362339, 362347, 362353, 362357, 362363, 362371, 362377, 362381, 362393, 362407, 362419, 362429, 362431, 362443, 362449, 362459, 362473, 362521, 362561, 362569, 362581, 362599, 362629, 362633, 362657, 362693, 362707, 362717, 362723, 362741, 362743, 362749, 362753, 362759, 362801, 362851, 362863, 362867, 362897, 362903, 362911, 362927, 362941, 362951, 362953, 362969, 362977, 362983, 362987, 363017, 363019, 363037, 363043, 363047, 363059, 363061, 363067, 363119, 363149, 363151, 363157, 363161, 363173, 363179, 363199, 363211, 363217, 363257, 363269, 363271, 363277, 363313, 363317, 363329, 363343, 363359, 363361, 363367, 363371, 363373, 363379, 363397, 363401, 363403, 363431, 363437, 363439, 363463, 363481, 363491, 363497, 363523, 363529, 363533, 363541, 363551, 363557, 363563, 363569, 363577, 363581, 363589, 363611, 363619, 363659, 363677, 363683, 363691, 363719, 363731, 363751, 363757, 363761, 363767, 363773, 363799, 363809, 363829, 363833, 363841, 363871, 363887, 363889, 363901, 363911, 363917, 363941, 363947, 363949, 363959, 363967, 363977, 363989, 364027, 364031, 364069, 364073, 364079, 364103, 364127, 364129, 364141, 364171, 364183, 364187, 364193, 364213, 364223, 364241, 364267, 364271, 364289, 364291, 364303, 364313, 364321, 364333, 364337, 364349, 364373, 364379, 364393, 364411, 364417, 364423, 364433, 364447, 364451, 364459, 364471, 364499, 364513, 364523, 364537, 364541, 364543, 364571, 364583, 364601, 364607, 364621, 364627, 364643, 364657, 364669, 364687, 364691, 364699, 364717, 364739, 364747, 364751, 364753, 364759, 364801, 364829, 364853, 364873, 364879, 364883, 364891, 364909, 364919, 364921, 364937, 364943, 364961, 364979, 364993, 364997, 365003, 365017, 365021, 365039, 365063, 365069, 365089, 365107, 365119, 365129, 365137, 365147, 365159, 365173, 365179, 365201, 365213, 365231, 365249, 365251, 365257, 365291, 365293, 365297, 365303, 365327, 365333, 365357, 365369, 365377, 365411, 365413, 365419, 365423, 365441, 365461, 365467, 365471, 365473, 365479, 365489, 365507, 365509, 365513, 365527, 365531, 365537, 365557, 365567, 365569, 365587, 365591, 365611, 365627, 365639, 365641, 365669, 365683, 365689, 365699, 365747, 365749, 365759, 365773, 365779, 365791, 365797, 365809, 365837, 365839, 365851, 365903, 365929, 365933, 365941, 365969, 365983, 366001, 366013, 366019, 366029, 366031, 366053, 366077, 366097, 366103, 366127, 366133, 366139, 366161, 366167, 366169, 366173, 366181, 366193, 366199, 366211, 366217, 366221, 366227, 366239, 366259, 366269, 366277, 366287, 366293, 366307, 366313, 366329, 366341, 366343, 366347, 366383, 366397, 366409, 366419, 366433, 366437, 366439, 366461, 366463, 366467, 366479, 366497, 366511, 366517, 366521, 366547, 366593, 366599, 366607, 366631, 366677, 366683, 366697, 366701, 366703, 366713, 366721, 366727, 366733, 366787, 366791, 366811, 366829, 366841, 366851, 366853, 366859, 366869, 366881, 366889, 366901, 366907, 366917, 366923, 366941, 366953, 366967, 366973, 366983, 366997, 367001, 367007, 367019, 367021, 367027, 367033, 367049, 367069, 367097, 367121, 367123, 367127, 367139, 367163, 367181, 367189, 367201, 367207, 367219, 367229, 367231, 367243, 367259, 367261, 367273, 367277, 367307, 367309, 367313, 367321, 367357, 367369, 367391, 367397, 367427, 367453, 367457, 367469, 367501, 367519, 367531, 367541, 367547, 367559, 367561, 367573, 367597, 367603, 367613, 367621, 367637, 367649, 367651, 367663, 367673, 367687, 367699, 367711, 367721, 367733, 367739, 367751, 367771, 367777, 367781, 367789, 367819, 367823, 367831, 367841, 367849, 367853, 367867, 367879, 367883, 367889, 367909, 367949, 367957, 368021, 368029, 368047, 368059, 368077, 368083, 368089, 368099, 368107, 368111, 368117, 368129, 368141, 368149, 368153, 368171, 368189, 368197, 368227, 368231, 368233, 368243, 368273, 368279, 368287, 368293, 368323, 368327, 368359, 368363, 368369, 368399, 368411, 368443, 368447, 368453, 368471, 368491, 368507, 368513, 368521, 368531, 368539, 368551, 368579, 368593, 368597, 368609, 368633, 368647, 368651, 368653, 368689, 368717, 368729, 368737, 368743, 368773, 368783, 368789, 368791, 368801, 368803, 368833, 368857, 368873, 368881, 368899, 368911, 368939, 368947, 368957, 369007, 369013, 369023, 369029, 369067, 369071, 369077, 369079, 369097, 369119, 369133, 369137, 369143, 369169, 369181, 369191, 369197, 369211, 369247, 369253, 369263, 369269, 369283, 369293, 369301, 369319, 369331, 369353, 369361, 369407, 369409, 369419, 369469, 369487, 369491, 369539, 369553, 369557, 369581, 369637, 369647, 369659, 369661, 369673, 369703, 369709, 369731, 369739, 369751, 369791, 369793, 369821, 369827, 369829, 369833, 369841, 369851, 369877, 369893, 369913, 369917, 369947, 369959, 369961, 369979, 369983, 369991, 369997, 370003, 370009, 370021, 370033, 370057, 370061, 370067, 370081, 370091, 370103, 370121, 370133, 370147, 370159, 370169, 370193, 370199, 370207, 370213, 370217, 370241, 370247, 370261, 370373, 370387, 370399, 370411, 370421, 370423, 370427, 370439, 370441, 370451, 370463, 370471, 370477, 370483, 370493, 370511, 370529, 370537, 370547, 370561, 370571, 370597, 370603, 370609, 370613, 370619, 370631, 370661, 370663, 370673, 370679, 370687, 370693, 370723, 370759, 370793, 370801, 370813, 370837, 370871, 370873, 370879, 370883, 370891, 370897, 370919, 370949, 371027, 371029, 371057, 371069, 371071, 371083, 371087, 371099, 371131, 371141, 371143, 371153, 371177, 371179, 371191, 371213, 371227, 371233, 371237, 371249, 371251, 371257, 371281, 371291, 371299, 371303, 371311, 371321, 371333, 371339, 371341, 371353, 371359, 371383, 371387, 371389, 371417, 371447, 371453, 371471, 371479, 371491, 371509, 371513, 371549, 371561, 371573, 371587, 371617, 371627, 371633, 371639, 371663, 371669, 371699, 371719, 371737, 371779, 371797, 371831, 371837, 371843, 371851, 371857, 371869, 371873, 371897, 371927, 371929, 371939, 371941, 371951, 371957, 371971, 371981, 371999, 372013, 372023, 372037, 372049, 372059, 372061, 372067, 372107, 372121, 372131, 372137, 372149, 372167, 372173, 372179, 372223, 372241, 372263, 372269, 372271, 372277, 372289, 372293, 372299, 372311, 372313, 372353, 372367, 372371, 372377, 372397, 372401, 372409, 372413, 372443, 372451, 372461, 372473, 372481, 372497, 372511, 372523, 372539, 372607, 372611, 372613, 372629, 372637, 372653, 372661, 372667, 372677, 372689, 372707, 372709, 372719, 372733, 372739, 372751, 372763, 372769, 372773, 372797, 372803, 372809, 372817, 372829, 372833, 372839, 372847, 372859, 372871, 372877, 372881, 372901, 372917, 372941, 372943, 372971, 372973, 372979, 373003, 373007, 373019, 373049, 373063, 373073, 373091, 373127, 373151, 373157, 373171, 373181, 373183, 373187, 373193, 373199, 373207, 373211, 373213, 373229, 373231, 373273, 373291, 373297, 373301, 373327, 373339, 373343, 373349, 373357, 373361, 373363, 373379, 373393, 373447, 373453, 373459, 373463, 373487, 373489, 373501, 373517, 373553, 373561, 373567, 373613, 373621, 373631, 373649, 373657, 373661, 373669, 373693, 373717, 373721, 373753, 373757, 373777, 373783, 373823, 373837, 373859, 373861, 373903, 373909, 373937, 373943, 373951, 373963, 373969, 373981, 373987, 373999, 374009, 374029, 374039, 374041, 374047, 374063, 374069, 374083, 374089, 374093, 374111, 374117, 374123, 374137, 374149, 374159, 374173, 374177, 374189, 374203, 374219, 374239, 374287, 374291, 374293, 374299, 374317, 374321, 374333, 374347, 374351, 374359, 374389, 374399, 374441, 374443, 374447, 374461, 374483, 374501, 374531, 374537, 374557, 374587, 374603, 374639, 374641, 374653, 374669, 374677, 374681, 374683, 374687, 374701, 374713, 374719, 374729, 374741, 374753, 374761, 374771, 374783, 374789, 374797, 374807, 374819, 374837, 374839, 374849, 374879, 374887, 374893, 374903, 374909, 374929, 374939, 374953, 374977, 374981, 374987, 374989, 374993, 375017, 375019, 375029, 375043, 375049, 375059, 375083, 375091, 375097, 375101, 375103, 375113, 375119, 375121, 375127, 375149, 375157, 375163, 375169, 375203, 375209, 375223, 375227, 375233, 375247, 375251, 375253, 375257, 375259, 375281, 375283, 375311, 375341, 375359, 375367, 375371, 375373, 375391, 375407, 375413, 375443, 375449, 375451, 375457, 375467, 375481, 375509, 375511, 375523, 375527, 375533, 375553, 375559, 375563, 375569, 375593, 375607, 375623, 375631, 375643, 375647, 375667, 375673, 375703, 375707, 375709, 375743, 375757, 375761, 375773, 375779, 375787, 375799, 375833, 375841, 375857, 375899, 375901, 375923, 375931, 375967, 375971, 375979, 375983, 375997, 376001, 376003, 376009, 376021, 376039, 376049, 376063, 376081, 376097, 376099, 376127, 376133, 376147, 376153, 376171, 376183, 376199, 376231, 376237, 376241, 376283, 376291, 376297, 376307, 376351, 376373, 376393, 376399, 376417, 376463, 376469, 376471, 376477, 376483, 376501, 376511, 376529, 376531, 376547, 376573, 376577, 376583, 376589, 376603, 376609, 376627, 376631, 376633, 376639, 376657, 376679, 376687, 376699, 376709, 376721, 376729, 376757, 376759, 376769, 376787, 376793, 376801, 376807, 376811, 376819, 376823, 376837, 376841, 376847, 376853, 376889, 376891, 376897, 376921, 376927, 376931, 376933, 376949, 376963, 376969, 377011, 377021, 377051, 377059, 377071, 377099, 377123, 377129, 377137, 377147, 377171, 377173, 377183, 377197, 377219, 377231, 377257, 377263, 377287, 377291, 377297, 377327, 377329, 377339, 377347, 377353, 377369, 377371, 377387, 377393, 377459, 377471, 377477, 377491, 377513, 377521, 377527, 377537, 377543, 377557, 377561, 377563, 377581, 377593, 377599, 377617, 377623, 377633, 377653, 377681, 377687, 377711, 377717, 377737, 377749, 377761, 377771, 377779, 377789, 377801, 377809, 377827, 377831, 377843, 377851, 377873, 377887, 377911, 377963, 377981, 377999, 378011, 378019, 378023, 378041, 378071, 378083, 378089, 378101, 378127, 378137, 378149, 378151, 378163, 378167, 378179, 378193, 378223, 378229, 378239, 378241, 378253, 378269, 378277, 378283, 378289, 378317, 378353, 378361, 378379, 378401, 378407, 378439, 378449, 378463, 378467, 378493, 378503, 378509, 378523, 378533, 378551, 378559, 378569, 378571, 378583, 378593, 378601, 378619, 378629, 378661, 378667, 378671, 378683, 378691, 378713, 378733, 378739, 378757, 378761, 378779, 378793, 378809, 378817, 378821, 378823, 378869, 378883, 378893, 378901, 378919, 378929, 378941, 378949, 378953, 378967, 378977, 378997, 379007, 379009, 379013, 379033, 379039, 379073, 379081, 379087, 379097, 379103, 379123, 379133, 379147, 379157, 379163, 379177, 379187, 379189, 379199, 379207, 379273, 379277, 379283, 379289, 379307, 379319, 379333, 379343, 379369, 379387, 379391, 379397, 379399, 379417, 379433, 379439, 379441, 379451, 379459, 379499, 379501, 379513, 379531, 379541, 379549, 379571, 379573, 379579, 379597, 379607, 379633, 379649, 379663, 379667, 379679, 379681, 379693, 379699, 379703, 379721, 379723, 379727, 379751, 379777, 379787, 379811, 379817, 379837, 379849, 379853, 379859, 379877, 379889, 379903, 379909, 379913, 379927, 379931, 379963, 379979, 379993, 379997, 379999, 380041, 380047, 380059, 380071, 380117, 380129, 380131, 380141, 380147, 380179, 380189, 380197, 380201, 380203, 380207, 380231, 380251, 380267, 380269, 380287, 380291, 380299, 380309, 380311, 380327, 380329, 380333, 380363, 380377, 380383, 380417, 380423, 380441, 380447, 380453, 380459, 380461, 380483, 380503, 380533, 380557, 380563, 380591, 380621, 380623, 380629, 380641, 380651, 380657, 380707, 380713, 380729, 380753, 380777, 380797, 380803, 380819, 380837, 380839, 380843, 380867, 380869, 380879, 380881, 380909, 380917, 380929, 380951, 380957, 380971, 380977, 380983, 381001, 381011, 381019, 381037, 381047, 381061, 381071, 381077, 381097, 381103, 381167, 381169, 381181, 381209, 381221, 381223, 381233, 381239, 381253, 381287, 381289, 381301, 381319, 381323, 381343, 381347, 381371, 381373, 381377, 381383, 381389, 381401, 381413, 381419, 381439, 381443, 381461, 381467, 381481, 381487, 381509, 381523, 381527, 381529, 381533, 381541, 381559, 381569, 381607, 381629, 381631, 381637, 381659, 381673, 381697, 381707, 381713, 381737, 381739, 381749, 381757, 381761, 381791, 381793, 381817, 381841, 381853, 381859, 381911, 381917, 381937, 381943, 381949, 381977, 381989, 381991, 382001, 382003, 382021, 382037, 382061, 382069, 382073, 382087, 382103, 382117, 382163, 382171, 382189, 382229, 382231, 382241, 382253, 382267, 382271, 382303, 382331, 382351, 382357, 382363, 382373, 382391, 382427, 382429, 382457, 382463, 382493, 382507, 382511, 382519, 382541, 382549, 382553, 382567, 382579, 382583, 382589, 382601, 382621, 382631, 382643, 382649, 382661, 382663, 382693, 382703, 382709, 382727, 382729, 382747, 382751, 382763, 382769, 382777, 382801, 382807, 382813, 382843, 382847, 382861, 382867, 382871, 382873, 382883, 382919, 382933, 382939, 382961, 382979, 382999, 383011, 383023, 383029, 383041, 383051, 383069, 383077, 383081, 383083, 383099, 383101, 383107, 383113, 383143, 383147, 383153, 383171, 383179, 383219, 383221, 383261, 383267, 383281, 383291, 383297, 383303, 383321, 383347, 383371, 383393, 383399, 383417, 383419, 383429, 383459, 383483, 383489, 383519, 383521, 383527, 383533, 383549, 383557, 383573, 383587, 383609, 383611, 383623, 383627, 383633, 383651, 383657, 383659, 383681, 383683, 383693, 383723, 383729, 383753, 383759, 383767, 383777, 383791, 383797, 383807, 383813, 383821, 383833, 383837, 383839, 383869, 383891, 383909, 383917, 383923, 383941, 383951, 383963, 383969, 383983, 383987, 384001, 384017, 384029, 384049, 384061, 384067, 384079, 384089, 384107, 384113, 384133, 384143, 384151, 384157, 384173, 384187, 384193, 384203, 384227, 384247, 384253, 384257, 384259, 384277, 384287, 384289, 384299, 384301, 384317, 384331, 384343, 384359, 384367, 384383, 384403, 384407, 384437, 384469, 384473, 384479, 384481, 384487, 384497, 384509, 384533, 384547, 384577, 384581, 384589, 384599, 384611, 384619, 384623, 384641, 384673, 384691, 384697, 384701, 384719, 384733, 384737, 384751, 384757, 384773, 384779, 384817, 384821, 384827, 384841, 384847, 384851, 384889, 384907, 384913, 384919, 384941, 384961, 384973, 385001, 385013, 385027, 385039, 385057, 385069, 385079, 385081, 385087, 385109, 385127, 385129, 385139, 385141, 385153, 385159, 385171, 385193, 385199, 385223, 385249, 385261, 385267, 385279, 385289, 385291, 385321, 385327, 385331, 385351, 385379, 385391, 385393, 385397, 385403, 385417, 385433, 385471, 385481, 385493, 385501, 385519, 385531, 385537, 385559, 385571, 385573, 385579, 385589, 385591, 385597, 385607, 385621, 385631, 385639, 385657, 385661, 385663, 385709, 385739, 385741, 385771, 385783, 385793, 385811, 385817, 385831, 385837, 385843, 385859, 385877, 385897, 385901, 385907, 385927, 385939, 385943, 385967, 385991, 385997, 386017, 386039, 386041, 386047, 386051, 386083, 386093, 386117, 386119, 386129, 386131, 386143, 386149, 386153, 386159, 386161, 386173, 386219, 386227, 386233, 386237, 386249, 386263, 386279, 386297, 386299, 386303, 386329, 386333, 386339, 386363, 386369, 386371, 386381, 386383, 386401, 386411, 386413, 386429, 386431, 386437, 386471, 386489, 386501, 386521, 386537, 386543, 386549, 386569, 386587, 386609, 386611, 386621, 386629, 386641, 386647, 386651, 386677, 386689, 386693, 386713, 386719, 386723, 386731, 386747, 386777, 386809, 386839, 386851, 386887, 386891, 386921, 386927, 386963, 386977, 386987, 386989, 386993, 387007, 387017, 387031, 387047, 387071, 387077, 387083, 387089, 387109, 387137, 387151, 387161, 387169, 387173, 387187, 387197, 387199, 387203, 387227, 387253, 387263, 387269, 387281, 387307, 387313, 387329, 387341, 387371, 387397, 387403, 387433, 387437, 387449, 387463, 387493, 387503, 387509, 387529, 387551, 387577, 387587, 387613, 387623, 387631, 387641, 387659, 387677, 387679, 387683, 387707, 387721, 387727, 387743, 387749, 387763, 387781, 387791, 387799, 387839, 387853, 387857, 387911, 387913, 387917, 387953, 387967, 387971, 387973, 387977, 388009, 388051, 388057, 388067, 388081, 388099, 388109, 388111, 388117, 388133, 388159, 388163, 388169, 388177, 388181, 388183, 388187, 388211, 388231, 388237, 388253, 388259, 388273, 388277, 388301, 388313, 388319, 388351, 388363, 388369, 388373, 388391, 388403, 388459, 388471, 388477, 388481, 388483, 388489, 388499, 388519, 388529, 388541, 388567, 388573, 388621, 388651, 388657, 388673, 388691, 388693, 388697, 388699, 388711, 388727, 388757, 388777, 388781, 388789, 388793, 388813, 388823, 388837, 388859, 388879, 388891, 388897, 388901, 388903, 388931, 388933, 388937, 388961, 388963, 388991, 389003, 389023, 389027, 389029, 389041, 389047, 389057, 389083, 389089, 389099, 389111, 389117, 389141, 389149, 389161, 389167, 389171, 389173, 389189, 389219, 389227, 389231, 389269, 389273, 389287, 389297, 389299, 389303, 389357, 389369, 389381, 389399, 389401, 389437, 389447, 389461, 389479, 389483, 389507, 389513, 389527, 389531, 389533, 389539, 389561, 389563, 389567, 389569, 389579, 389591, 389621, 389629, 389651, 389659, 389663, 389687, 389699, 389713, 389723, 389743, 389749, 389761, 389773, 389783, 389791, 389797, 389819, 389839, 389849, 389867, 389891, 389897, 389903, 389911, 389923, 389927, 389941, 389947, 389953, 389957, 389971, 389981, 389989, 389999, 390001, 390043, 390067, 390077, 390083, 390097, 390101, 390107, 390109, 390113, 390119, 390151, 390157, 390161, 390191, 390193, 390199, 390209, 390211, 390223, 390263, 390281, 390289, 390307, 390323, 390343, 390347, 390353, 390359, 390367, 390373, 390389, 390391, 390407, 390413, 390419, 390421, 390433, 390437, 390449, 390463, 390479, 390487, 390491, 390493, 390499, 390503, 390527, 390539, 390553, 390581, 390647, 390653, 390671, 390673, 390703, 390707, 390721, 390727, 390737, 390739, 390743, 390751, 390763, 390781, 390791, 390809, 390821, 390829, 390851, 390869, 390877, 390883, 390889, 390893, 390953, 390959, 390961, 390967, 390989, 390991, 391009, 391019, 391021, 391031, 391049, 391057, 391063, 391067, 391073, 391103, 391117, 391133, 391151, 391159, 391163, 391177, 391199, 391217, 391219, 391231, 391247, 391249, 391273, 391283, 391291, 391301, 391331, 391337, 391351, 391367, 391373, 391379, 391387, 391393, 391397, 391399, 391403, 391441, 391451, 391453, 391487, 391519, 391537, 391553, 391579, 391613, 391619, 391627, 391631, 391639, 391661, 391679, 391691, 391693, 391711, 391717, 391733, 391739, 391751, 391753, 391757, 391789, 391801, 391817, 391823, 391847, 391861, 391873, 391879, 391889, 391891, 391903, 391907, 391921, 391939, 391961, 391967, 391987, 391999, 392011, 392033, 392053, 392059, 392069, 392087, 392099, 392101, 392111, 392113, 392131, 392143, 392149, 392153, 392159, 392177, 392201, 392209, 392213, 392221, 392233, 392239, 392251, 392261, 392263, 392267, 392269, 392279, 392281, 392297, 392299, 392321, 392333, 392339, 392347, 392351, 392363, 392383, 392389, 392423, 392437, 392443, 392467, 392473, 392477, 392489, 392503, 392519, 392531, 392543, 392549, 392569, 392593, 392599, 392611, 392629, 392647, 392663, 392669, 392699, 392723, 392737, 392741, 392759, 392761, 392767, 392803, 392807, 392809, 392827, 392831, 392837, 392849, 392851, 392857, 392879, 392893, 392911, 392923, 392927, 392929, 392957, 392963, 392969, 392981, 392983, 393007, 393013, 393017, 393031, 393059, 393073, 393077, 393079, 393083, 393097, 393103, 393109, 393121, 393137, 393143, 393157, 393161, 393181, 393187, 393191, 393203, 393209, 393241, 393247, 393257, 393271, 393287, 393299, 393301, 393311, 393331, 393361, 393373, 393377, 393383, 393401, 393403, 393413, 393451, 393473, 393479, 393487, 393517, 393521, 393539, 393541, 393551, 393557, 393571, 393577, 393581, 393583, 393587, 393593, 393611, 393629, 393637, 393649, 393667, 393671, 393677, 393683, 393697, 393709, 393713, 393721, 393727, 393739, 393749, 393761, 393779, 393797, 393847, 393853, 393857, 393859, 393863, 393871, 393901, 393919, 393929, 393931, 393947, 393961, 393977, 393989, 393997, 394007, 394019, 394039, 394049, 394063, 394073, 394099, 394123, 394129, 394153, 394157, 394169, 394187, 394201, 394211, 394223, 394241, 394249, 394259, 394271, 394291, 394319, 394327, 394357, 394363, 394367, 394369, 394393, 394409, 394411, 394453, 394481, 394489, 394501, 394507, 394523, 394529, 394549, 394571, 394577, 394579, 394601, 394619, 394631, 394633, 394637, 394643, 394673, 394699, 394717, 394721, 394727, 394729, 394733, 394739, 394747, 394759, 394787, 394811, 394813, 394817, 394819, 394829, 394837, 394861, 394879, 394897, 394931, 394943, 394963, 394967, 394969, 394981, 394987, 394993, 395023, 395027, 395039, 395047, 395069, 395089, 395093, 395107, 395111, 395113, 395119, 395137, 395141, 395147, 395159, 395173, 395189, 395191, 395201, 395231, 395243, 395251, 395261, 395273, 395287, 395293, 395303, 395309, 395321, 395323, 395377, 395383, 395407, 395429, 395431, 395443, 395449, 395453, 395459, 395491, 395509, 395513, 395533, 395537, 395543, 395581, 395597, 395611, 395621, 395627, 395657, 395671, 395677, 395687, 395701, 395719, 395737, 395741, 395749, 395767, 395803, 395849, 395851, 395873, 395887, 395891, 395897, 395909, 395921, 395953, 395959, 395971, 396001, 396029, 396031, 396041, 396043, 396061, 396079, 396091, 396103, 396107, 396119, 396157, 396173, 396181, 396197, 396199, 396203, 396217, 396239, 396247, 396259, 396269, 396293, 396299, 396301, 396311, 396323, 396349, 396353, 396373, 396377, 396379, 396413, 396427, 396437, 396443, 396449, 396479, 396509, 396523, 396527, 396533, 396541, 396547, 396563, 396577, 396581, 396601, 396619, 396623, 396629, 396631, 396637, 396647, 396667, 396679, 396703, 396709, 396713, 396719, 396733, 396833, 396871, 396881, 396883, 396887, 396919, 396931, 396937, 396943, 396947, 396953, 396971, 396983, 396997, 397013, 397027, 397037, 397051, 397057, 397063, 397073, 397093, 397099, 397127, 397151, 397153, 397181, 397183, 397211, 397217, 397223, 397237, 397253, 397259, 397283, 397289, 397297, 397301, 397303, 397337, 397351, 397357, 397361, 397373, 397379, 397427, 397429, 397433, 397459, 397469, 397489, 397493, 397517, 397519, 397541, 397543, 397547, 397549, 397567, 397589, 397591, 397597, 397633, 397643, 397673, 397687, 397697, 397721, 397723, 397729, 397751, 397753, 397757, 397759, 397763, 397799, 397807, 397811, 397829, 397849, 397867, 397897, 397907, 397921, 397939, 397951, 397963, 397973, 397981, 398011, 398023, 398029, 398033, 398039, 398053, 398059, 398063, 398077, 398087, 398113, 398117, 398119, 398129, 398143, 398149, 398171, 398207, 398213, 398219, 398227, 398249, 398261, 398267, 398273, 398287, 398303, 398311, 398323, 398339, 398341, 398347, 398353, 398357, 398369, 398393, 398407, 398417, 398423, 398441, 398459, 398467, 398471, 398473, 398477, 398491, 398509, 398539, 398543, 398549, 398557, 398569, 398581, 398591, 398609, 398611, 398621, 398627, 398669, 398681, 398683, 398693, 398711, 398729, 398731, 398759, 398771, 398813, 398819, 398821, 398833, 398857, 398863, 398887, 398903, 398917, 398921, 398933, 398941, 398969, 398977, 398989, 399023, 399031, 399043, 399059, 399067, 399071, 399079, 399097, 399101, 399107, 399131, 399137, 399149, 399151, 399163, 399173, 399181, 399197, 399221, 399227, 399239, 399241, 399263, 399271, 399277, 399281, 399283, 399353, 399379, 399389, 399391, 399401, 399403, 399409, 399433, 399439, 399473, 399481, 399491, 399493, 399499, 399523, 399527, 399541, 399557, 399571, 399577, 399583, 399587, 399601, 399613, 399617, 399643, 399647, 399667, 399677, 399689, 399691, 399719, 399727, 399731, 399739, 399757, 399761, 399769, 399781, 399787, 399793, 399851, 399853, 399871, 399887, 399899, 399911, 399913, 399937, 399941, 399953, 399979, 399983, 399989, 400009, 400031, 400033, 400051, 400067, 400069, 400087, 400093, 400109, 400123, 400151, 400157, 400187, 400199, 400207, 400217, 400237, 400243, 400247, 400249, 400261, 400277, 400291, 400297, 400307, 400313, 400321, 400331, 400339, 400381, 400391, 400409, 400417, 400429, 400441, 400457, 400471, 400481, 400523, 400559, 400579, 400597, 400601, 400607, 400619, 400643, 400651, 400657, 400679, 400681, 400703, 400711, 400721, 400723, 400739, 400753, 400759, 400823, 400837, 400849, 400853, 400859, 400871, 400903, 400927, 400931, 400943, 400949, 400963, 400997, 401017, 401029, 401039, 401053, 401057, 401069, 401077, 401087, 401101, 401113, 401119, 401161, 401173, 401179, 401201, 401209, 401231, 401237, 401243, 401279, 401287, 401309, 401311, 401321, 401329, 401341, 401347, 401371, 401381, 401393, 401407, 401411, 401417, 401473, 401477, 401507, 401519, 401537, 401539, 401551, 401567, 401587, 401593, 401627, 401629, 401651, 401669, 401671, 401689, 401707, 401711, 401743, 401771, 401773, 401809, 401813, 401827, 401839, 401861, 401867, 401887, 401903, 401909, 401917, 401939, 401953, 401957, 401959, 401981, 401987, 401993, 402023, 402029, 402037, 402043, 402049, 402053, 402071, 402089, 402091, 402107, 402131, 402133, 402137, 402139, 402197, 402221, 402223, 402239, 402253, 402263, 402277, 402299, 402307, 402313, 402329, 402331, 402341, 402343, 402359, 402361, 402371, 402379, 402383, 402403, 402419, 402443, 402487, 402503, 402511, 402517, 402527, 402529, 402541, 402551, 402559, 402581, 402583, 402587, 402593, 402601, 402613, 402631, 402691, 402697, 402739, 402751, 402757, 402761, 402763, 402767, 402769, 402797, 402803, 402817, 402823, 402847, 402851, 402859, 402863, 402869, 402881, 402923, 402943, 402947, 402949, 402991, 403001, 403003, 403037, 403043, 403049, 403057, 403061, 403063, 403079, 403097, 403103, 403133, 403141, 403159, 403163, 403181, 403219, 403241, 403243, 403253, 403261, 403267, 403289, 403301, 403309, 403327, 403331, 403339, 403363, 403369, 403387, 403391, 403433, 403439, 403483, 403499, 403511, 403537, 403547, 403549, 403553, 403567, 403577, 403591, 403603, 403607, 403621, 403649, 403661, 403679, 403681, 403687, 403703, 403717, 403721, 403729, 403757, 403783, 403787, 403817, 403829, 403831, 403849, 403861, 403867, 403877, 403889, 403901, 403933, 403951, 403957, 403969, 403979, 403981, 403993, 404009, 404011, 404017, 404021, 404029, 404051, 404081, 404099, 404113, 404119, 404123, 404161, 404167, 404177, 404189, 404191, 404197, 404213, 404221, 404249, 404251, 404267, 404269, 404273, 404291, 404309, 404321, 404323, 404357, 404381, 404387, 404389, 404399, 404419, 404423, 404429, 404431, 404449, 404461, 404483, 404489, 404497, 404507, 404513, 404527, 404531, 404533, 404539, 404557, 404597, 404671, 404693, 404699, 404713, 404773, 404779, 404783, 404819, 404827, 404837, 404843, 404849, 404851, 404941, 404951, 404959, 404969, 404977, 404981, 404983, 405001, 405011, 405029, 405037, 405047, 405049, 405071, 405073, 405089, 405091, 405143, 405157, 405179, 405199, 405211, 405221, 405227, 405239, 405241, 405247, 405253, 405269, 405277, 405287, 405299, 405323, 405341, 405343, 405347, 405373, 405401, 405407, 405413, 405437, 405439, 405473, 405487, 405491, 405497, 405499, 405521, 405527, 405529, 405541, 405553, 405577, 405599, 405607, 405611, 405641, 405659, 405667, 405677, 405679, 405683, 405689, 405701, 405703, 405709, 405719, 405731, 405749, 405763, 405767, 405781, 405799, 405817, 405827, 405829, 405857, 405863, 405869, 405871, 405893, 405901, 405917, 405947, 405949, 405959, 405967, 405989, 405991, 405997, 406013, 406027, 406037, 406067, 406073, 406093, 406117, 406123, 406169, 406171, 406177, 406183, 406207, 406247, 406253, 406267, 406271, 406309, 406313, 406327, 406331, 406339, 406349, 406361, 406381, 406397, 406403, 406423, 406447, 406481, 406499, 406501, 406507, 406513, 406517, 406531, 406547, 406559, 406561, 406573, 406577, 406579, 406583, 406591, 406631, 406633, 406649, 406661, 406673, 406697, 406699, 406717, 406729, 406739, 406789, 406807, 406811, 406817, 406837, 406859, 406873, 406883, 406907, 406951, 406969, 406981, 406993, 407023, 407047, 407059, 407083, 407119, 407137, 407149, 407153, 407177, 407179, 407191, 407203, 407207, 407219, 407221, 407233, 407249, 407257, 407263, 407273, 407287, 407291, 407299, 407311, 407317, 407321, 407347, 407357, 407359, 407369, 407377, 407383, 407401, 407437, 407471, 407483, 407489, 407501, 407503, 407509, 407521, 407527, 407567, 407573, 407579, 407587, 407599, 407621, 407633, 407639, 407651, 407657, 407669, 407699, 407707, 407713, 407717, 407723, 407741, 407747, 407783, 407789, 407791, 407801, 407807, 407821, 407833, 407843, 407857, 407861, 407879, 407893, 407899, 407917, 407923, 407947, 407959, 407969, 407971, 407977, 407993, 408011, 408019, 408041, 408049, 408071, 408077, 408091, 408127, 408131, 408137, 408169, 408173, 408197, 408203, 408209, 408211, 408217, 408223, 408229, 408241, 408251, 408263, 408271, 408283, 408311, 408337, 408341, 408347, 408361, 408379, 408389, 408403, 408413, 408427, 408431, 408433, 408437, 408461, 408469, 408479, 408491, 408497, 408533, 408539, 408553, 408563, 408607, 408623, 408631, 408637, 408643, 408659, 408677, 408689, 408691, 408701, 408703, 408713, 408719, 408743, 408763, 408769, 408773, 408787, 408803, 408809, 408817, 408841, 408857, 408869, 408911, 408913, 408923, 408943, 408953, 408959, 408971, 408979, 408997, 409007, 409021, 409027, 409033, 409043, 409063, 409069, 409081, 409099, 409121, 409153, 409163, 409177, 409187, 409217, 409237, 409259, 409261, 409267, 409271, 409289, 409291, 409327, 409333, 409337, 409349, 409351, 409369, 409379, 409391, 409397, 409429, 409433, 409441, 409463, 409471, 409477, 409483, 409499, 409517, 409523, 409529, 409543, 409573, 409579, 409589, 409597, 409609, 409639, 409657, 409691, 409693, 409709, 409711, 409723, 409729, 409733, 409753, 409769, 409777, 409781, 409813, 409817, 409823, 409831, 409841, 409861, 409867, 409879, 409889, 409891, 409897, 409901, 409909, 409933, 409943, 409951, 409961, 409967, 409987, 409993, 409999, 410009, 410029, 410063, 410087, 410093, 410117, 410119, 410141, 410143, 410149, 410171, 410173, 410203, 410231, 410233, 410239, 410243, 410257, 410279, 410281, 410299, 410317, 410323, 410339, 410341, 410353, 410359, 410383, 410387, 410393, 410401, 410411, 410413, 410453, 410461, 410477, 410489, 410491, 410497, 410507, 410513, 410519, 410551, 410561, 410587, 410617, 410621, 410623, 410629, 410651, 410659, 410671, 410687, 410701, 410717, 410731, 410741, 410747, 410749, 410759, 410783, 410789, 410801, 410807, 410819, 410833, 410857, 410899, 410903, 410929, 410953, 410983, 410999, 411001, 411007, 411011, 411013, 411031, 411041, 411049, 411067, 411071, 411083, 411101, 411113, 411119, 411127, 411143, 411157, 411167, 411193, 411197, 411211, 411233, 411241, 411251, 411253, 411259, 411287, 411311, 411337, 411347, 411361, 411371, 411379, 411409, 411421, 411443, 411449, 411469, 411473, 411479, 411491, 411503, 411527, 411529, 411557, 411563, 411569, 411577, 411583, 411589, 411611, 411613, 411617, 411637, 411641, 411667, 411679, 411683, 411703, 411707, 411709, 411721, 411727, 411737, 411739, 411743, 411751, 411779, 411799, 411809, 411821, 411823, 411833, 411841, 411883, 411919, 411923, 411937, 411941, 411947, 411967, 411991, 412001, 412007, 412019, 412031, 412033, 412037, 412039, 412051, 412067, 412073, 412081, 412099, 412109, 412123, 412127, 412133, 412147, 412157, 412171, 412187, 412189, 412193, 412201, 412211, 412213, 412219, 412249, 412253, 412273, 412277, 412289, 412303, 412333, 412339, 412343, 412387, 412397, 412411, 412457, 412463, 412481, 412487, 412493, 412537, 412561, 412567, 412571, 412589, 412591, 412603, 412609, 412619, 412627, 412637, 412639, 412651, 412663, 412667, 412717, 412739, 412771, 412793, 412807, 412831, 412849, 412859, 412891, 412901, 412903, 412939, 412943, 412949, 412967, 412987, 413009, 413027, 413033, 413053, 413069, 413071, 413081, 413087, 413089, 413093, 413111, 413113, 413129, 413141, 413143, 413159, 413167, 413183, 413197, 413201, 413207, 413233, 413243, 413251, 413263, 413267, 413293, 413299, 413353, 413411, 413417, 413429, 413443, 413461, 413477, 413521, 413527, 413533, 413537, 413551, 413557, 413579, 413587, 413597, 413629, 413653, 413681, 413683, 413689, 413711, 413713, 413719, 413737, 413753, 413759, 413779, 413783, 413807, 413827, 413849, 413863, 413867, 413869, 413879, 413887, 413911, 413923, 413951, 413981, 414013, 414017, 414019, 414031, 414049, 414053, 414061, 414077, 414083, 414097, 414101, 414107, 414109, 414131, 414157, 414179, 414199, 414203, 414209, 414217, 414221, 414241, 414259, 414269, 414277, 414283, 414311, 414313, 414329, 414331, 414347, 414361, 414367, 414383, 414389, 414397, 414413, 414431, 414433, 414451, 414457, 414461, 414467, 414487, 414503, 414521, 414539, 414553, 414559, 414571, 414577, 414607, 414611, 414629, 414641, 414643, 414653, 414677, 414679, 414683, 414691, 414697, 414703, 414707, 414709, 414721, 414731, 414737, 414763, 414767, 414769, 414773, 414779, 414793, 414803, 414809, 414833, 414857, 414871, 414889, 414893, 414899, 414913, 414923, 414929, 414949, 414959, 414971, 414977, 414991, 415013, 415031, 415039, 415061, 415069, 415073, 415087, 415097, 415109, 415111, 415133, 415141, 415147, 415153, 415159, 415171, 415187, 415189, 415201, 415213, 415231, 415253, 415271, 415273, 415319, 415343, 415379, 415381, 415391, 415409, 415427, 415447, 415469, 415477, 415489, 415507, 415517, 415523, 415543, 415553, 415559, 415567, 415577, 415603, 415607, 415609, 415627, 415631, 415643, 415651, 415661, 415669, 415673, 415687, 415691, 415697, 415717, 415721, 415729, 415759, 415783, 415787, 415799, 415801, 415819, 415823, 415861, 415873, 415879, 415901, 415931, 415937, 415949, 415951, 415957, 415963, 415969, 415979, 415993, 415999, 416011, 416023, 416071, 416077, 416089, 416107, 416147, 416149, 416153, 416159, 416167, 416201, 416219, 416239, 416243, 416249, 416257, 416263, 416281, 416291, 416333, 416359, 416387, 416389, 416393, 416399, 416401, 416407, 416413, 416417, 416419, 416441, 416443, 416459, 416473, 416477, 416491, 416497, 416501, 416503, 416513, 416531, 416543, 416573, 416579, 416593, 416621, 416623, 416629, 416659, 416677, 416693, 416719, 416761, 416797, 416821, 416833, 416839, 416849, 416851, 416873, 416881, 416887, 416947, 416957, 416963, 416989, 417007, 417017, 417019, 417023, 417037, 417089, 417097, 417113, 417119, 417127, 417133, 417161, 417169, 417173, 417181, 417187, 417191, 417203, 417217, 417227, 417239, 417251, 417271, 417283, 417293, 417311, 417317, 417331, 417337, 417371, 417377, 417379, 417383, 417419, 417437, 417451, 417457, 417479, 417491, 417493, 417509, 417511, 417523, 417541, 417553, 417559, 417577, 417581, 417583, 417617, 417623, 417631, 417643, 417649, 417671, 417691, 417719, 417721, 417727, 417731, 417733, 417737, 417751, 417763, 417773, 417793, 417811, 417821, 417839, 417863, 417869, 417881, 417883, 417899, 417931, 417941, 417947, 417953, 417959, 417961, 417983, 417997, 418007, 418009, 418027, 418031, 418043, 418051, 418069, 418073, 418079, 418087, 418109, 418129, 418157, 418169, 418177, 418181, 418189, 418199, 418207, 418219, 418259, 418273, 418279, 418289, 418303, 418321, 418331, 418337, 418339, 418343, 418349, 418351, 418357, 418373, 418381, 418391, 418423, 418427, 418447, 418459, 418471, 418493, 418511, 418553, 418559, 418597, 418601, 418603, 418631, 418633, 418637, 418657, 418667, 418699, 418709, 418721, 418739, 418751, 418763, 418771, 418783, 418787, 418793, 418799, 418811, 418813, 418819, 418837, 418843, 418849, 418861, 418867, 418871, 418883, 418889, 418909, 418921, 418927, 418933, 418939, 418961, 418981, 418987, 418993, 418997, 419047, 419051, 419053, 419057, 419059, 419087, 419141, 419147, 419161, 419171, 419183, 419189, 419191, 419201, 419231, 419249, 419261, 419281, 419291, 419297, 419303, 419317, 419329, 419351, 419383, 419401, 419417, 419423, 419429, 419443, 419449, 419459, 419467, 419473, 419477, 419483, 419491, 419513, 419527, 419537, 419557, 419561, 419563, 419567, 419579, 419591, 419597, 419599, 419603, 419609, 419623, 419651, 419687, 419693, 419701, 419711, 419743, 419753, 419777, 419789, 419791, 419801, 419803, 419821, 419827, 419831, 419873, 419893, 419921, 419927, 419929, 419933, 419953, 419959, 419999, 420001, 420029, 420037, 420041, 420047, 420073, 420097, 420103, 420149, 420163, 420191, 420193, 420221, 420241, 420253, 420263, 420269, 420271, 420293, 420307, 420313, 420317, 420319, 420323, 420331, 420341, 420349, 420353, 420361, 420367, 420383, 420397, 420419, 420421, 420439, 420457, 420467, 420479, 420481, 420499, 420503, 420521, 420551, 420557, 420569, 420571, 420593, 420599, 420613, 420671, 420677, 420683, 420691, 420731, 420737, 420743, 420757, 420769, 420779, 420781, 420799, 420803, 420809, 420811, 420851, 420853, 420857, 420859, 420899, 420919, 420929, 420941, 420967, 420977, 420997, 421009, 421019, 421033, 421037, 421049, 421079, 421081, 421093, 421103, 421121, 421123, 421133, 421147, 421159, 421163, 421177, 421181, 421189, 421207, 421241, 421273, 421279, 421303, 421313, 421331, 421339, 421349, 421361, 421381, 421397, 421409, 421417, 421423, 421433, 421453, 421459, 421469, 421471, 421483, 421493, 421501, 421517, 421559, 421607, 421609, 421621, 421633, 421639, 421643, 421657, 421661, 421691, 421697, 421699, 421703, 421709, 421711, 421717, 421727, 421739, 421741, 421783, 421801, 421807, 421831, 421847, 421891, 421907, 421913, 421943, 421973, 421987, 421997, 422029, 422041, 422057, 422063, 422069, 422077, 422083, 422087, 422089, 422099, 422101, 422111, 422113, 422129, 422137, 422141, 422183, 422203, 422209, 422231, 422239, 422243, 422249, 422267, 422287, 422291, 422309, 422311, 422321, 422339, 422353, 422363, 422369, 422377, 422393, 422407, 422431, 422453, 422459, 422479, 422537, 422549, 422551, 422557, 422563, 422567, 422573, 422581, 422621, 422627, 422657, 422689, 422701, 422707, 422711, 422749, 422753, 422759, 422761, 422789, 422797, 422803, 422827, 422857, 422861, 422867, 422869, 422879, 422881, 422893, 422897, 422899, 422911, 422923, 422927, 422969, 422987, 423001, 423013, 423019, 423043, 423053, 423061, 423067, 423083, 423091, 423097, 423103, 423109, 423121, 423127, 423133, 423173, 423179, 423191, 423209, 423221, 423229, 423233, 423251, 423257, 423259, 423277, 423281, 423287, 423289, 423299, 423307, 423323, 423341, 423347, 423389, 423403, 423413, 423427, 423431, 423439, 423457, 423461, 423463, 423469, 423481, 423497, 423503, 423509, 423541, 423547, 423557, 423559, 423581, 423587, 423601, 423617, 423649, 423667, 423697, 423707, 423713, 423727, 423749, 423751, 423763, 423769, 423779, 423781, 423791, 423803, 423823, 423847, 423853, 423859, 423869, 423883, 423887, 423931, 423949, 423961, 423977, 423989, 423991, 424001, 424003, 424007, 424019, 424027, 424037, 424079, 424091, 424093, 424103, 424117, 424121, 424129, 424139, 424147, 424157, 424163, 424169, 424187, 424199, 424223, 424231, 424243, 424247, 424261, 424267, 424271, 424273, 424313, 424331, 424339, 424343, 424351, 424397, 424423, 424429, 424433, 424451, 424471, 424481, 424493, 424519, 424537, 424547, 424549, 424559, 424573, 424577, 424597, 424601, 424639, 424661, 424667, 424679, 424687, 424693, 424709, 424727, 424729, 424757, 424769, 424771, 424777, 424811, 424817, 424819, 424829, 424841, 424843, 424849, 424861, 424867, 424889, 424891, 424903, 424909, 424913, 424939, 424961, 424967, 424997, 425003, 425027, 425039, 425057, 425059, 425071, 425083, 425101, 425107, 425123, 425147, 425149, 425189, 425197, 425207, 425233, 425237, 425251, 425273, 425279, 425281, 425291, 425297, 425309, 425317, 425329, 425333, 425363, 425377, 425387, 425393, 425417, 425419, 425423, 425441, 425443, 425471, 425473, 425489, 425501, 425519, 425521, 425533, 425549, 425563, 425591, 425603, 425609, 425641, 425653, 425681, 425701, 425713, 425779, 425783, 425791, 425801, 425813, 425819, 425837, 425839, 425851, 425857, 425861, 425869, 425879, 425899, 425903, 425911, 425939, 425959, 425977, 425987, 425989, 426007, 426011, 426061, 426073, 426077, 426089, 426091, 426103, 426131, 426161, 426163, 426193, 426197, 426211, 426229, 426233, 426253, 426287, 426301, 426311, 426319, 426331, 426353, 426383, 426389, 426401, 426407, 426421, 426427, 426469, 426487, 426527, 426541, 426551, 426553, 426563, 426583, 426611, 426631, 426637, 426641, 426661, 426691, 426697, 426707, 426709, 426731, 426737, 426739, 426743, 426757, 426761, 426763, 426773, 426779, 426787, 426799, 426841, 426859, 426863, 426871, 426889, 426893, 426913, 426917, 426919, 426931, 426941, 426971, 426973, 426997, 427001, 427013, 427039, 427043, 427067, 427069, 427073, 427079, 427081, 427103, 427117, 427151, 427169, 427181, 427213, 427237, 427241, 427243, 427247, 427249, 427279, 427283, 427307, 427309, 427327, 427333, 427351, 427369, 427379, 427381, 427403, 427417, 427421, 427423, 427429, 427433, 427439, 427447, 427451, 427457, 427477, 427513, 427517, 427523, 427529, 427541, 427579, 427591, 427597, 427619, 427621, 427681, 427711, 427717, 427723, 427727, 427733, 427751, 427781, 427787, 427789, 427813, 427849, 427859, 427877, 427879, 427883, 427913, 427919, 427939, 427949, 427951, 427957, 427967, 427969, 427991, 427993, 427997, 428003, 428023, 428027, 428033, 428039, 428041, 428047, 428083, 428093, 428137, 428143, 428147, 428149, 428161, 428167, 428173, 428177, 428221, 428227, 428231, 428249, 428251, 428273, 428297, 428299, 428303, 428339, 428353, 428369, 428401, 428411, 428429, 428471, 428473, 428489, 428503, 428509, 428531, 428539, 428551, 428557, 428563, 428567, 428569, 428579, 428629, 428633, 428639, 428657, 428663, 428671, 428677, 428683, 428693, 428731, 428741, 428759, 428777, 428797, 428801, 428807, 428809, 428833, 428843, 428851, 428863, 428873, 428899, 428951, 428957, 428977, 429007, 429017, 429043, 429083, 429101, 429109, 429119, 429127, 429137, 429139, 429161, 429181, 429197, 429211, 429217, 429223, 429227, 429241, 429259, 429271, 429277, 429281, 429283, 429329, 429347, 429349, 429361, 429367, 429389, 429397, 429409, 429413, 429427, 429431, 429449, 429463, 429467, 429469, 429487, 429497, 429503, 429509, 429511, 429521, 429529, 429547, 429551, 429563, 429581, 429587, 429589, 429599, 429631, 429643, 429659, 429661, 429673, 429677, 429679, 429683, 429701, 429719, 429727, 429731, 429733, 429773, 429791, 429797, 429817, 429823, 429827, 429851, 429853, 429881, 429887, 429889, 429899, 429901, 429907, 429911, 429917, 429929, 429931, 429937, 429943, 429953, 429971, 429973, 429991, 430007, 430009, 430013, 430019, 430057, 430061, 430081, 430091, 430093, 430121, 430139, 430147, 430193, 430259, 430267, 430277, 430279, 430289, 430303, 430319, 430333, 430343, 430357, 430393, 430411, 430427, 430433, 430453, 430487, 430499, 430511, 430513, 430517, 430543, 430553, 430571, 430579, 430589, 430601, 430603, 430649, 430663, 430691, 430697, 430699, 430709, 430723, 430739, 430741, 430747, 430751, 430753, 430769, 430783, 430789, 430799, 430811, 430819, 430823, 430841, 430847, 430861, 430873, 430879, 430883, 430891, 430897, 430907, 430909, 430921, 430949, 430957, 430979, 430981, 430987, 430999, 431017, 431021, 431029, 431047, 431051, 431063, 431077, 431083, 431099, 431107, 431141, 431147, 431153, 431173, 431191, 431203, 431213, 431219, 431237, 431251, 431257, 431267, 431269, 431287, 431297, 431311, 431329, 431339, 431363, 431369, 431377, 431381, 431399, 431423, 431429, 431441, 431447, 431449, 431479, 431513, 431521, 431533, 431567, 431581, 431597, 431603, 431611, 431617, 431621, 431657, 431659, 431663, 431671, 431693, 431707, 431729, 431731, 431759, 431777, 431797, 431801, 431803, 431807, 431831, 431833, 431857, 431863, 431867, 431869, 431881, 431887, 431891, 431903, 431911, 431929, 431933, 431947, 431983, 431993, 432001, 432007, 432023, 432031, 432037, 432043, 432053, 432059, 432067, 432073, 432097, 432121, 432137, 432139, 432143, 432149, 432161, 432163, 432167, 432199, 432203, 432227, 432241, 432251, 432277, 432281, 432287, 432301, 432317, 432323, 432337, 432343, 432349, 432359, 432373, 432389, 432391, 432401, 432413, 432433, 432437, 432449, 432457, 432479, 432491, 432499, 432503, 432511, 432527, 432539, 432557, 432559, 432569, 432577, 432587, 432589, 432613, 432631, 432637, 432659, 432661, 432713, 432721, 432727, 432737, 432743, 432749, 432781, 432793, 432797, 432799, 432833, 432847, 432857, 432869, 432893, 432907, 432923, 432931, 432959, 432961, 432979, 432983, 432989, 433003, 433033, 433049, 433051, 433061, 433073, 433079, 433087, 433093, 433099, 433117, 433123, 433141, 433151, 433187, 433193, 433201, 433207, 433229, 433241, 433249, 433253, 433259, 433261, 433267, 433271, 433291, 433309, 433319, 433337, 433351, 433357, 433361, 433369, 433373, 433393, 433399, 433421, 433429, 433439, 433453, 433469, 433471, 433501, 433507, 433513, 433549, 433571, 433577, 433607, 433627, 433633, 433639, 433651, 433661, 433663, 433673, 433679, 433681, 433703, 433723, 433729, 433747, 433759, 433777, 433781, 433787, 433813, 433817, 433847, 433859, 433861, 433877, 433883, 433889, 433931, 433943, 433963, 433967, 433981, 434009, 434011, 434029, 434039, 434081, 434087, 434107, 434111, 434113, 434117, 434141, 434167, 434179, 434191, 434201, 434209, 434221, 434237, 434243, 434249, 434261, 434267, 434293, 434297, 434303, 434311, 434323, 434347, 434353, 434363, 434377, 434383, 434387, 434389, 434407, 434411, 434431, 434437, 434459, 434461, 434471, 434479, 434501, 434509, 434521, 434561, 434563, 434573, 434593, 434597, 434611, 434647, 434659, 434683, 434689, 434699, 434717, 434719, 434743, 434761, 434783, 434803, 434807, 434813, 434821, 434827, 434831, 434839, 434849, 434857, 434867, 434873, 434881, 434909, 434921, 434923, 434927, 434933, 434939, 434947, 434957, 434963, 434977, 434981, 434989, 435037, 435041, 435059, 435103, 435107, 435109, 435131, 435139, 435143, 435151, 435161, 435179, 435181, 435187, 435191, 435221, 435223, 435247, 435257, 435263, 435277, 435283, 435287, 435307, 435317, 435343, 435349, 435359, 435371, 435397, 435401, 435403, 435419, 435427, 435437, 435439, 435451, 435481, 435503, 435529, 435541, 435553, 435559, 435563, 435569, 435571, 435577, 435583, 435593, 435619, 435623, 435637, 435641, 435647, 435649, 435653, 435661, 435679, 435709, 435731, 435733, 435739, 435751, 435763, 435769, 435779, 435817, 435839, 435847, 435857, 435859, 435881, 435889, 435893, 435907, 435913, 435923, 435947, 435949, 435973, 435983, 435997, 436003, 436013, 436027, 436061, 436081, 436087, 436091, 436097, 436127, 436147, 436151, 436157, 436171, 436181, 436217, 436231, 436253, 436273, 436279, 436283, 436291, 436307, 436309, 436313, 436343, 436357, 436399, 436417, 436427, 436439, 436459, 436463, 436477, 436481, 436483, 436507, 436523, 436529, 436531, 436547, 436549, 436571, 436591, 436607, 436621, 436627, 436649, 436651, 436673, 436687, 436693, 436717, 436727, 436729, 436739, 436741, 436757, 436801, 436811, 436819, 436831, 436841, 436853, 436871, 436889, 436913, 436957, 436963, 436967, 436973, 436979, 436993, 436999, 437011, 437033, 437071, 437077, 437083, 437093, 437111, 437113, 437137, 437141, 437149, 437153, 437159, 437191, 437201, 437219, 437237, 437243, 437263, 437273, 437279, 437287, 437293, 437321, 437351, 437357, 437363, 437387, 437389, 437401, 437413, 437467, 437471, 437473, 437497, 437501, 437509, 437519, 437527, 437533, 437539, 437543, 437557, 437587, 437629, 437641, 437651, 437653, 437677, 437681, 437687, 437693, 437719, 437729, 437743, 437753, 437771, 437809, 437819, 437837, 437849, 437861, 437867, 437881, 437909, 437923, 437947, 437953, 437959, 437977, 438001, 438017, 438029, 438047, 438049, 438091, 438131, 438133, 438143, 438169, 438203, 438211, 438223, 438233, 438241, 438253, 438259, 438271, 438281, 438287, 438301, 438313, 438329, 438341, 438377, 438391, 438401, 438409, 438419, 438439, 438443, 438467, 438479, 438499, 438517, 438521, 438523, 438527, 438533, 438551, 438569, 438589, 438601, 438611, 438623, 438631, 438637, 438661, 438667, 438671, 438701, 438707, 438721, 438733, 438761, 438769, 438793, 438827, 438829, 438833, 438847, 438853, 438869, 438877, 438887, 438899, 438913, 438937, 438941, 438953, 438961, 438967, 438979, 438983, 438989, 439007, 439009, 439063, 439081, 439123, 439133, 439141, 439157, 439163, 439171, 439183, 439199, 439217, 439253, 439273, 439279, 439289, 439303, 439339, 439349, 439357, 439367, 439381, 439409, 439421, 439427, 439429, 439441, 439459, 439463, 439471, 439493, 439511, 439519, 439541, 439559, 439567, 439573, 439577, 439583, 439601, 439613, 439631, 439639, 439661, 439667, 439687, 439693, 439697, 439709, 439723, 439729, 439753, 439759, 439763, 439771, 439781, 439787, 439799, 439811, 439823, 439849, 439853, 439861, 439867, 439883, 439891, 439903, 439919, 439949, 439961, 439969, 439973, 439981, 439991, 440009, 440023, 440039, 440047, 440087, 440093, 440101, 440131, 440159, 440171, 440177, 440179, 440183, 440203, 440207, 440221, 440227, 440239, 440261, 440269, 440281, 440303, 440311, 440329, 440333, 440339, 440347, 440371, 440383, 440389, 440393, 440399, 440431, 440441, 440443, 440471, 440497, 440501, 440507, 440509, 440527, 440537, 440543, 440549, 440551, 440567, 440569, 440579, 440581, 440641, 440651, 440653, 440669, 440677, 440681, 440683, 440711, 440717, 440723, 440731, 440753, 440761, 440773, 440807, 440809, 440821, 440831, 440849, 440863, 440893, 440903, 440911, 440939, 440941, 440953, 440959, 440983, 440987, 440989, 441011, 441029, 441041, 441043, 441053, 441073, 441079, 441101, 441107, 441109, 441113, 441121, 441127, 441157, 441169, 441179, 441187, 441191, 441193, 441229, 441247, 441251, 441257, 441263, 441281, 441307, 441319, 441349, 441359, 441361, 441403, 441421, 441443, 441449, 441461, 441479, 441499, 441517, 441523, 441527, 441547, 441557, 441563, 441569, 441587, 441607, 441613, 441619, 441631, 441647, 441667, 441697, 441703, 441713, 441737, 441751, 441787, 441797, 441799, 441811, 441827, 441829, 441839, 441841, 441877, 441887, 441907, 441913, 441923, 441937, 441953, 441971, 442003, 442007, 442009, 442019, 442027, 442031, 442033, 442061, 442069, 442097, 442109, 442121, 442139, 442147, 442151, 442157, 442171, 442177, 442181, 442193, 442201, 442207, 442217, 442229, 442237, 442243, 442271, 442283, 442291, 442319, 442327, 442333, 442363, 442367, 442397, 442399, 442439, 442447, 442457, 442469, 442487, 442489, 442499, 442501, 442517, 442531, 442537, 442571, 442573, 442577, 442579, 442601, 442609, 442619, 442633, 442691, 442699, 442703, 442721, 442733, 442747, 442753, 442763, 442769, 442777, 442781, 442789, 442807, 442817, 442823, 442829, 442831, 442837, 442843, 442861, 442879, 442903, 442919, 442961, 442963, 442973, 442979, 442987, 442991, 442997, 443011, 443017, 443039, 443041, 443057, 443059, 443063, 443077, 443089, 443117, 443123, 443129, 443147, 443153, 443159, 443161, 443167, 443171, 443189, 443203, 443221, 443227, 443231, 443237, 443243, 443249, 443263, 443273, 443281, 443291, 443293, 443341, 443347, 443353, 443363, 443369, 443389, 443407, 443413, 443419, 443423, 443431, 443437, 443453, 443467, 443489, 443501, 443533, 443543, 443551, 443561, 443563, 443567, 443587, 443591, 443603, 443609, 443629, 443659, 443687, 443689, 443701, 443711, 443731, 443749, 443753, 443759, 443761, 443771, 443777, 443791, 443837, 443851, 443867, 443869, 443873, 443879, 443881, 443893, 443899, 443909, 443917, 443939, 443941, 443953, 443983, 443987, 443999, 444001, 444007, 444029, 444043, 444047, 444079, 444089, 444109, 444113, 444121, 444127, 444131, 444151, 444167, 444173, 444179, 444181, 444187, 444209, 444253, 444271, 444281, 444287, 444289, 444293, 444307, 444341, 444343, 444347, 444349, 444401, 444403, 444421, 444443, 444449, 444461, 444463, 444469, 444473, 444487, 444517, 444523, 444527, 444529, 444539, 444547, 444553, 444557, 444569, 444589, 444607, 444623, 444637, 444641, 444649, 444671, 444677, 444701, 444713, 444739, 444767, 444791, 444793, 444803, 444811, 444817, 444833, 444841, 444859, 444863, 444869, 444877, 444883, 444887, 444893, 444901, 444929, 444937, 444953, 444967, 444971, 444979, 445001, 445019, 445021, 445031, 445033, 445069, 445087, 445091, 445097, 445103, 445141, 445157, 445169, 445183, 445187, 445199, 445229, 445261, 445271, 445279, 445283, 445297, 445307, 445321, 445339, 445363, 445427, 445433, 445447, 445453, 445463, 445477, 445499, 445507, 445537, 445541, 445567, 445573, 445583, 445589, 445597, 445619, 445631, 445633, 445649, 445657, 445691, 445699, 445703, 445741, 445747, 445769, 445771, 445789, 445799, 445807, 445829, 445847, 445853, 445871, 445877, 445883, 445891, 445931, 445937, 445943, 445967, 445969, 446003, 446009, 446041, 446053, 446081, 446087, 446111, 446123, 446129, 446141, 446179, 446189, 446191, 446197, 446221, 446227, 446231, 446261, 446263, 446273, 446279, 446293, 446309, 446323, 446333, 446353, 446363, 446387, 446389, 446399, 446401, 446417, 446441, 446447, 446461, 446473, 446477, 446503, 446533, 446549, 446561, 446569, 446597, 446603, 446609, 446647, 446657, 446713, 446717, 446731, 446753, 446759, 446767, 446773, 446819, 446827, 446839, 446863, 446881, 446891, 446893, 446909, 446911, 446921, 446933, 446951, 446969, 446983, 447001, 447011, 447019, 447053, 447067, 447079, 447101, 447107, 447119, 447133, 447137, 447173, 447179, 447193, 447197, 447211, 447217, 447221, 447233, 447247, 447257, 447259, 447263, 447311, 447319, 447323, 447331, 447353, 447401, 447409, 447427, 447439, 447443, 447449, 447451, 447463, 447467, 447481, 447509, 447521, 447527, 447541, 447569, 447571, 447611, 447617, 447637, 447641, 447677, 447683, 447701, 447703, 447743, 447749, 447757, 447779, 447791, 447793, 447817, 447823, 447827, 447829, 447841, 447859, 447877, 447883, 447893, 447901, 447907, 447943, 447961, 447983, 447991, 448003, 448013, 448027, 448031, 448057, 448067, 448073, 448093, 448111, 448121, 448139, 448141, 448157, 448159, 448169, 448177, 448187, 448193, 448199, 448207, 448241, 448249, 448303, 448309, 448313, 448321, 448351, 448363, 448367, 448373, 448379, 448387, 448397, 448421, 448451, 448519, 448531, 448561, 448597, 448607, 448627, 448631, 448633, 448667, 448687, 448697, 448703, 448727, 448733, 448741, 448769, 448793, 448801, 448807, 448829, 448843, 448853, 448859, 448867, 448871, 448873, 448879, 448883, 448907, 448927, 448939, 448969, 448993, 448997, 448999, 449003, 449011, 449051, 449077, 449083, 449093, 449107, 449117, 449129, 449131, 449149, 449153, 449161, 449171, 449173, 449201, 449203, 449209, 449227, 449243, 449249, 449261, 449263, 449269, 449287, 449299, 449303, 449311, 449321, 449333, 449347, 449353, 449363, 449381, 449399, 449411, 449417, 449419, 449437, 449441, 449459, 449473, 449543, 449549, 449557, 449563, 449567, 449569, 449591, 449609, 449621, 449629, 449653, 449663, 449671, 449677, 449681, 449689, 449693, 449699, 449741, 449759, 449767, 449773, 449783, 449797, 449807, 449821, 449833, 449851, 449879, 449921, 449929, 449941, 449951, 449959, 449963, 449971, 449987, 449989, 450001, 450011, 450019, 450029, 450067, 450071, 450077, 450083, 450101, 450103, 450113, 450127, 450137, 450161, 450169, 450193, 450199, 450209, 450217, 450223, 450227, 450239, 450257, 450259, 450277, 450287, 450293, 450299, 450301, 450311, 450343, 450349, 450361, 450367, 450377, 450383, 450391, 450403, 450413, 450421, 450431, 450451, 450473, 450479, 450481, 450487, 450493, 450503, 450529, 450533, 450557, 450563, 450581, 450587, 450599, 450601, 450617, 450641, 450643, 450649, 450677, 450691, 450707, 450719, 450727, 450761, 450767, 450787, 450797, 450799, 450803, 450809, 450811, 450817, 450829, 450839, 450841, 450847, 450859, 450881, 450883, 450887, 450893, 450899, 450913, 450917, 450929, 450943, 450949, 450971, 450991, 450997, 451013, 451039, 451051, 451057, 451069, 451093, 451097, 451103, 451109, 451159, 451177, 451181, 451183, 451201, 451207, 451249, 451277, 451279, 451301, 451303, 451309, 451313, 451331, 451337, 451343, 451361, 451387, 451397, 451411, 451439, 451441, 451481, 451499, 451519, 451523, 451541, 451547, 451553, 451579, 451601, 451609, 451621, 451637, 451657, 451663, 451667, 451669, 451679, 451681, 451691, 451699, 451709, 451723, 451747, 451753, 451771, 451783, 451793, 451799, 451823, 451831, 451837, 451859, 451873, 451879, 451897, 451901, 451903, 451909, 451921, 451933, 451937, 451939, 451961, 451967, 451987, 452009, 452017, 452027, 452033, 452041, 452077, 452083, 452087, 452131, 452159, 452161, 452171, 452191, 452201, 452213, 452227, 452233, 452239, 452269, 452279, 452293, 452297, 452329, 452363, 452377, 452393, 452401, 452443, 452453, 452497, 452519, 452521, 452531, 452533, 452537, 452539, 452549, 452579, 452587, 452597, 452611, 452629, 452633, 452671, 452687, 452689, 452701, 452731, 452759, 452773, 452797, 452807, 452813, 452821, 452831, 452857, 452869, 452873, 452923, 452953, 452957, 452983, 452989, 453023, 453029, 453053, 453073, 453107, 453119, 453133, 453137, 453143, 453157, 453161, 453181, 453197, 453199, 453209, 453217, 453227, 453239, 453247, 453269, 453289, 453293, 453301, 453311, 453317, 453329, 453347, 453367, 453371, 453377, 453379, 453421, 453451, 453461, 453527, 453553, 453559, 453569, 453571, 453599, 453601, 453617, 453631, 453637, 453641, 453643, 453659, 453667, 453671, 453683, 453703, 453707, 453709, 453737, 453757, 453797, 453799, 453823, 453833, 453847, 453851, 453877, 453889, 453907, 453913, 453923, 453931, 453949, 453961, 453977, 453983, 453991, 454009, 454021, 454031, 454033, 454039, 454061, 454063, 454079, 454109, 454141, 454151, 454159, 454183, 454199, 454211, 454213, 454219, 454229, 454231, 454247, 454253, 454277, 454297, 454303, 454313, 454331, 454351, 454357, 454361, 454379, 454387, 454409, 454417, 454451, 454453, 454483, 454501, 454507, 454513, 454541, 454543, 454547, 454577, 454579, 454603, 454609, 454627, 454637, 454673, 454679, 454709, 454711, 454721, 454723, 454759, 454763, 454777, 454799, 454823, 454843, 454847, 454849, 454859, 454889, 454891, 454907, 454919, 454921, 454931, 454943, 454967, 454969, 454973, 454991, 455003, 455011, 455033, 455047, 455053, 455093, 455099, 455123, 455149, 455159, 455167, 455171, 455177, 455201, 455219, 455227, 455233, 455237, 455261, 455263, 455269, 455291, 455309, 455317, 455321, 455333, 455339, 455341, 455353, 455381, 455393, 455401, 455407, 455419, 455431, 455437, 455443, 455461, 455471, 455473, 455479, 455489, 455491, 455513, 455527, 455531, 455537, 455557, 455573, 455579, 455597, 455599, 455603, 455627, 455647, 455659, 455681, 455683, 455687, 455701, 455711, 455717, 455737, 455761, 455783, 455789, 455809, 455827, 455831, 455849, 455863, 455881, 455899, 455921, 455933, 455941, 455953, 455969, 455977, 455989, 455993, 455999, 456007, 456013, 456023, 456037, 456047, 456061, 456091, 456107, 456109, 456119, 456149, 456151, 456167, 456193, 456223, 456233, 456241, 456283, 456293, 456329, 456349, 456353, 456367, 456377, 456403, 456409, 456427, 456439, 456451, 456457, 456461, 456499, 456503, 456517, 456523, 456529, 456539, 456553, 456557, 456559, 456571, 456581, 456587, 456607, 456611, 456613, 456623, 456641, 456647, 456649, 456653, 456679, 456683, 456697, 456727, 456737, 456763, 456767, 456769, 456791, 456809, 456811, 456821, 456871, 456877, 456881, 456899, 456901, 456923, 456949, 456959, 456979, 456991, 457001, 457003, 457013, 457021, 457043, 457049, 457057, 457087, 457091, 457097, 457099, 457117, 457139, 457151, 457153, 457183, 457189, 457201, 457213, 457229, 457241, 457253, 457267, 457271, 457277, 457279, 457307, 457319, 457333, 457339, 457363, 457367, 457381, 457393, 457397, 457399, 457403, 457411, 457421, 457433, 457459, 457469, 457507, 457511, 457517, 457547, 457553, 457559, 457571, 457607, 457609, 457621, 457643, 457651, 457661, 457669, 457673, 457679, 457687, 457697, 457711, 457739, 457757, 457789, 457799, 457813, 457817, 457829, 457837, 457871, 457889, 457903, 457913, 457943, 457979, 457981, 457987, 458009, 458027, 458039, 458047, 458053, 458057, 458063, 458069, 458119, 458123, 458173, 458179, 458189, 458191, 458197, 458207, 458219, 458239, 458309, 458317, 458323, 458327, 458333, 458357, 458363, 458377, 458399, 458401, 458407, 458449, 458477, 458483, 458501, 458531, 458533, 458543, 458567, 458569, 458573, 458593, 458599, 458611, 458621, 458629, 458639, 458651, 458663, 458669, 458683, 458701, 458719, 458729, 458747, 458789, 458791, 458797, 458807, 458819, 458849, 458863, 458879, 458891, 458897, 458917, 458921, 458929, 458947, 458957, 458959, 458963, 458971, 458977, 458981, 458987, 458993, 459007, 459013, 459023, 459029, 459031, 459037, 459047, 459089, 459091, 459113, 459127, 459167, 459169, 459181, 459209, 459223, 459229, 459233, 459257, 459271, 459293, 459301, 459313, 459317, 459337, 459341, 459343, 459353, 459373, 459377, 459383, 459397, 459421, 459427, 459443, 459463, 459467, 459469, 459479, 459509, 459521, 459523, 459593, 459607, 459611, 459619, 459623, 459631, 459647, 459649, 459671, 459677, 459691, 459703, 459749, 459763, 459791, 459803, 459817, 459829, 459841, 459847, 459883, 459913, 459923, 459929, 459937, 459961, 460013, 460039, 460051, 460063, 460073, 460079, 460081, 460087, 460091, 460099, 460111, 460127, 460147, 460157, 460171, 460181, 460189, 460211, 460217, 460231, 460247, 460267, 460289, 460297, 460301, 460337, 460349, 460373, 460379, 460387, 460393, 460403, 460409, 460417, 460451, 460463, 460477, 460531, 460543, 460561, 460571, 460589, 460609, 460619, 460627, 460633, 460637, 460643, 460657, 460673, 460697, 460709, 460711, 460721, 460771, 460777, 460787, 460793, 460813, 460829, 460841, 460843, 460871, 460891, 460903, 460907, 460913, 460919, 460937, 460949, 460951, 460969, 460973, 460979, 460981, 460987, 460991, 461009, 461011, 461017, 461051, 461053, 461059, 461093, 461101, 461119, 461143, 461147, 461171, 461183, 461191, 461207, 461233, 461239, 461257, 461269, 461273, 461297, 461299, 461309, 461317, 461323, 461327, 461333, 461359, 461381, 461393, 461407, 461411, 461413, 461437, 461441, 461443, 461467, 461479, 461507, 461521, 461561, 461569, 461581, 461599, 461603, 461609, 461627, 461639, 461653, 461677, 461687, 461689, 461693, 461707, 461717, 461801, 461803, 461819, 461843, 461861, 461887, 461891, 461917, 461921, 461933, 461957, 461971, 461977, 461983, 462013, 462041, 462067, 462073, 462079, 462097, 462103, 462109, 462113, 462131, 462149, 462181, 462191, 462199, 462221, 462239, 462263, 462271, 462307, 462311, 462331, 462337, 462361, 462373, 462377, 462401, 462409, 462419, 462421, 462437, 462443, 462467, 462481, 462491, 462493, 462499, 462529, 462541, 462547, 462557, 462569, 462571, 462577, 462589, 462607, 462629, 462641, 462643, 462653, 462659, 462667, 462673, 462677, 462697, 462713, 462719, 462727, 462733, 462739, 462773, 462827, 462841, 462851, 462863, 462871, 462881, 462887, 462899, 462901, 462911, 462937, 462947, 462953, 462983, 463003, 463031, 463033, 463093, 463103, 463157, 463181, 463189, 463207, 463213, 463219, 463231, 463237, 463247, 463249, 463261, 463283, 463291, 463297, 463303, 463313, 463319, 463321, 463339, 463343, 463363, 463387, 463399, 463433, 463447, 463451, 463453, 463457, 463459, 463483, 463501, 463511, 463513, 463523, 463531, 463537, 463549, 463579, 463613, 463627, 463633, 463643, 463649, 463663, 463679, 463693, 463711, 463717, 463741, 463747, 463753, 463763, 463781, 463787, 463807, 463823, 463829, 463831, 463849, 463861, 463867, 463873, 463889, 463891, 463907, 463919, 463921, 463949, 463963, 463973, 463987, 463993, 464003, 464011, 464021, 464033, 464047, 464069, 464081, 464089, 464119, 464129, 464131, 464137, 464141, 464143, 464171, 464173, 464197, 464201, 464213, 464237, 464251, 464257, 464263, 464279, 464281, 464291, 464309, 464311, 464327, 464351, 464371, 464381, 464383, 464413, 464419, 464437, 464447, 464459, 464467, 464479, 464483, 464521, 464537, 464539, 464549, 464557, 464561, 464587, 464591, 464603, 464617, 464621, 464647, 464663, 464687, 464699, 464741, 464747, 464749, 464753, 464767, 464771, 464773, 464777, 464801, 464803, 464809, 464813, 464819, 464843, 464857, 464879, 464897, 464909, 464917, 464923, 464927, 464939, 464941, 464951, 464953, 464963, 464983, 464993, 464999, 465007, 465011, 465013, 465019, 465041, 465061, 465067, 465071, 465077, 465079, 465089, 465107, 465119, 465133, 465151, 465161, 465163, 465167, 465169, 465173, 465187, 465209, 465211, 465259, 465271, 465277, 465281, 465293, 465299, 465317, 465319, 465331, 465337, 465373, 465379, 465383, 465407, 465419, 465433, 465463, 465469, 465523, 465529, 465541, 465551, 465581, 465587, 465611, 465631, 465643, 465649, 465659, 465679, 465701, 465721, 465739, 465743, 465761, 465781, 465797, 465799, 465809, 465821, 465833, 465841, 465887, 465893, 465901, 465917, 465929, 465931, 465947, 465977, 465989, 466009, 466019, 466027, 466033, 466043, 466061, 466069, 466073, 466079, 466087, 466091, 466121, 466139, 466153, 466171, 466181, 466183, 466201, 466243, 466247, 466261, 466267, 466273, 466283, 466303, 466321, 466331, 466339, 466357, 466369, 466373, 466409, 466423, 466441, 466451, 466483, 466517, 466537, 466547, 466553, 466561, 466567, 466573, 466579, 466603, 466619, 466637, 466649, 466651, 466673, 466717, 466723, 466729, 466733, 466747, 466751, 466777, 466787, 466801, 466819, 466853, 466859, 466897, 466909, 466913, 466919, 466951, 466957, 466997, 467003, 467009, 467017, 467021, 467063, 467081, 467083, 467101, 467119, 467123, 467141, 467147, 467171, 467183, 467197, 467209, 467213, 467237, 467239, 467261, 467293, 467297, 467317, 467329, 467333, 467353, 467371, 467399, 467417, 467431, 467437, 467447, 467471, 467473, 467477, 467479, 467491, 467497, 467503, 467507, 467527, 467531, 467543, 467549, 467557, 467587, 467591, 467611, 467617, 467627, 467629, 467633, 467641, 467651, 467657, 467669, 467671, 467681, 467689, 467699, 467713, 467729, 467737, 467743, 467749, 467773, 467783, 467813, 467827, 467833, 467867, 467869, 467879, 467881, 467893, 467897, 467899, 467903, 467927, 467941, 467953, 467963, 467977, 468001, 468011, 468019, 468029, 468049, 468059, 468067, 468071, 468079, 468107, 468109, 468113, 468121, 468133, 468137, 468151, 468157, 468173, 468187, 468191, 468199, 468239, 468241, 468253, 468271, 468277, 468289, 468319, 468323, 468353, 468359, 468371, 468389, 468421, 468439, 468451, 468463, 468473, 468491, 468493, 468499, 468509, 468527, 468551, 468557, 468577, 468581, 468593, 468599, 468613, 468619, 468623, 468641, 468647, 468653, 468661, 468667, 468683, 468691, 468697, 468703, 468709, 468719, 468737, 468739, 468761, 468773, 468781, 468803, 468817, 468821, 468841, 468851, 468859, 468869, 468883, 468887, 468889, 468893, 468899, 468913, 468953, 468967, 468973, 468983, 469009, 469031, 469037, 469069, 469099, 469121, 469127, 469141, 469153, 469169, 469193, 469207, 469219, 469229, 469237, 469241, 469253, 469267, 469279, 469283, 469303, 469321, 469331, 469351, 469363, 469367, 469369, 469379, 469397, 469411, 469429, 469439, 469457, 469487, 469501, 469529, 469541, 469543, 469561, 469583, 469589, 469613, 469627, 469631, 469649, 469657, 469673, 469687, 469691, 469717, 469723, 469747, 469753, 469757, 469769, 469787, 469793, 469801, 469811, 469823, 469841, 469849, 469877, 469879, 469891, 469907, 469919, 469939, 469957, 469969, 469979, 469993, 470021, 470039, 470059, 470077, 470081, 470083, 470087, 470089, 470131, 470149, 470153, 470161, 470167, 470179, 470201, 470207, 470209, 470213, 470219, 470227, 470243, 470251, 470263, 470279, 470297, 470299, 470303, 470317, 470333, 470347, 470359, 470389, 470399, 470411, 470413, 470417, 470429, 470443, 470447, 470453, 470461, 470471, 470473, 470489, 470501, 470513, 470521, 470531, 470539, 470551, 470579, 470593, 470597, 470599, 470609, 470621, 470627, 470647, 470651, 470653, 470663, 470669, 470689, 470711, 470719, 470731, 470749, 470779, 470783, 470791, 470819, 470831, 470837, 470863, 470867, 470881, 470887, 470891, 470903, 470927, 470933, 470941, 470947, 470957, 470959, 470993, 470999, 471007, 471041, 471061, 471073, 471089, 471091, 471101, 471137, 471139, 471161, 471173, 471179, 471187, 471193, 471209, 471217, 471241, 471253, 471259, 471277, 471281, 471283, 471299, 471301, 471313, 471353, 471389, 471391, 471403, 471407, 471439, 471451, 471467, 471481, 471487, 471503, 471509, 471521, 471533, 471539, 471553, 471571, 471589, 471593, 471607, 471617, 471619, 471641, 471649, 471659, 471671, 471673, 471677, 471683, 471697, 471703, 471719, 471721, 471749, 471769, 471781, 471791, 471803, 471817, 471841, 471847, 471853, 471871, 471893, 471901, 471907, 471923, 471929, 471931, 471943, 471949, 471959, 471997, 472019, 472027, 472051, 472057, 472063, 472067, 472103, 472111, 472123, 472127, 472133, 472139, 472151, 472159, 472163, 472189, 472193, 472247, 472249, 472253, 472261, 472273, 472289, 472301, 472309, 472319, 472331, 472333, 472349, 472369, 472391, 472393, 472399, 472411, 472421, 472457, 472469, 472477, 472523, 472541, 472543, 472559, 472561, 472573, 472597, 472631, 472639, 472643, 472669, 472687, 472691, 472697, 472709, 472711, 472721, 472741, 472751, 472763, 472793, 472799, 472817, 472831, 472837, 472847, 472859, 472883, 472907, 472909, 472921, 472937, 472939, 472963, 472993, 473009, 473021, 473027, 473089, 473101, 473117, 473141, 473147, 473159, 473167, 473173, 473191, 473197, 473201, 473203, 473219, 473227, 473257, 473279, 473287, 473293, 473311, 473321, 473327, 473351, 473353, 473377, 473381, 473383, 473411, 473419, 473441, 473443, 473453, 473471, 473477, 473479, 473497, 473503, 473507, 473513, 473519, 473527, 473531, 473533, 473549, 473579, 473597, 473611, 473617, 473633, 473647, 473659, 473719, 473723, 473729, 473741, 473743, 473761, 473789, 473833, 473839, 473857, 473861, 473867, 473887, 473899, 473911, 473923, 473927, 473929, 473939, 473951, 473953, 473971, 473981, 473987, 473999, 474017, 474029, 474037, 474043, 474049, 474059, 474073, 474077, 474101, 474119, 474127, 474137, 474143, 474151, 474163, 474169, 474197, 474211, 474223, 474241, 474263, 474289, 474307, 474311, 474319, 474337, 474343, 474347, 474359, 474379, 474389, 474391, 474413, 474433, 474437, 474443, 474479, 474491, 474497, 474499, 474503, 474533, 474541, 474547, 474557, 474569, 474571, 474581, 474583, 474619, 474629, 474647, 474659, 474667, 474671, 474707, 474709, 474737, 474751, 474757, 474769, 474779, 474787, 474809, 474811, 474839, 474847, 474857, 474899, 474907, 474911, 474917, 474923, 474931, 474937, 474941, 474949, 474959, 474977, 474983, 475037, 475051, 475073, 475081, 475091, 475093, 475103, 475109, 475141, 475147, 475151, 475159, 475169, 475207, 475219, 475229, 475243, 475271, 475273, 475283, 475289, 475297, 475301, 475327, 475331, 475333, 475351, 475367, 475369, 475379, 475381, 475403, 475417, 475421, 475427, 475429, 475441, 475457, 475469, 475483, 475511, 475523, 475529, 475549, 475583, 475597, 475613, 475619, 475621, 475637, 475639, 475649, 475669, 475679, 475681, 475691, 475693, 475697, 475721, 475729, 475751, 475753, 475759, 475763, 475777, 475789, 475793, 475807, 475823, 475831, 475837, 475841, 475859, 475877, 475879, 475889, 475897, 475903, 475907, 475921, 475927, 475933, 475957, 475973, 475991, 475997, 476009, 476023, 476027, 476029, 476039, 476041, 476059, 476081, 476087, 476089, 476101, 476107, 476111, 476137, 476143, 476167, 476183, 476219, 476233, 476237, 476243, 476249, 476279, 476299, 476317, 476347, 476351, 476363, 476369, 476381, 476401, 476407, 476419, 476423, 476429, 476467, 476477, 476479, 476507, 476513, 476519, 476579, 476587, 476591, 476599, 476603, 476611, 476633, 476639, 476647, 476659, 476681, 476683, 476701, 476713, 476719, 476737, 476743, 476753, 476759, 476783, 476803, 476831, 476849, 476851, 476863, 476869, 476887, 476891, 476911, 476921, 476929, 476977, 476981, 476989, 477011, 477013, 477017, 477019, 477031, 477047, 477073, 477077, 477091, 477131, 477149, 477163, 477209, 477221, 477229, 477259, 477277, 477293, 477313, 477317, 477329, 477341, 477359, 477361, 477383, 477409, 477439, 477461, 477469, 477497, 477511, 477517, 477523, 477539, 477551, 477553, 477557, 477571, 477577, 477593, 477619, 477623, 477637, 477671, 477677, 477721, 477727, 477731, 477739, 477767, 477769, 477791, 477797, 477809, 477811, 477821, 477823, 477839, 477847, 477857, 477863, 477881, 477899, 477913, 477941, 477947, 477973, 477977, 477991, 478001, 478039, 478063, 478067, 478069, 478087, 478099, 478111, 478129, 478139, 478157, 478169, 478171, 478189, 478199, 478207, 478213, 478241, 478243, 478253, 478259, 478271, 478273, 478321, 478339, 478343, 478351, 478391, 478399, 478403, 478411, 478417, 478421, 478427, 478433, 478441, 478451, 478453, 478459, 478481, 478483, 478493, 478523, 478531, 478571, 478573, 478579, 478589, 478603, 478627, 478631, 478637, 478651, 478679, 478697, 478711, 478727, 478729, 478739, 478741, 478747, 478763, 478769, 478787, 478801, 478811, 478813, 478823, 478831, 478843, 478853, 478861, 478871, 478879, 478897, 478901, 478913, 478927, 478931, 478937, 478943, 478963, 478967, 478991, 478999, 479023, 479027, 479029, 479041, 479081, 479131, 479137, 479147, 479153, 479189, 479191, 479201, 479209, 479221, 479231, 479239, 479243, 479263, 479267, 479287, 479299, 479309, 479317, 479327, 479357, 479371, 479377, 479387, 479419, 479429, 479431, 479441, 479461, 479473, 479489, 479497, 479509, 479513, 479533, 479543, 479561, 479569, 479581, 479593, 479599, 479623, 479629, 479639, 479701, 479749, 479753, 479761, 479771, 479777, 479783, 479797, 479813, 479821, 479833, 479839, 479861, 479879, 479881, 479891, 479903, 479909, 479939, 479951, 479953, 479957, 479971, 480013, 480017, 480019, 480023, 480043, 480047, 480049, 480059, 480061, 480071, 480091, 480101, 480107, 480113, 480133, 480143, 480157, 480167, 480169, 480203, 480209, 480287, 480299, 480317, 480329, 480341, 480343, 480349, 480367, 480373, 480379, 480383, 480391, 480409, 480419, 480427, 480449, 480451, 480461, 480463, 480499, 480503, 480509, 480517, 480521, 480527, 480533, 480541, 480553, 480563, 480569, 480583, 480587, 480647, 480661, 480707, 480713, 480731, 480737, 480749, 480761, 480773, 480787, 480803, 480827, 480839, 480853, 480881, 480911, 480919, 480929, 480937, 480941, 480959, 480967, 480979, 480989, 481001, 481003, 481009, 481021, 481043, 481051, 481067, 481073, 481087, 481093, 481097, 481109, 481123, 481133, 481141, 481147, 481153, 481157, 481171, 481177, 481181, 481199, 481207, 481211, 481231, 481249, 481297, 481301, 481303, 481307, 481343, 481363, 481373, 481379, 481387, 481409, 481417, 481433, 481447, 481469, 481489, 481501, 481513, 481531, 481549, 481571, 481577, 481589, 481619, 481633, 481639, 481651, 481667, 481673, 481681, 481693, 481697, 481699, 481721, 481751, 481753, 481769, 481787, 481801, 481807, 481813, 481837, 481843, 481847, 481849, 481861, 481867, 481879, 481883, 481909, 481939, 481963, 481997, 482017, 482021, 482029, 482033, 482039, 482051, 482071, 482093, 482099, 482101, 482117, 482123, 482179, 482189, 482203, 482213, 482227, 482231, 482233, 482243, 482263, 482281, 482309, 482323, 482347, 482351, 482359, 482371, 482387, 482393, 482399, 482401, 482407, 482413, 482423, 482437, 482441, 482483, 482501, 482507, 482509, 482513, 482519, 482527, 482539, 482569, 482593, 482597, 482621, 482627, 482633, 482641, 482659, 482663, 482683, 482687, 482689, 482707, 482711, 482717, 482719, 482731, 482743, 482753, 482759, 482767, 482773, 482789, 482803, 482819, 482827, 482837, 482861, 482863, 482873, 482897, 482899, 482917, 482941, 482947, 482957, 482971, 483017, 483031, 483061, 483071, 483097, 483127, 483139, 483163, 483167, 483179, 483209, 483211, 483221, 483229, 483233, 483239, 483247, 483251, 483281, 483289, 483317, 483323, 483337, 483347, 483367, 483377, 483389, 483397, 483407, 483409, 483433, 483443, 483467, 483481, 483491, 483499, 483503, 483523, 483541, 483551, 483557, 483563, 483577, 483611, 483619, 483629, 483643, 483649, 483671, 483697, 483709, 483719, 483727, 483733, 483751, 483757, 483761, 483767, 483773, 483787, 483809, 483811, 483827, 483829, 483839, 483853, 483863, 483869, 483883, 483907, 483929, 483937, 483953, 483971, 483991, 484019, 484027, 484037, 484061, 484067, 484079, 484091, 484111, 484117, 484123, 484129, 484151, 484153, 484171, 484181, 484193, 484201, 484207, 484229, 484243, 484259, 484283, 484301, 484303, 484327, 484339, 484361, 484369, 484373, 484397, 484411, 484417, 484439, 484447, 484457, 484459, 484487, 484489, 484493, 484531, 484543, 484577, 484597, 484607, 484609, 484613, 484621, 484639, 484643, 484691, 484703, 484727, 484733, 484751, 484763, 484769, 484777, 484787, 484829, 484853, 484867, 484927, 484951, 484987, 484999, 485021, 485029, 485041, 485053, 485059, 485063, 485081, 485101, 485113, 485123, 485131, 485137, 485161, 485167, 485171, 485201, 485207, 485209, 485263, 485311, 485347, 485351, 485363, 485371, 485383, 485389, 485411, 485417, 485423, 485437, 485447, 485479, 485497, 485509, 485519, 485543, 485567, 485587, 485593, 485603, 485609, 485647, 485657, 485671, 485689, 485701, 485717, 485729, 485731, 485753, 485777, 485819, 485827, 485831, 485833, 485893, 485899, 485909, 485923, 485941, 485959, 485977, 485993, 486023, 486037, 486041, 486043, 486053, 486061, 486071, 486091, 486103, 486119, 486133, 486139, 486163, 486179, 486181, 486193, 486203, 486221, 486223, 486247, 486281, 486293, 486307, 486313, 486323, 486329, 486331, 486341, 486349, 486377, 486379, 486389, 486391, 486397, 486407, 486433, 486443, 486449, 486481, 486491, 486503, 486509, 486511, 486527, 486539, 486559, 486569, 486583, 486589, 486601, 486617, 486637, 486641, 486643, 486653, 486667, 486671, 486677, 486679, 486683, 486697, 486713, 486721, 486757, 486767, 486769, 486781, 486797, 486817, 486821, 486833, 486839, 486869, 486907, 486923, 486929, 486943, 486947, 486949, 486971, 486977, 486991, 487007, 487013, 487021, 487049, 487051, 487057, 487073, 487079, 487093, 487099, 487111, 487133, 487177, 487183, 487187, 487211, 487213, 487219, 487247, 487261, 487283, 487303, 487307, 487313, 487349, 487363, 487381, 487387, 487391, 487397, 487423, 487427, 487429, 487447, 487457, 487463, 487469, 487471, 487477, 487481, 487489, 487507, 487561, 487589, 487601, 487603, 487607, 487637, 487649, 487651, 487657, 487681, 487691, 487703, 487709, 487717, 487727, 487733, 487741, 487757, 487769, 487783, 487789, 487793, 487811, 487819, 487829, 487831, 487843, 487873, 487889, 487891, 487897, 487933, 487943, 487973, 487979, 487997, 488003, 488009, 488011, 488021, 488051, 488057, 488069, 488119, 488143, 488149, 488153, 488161, 488171, 488197, 488203, 488207, 488209, 488227, 488231, 488233, 488239, 488249, 488261, 488263, 488287, 488303, 488309, 488311, 488317, 488321, 488329, 488333, 488339, 488347, 488353, 488381, 488399, 488401, 488407, 488417, 488419, 488441, 488459, 488473, 488503, 488513, 488539, 488567, 488573, 488603, 488611, 488617, 488627, 488633, 488639, 488641, 488651, 488687, 488689, 488701, 488711, 488717, 488723, 488729, 488743, 488749, 488759, 488779, 488791, 488797, 488821, 488827, 488833, 488861, 488879, 488893, 488897, 488909, 488921, 488947, 488959, 488981, 488993, 489001, 489011, 489019, 489043, 489053, 489061, 489101, 489109, 489113, 489127, 489133, 489157, 489161, 489179, 489191, 489197, 489217, 489239, 489241, 489257, 489263, 489283, 489299, 489329, 489337, 489343, 489361, 489367, 489389, 489407, 489409, 489427, 489431, 489439, 489449, 489457, 489479, 489487, 489493, 489529, 489539, 489551, 489553, 489557, 489571, 489613, 489631, 489653, 489659, 489673, 489677, 489679, 489689, 489691, 489733, 489743, 489761, 489791, 489793, 489799, 489803, 489817, 489823, 489833, 489847, 489851, 489869, 489871, 489887, 489901, 489911, 489913, 489941, 489943, 489959, 489961, 489977, 489989, 490001, 490003, 490019, 490031, 490033, 490057, 490097, 490103, 490111, 490117, 490121, 490151, 490159, 490169, 490183, 490201, 490207, 490223, 490241, 490247, 490249, 490267, 490271, 490277, 490283, 490309, 490313, 490339, 490367, 490393, 490417, 490421, 490453, 490459, 490463, 490481, 490493, 490499, 490519, 490537, 490541, 490543, 490549, 490559, 490571, 490573, 490577, 490579, 490591, 490619, 490627, 490631, 490643, 490661, 490663, 490697, 490733, 490741, 490769, 490771, 490783, 490829, 490837, 490849, 490859, 490877, 490891, 490913, 490921, 490927, 490937, 490949, 490951, 490957, 490967, 490969, 490991, 490993, 491003, 491039, 491041, 491059, 491081, 491083, 491129, 491137, 491149, 491159, 491167, 491171, 491201, 491213, 491219, 491251, 491261, 491273, 491279, 491297, 491299, 491327, 491329, 491333, 491339, 491341, 491353, 491357, 491371, 491377, 491417, 491423, 491429, 491461, 491483, 491489, 491497, 491501, 491503, 491527, 491531, 491537, 491539, 491581, 491591, 491593, 491611, 491627, 491633, 491639, 491651, 491653, 491669, 491677, 491707, 491719, 491731, 491737, 491747, 491773, 491783, 491789, 491797, 491819, 491833, 491837, 491851, 491857, 491867, 491873, 491899, 491923, 491951, 491969, 491977, 491983, 492007, 492013, 492017, 492029, 492047, 492053, 492059, 492061, 492067, 492077, 492083, 492103, 492113, 492227, 492251, 492253, 492257, 492281, 492293, 492299, 492319, 492377, 492389, 492397, 492403, 492409, 492413, 492421, 492431, 492463, 492467, 492487, 492491, 492511, 492523, 492551, 492563, 492587, 492601, 492617, 492619, 492629, 492631, 492641, 492647, 492659, 492671, 492673, 492707, 492719, 492721, 492731, 492757, 492761, 492763, 492769, 492781, 492799, 492839, 492853, 492871, 492883, 492893, 492901, 492911, 492967, 492979, 493001, 493013, 493021, 493027, 493043, 493049, 493067, 493093, 493109, 493111, 493121, 493123, 493127, 493133, 493139, 493147, 493159, 493169, 493177, 493193, 493201, 493211, 493217, 493219, 493231, 493243, 493249, 493277, 493279, 493291, 493301, 493313, 493333, 493351, 493369, 493393, 493397, 493399, 493403, 493433, 493447, 493457, 493463, 493481, 493523, 493531, 493541, 493567, 493573, 493579, 493583, 493607, 493621, 493627, 493643, 493657, 493693, 493709, 493711, 493721, 493729, 493733, 493747, 493777, 493793, 493807, 493811, 493813, 493817, 493853, 493859, 493873, 493877, 493897, 493919, 493931, 493937, 493939, 493967, 493973, 493979, 493993, 494023, 494029, 494041, 494051, 494069, 494077, 494083, 494093, 494101, 494107, 494129, 494141, 494147, 494167, 494191, 494213, 494237, 494251, 494257, 494267, 494269, 494281, 494287, 494317, 494327, 494341, 494353, 494359, 494369, 494381, 494383, 494387, 494407, 494413, 494441, 494443, 494471, 494497, 494519, 494521, 494539, 494561, 494563, 494567, 494587, 494591, 494609, 494617, 494621, 494639, 494647, 494651, 494671, 494677, 494687, 494693, 494699, 494713, 494719, 494723, 494731, 494737, 494743, 494749, 494759, 494761, 494783, 494789, 494803, 494843, 494849, 494873, 494899, 494903, 494917, 494927, 494933, 494939, 494959, 494987, 495017, 495037, 495041, 495043, 495067, 495071, 495109, 495113, 495119, 495133, 495139, 495149, 495151, 495161, 495181, 495199, 495211, 495221, 495241, 495269, 495277, 495289, 495301, 495307, 495323, 495337, 495343, 495347, 495359, 495361, 495371, 495377, 495389, 495401, 495413, 495421, 495433, 495437, 495449, 495457, 495461, 495491, 495511, 495527, 495557, 495559, 495563, 495569, 495571, 495587, 495589, 495611, 495613, 495617, 495619, 495629, 495637, 495647, 495667, 495679, 495701, 495707, 495713, 495749, 495751, 495757, 495769, 495773, 495787, 495791, 495797, 495799, 495821, 495827, 495829, 495851, 495877, 495893, 495899, 495923, 495931, 495947, 495953, 495959, 495967, 495973, 495983, 496007, 496019, 496039, 496051, 496063, 496073, 496079, 496123, 496127, 496163, 496187, 496193, 496211, 496229, 496231, 496259, 496283, 496289, 496291, 496297, 496303, 496313, 496333, 496339, 496343, 496381, 496399, 496427, 496439, 496453, 496459, 496471, 496477, 496481, 496487, 496493, 496499, 496511, 496549, 496579, 496583, 496609, 496631, 496669, 496681, 496687, 496703, 496711, 496733, 496747, 496763, 496789, 496813, 496817, 496841, 496849, 496871, 496877, 496889, 496891, 496897, 496901, 496913, 496919, 496949, 496963, 496997, 496999, 497011, 497017, 497041, 497047, 497051, 497069, 497093, 497111, 497113, 497117, 497137, 497141, 497153, 497171, 497177, 497197, 497239, 497257, 497261, 497269, 497279, 497281, 497291, 497297, 497303, 497309, 497323, 497339, 497351, 497389, 497411, 497417, 497423, 497449, 497461, 497473, 497479, 497491, 497501, 497507, 497509, 497521, 497537, 497551, 497557, 497561, 497579, 497587, 497597, 497603, 497633, 497659, 497663, 497671, 497677, 497689, 497701, 497711, 497719, 497729, 497737, 497741, 497771, 497773, 497801, 497813, 497831, 497839, 497851, 497867, 497869, 497873, 497899, 497929, 497957, 497963, 497969, 497977, 497989, 497993, 497999, 498013, 498053, 498061, 498073, 498089, 498101, 498103, 498119, 498143, 498163, 498167, 498181, 498209, 498227, 498257, 498259, 498271, 498301, 498331, 498343, 498361, 498367, 498391, 498397, 498401, 498403, 498409, 498439, 498461, 498467, 498469, 498493, 498497, 498521, 498523, 498527, 498551, 498557, 498577, 498583, 498599, 498611, 498613, 498643, 498647, 498653, 498679, 498689, 498691, 498733, 498739, 498749, 498761, 498767, 498779, 498781, 498787, 498791, 498803, 498833, 498857, 498859, 498881, 498907, 498923, 498931, 498937, 498947, 498961, 498973, 498977, 498989, 499021, 499027, 499033, 499039, 499063, 499067, 499099, 499117, 499127, 499129, 499133, 499139, 499141, 499151, 499157, 499159, 499181, 499183, 499189, 499211, 499229, 499253, 499267, 499277, 499283, 499309, 499321, 499327, 499349, 499361, 499363, 499391, 499397, 499403, 499423, 499439, 499459, 499481, 499483, 499493, 499507, 499519, 499523, 499549, 499559, 499571, 499591, 499601, 499607, 499621, 499633, 499637, 499649, 499661, 499663, 499669, 499673, 499679, 499687, 499691, 499693, 499711, 499717, 499729, 499739, 499747, 499781, 499787, 499801, 499819, 499853, 499879, 499883, 499897, 499903, 499927, 499943, 499957, 499969, 499973, 499979, 500009, 500029, 500041, 500057, 500069, 500083, 500107, 500111, 500113, 500119, 500153, 500167, 500173, 500177, 500179, 500197, 500209, 500231, 500233, 500237, 500239, 500249, 500257, 500287, 500299, 500317, 500321, 500333, 500341, 500363, 500369, 500389, 500393, 500413, 500417, 500431, 500443, 500459, 500471, 500473, 500483, 500501, 500509, 500519, 500527, 500567, 500579, 500587, 500603, 500629, 500671, 500677, 500693, 500699, 500713, 500719, 500723, 500729, 500741, 500777, 500791, 500807, 500809, 500831, 500839, 500861, 500873, 500881, 500887, 500891, 500909, 500911, 500921, 500923, 500933, 500947, 500953, 500957, 500977, 501001, 501013, 501019, 501029, 501031, 501037, 501043, 501077, 501089, 501103, 501121, 501131, 501133, 501139, 501157, 501173, 501187, 501191, 501197, 501203, 501209, 501217, 501223, 501229, 501233, 501257, 501271, 501287, 501299, 501317, 501341, 501343, 501367, 501383, 501401, 501409, 501419, 501427, 501451, 501463, 501493, 501503, 501511, 501563, 501577, 501593, 501601, 501617, 501623, 501637, 501659, 501691, 501701, 501703, 501707, 501719, 501731, 501769, 501779, 501803, 501817, 501821, 501827, 501829, 501841, 501863, 501889, 501911, 501931, 501947, 501953, 501967, 501971, 501997, 502001, 502013, 502039, 502043, 502057, 502063, 502079, 502081, 502087, 502093, 502121, 502133, 502141, 502171, 502181, 502217, 502237, 502247, 502259, 502261, 502277, 502301, 502321, 502339, 502393, 502409, 502421, 502429, 502441, 502451, 502487, 502499, 502501, 502507, 502517, 502543, 502549, 502553, 502591, 502597, 502613, 502631, 502633, 502643, 502651, 502669, 502687, 502699, 502703, 502717, 502729, 502769, 502771, 502781, 502787, 502807, 502819, 502829, 502841, 502847, 502861, 502883, 502919, 502921, 502937, 502961, 502973, 503003, 503017, 503039, 503053, 503077, 503123, 503131, 503137, 503147, 503159, 503197, 503207, 503213, 503227, 503231, 503233, 503249, 503267, 503287, 503297, 503303, 503317, 503339, 503351, 503359, 503369, 503381, 503383, 503389, 503407, 503413, 503423, 503431, 503441, 503453, 503483, 503501, 503543, 503549, 503551, 503563, 503593, 503599, 503609, 503611, 503621, 503623, 503647, 503653, 503663, 503707, 503717, 503743, 503753, 503771, 503777, 503779, 503791, 503803, 503819, 503821, 503827, 503851, 503857, 503869, 503879, 503911, 503927, 503929, 503939, 503947, 503959, 503963, 503969, 503983, 503989, 504001, 504011, 504017, 504047, 504061, 504073, 504103, 504121, 504139, 504143, 504149, 504151, 504157, 504181, 504187, 504197, 504209, 504221, 504247, 504269, 504289, 504299, 504307, 504311, 504323, 504337, 504349, 504353, 504359, 504377, 504379, 504389, 504403, 504457, 504461, 504473, 504479, 504521, 504523, 504527, 504547, 504563, 504593, 504599, 504607, 504617, 504619, 504631, 504661, 504667, 504671, 504677, 504683, 504727, 504767, 504787, 504797, 504799, 504817, 504821, 504851, 504853, 504857, 504871, 504877, 504893, 504901, 504929, 504937, 504943, 504947, 504953, 504967, 504983, 504989, 504991, 505027, 505031, 505033, 505049, 505051, 505061, 505067, 505073, 505091, 505097, 505111, 505117, 505123, 505129, 505139, 505157, 505159, 505181, 505187, 505201, 505213, 505231, 505237, 505277, 505279, 505283, 505301, 505313, 505319, 505321, 505327, 505339, 505357, 505367, 505369, 505399, 505409, 505411, 505429, 505447, 505459, 505469, 505481, 505493, 505501, 505511, 505513, 505523, 505537, 505559, 505573, 505601, 505607, 505613, 505619, 505633, 505639, 505643, 505657, 505663, 505669, 505691, 505693, 505709, 505711, 505727, 505759, 505763, 505777, 505781, 505811, 505819, 505823, 505867, 505871, 505877, 505907, 505919, 505927, 505949, 505961, 505969, 505979, 506047, 506071, 506083, 506101, 506113, 506119, 506131, 506147, 506171, 506173, 506183, 506201, 506213, 506251, 506263, 506269, 506281, 506291, 506327, 506329, 506333, 506339, 506347, 506351, 506357, 506381, 506393, 506417, 506423, 506449, 506459, 506461, 506479, 506491, 506501, 506507, 506531, 506533, 506537, 506551, 506563, 506573, 506591, 506593, 506599, 506609, 506629, 506647, 506663, 506683, 506687, 506689, 506699, 506729, 506731, 506743, 506773, 506783, 506791, 506797, 506809, 506837, 506843, 506861, 506873, 506887, 506893, 506899, 506903, 506911, 506929, 506941, 506963, 506983, 506993, 506999, 507029, 507049, 507071, 507077, 507079, 507103, 507109, 507113, 507119, 507137, 507139, 507149, 507151, 507163, 507193, 507197, 507217, 507289, 507301, 507313, 507317, 507329, 507347, 507349, 507359, 507361, 507371, 507383, 507401, 507421, 507431, 507461, 507491, 507497, 507499, 507503, 507523, 507557, 507571, 507589, 507593, 507599, 507607, 507631, 507641, 507667, 507673, 507691, 507697, 507713, 507719, 507743, 507757, 507779, 507781, 507797, 507803, 507809, 507821, 507827, 507839, 507883, 507901, 507907, 507917, 507919, 507937, 507953, 507961, 507971, 507979, 508009, 508019, 508021, 508033, 508037, 508073, 508087, 508091, 508097, 508103, 508129, 508159, 508171, 508187, 508213, 508223, 508229, 508237, 508243, 508259, 508271, 508273, 508297, 508301, 508327, 508331, 508349, 508363, 508367, 508373, 508393, 508433, 508439, 508451, 508471, 508477, 508489, 508499, 508513, 508517, 508531, 508549, 508559, 508567, 508577, 508579, 508583, 508619, 508621, 508637, 508643, 508661, 508693, 508709, 508727, 508771, 508789, 508799, 508811, 508817, 508841, 508847, 508867, 508901, 508903, 508909, 508913, 508919, 508931, 508943, 508951, 508957, 508961, 508969, 508973, 508987, 509023, 509027, 509053, 509063, 509071, 509087, 509101, 509123, 509137, 509147, 509149, 509203, 509221, 509227, 509239, 509263, 509281, 509287, 509293, 509297, 509317, 509329, 509359, 509363, 509389, 509393, 509413, 509417, 509429, 509441, 509449, 509477, 509513, 509521, 509543, 509549, 509557, 509563, 509569, 509573, 509581, 509591, 509603, 509623, 509633, 509647, 509653, 509659, 509681, 509687, 509689, 509693, 509699, 509723, 509731, 509737, 509741, 509767, 509783, 509797, 509801, 509833, 509837, 509843, 509863, 509867, 509879, 509909, 509911, 509921, 509939, 509947, 509959, 509963, 509989, 510007, 510031, 510047, 510049, 510061, 510067, 510073, 510077, 510079, 510089, 510101, 510121, 510127, 510137, 510157, 510179, 510199, 510203, 510217, 510227, 510233, 510241, 510247, 510253, 510271, 510287, 510299, 510311, 510319, 510331, 510361, 510379, 510383, 510401, 510403, 510449, 510451, 510457, 510463, 510481, 510529, 510551, 510553, 510569, 510581, 510583, 510589, 510611, 510613, 510617, 510619, 510677, 510683, 510691, 510707, 510709, 510751, 510767, 510773, 510793, 510803, 510817, 510823, 510827, 510847, 510889, 510907, 510919, 510931, 510941, 510943, 510989, 511001, 511013, 511019, 511033, 511039, 511057, 511061, 511087, 511109, 511111, 511123, 511151, 511153, 511163, 511169, 511171, 511177, 511193, 511201, 511211, 511213, 511223, 511237, 511243, 511261, 511279, 511289, 511297, 511327, 511333, 511337, 511351, 511361, 511387, 511391, 511409, 511417, 511439, 511447, 511453, 511457, 511463, 511477, 511487, 511507, 511519, 511523, 511541, 511549, 511559, 511573, 511579, 511583, 511591, 511603, 511627, 511631, 511633, 511669, 511691, 511703, 511711, 511723, 511757, 511787, 511793, 511801, 511811, 511831, 511843, 511859, 511867, 511873, 511891, 511897, 511909, 511933, 511939, 511961, 511963, 511991, 511997, 512009, 512011, 512021, 512047, 512059, 512093, 512101, 512137, 512147, 512167, 512207, 512249, 512251, 512269, 512287, 512311, 512321, 512333, 512353, 512389, 512419, 512429, 512443, 512467, 512497, 512503, 512507, 512521, 512531, 512537, 512543, 512569, 512573, 512579, 512581, 512591, 512593, 512597, 512609, 512621, 512641, 512657, 512663, 512671, 512683, 512711, 512713, 512717, 512741, 512747, 512761, 512767, 512779, 512797, 512803, 512819, 512821, 512843, 512849, 512891, 512899, 512903, 512917, 512921, 512927, 512929, 512959, 512977, 512989, 512999, 513001, 513013, 513017, 513031, 513041, 513047, 513053, 513059, 513067, 513083, 513101, 513103, 513109, 513131, 513137, 513157, 513167, 513169, 513173, 513203, 513239, 513257, 513269, 513277, 513283, 513307, 513311, 513313, 513319, 513341, 513347, 513353, 513367, 513371, 513397, 513407, 513419, 513427, 513431, 513439, 513473, 513479, 513481, 513509, 513511, 513529, 513533, 513593, 513631, 513641, 513649, 513673, 513679, 513683, 513691, 513697, 513719, 513727, 513731, 513739, 513749, 513761, 513767, 513769, 513781, 513829, 513839, 513841, 513871, 513881, 513899, 513917, 513923, 513937, 513943, 513977, 513991, 514001, 514009, 514013, 514021, 514049, 514051, 514057, 514061, 514079, 514081, 514093, 514103, 514117, 514123, 514127, 514147, 514177, 514187, 514201, 514219, 514229, 514243, 514247, 514249, 514271, 514277, 514289, 514309, 514313, 514333, 514343, 514357, 514361, 514379, 514399, 514417, 514429, 514433, 514453, 514499, 514513, 514519, 514523, 514529, 514531, 514543, 514561, 514571, 514621, 514637, 514639, 514643, 514649, 514651, 514669, 514681, 514711, 514733, 514739, 514741, 514747, 514751, 514757, 514769, 514783, 514793, 514819, 514823, 514831, 514841, 514847, 514853, 514859, 514867, 514873, 514889, 514903, 514933, 514939, 514949, 514967, 515041, 515087, 515089, 515111, 515143, 515149, 515153, 515173, 515191, 515227, 515231, 515233, 515237, 515279, 515293, 515311, 515323, 515351, 515357, 515369, 515371, 515377, 515381, 515401, 515429, 515477, 515507, 515519, 515539, 515563, 515579, 515587, 515597, 515611, 515621, 515639, 515651, 515653, 515663, 515677, 515681, 515687, 515693, 515701, 515737, 515741, 515761, 515771, 515773, 515777, 515783, 515803, 515813, 515839, 515843, 515857, 515861, 515873, 515887, 515917, 515923, 515929, 515941, 515951, 515969, 515993, 516017, 516023, 516049, 516053, 516077, 516091, 516127, 516151, 516157, 516161, 516163, 516169, 516179, 516193, 516199, 516209, 516223, 516227, 516233, 516247, 516251, 516253, 516277, 516283, 516293, 516319, 516323, 516349, 516359, 516361, 516371, 516377, 516391, 516407, 516421, 516431, 516433, 516437, 516449, 516457, 516469, 516493, 516499, 516517, 516521, 516539, 516541, 516563, 516587, 516589, 516599, 516611, 516617, 516619, 516623, 516643, 516653, 516673, 516679, 516689, 516701, 516709, 516713, 516721, 516727, 516757, 516793, 516811, 516821, 516829, 516839, 516847, 516871, 516877, 516883, 516907, 516911, 516931, 516947, 516949, 516959, 516973, 516977, 516979, 516991, 517003, 517043, 517061, 517067, 517073, 517079, 517081, 517087, 517091, 517129, 517151, 517169, 517177, 517183, 517189, 517207, 517211, 517217, 517229, 517241, 517243, 517249, 517261, 517267, 517277, 517289, 517303, 517337, 517343, 517367, 517373, 517381, 517393, 517399, 517403, 517411, 517417, 517457, 517459, 517469, 517471, 517481, 517487, 517499, 517501, 517507, 517511, 517513, 517547, 517549, 517553, 517571, 517577, 517589, 517597, 517603, 517609, 517613, 517619, 517637, 517639, 517711, 517717, 517721, 517729, 517733, 517739, 517747, 517817, 517823, 517831, 517861, 517873, 517877, 517901, 517919, 517927, 517931, 517949, 517967, 517981, 517991, 517999, 518017, 518047, 518057, 518059, 518083, 518099, 518101, 518113, 518123, 518129, 518131, 518137, 518153, 518159, 518171, 518179, 518191, 518207, 518209, 518233, 518237, 518239, 518249, 518261, 518291, 518299, 518311, 518327, 518341, 518387, 518389, 518411, 518417, 518429, 518431, 518447, 518467, 518471, 518473, 518509, 518521, 518533, 518543, 518579, 518587, 518597, 518611, 518621, 518657, 518689, 518699, 518717, 518729, 518737, 518741, 518743, 518747, 518759, 518761, 518767, 518779, 518801, 518803, 518807, 518809, 518813, 518831, 518863, 518867, 518893, 518911, 518933, 518953, 518981, 518983, 518989, 519011, 519031, 519037, 519067, 519083, 519089, 519091, 519097, 519107, 519119, 519121, 519131, 519151, 519161, 519193, 519217, 519227, 519229, 519247, 519257, 519269, 519283, 519287, 519301, 519307, 519349, 519353, 519359, 519371, 519373, 519383, 519391, 519413, 519427, 519433, 519457, 519487, 519499, 519509, 519521, 519523, 519527, 519539, 519551, 519553, 519577, 519581, 519587, 519611, 519619, 519643, 519647, 519667, 519683, 519691, 519703, 519713, 519733, 519737, 519769, 519787, 519793, 519797, 519803, 519817, 519863, 519881, 519889, 519907, 519917, 519919, 519923, 519931, 519943, 519947, 519971, 519989, 519997, 520019, 520021, 520031, 520043, 520063, 520067, 520073, 520103, 520111, 520123, 520129, 520151, 520193, 520213, 520241, 520279, 520291, 520297, 520307, 520309, 520313, 520339, 520349, 520357, 520361, 520363, 520369, 520379, 520381, 520393, 520409, 520411, 520423, 520427, 520433, 520447, 520451, 520529, 520547, 520549, 520567, 520571, 520589, 520607, 520609, 520621, 520631, 520633, 520649, 520679, 520691, 520699, 520703, 520717, 520721, 520747, 520759, 520763, 520787, 520813, 520837, 520841, 520853, 520867, 520889, 520913, 520921, 520943, 520957, 520963, 520967, 520969, 520981, 521009, 521021, 521023, 521039, 521041, 521047, 521051, 521063, 521107, 521119, 521137, 521153, 521161, 521167, 521173, 521177, 521179, 521201, 521231, 521243, 521251, 521267, 521281, 521299, 521309, 521317, 521329, 521357, 521359, 521363, 521369, 521377, 521393, 521399, 521401, 521429, 521447, 521471, 521483, 521491, 521497, 521503, 521519, 521527, 521533, 521537, 521539, 521551, 521557, 521567, 521581, 521603, 521641, 521657, 521659, 521669, 521671, 521693, 521707, 521723, 521743, 521749, 521753, 521767, 521777, 521789, 521791, 521809, 521813, 521819, 521831, 521861, 521869, 521879, 521881, 521887, 521897, 521903, 521923, 521929, 521981, 521993, 521999, 522017, 522037, 522047, 522059, 522061, 522073, 522079, 522083, 522113, 522127, 522157, 522161, 522167, 522191, 522199, 522211, 522227, 522229, 522233, 522239, 522251, 522259, 522281, 522283, 522289, 522317, 522323, 522337, 522371, 522373, 522383, 522391, 522409, 522413, 522439, 522449, 522469, 522479, 522497, 522517, 522521, 522523, 522541, 522553, 522569, 522601, 522623, 522637, 522659, 522661, 522673, 522677, 522679, 522689, 522703, 522707, 522719, 522737, 522749, 522757, 522761, 522763, 522787, 522811, 522827, 522829, 522839, 522853, 522857, 522871, 522881, 522883, 522887, 522919, 522943, 522947, 522959, 522961, 522989, 523007, 523021, 523031, 523049, 523093, 523097, 523109, 523129, 523169, 523177, 523207, 523213, 523219, 523261, 523297, 523307, 523333, 523349, 523351, 523357, 523387, 523403, 523417, 523427, 523433, 523459, 523463, 523487, 523489, 523493, 523511, 523519, 523541, 523543, 523553, 523571, 523573, 523577, 523597, 523603, 523631, 523637, 523639, 523657, 523667, 523669, 523673, 523681, 523717, 523729, 523741, 523759, 523763, 523771, 523777, 523793, 523801, 523829, 523847, 523867, 523877, 523903, 523907, 523927, 523937, 523949, 523969, 523987, 523997, 524047, 524053, 524057, 524063, 524071, 524081, 524087, 524099, 524113, 524119, 524123, 524149, 524171, 524189, 524197, 524201, 524203, 524219, 524221, 524231, 524243, 524257, 524261, 524269, 524287, 524309, 524341, 524347, 524351, 524353, 524369, 524387, 524389, 524411, 524413, 524429, 524453, 524497, 524507, 524509, 524519, 524521, 524591, 524593, 524599, 524633, 524669, 524681, 524683, 524701, 524707, 524731, 524743, 524789, 524801, 524803, 524827, 524831, 524857, 524863, 524869, 524873, 524893, 524899, 524921, 524933, 524939, 524941, 524947, 524957, 524959, 524963, 524969, 524971, 524981, 524983, 524999, 525001, 525013, 525017, 525029, 525043, 525101, 525127, 525137, 525143, 525157, 525163, 525167, 525191, 525193, 525199, 525209, 525221, 525241, 525247, 525253, 525257, 525299, 525313, 525353, 525359, 525361, 525373, 525377, 525379, 525391, 525397, 525409, 525431, 525433, 525439, 525457, 525461, 525467, 525491, 525493, 525517, 525529, 525533, 525541, 525571, 525583, 525593, 525599, 525607, 525641, 525649, 525671, 525677, 525697, 525709, 525713, 525719, 525727, 525731, 525739, 525769, 525773, 525781, 525809, 525817, 525839, 525869, 525871, 525887, 525893, 525913, 525923, 525937, 525947, 525949, 525953, 525961, 525979, 525983, 526027, 526037, 526049, 526051, 526063, 526067, 526069, 526073, 526087, 526117, 526121, 526139, 526157, 526159, 526189, 526193, 526199, 526213, 526223, 526231, 526249, 526271, 526283, 526289, 526291, 526297, 526307, 526367, 526373, 526381, 526387, 526391, 526397, 526423, 526429, 526441, 526453, 526459, 526483, 526499, 526501, 526511, 526531, 526543, 526571, 526573, 526583, 526601, 526619, 526627, 526633, 526637, 526649, 526651, 526657, 526667, 526679, 526681, 526703, 526709, 526717, 526733, 526739, 526741, 526759, 526763, 526777, 526781, 526829, 526831, 526837, 526853, 526859, 526871, 526909, 526913, 526931, 526937, 526943, 526951, 526957, 526963, 526993, 526997, 527053, 527057, 527063, 527069, 527071, 527081, 527099, 527123, 527129, 527143, 527159, 527161, 527173, 527179, 527203, 527207, 527209, 527237, 527251, 527273, 527281, 527291, 527327, 527333, 527347, 527353, 527377, 527381, 527393, 527399, 527407, 527411, 527419, 527441, 527447, 527453, 527489, 527507, 527533, 527557, 527563, 527581, 527591, 527599, 527603, 527623, 527627, 527633, 527671, 527699, 527701, 527729, 527741, 527749, 527753, 527789, 527803, 527809, 527819, 527843, 527851, 527869, 527881, 527897, 527909, 527921, 527929, 527941, 527981, 527983, 527987, 527993, 528001, 528013, 528041, 528043, 528053, 528091, 528097, 528107, 528127, 528131, 528137, 528163, 528167, 528191, 528197, 528217, 528223, 528247, 528263, 528289, 528299, 528313, 528317, 528329, 528373, 528383, 528391, 528401, 528403, 528413, 528419, 528433, 528469, 528487, 528491, 528509, 528511, 528527, 528559, 528611, 528623, 528629, 528631, 528659, 528667, 528673, 528679, 528691, 528707, 528709, 528719, 528763, 528779, 528791, 528799, 528811, 528821, 528823, 528833, 528863, 528877, 528881, 528883, 528911, 528929, 528947, 528967, 528971, 528973, 528991, 529003, 529007, 529027, 529033, 529037, 529043, 529049, 529051, 529097, 529103, 529117, 529121, 529127, 529129, 529153, 529157, 529181, 529183, 529213, 529229, 529237, 529241, 529259, 529271, 529273, 529301, 529307, 529313, 529327, 529343, 529349, 529357, 529381, 529393, 529411, 529421, 529423, 529471, 529489, 529513, 529517, 529519, 529531, 529547, 529577, 529579, 529603, 529619, 529637, 529649, 529657, 529673, 529681, 529687, 529691, 529693, 529709, 529723, 529741, 529747, 529751, 529807, 529811, 529813, 529819, 529829, 529847, 529871, 529927, 529933, 529939, 529957, 529961, 529973, 529979, 529981, 529987, 529999, 530017, 530021, 530027, 530041, 530051, 530063, 530087, 530093, 530129, 530137, 530143, 530177, 530183, 530197, 530203, 530209, 530227, 530237, 530249, 530251, 530261, 530267, 530279, 530293, 530297, 530303, 530329, 530333, 530339, 530353, 530359, 530389, 530393, 530401, 530429, 530443, 530447, 530501, 530507, 530513, 530527, 530531, 530533, 530539, 530549, 530567, 530597, 530599, 530603, 530609, 530641, 530653, 530659, 530669, 530693, 530701, 530711, 530713, 530731, 530741, 530743, 530753, 530767, 530773, 530797, 530807, 530833, 530837, 530843, 530851, 530857, 530861, 530869, 530897, 530911, 530947, 530969, 530977, 530983, 530989, 531017, 531023, 531043, 531071, 531079, 531101, 531103, 531121, 531133, 531143, 531163, 531169, 531173, 531197, 531203, 531229, 531239, 531253, 531263, 531281, 531287, 531299, 531331, 531337, 531343, 531347, 531353, 531359, 531383, 531457, 531481, 531497, 531521, 531547, 531551, 531569, 531571, 531581, 531589, 531611, 531613, 531623, 531631, 531637, 531667, 531673, 531689, 531701, 531731, 531793, 531799, 531821, 531823, 531827, 531833, 531841, 531847, 531857, 531863, 531871, 531877, 531901, 531911, 531919, 531977, 531983, 531989, 531997, 532001, 532009, 532027, 532033, 532061, 532069, 532093, 532099, 532141, 532153, 532159, 532163, 532183, 532187, 532193, 532199, 532241, 532249, 532261, 532267, 532277, 532283, 532307, 532313, 532327, 532331, 532333, 532349, 532373, 532379, 532391, 532403, 532417, 532421, 532439, 532447, 532451, 532453, 532489, 532501, 532523, 532529, 532531, 532537, 532547, 532561, 532601, 532603, 532607, 532619, 532621, 532633, 532639, 532663, 532669, 532687, 532691, 532709, 532733, 532739, 532751, 532757, 532771, 532781, 532783, 532789, 532801, 532811, 532823, 532849, 532853, 532867, 532907, 532919, 532949, 532951, 532981, 532993, 532999, 533003, 533009, 533011, 533033, 533051, 533053, 533063, 533077, 533089, 533111, 533129, 533149, 533167, 533177, 533189, 533191, 533213, 533219, 533227, 533237, 533249, 533257, 533261, 533263, 533297, 533303, 533317, 533321, 533327, 533353, 533363, 533371, 533389, 533399, 533413, 533447, 533453, 533459, 533509, 533543, 533549, 533573, 533581, 533593, 533633, 533641, 533671, 533693, 533711, 533713, 533719, 533723, 533737, 533747, 533777, 533801, 533809, 533821, 533831, 533837, 533857, 533879, 533887, 533893, 533909, 533921, 533927, 533959, 533963, 533969, 533971, 533989, 533993, 533999, 534007, 534013, 534019, 534029, 534043, 534047, 534049, 534059, 534073, 534077, 534091, 534101, 534113, 534137, 534167, 534173, 534199, 534203, 534211, 534229, 534241, 534253, 534283, 534301, 534307, 534311, 534323, 534329, 534341, 534367, 534371, 534403, 534407, 534431, 534439, 534473, 534491, 534511, 534529, 534553, 534571, 534577, 534581, 534601, 534607, 534617, 534629, 534631, 534637, 534647, 534649, 534659, 534661, 534671, 534697, 534707, 534739, 534799, 534811, 534827, 534839, 534841, 534851, 534857, 534883, 534889, 534913, 534923, 534931, 534943, 534949, 534971, 535013, 535019, 535033, 535037, 535061, 535099, 535103, 535123, 535133, 535151, 535159, 535169, 535181, 535193, 535207, 535219, 535229, 535237, 535243, 535273, 535303, 535319, 535333, 535349, 535351, 535361, 535387, 535391, 535399, 535481, 535487, 535489, 535499, 535511, 535523, 535529, 535547, 535571, 535573, 535589, 535607, 535609, 535627, 535637, 535663, 535669, 535673, 535679, 535697, 535709, 535727, 535741, 535751, 535757, 535771, 535783, 535793, 535811, 535849, 535859, 535861, 535879, 535919, 535937, 535939, 535943, 535957, 535967, 535973, 535991, 535999, 536017, 536023, 536051, 536057, 536059, 536069, 536087, 536099, 536101, 536111, 536141, 536147, 536149, 536189, 536191, 536203, 536213, 536219, 536227, 536233, 536243, 536267, 536273, 536279, 536281, 536287, 536293, 536311, 536323, 536353, 536357, 536377, 536399, 536407, 536423, 536441, 536443, 536447, 536449, 536453, 536461, 536467, 536479, 536491, 536509, 536513, 536531, 536533, 536561, 536563, 536593, 536609, 536621, 536633, 536651, 536671, 536677, 536687, 536699, 536717, 536719, 536729, 536743, 536749, 536771, 536773, 536777, 536779, 536791, 536801, 536803, 536839, 536849, 536857, 536867, 536869, 536891, 536909, 536917, 536923, 536929, 536933, 536947, 536953, 536971, 536989, 536999, 537001, 537007, 537011, 537023, 537029, 537037, 537041, 537067, 537071, 537079, 537091, 537127, 537133, 537143, 537157, 537169, 537181, 537191, 537197, 537221, 537233, 537241, 537269, 537281, 537287, 537307, 537331, 537343, 537347, 537373, 537379, 537401, 537403, 537413, 537497, 537527, 537547, 537569, 537583, 537587, 537599, 537611, 537637, 537661, 537673, 537679, 537703, 537709, 537739, 537743, 537749, 537769, 537773, 537781, 537787, 537793, 537811, 537841, 537847, 537853, 537877, 537883, 537899, 537913, 537919, 537941, 537991, 538001, 538019, 538049, 538051, 538073, 538079, 538093, 538117, 538121, 538123, 538127, 538147, 538151, 538157, 538159, 538163, 538199, 538201, 538247, 538249, 538259, 538267, 538283, 538297, 538301, 538303, 538309, 538331, 538333, 538357, 538367, 538397, 538399, 538411, 538423, 538457, 538471, 538481, 538487, 538511, 538513, 538519, 538523, 538529, 538553, 538561, 538567, 538579, 538589, 538597, 538621, 538649, 538651, 538697, 538709, 538711, 538721, 538723, 538739, 538751, 538763, 538771, 538777, 538789, 538799, 538801, 538817, 538823, 538829, 538841, 538871, 538877, 538921, 538927, 538931, 538939, 538943, 538987, 539003, 539009, 539039, 539047, 539089, 539093, 539101, 539107, 539111, 539113, 539129, 539141, 539153, 539159, 539167, 539171, 539207, 539219, 539233, 539237, 539261, 539267, 539269, 539293, 539303, 539309, 539311, 539321, 539323, 539339, 539347, 539351, 539389, 539401, 539447, 539449, 539479, 539501, 539503, 539507, 539509, 539533, 539573, 539621, 539629, 539633, 539639, 539641, 539653, 539663, 539677, 539687, 539711, 539713, 539723, 539729, 539743, 539761, 539783, 539797, 539837, 539839, 539843, 539849, 539863, 539881, 539897, 539899, 539921, 539947, 539993, 540041, 540061, 540079, 540101, 540119, 540121, 540139, 540149, 540157, 540167, 540173, 540179, 540181, 540187, 540203, 540217, 540233, 540251, 540269, 540271, 540283, 540301, 540307, 540343, 540347, 540349, 540367, 540373, 540377, 540383, 540389, 540391, 540433, 540437, 540461, 540469, 540509, 540511, 540517, 540539, 540541, 540557, 540559, 540577, 540587, 540599, 540611, 540613, 540619, 540629, 540677, 540679, 540689, 540691, 540697, 540703, 540713, 540751, 540769, 540773, 540779, 540781, 540803, 540809, 540823, 540851, 540863, 540871, 540877, 540901, 540907, 540961, 540989, 541001, 541007, 541027, 541049, 541061, 541087, 541097, 541129, 541133, 541141, 541153, 541181, 541193, 541201, 541217, 541231, 541237, 541249, 541267, 541271, 541283, 541301, 541309, 541339, 541349, 541361, 541363, 541369, 541381, 541391, 541417, 541439, 541447, 541469, 541483, 541507, 541511, 541523, 541529, 541531, 541537, 541543, 541547, 541549, 541571, 541577, 541579, 541589, 541613, 541631, 541657, 541661, 541669, 541693, 541699, 541711, 541721, 541727, 541759, 541763, 541771, 541777, 541781, 541799, 541817, 541831, 541837, 541859, 541889, 541901, 541927, 541951, 541967, 541987, 541991, 541993, 541999, 542021, 542023, 542027, 542053, 542063, 542071, 542081, 542083, 542093, 542111, 542117, 542119, 542123, 542131, 542141, 542149, 542153, 542167, 542183, 542189, 542197, 542207, 542219, 542237, 542251, 542261, 542263, 542281, 542293, 542299, 542323, 542371, 542401, 542441, 542447, 542461, 542467, 542483, 542489, 542497, 542519, 542533, 542537, 542539, 542551, 542557, 542567, 542579, 542587, 542599, 542603, 542683, 542687, 542693, 542713, 542719, 542723, 542747, 542761, 542771, 542783, 542791, 542797, 542821, 542831, 542837, 542873, 542891, 542911, 542921, 542923, 542933, 542939, 542947, 542951, 542981, 542987, 542999, 543017, 543019, 543029, 543061, 543097, 543113, 543131, 543139, 543143, 543149, 543157, 543161, 543163, 543187, 543203, 543217, 543223, 543227, 543233, 543241, 543253, 543259, 543281, 543287, 543289, 543299, 543307, 543311, 543313, 543341, 543349, 543353, 543359, 543379, 543383, 543407, 543427, 543463, 543497, 543503, 543509, 543539, 543551, 543553, 543593, 543601, 543607, 543611, 543617, 543637, 543659, 543661, 543671, 543679, 543689, 543703, 543707, 543713, 543769, 543773, 543787, 543791, 543793, 543797, 543811, 543827, 543841, 543853, 543857, 543859, 543871, 543877, 543883, 543887, 543889, 543901, 543911, 543929, 543967, 543971, 543997, 544001, 544007, 544009, 544013, 544021, 544031, 544097, 544099, 544109, 544123, 544129, 544133, 544139, 544171, 544177, 544183, 544199, 544223, 544259, 544273, 544277, 544279, 544367, 544373, 544399, 544403, 544429, 544451, 544471, 544477, 544487, 544501, 544513, 544517, 544543, 544549, 544601, 544613, 544627, 544631, 544651, 544667, 544699, 544717, 544721, 544723, 544727, 544757, 544759, 544771, 544781, 544793, 544807, 544813, 544837, 544861, 544877, 544879, 544883, 544889, 544897, 544903, 544919, 544927, 544937, 544961, 544963, 544979, 545023, 545029, 545033, 545057, 545063, 545087, 545089, 545093, 545117, 545131, 545141, 545143, 545161, 545189, 545203, 545213, 545231, 545239, 545257, 545267, 545291, 545329, 545371, 545387, 545429, 545437, 545443, 545449, 545473, 545477, 545483, 545497, 545521, 545527, 545533, 545543, 545549, 545551, 545579, 545599, 545609, 545617, 545621, 545641, 545647, 545651, 545663, 545711, 545723, 545731, 545747, 545749, 545759, 545773, 545789, 545791, 545827, 545843, 545863, 545873, 545893, 545899, 545911, 545917, 545929, 545933, 545939, 545947, 545959, 546001, 546017, 546019, 546031, 546047, 546053, 546067, 546071, 546097, 546101, 546103, 546109, 546137, 546149, 546151, 546173, 546179, 546197, 546211, 546233, 546239, 546241, 546253, 546263, 546283, 546289, 546317, 546323, 546341, 546349, 546353, 546361, 546367, 546373, 546391, 546461, 546467, 546479, 546509, 546523, 546547, 546569, 546583, 546587, 546599, 546613, 546617, 546619, 546631, 546643, 546661, 546671, 546677, 546683, 546691, 546709, 546719, 546731, 546739, 546781, 546841, 546859, 546863, 546869, 546881, 546893, 546919, 546937, 546943, 546947, 546961, 546967, 546977, 547007, 547021, 547037, 547061, 547087, 547093, 547097, 547103, 547121, 547133, 547139, 547171, 547223, 547229, 547237, 547241, 547249, 547271, 547273, 547291, 547301, 547321, 547357, 547361, 547363, 547369, 547373, 547387, 547397, 547399, 547411, 547441, 547453, 547471, 547483, 547487, 547493, 547499, 547501, 547513, 547529, 547537, 547559, 547567, 547577, 547583, 547601, 547609, 547619, 547627, 547639, 547643, 547661, 547663, 547681, 547709, 547727, 547741, 547747, 547753, 547763, 547769, 547787, 547817, 547819, 547823, 547831, 547849, 547853, 547871, 547889, 547901, 547909, 547951, 547957, 547999, 548003, 548039, 548059, 548069, 548083, 548089, 548099, 548117, 548123, 548143, 548153, 548189, 548201, 548213, 548221, 548227, 548239, 548243, 548263, 548291, 548309, 548323, 548347, 548351, 548363, 548371, 548393, 548399, 548407, 548417, 548423, 548441, 548453, 548459, 548461, 548489, 548501, 548503, 548519, 548521, 548533, 548543, 548557, 548567, 548579, 548591, 548623, 548629, 548657, 548671, 548677, 548687, 548693, 548707, 548719, 548749, 548753, 548761, 548771, 548783, 548791, 548827, 548831, 548833, 548837, 548843, 548851, 548861, 548869, 548893, 548897, 548903, 548909, 548927, 548953, 548957, 548963, 549001, 549011, 549013, 549019, 549023, 549037, 549071, 549089, 549091, 549097, 549121, 549139, 549149, 549161, 549163, 549167, 549169, 549193, 549203, 549221, 549229, 549247, 549257, 549259, 549281, 549313, 549319, 549323, 549331, 549379, 549391, 549403, 549421, 549431, 549443, 549449, 549481, 549503, 549509, 549511, 549517, 549533, 549547, 549551, 549553, 549569, 549587, 549589, 549607, 549623, 549641, 549643, 549649, 549667, 549683, 549691, 549701, 549707, 549713, 549719, 549733, 549737, 549739, 549749, 549751, 549767, 549817, 549833, 549839, 549863, 549877, 549883, 549911, 549937, 549943, 549949, 549977, 549979, 550007, 550009, 550027, 550049, 550061, 550063, 550073, 550111, 550117, 550127, 550129, 550139, 550163, 550169, 550177, 550181, 550189, 550211, 550213, 550241, 550267, 550279, 550283, 550289, 550309, 550337, 550351, 550369, 550379, 550427, 550439, 550441, 550447, 550457, 550469, 550471, 550489, 550513, 550519, 550531, 550541, 550553, 550577, 550607, 550609, 550621, 550631, 550637, 550651, 550657, 550661, 550663, 550679, 550691, 550703, 550717, 550721, 550733, 550757, 550763, 550789, 550801, 550811, 550813, 550831, 550841, 550843, 550859, 550861, 550903, 550909, 550937, 550939, 550951, 550961, 550969, 550973, 550993, 550997, 551003, 551017, 551027, 551039, 551059, 551063, 551069, 551093, 551099, 551107, 551113, 551129, 551143, 551179, 551197, 551207, 551219, 551231, 551233, 551269, 551281, 551297, 551311, 551321, 551339, 551347, 551363, 551381, 551387, 551407, 551423, 551443, 551461, 551483, 551489, 551503, 551519, 551539, 551543, 551549, 551557, 551569, 551581, 551587, 551597, 551651, 551653, 551659, 551671, 551689, 551693, 551713, 551717, 551723, 551729, 551731, 551743, 551753, 551767, 551773, 551801, 551809, 551813, 551843, 551849, 551861, 551909, 551911, 551917, 551927, 551933, 551951, 551959, 551963, 551981, 552001, 552011, 552029, 552031, 552047, 552053, 552059, 552089, 552091, 552103, 552107, 552113, 552127, 552137, 552179, 552193, 552217, 552239, 552241, 552259, 552263, 552271, 552283, 552301, 552317, 552341, 552353, 552379, 552397, 552401, 552403, 552469, 552473, 552481, 552491, 552493, 552511, 552523, 552527, 552553, 552581, 552583, 552589, 552611, 552649, 552659, 552677, 552703, 552707, 552709, 552731, 552749, 552751, 552757, 552787, 552791, 552793, 552809, 552821, 552833, 552841, 552847, 552859, 552883, 552887, 552899, 552913, 552917, 552971, 552983, 552991, 553013, 553037, 553043, 553051, 553057, 553067, 553073, 553093, 553097, 553099, 553103, 553123, 553139, 553141, 553153, 553171, 553181, 553193, 553207, 553211, 553229, 553249, 553253, 553277, 553279, 553309, 553351, 553363, 553369, 553411, 553417, 553433, 553439, 553447, 553457, 553463, 553471, 553481, 553507, 553513, 553517, 553529, 553543, 553549, 553561, 553573, 553583, 553589, 553591, 553601, 553607, 553627, 553643, 553649, 553667, 553681, 553687, 553699, 553703, 553727, 553733, 553747, 553757, 553759, 553769, 553789, 553811, 553837, 553849, 553867, 553873, 553897, 553901, 553919, 553921, 553933, 553961, 553963, 553981, 553991, 554003, 554011, 554017, 554051, 554077, 554087, 554089, 554117, 554123, 554129, 554137, 554167, 554171, 554179, 554189, 554207, 554209, 554233, 554237, 554263, 554269, 554293, 554299, 554303, 554317, 554347, 554377, 554383, 554417, 554419, 554431, 554447, 554453, 554467, 554503, 554527, 554531, 554569, 554573, 554597, 554611, 554627, 554633, 554639, 554641, 554663, 554669, 554677, 554699, 554707, 554711, 554731, 554747, 554753, 554759, 554767, 554779, 554789, 554791, 554797, 554803, 554821, 554833, 554837, 554839, 554843, 554849, 554887, 554891, 554893, 554899, 554923, 554927, 554951, 554959, 554969, 554977, 555029, 555041, 555043, 555053, 555073, 555077, 555083, 555091, 555097, 555109, 555119, 555143, 555167, 555209, 555221, 555251, 555253, 555257, 555277, 555287, 555293, 555301, 555307, 555337, 555349, 555361, 555383, 555391, 555419, 555421, 555439, 555461, 555487, 555491, 555521, 555523, 555557, 555589, 555593, 555637, 555661, 555671, 555677, 555683, 555691, 555697, 555707, 555739, 555743, 555761, 555767, 555823, 555827, 555829, 555853, 555857, 555871, 555931, 555941, 555953, 555967, 556007, 556021, 556027, 556037, 556043, 556051, 556067, 556069, 556093, 556103, 556123, 556159, 556177, 556181, 556211, 556219, 556229, 556243, 556253, 556261, 556267, 556271, 556273, 556279, 556289, 556313, 556321, 556327, 556331, 556343, 556351, 556373, 556399, 556403, 556441, 556459, 556477, 556483, 556487, 556513, 556519, 556537, 556559, 556573, 556579, 556583, 556601, 556607, 556609, 556613, 556627, 556639, 556651, 556679, 556687, 556691, 556693, 556697, 556709, 556723, 556727, 556741, 556753, 556763, 556769, 556781, 556789, 556793, 556799, 556811, 556817, 556819, 556823, 556841, 556849, 556859, 556861, 556867, 556883, 556891, 556931, 556939, 556943, 556957, 556967, 556981, 556987, 556999, 557017, 557021, 557027, 557033, 557041, 557057, 557059, 557069, 557087, 557093, 557153, 557159, 557197, 557201, 557261, 557269, 557273, 557281, 557303, 557309, 557321, 557329, 557339, 557369, 557371, 557377, 557423, 557443, 557449, 557461, 557483, 557489, 557519, 557521, 557533, 557537, 557551, 557567, 557573, 557591, 557611, 557633, 557639, 557663, 557671, 557693, 557717, 557729, 557731, 557741, 557743, 557747, 557759, 557761, 557779, 557789, 557801, 557803, 557831, 557857, 557861, 557863, 557891, 557899, 557903, 557927, 557981, 557987, 558007, 558017, 558029, 558053, 558067, 558083, 558091, 558109, 558113, 558121, 558139, 558149, 558167, 558179, 558197, 558203, 558209, 558223, 558241, 558251, 558253, 558287, 558289, 558307, 558319, 558343, 558401, 558413, 558421, 558427, 558431, 558457, 558469, 558473, 558479, 558491, 558497, 558499, 558521, 558529, 558533, 558539, 558541, 558563, 558583, 558587, 558599, 558611, 558629, 558643, 558661, 558683, 558703, 558721, 558731, 558757, 558769, 558781, 558787, 558791, 558793, 558827, 558829, 558863, 558869, 558881, 558893, 558913, 558931, 558937, 558947, 558973, 558979, 558997, 559001, 559049, 559051, 559067, 559081, 559093, 559099, 559123, 559133, 559157, 559177, 559183, 559201, 559211, 559213, 559217, 559219, 559231, 559243, 559259, 559277, 559297, 559313, 559319, 559343, 559357, 559367, 559369, 559397, 559421, 559451, 559459, 559469, 559483, 559511, 559513, 559523, 559529, 559541, 559547, 559549, 559561, 559571, 559577, 559583, 559591, 559597, 559631, 559633, 559639, 559649, 559667, 559673, 559679, 559687, 559703, 559709, 559739, 559747, 559777, 559781, 559799, 559807, 559813, 559831, 559841, 559849, 559859, 559877, 559883, 559901, 559907, 559913, 559939, 559967, 559973, 559991, 560017, 560023, 560029, 560039, 560047, 560081, 560083, 560089, 560093, 560107, 560113, 560117, 560123, 560137, 560149, 560159, 560171, 560173, 560179, 560191, 560207, 560213, 560221, 560227, 560233, 560237, 560239, 560243, 560249, 560281, 560293, 560297, 560299, 560311, 560317, 560341, 560353, 560393, 560411, 560437, 560447, 560459, 560471, 560477, 560479, 560489, 560491, 560501, 560503, 560531, 560543, 560551, 560561, 560597, 560617, 560621, 560639, 560641, 560653, 560669, 560683, 560689, 560701, 560719, 560737, 560753, 560761, 560767, 560771, 560783, 560797, 560803, 560827, 560837, 560863, 560869, 560873, 560887, 560891, 560893, 560897, 560929, 560939, 560941, 560969, 560977, 561019, 561047, 561053, 561059, 561061, 561079, 561083, 561091, 561097, 561101, 561103, 561109, 561161, 561173, 561181, 561191, 561199, 561229, 561251, 561277, 561307, 561313, 561343, 561347, 561359, 561367, 561373, 561377, 561389, 561409, 561419, 561439, 561461, 561521, 561529, 561551, 561553, 561559, 561599, 561607, 561667, 561703, 561713, 561733, 561761, 561767, 561787, 561797, 561809, 561829, 561839, 561907, 561917, 561923, 561931, 561943, 561947, 561961, 561973, 561983, 561997, 562007, 562019, 562021, 562043, 562091, 562103, 562129, 562147, 562169, 562181, 562193, 562201, 562231, 562259, 562271, 562273, 562283, 562291, 562297, 562301, 562307, 562313, 562333, 562337, 562349, 562351, 562357, 562361, 562399, 562403, 562409, 562417, 562421, 562427, 562439, 562459, 562477, 562493, 562501, 562517, 562519, 562537, 562577, 562579, 562589, 562591, 562607, 562613, 562621, 562631, 562633, 562651, 562663, 562669, 562673, 562691, 562693, 562699, 562703, 562711, 562721, 562739, 562753, 562759, 562763, 562781, 562789, 562813, 562831, 562841, 562871, 562897, 562901, 562909, 562931, 562943, 562949, 562963, 562967, 562973, 562979, 562987, 562997, 563009, 563011, 563021, 563039, 563041, 563047, 563051, 563077, 563081, 563099, 563113, 563117, 563119, 563131, 563149, 563153, 563183, 563197, 563219, 563249, 563263, 563287, 563327, 563351, 563357, 563359, 563377, 563401, 563411, 563413, 563417, 563419, 563447, 563449, 563467, 563489, 563501, 563503, 563543, 563551, 563561, 563587, 563593, 563599, 563623, 563657, 563663, 563723, 563743, 563747, 563777, 563809, 563813, 563821, 563831, 563837, 563851, 563869, 563881, 563887, 563897, 563929, 563933, 563947, 563971, 563987, 563999, 564013, 564017, 564041, 564049, 564059, 564061, 564089, 564097, 564103, 564127, 564133, 564149, 564163, 564173, 564191, 564197, 564227, 564229, 564233, 564251, 564257, 564269, 564271, 564299, 564301, 564307, 564313, 564323, 564353, 564359, 564367, 564371, 564373, 564391, 564401, 564407, 564409, 564419, 564437, 564449, 564457, 564463, 564467, 564491, 564497, 564523, 564533, 564593, 564607, 564617, 564643, 564653, 564667, 564671, 564679, 564701, 564703, 564709, 564713, 564761, 564779, 564793, 564797, 564827, 564871, 564881, 564899, 564917, 564919, 564923, 564937, 564959, 564973, 564979, 564983, 564989, 564997, 565013, 565039, 565049, 565057, 565069, 565109, 565111, 565127, 565163, 565171, 565177, 565183, 565189, 565207, 565237, 565241, 565247, 565259, 565261, 565273, 565283, 565289, 565303, 565319, 565333, 565337, 565343, 565361, 565379, 565381, 565387, 565391, 565393, 565427, 565429, 565441, 565451, 565463, 565469, 565483, 565489, 565507, 565511, 565517, 565519, 565549, 565553, 565559, 565567, 565571, 565583, 565589, 565597, 565603, 565613, 565637, 565651, 565661, 565667, 565723, 565727, 565769, 565771, 565787, 565793, 565813, 565849, 565867, 565889, 565891, 565907, 565909, 565919, 565921, 565937, 565973, 565979, 565997, 566011, 566023, 566047, 566057, 566077, 566089, 566101, 566107, 566131, 566149, 566161, 566173, 566179, 566183, 566201, 566213, 566227, 566231, 566233, 566273, 566311, 566323, 566347, 566387, 566393, 566413, 566417, 566429, 566431, 566437, 566441, 566443, 566453, 566521, 566537, 566539, 566543, 566549, 566551, 566557, 566563, 566567, 566617, 566633, 566639, 566653, 566659, 566677, 566681, 566693, 566701, 566707, 566717, 566719, 566723, 566737, 566759, 566767, 566791, 566821, 566833, 566851, 566857, 566879, 566911, 566939, 566947, 566963, 566971, 566977, 566987, 566999, 567011, 567013, 567031, 567053, 567059, 567067, 567097, 567101, 567107, 567121, 567143, 567179, 567181, 567187, 567209, 567257, 567263, 567277, 567319, 567323, 567367, 567377, 567383, 567389, 567401, 567407, 567439, 567449, 567451, 567467, 567487, 567493, 567499, 567527, 567529, 567533, 567569, 567601, 567607, 567631, 567649, 567653, 567659, 567661, 567667, 567673, 567689, 567719, 567737, 567751, 567761, 567767, 567779, 567793, 567811, 567829, 567841, 567857, 567863, 567871, 567877, 567881, 567883, 567899, 567937, 567943, 567947, 567949, 567961, 567979, 567991, 567997, 568019, 568027, 568033, 568049, 568069, 568091, 568097, 568109, 568133, 568151, 568153, 568163, 568171, 568177, 568187, 568189, 568193, 568201, 568207, 568231, 568237, 568241, 568273, 568279, 568289, 568303, 568349, 568363, 568367, 568387, 568391, 568433, 568439, 568441, 568453, 568471, 568481, 568493, 568523, 568541, 568549, 568577, 568609, 568619, 568627, 568643, 568657, 568669, 568679, 568691, 568699, 568709, 568723, 568751, 568783, 568787, 568807, 568823, 568831, 568853, 568877, 568891, 568903, 568907, 568913, 568921, 568963, 568979, 568987, 568991, 568999, 569003, 569011, 569021, 569047, 569053, 569057, 569071, 569077, 569081, 569083, 569111, 569117, 569137, 569141, 569159, 569161, 569189, 569197, 569201, 569209, 569213, 569237, 569243, 569249, 569251, 569263, 569267, 569269, 569321, 569323, 569369, 569417, 569419, 569423, 569431, 569447, 569461, 569479, 569497, 569507, 569533, 569573, 569579, 569581, 569599, 569603, 569609, 569617, 569623, 569659, 569663, 569671, 569683, 569711, 569713, 569717, 569729, 569731, 569747, 569759, 569771, 569773, 569797, 569809, 569813, 569819, 569831, 569839, 569843, 569851, 569861, 569869, 569887, 569893, 569897, 569903, 569927, 569939, 569957, 569983, 570001, 570013, 570029, 570041, 570043, 570047, 570049, 570071, 570077, 570079, 570083, 570091, 570107, 570109, 570113, 570131, 570139, 570161, 570173, 570181, 570191, 570217, 570221, 570233, 570253, 570329, 570359, 570373, 570379, 570389, 570391, 570403, 570407, 570413, 570419, 570421, 570461, 570463, 570467, 570487, 570491, 570497, 570499, 570509, 570511, 570527, 570529, 570539, 570547, 570553, 570569, 570587, 570601, 570613, 570637, 570643, 570649, 570659, 570667, 570671, 570677, 570683, 570697, 570719, 570733, 570737, 570743, 570781, 570821, 570827, 570839, 570841, 570851, 570853, 570859, 570881, 570887, 570901, 570919, 570937, 570949, 570959, 570961, 570967, 570991, 571001, 571019, 571031, 571037, 571049, 571069, 571093, 571099, 571111, 571133, 571147, 571157, 571163, 571199, 571201, 571211, 571223, 571229, 571231, 571261, 571267, 571279, 571303, 571321, 571331, 571339, 571369, 571381, 571397, 571399, 571409, 571433, 571453, 571471, 571477, 571531, 571541, 571579, 571583, 571589, 571601, 571603, 571633, 571657, 571673, 571679, 571699, 571709, 571717, 571721, 571741, 571751, 571759, 571777, 571783, 571789, 571799, 571801, 571811, 571841, 571847, 571853, 571861, 571867, 571871, 571873, 571877, 571903, 571933, 571939, 571969, 571973, 572023, 572027, 572041, 572051, 572053, 572059, 572063, 572069, 572087, 572093, 572107, 572137, 572161, 572177, 572179, 572183, 572207, 572233, 572239, 572251, 572269, 572281, 572303, 572311, 572321, 572323, 572329, 572333, 572357, 572387, 572399, 572417, 572419, 572423, 572437, 572449, 572461, 572471, 572479, 572491, 572497, 572519, 572521, 572549, 572567, 572573, 572581, 572587, 572597, 572599, 572609, 572629, 572633, 572639, 572651, 572653, 572657, 572659, 572683, 572687, 572699, 572707, 572711, 572749, 572777, 572791, 572801, 572807, 572813, 572821, 572827, 572833, 572843, 572867, 572879, 572881, 572903, 572909, 572927, 572933, 572939, 572941, 572963, 572969, 572993, 573007, 573031, 573047, 573101, 573107, 573109, 573119, 573143, 573161, 573163, 573179, 573197, 573247, 573253, 573263, 573277, 573289, 573299, 573317, 573329, 573341, 573343, 573371, 573379, 573383, 573409, 573437, 573451, 573457, 573473, 573479, 573481, 573487, 573493, 573497, 573509, 573511, 573523, 573527, 573557, 573569, 573571, 573637, 573647, 573673, 573679, 573691, 573719, 573737, 573739, 573757, 573761, 573763, 573787, 573791, 573809, 573817, 573829, 573847, 573851, 573863, 573871, 573883, 573887, 573899, 573901, 573929, 573941, 573953, 573967, 573973, 573977, 574003, 574031, 574033, 574051, 574061, 574081, 574099, 574109, 574127, 574157, 574159, 574163, 574169, 574181, 574183, 574201, 574219, 574261, 574279, 574283, 574289, 574297, 574307, 574309, 574363, 574367, 574373, 574393, 574423, 574429, 574433, 574439, 574477, 574489, 574493, 574501, 574507, 574529, 574543, 574547, 574597, 574619, 574621, 574627, 574631, 574643, 574657, 574667, 574687, 574699, 574703, 574711, 574723, 574727, 574733, 574741, 574789, 574799, 574801, 574813, 574817, 574859, 574907, 574913, 574933, 574939, 574949, 574963, 574967, 574969, 575009, 575027, 575033, 575053, 575063, 575077, 575087, 575119, 575123, 575129, 575131, 575137, 575153, 575173, 575177, 575203, 575213, 575219, 575231, 575243, 575249, 575251, 575257, 575261, 575303, 575317, 575359, 575369, 575371, 575401, 575417, 575429, 575431, 575441, 575473, 575479, 575489, 575503, 575513, 575551, 575557, 575573, 575579, 575581, 575591, 575593, 575611, 575623, 575647, 575651, 575669, 575677, 575689, 575693, 575699, 575711, 575717, 575723, 575747, 575753, 575777, 575791, 575821, 575837, 575849, 575857, 575863, 575867, 575893, 575903, 575921, 575923, 575941, 575957, 575959, 575963, 575987, 576001, 576013, 576019, 576029, 576031, 576041, 576049, 576089, 576101, 576119, 576131, 576151, 576161, 576167, 576179, 576193, 576203, 576211, 576217, 576221, 576223, 576227, 576287, 576293, 576299, 576313, 576319, 576341, 576377, 576379, 576391, 576421, 576427, 576431, 576439, 576461, 576469, 576473, 576493, 576509, 576523, 576529, 576533, 576539, 576551, 576553, 576577, 576581, 576613, 576617, 576637, 576647, 576649, 576659, 576671, 576677, 576683, 576689, 576701, 576703, 576721, 576727, 576731, 576739, 576743, 576749, 576757, 576769, 576787, 576791, 576881, 576883, 576889, 576899, 576943, 576949, 576967, 576977, 577007, 577009, 577033, 577043, 577063, 577067, 577069, 577081, 577097, 577111, 577123, 577147, 577151, 577153, 577169, 577177, 577193, 577219, 577249, 577259, 577271, 577279, 577307, 577327, 577331, 577333, 577349, 577351, 577363, 577387, 577397, 577399, 577427, 577453, 577457, 577463, 577471, 577483, 577513, 577517, 577523, 577529, 577531, 577537, 577547, 577559, 577573, 577589, 577601, 577613, 577627, 577637, 577639, 577667, 577721, 577739, 577751, 577757, 577781, 577799, 577807, 577817, 577831, 577849, 577867, 577873, 577879, 577897, 577901, 577909, 577919, 577931, 577937, 577939, 577957, 577979, 577981, 578021, 578029, 578041, 578047, 578063, 578077, 578093, 578117, 578131, 578167, 578183, 578191, 578203, 578209, 578213, 578251, 578267, 578297, 578299, 578309, 578311, 578317, 578327, 578353, 578363, 578371, 578399, 578401, 578407, 578419, 578441, 578453, 578467, 578477, 578483, 578489, 578497, 578503, 578509, 578533, 578537, 578563, 578573, 578581, 578587, 578597, 578603, 578609, 578621, 578647, 578659, 578687, 578689, 578693, 578701, 578719, 578729, 578741, 578777, 578779, 578789, 578803, 578819, 578821, 578827, 578839, 578843, 578857, 578861, 578881, 578917, 578923, 578957, 578959, 578971, 578999, 579011, 579017, 579023, 579053, 579079, 579083, 579107, 579113, 579119, 579133, 579179, 579197, 579199, 579239, 579251, 579259, 579263, 579277, 579281, 579283, 579287, 579311, 579331, 579353, 579379, 579407, 579409, 579427, 579433, 579451, 579473, 579497, 579499, 579503, 579517, 579521, 579529, 579533, 579539, 579541, 579563, 579569, 579571, 579583, 579587, 579611, 579613, 579629, 579637, 579641, 579643, 579653, 579673, 579701, 579707, 579713, 579721, 579737, 579757, 579763, 579773, 579779, 579809, 579829, 579851, 579869, 579877, 579881, 579883, 579893, 579907, 579947, 579949, 579961, 579967, 579973, 579983, 580001, 580031, 580033, 580079, 580081, 580093, 580133, 580163, 580169, 580183, 580187, 580201, 580213, 580219, 580231, 580259, 580291, 580301, 580303, 580331, 580339, 580343, 580357, 580361, 580373, 580379, 580381, 580409, 580417, 580471, 580477, 580487, 580513, 580529, 580549, 580553, 580561, 580577, 580607, 580627, 580631, 580633, 580639, 580663, 580673, 580687, 580691, 580693, 580711, 580717, 580733, 580747, 580757, 580759, 580763, 580787, 580793, 580807, 580813, 580837, 580843, 580859, 580871, 580889, 580891, 580901, 580913, 580919, 580927, 580939, 580969, 580981, 580997, 581029, 581041, 581047, 581069, 581071, 581089, 581099, 581101, 581137, 581143, 581149, 581171, 581173, 581177, 581183, 581197, 581201, 581227, 581237, 581239, 581261, 581263, 581293, 581303, 581311, 581323, 581333, 581341, 581351, 581353, 581369, 581377, 581393, 581407, 581411, 581429, 581443, 581447, 581459, 581473, 581491, 581521, 581527, 581549, 581551, 581557, 581573, 581597, 581599, 581617, 581639, 581657, 581663, 581683, 581687, 581699, 581701, 581729, 581731, 581743, 581753, 581767, 581773, 581797, 581809, 581821, 581843, 581857, 581863, 581869, 581873, 581891, 581909, 581921, 581941, 581947, 581953, 581981, 581983, 582011, 582013, 582017, 582031, 582037, 582067, 582083, 582119, 582137, 582139, 582157, 582161, 582167, 582173, 582181, 582203, 582209, 582221, 582223, 582227, 582247, 582251, 582299, 582317, 582319, 582371, 582391, 582409, 582419, 582427, 582433, 582451, 582457, 582469, 582499, 582509, 582511, 582541, 582551, 582563, 582587, 582601, 582623, 582643, 582649, 582677, 582689, 582691, 582719, 582721, 582727, 582731, 582737, 582761, 582763, 582767, 582773, 582781, 582793, 582809, 582821, 582851, 582853, 582859, 582887, 582899, 582931, 582937, 582949, 582961, 582971, 582973, 582983, 583007, 583013, 583019, 583021, 583031, 583069, 583087, 583127, 583139, 583147, 583153, 583169, 583171, 583181, 583189, 583207, 583213, 583229, 583237, 583249, 583267, 583273, 583279, 583291, 583301, 583337, 583339, 583351, 583367, 583391, 583397, 583403, 583409, 583417, 583421, 583447, 583459, 583469, 583481, 583493, 583501, 583511, 583519, 583523, 583537, 583543, 583577, 583603, 583613, 583619, 583621, 583631, 583651, 583657, 583669, 583673, 583697, 583727, 583733, 583753, 583769, 583777, 583783, 583789, 583801, 583841, 583853, 583859, 583861, 583873, 583879, 583903, 583909, 583937, 583969, 583981, 583991, 583997, 584011, 584027, 584033, 584053, 584057, 584063, 584081, 584099, 584141, 584153, 584167, 584183, 584203, 584249, 584261, 584279, 584281, 584303, 584347, 584357, 584359, 584377, 584387, 584393, 584399, 584411, 584417, 584429, 584447, 584471, 584473, 584509, 584531, 584557, 584561, 584587, 584593, 584599, 584603, 584609, 584621, 584627, 584659, 584663, 584677, 584693, 584699, 584707, 584713, 584719, 584723, 584737, 584767, 584777, 584789, 584791, 584809, 584849, 584863, 584869, 584873, 584879, 584897, 584911, 584917, 584923, 584951, 584963, 584971, 584981, 584993, 584999, 585019, 585023, 585031, 585037, 585041, 585043, 585049, 585061, 585071, 585073, 585077, 585107, 585113, 585119, 585131, 585149, 585163, 585199, 585217, 585251, 585269, 585271, 585283, 585289, 585313, 585317, 585337, 585341, 585367, 585383, 585391, 585413, 585437, 585443, 585461, 585467, 585493, 585503, 585517, 585547, 585551, 585569, 585577, 585581, 585587, 585593, 585601, 585619, 585643, 585653, 585671, 585677, 585691, 585721, 585727, 585733, 585737, 585743, 585749, 585757, 585779, 585791, 585799, 585839, 585841, 585847, 585853, 585857, 585863, 585877, 585881, 585883, 585889, 585899, 585911, 585913, 585917, 585919, 585953, 585989, 585997, 586009, 586037, 586051, 586057, 586067, 586073, 586087, 586111, 586121, 586123, 586129, 586139, 586147, 586153, 586189, 586213, 586237, 586273, 586277, 586291, 586301, 586309, 586319, 586349, 586361, 586363, 586367, 586387, 586403, 586429, 586433, 586457, 586459, 586463, 586471, 586493, 586499, 586501, 586541, 586543, 586567, 586571, 586577, 586589, 586601, 586603, 586609, 586627, 586631, 586633, 586667, 586679, 586693, 586711, 586723, 586741, 586769, 586787, 586793, 586801, 586811, 586813, 586819, 586837, 586841, 586849, 586871, 586897, 586903, 586909, 586919, 586921, 586933, 586939, 586951, 586961, 586973, 586979, 586981, 587017, 587021, 587033, 587051, 587053, 587057, 587063, 587087, 587101, 587107, 587117, 587123, 587131, 587137, 587143, 587149, 587173, 587179, 587189, 587201, 587219, 587263, 587267, 587269, 587281, 587287, 587297, 587303, 587341, 587371, 587381, 587387, 587413, 587417, 587429, 587437, 587441, 587459, 587467, 587473, 587497, 587513, 587519, 587527, 587533, 587539, 587549, 587551, 587563, 587579, 587599, 587603, 587617, 587621, 587623, 587633, 587659, 587669, 587677, 587687, 587693, 587711, 587731, 587737, 587747, 587749, 587753, 587771, 587773, 587789, 587813, 587827, 587833, 587849, 587863, 587887, 587891, 587897, 587927, 587933, 587947, 587959, 587969, 587971, 587987, 587989, 587999, 588011, 588019, 588037, 588043, 588061, 588073, 588079, 588083, 588097, 588113, 588121, 588131, 588151, 588167, 588169, 588173, 588191, 588199, 588229, 588239, 588241, 588257, 588277, 588293, 588311, 588347, 588359, 588361, 588383, 588389, 588397, 588403, 588433, 588437, 588463, 588481, 588493, 588503, 588509, 588517, 588521, 588529, 588569, 588571, 588619, 588631, 588641, 588647, 588649, 588667, 588673, 588683, 588703, 588733, 588737, 588743, 588767, 588773, 588779, 588811, 588827, 588839, 588871, 588877, 588881, 588893, 588911, 588937, 588941, 588947, 588949, 588953, 588977, 589021, 589027, 589049, 589063, 589109, 589111, 589123, 589139, 589159, 589163, 589181, 589187, 589189, 589207, 589213, 589219, 589231, 589241, 589243, 589273, 589289, 589291, 589297, 589327, 589331, 589349, 589357, 589387, 589409, 589439, 589451, 589453, 589471, 589481, 589493, 589507, 589529, 589531, 589579, 589583, 589591, 589601, 589607, 589609, 589639, 589643, 589681, 589711, 589717, 589751, 589753, 589759, 589763, 589783, 589793, 589807, 589811, 589829, 589847, 589859, 589861, 589873, 589877, 589903, 589921, 589933, 589993, 589997, 590021, 590027, 590033, 590041, 590071, 590077, 590099, 590119, 590123, 590129, 590131, 590137, 590141, 590153, 590171, 590201, 590207, 590243, 590251, 590263, 590267, 590269, 590279, 590309, 590321, 590323, 590327, 590357, 590363, 590377, 590383, 590389, 590399, 590407, 590431, 590437, 590489, 590537, 590543, 590567, 590573, 590593, 590599, 590609, 590627, 590641, 590647, 590657, 590659, 590669, 590713, 590717, 590719, 590741, 590753, 590771, 590797, 590809, 590813, 590819, 590833, 590839, 590867, 590899, 590921, 590923, 590929, 590959, 590963, 590983, 590987, 591023, 591053, 591061, 591067, 591079, 591089, 591091, 591113, 591127, 591131, 591137, 591161, 591163, 591181, 591193, 591233, 591259, 591271, 591287, 591289, 591301, 591317, 591319, 591341, 591377, 591391, 591403, 591407, 591421, 591431, 591443, 591457, 591469, 591499, 591509, 591523, 591553, 591559, 591581, 591599, 591601, 591611, 591623, 591649, 591653, 591659, 591673, 591691, 591709, 591739, 591743, 591749, 591751, 591757, 591779, 591791, 591827, 591841, 591847, 591863, 591881, 591887, 591893, 591901, 591937, 591959, 591973, 592019, 592027, 592049, 592057, 592061, 592073, 592087, 592099, 592121, 592129, 592133, 592139, 592157, 592199, 592217, 592219, 592223, 592237, 592261, 592289, 592303, 592307, 592309, 592321, 592337, 592343, 592351, 592357, 592367, 592369, 592387, 592391, 592393, 592429, 592451, 592453, 592463, 592469, 592483, 592489, 592507, 592517, 592531, 592547, 592561, 592577, 592589, 592597, 592601, 592609, 592621, 592639, 592643, 592649, 592661, 592663, 592681, 592693, 592723, 592727, 592741, 592747, 592759, 592763, 592793, 592843, 592849, 592853, 592861, 592873, 592877, 592897, 592903, 592919, 592931, 592939, 592967, 592973, 592987, 592993, 593003, 593029, 593041, 593051, 593059, 593071, 593081, 593083, 593111, 593119, 593141, 593143, 593149, 593171, 593179, 593183, 593207, 593209, 593213, 593227, 593231, 593233, 593251, 593261, 593273, 593291, 593293, 593297, 593321, 593323, 593353, 593381, 593387, 593399, 593401, 593407, 593429, 593447, 593449, 593473, 593479, 593491, 593497, 593501, 593507, 593513, 593519, 593531, 593539, 593573, 593587, 593597, 593603, 593627, 593629, 593633, 593641, 593647, 593651, 593689, 593707, 593711, 593767, 593777, 593783, 593839, 593851, 593863, 593869, 593899, 593903, 593933, 593951, 593969, 593977, 593987, 593993, 594023, 594037, 594047, 594091, 594103, 594107, 594119, 594137, 594151, 594157, 594161, 594163, 594179, 594193, 594203, 594211, 594227, 594241, 594271, 594281, 594283, 594287, 594299, 594311, 594313, 594329, 594359, 594367, 594379, 594397, 594401, 594403, 594421, 594427, 594449, 594457, 594467, 594469, 594499, 594511, 594521, 594523, 594533, 594551, 594563, 594569, 594571, 594577, 594617, 594637, 594641, 594653, 594667, 594679, 594697, 594709, 594721, 594739, 594749, 594751, 594773, 594793, 594821, 594823, 594827, 594829, 594857, 594889, 594899, 594911, 594917, 594929, 594931, 594953, 594959, 594961, 594977, 594989, 595003, 595037, 595039, 595043, 595057, 595069, 595073, 595081, 595087, 595093, 595097, 595117, 595123, 595129, 595139, 595141, 595157, 595159, 595181, 595183, 595201, 595207, 595229, 595247, 595253, 595261, 595267, 595271, 595277, 595291, 595303, 595313, 595319, 595333, 595339, 595351, 595363, 595373, 595379, 595381, 595411, 595451, 595453, 595481, 595513, 595519, 595523, 595547, 595549, 595571, 595577, 595579, 595613, 595627, 595687, 595703, 595709, 595711, 595717, 595733, 595741, 595801, 595807, 595817, 595843, 595873, 595877, 595927, 595939, 595943, 595949, 595951, 595957, 595961, 595963, 595967, 595981, 596009, 596021, 596027, 596047, 596053, 596059, 596069, 596081, 596083, 596093, 596117, 596119, 596143, 596147, 596159, 596179, 596209, 596227, 596231, 596243, 596251, 596257, 596261, 596273, 596279, 596291, 596293, 596317, 596341, 596363, 596369, 596399, 596419, 596423, 596461, 596489, 596503, 596507, 596537, 596569, 596573, 596579, 596587, 596593, 596599, 596611, 596623, 596633, 596653, 596663, 596669, 596671, 596693, 596707, 596737, 596741, 596749, 596767, 596779, 596789, 596803, 596821, 596831, 596839, 596851, 596857, 596861, 596863, 596879, 596899, 596917, 596927, 596929, 596933, 596941, 596963, 596977, 596983, 596987, 597031, 597049, 597053, 597059, 597073, 597127, 597131, 597133, 597137, 597169, 597209, 597221, 597239, 597253, 597263, 597269, 597271, 597301, 597307, 597349, 597353, 597361, 597367, 597383, 597391, 597403, 597407, 597409, 597419, 597433, 597437, 597451, 597473, 597497, 597521, 597523, 597539, 597551, 597559, 597577, 597581, 597589, 597593, 597599, 597613, 597637, 597643, 597659, 597671, 597673, 597677, 597679, 597689, 597697, 597757, 597761, 597767, 597769, 597781, 597803, 597823, 597827, 597833, 597853, 597859, 597869, 597889, 597899, 597901, 597923, 597929, 597967, 597997, 598007, 598049, 598051, 598057, 598079, 598093, 598099, 598123, 598127, 598141, 598151, 598159, 598163, 598187, 598189, 598193, 598219, 598229, 598261, 598303, 598307, 598333, 598363, 598369, 598379, 598387, 598399, 598421, 598427, 598439, 598447, 598457, 598463, 598487, 598489, 598501, 598537, 598541, 598571, 598613, 598643, 598649, 598651, 598657, 598669, 598681, 598687, 598691, 598711, 598721, 598727, 598729, 598777, 598783, 598789, 598799, 598817, 598841, 598853, 598867, 598877, 598883, 598891, 598903, 598931, 598933, 598963, 598967, 598973, 598981, 598987, 598999, 599003, 599009, 599021, 599023, 599069, 599087, 599117, 599143, 599147, 599149, 599153, 599191, 599213, 599231, 599243, 599251, 599273, 599281, 599303, 599309, 599321, 599341, 599353, 599359, 599371, 599383, 599387, 599399, 599407, 599413, 599419, 599429, 599477, 599479, 599491, 599513, 599519, 599537, 599551, 599561, 599591, 599597, 599603, 599611, 599623, 599629, 599657, 599663, 599681, 599693, 599699, 599701, 599713, 599719, 599741, 599759, 599779, 599783, 599803, 599831, 599843, 599857, 599869, 599891, 599899, 599927, 599933, 599939, 599941, 599959, 599983, 599993, 599999, 600011, 600043, 600053, 600071, 600073, 600091, 600101, 600109, 600167, 600169, 600203, 600217, 600221, 600233, 600239, 600241, 600247, 600269, 600283, 600289, 600293, 600307, 600311, 600317, 600319, 600337, 600359, 600361, 600367, 600371, 600401, 600403, 600407, 600421, 600433, 600449, 600451, 600463, 600469, 600487, 600517, 600529, 600557, 600569, 600577, 600601, 600623, 600631, 600641, 600659, 600673, 600689, 600697, 600701, 600703, 600727, 600751, 600791, 600823, 600827, 600833, 600841, 600857, 600877, 600881, 600883, 600889, 600893, 600931, 600947, 600949, 600959, 600961, 600973, 600979, 600983, 601021, 601031, 601037, 601039, 601043, 601061, 601067, 601079, 601093, 601127, 601147, 601187, 601189, 601193, 601201, 601207, 601219, 601231, 601241, 601247, 601259, 601267, 601283, 601291, 601297, 601309, 601313, 601319, 601333, 601339, 601357, 601379, 601397, 601411, 601423, 601439, 601451, 601457, 601487, 601507, 601541, 601543, 601589, 601591, 601607, 601631, 601651, 601669, 601687, 601697, 601717, 601747, 601751, 601759, 601763, 601771, 601801, 601807, 601813, 601819, 601823, 601831, 601849, 601873, 601883, 601889, 601897, 601903, 601943, 601949, 601961, 601969, 601981, 602029, 602033, 602039, 602047, 602057, 602081, 602083, 602087, 602093, 602099, 602111, 602137, 602141, 602143, 602153, 602179, 602197, 602201, 602221, 602227, 602233, 602257, 602267, 602269, 602279, 602297, 602309, 602311, 602317, 602321, 602333, 602341, 602351, 602377, 602383, 602401, 602411, 602431, 602453, 602461, 602477, 602479, 602489, 602501, 602513, 602521, 602543, 602551, 602593, 602597, 602603, 602621, 602627, 602639, 602647, 602677, 602687, 602689, 602711, 602713, 602717, 602729, 602743, 602753, 602759, 602773, 602779, 602801, 602821, 602831, 602839, 602867, 602873, 602887, 602891, 602909, 602929, 602947, 602951, 602971, 602977, 602983, 602999, 603011, 603013, 603023, 603047, 603077, 603091, 603101, 603103, 603131, 603133, 603149, 603173, 603191, 603203, 603209, 603217, 603227, 603257, 603283, 603311, 603319, 603349, 603389, 603391, 603401, 603431, 603443, 603457, 603467, 603487, 603503, 603521, 603523, 603529, 603541, 603553, 603557, 603563, 603569, 603607, 603613, 603623, 603641, 603667, 603679, 603689, 603719, 603731, 603739, 603749, 603761, 603769, 603781, 603791, 603793, 603817, 603821, 603833, 603847, 603851, 603853, 603859, 603881, 603893, 603899, 603901, 603907, 603913, 603917, 603919, 603923, 603931, 603937, 603947, 603949, 603989, 604001, 604007, 604013, 604031, 604057, 604063, 604069, 604073, 604171, 604189, 604223, 604237, 604243, 604249, 604259, 604277, 604291, 604309, 604313, 604319, 604339, 604343, 604349, 604361, 604369, 604379, 604397, 604411, 604427, 604433, 604441, 604477, 604481, 604517, 604529, 604547, 604559, 604579, 604589, 604603, 604609, 604613, 604619, 604649, 604651, 604661, 604697, 604699, 604711, 604727, 604729, 604733, 604753, 604759, 604781, 604787, 604801, 604811, 604819, 604823, 604829, 604837, 604859, 604861, 604867, 604883, 604907, 604931, 604939, 604949, 604957, 604973, 604997, 605009, 605021, 605023, 605039, 605051, 605069, 605071, 605113, 605117, 605123, 605147, 605167, 605173, 605177, 605191, 605221, 605233, 605237, 605239, 605249, 605257, 605261, 605309, 605323, 605329, 605333, 605347, 605369, 605393, 605401, 605411, 605413, 605443, 605471, 605477, 605497, 605503, 605509, 605531, 605533, 605543, 605551, 605573, 605593, 605597, 605599, 605603, 605609, 605617, 605629, 605639, 605641, 605687, 605707, 605719, 605779, 605789, 605809, 605837, 605849, 605861, 605867, 605873, 605879, 605887, 605893, 605909, 605921, 605933, 605947, 605953, 605977, 605987, 605993, 606017, 606029, 606031, 606037, 606041, 606049, 606059, 606077, 606079, 606083, 606091, 606113, 606121, 606131, 606173, 606181, 606223, 606241, 606247, 606251, 606299, 606301, 606311, 606313, 606323, 606341, 606379, 606383, 606413, 606433, 606443, 606449, 606493, 606497, 606503, 606521, 606527, 606539, 606559, 606569, 606581, 606587, 606589, 606607, 606643, 606649, 606653, 606659, 606673, 606721, 606731, 606733, 606737, 606743, 606757, 606791, 606811, 606829, 606833, 606839, 606847, 606857, 606863, 606899, 606913, 606919, 606943, 606959, 606961, 606967, 606971, 606997, 607001, 607003, 607007, 607037, 607043, 607049, 607063, 607067, 607081, 607091, 607093, 607097, 607109, 607127, 607129, 607147, 607151, 607153, 607157, 607163, 607181, 607199, 607213, 607219, 607249, 607253, 607261, 607301, 607303, 607307, 607309, 607319, 607331, 607337, 607339, 607349, 607357, 607363, 607417, 607421, 607423, 607471, 607493, 607517, 607531, 607549, 607573, 607583, 607619, 607627, 607667, 607669, 607681, 607697, 607703, 607721, 607723, 607727, 607741, 607769, 607813, 607819, 607823, 607837, 607843, 607861, 607883, 607889, 607909, 607921, 607931, 607933, 607939, 607951, 607961, 607967, 607991, 607993, 608011, 608029, 608033, 608087, 608089, 608099, 608117, 608123, 608129, 608131, 608147, 608161, 608177, 608191, 608207, 608213, 608269, 608273, 608297, 608299, 608303, 608339, 608347, 608357, 608359, 608369, 608371, 608383, 608389, 608393, 608401, 608411, 608423, 608429, 608431, 608459, 608471, 608483, 608497, 608519, 608521, 608527, 608581, 608591, 608593, 608609, 608611, 608633, 608653, 608659, 608669, 608677, 608693, 608701, 608737, 608743, 608749, 608759, 608767, 608789, 608819, 608831, 608843, 608851, 608857, 608863, 608873, 608887, 608897, 608899, 608903, 608941, 608947, 608953, 608977, 608987, 608989, 608999, 609043, 609047, 609067, 609071, 609079, 609101, 609107, 609113, 609143, 609149, 609163, 609173, 609179, 609199, 609209, 609221, 609227, 609233, 609241, 609253, 609269, 609277, 609283, 609289, 609307, 609313, 609337, 609359, 609361, 609373, 609379, 609391, 609397, 609403, 609407, 609421, 609437, 609443, 609461, 609487, 609503, 609509, 609517, 609527, 609533, 609541, 609571, 609589, 609593, 609599, 609601, 609607, 609613, 609617, 609619, 609641, 609673, 609683, 609701, 609709, 609743, 609751, 609757, 609779, 609781, 609803, 609809, 609821, 609859, 609877, 609887, 609907, 609911, 609913, 609923, 609929, 609979, 609989, 609991, 609997, 610031, 610063, 610081, 610123, 610157, 610163, 610187, 610193, 610199, 610217, 610219, 610229, 610243, 610271, 610279, 610289, 610301, 610327, 610331, 610339, 610391, 610409, 610417, 610429, 610439, 610447, 610457, 610469, 610501, 610523, 610541, 610543, 610553, 610559, 610567, 610579, 610583, 610619, 610633, 610639, 610651, 610661, 610667, 610681, 610699, 610703, 610721, 610733, 610739, 610741, 610763, 610781, 610783, 610787, 610801, 610817, 610823, 610829, 610837, 610843, 610847, 610849, 610867, 610877, 610879, 610891, 610913, 610919, 610921, 610933, 610957, 610969, 610993, 611011, 611027, 611033, 611057, 611069, 611071, 611081, 611101, 611111, 611113, 611131, 611137, 611147, 611189, 611207, 611213, 611257, 611263, 611279, 611293, 611297, 611323, 611333, 611389, 611393, 611411, 611419, 611441, 611449, 611453, 611459, 611467, 611483, 611497, 611531, 611543, 611549, 611551, 611557, 611561, 611587, 611603, 611621, 611641, 611657, 611671, 611693, 611707, 611729, 611753, 611791, 611801, 611803, 611827, 611833, 611837, 611839, 611873, 611879, 611887, 611903, 611921, 611927, 611939, 611951, 611953, }; const size_t primes_len = arraylen(primes);
00b697af7e3d7bb0724cfba46ad69b7ad83c1401
00936f1490fb98cbbc45b6293f7ac0d1cfaaf463
/source/r_emwin_rx/r_emwin_rx_vx.xx_xxx/r_emwin_rx/doc/Training/AntiAliasing/MainTask_AA.c
345366a83d63fa7a523f38988695b765c3be2c87
[ "MIT", "DOC" ]
permissive
renesas/rx-driver-package
a5395424cc3e7574103aa7f075f70021e0e7384e
d6679aca8839c62370d36dfc2b7255551e3c4b46
refs/heads/master
2023-09-04T22:12:06.725331
2023-08-28T02:17:34
2023-08-28T02:17:34
255,783,844
11
5
MIT
2023-07-19T00:07:13
2020-04-15T02:32:14
C
UTF-8
C
false
false
593
c
MainTask_AA.c
#include "GUI.h" static GUI_POINT _aPoint[] = { { -5, -5 }, { 0, -50 }, { 5, -5 }, { 50, 0 }, { 5, 5 }, { 0, 50 }, { -5, 5 }, { -50, 0 }, }; void MainTask(void) { GUI_Init(); GUI_SetBkColor(GUI_WHITE); GUI_SetColor(GUI_BLACK); GUI_Clear(); GUI_SetPenSize(2); GUI_AA_DrawLine(10, 10, 100, 50); GUI_AA_DrawArc(100, 50, 40, 40, 270, 450); GUI_AA_FillCircle(50, 100, 30); GUI_AA_DrawPolyOutline(_aPoint, GUI_COUNTOF(_aPoint), 4, 200, 100); GUI_AA_FillPolygon(_aPoint, GUI_COUNTOF(_aPoint), 100, 170); while (1) { GUI_Delay(100); } }
79fa5a2759f3f459a79bdc313447d4bab50fae8b
2d814e61b0705285cb9719881a4e12b6b3fbedd1
/sp/homework/dbquery.c
662e8df5156401d9d4144ebbbfbe6c8384c01390
[]
no_license
sji8562/systemprogramming
897f5bef321d7425c9723dc3362b5aff739d4d76
90f36d8ecc08259f33479d844ce5f7147c8eefe3
refs/heads/master
2020-07-23T04:19:17.387428
2019-11-26T01:36:12
2019-11-26T01:36:12
207,444,101
0
0
null
null
null
null
UTF-8
C
false
false
853
c
dbquery.c
#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<fcntl.h> #include"student.h" int main(int argc,char *argv[]){ int fd,id; struct student record; if(argc<2){ fprintf(stderr,"사용법 : %s file\n", argv[0]); exit(1); } if((fd = open(argv[1],O_RDONLY)) == -1){ perror(argv[1]); exit(2); } do{ printf("\n 검색할 학생의 학번 입력: "); if(scanf("%d",&id) ==1){ lssek(fd,(id-START_ID)*sizeof(record),SEEK_SET); if((read(fd,(char *)&record,sizeof(record)) > 0 && (record.id != 0) printf("이름 : %s\t 학번 : %d\t 점수 : %d\n",record.name,record.id,record.score); else printf("레코드 %d 없음\n", id)} else printf("입력 오류"); printf("계속 하시겠습니까?(Y/N)"); scanf("%c",&c); } while (c == 'Y'); close(fd); exit(0); }
683c33bd43338d3714363835467576df9c45ec2c
98d2e4f6407199eccd81c3e16e4c1a11ca066166
/bubbleSort.c
7cdc89669d1c9d2a9aa0d2a2ba69c1678e22c59d
[]
no_license
freddycordovadd/bubble-sort-c
e92628a229e910c82632f412d0e9bfd341ae2d27
69e444207318dcd401aa8be46f3f57fe8b29878e
refs/heads/master
2020-04-08T12:49:47.007957
2018-11-27T16:12:39
2018-11-27T16:12:39
159,363,246
0
0
null
null
null
null
UTF-8
C
false
false
1,109
c
bubbleSort.c
#include <stdio.h> void cambiar_pos(int *n1, int *n2) { // Cmabia las posiciones de n1 y n2 int temp = *n1; *n1 = *n2; *n2 = temp; } void bubbleSort(int vector_entrada[], int n) { // revisa cada elemento con el siguiente, // intercambiandolos si estan en el orden equivocado int i, j; for (i=0; i < n-1; i++) { for (j=0; j < n-i-1; j++) { if (vector_entrada[j] < vector_entrada[j+1]) { cambiar_pos(&vector_entrada[j], &vector_entrada[j+1]); } } } } void printArray(int vector_entrada[], int size) { // imprime el array int i; for (i=0; i < size; i++) printf("%d ", vector_entrada[i]); printf("fin del ordenamiento de burbuja. \n"); } int main() { int vector_entrada[] = {85,26,87,75,66,12,1,5,82,100,4}; int n = sizeof(vector_entrada)/sizeof(vector_entrada[0]); bubbleSort(vector_entrada, n); printf("Arreglo ordenado = \n"); printArray(vector_entrada, n); printf("\n"); // si llega hasta aqui la compilacion fue exitosa return 0; }
dca01acf49145e23147af8bea76001f978416b6d
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/kernel/linux-3.0.8/drivers/input/touchscreen/max11801_ts.c
0a713fac5e502ec7c96d70a2cd95e442dc1757d8
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
C
false
false
1,822
c
max11801_ts.c
#define GENERNAL_STATUS_REG 0x00 #define GENERNAL_CONF_REG 0x01 #define MESURE_RES_CONF_REG 0x02 #define MESURE_AVER_CONF_REG 0x03 #define ADC_SAMPLE_TIME_CONF_REG 0x04 #define PANEL_SETUPTIME_CONF_REG 0x05 #define DELAY_CONVERSION_CONF_REG 0x06 #define TOUCH_DETECT_PULLUP_CONF_REG 0x07 #define AUTO_MODE_TIME_CONF_REG 0x08 #define APERTURE_CONF_REG 0x09 #define AUX_MESURE_CONF_REG 0x0a #define OP_MODE_CONF_REG 0x0b #define FIFO_RD_CMD (0x50 << 1) #define MAX11801_FIFO_INT (1 << 2) #define MAX11801_FIFO_OVERFLOW (1 << 3) #define XY_BUFSIZE 4 #define XY_BUF_OFFSET 4 #define MAX11801_MAX_X 0xfff #define MAX11801_MAX_Y 0xfff #define MEASURE_TAG_OFFSET 2 #define MEASURE_TAG_MASK (3 << MEASURE_TAG_OFFSET) #define EVENT_TAG_OFFSET 0 #define EVENT_TAG_MASK (3 << EVENT_TAG_OFFSET) #define MEASURE_X_TAG (0 << MEASURE_TAG_OFFSET) #define MEASURE_Y_TAG (1 << MEASURE_TAG_OFFSET) enum ; struct max11801_data ; static u8 read_register(struct i2c_client *client, int addr) static int max11801_write_reg(struct i2c_client *client, int addr, int data) static irqreturn_t max11801_ts_interrupt(int irq, void *dev_id) static void __devinit max11801_ts_phy_init(struct max11801_data *data) static int __devinit max11801_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) static __devexit int max11801_ts_remove(struct i2c_client *client) static const struct i2c_device_id max11801_ts_id[] = ; MODULE_DEVICE_TABLE(i2c, max11801_ts_id); static struct i2c_driver max11801_ts_driver = ; static int __init max11801_ts_init(void) static void __exit max11801_ts_exit(void) module_init(max11801_ts_init); module_exit(max11801_ts_exit); MODULE_AUTHOR("Zhang Jiejing <jiejing.zhang@freescale.com>"); MODULE_DESCRIPTION("Touchscreen driver for MAXI MAX11801 controller"); MODULE_LICENSE("GPL");
7454457586808edeaa40a1ff095b0e429fd0205d
4cbc8b81d197bc392d1b57856254300331b9738f
/c/readcsv.c
53fdc3e55254aa2e9343ad76d45f63d44cebc9c5
[ "MIT" ]
permissive
vcatafesta/chili
87b9606f17cda645ba44cbf2bb4cc4637e18d211
5c734ac88454db76eb2f4e92c13364a5bbc7a93a
refs/heads/main
2023-09-01T01:39:09.457448
2023-08-29T21:23:28
2023-08-29T21:23:28
171,972,556
2
2
null
2019-02-22T01:38:49
2019-02-22T01:26:46
null
UTF-8
C
false
false
989
c
readcsv.c
// readcsv.c, Copyright (c) 2023 Vilmar Catafesta <vcatafesta@gmail.com> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <stdint.h> #include <string.h> #include <ctype.h> #include <time.h> #define BUFFER_SIZE 1024 int main() { FILE* arquivo; char linha[BUFFER_SIZE]; char* token; // abre o arquivo em modo leitura arquivo = fopen("packages-split.csv", "r"); // verifica se o arquivo foi aberto com sucesso if (arquivo == NULL) { printf("Erro ao abrir o arquivo.\n"); return 1; } // lê cada linha do arquivo while (fgets(linha, BUFFER_SIZE, arquivo) != NULL) { // separa os campos da linha usando vírgula como delimitador token = strtok(linha, ","); printf("%s \n", token); while (token != NULL) { printf("%s \n", token); token = strtok(NULL, ","); } printf("\n"); } // fecha o arquivo fclose(arquivo); return 0; }
68c5ac26e61051a37ef559869c9f5ca8658427dc
bebfae9268913ba90a33802f10f4145f8e44a938
/Game/GameConstants.h
fc71a0ead2b07abf3566fcefb0cb661360c8b7f7
[]
no_license
pmark/TurnBasedDuel
bc6959b5c3cf3db3718c9d0bfb629ea1b5762123
3be0ac996452784a07d311e5fd3aa14ab1b0c62c
refs/heads/master
2021-01-10T19:26:13.224459
2013-01-13T03:12:02
2013-01-13T03:12:02
7,696,290
5
2
null
null
null
null
UTF-8
C
false
false
92
h
GameConstants.h
// // GameConstants.h // Game // #ifndef GameConstants_h #define GameConstants_h #endif
2b13e3fecd730d1c6772a9907b54f4f612f67935
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/freebsd/usr.sbin/ppp/extr_ncpaddr.c_ncprange_getsa.c
742da68b9572e5026ced4f66b17f27095b36ce3c
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
2,241
c
extr_ncpaddr.c_ncprange_getsa.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ struct sockaddr_storage {void* ss_family; } ; struct sockaddr_in6 {int sin6_family; int sin6_len; int /*<<< orphan*/ sin6_addr; } ; struct sockaddr_in {int sin_family; int sin_len; int /*<<< orphan*/ sin_addr; } ; struct ncprange {int ncprange_family; int /*<<< orphan*/ ncprange_ip6width; int /*<<< orphan*/ ncprange_ip6addr; int /*<<< orphan*/ ncprange_ip4mask; int /*<<< orphan*/ ncprange_ip4addr; } ; /* Variables and functions */ #define AF_INET 129 #define AF_INET6 128 void* AF_UNSPEC ; int /*<<< orphan*/ bits2mask6 (int /*<<< orphan*/ ) ; int /*<<< orphan*/ memset (struct sockaddr_storage*,char,int) ; void ncprange_getsa(const struct ncprange *range, struct sockaddr_storage *host, struct sockaddr_storage *mask) { struct sockaddr_in *host4 = (struct sockaddr_in *)host; struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; #ifndef NOINET6 struct sockaddr_in6 *host6 = (struct sockaddr_in6 *)host; struct sockaddr_in6 *mask6 = (struct sockaddr_in6 *)mask; #endif memset(host, '\0', sizeof(*host)); if (mask) memset(mask, '\0', sizeof(*mask)); switch (range->ncprange_family) { case AF_INET: host4->sin_family = AF_INET; host4->sin_len = sizeof(*host4); host4->sin_addr = range->ncprange_ip4addr; if (mask4) { mask4->sin_family = AF_INET; mask4->sin_len = sizeof(*host4); mask4->sin_addr = range->ncprange_ip4mask; } break; #ifndef NOINET6 case AF_INET6: host6->sin6_family = AF_INET6; host6->sin6_len = sizeof(*host6); host6->sin6_addr = range->ncprange_ip6addr; if (mask6) { mask6->sin6_family = AF_INET6; mask6->sin6_len = sizeof(*host6); mask6->sin6_addr = bits2mask6(range->ncprange_ip6width); } break; #endif default: host->ss_family = AF_UNSPEC; if (mask) mask->ss_family = AF_UNSPEC; break; } }
886365b9d677c8d3471d8e86d0856dc4b3f4bfbd
2e806aeb11f9667d81a448fdc3cb18e2b3f46b04
/C Introduction Examples/swapVarIO.c
f544f66954182e211c731119ff4cd8913482eb95
[]
no_license
KhairulIzwan/learn-C-linux
59a27e3a9203ef70d4e74c608a5df93d4a80eadb
e8acb3cd5c9db62aeba028f3e0b0d1324fe04c35
refs/heads/main
2023-03-20T08:33:26.048468
2021-03-02T04:22:15
2021-03-02T04:22:15
342,775,075
0
0
null
2021-02-27T05:14:00
2021-02-27T05:01:58
null
UTF-8
C
false
false
909
c
swapVarIO.c
#include<stdio.h> int main() { double first, second, temp; printf("Enter first number: "); scanf("%lf", &first); printf("Enter second number: "); scanf("%lf", &second); // Value of first is assigned to temp temp = first; // Value of second is assigned to first first = second; // Value of temp (initial value of first) is assigned to second second = temp; printf("\nAfter swapping, firstNumber = %.2lf\n", first); printf("After swapping, secondNumber = %.2lf\n", second); // Swapping // a = (initial_a - initial_b) first = first - second; // b = (initial_a - initial_b) + initial_b = initial_a second = first + second; // a = initial_a - (initial_a - initial_b) = initial_b first = second - first; printf("After swapping, a = %.2lf\n", first); printf("After swapping, b = %.2lf\n", second); return 0; }
2e78434b7e63285896e63694cc55f752a444b1ab
dd582786a59bdaf6948816c2c09edf01bedc64a9
/Prata/R10Z6/R10Z6/zad6.c
b98f255f5a918b5225fcf1e15a2b238067179f71
[]
no_license
daniellozuz/C
2342b5eb2bef4e53c75e1aa125803d91b36e9c33
76dd9b04950786fff6fa7d59bc7d6fc5c83c0791
refs/heads/master
2020-12-07T02:27:39.594354
2017-04-26T10:50:38
2017-04-26T10:50:38
86,608,783
0
0
null
null
null
null
UTF-8
C
false
false
614
c
zad6.c
#include <stdio.h> #define ROZMIAR 6 void pokaz(double tab[], int rozmiar); void odwroc(double tab[], int rozmiar); int main(void) { double wartosci[ROZMIAR] = { 1.1, 2.2, 3.3, 4.4, 5.5, 6.6 }; pokaz(wartosci, ROZMIAR); odwroc(wartosci, ROZMIAR); pokaz(wartosci, ROZMIAR); return 0; } void odwroc(double tab[], int rozmiar) { int i; double temp; for (i = 0; i < rozmiar / 2; i++) { temp = tab[i]; tab[i] = tab[rozmiar - 1 - i]; tab[rozmiar - 1 - i] = temp; } } void pokaz(double tab[], int rozmiar) { int i; for (i = 0; i < rozmiar; i++) printf("%4.1f ", tab[i]); printf("\n"); }
4e5240828220c167f02df32a534289583bf8386e
4d01a176ba35f7347b26f1991e516671f6929ae8
/3DSWiiPlus/Uart.c
f0c32370bb010e49e9d88875aa1d7d9f3880d577
[]
no_license
HarukaKaminari/3DSWiiPlus
926de9ad566d7c507be18d4a684351b4702e76c1
e3070e2bd80e0715f51ca529477cbec8eb66efa2
refs/heads/master
2021-01-15T14:53:08.510504
2017-08-10T02:07:10
2017-08-10T02:07:10
99,696,865
1
1
null
null
null
null
GB18030
C
false
false
2,525
c
Uart.c
#include <STRING.H> #include "Uart.h" bit busy = 0; // 发送忙标志 static xdata u8 sendBuf[0x100]; // 发送缓冲 static xdata u8 recvBuf[0x100]; // 接收缓冲 static u8 sendP = 0; static u8 sendBufP = 0; static u8 recvP = 0; static u8 recvBufP = 0; static void Uart() interrupt 4 using 1{ if(RI){ RI = 0; // 清除RI位 //P0 = SBUF; // P0显示串口数据 //P22 = RB8; // P2.2显示校验位 recvBuf[recvBufP++] = SBUF; // 从UART数据接收寄存器中读数据,写入缓冲 } if(TI){ TI = 0; // 清除TI位 busy = 0; // 清忙标志 } } static void Uart_Flush(){ if(sendP != sendBufP){ while(busy); // 等待前面的数据发送完成 busy = 1; SBUF = sendBuf[sendP++]; // 写数据到UART数据发送寄存器 } } // 主频30M void Uart_Init(){ P_SW1 &= 0x3F; // 串口1的TX/RX位于P3.1/P3.0 PCON &= 0x3F; // 波特率不倍速,SCON.6不作为帧错误检测功能 SCON = 0x50; // 8位数据,可变波特率,无奇偶校验 AUXR |= 0x40; // 定时器1时钟为Fosc,即1T AUXR &= 0xFE; // 串口1选择定时器1为波特率发生器 TMOD &= 0x0F; // 清除定时器1模式位 TMOD |= 0x20; // 设定定时器1为8位自动重装方式 TL1 = 0xF8; // 设定定时初值(波特率115200) TH1 = 0xF8; // 设定定时器重装值 ET1 = 0; // 禁止定时器1中断 TR1 = 1; // 启动定时器1 ES = 1; // 使能串口中断 EA = 1; // 全局中断打开 } void Uart_Send(u8 value){ sendBuf[sendBufP++] = value; Uart_Flush(); } void Uart_SendBuf(void* p, u8 len){ u8 remains = 0x100 - sendBufP; if(remains >= len) memcpy(sendBuf + sendBufP, p, len); else{ memcpy(sendBuf + sendBufP, p, remains); memcpy(sendBuf, (u8*)p + remains, len - remains); } sendBufP += len; Uart_Flush(); } void Uart_Recv(u8* value){ if(recvP != recvBufP) *value = recvBuf[recvBufP++]; else *value = 0; } void Uart_RecvBuf(void* p, u8* len){ if(recvP < recvBufP){ *len = recvBufP - recvP; memcpy(p, recvBuf + recvP, recvBufP - recvP); recvP = recvBufP; }else if(recvP > recvBufP){ u8 remains = 0x100 - recvP; memcpy(p, recvBuf + recvP, remains); memcpy((u8*)p + remains, recvBuf, recvBufP - remains); *len = 0x100 + recvBufP - recvP; }else{ *len = 0; } } void Uart_String(const char* str){ Uart_SendBuf(str, strlen(str)); } void Uart_Dec(u8 val){ u8 i = 0; u8 strBuf[4]; Dec2String(val, strBuf); Uart_String(strBuf); } void Uart_Hex(u8 val){ u8 i = 0; u8 strBuf[3]; Hex2String(val, strBuf); Uart_String(strBuf); }
c7edef763967c0106a4b16ed5c4fae46e91a5c42
bbcda1e06b97db90e20606d587812e77cf8dc59a
/0x05-pointers_arrays_strings/3-puts.c
21e04ae2616705b96a610dc99c2add9cf67f0540
[]
no_license
Deiwin-Ignacio-Monsalve-Altamar/holbertonschool-low_level_programming
90cd6fbd714269ea295769de20eed4360c181d2c
e07ceeb6882cb06bf23a0588a1b2f5bd435ef2a1
refs/heads/master
2020-12-29T06:13:49.963950
2020-08-26T21:03:44
2020-08-26T21:03:44
238,486,739
0
0
null
null
null
null
UTF-8
C
false
false
191
c
3-puts.c
#include "holberton.h" /** * _puts - print character * @str: pointr character * Return: *str */ void _puts(char *str) { while (*str) { _putchar(*str); str++; } _putchar('\n'); }
04d3ad65ae60d6d097ae41f46fa6abc6f233ca76
22702b331d1f6569237b78f3d41557deb4777850
/MatrixBuilder/MatrixCalculator/system.h
2a9cac15d710ac09a6b8edc175591951d7202dff
[]
no_license
Fookwin/DBLottery
1fc001e88f0515b65aec71d39598186c5fe98fe3
e60054952af5939be6b7cfa1af6a1fd684971aad
refs/heads/master
2022-07-21T06:42:54.898797
2021-02-19T09:05:49
2021-02-19T09:05:49
70,309,943
0
0
null
2022-06-22T17:30:17
2016-10-08T06:40:12
C#
UTF-8
C
false
false
134
h
system.h
#ifdef MTRx_EXPORTS #define MTRxEXPORTS __declspec(dllexport) #else #define MTRxEXPORTS __declspec(dllimport) #endif // MTRx_EXPORTS
c9bd035044b5c196eb9d96bfc6c2e2946ef506bc
a02b26cecb8ddb7976a31d5b4937ff1ac5f25d0a
/utils/init/malloc_game.c
5d42c362ba534a524420d82d12be0e179cd8f464
[]
no_license
0xMemoryGrinder/myxfml
b4aabe21cb8457125cef3d55cc2ca7ee85835869
efcc99d2c4f6df2bc6b55d207dbe72356ceca0e1
refs/heads/main
2023-03-22T03:01:34.162611
2021-03-10T13:24:06
2021-03-10T13:24:06
null
0
0
null
null
null
null
UTF-8
C
false
false
806
c
malloc_game.c
/* ** EPITECH PROJECT, 2020 ** create_audio.c ** File description: ** header for create_audio.c */ #include "my_csfml.h" game_data_t *malloc_game(void) { game_data_t *data = malloc_game_data(); if (!data) return NULL; data->stats = malloc_game_stats(); data->game_settings = malloc_settings(); data->scenes = malloc_scene_struct(); if (!data->stats || !data->game_settings || !data->scenes) return NULL; data->stats->time = malloc_time_stats(); data->stats->camera = malloc_game_camera(); data->game_settings->audio = malloc_audio_data(); data->game_settings->video = malloc_video_data(); if (!data->stats->time || !data->stats->camera || !data->game_settings->video || !data->game_settings->audio) return NULL; return data; }
324b1f5c396d095ca93cbd1153550135a56cd37a
ec9b00d6c0498c7465eca6f57dd17232133cc986
/src/vm/frame.h
78310de62cb19172db8c4a71e26147d28fb56a7f
[ "MIT", "MIT-Modern-Variant", "LicenseRef-scancode-unknown-license-reference" ]
permissive
allendaniel1993/Virtual-Memory-Implementation
828a1d0e087f8b8486bdc663c41a938eb45384b4
fba524e6c2d5cc3bcba52eddff0dfcbf5aa325eb
refs/heads/master
2021-05-03T13:59:32.382881
2018-02-06T20:37:16
2018-02-06T20:37:16
120,519,543
0
0
null
null
null
null
UTF-8
C
false
false
633
h
frame.h
#ifndef FRAME_H #define FRAME_H #include "lib/typedefs.h" #include <hash.h> struct frame_entry { page_entry_ptr_t page; thread_ptr_t thread_ptr; void_ptr_t frame_ptr; uint32_t order; struct hash_elem elem; }; void init_frame_table(void); unsigned frame_hash ( const_hash_elem_ptr_t ele, void_ptr_t aux); bool frame_hash_min ( const_hash_elem_ptr_t first, const_hash_elem_ptr_t second, void_ptr_t aux ); frame_entry_ptr_t create_frame(page_entry_ptr_t page); void destroy_frame(frame_entry_ptr_t frame); frame_entry_ptr_t get_frame(page_entry_ptr_t page); void clear_frame(void); #endif /* FRAME_H */
0dd96b06865a866d6f9ac80746f9b6a45609e7d0
66736c0da611ad62f862b3ca9cc35b438bb4ce85
/lab7/fft_edma/fft.c
a631f74b907519b56507d9e532d0de883aa5c566
[]
no_license
cdaffron/rtdsp
fb21f3c369fb2d09660467f2bcc59f78df2ce485
30c191122cb69ab0179a4ea9a0caf78a44b67f68
refs/heads/master
2016-09-09T18:34:03.880234
2015-04-27T20:37:36
2015-04-27T20:37:36
29,996,421
2
2
null
null
null
null
UTF-8
C
false
false
1,942
c
fft.c
// Welch, Wright, & Morrow, // Real-time Digital Signal Processing, 2011 // This code calculates the fft of an N point complex data sequence, x[N]. // The fft of real input values can be calculated by omitting the // x[].imag declarations. The fft results (the N complex numbers) are // returned in x[N]. This algorithm is based on the discussion in, // "C Algorithms for Real-Time DSP", by Paul M. Embree // Prentice-Hall PTR, copyright 1995. #include <math.h> #include <stdio.h> #include "fft.h" #define PI 3.14159265358979323846 void fft_c(int n, COMPLEX *x, COMPLEX *W) { COMPLEX u, temp, tm; COMPLEX *Wptr; int i, j, k, len, Windex; /* start fft */ Windex = 1; for(len = n/2 ; len > 0 ; len /= 2) { Wptr = W; for (j = 0 ; j < len ; j++) { u = *Wptr; for (i = j ; i < n ; i = i + 2*len) { temp.real = x[i].real + x[i+len].real; temp.imag = x[i].imag + x[i+len].imag; tm.real = x[i].real - x[i+len].real; tm.imag = x[i].imag - x[i+len].imag; x[i+len].real = tm.real*u.real - tm.imag*u.imag; x[i+len].imag = tm.real*u.imag + tm.imag*u.real; x[i] = temp; } Wptr = Wptr + Windex; } Windex = 2*Windex; } /* rearrange data by bit reversing */ j = 0; for (i = 1; i < (n-1); i++) { k = n/2; while(k <= j) { j -= k; k /= 2; } j += k; if (i < j) { temp = x[j]; x[j] = x[i]; x[i] = temp; } } } void init_W(int n, COMPLEX *W) { int i; float a = 2.0*PI/n; for(i = 0 ; i < n ; i++) { W[i].real = (float) cos(-i*a); W[i].imag = (float) sin(-i*a); } } void init_W_neg(int n, COMPLEX *W) { int i; float a = 2.0*PI/n; for(i = 0; i < n; i ++) { W[i].real = (float) cos(-i*a); W[i].imag = (float) sin(-i*a); } }
ca32c8becbccb3f728d612ae768f26aad7817883
bb5a14a8fdb46e109aa8b984b71c29500e7eabb0
/QuickHull/list.h
245c2567e348ece7774cb0e7e58bd1675d37d863
[]
no_license
pradhapanr/Algorithms
fcdc4b9d984a4cea8907e14553f0a8e5f6bddf33
ee2b14420c3d59bc7b4f619e238742906c0685f7
refs/heads/main
2023-06-17T12:36:23.298793
2021-07-18T21:52:59
2021-07-18T21:52:59
387,266,605
0
0
null
null
null
null
UTF-8
C
false
false
465
h
list.h
#include <stdio.h> #include <stdlib.h> /** * Very basic list structure to simplify algorithm code */ typedef struct Point { double x; double y; struct Point *next; } Point; typedef struct List { Point *head; } List; Point *new_point(Point *next, double x, double y); Point *prepend_point(Point *head, double x, double y); Point *find_index(Point *head, int index); int is_empty(List *list); int num_elements(List *list);
7235a56a470e04f45bf53c7076ebfcc956103982
ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c
/out/release/gen/content/common/navigation_params.mojom-import-headers.h
35cf3d00cdb036d14fbb9932f5452aebf2b1d9ba
[ "BSD-3-Clause" ]
permissive
xueqiya/chromium_src
5d20b4d3a2a0251c063a7fb9952195cda6d29e34
d4aa7a8f0e07cfaa448fcad8c12b29242a615103
refs/heads/main
2022-07-30T03:15:14.818330
2021-01-16T16:47:22
2021-01-16T16:47:22
330,115,551
1
0
null
null
null
null
UTF-8
C
false
false
2,513
h
navigation_params.mojom-import-headers.h
// content/common/navigation_params.mojom-import-headers.h is auto generated by mojom_bindings_generator.py, do not edit // Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_MOJOM_IMPORT_HEADERS_H_ #define CONTENT_COMMON_NAVIGATION_PARAMS_MOJOM_IMPORT_HEADERS_H_ #include "content/common/prefetched_signed_exchange_info.mojom.h" #include "content/common/prefetched_signed_exchange_info.mojom-import-headers.h" #include "content/public/common/was_activated_option.mojom.h" #include "content/public/common/was_activated_option.mojom-import-headers.h" #include "mojo/public/mojom/base/time.mojom.h" #include "mojo/public/mojom/base/time.mojom-import-headers.h" #include "mojo/public/mojom/base/unguessable_token.mojom.h" #include "mojo/public/mojom/base/unguessable_token.mojom-import-headers.h" #include "mojo/public/mojom/base/values.mojom.h" #include "mojo/public/mojom/base/values.mojom-import-headers.h" #include "services/network/public/mojom/content_security_policy.mojom.h" #include "services/network/public/mojom/content_security_policy.mojom-import-headers.h" #include "services/network/public/mojom/ip_address_space.mojom.h" #include "services/network/public/mojom/ip_address_space.mojom-import-headers.h" #include "services/network/public/mojom/url_loader.mojom.h" #include "services/network/public/mojom/url_loader.mojom-import-headers.h" #include "services/network/public/mojom/url_response_head.mojom.h" #include "services/network/public/mojom/url_response_head.mojom-import-headers.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-import-headers.h" #include "third_party/blink/public/mojom/referrer.mojom.h" #include "third_party/blink/public/mojom/referrer.mojom-import-headers.h" #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom.h" #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-import-headers.h" #include "third_party/blink/public/mojom/frame/frame_policy.mojom.h" #include "third_party/blink/public/mojom/frame/frame_policy.mojom-import-headers.h" #include "url/mojom/origin.mojom.h" #include "url/mojom/origin.mojom-import-headers.h" #include "url/mojom/url.mojom.h" #include "url/mojom/url.mojom-import-headers.h" #endif // CONTENT_COMMON_NAVIGATION_PARAMS_MOJOM_IMPORT_HEADERS_H_
f793f1146a583c4268a603e74ca016c9fa6f0009
782f9a82a4eb5f5fdd188278fa6315b55c5918a9
/includes/tcpsrv.h
c86124d3c8d418b639672d186e6685514d3eda7d
[]
no_license
Angellada/libnet
115bcac6f022fedcce32a536f70a5be5eb70d1b1
c2ea98035f0f522159ffec84d6349c38d3d07e7e
refs/heads/master
2017-12-02T05:56:27.035684
2012-04-25T12:58:42
2012-04-25T12:58:42
null
0
0
null
null
null
null
UTF-8
C
false
false
990
h
tcpsrv.h
/* ** tcpsrv.h for in /home/xaqq/Documents/net ** ** Made by arnaud kapp ** Login <kapp_a@epitech.net> ** ** Started on Wed Feb 22 16:43:52 2012 arnaud kapp ** Last update Sun Apr 22 15:07:49 2012 arnaud kapp */ #ifndef TCPSRV_H_ # define TCPSRV_H_ # include "tcpsock.h" # include "tcpclient.h" typedef struct s_tcp_server { int status; t_tcp_socket sock; } t_tcp_server; /* ** Callback function for new incomming connection ** malloc *user_data to application need, it is ** stored inside clients' list. */ int (*__cb_new_connection)(void **user_data); /* ** Callback function. Called when new data are avalaible ** for reading. */ int (*__cb_incomming_data)(t_tcp_client *c); /* ** Call when deleting a client */ int (*__cb_free_user_data)(void *data); void tcpsrv_delete(void); int tcpsrv_create(void); int tcpsrv_listen(int max); int tcpsrv_bind(unsigned short port); int tcpsrv_run(int timeout); t_tcp_client *get_all_clients(); #endif /* !TCPSRV_I_H_ */
6d8cd057c7352f97913fb1cbfe3018bbb18c872f
1ac703581124248f932351dc2bb6e31bccf7914f
/粤嵌实习-c语言/10音视频播放/1管道/touch.h
4a4caab46aecfb256e5c8d3e27bfc4bccffd7915
[]
no_license
18476040601/C-VScode
76f8b16df4e88d2c9bf7377b54da1c274b603aed
939a099520ee5f00ff51e97af8b2e9eac7e46d3b
refs/heads/master
2023-07-07T02:18:11.379831
2021-08-13T06:58:22
2021-08-13T06:58:22
395,305,469
0
0
null
null
null
null
UTF-8
C
false
false
214
h
touch.h
#ifndef __TOUCH_H__ #define __TOUCH_H__ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <linux/input.h> int ts_get(int * a , int * b ); #endif
2ece2a0a19557fe8c4249a36a3dccc3a4067fa96
55cf8e96b09335cf72eb07e72b741a164ce9db93
/MST/external/libxc-5.1.6/src/mgga_x_scan.c
4d838ee26f975cf8c366a8b3f73bd17c830a9085
[ "BSD-3-Clause", "FSFAP", "MPL-2.0", "MPL-1.0" ]
permissive
mstsuite/MuST
9e5c3c34d0eeb68c78703fa163bc66b5c156b00a
6dd17ba6d8f70a3177ea426ca1c8780a87645f96
refs/heads/master
2023-08-18T07:46:19.405836
2023-08-15T02:51:54
2023-08-15T02:51:54
218,340,736
46
24
BSD-3-Clause
2023-08-09T20:14:57
2019-10-29T17:07:16
Fortran
UTF-8
C
false
false
4,161
c
mgga_x_scan.c
/* Copyright (C) 2016 Susi Lehtola This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "util.h" #define XC_MGGA_X_SCAN 263 /* SCAN exchange of Sun, Ruzsinszky, and Perdew */ #define XC_HYB_MGGA_X_SCAN0 264 /* SCAN hybrid exchange */ #define XC_MGGA_X_REVSCAN 581 /* revised SCAN */ #define XC_HYB_MGGA_X_REVSCAN0 583 /* revised SCAN hybrid exchange */ typedef struct{ double c1, c2, d, k1; } mgga_x_scan_params; #define N_PAR_SCAN 4 static const char *scan_names[N_PAR_SCAN] = {"_c1", "_c2", "_d", "_k1"}; static const char *scan_desc[N_PAR_SCAN] = {"c1 parameter", "c2 parameter", "d parameter", "k1 parameter"}; static const double par_scan[N_PAR_SCAN] = {0.667, 0.8, 1.24, 0.065}; static const double par_revscan[N_PAR_SCAN] = {0.607, 0.7, 1.37, 0.065}; static void mgga_x_scan_init(xc_func_type *p) { assert(p!=NULL && p->params == NULL); p->params = libxc_malloc(sizeof(mgga_x_scan_params)); } #include "decl_mgga.h" #include "maple2c/mgga_exc/mgga_x_scan.c" #include "work_mgga.c" #ifdef __cplusplus extern "C" #endif const xc_func_info_type xc_func_info_mgga_x_scan = { XC_MGGA_X_SCAN, XC_EXCHANGE, "SCAN exchange of Sun, Ruzsinszky, and Perdew", XC_FAMILY_MGGA, {&xc_ref_Sun2015_036402, NULL, NULL, NULL, NULL}, XC_FLAGS_3D | MAPLE2C_FLAGS, 1e-15, {N_PAR_SCAN, scan_names, scan_desc, par_scan, set_ext_params_cpy}, mgga_x_scan_init, NULL, NULL, NULL, work_mgga }; #ifdef __cplusplus extern "C" #endif const xc_func_info_type xc_func_info_mgga_x_revscan = { XC_MGGA_X_REVSCAN, XC_EXCHANGE, "revised SCAN", XC_FAMILY_MGGA, {&xc_ref_Mezei2018_2469, NULL, NULL, NULL, NULL}, XC_FLAGS_3D | MAPLE2C_FLAGS, 1e-15, {N_PAR_SCAN, scan_names, scan_desc, par_revscan, set_ext_params_cpy}, mgga_x_scan_init, NULL, NULL, NULL, work_mgga }; typedef struct{ double exx; } hyb_mgga_x_scan0_params; #define N_PAR_SCAN0 1 static const char *scan0_names[N_PAR_SCAN0] = {"_exx"}; static const char *scan0_desc[N_PAR_SCAN0] = {"fraction of exact exchange"}; static const double scan0_pars[N_PAR_SCAN0] = {0.25}; static void scan0_set_ext_params(xc_func_type *p, const double *ext_params) { double a0; assert(p != NULL); a0 = get_ext_param(p, ext_params, 0); p->mix_coef[0] = 1.0 - a0; p->cam_alpha = a0; } static void hyb_mgga_x_scan0_init(xc_func_type *p) { assert(p!=NULL && p->params == NULL); p->params = libxc_malloc(sizeof(mgga_x_scan_params)); static int funcs_id [1] = {XC_MGGA_X_SCAN}; static double funcs_coef[1] = {0.0}; /* set by ext_params */ xc_mix_init(p, 1, funcs_id, funcs_coef); xc_hyb_init_hybrid(p, 0.0); /* set by ext_params */ } #ifdef __cplusplus extern "C" #endif const xc_func_info_type xc_func_info_hyb_mgga_x_scan0 = { XC_HYB_MGGA_X_SCAN0, XC_EXCHANGE, "SCAN hybrid exchange (SCAN0)", XC_FAMILY_HYB_MGGA, {&xc_ref_Hui2016_044114, NULL, NULL, NULL, NULL}, XC_FLAGS_3D | MAPLE2C_FLAGS, 1e-15, {N_PAR_SCAN0, scan0_names, scan0_desc, scan0_pars, scan0_set_ext_params}, hyb_mgga_x_scan0_init, NULL, NULL, NULL, NULL /* this is taken care of by the generic routine */ }; static void hyb_mgga_x_revscan0_init(xc_func_type *p) { assert(p!=NULL && p->params == NULL); p->params = libxc_malloc(sizeof(mgga_x_scan_params)); static int funcs_id [1] = {XC_MGGA_X_REVSCAN}; static double funcs_coef[1] = {0.0}; /* set by ext_params */ xc_mix_init(p, 1, funcs_id, funcs_coef); xc_hyb_init_hybrid(p, 0.0); /* set by ext_params */ } #ifdef __cplusplus extern "C" #endif const xc_func_info_type xc_func_info_hyb_mgga_x_revscan0 = { XC_HYB_MGGA_X_REVSCAN0, XC_EXCHANGE, "revised SCAN hybrid exchange (SCAN0)", XC_FAMILY_HYB_MGGA, {&xc_ref_Mezei2018_2469, NULL, NULL, NULL, NULL}, XC_FLAGS_3D | MAPLE2C_FLAGS, 1e-15, {N_PAR_SCAN0, scan0_names, scan0_desc, scan0_pars, scan0_set_ext_params}, hyb_mgga_x_revscan0_init, NULL, NULL, NULL, NULL /* this is taken care of by the generic routine */ };
21f4b28fe19a642976d626895e1c1a7f660844d4
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/RetroArch/extr_configuration.c_config_get_default_menu.c
c80336fe3efff3799febe1372b6b0b808ee29ed2
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,519
c
extr_configuration.c_config_get_default_menu.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ typedef struct TYPE_4__ TYPE_2__ ; typedef struct TYPE_3__ TYPE_1__ ; /* Type definitions */ typedef enum menu_driver_enum { ____Placeholder_menu_driver_enum } menu_driver_enum ; struct TYPE_3__ {char const* menu; } ; struct TYPE_4__ {TYPE_1__ settings; } ; /* Variables and functions */ int MENU_DEFAULT_DRIVER ; #define MENU_MATERIALUI 134 #define MENU_NULL 133 #define MENU_OZONE 132 #define MENU_RGUI 131 #define MENU_STRIPES 130 #define MENU_XMB 129 #define MENU_XUI 128 TYPE_2__ g_defaults ; int /*<<< orphan*/ string_is_empty (char const*) ; const char *config_get_default_menu(void) { #ifdef HAVE_MENU enum menu_driver_enum default_driver = MENU_DEFAULT_DRIVER; if (!string_is_empty(g_defaults.settings.menu)) return g_defaults.settings.menu; switch (default_driver) { case MENU_RGUI: return "rgui"; case MENU_XUI: return "xui"; case MENU_OZONE: return "ozone"; case MENU_MATERIALUI: return "glui"; case MENU_XMB: return "xmb"; case MENU_STRIPES: return "stripes"; case MENU_NULL: break; } #endif return "null"; }
6357805a01f54bf30554bc022f5f9021e0a661b7
8d1725e2bedd244d7bc865df75317a85d2468e93
/qt_gui/c_lib/include/qt_gui_c_QLinearGradient.h
ddfda75ec1108adb19d76a9165c2ac9550149da6
[]
no_license
aristotle9/qt_generator-output
04100597f923b117314afcc80f0ea85417d342be
be98dd92de8d2e2c43cf8e9e20ebd1316fd4b101
refs/heads/master
2021-07-23T12:20:15.277052
2017-10-24T08:20:03
2017-10-24T08:20:03
108,097,475
2
0
null
null
null
null
UTF-8
C
false
false
1,502
h
qt_gui_c_QLinearGradient.h
#ifndef QT_GUI_C_QLINEARGRADIENT_H #define QT_GUI_C_QLINEARGRADIENT_H #include "qt_gui_c_global.h" extern "C" { QT_GUI_C_EXPORT QGradient* qt_gui_c_QLinearGradient_G_static_cast_QGradient_ptr(QLinearGradient* ptr); QT_GUI_C_EXPORT QLinearGradient* qt_gui_c_QLinearGradient_G_static_cast_QLinearGradient_ptr(QGradient* ptr); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_delete(QLinearGradient* this_ptr); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_finalStop_to_output(const QLinearGradient* this_ptr, QPointF* output); QT_GUI_C_EXPORT QLinearGradient* qt_gui_c_QLinearGradient_new_no_args(); QT_GUI_C_EXPORT QLinearGradient* qt_gui_c_QLinearGradient_new_start_finalStop(const QPointF* start, const QPointF* finalStop); QT_GUI_C_EXPORT QLinearGradient* qt_gui_c_QLinearGradient_new_xStart_yStart_xFinalStop_yFinalStop(double xStart, double yStart, double xFinalStop, double yFinalStop); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_setFinalStop_stop(QLinearGradient* this_ptr, const QPointF* stop); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_setFinalStop_x_y(QLinearGradient* this_ptr, double x, double y); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_setStart_start(QLinearGradient* this_ptr, const QPointF* start); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_setStart_x_y(QLinearGradient* this_ptr, double x, double y); QT_GUI_C_EXPORT void qt_gui_c_QLinearGradient_start_to_output(const QLinearGradient* this_ptr, QPointF* output); } // extern "C" #endif // QT_GUI_C_QLINEARGRADIENT_H
5174c3d7aeaf83041174c55d2c586687f7359739
f7e717ba5e71da5a2862bf2804265cec4bbbc119
/hw_05_queue/queue.c
4a5f0bd0a5a71a72ecac46f4b021b0eff0a42a32
[]
no_license
FireDraggoN/Informatics
003afac92725ec718f840e1854afdc8492231c50
dc635a771082e86fa772a01765d07cc4fbca48da
refs/heads/master
2022-10-22T15:29:23.079999
2020-06-06T13:53:17
2020-06-06T13:53:17
258,775,773
0
0
null
2020-05-10T13:45:09
2020-04-25T12:56:58
null
UTF-8
C
false
false
1,035
c
queue.c
#include "queue.h" #include <stdio.h> #include <stdlib.h> Node *newNode(double val) { Node* temp = (Node*)malloc(sizeof(Node)); temp->val = val; temp->next = NULL; return temp; } Queue *createQueue() { Queue* q = (Queue*)malloc(sizeof(Queue)); q->front = q->rear = NULL; return q; } int enqueue(Queue* q, double val) { Node* temp = newNode(val); if (q->rear == NULL) { q->front = q->rear = temp; return; } q->rear->next = temp; q->rear = temp; } double dequeue(Queue* q) { if (q->front == NULL) return; Node *temp = q->front; double val = temp->val; q->front = q->front->next; if (q->front == NULL) q->rear = NULL; free(temp); return val; } int length(Queue q) { int cnt = 1; if (q.front == NULL) return 0; while (q.front != q.rear) { cnt++; q.front = q.front->next; } return cnt; } int print_queue(Queue q) { int n = length(q); if (q.front == NULL) return; for (int i = 0; i < n; i++) { printf("%d ", (int)q.front->val); q.front = q.front->next; } printf("\n"); }
19e13f8a4d3fbef7161120530fdb23a5b5c0fb2c
fdc5b324e581ca09370cc2aedfb2f72c3a3a2a6f
/seed_for_r2/602_new.c
f6bfb8b69192baa137d7179757097d8f95e623e3
[]
no_license
hz90937880/NewDecFuzzer
12981d53dd64e9a4ef881d4879b7abb3050ff849
aa946ff1ad89742093a89a4703af238734546d9f
refs/heads/main
2023-04-15T18:04:11.235871
2021-04-25T15:45:45
2021-04-25T15:45:45
351,564,252
0
0
null
null
null
null
UTF-8
C
false
false
3,411
c
602_new.c
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.3.0 * Git version: unknown * Options: --no-arrays --no-structs --no-unions --no-safe-math --no-pointers --no-longlong --max-funcs 1 --max-expr-complexity 5 --output ./tmp/src_code/csmith_test_1039.c * Seed: 4240102299 */ #define NO_LONGLONG #include "csmith.h" static long __undefined; /* --- Struct/Union Declarations --- */ /* --- GLOBAL VARIABLES --- */ static int32_t g_2 = (-1); static uint16_t g_8 = 0x35E4; static int32_t g_9 = 1; static uint16_t g_19 = 0xC254; static int16_t g_45 = 5; /* --- FORWARD DECLARATIONS --- */ static uint8_t func_1(void); static int set_var(int32_t g_2_l, uint16_t g_8_l, int32_t g_9_l, uint16_t g_19_l, int16_t g_45_l){ g_2 = g_2_l;g_8 = g_8_l;g_9 = g_9_l;g_19 = g_19_l;g_45 = g_45_l; return 0; } /* --- FUNCTIONS --- */ /* ------------------------------------------ */ /* * reads : g_2 g_9 g_19 g_45 g_8 * writes: g_8 g_9 g_19 g_45 */ static uint8_t func_1(void) { uint32_t var_34h; uint32_t var_30h; int32_t var_28h; int32_t var_24h; int32_t var_20h; uint32_t var_18h; uint32_t var_ch; uint32_t var_4h; set_var(0xffffffff, 1, 1, 0xc255, 0xffffddae); return 1; } /* ---------------------------------------- */ int main (int argc, char* argv[]) { int print_hash_value = 0; if (argc == 2 && strcmp(argv[1], "1") == 0) print_hash_value = 1; platform_main_begin(); crc32_gentab(); func_1(); transparent_crc(g_2, "g_2", print_hash_value); transparent_crc(g_8, "g_8", print_hash_value); transparent_crc(g_9, "g_9", print_hash_value); transparent_crc(g_19, "g_19", print_hash_value); transparent_crc(g_45, "g_45", print_hash_value); platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); return 0; } /************************ statistics ************************* XXX max struct depth: 0 breakdown: depth: 0, occurrence: 16 XXX total union variables: 0 XXX non-zero bitfields defined in structs: 0 XXX zero bitfields defined in structs: 0 XXX const bitfields defined in structs: 0 XXX volatile bitfields defined in structs: 0 XXX structs with bitfields in the program: 0 breakdown: XXX full-bitfields structs in the program: 0 breakdown: XXX times a bitfields struct's address is taken: 0 XXX times a bitfields struct on LHS: 0 XXX times a bitfields struct on RHS: 0 XXX times a single bitfield on LHS: 0 XXX times a single bitfield on RHS: 0 XXX max expression depth: 21 breakdown: depth: 1, occurrence: 12 depth: 8, occurrence: 1 depth: 9, occurrence: 1 depth: 10, occurrence: 1 depth: 14, occurrence: 1 depth: 15, occurrence: 1 depth: 16, occurrence: 1 depth: 21, occurrence: 1 XXX total number of pointers: 0 XXX times a non-volatile is read: 55 XXX times a non-volatile is write: 14 XXX times a volatile is read: 0 XXX times read thru a pointer: 0 XXX times a volatile is write: 0 XXX times written thru a pointer: 0 XXX times a volatile is available for access: 0 XXX percentage of non-volatile access: 100 XXX forward jumps: 0 XXX backward jumps: 0 XXX stmts: 11 XXX max block depth: 1 breakdown: depth: 0, occurrence: 4 depth: 1, occurrence: 7 XXX percentage a fresh-made variable is used: 22.9 XXX percentage an existing variable is used: 77.1 ********************* end of statistics **********************/
47c1930dbf92c2520c03912f8cbef8b329cbe887
54cfde82a405a999d2706a240fce7a08d76d3be2
/srcs/expand/ft_expand_env.c
cfc2a6ae0461aebbc5229fceefd09a10f88cf19f
[]
no_license
rbourgeat/minishell
038eb17569038db09be54f12aa21bf4db3cf80b6
74f7a26ff5bdf22d7e5ff423003c5c0af9705b57
refs/heads/master
2023-02-15T21:40:11.839800
2021-01-09T00:02:26
2021-01-09T00:02:26
null
0
0
null
null
null
null
UTF-8
C
false
false
2,158
c
ft_expand_env.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_expand_env.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gboucett <gboucett@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/01/04 02:28:09 by gboucett #+# #+# */ /* Updated: 2021/01/06 19:41:17 by gboucett ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_expand.h" static char *ft_get_name(char *str) { char *result; char *tmp; int len; len = 0; str++; if (ft_isdigit(*str)) return (ft_substr(str - 1, 0, 2)); if (*str == '?') return (ft_strdup("$?")); while (str[len] && (ft_isalnum(str[len]) || str[len] == '_')) len++; result = ft_substr(str, 0, len); tmp = result; result = ft_strjoin("$", result); free(tmp); return (result); } static char *ft_get_value(char *str) { char *val; if (!str) return (ft_strdup(str)); else if (ft_isdigit(str[1])) return (ft_strdup("")); else if (!str[1]) return (ft_strdup(str)); else if (str[1] == '?') return (ft_itoa(g_exit_code)); val = ft_getvar(str + 1); if (!val) return (ft_strdup("")); return (ft_strdup(val)); } void ft_expand_env(t_list **lst, char *str) { char *found; t_list *node; char *name; int in_quotes; in_quotes = 0; while (*str) { found = ft_strchr_quoted(str, '$', &in_quotes); if (!found) break ; name = ft_get_name(found); node = ft_create_expansion(ft_strndup(str, found - str), 0); ft_lstadd_back(lst, node); node = ft_create_expansion(ft_get_value(name), 1); ft_lstadd_back(lst, node); str = found + ft_strlen(name); free(name); } if (*str) ft_append_last(lst, str); }
66548dd711354a73b5111bc0cbc4849453c9e5c0
3508dcd12d0d69fec4d30c50334f8deb24f376eb
/v8/src/microcode/lookup.c
819497099f9bb946e4c66e27bd528e4bc5891d2b
[]
no_license
barak/mit-scheme
be625081e92c2c74590f6b5502f5ae6bc95aa492
56e1a12439628e4424b8c3ce2a3118449db509ab
refs/heads/master
2023-01-24T11:03:23.447076
2022-09-11T06:10:46
2022-09-11T06:10:46
12,487,054
12
1
null
null
null
null
UTF-8
C
false
false
75,419
c
lookup.c
/* -*-C-*- Copyright (c) 1988-1999 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * This file contains symbol lookup and modification routines. * See a paper by Jim Miller and Bill Rozas in Lisp and Symbolic Computation * (4th issue 1990) for a justification of the algorithms. */ #include "scheme.h" #include "locks.h" #include "trap.h" #include "lookup.h" /* NOTE: Although this code has been parallelized, it has not been exhaustively tried on a parallel processor. There are probably various race conditions/potential deadlocks that have to be thought about carefully. */ /* Useful constants. */ /* This is returned by various procedures to cause a Scheme unbound variable error to be signalled. */ SCHEME_OBJECT unbound_trap_object[] = { UNBOUND_OBJECT }; /* This is returned by lookup to force a deep lookup when the variable needs to be recompiled. */ SCHEME_OBJECT uncompiled_trap_object[] = { DANGEROUS_UNBOUND_OBJECT }; /* This is returned by lookup to cause a Scheme broken compiled variable error to be signalled. */ SCHEME_OBJECT illegal_trap_object[] = { ILLEGAL_OBJECT }; /* This is passed to deep_lookup as the variable to compile when we don't really have a variable. */ SCHEME_OBJECT fake_variable_object[3]; /* scan_frame searches a frame for a given name. If it finds the names, it stores into hunk the path by which it was found, so that future references do not spend the time to find it again. It returns a pointer to the value cell, or a null pointer cell if the variable was not found in this frame. */ extern SCHEME_OBJECT * EXFUN (scan_frame, (SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT *, long, Boolean)); SCHEME_OBJECT * DEFUN (scan_frame, (frame, sym, hunk, depth, unbound_valid_p), SCHEME_OBJECT frame AND SCHEME_OBJECT sym AND SCHEME_OBJECT * hunk AND long depth AND Boolean unbound_valid_p) { Lock_Handle compile_serializer; fast SCHEME_OBJECT *scan, temp; fast long count; temp = MEMORY_REF (frame, ENVIRONMENT_FUNCTION); if (OBJECT_TYPE (temp) == AUX_LIST_TYPE) { /* Search for an auxiliary binding. */ SCHEME_OBJECT *start; scan = OBJECT_ADDRESS (temp); start = scan; count = Lexical_Offset(scan[AUX_LIST_COUNT]); scan += AUX_LIST_FIRST; while (--count >= 0) { if (FAST_PAIR_CAR (*scan) == sym) { SCHEME_OBJECT *cell; cell = PAIR_CDR_LOC (*scan); if (MEMORY_FETCH (cell[0]) == DANGEROUS_UNBOUND_OBJECT) { /* A dangerous unbound object signals that a definition here must become dangerous, but is not a real bining. */ return (unbound_valid_p ? (cell) : ((SCHEME_OBJECT *) NULL)); } setup_lock(compile_serializer, hunk); hunk[VARIABLE_COMPILED_TYPE] = MAKE_OBJECT (AUX_REF, depth); hunk[VARIABLE_OFFSET] = Make_Local_Offset(scan - start); remove_lock(compile_serializer); return (cell); } scan += 1; } temp = MEMORY_REF (temp, ENV_EXTENSION_PROCEDURE); } /* Search for a formal parameter. */ temp = (FAST_MEMORY_REF ((FAST_MEMORY_REF (temp, PROCEDURE_LAMBDA_EXPR)), LAMBDA_FORMALS)); for (count = ((VECTOR_LENGTH (temp)) - 1), scan = (MEMORY_LOC (temp, VECTOR_DATA + 1)); count > 0; count -= 1, scan += 1) { if (*scan == sym) { fast long offset; offset = 1 + VECTOR_LENGTH (temp) - count; setup_lock(compile_serializer, hunk); if (depth != 0) { hunk[VARIABLE_COMPILED_TYPE] = MAKE_OBJECT (FORMAL_REF, depth); hunk[VARIABLE_OFFSET] = Make_Local_Offset(offset); } else { hunk[VARIABLE_COMPILED_TYPE] = Make_Local_Offset(offset); hunk[VARIABLE_OFFSET] = SHARP_F; } remove_lock(compile_serializer); return (MEMORY_LOC (frame, offset)); } } return ((SCHEME_OBJECT *) NULL); } /* The lexical lookup procedure. deep_lookup searches env for an occurrence of sym. When it finds it, it stores into hunk the path by which it was found, so that future references do not spend the time to find it again. It returns a pointer to the value cell, or a bogus value cell if the variable was unbound. */ SCHEME_OBJECT * DEFUN (deep_lookup, (env, sym, hunk), SCHEME_OBJECT env AND SCHEME_OBJECT sym AND SCHEME_OBJECT * hunk) { Lock_Handle compile_serializer; fast SCHEME_OBJECT frame; fast long depth; for (depth = 0, frame = env; OBJECT_TYPE (frame) != GLOBAL_ENV; depth += 1, frame = FAST_MEMORY_REF (MEMORY_REF (frame, ENVIRONMENT_FUNCTION), PROCEDURE_ENVIRONMENT)) { fast SCHEME_OBJECT *cell; cell = (scan_frame (frame, sym, hunk, depth, false)); if (cell != ((SCHEME_OBJECT *) NULL)) { return (cell); } } /* The reference is global. */ if (OBJECT_DATUM (frame) != GO_TO_GLOBAL) { return (unbound_trap_object); } setup_lock(compile_serializer, hunk); hunk[VARIABLE_COMPILED_TYPE] = (OBJECT_NEW_TYPE (TC_UNINTERNED_SYMBOL, sym)); hunk[VARIABLE_OFFSET] = SHARP_F; remove_lock(compile_serializer); return (MEMORY_LOC (sym, SYMBOL_GLOBAL_VALUE)); } /* Shallow lookup performed "out of line" by various procedures. It takes care of invoking deep_lookup when necessary. */ extern SCHEME_OBJECT * EXFUN (lookup_cell, (SCHEME_OBJECT *, SCHEME_OBJECT)); SCHEME_OBJECT * DEFUN (lookup_cell, (hunk, env), SCHEME_OBJECT * hunk AND SCHEME_OBJECT env) { SCHEME_OBJECT *cell, value; long trap_kind; lookup(cell, env, hunk, repeat_lookup_cell); value = MEMORY_FETCH (cell[0]); if (OBJECT_TYPE (value) != TC_REFERENCE_TRAP) { return (cell); } get_trap_kind(trap_kind, value); switch(trap_kind) { case TRAP_DANGEROUS: case TRAP_UNBOUND_DANGEROUS: case TRAP_UNASSIGNED_DANGEROUS: case TRAP_FLUID_DANGEROUS: case TRAP_COMPILER_CACHED_DANGEROUS: return (deep_lookup(env, hunk[VARIABLE_SYMBOL], hunk)); case TRAP_COMPILER_CACHED: case TRAP_FLUID: case TRAP_UNBOUND: case TRAP_UNASSIGNED: return (cell); default: return (illegal_trap_object); } } /* Full lookup end code. deep_lookup_end handles all the complicated and dangerous cases. cell is the value cell (supposedly found by deep_lookup). Hunk is the address of the scode variable object which may need to be recompiled if the reference is dangerous. */ long DEFUN (deep_lookup_end, (cell, hunk), SCHEME_OBJECT * cell AND SCHEME_OBJECT * hunk) { long trap_kind, return_value; Boolean repeat_p; do { repeat_p = false; Val = MEMORY_FETCH (cell[0]); FUTURE_VARIABLE_SPLICE (((SCHEME_OBJECT) cell), 0, Val); if (!(REFERENCE_TRAP_P(Val))) { return (PRIM_DONE); } /* Remarks: In the code below, break means uncompile the variable, while continue means do not. If repeat_p is set the whole process is redone, but since the "danger bit" is kept on the outermost trap, the "uncompilation" will not be affected by subsequent iterations. */ get_trap_kind(trap_kind, Val); switch(trap_kind) { /* The following cases are divided into pairs: the non-dangerous version leaves the compilation alone. The dangerous version uncompiles. */ case TRAP_UNASSIGNED: return (ERR_UNASSIGNED_VARIABLE); case TRAP_UNASSIGNED_DANGEROUS: return_value = ERR_UNASSIGNED_VARIABLE; break; case TRAP_DANGEROUS: { SCHEME_OBJECT trap_value; trap_value = Val; Val = (MEMORY_REF (trap_value, TRAP_EXTRA)); FUTURE_VARIABLE_SPLICE (trap_value, TRAP_EXTRA, Val); return_value = PRIM_DONE; break; } case TRAP_FLUID: case TRAP_FLUID_DANGEROUS: cell = lookup_fluid(Val); repeat_p = true; if (trap_kind == TRAP_FLUID) continue; break; case TRAP_COMPILER_CACHED: case TRAP_COMPILER_CACHED_DANGEROUS: cell = MEMORY_LOC (MEMORY_REF (Val, TRAP_EXTRA), TRAP_EXTENSION_CELL); repeat_p = true; if (trap_kind == TRAP_COMPILER_CACHED) continue; break; case TRAP_UNBOUND: return (ERR_UNBOUND_VARIABLE); case TRAP_UNBOUND_DANGEROUS: return_value = ERR_UNBOUND_VARIABLE; break; default: return_value = ERR_ILLEGAL_REFERENCE_TRAP; break; } /* The reference was dangerous, uncompile the variable. */ { Lock_Handle compile_serializer; setup_lock(compile_serializer, hunk); hunk[VARIABLE_COMPILED_TYPE] = UNCOMPILED_VARIABLE; hunk[VARIABLE_OFFSET] = SHARP_F; remove_lock(compile_serializer); } } while (repeat_p); return (return_value); } /* Simple lookup finalization. All the hairy cases are left to deep_lookup_end. env is the environment where the reference was supposedly resolved. If there is any question about the validity of the resolution (due to dangerousness, for example), a deep lookup operation is performed, and control is given to deep_lookup_end. */ long DEFUN (lookup_end, (cell, env, hunk), SCHEME_OBJECT * cell AND SCHEME_OBJECT env AND SCHEME_OBJECT * hunk) { long trap_kind; lookup_end_restart: Val = MEMORY_FETCH (cell[0]); FUTURE_VARIABLE_SPLICE (((SCHEME_OBJECT) cell), 0, Val); if (!(REFERENCE_TRAP_P(Val))) { return (PRIM_DONE); } get_trap_kind(trap_kind, Val); switch(trap_kind) { case TRAP_DANGEROUS: case TRAP_UNBOUND_DANGEROUS: case TRAP_UNASSIGNED_DANGEROUS: case TRAP_FLUID_DANGEROUS: case TRAP_COMPILER_CACHED_DANGEROUS: return (deep_lookup_end(deep_lookup(env, hunk[VARIABLE_SYMBOL], hunk), hunk)); case TRAP_COMPILER_CACHED: cell = MEMORY_LOC (MEMORY_REF (Val, TRAP_EXTRA), TRAP_EXTENSION_CELL); goto lookup_end_restart; case TRAP_FLUID: cell = lookup_fluid(Val); goto lookup_end_restart; case TRAP_UNBOUND: return (ERR_UNBOUND_VARIABLE); case TRAP_UNASSIGNED: return (ERR_UNASSIGNED_VARIABLE); default: return (ERR_ILLEGAL_REFERENCE_TRAP); } } /* Complete assignment finalization. deep_assignment_end handles all dangerous cases, and busts compiled code operator reference caches as appropriate. It is similar to deep_lookup_end. value is the new value for the variable. force forces an assignment if the variable is unbound. This is used for redefinition in the global environment Notes on multiprocessor locking: The lock for assignment is usually in the original value cell in the environment structure. There are two cases where it is not: - Deep fluid variables. The lock is in the fluid value cell corresponding to this process. The original lock is removed before the fluid list is examined. - Compiler cached variables. The lock is in the new value cell. It is here so that compiled code can also lock it, since it does not have a pointer to the environment structure at all. The lock is moved (updated) from the original location to the new location. Ideally the original lock is not released until the new one is acquired, but we may not be able to guarantee this. The code is carefully written so that a weaker condition makes it valid. The condition is that locks should be granted in the order of request. The reason for this is that the code which can affect an operation must acquire the same locks and in the same order, thus if there is no interleaving of these operations, the result will be correct. Important: A re-definition can take place before the lock is grabbed in this code and we will be clobbering the wrong cell. To be paranoid we should redo the lookup while we have the cell locked and confirm that this is still valid, but this is hard to do here. Alternatively the lock could be grabbed by the caller and passed as an argument after confirming the correctness of the binding. A third option (the one in place now) is not to worry about this, saying that there is a race condition in the user code and that the definition happened after this assignment. For more precise sequencing, the user should synchronize her/his assignments and definitions her/himself. assignment_end suffers from this problem as well. */ #define RESULT(value) \ { \ return_value = (value); \ break; \ } #define UNCOMPILE(value) \ { \ uncompile_p = true; \ return_value = (value); \ break; \ } #define ABORT(value) \ { \ remove_lock(set_serializer); \ return (value); \ } #define REDO() \ { \ repeat_p = true; \ break; \ } long DEFUN (deep_assignment_end, (cell, hunk, value, force), fast SCHEME_OBJECT * cell AND SCHEME_OBJECT * hunk AND SCHEME_OBJECT value AND Boolean force) { Lock_Handle set_serializer; long trap_kind, return_value; SCHEME_OBJECT bogus_unassigned, extension, saved_extension, saved_value; Boolean repeat_p, uncompile_p, fluid_lock_p; /* State variables */ saved_extension = SHARP_F; uncompile_p = false; fluid_lock_p = false; bogus_unassigned = Get_Fixed_Obj_Slot(Non_Object); if (value == bogus_unassigned) value = UNASSIGNED_OBJECT; setup_lock(set_serializer, cell); do { repeat_p = false; Val = *cell; if (!(REFERENCE_TRAP_P(Val))) { *cell = value; RESULT(PRIM_DONE); } /* Below, break means uncompile the variable. */ get_trap_kind(trap_kind, Val); switch(trap_kind) { case TRAP_DANGEROUS: Val = MEMORY_REF (Val, TRAP_EXTRA); if (value == UNASSIGNED_OBJECT) { *cell = DANGEROUS_UNASSIGNED_OBJECT; } else { Do_Store_No_Lock ((MEMORY_LOC (*cell, TRAP_EXTRA)), value); } UNCOMPILE(PRIM_DONE); case TRAP_UNBOUND: if (!force) { UNCOMPILE(ERR_UNBOUND_VARIABLE) } /* Fall through */ case TRAP_UNASSIGNED: Val = bogus_unassigned; *cell = value; RESULT(PRIM_DONE); case TRAP_UNBOUND_DANGEROUS: if (!force) { UNCOMPILE(ERR_UNBOUND_VARIABLE); } if (value == UNASSIGNED_OBJECT) { *cell = DANGEROUS_UNASSIGNED_OBJECT; UNCOMPILE(PRIM_DONE); } /* Fall through */ case TRAP_UNASSIGNED_DANGEROUS: Val = bogus_unassigned; if (value != UNASSIGNED_OBJECT) { SCHEME_OBJECT result; if (GC_allocate_test(2)) { Request_GC(2); ABORT(PRIM_INTERRUPT); } result = MAKE_POINTER_OBJECT (TC_REFERENCE_TRAP, Free); *Free++ = DANGEROUS_OBJECT; *Free++ = value; *cell = result; } UNCOMPILE(PRIM_DONE); case TRAP_EXPENSIVE: /* This should only happen if we have been invoked by compiler_assignment_end invoked by compiler_reference_trap; */ extension = cell[TRAP_EXTENSION_CLONE]; goto compiler_cache_assignment; case TRAP_COMPILER_CACHED_DANGEROUS: uncompile_p = true; /* Fall through */ case TRAP_COMPILER_CACHED: extension = FAST_MEMORY_REF (Val, TRAP_EXTRA); compiler_cache_assignment: { SCHEME_OBJECT references; /* Unlock and lock at the new value cell. */ references = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_REFERENCES)); cell = (MEMORY_LOC (extension, TRAP_EXTENSION_CELL)); update_lock (set_serializer, cell); if ((FAST_MEMORY_REF (references, TRAP_REFERENCES_OPERATOR)) != SHARP_F) { if (saved_extension != SHARP_F) { ABORT(ERR_BROKEN_VARIABLE_CACHE); } saved_extension = extension; saved_value = *cell; } REDO(); } /* Remarks: If this is the inner trap of a compiler cache, and there are uuo links, there will actually be no recaching, since the old contents and the new one will be the fluid trap, and the links will already be set up for the fluid trap. Thus we can temporarily unlock while the iteration takes place. */ case TRAP_FLUID_DANGEROUS: uncompile_p = true; /* Fall through */ case TRAP_FLUID: fluid_lock_p = true; remove_lock(set_serializer); cell = lookup_fluid(Val); setup_lock(set_serializer, cell); REDO(); default: UNCOMPILE(ERR_ILLEGAL_REFERENCE_TRAP); } } while (repeat_p); if (saved_extension != SHARP_F) { long recache_uuo_links (); if (fluid_lock_p) { /* Guarantee that there is a lock on the variable cache around the call to recache_uuo_links. */ update_lock (set_serializer, (MEMORY_LOC (saved_extension, TRAP_EXTENSION_CELL))); } /* NOTE: recache_uuo_links can take an arbitrary amount of time since there may be an internal lock and the code may have to uncache arbitrarily many links. Deadlock should not occur since both locks are always acquired in the same order. */ return_value = (recache_uuo_links (saved_extension, saved_value)); remove_lock (set_serializer); if (return_value != PRIM_DONE) { return (return_value); } } else { remove_lock (set_serializer); } /* This must be done after the assignment lock has been removed, to avoid potential deadlock. */ if (uncompile_p) { /* The reference was dangerous, uncompile the variable. */ Lock_Handle compile_serializer; setup_lock (compile_serializer, hunk); hunk[VARIABLE_COMPILED_TYPE] = UNCOMPILED_VARIABLE; hunk[VARIABLE_OFFSET] = SHARP_F; remove_lock (compile_serializer); } return (return_value); } #undef ABORT #undef REDO #undef RESULT #undef UNCOMPILE /* Simple assignment end. assignment_end lets deep_assignment_end handle all the hairy cases. It is similar to lookup_end, but there is some hair for unassignedness and compiled code cached references. */ long DEFUN (assignment_end, (cell, env, hunk, value), fast SCHEME_OBJECT * cell AND SCHEME_OBJECT env AND SCHEME_OBJECT * hunk AND SCHEME_OBJECT value) { Lock_Handle set_serializer; SCHEME_OBJECT bogus_unassigned; long temp; bogus_unassigned = Get_Fixed_Obj_Slot(Non_Object); if (value == bogus_unassigned) value = UNASSIGNED_OBJECT; assignment_end_before_lock: setup_lock(set_serializer, cell); assignment_end_after_lock: Val = *cell; if (!(REFERENCE_TRAP_P(Val))) { *cell = value; remove_lock(set_serializer); return (PRIM_DONE); } get_trap_kind(temp, Val); switch(temp) { case TRAP_DANGEROUS: case TRAP_UNBOUND_DANGEROUS: case TRAP_UNASSIGNED_DANGEROUS: case TRAP_FLUID_DANGEROUS: case TRAP_COMPILER_CACHED_DANGEROUS: remove_lock(set_serializer); return (deep_assignment_end(deep_lookup(env, hunk[VARIABLE_SYMBOL], hunk), hunk, value, false)); case TRAP_COMPILER_CACHED: { SCHEME_OBJECT extension, references; extension = FAST_MEMORY_REF (Val, TRAP_EXTRA); references = FAST_MEMORY_REF (extension, TRAP_EXTENSION_REFERENCES); if (FAST_MEMORY_REF (references, TRAP_REFERENCES_OPERATOR) != SHARP_F) { /* There are uuo links. wimp out and let deep_assignment_end handle it. */ remove_lock(set_serializer); return (deep_assignment_end(cell, hunk, value, false)); } cell = MEMORY_LOC (extension, TRAP_EXTENSION_CELL); update_lock(set_serializer, cell); goto assignment_end_after_lock; } case TRAP_FLUID: remove_lock(set_serializer); cell = lookup_fluid(Val); goto assignment_end_before_lock; case TRAP_UNBOUND: temp = ERR_UNBOUND_VARIABLE; break; case TRAP_UNASSIGNED: Val = bogus_unassigned; *cell = value; temp = PRIM_DONE; break; default: temp = ERR_ILLEGAL_REFERENCE_TRAP; break; } remove_lock(set_serializer); return (temp); } /* Finds the fluid value cell associated with the reference trap on this processor's fluid "binding" list. It is just like ASSQ. */ SCHEME_OBJECT * DEFUN (lookup_fluid, (trap), fast SCHEME_OBJECT trap) { fast SCHEME_OBJECT fluids, *this_pair; fluids = Fluid_Bindings; if (Fluids_Debug) { Print_Expression(fluids, "Searching fluid bindings"); } while (PAIR_P(fluids)) { this_pair = OBJECT_ADDRESS (FAST_PAIR_CAR (fluids)); if (this_pair[CONS_CAR] == trap) { if (Fluids_Debug) outf_error ("Fluid found.\n"); return (&this_pair[CONS_CDR]); } fluids = FAST_PAIR_CDR (fluids); } /* Not found in fluid binding alist, so use default. */ if (Fluids_Debug) outf_error ("Fluid not found, using default.\n"); return (MEMORY_LOC (trap, TRAP_EXTRA)); } /* Utilities for definition. redefinition is used when the definition is in fact an assignment. A binding already exists in this frame. dangerize is invoked to guarantee that any variables "compiled" to this location are recompiled at the next reference. */ #define redefinition(cell, value) \ (deep_assignment_end (cell, fake_variable_object, value, true)) long DEFUN (definition, (cell, value, shadowed_p), SCHEME_OBJECT * cell AND SCHEME_OBJECT value AND Boolean shadowed_p) { if (shadowed_p) return (redefinition (cell, value)); else { Lock_Handle set_serializer; setup_lock (set_serializer, cell); if (*cell == DANGEROUS_UNBOUND_OBJECT) { *cell = value; remove_lock (set_serializer); return (PRIM_DONE); } else { /* Unfortunate fact of life: This binding will be dangerous even if there was no need, but this is the only way to guarantee consistent values. */ remove_lock (set_serializer); return (redefinition (cell, value)); } } } long DEFUN (dangerize, (cell, sym), fast SCHEME_OBJECT * cell AND SCHEME_OBJECT sym) { Lock_Handle set_serializer; fast long temp; SCHEME_OBJECT trap; setup_lock (set_serializer, cell); if (!(REFERENCE_TRAP_P (*cell))) { if (GC_allocate_test (2)) { remove_lock (set_serializer); Request_GC (2); return (PRIM_INTERRUPT); } trap = (MAKE_POINTER_OBJECT (TC_REFERENCE_TRAP, Free)); *Free++ = DANGEROUS_OBJECT; *Free++ = *cell; *cell = trap; remove_lock (set_serializer); return (simple_uncache (cell, sym)); } get_trap_kind (temp, *cell); switch (temp) { case TRAP_UNBOUND_DANGEROUS: case TRAP_UNASSIGNED_DANGEROUS: case TRAP_DANGEROUS: case TRAP_FLUID_DANGEROUS: break; case TRAP_COMPILER_CACHED: Do_Store_No_Lock ((MEMORY_LOC (*cell, TRAP_TAG)), (LONG_TO_UNSIGNED_FIXNUM (TRAP_COMPILER_CACHED_DANGEROUS))); /* Fall through */ case TRAP_COMPILER_CACHED_DANGEROUS: { remove_lock (set_serializer); return (compiler_uncache (cell, sym)); } case TRAP_FLUID: Do_Store_No_Lock ((MEMORY_LOC (*cell, TRAP_TAG)), (LONG_TO_UNSIGNED_FIXNUM (TRAP_FLUID_DANGEROUS))); break; case TRAP_UNBOUND: *cell = DANGEROUS_UNBOUND_OBJECT; break; case TRAP_UNASSIGNED: *cell = DANGEROUS_UNASSIGNED_OBJECT; break; default: remove_lock (set_serializer); return (ERR_ILLEGAL_REFERENCE_TRAP); } remove_lock (set_serializer); return (simple_uncache (cell, sym)); } /* The core of the incremental definition mechanism. It takes care of dangerizing any bindings being shadowed by this definition, extending the frames appropriately, and uncaching or recaching (according to the DEFINITION_RECACHES_EAGERLY flag) any compiled code reference caches which might be affected by the new definition. *UNDEFINE*: If (local?) undefine is ever implemented, it suffices to set the value cell to DANGEROUS_UNBOUND_OBJECT, uncache all the compiler cached variables to the location, and rewrite the code below slightly as implied by the comments tagged *UNDEFINE*. */ long DEFUN (extend_frame, (env, sym, value, original_frame, recache_p), SCHEME_OBJECT env AND SCHEME_OBJECT sym AND SCHEME_OBJECT value AND SCHEME_OBJECT original_frame AND Boolean recache_p) { Lock_Handle extension_serializer; SCHEME_OBJECT extension, the_procedure; fast SCHEME_OBJECT *scan; long aux_count; if ((OBJECT_TYPE (env)) == GLOBAL_ENV) { /* *UNDEFINE*: If undefine is ever implemented, this code need not change: There are no shadowed bindings that need to be recached. */ if ((OBJECT_DATUM (env)) != GO_TO_GLOBAL) { if (env == original_frame) { return (ERR_BAD_FRAME); } else { /* We have a new definition in a chain rooted at the empty environment. We need not uncache/recache, but we need to set all global state accordingly. We use a cell which never needs uncacheing/recacheing and use the ordinary code otherwise. This is done only because of compiler cached variables. */ return (compiler_uncache ((unbound_trap_object), sym)); } } else if (env == original_frame) { return (redefinition ((MEMORY_LOC (sym, SYMBOL_GLOBAL_VALUE)), value)); } else { return (dangerize ((MEMORY_LOC (sym, SYMBOL_GLOBAL_VALUE)), sym)); } } the_procedure = (MEMORY_REF (env, ENVIRONMENT_FUNCTION)); if ((OBJECT_TYPE (the_procedure)) == AUX_LIST_TYPE) the_procedure = (MEMORY_REF (the_procedure, ENV_EXTENSION_PROCEDURE)); /* Search the formals. */ { fast long count; SCHEME_OBJECT formals; formals = (FAST_MEMORY_REF ((FAST_MEMORY_REF (the_procedure, PROCEDURE_LAMBDA_EXPR)), LAMBDA_FORMALS)); for (count = ((VECTOR_LENGTH (formals)) - 1), scan = (MEMORY_LOC (formals, VECTOR_DATA + 1)); count > 0; count -= 1) { /* *UNDEFINE*: If undefine is ever implemented, this code must check whether the value is DANGEROUS_UNBOUND_OBJECT, and if so, a search must be done to cause the shadowed compiler cached variables to be recached, as in the aux case below. */ if (*scan++ == sym) { long offset; offset = (1 + (VECTOR_LENGTH (formals))) - count; if (env == original_frame) { return (redefinition ((MEMORY_LOC (env, offset)), value)); } else { return (dangerize ((MEMORY_LOC (env, offset)), sym)); } } } } /* Guarantee that there is an extension slot. */ redo_aux_lookup: setup_lock (extension_serializer, (OBJECT_ADDRESS (env))); extension = (FAST_MEMORY_REF (env, ENVIRONMENT_FUNCTION)); if ((OBJECT_TYPE (extension)) != AUX_LIST_TYPE) { fast long i; if (GC_allocate_test (AUX_LIST_INITIAL_SIZE)) { remove_lock (extension_serializer); Request_GC (AUX_LIST_INITIAL_SIZE); return (PRIM_INTERRUPT); } scan = Free; extension = (MAKE_POINTER_OBJECT (AUX_LIST_TYPE, scan)); scan[ENV_EXTENSION_HEADER] = (MAKE_OBJECT (TC_MANIFEST_VECTOR, (AUX_LIST_INITIAL_SIZE - 1))); scan[ENV_EXTENSION_PARENT_FRAME] = (MEMORY_REF (the_procedure, PROCEDURE_ENVIRONMENT)); scan[ENV_EXTENSION_PROCEDURE] = the_procedure; scan[ENV_EXTENSION_COUNT] = (Make_Local_Offset (0)); for (i = AUX_CHUNK_SIZE, scan += AUX_LIST_FIRST; --i >= 0;) *scan++ = SHARP_F; Free = scan; Do_Store_No_Lock ((MEMORY_LOC (env, ENVIRONMENT_FUNCTION)), extension); } aux_count = (Lexical_Offset (FAST_MEMORY_REF (extension, AUX_LIST_COUNT))); remove_lock (extension_serializer); /* Search the aux list. */ { fast long count; scan = (OBJECT_ADDRESS (extension)); count = aux_count; scan += AUX_LIST_FIRST; while (--count >= 0) { if ((FAST_PAIR_CAR (*scan)) == sym) { scan = (PAIR_CDR_LOC (*scan)); /* This is done only because of compiler cached variables. In their absence, this conditional is unnecessary. *UNDEFINE*: This would also have to be done for other kinds of bindings if undefine is ever implemented. See the comments above. */ if ((MEMORY_FETCH (scan[0])) == DANGEROUS_UNBOUND_OBJECT) { long temp; temp = (compiler_uncache (deep_lookup ((FAST_MEMORY_REF (extension, ENV_EXTENSION_PARENT_FRAME)), sym, fake_variable_object), sym)); if ((temp != PRIM_DONE) || (env != original_frame)) { return (temp); } return (shadowing_recache (scan, env, sym, value, true)); } if (env == original_frame) { return (redefinition (scan, value)); } else { return (dangerize (scan, sym)); } } scan += 1; } } /* Not found in this frame at all. */ { fast long temp; temp = (extend_frame ((FAST_MEMORY_REF (extension, ENV_EXTENSION_PARENT_FRAME)), sym, SHARP_F, original_frame, recache_p)); if (temp != PRIM_DONE) { return (temp); } /* Proceed to extend the frame: - If the frame is the one where the definition is occurring, put the value in the new value cell. - Otherwise, put a dangerous unbound trap there. - This code is careful to restart if some other process defines something in the meantime in this frame. */ setup_lock (extension_serializer, (OBJECT_ADDRESS (env))); temp = (Lexical_Offset (FAST_MEMORY_REF (extension, AUX_LIST_COUNT))); if ((extension != (FAST_MEMORY_REF (env, ENVIRONMENT_FUNCTION))) || (temp != aux_count)) { remove_lock (extension_serializer); goto redo_aux_lookup; } scan = (OBJECT_ADDRESS (extension)); if ((temp + (AUX_LIST_FIRST - 1)) == ((long) (VECTOR_LENGTH (extension)))) { fast long i; fast SCHEME_OBJECT *fast_free; i = ((2 * temp) + AUX_LIST_FIRST); if (GC_allocate_test (i)) { remove_lock (extension_serializer); Request_GC (i); return (PRIM_INTERRUPT); } fast_free = Free; i -= 1; scan += 1; *fast_free++ = (MAKE_OBJECT (TC_MANIFEST_VECTOR, i)); for (i = (temp + (AUX_LIST_FIRST - 1)); --i >= 0; ) *fast_free++ = *scan++; for (i = temp; --i >= 0; ) *fast_free++ = SHARP_F; scan = Free; Free = fast_free; Do_Store_No_Lock ((MEMORY_LOC (env, ENVIRONMENT_FUNCTION)), (MAKE_POINTER_OBJECT (AUX_LIST_TYPE, scan))); } if (GC_allocate_test (2)) { remove_lock (extension_serializer); Request_GC (2); return (PRIM_INTERRUPT); } { SCHEME_OBJECT result; result = (MAKE_POINTER_OBJECT (TC_LIST, Free)); *Free++ = sym; *Free++ = DANGEROUS_UNBOUND_OBJECT; scan[temp + AUX_LIST_FIRST] = result; scan[AUX_LIST_COUNT] = (Make_Local_Offset (temp + 1)); remove_lock (extension_serializer); if ((env != original_frame) || (!recache_p)) return (PRIM_DONE); else return (shadowing_recache ((Free - 1), env, sym, value, false)); } } } /* Top level of lookup code. These are the procedures invoked from outside this file. */ long DEFUN (Lex_Ref, (env, var), SCHEME_OBJECT env AND SCHEME_OBJECT var) { fast SCHEME_OBJECT *cell; SCHEME_OBJECT *hunk; hunk = OBJECT_ADDRESS (var); lookup(cell, env, hunk, repeat_lex_ref_lookup); return (lookup_end(cell, env, hunk)); } long DEFUN (Symbol_Lex_Ref, (env, sym), SCHEME_OBJECT env AND SCHEME_OBJECT sym) { return (deep_lookup_end(deep_lookup(env, sym, fake_variable_object), fake_variable_object)); } long DEFUN (Lex_Set, (env, var, value), SCHEME_OBJECT env AND SCHEME_OBJECT var AND SCHEME_OBJECT value) { fast SCHEME_OBJECT *cell; SCHEME_OBJECT *hunk; hunk = OBJECT_ADDRESS (var); lookup(cell, env, hunk, repeat_lex_set_lookup); return (assignment_end(cell, env, hunk, value)); } long DEFUN (Symbol_Lex_Set, (env, sym, value), SCHEME_OBJECT env AND SCHEME_OBJECT sym AND SCHEME_OBJECT value) { return (deep_assignment_end(deep_lookup(env, sym, fake_variable_object), fake_variable_object, value, false)); } long DEFUN (Local_Set, (env, sym, value), SCHEME_OBJECT env AND SCHEME_OBJECT sym AND SCHEME_OBJECT value) { long result; if (Define_Debug) outf_error ("\n;; Local_Set: defining %s.", (STRING_LOC ((MEMORY_REF (sym, SYMBOL_NAME)), 0))); result = (extend_frame (env, sym, value, env, true)); Val = sym; return (result); } long DEFUN (safe_reference_transform, (reference_result), long reference_result) { if (reference_result == ERR_UNASSIGNED_VARIABLE) { Val = UNASSIGNED_OBJECT; return (PRIM_DONE); } else { return (reference_result); } } long DEFUN (safe_lex_ref, (env, var), SCHEME_OBJECT env AND SCHEME_OBJECT var) { return (safe_reference_transform (Lex_Ref (env, var))); } long DEFUN (safe_symbol_lex_ref, (env, sym), SCHEME_OBJECT env AND SCHEME_OBJECT sym) { return (safe_reference_transform (Symbol_Lex_Ref (env, sym))); } long DEFUN (unassigned_p_transform, (reference_result), long reference_result) { switch (reference_result) { case ERR_UNASSIGNED_VARIABLE: Val = SHARP_T; return (PRIM_DONE); case PRIM_DONE: Val = SHARP_F; return (PRIM_DONE); case ERR_UNBOUND_VARIABLE: default: return (reference_result); } } extern long EXFUN (Symbol_Lex_unassigned_p, (SCHEME_OBJECT, SCHEME_OBJECT)), EXFUN (Symbol_Lex_unbound_p, (SCHEME_OBJECT, SCHEME_OBJECT)); long DEFUN (Symbol_Lex_unassigned_p, (frame, symbol), SCHEME_OBJECT frame AND SCHEME_OBJECT symbol) { return (unassigned_p_transform (Symbol_Lex_Ref (frame, symbol))); } long DEFUN (Symbol_Lex_unbound_p, (frame, symbol), SCHEME_OBJECT frame AND SCHEME_OBJECT symbol) { long result; result = (Symbol_Lex_Ref (frame, symbol)); switch (result) { case ERR_UNASSIGNED_VARIABLE: case PRIM_DONE: { Val = SHARP_F; return (PRIM_DONE); } case ERR_UNBOUND_VARIABLE: { Val = SHARP_T; return (PRIM_DONE); } default: return (result); } } /* force_definition is used when access to the global environment is not allowed. It finds the last frame where a definition can occur, and performs the definition in this frame. It then returns the cell where the value is stored. It's expensive and will hardly be used, but is provided for completeness. */ SCHEME_OBJECT * DEFUN (force_definition, (env, symbol, message), fast SCHEME_OBJECT env AND SCHEME_OBJECT symbol AND long * message) { fast SCHEME_OBJECT previous; if (OBJECT_TYPE (env) == GLOBAL_ENV) { *message = ERR_BAD_FRAME; return ((SCHEME_OBJECT *) NULL); } do { previous = env; env = FAST_MEMORY_REF (MEMORY_REF (env, ENVIRONMENT_FUNCTION), PROCEDURE_ENVIRONMENT); } while (OBJECT_TYPE (env) != GLOBAL_ENV); *message = (Local_Set (previous, symbol, UNASSIGNED_OBJECT)); if (*message != PRIM_DONE) { return ((SCHEME_OBJECT *) NULL); } return (deep_lookup(previous, symbol, fake_variable_object)); } /* Macros to allow multiprocessor interlocking in compiler caching and recaching. The defaults are NOPs, but can be overriden by machine dependent include files or config.h */ #ifndef update_uuo_prolog #define update_uuo_prolog() #endif #ifndef update_uuo_epilog #define update_uuo_epilog() #endif #ifndef compiler_cache_prolog #define compiler_cache_prolog() #endif #ifndef compiler_cache_epilog #define compiler_cache_epilog() #endif #ifndef compiler_trap_prolog #define compiler_trap_prolog() #endif #ifndef compiler_trap_epilog #define compiler_trap_epilog() #endif #ifndef compiler_uncache_prolog #define compiler_uncache_prolog() #endif #ifndef compiler_uncache_epilog #define compiler_uncache_epilog() #endif #ifndef compiler_recache_prolog #define compiler_recache_prolog() #endif #ifndef compiler_recache_epilog #define compiler_recache_epilog() #endif /* Fast variable reference mechanism for compiled code. compiler_cache is the core of the variable caching mechanism. It creates a variable cache for the variable at the specified cell, if needed, and stores it or a related object in the location specified by (block, offset). It adds this reference to the appropriate reference list for further updating. If the reference is a lookup reference, the cache itself is stored. If the reference is an assignment reference, there are two possibilities: - There are no operator references cached to this location. The cache itself is stored. - There are operator references. A fake cache (clone) is stored instead. This cache will make all assignments trap so that the cached operators can be updated. If the reference is an operator reference, a compiled procedure or a "fake" compiled procedure is stored. Furthermore, if there were assignment references cached, and no fake cache had been installed, a fake cache is created and all the assignment references are updated to point to it. */ #ifndef PARALLEL_PROCESSOR #define compiler_cache_consistency_check() #else /* PARALLEL_PROCESSOR */ /* The purpose of this code is to avoid a lock gap. A re-definition can take place before the lock is grabbed and we will be caching to the wrong cell. To be paranoid we redo the lookup while we have the cell locked and confim that we still have the correct cell. Note that this lookup can be "shallow" since the result of the previous lookup is saved in my_variable. The "shallow" lookup code takes care of performing a deep lookup if the cell has been "dangerized". */ #define compiler_cache_consistency_check() \ { \ SCHEME_OBJECT *new_cell; \ \ compiler_cache_variable[VARIABLE_SYMBOL] = name; \ new_cell = (lookup_cell (compiler_cache_variable, env)); \ if (cell != new_cell) \ { \ remove_lock (set_serializer); \ cell = new_cell; \ goto compiler_cache_retry; \ } \ } #endif /* PARALLEL_PROCESSOR */ extern SCHEME_OBJECT compiler_cache_variable[]; extern long EXFUN (compiler_cache, (SCHEME_OBJECT *, SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long, long, Boolean)); SCHEME_OBJECT compiler_cache_variable[3]; Boolean DEFUN (local_reference_p, (env, hunk), SCHEME_OBJECT env AND SCHEME_OBJECT * hunk) { SCHEME_OBJECT spec; spec = (MEMORY_FETCH (hunk [VARIABLE_COMPILED_TYPE])); switch (OBJECT_TYPE (spec)) { case GLOBAL_REF: return (env == (MAKE_OBJECT (GLOBAL_ENV, GO_TO_GLOBAL))); case LOCAL_REF: return (true); case FORMAL_REF: case AUX_REF: return ((OBJECT_DATUM (spec)) == 0); default: return (false); } } long DEFUN (compiler_cache, (cell, env, name, block, offset, kind, first_time), fast SCHEME_OBJECT * cell AND SCHEME_OBJECT env AND SCHEME_OBJECT name AND SCHEME_OBJECT block AND long offset AND long kind AND Boolean first_time) { long EXFUN (cache_reference_end, (long, SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long, SCHEME_OBJECT)); Lock_Handle set_serializer; fast SCHEME_OBJECT trap, references, extension; SCHEME_OBJECT trap_value, store_trap_tag, store_extension; long trap_kind, return_value; store_trap_tag = SHARP_F; store_extension = SHARP_F; trap_kind = TRAP_COMPILER_CACHED; compiler_cache_retry: setup_lock (set_serializer, cell); compiler_cache_consistency_check (); compiler_cache_prolog (); trap = *cell; trap_value = trap; if (REFERENCE_TRAP_P (trap)) { long old_trap_kind; get_trap_kind (old_trap_kind, trap); switch (old_trap_kind) { case TRAP_UNASSIGNED: case TRAP_UNBOUND: case TRAP_FLUID: break; case TRAP_DANGEROUS: trap_value = (FAST_MEMORY_REF (trap, TRAP_EXTRA)); trap_kind = TRAP_COMPILER_CACHED_DANGEROUS; break; case TRAP_UNASSIGNED_DANGEROUS: trap_value = UNASSIGNED_OBJECT; trap_kind = TRAP_COMPILER_CACHED_DANGEROUS; break; case TRAP_UNBOUND_DANGEROUS: trap_value = UNBOUND_OBJECT; trap_kind = TRAP_COMPILER_CACHED_DANGEROUS; break; case TRAP_FLUID_DANGEROUS: store_trap_tag = (LONG_TO_UNSIGNED_FIXNUM (TRAP_FLUID)); trap_kind = TRAP_COMPILER_CACHED_DANGEROUS; break; case TRAP_COMPILER_CACHED: case TRAP_COMPILER_CACHED_DANGEROUS: extension = (FAST_MEMORY_REF (trap, TRAP_EXTRA)); update_lock (set_serializer, (MEMORY_LOC (extension, TRAP_EXTENSION_CELL))); trap_value = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_CELL)); trap_kind = -1; break; default: compiler_cache_epilog (); remove_lock (set_serializer); return (ERR_ILLEGAL_REFERENCE_TRAP); } } #if TRUE /* The code below must complete to keep the data structures consistent. Thus instead of checking for GC overflow at each allocation, we check once at the beginning for the maximum amount of space needed. If we cannot do everything, we interrupt now. Otherwise, it is assumed that there is enough space available. MAXIMUM_CACHE_SIZE must accomodate the allocation on either branch below, plus potential later allocation (in the form of uuo links). The current value is much larger than what is actually needed, but... */ #define MAXIMUM_CACHE_SIZE 40 if (GC_allocate_test (MAXIMUM_CACHE_SIZE)) { compiler_cache_epilog (); remove_lock (set_serializer); Request_GC (MAXIMUM_CACHE_SIZE); return (PRIM_INTERRUPT); } #endif /* A new trap is needed. This code could add the new reference to the appropriate list, but instead leaves it to the shared code below because another processor may acquire the lock and change things in the middle of update_lock. */ if (trap_kind != -1) { SCHEME_OBJECT new_trap; #if FALSE /* This is included in the check above. */ if (GC_allocate_test (9)) { compiler_cache_epilog (); remove_lock (set_serializer); Request_GC (9); return (PRIM_INTERRUPT); } #endif new_trap = (MAKE_POINTER_OBJECT (TC_REFERENCE_TRAP, Free)); *Free++ = (LONG_TO_UNSIGNED_FIXNUM (trap_kind)); extension = (MAKE_POINTER_OBJECT (TRAP_EXTENSION_TYPE, (Free + 1))); *Free++ = extension; *Free++ = trap_value; *Free++ = name; *Free++ = SHARP_F; references = (MAKE_POINTER_OBJECT (TRAP_REFERENCES_TYPE, (Free + 1))); *Free++ = references; *Free++ = EMPTY_LIST; *Free++ = EMPTY_LIST; *Free++ = EMPTY_LIST; *cell = new_trap; /* Do_Store_No_Lock ? */ if (store_trap_tag != SHARP_F) { /* Do_Store_No_Lock ? */ FAST_MEMORY_SET (trap, TRAP_TAG, store_trap_tag); } update_lock (set_serializer, (MEMORY_LOC (extension, TRAP_EXTENSION_CELL))); } if (block == SHARP_F) { /* It is not really from compiled code. The environment linking stuff wants a cc cache instead. */ compiler_cache_epilog (); remove_lock (set_serializer); return (PRIM_DONE); } /* There already is a compiled code cache. Maybe this should clean up all the cache lists? */ { void fix_references (); long add_reference (); references = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_REFERENCES)); if (((kind == TRAP_REFERENCES_ASSIGNMENT) && ((FAST_MEMORY_REF (references, TRAP_REFERENCES_OPERATOR)) != EMPTY_LIST)) || ((kind == TRAP_REFERENCES_OPERATOR) && ((FAST_MEMORY_REF (references, TRAP_REFERENCES_ASSIGNMENT)) != EMPTY_LIST))) { store_extension = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_CLONE)); if (store_extension == SHARP_F) { #if FALSE /* This is included in the check above. */ if (GC_allocate_test (4)) { compiler_cache_epilog (); remove_lock (set_serializer); Request_GC (4); return (PRIM_INTERRUPT); } #endif store_extension = (MAKE_POINTER_OBJECT (TRAP_EXTENSION_TYPE, Free)); *Free++ = EXPENSIVE_ASSIGNMENT_OBJECT; *Free++ = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_NAME)); *Free++ = extension; *Free++ = references; FAST_MEMORY_SET (extension, TRAP_EXTENSION_CLONE, store_extension); if (kind == TRAP_REFERENCES_OPERATOR) { fix_references ((MEMORY_LOC (references, TRAP_REFERENCES_ASSIGNMENT)), store_extension); } } } /* *UNDEFINE*: If undefine is ever implemented, we should re-think references by fiat since such references have constraints about where they can be linked to. For example, if C -> B -> A (-> means descends from) and there is a reference by fiat from C to B, and we undefine in B, it can go to A, but never to C (or anything between C and B). Curently the only references by fiat are those of the form ((access foo ()) ...) */ return_value = (add_reference ((MEMORY_LOC (references, kind)), block, ((local_reference_p (env, compiler_cache_variable)) ? (MAKE_OBJECT (TC_CHARACTER, offset)) : (MAKE_OBJECT (TC_POSITIVE_FIXNUM, offset))))); if (return_value != PRIM_DONE) { compiler_cache_epilog (); remove_lock (set_serializer); return (return_value); } } /* Install an extension or a uuo link in the cc block. */ return_value = (cache_reference_end (kind, extension, store_extension, block, offset, trap_value)); /* Unlock and return */ compiler_cache_epilog (); remove_lock (set_serializer); return (return_value); } long DEFUN (cache_reference_end, (kind, extension, store_extension, block, offset, value), long kind AND SCHEME_OBJECT extension AND SCHEME_OBJECT store_extension AND SCHEME_OBJECT block AND long offset AND SCHEME_OBJECT value) { extern void EXFUN (store_variable_cache, (SCHEME_OBJECT, SCHEME_OBJECT, long)); extern long EXFUN (make_fake_uuo_link, (SCHEME_OBJECT, SCHEME_OBJECT, long)), EXFUN (make_uuo_link, (SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long)); switch(kind) { default: case TRAP_REFERENCES_ASSIGNMENT: if (store_extension != SHARP_F) { store_variable_cache (store_extension, block, offset); return (PRIM_DONE); } /* Fall through */ case TRAP_REFERENCES_LOOKUP: store_variable_cache (extension, block, offset); return (PRIM_DONE); case TRAP_REFERENCES_OPERATOR: { if (REFERENCE_TRAP_P (value)) { return (make_fake_uuo_link (extension, block, offset)); } else { return (make_uuo_link (value, extension, block, offset)); } } } /*NOTREACHED*/ } /* This procedure invokes compiler_cache after finding the top-level value cell associated with (env, name). */ long DEFUN (compiler_cache_reference, (env, name, block, offset, kind, first_time), SCHEME_OBJECT env AND SCHEME_OBJECT name AND SCHEME_OBJECT block AND long offset AND long kind AND Boolean first_time) { SCHEME_OBJECT *cell; cell = (deep_lookup (env, name, compiler_cache_variable)); if (cell == unbound_trap_object) { long message; cell = (force_definition (env, name, &message)); if (message != PRIM_DONE) { return (message); } } return (compiler_cache (cell, env, name, block, offset, kind, first_time)); } /* This procedure updates all the references in the cached reference list pointed at by slot to hold value. It also eliminates "empty" pairs (pairs whose weakly held block has vanished). */ void DEFUN (fix_references, (slot, extension), fast SCHEME_OBJECT * slot AND fast SCHEME_OBJECT extension) { fast SCHEME_OBJECT pair, block; while (*slot != EMPTY_LIST) { pair = (FAST_PAIR_CAR (*slot)); block = (FAST_PAIR_CAR (pair)); if (block == SHARP_F) { *slot = (FAST_PAIR_CDR (*slot)); } else { extern void EXFUN (store_variable_cache, (SCHEME_OBJECT, SCHEME_OBJECT, long)); store_variable_cache (extension, block, (OBJECT_DATUM (FAST_PAIR_CDR (pair)))); slot = (PAIR_CDR_LOC (*slot)); } } return; } /* This procedures adds a new cached reference to the cached reference list pointed at by slot. It attempts to reuse pairs which have been "emptied" by the garbage collector. */ long DEFUN (add_reference, (slot, block, offset), fast SCHEME_OBJECT * slot AND SCHEME_OBJECT block AND SCHEME_OBJECT offset) { fast SCHEME_OBJECT pair; while (*slot != EMPTY_LIST) { pair = (FAST_PAIR_CAR (*slot)); if ((FAST_PAIR_CAR (pair)) == SHARP_F) { FAST_SET_PAIR_CAR (pair, block); FAST_SET_PAIR_CDR (pair, offset); return (PRIM_DONE); } slot = (PAIR_CDR_LOC (*slot)); } if (GC_allocate_test (4)) { Request_GC (4); return (PRIM_INTERRUPT); } *slot = (MAKE_POINTER_OBJECT (TC_LIST, Free)); *Free = (MAKE_POINTER_OBJECT (TC_WEAK_CONS, (Free + 2))); Free += 1; *Free++ = EMPTY_LIST; *Free++ = block; *Free++ = offset; return (PRIM_DONE); } extern SCHEME_OBJECT EXFUN (compiled_block_environment, (SCHEME_OBJECT)); static long trap_map_table[] = { TRAP_REFERENCES_LOOKUP, TRAP_REFERENCES_ASSIGNMENT, TRAP_REFERENCES_OPERATOR }; #define TRAP_MAP_TABLE_SIZE (sizeof(trap_map_table) / sizeof(long)) #ifndef DEFINITION_RECACHES_EAGERLY /* compiler_uncache_slot uncaches all references in the list pointed at by slot, and clears the list. If the references are operator references, a fake compiled procedure which will recache when invoked is created and installed. */ long DEFUN (compiler_uncache_slot, (slot, sym, kind), fast SCHEME_OBJECT * slot AND SCHEME_OBJECT sym AND long kind) { fast SCHEME_OBJECT temp, pair; SCHEME_OBJECT block, offset, new_extension; for (temp = *slot; temp != EMPTY_LIST; temp = *slot) { pair = (FAST_PAIR_CAR (temp)); block = (FAST_PAIR_CAR (pair)); if (block != SHARP_F) { offset = (FAST_PAIR_CDR (pair)); if (CHARACTER_P (offset)) { /* This reference really belongs here! -- do not uncache. Skip to next. */ slot = (PAIR_CDR_LOC (temp)); continue; } else { if (GC_allocate_test (4)) { Request_GC (4); return (PRIM_INTERRUPT); } new_extension = (MAKE_POINTER_OBJECT (TRAP_EXTENSION_TYPE, Free)); *Free++ = REQUEST_RECACHE_OBJECT; *Free++ = sym; *Free++ = block; *Free++ = offset; if (kind == TRAP_REFERENCES_OPERATOR) { extern long EXFUN (make_fake_uuo_link, (SCHEME_OBJECT, SCHEME_OBJECT, long)); long result; result = (make_fake_uuo_link (new_extension, block, (OBJECT_DATUM (offset)))); if (result != PRIM_DONE) return (result); } else { extern void EXFUN (store_variable_cache, (SCHEME_OBJECT, SCHEME_OBJECT, long)); store_variable_cache (new_extension, block, (OBJECT_DATUM (offset))); } } } *slot = (FAST_PAIR_CDR (temp)); } return (PRIM_DONE); } /* compiler_uncache is invoked when a redefinition occurs. It uncaches all references cached to this value cell, and sets the variables up to be recached at the next reference. value_cell is the value cell being shadowed. sym is the name of the variable. */ long DEFUN (compiler_uncache, (value_cell, sym), SCHEME_OBJECT * value_cell AND SCHEME_OBJECT sym) { Lock_Handle set_serializer; SCHEME_OBJECT val, extension, references; long trap_kind, temp, i, index; setup_lock (set_serializer, value_cell); val = *value_cell; if (!(REFERENCE_TRAP_P (val))) { remove_lock (set_serializer); return (PRIM_DONE); } get_trap_kind (trap_kind, val); if ((trap_kind != TRAP_COMPILER_CACHED) && (trap_kind != TRAP_COMPILER_CACHED_DANGEROUS)) { remove_lock (set_serializer); return (PRIM_DONE); } compiler_uncache_prolog (); extension = (FAST_MEMORY_REF (val, TRAP_EXTRA)); references = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_REFERENCES)); update_lock (set_serializer, (MEMORY_LOC (extension, TRAP_EXTENSION_CELL))); /* Uncache all of the lists. */ for (i = TRAP_MAP_TABLE_SIZE; --i >= 0; ) { index = trap_map_table[i]; temp = (compiler_uncache_slot ((MEMORY_LOC (references, index)), sym, index)); if (temp != PRIM_DONE) { remove_lock (set_serializer); compiler_uncache_epilog (); return (temp); } } /* Note that we can only remove the trap if no references remain, ie. if there were no hard-wired references to this frame. We can test that by checking whether all the slots were set to EMPTY_LIST in the preceding loop. The current code, however, never removes the trap. */ /* Remove the clone extension if there is one and it is no longer needed. */ if ((FAST_MEMORY_REF (extension, TRAP_EXTENSION_CLONE)) != SHARP_F) { if ((FAST_MEMORY_REF (references, TRAP_REFERENCES_ASSIGNMENT)) == EMPTY_LIST) { FAST_MEMORY_SET (extension, TRAP_EXTENSION_CLONE, SHARP_F); } else if ((FAST_MEMORY_REF (references, TRAP_REFERENCES_OPERATOR)) == EMPTY_LIST) { /* All operators have disappeared, we can remove the clone, but we must update the cells. */ fix_references ((MEMORY_LOC (references, TRAP_REFERENCES_ASSIGNMENT)), extension); FAST_MEMORY_SET (extension, TRAP_EXTENSION_CLONE, SHARP_F); } } compiler_uncache_epilog (); remove_lock (set_serializer); return (PRIM_DONE); } #endif /* DEFINITION_RECACHES_EAGERLY */ #ifdef DEFINITION_RECACHES_EAGERLY /* compiler_recache is invoked when a redefinition occurs. It recaches (at the definition point) all the references that need to point to the new cell. It does this in two phases: - First (by means of compiler_recache_split) it splits all references into those that need to be updated and those that do not. This is done by side-effecting the list so that all those that need updating are at the end, and when we actually decide to go ahead, we can just clip it and install it in the new location. compiler_recache_split also counts how many entries are affected, so the total amount of gc space needed can be computed. - After checking that there is enough space to proceed, (rather than aborting) it actually does the recaching. It caches to the new location/value by using compiler_recache_slot. Note that the eventual trap extension has already been allocated so the recached links can point to it. */ /* Required by compiler_uncache macro. */ SCHEME_OBJECT *shadowed_value_cell = ((SCHEME_OBJECT *) NULL); /* Each extension is a hunk4. */ #define SPACE_PER_EXTENSION 4 /* Trap, extension, and one cache-list hunk. */ #define SPACE_PER_TRAP (2 + SPACE_PER_EXTENSION + 3) /* 1 Pair and 1 Weak pair. Not really needed since the pairs and weak pairs are reused. */ #define SPACE_PER_ENTRY (2 + 2) /* Hopefully a conservative guesstimate. */ #ifndef SPACE_PER_LINK /* So it can be overriden from config.h */ #define SPACE_PER_LINK 10 #endif /* The spaces are 0 because the pairs are reused! If that ever changes, they should all become SPACE_PER_ENTRY + curent value. */ #define SPACE_PER_LOOKUP 0 #define SPACE_PER_ASSIGNMENT 0 #define SPACE_PER_OPERATOR (0 + SPACE_PER_LINK) static long trap_size_table[TRAP_MAP_TABLE_SIZE] = { SPACE_PER_LOOKUP, SPACE_PER_ASSIGNMENT, SPACE_PER_OPERATOR }; static long trap_conflict_table[TRAP_MAP_TABLE_SIZE] = { 0, /* lookup */ 1, /* assignment */ 1 /* operator */ }; Boolean DEFUN (environment_ancestor_or_self_p, (ancestor, descendant), fast SCHEME_OBJECT ancestor AND fast SCHEME_OBJECT descendant) { while ((OBJECT_TYPE (descendant)) != GLOBAL_ENV) { if (descendant == ancestor) return (true); descendant = (FAST_MEMORY_REF ((MEMORY_REF (descendant, ENVIRONMENT_FUNCTION)), PROCEDURE_ENVIRONMENT)); } return (descendant == ancestor); } /* This reorders the entries in slot so that the entries that are not affected by the redefinition appear first, and the affected ones appear last. A pointer to the first affected cell is stored in memoize_cell, and this will be given to compiler_recache_slot in order to avoid recomputing the division. Note: There is an implicit assumption throughout that none of the pairs (or weak pairs) are in pure space. If they are, they cannot be sorted or reused. */ long DEFUN (compiler_recache_split, (slot, sym, definition_env, memoize_cell, link_p), fast SCHEME_OBJECT * slot AND SCHEME_OBJECT sym AND SCHEME_OBJECT definition_env AND SCHEME_OBJECT ** memoize_cell AND Boolean link_p) { fast long count; SCHEME_OBJECT weak_pair, block, reference_env, invalid_head; fast SCHEME_OBJECT *last_invalid; count = 0; last_invalid = &invalid_head; while (*slot != EMPTY_LIST) { weak_pair = (FAST_PAIR_CAR (*slot)); block = (FAST_PAIR_CAR (weak_pair)); if (block == SHARP_F) { *slot = (FAST_PAIR_CDR (*slot)); continue; } if (!link_p && (CHARACTER_P (FAST_PAIR_CDR (weak_pair)))) { /* The reference really belongs here -- it is not affected by fiat. */ slot = (PAIR_CDR_LOC (*slot)); } else { reference_env = (compiled_block_environment (block)); if (!environment_ancestor_or_self_p (definition_env, reference_env)) { slot = (PAIR_CDR_LOC (*slot)); } else { count += 1; *last_invalid = *slot; last_invalid = (PAIR_CDR_LOC (*slot)); *slot = *last_invalid; } } } *last_invalid = EMPTY_LIST; *memoize_cell = slot; *slot = invalid_head; return (count); } /* This recaches the entries pointed out by cell and adds them to the list in slot. It also sets to #F the contents of cell. Note that this reuses the pairs and weak pairs that used to be in cell. */ long DEFUN (compiler_recache_slot, (extension, sym, kind, slot, cell, value), SCHEME_OBJECT extension AND SCHEME_OBJECT sym AND long kind AND fast SCHEME_OBJECT * slot AND fast SCHEME_OBJECT * cell AND SCHEME_OBJECT value) { fast SCHEME_OBJECT pair, weak_pair; SCHEME_OBJECT clone, tail; long result; /* This is #F if there isn't one. This makes cache_reference_end do the right thing. */ clone = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_CLONE)); tail = * slot; for (pair = (* cell); pair != EMPTY_LIST; pair = (* cell)) { weak_pair = (FAST_PAIR_CAR (pair)); result = (cache_reference_end (kind, extension, clone, (FAST_PAIR_CAR (weak_pair)), (OBJECT_DATUM (FAST_PAIR_CDR (weak_pair))), value)); if (result != PRIM_DONE) { /* We are severely screwed. compiler_recache will do the appropriate thing. */ *slot = tail; return (result); } * slot = pair; slot = (PAIR_CDR_LOC (pair)); * cell = * slot; } * slot = tail; return (PRIM_DONE); } long DEFUN (compiler_recache, (old_value_cell, new_value_cell, env, sym, value, shadowed_p, link_p), SCHEME_OBJECT * old_value_cell AND SCHEME_OBJECT * new_value_cell AND SCHEME_OBJECT env AND SCHEME_OBJECT sym AND SCHEME_OBJECT value AND Boolean shadowed_p AND Boolean link_p) { Lock_Handle set_serializer_1, set_serializer_2; SCHEME_OBJECT old_value, references, extension, new_extension, new_trap, *trap_info_table[TRAP_MAP_TABLE_SIZE]; long trap_kind, temp, i, index, total_size, total_count, conflict_count; setup_locks (set_serializer_1, old_value_cell, set_serializer_2, new_value_cell); if ((!link_p) && (*new_value_cell != DANGEROUS_UNBOUND_OBJECT)) { /* Another processor has redefined this word in the meantime. The other processor must have recached all the compiled code caches since it is shadowing the same variable. The definition has become a redefinition. */ remove_locks (set_serializer_1, set_serializer_2); return (redefinition (new_value_cell, value)); } old_value = *old_value_cell; if (!(REFERENCE_TRAP_P (old_value))) { remove_locks (set_serializer_1, set_serializer_2); return (link_p ? PRIM_DONE : (definition (new_value_cell, value, shadowed_p))); } get_trap_kind (trap_kind, old_value); if ((trap_kind != TRAP_COMPILER_CACHED) && (trap_kind != TRAP_COMPILER_CACHED_DANGEROUS)) { remove_locks (set_serializer_1, set_serializer_2); return (link_p ? PRIM_DONE : (definition (new_value_cell, value, shadowed_p))); } compiler_recache_prolog (); extension = (FAST_MEMORY_REF (old_value, TRAP_EXTRA)); references = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_REFERENCES)); update_lock (set_serializer_1, (MEMORY_LOC (extension, TRAP_EXTENSION_CELL))); /* Split each slot and compute the amount to allocate. */ conflict_count = 0; total_size = (link_p ? 0 : SPACE_PER_TRAP); total_count = 0; for (i = TRAP_MAP_TABLE_SIZE; --i >= 0; ) { index = trap_map_table[i]; temp = compiler_recache_split ((MEMORY_LOC (references, index)), sym, env, &trap_info_table[i], link_p); if (temp != 0) { conflict_count += trap_conflict_table[i]; total_size += (temp * trap_size_table[i]); total_count += temp; } } if (total_count == 0) { compiler_recache_epilog (); remove_locks (set_serializer_1, set_serializer_2); return (link_p ? PRIM_DONE : (definition (new_value_cell, value, shadowed_p))); } if ((conflict_count == 2) && ((!link_p) || (new_value_cell[TRAP_EXTENSION_CLONE] == SHARP_F))) { total_size += SPACE_PER_EXTENSION; } if (GC_allocate_test (total_size)) { /* Unfortunate fact of life: This binding will be dangerous even if there is no need, but this is the only way to guarantee consistent values. */ compiler_recache_epilog (); remove_locks (set_serializer_1, set_serializer_2); Request_GC (total_size); return (PRIM_INTERRUPT); } /* Allocate and initialize all the cache structures if necessary. */ if (link_p) { new_extension = (MAKE_POINTER_OBJECT (TRAP_EXTENSION_TYPE, new_value_cell)); references = new_value_cell[TRAP_EXTENSION_REFERENCES]; } else { /* The reference trap is created here, but is not installed in the environment structure until the end. The new binding contains a DANGEROUS_UNBOUND_OBJECT so that other parallel lookups will skip this binding. */ references = (MAKE_POINTER_OBJECT (TRAP_REFERENCES_TYPE, Free)); *Free++ = EMPTY_LIST; *Free++ = EMPTY_LIST; *Free++ = EMPTY_LIST; new_extension = (MAKE_POINTER_OBJECT (TRAP_EXTENSION_TYPE, Free)); *Free++ = value; *Free++ = sym; *Free++ = SHARP_F; *Free++ = references; new_trap = (MAKE_POINTER_OBJECT (TC_REFERENCE_TRAP, Free)); *Free++ = (LONG_TO_UNSIGNED_FIXNUM ((shadowed_p ? TRAP_COMPILER_CACHED_DANGEROUS : TRAP_COMPILER_CACHED))); *Free++ = new_extension; } if ((conflict_count == 2) && (MEMORY_REF (new_extension, TRAP_EXTENSION_CLONE) == SHARP_F)) { SCHEME_OBJECT clone; clone = (MAKE_POINTER_OBJECT (TRAP_EXTENSION_TYPE, Free)); *Free++ = EXPENSIVE_ASSIGNMENT_OBJECT; *Free++ = sym; *Free++ = new_extension; *Free++ = references; FAST_MEMORY_SET (new_extension, TRAP_EXTENSION_CLONE, clone); } /* Now we actually perform the recaching, allocating freely. */ for (i = TRAP_MAP_TABLE_SIZE; --i >= 0; ) { index = trap_map_table[i]; temp = (compiler_recache_slot (new_extension, sym, index, (MEMORY_LOC (references, index)), trap_info_table[i], value)); if (temp != PRIM_DONE) { extern char *Abort_Names[]; /* We've lost BIG. */ if (temp == PRIM_INTERRUPT) outf_fatal ("\ncompiler_recache: Ran out of guaranteed space!\n"); else if (temp > 0) outf_fatal ("\ncompiler_recache: Unexpected error value %d (%s)\n", temp, Abort_Names[temp]); else outf_fatal ("\ncompiler_recache: Unexpected abort value %d (%s)\n", -temp, Abort_Names[(-temp) - 1]); Microcode_Termination (TERM_EXIT); } } if (!link_p) { *new_value_cell = new_trap; } compiler_recache_epilog (); remove_locks (set_serializer_1, set_serializer_2); return (PRIM_DONE); } #endif /* DEFINITION_RECACHES_EAGERLY */ /* recache_uuo_links is invoked when an assignment occurs to a variable which has cached operator references (uuo links). All the operator references must be recached to the new value. It currently potentially creates a new uuo link per operator reference. This may be very expensive in space, but allows a great deal of flexibility. It is ultimately necessary if there is hidden information on each call (like arity, types of arguments, etc.). */ long DEFUN (recache_uuo_links, (extension, old_value), SCHEME_OBJECT extension AND SCHEME_OBJECT old_value) { long EXFUN (update_uuo_links, (SCHEME_OBJECT, SCHEME_OBJECT, long ((*)(SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long)))); SCHEME_OBJECT value; long return_value; value = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_CELL)); if (REFERENCE_TRAP_P (value)) { if (REFERENCE_TRAP_P (old_value)) { /* No need to do anything. The uuo links are in the correct state. */ return_value = PRIM_DONE; } else { long EXFUN (make_recache_uuo_link, (SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long)); return_value = update_uuo_links (value, extension, make_recache_uuo_link); } } else { extern long EXFUN (make_uuo_link, (SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long)); return_value = update_uuo_links (value, extension, make_uuo_link); } if (return_value != PRIM_DONE) { /* This reverts the variable's value to the original value except when the value was fluid bound. In the latter case, it does not matter, it should still work: When the assignment is restarted, and recache_uuo_links is restarted, the relative "trapness" of both old and new values should be unchanged. Note that recache_uuo_links is invoked with the cell locked, so it is safe to "revert" the value. */ FAST_MEMORY_SET (extension, TRAP_EXTENSION_CELL, old_value); } return (return_value); } /* This kludge is due to the lack of closures. */ long DEFUN (make_recache_uuo_link, (value, extension, block, offset), SCHEME_OBJECT value AND SCHEME_OBJECT extension AND SCHEME_OBJECT block AND long offset) { extern long EXFUN (make_fake_uuo_link, (SCHEME_OBJECT, SCHEME_OBJECT, long)); return (make_fake_uuo_link (extension, block, offset)); } long DEFUN (update_uuo_links, (value, extension, handler), SCHEME_OBJECT value AND SCHEME_OBJECT extension AND long EXFUN ((*handler), (SCHEME_OBJECT, SCHEME_OBJECT, SCHEME_OBJECT, long))) { SCHEME_OBJECT references, pair, block; fast SCHEME_OBJECT *slot; long return_value; update_uuo_prolog(); references = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_REFERENCES)); slot = (MEMORY_LOC (references, TRAP_REFERENCES_OPERATOR)); while (*slot != EMPTY_LIST) { pair = (FAST_PAIR_CAR (*slot)); block = (FAST_PAIR_CAR (pair)); if (block == SHARP_F) { *slot = (FAST_PAIR_CDR (*slot)); } else { return_value = (*handler)(value, extension, block, (OBJECT_DATUM (FAST_PAIR_CDR (pair)))); if (return_value != PRIM_DONE) { update_uuo_epilog (); return (return_value); } slot = (PAIR_CDR_LOC (*slot)); } } /* If there are no uuo links left, and there is an extension clone, remove it, and make assignment references point to the real value cell. */ if ((FAST_MEMORY_REF (references, TRAP_REFERENCES_OPERATOR) == EMPTY_LIST) && (FAST_MEMORY_REF (extension, TRAP_EXTENSION_CLONE) != SHARP_F)) { FAST_MEMORY_SET (extension, TRAP_EXTENSION_CLONE, SHARP_F); fix_references ((MEMORY_LOC (references, TRAP_REFERENCES_ASSIGNMENT)), extension); } update_uuo_epilog (); return (PRIM_DONE); } /* compiler_reference_trap is called when a reference occurs to a compiled reference cache which contains a reference trap. If the trap is the special REQUEST_RECACHE_OBJECT, the reference is recached. Otherwise the reference is done normally, and the process continued. */ long DEFUN (compiler_reference_trap, (extension, kind, handler), SCHEME_OBJECT extension AND long kind AND long EXFUN ((*handler),(SCHEME_OBJECT *, SCHEME_OBJECT *))) { long offset, temp; SCHEME_OBJECT block; try_again: if ((MEMORY_REF (extension, TRAP_EXTENSION_CELL)) != REQUEST_RECACHE_OBJECT) { return ((*handler) (MEMORY_LOC (extension, TRAP_EXTENSION_CELL), fake_variable_object)); } block = (FAST_MEMORY_REF (extension, TRAP_EXTENSION_BLOCK)); offset = (OBJECT_DATUM (FAST_MEMORY_REF (extension, TRAP_EXTENSION_OFFSET))); compiler_trap_prolog (); temp = (compiler_cache_reference ((compiled_block_environment (block)), (FAST_MEMORY_REF (extension, TRAP_EXTENSION_NAME)), block, offset, kind, false)); compiler_trap_epilog (); if (temp != PRIM_DONE) { return (temp); } switch (kind) { case TRAP_REFERENCES_OPERATOR: { /* Note that this value may cause another operator trap when invoked, since it may be a uuo-link to an interpreted procedure, or to a variable with a trap in it. However, it should not go into a loop because the reference should be cached to the correct place, so the extension will no longer have a REQUEST_RECACHE_OBJECT in it. The first branch in this procedure will be taken in this case. On a multiprocessor it may in fact loop if some other processor redefines the variable before we have a chance to invoke the value. */ extern SCHEME_OBJECT EXFUN (extract_uuo_link, (SCHEME_OBJECT, long)); Val = (extract_uuo_link (block, offset)); return (PRIM_DONE); } case TRAP_REFERENCES_ASSIGNMENT: case TRAP_REFERENCES_LOOKUP: default: { extern SCHEME_OBJECT EXFUN (extract_variable_cache, (SCHEME_OBJECT, long)); extension = (extract_variable_cache (block, offset)); /* This is paranoid on a single processor, but it does not hurt. On a multiprocessor, we need to do it because some other processor may have redefined this variable in the meantime. */ goto try_again; } } } /* Procedures invoked from the compiled code interface. */ extern long EXFUN (compiler_cache_lookup, (SCHEME_OBJECT, SCHEME_OBJECT, long)), EXFUN (compiler_cache_assignment, (SCHEME_OBJECT, SCHEME_OBJECT, long)), EXFUN (compiler_cache_operator, (SCHEME_OBJECT, SCHEME_OBJECT, long)), EXFUN (compiler_cache_global_operator, (SCHEME_OBJECT, SCHEME_OBJECT, long)); long DEFUN (compiler_cache_lookup, (name, block, offset), SCHEME_OBJECT name AND SCHEME_OBJECT block AND long offset) { return (compiler_cache_reference ((compiled_block_environment (block)), name, block, offset, TRAP_REFERENCES_LOOKUP, true)); } long DEFUN (compiler_cache_assignment, (name, block, offset), SCHEME_OBJECT name AND SCHEME_OBJECT block AND long offset) { return (compiler_cache_reference ((compiled_block_environment (block)), name, block, offset, TRAP_REFERENCES_ASSIGNMENT, true)); } long DEFUN (compiler_cache_operator, (name, block, offset), SCHEME_OBJECT name AND SCHEME_OBJECT block AND long offset) { return (compiler_cache_reference ((compiled_block_environment (block)), name, block, offset, TRAP_REFERENCES_OPERATOR, true)); } long DEFUN (compiler_cache_global_operator, (name, block, offset), SCHEME_OBJECT name AND SCHEME_OBJECT block AND long offset) { return (compiler_cache_reference ((MAKE_OBJECT (GLOBAL_ENV, GO_TO_GLOBAL)), name, block, offset, TRAP_REFERENCES_OPERATOR, true)); } extern long EXFUN (complr_operator_reference_trap, (SCHEME_OBJECT *, SCHEME_OBJECT)); extern SCHEME_OBJECT EXFUN (compiler_var_error, (SCHEME_OBJECT, SCHEME_OBJECT)); long DEFUN (complr_operator_reference_trap, (frame_slot, extension), SCHEME_OBJECT * frame_slot AND SCHEME_OBJECT extension) { long temp; temp = (compiler_reference_trap (extension, TRAP_REFERENCES_OPERATOR, deep_lookup_end)); if (temp != PRIM_DONE) { return temp; } *frame_slot = Val; return (PRIM_DONE); } SCHEME_OBJECT DEFUN (compiler_var_error, (extension, environment), SCHEME_OBJECT extension AND SCHEME_OBJECT environment) { return (MEMORY_REF (extension, TRAP_EXTENSION_NAME)); } /* Utility for compiler_assignment_trap, below. Necessary because C lacks lambda. Argh! */ static SCHEME_OBJECT saved_compiler_assignment_value; long DEFUN (compiler_assignment_end, (cell, hunk), SCHEME_OBJECT * cell AND SCHEME_OBJECT * hunk) { return (deep_assignment_end (cell, hunk, saved_compiler_assignment_value, false)); } /* More compiled code interface procedures */ extern long EXFUN (compiler_lookup_trap, (SCHEME_OBJECT)), EXFUN (compiler_safe_lookup_trap, (SCHEME_OBJECT)), EXFUN (compiler_unassigned_p_trap, (SCHEME_OBJECT)), EXFUN (compiler_assignment_trap, (SCHEME_OBJECT, SCHEME_OBJECT)); long DEFUN (compiler_lookup_trap, (extension), SCHEME_OBJECT extension) { return (compiler_reference_trap (extension, TRAP_REFERENCES_LOOKUP, deep_lookup_end)); } long DEFUN (compiler_safe_lookup_trap, (extension), SCHEME_OBJECT extension) { return (safe_reference_transform (compiler_lookup_trap (extension))); } long DEFUN (compiler_unassigned_p_trap, (extension), SCHEME_OBJECT extension) { return (unassigned_p_transform (compiler_lookup_trap (extension))); } long DEFUN (compiler_assignment_trap, (extension, value), SCHEME_OBJECT extension AND SCHEME_OBJECT value) { saved_compiler_assignment_value = value; return (compiler_reference_trap (extension, TRAP_REFERENCES_ASSIGNMENT, compiler_assignment_end)); }
7d5b969690411a66ca9c2fa87e47f89200ab98f0
3b0b05eaf2c7eb4d11514107ff8cc505e67e4b75
/drivers/watchdog/wdt_nrfx.c
8b6f71a78e3c6dbb6b905460dd67c2ea6b13b21f
[ "Apache-2.0" ]
permissive
dmgerman/zephyrd3
d3813ef74a3d6d447f2ae01d4d20806c48e3f698
b6a23cc9c5d534c352e33fd18fff7799ac3c2886
refs/heads/master
2023-01-09T14:22:19.749375
2018-10-04T22:08:09
2018-10-05T18:21:49
253,632,165
0
0
Apache-2.0
2022-12-26T20:39:56
2020-04-06T22:41:46
C
UTF-8
C
false
false
1,161
c
wdt_nrfx.c
DECL|SYS_LOG_DOMAIN|macro|SYS_LOG_DOMAIN DECL|SYS_LOG_LEVEL|macro|SYS_LOG_LEVEL DECL|init_wdt|function|static int init_wdt(struct device *dev) DECL|m_allocated_channels|variable|m_allocated_channels DECL|m_callbacks|variable|m_callbacks DECL|m_timeout|variable|m_timeout DECL|wdt_event_handler|function|static void wdt_event_handler(void) DECL|wdt_nrf_api|variable|wdt_nrf_api DECL|wdt_nrf_disable|function|static int wdt_nrf_disable(struct device *dev) DECL|wdt_nrf_enable|function|static void wdt_nrf_enable(struct device *dev) DECL|wdt_nrf_feed|function|static int wdt_nrf_feed(struct device *dev, int channel_id) DECL|wdt_nrf_get_config|function|static void wdt_nrf_get_config(struct device *dev, struct wdt_config *config) DECL|wdt_nrf_install_timeout|function|static int wdt_nrf_install_timeout(struct device *dev, const struct wdt_timeout_cfg *cfg) DECL|wdt_nrf_reload|function|static void wdt_nrf_reload(struct device *dev) DECL|wdt_nrf_set_config|function|static int wdt_nrf_set_config(struct device *dev, struct wdt_config *config) DECL|wdt_nrf_setup|function|static int wdt_nrf_setup(struct device *dev, u8_t options) DECL|wdt_nrfx|variable|wdt_nrfx
03ac5465cb4a16cc7a058d3d2aa1eec8dd176ce0
04c8d8da9cebc13513c1b9c7658707ecadfa0ed3
/Roll a Ball/Temp/il2cppOutput/il2cppOutput/System_Core_System_Linq_Enumerable_U3CCreateSelectIteratorU3_302.h
f09e16cd5fa506bfc2cd7cac7ea2d135dbf1581d
[]
no_license
fkieyhzen/RollABall
ed9ef9e93f3cfaecd2be10013797e97e9c1e479e
f083b660966094939ed2b5d2028e31bb4e86a67e
refs/heads/master
2023-03-19T18:19:11.437779
2015-06-08T15:27:45
2015-06-08T15:27:45
null
0
0
null
null
null
null
UTF-8
C
false
false
2,497
h
System_Core_System_Linq_Enumerable_U3CCreateSelectIteratorU3_302.h
#pragma once // System.Collections.Generic.IEnumerable`1<System.Object> struct IEnumerable_1_t484; // System.Collections.Generic.IEnumerator`1<System.Object> struct IEnumerator_1_t337; // System.Object struct Object_t; // System.Func`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>> struct Func_2_t7946; // System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL> struct Dictionary_2_t1828; // System.Object #include "mscorlib_System_Object.h" // System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>> struct U3CCreateSelectIteratorU3Ec__Iterator10_2_t7948 : public Object_t { // System.Collections.Generic.IEnumerable`1<TSource> System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::source Object_t* ___source_0; // System.Collections.Generic.IEnumerator`1<TSource> System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::<$s_70>__0 Object_t* ___U3C$s_70U3E__0_1; // TSource System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::<element>__1 Object_t * ___U3CelementU3E__1_2; // System.Func`2<TSource,TResult> System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::selector Func_2_t7946 * ___selector_3; // System.Int32 System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::$PC int32_t ___$PC_4; // TResult System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::$current Dictionary_2_t1828 * ___$current_5; // System.Collections.Generic.IEnumerable`1<TSource> System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::<$>source Object_t* ___U3C$U3Esource_6; // System.Func`2<TSource,TResult> System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<System.Object,System.Collections.Generic.Dictionary`2<System.String,Parse.ParseACL>>::<$>selector Func_2_t7946 * ___U3C$U3Eselector_7; };
10e7ce47994459235442129ab050788b61c8aac2
8f140c691eeca5e1d6373e925cb80c18bd460295
/city roads.c
84f49a036157b1eb6734f5f7a1757773378e6c80
[]
no_license
yuyuwu5/C-Programming-Practice
b72a0fe6ed039199a1764a580aceb5eb8d09ba5a
396cfeccda99e0c4a0f2c308d879d9a21ca87dcb
refs/heads/master
2020-04-29T17:55:32.296970
2019-03-18T16:23:04
2019-03-18T16:23:04
176,309,491
0
0
null
null
null
null
UTF-8
C
false
false
4,273
c
city roads.c
#include<stdio.h> /*#include "intersection.h"*/ void intersection(int map[100][100], int result[4]) { int i, j; for(i = 0; i < 4; i++) result[i] = 0; for(i = 0; i < 100; i++){ for(j = 0; j < 100; j++){ if (map[i][j] == 1) { if((i != 0) && (i != 99) && (j != 0) && (j != 99)){ if(map[i+1][j] + map[i-1][j] + map[i][j+1] + map[i][j-1] == 4){ result[0]++; continue; } if (map[i+1][j] + map[i-1][j] + map[i][j+1] + map[i][j-1] == 3){ result[1]++; continue; } if (map[i+1][j] + map[i][j+1] == 2 || map[i-1][j] + map[i][j+1]== 2 || map[i+1][j] + map[i][j-1] == 2 || map[i-1][j] + map[i][j-1] == 2){ result[2]++; continue; } if (map[i+1][j] + map[i-1][j] + map[i][j+1] + map[i][j-1] == 1){ result[3]++; continue; } } else if (i == 0 && j == 0){ if(map[i+1][j] + map[i][j+1] == 2) result[2]++; else if (map[i+1][j] + map[i][j+1] == 1) result[3]++; } else if (i == 0 && j == 99){ if(map[i+1][j] + map[i][j-1] == 2) result[2]++; else if (map[i+1][j] + map[i][j-1] == 1) result[3]++; } else if (i == 99 && j == 0){ if(map[i-1][j] + map[i][j+1] == 2) result[2]++; else if (map[i-1][j] + map[i][j+1] == 1) result[3]++; } else if (i == 99 && j == 99){ if(map[i-1][j] + map[i][j-1] == 2) result[2]++; else if (map[i-1][j] + map[i][j-1] == 1) result[3]++; } else if (i == 0 && j != 0 && j != 99){ if(map[i+1][j] + map[i][j+1] + map[i][j-1] == 3) result[1]++; else if (map[i+1][j] + map[i][j+1] == 2 || map[i+1][j] + map[i][j-1] == 2) result[2]++; else if (map[i+1][j] + map[i][j+1] + map[i][j-1] == 1) result[3]++; } else if (i == 99 && j != 0 && j != 99){ if(map[i-1][j] + map[i][j+1] + map[i][j-1] == 3) result[1]++; else if (map[i-1][j] + map[i][j+1] == 2 || map[i-1][j] + map[i][j-1] == 2) result[2]++; else if (map[i-1][j] + map[i][j+1] + map[i][j-1] == 1) result[3]++; } else if (j == 0 && i != 0 && i != 99){ if(map[i][j+1] + map[i+1][j] + map[i-1][j] == 3) result[1]++; else if (map[i][j+1] + map[i+1][j] == 2 || map[i][j+1] + map[i-1][j] == 2) result[2]++; else if (map[i][j+1] + map[i+1][j] + map[i-1][j] == 1) result[3]++; } else if (j == 99 && i != 0 && i != 99){ if(map[i][j-1] + map[i+1][j] + map[i-1][j] == 3) result[1]++; else if (map[i][j-1] + map[i+1][j] == 2 || map[i][j-1] + map[i-1][j] == 2) result[2]++; else if (map[i][j-1] + map[i+1][j] + map[i-1][j] == 1) result[3]++; } } else continue; } } return ; } /* int main(void) { int result[4], map[100][100] = {0}, i, j; for(i = 0; i < 100; i++) for(j = 0; j < 100; j++) scanf("%d", &map[i][j]); for(i = 0; i < 4; i++) result[i] = 0; intersection(map, result); for(i = 0; i < 4; i++) printf("%d\n", result[i]); } */
de3ad695319e77ea843ec1db59feeabb650d907f
2d15fe0a64331e4b92717783252ba1525d550173
/src/tools/disk.h
1cb66fa203a6aa7cfb54ad22a0466851b36d34e0
[ "MIT" ]
permissive
TinyOSOrg/TinyOS
c0cc2bce2eb7947b24a014d388a9be2c4391304c
9163f6ed4abda2b8b7c93381fc99f93e7312cc78
refs/heads/master
2021-04-15T12:50:19.323591
2018-09-05T05:37:55
2018-09-05T05:37:55
126,816,805
16
4
null
2018-04-28T08:33:18
2018-03-26T11:11:11
C
UTF-8
C
false
false
414
h
disk.h
#ifndef TINY_OS_TOOLS_DISK_H #define TINY_OS_TOOLS_DISK_H /* 外部工具中有很多是关于磁盘映像操作的 这里定义它们的共有参数 */ /* 磁盘最大扇区号 */ #define DISK_MAX_SECTOR_NUMBER 262079 /* import分区起始扇区 */ #define DISK_IMPORT_DP_BEGIN 182144 /* import分区结束扇区 */ #define DISK_IMPORT_DP_END DISK_MAX_SECTOR_NUMBER #endif /* TINY_OS_TOOLS_DISK_H */
8cb6f42401ac4732fe756b36e90993380ffc9e68
54103330df3c0cafe544a97b36a1d2a8978a8ec3
/src/Dump4Cab.c
855f0f3f5ab0dd82578d4f683b3a826806a48abd
[]
no_license
shunte88/dump4
c19763b78de7bd0b206db1c9ab97881f17b65f07
19f3fd85a6da3104170642791284265bc8dcc944
refs/heads/master
2023-03-01T05:20:15.730152
2021-02-02T17:37:10
2021-02-02T17:37:10
null
0
0
null
null
null
null
UTF-8
C
false
false
54,802
c
Dump4Cab.c
// Dump4Cab.c /* * dircab.c * * Began as a COPY of TESTFDI.c which demonstrated how to use the * FDI library APIs. It was modified to mainly be a VIEWER of the * contents of a CAB file ... * September, 2000 - Geoff R. McLane * */ #ifdef WIN32 /////////////////////////////////////////////////////////////////// #ifdef DUMP4 #include "Dump4.h" #include "Dump4fdi.h" #include <io.h> #include <fcntl.h> #include <sys/stat.h> // #include <fdi.h> #else // NOT DUMP4 = STANDALONE DIRCAB // *********************************** // #include <windows.h> #include <Winsock2.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <io.h> #include <fcntl.h> #include <dos.h> #include <sys/stat.h> #include "..\..\include\fdi.h" // *********************************** #endif // DUMP4 y/n #undef MEMSTATS2 #define MMINNCOL 15 #ifndef DUMP4 #define EndBuf(a) ( a + strlen(a) ) #endif // !DUMP4 #define PRGNM "DIRCAB" /* * Function prototypes */ BOOL test_fdi(char *cabinet_file); int get_percentage(unsigned long a, unsigned long b); char *return_fdi_error_string(FDIERROR err); void Dbl2Stg( LPSTR lps, double factor, int prec ); int sprintf3( char * cp, char * fp, DWORD siz ); #ifdef MEMSTATS2 void ShowMems( void ); #endif LPTSTR GetI64Stg2( LARGE_INTEGER li ); LPTSTR GetDWStg2( DWORD dwi ); BOOL CheckPrev( void ); typedef int (DIAMONDAPI * CPROC) (); typedef BOOL (DIAMONDAPI * FDICOPY) (HFDI, char *, char *, int, PFNFDINOTIFY, PFNFDIDECRYPT, void *); typedef BOOL (DIAMONDAPI * FDIISCAB) (HFDI, HANDLE, PFDICABINETINFO ); typedef BOOL (DIAMONDAPI * FDIDEST) (HFDI); typedef HFDI (DIAMONDAPI * FDICREAT) (PFNALLOC,PFNFREE,PFNOPEN,PFNREAD,PFNWRITE,PFNCLOSE,PFNSEEK,int,PERF); char cFCopy[] = "FDICopy"; char cFIs[] = "FDIIsCabinet"; char cFDest[] = "FDIDestroy"; char cFCreat[]= "FDICreate"; FDICOPY pfdicopy = 0; FDIISCAB pfdiiscab = 0; FDIDEST pfdidest = 0; FDICREAT pfdicreat = 0; typedef struct { char * c_Nm; CPROC * c_F; }CABLIB, *LPCABLIB; CABLIB sCabLib[] = { { cFCopy, &pfdicopy }, { cFIs, &pfdiiscab }, { cFDest, &pfdidest }, { cFCreat, (CPROC *)&pfdicreat } }; HMODULE hCabLib = 0; #ifndef DUMP4 int giVerbose = 1; /* * Destination directory for extracted files */ char gszdest_dir[256]; char gcOutBuf[256]; BOOL gbShowInfo = FALSE; BOOL gfCopyAll = FALSE; BOOL gfCopyNone = FALSE; DWORD gdwCabSize; DWORD gdwTotSize; DWORD gdwComplete; DWORD gdwInPrev; DWORD gdwInNext; DWORD gdwInfoCnt; BOOL gbHasPrev; // = fdici.hasprev; // TRUE ? "yes" : "no", BOOL gbHasNext; // = fdici.hasnext; // TRUE ? "yes" : "no" ); TCHAR gcPrevCab[264]; // =,pfdin->psz2); TCHAR gcPrevPath[264]; TCHAR gcPrevDisk[264]; // ,pfdin->psz3); TCHAR gcPrevFull[264]; TCHAR gcPrevCab2[264]; // =,pfdin->psz2); TCHAR gcNextCab[264]; TCHAR gcNextDisk[264]; TCHAR gcNextCab2[264]; #define VERB ( giVerbose ) #define VERB1 VERB #define VERB2 ( giVerbose > 1 ) #define VERB3 ( giVerbose > 2 ) #define VERB4 ( giVerbose > 3 ) #define VERB5 ( giVerbose > 4 ) #define VERB6 ( giVerbose > 5 ) #define VERB7 ( giVerbose > 6 ) #define VERB8 ( giVerbose > 7 ) #define VERB9 ( giVerbose > 8 ) #define VERBMAX VERB9 #define MEOR "\r\n" int prt( LPTSTR lps ) { return( printf(lps) ); } #endif // DUMP4 //typedef struct { // USHORT ci_Num; // USHORT ci_setID; // Cabinet set ID // USHORT ci_iCabinet; // Cabinet number (0-based) // USHORT ci_iFolder; // Folder number (0-based) // TCHAR ci_cNextCab[264]; // TCHAR ci_cNextDisk[264]; // TCHAR ci_cPath[264]; //}CABINF, * LPCABINF; //CABINF gsCabInf; char gc_cabinet_name[264]; char gc_cabinet_path[264]; char gc_cabinet_full[264]; ERF gs_erf; FDICABINETINFO gs_fdici; BOOL ChkCabLib( void ) { BOOL bRet = FALSE; if( hCabLib && pfdicopy && pfdiiscab && pfdidest && pfdicreat ) bRet = TRUE; return bRet; } BOOL LoadCabLib( void ) { BOOL bRet = FALSE; int i = 0; if( ChkCabLib() ) return TRUE; hCabLib = LoadLibrary( "CABINET.DLL" ); if( hCabLib ) { LPCABLIB lpc = &sCabLib[0]; CPROC * vp; FARPROC fp; for( i = 0; i < 4; i++ ) { vp = lpc->c_F; // extract POINTER to function pointer //if( !( lpc->c_F = GetProcAddress( hCabLib, // handle to DLL module // lpc->c_Nm ) ) ) // LPCSTR lpProcName // function name fp = GetProcAddress( hCabLib, // handle to DLL module lpc->c_Nm ); // LPCSTR lpProcName // function name if( !fp ) { break; } *vp = (CPROC)fp; lpc++; } } if( ( i == 4 ) && ( ChkCabLib() ) ) { bRet = TRUE; } return bRet; } BOOL FreeCabLib( void ) { BOOL bRet = FALSE; if( hCabLib ) { FreeLibrary( hCabLib ); bRet = TRUE; } hCabLib = 0; return bRet; } BOOL ProcessCAB( char * lpcab ) { BOOL bRet = test_fdi(lpcab); LPTSTR lpo = &gcOutBuf[0]; // if(test_fdi(lpcab) == TRUE) if(bRet) { if( gbShowInfo ) { prt( PRGNM" was successful\n"); } else { //DWORD gdwCabSize; //DWORD gdwTotSize; //DWORD gdwComplete; //DWORD gdwInPrev; //DWORD gdwInNext; //DWORD gdwInfoCnt; sprintf(lpo, "List %d:", (gdwComplete + gdwInPrev + gdwInNext) ); while( strlen(lpo) < MMINNCOL ) strcat( lpo, " " ); sprintf3( EndBuf(lpo), "%10d", gdwTotSize ); strcat(lpo, " ("); Dbl2Stg(EndBuf(lpo), (double)(((double)gdwCabSize * 100.0) / (double)gdwTotSize), 5 ); strcat(lpo, "%% Compression."); strcat(lpo,")\n"); prt(lpo); } if(VERB4) CheckPrev(); } else { prt( PRGNM" failed\n"); } #ifdef MEMSTATS2 ShowMems(); #endif return bRet; } #ifndef DUMP4 // ************************************************************************ // standalone DIRCAB void main(int argc, char **argv) { gdwCabSize = gdwTotSize = 0; // start with NOTHING gdwInfoCnt = gdwComplete = gdwInPrev = gdwInNext = 0; // if (argc != 3) if (argc < 2) { prt( PRGNM" - Demonstrates how to use the FDI library API calls\n" "\n" "Usage: "PRGNM" cabinet [dest_dir]\n" "\n" "Where <cabinet> is the name of a cabinet file, and <dest_dir>\n" "is the destination for the files extracted\n" "\n" " e.g. "PRGNM" c:\\test1.cab c:\\\n" "\n" ); pgm_exit(1); } if( !LoadCabLib() ) { prt( "ERROR: Unable to load CABINET.DLL\n" ); pgm_exit(2); } if( argc == 3 ) { gbShowInfo = TRUE; strcpy(gszdest_dir, argv[2]); // proceed with extract to here if( gszdest_dir[ (strlen(dest_dir) - 1 ) ] != '\\' ) strcat(gszdest_dir,"\\"); } else { gbShowInfo = FALSE; strcpy(gszdest_dir, ".\\"); // not used } ProcessCAB( argv[1] ); FreeCabLib(); pgm_exit(0); } // ************************************************************************ #endif // DUMP4 // #define MEMSTATS2 /* * Memory allocation function */ #ifdef MEMSTATS2 // collect some statistics #define MXMESTATS 256 typedef struct { DWORD m_sz; void * m_vp; }MMSTS; typedef MMSTS * LPMMSTS; int iAllCnt = 0; int iMemErr = 0; MMSTS sMems[MXMESTATS]; FNALLOC(mem_alloc) { void * vp; vp = malloc(cb); if(vp) { ZeroMemory( vp, cb ); sMems[iAllCnt].m_sz = cb; sMems[iAllCnt].m_vp = vp; if(iAllCnt < MXMESTATS) iAllCnt++; } return vp; } /* * Memory free function */ FNFREE(mem_free) { LPMMSTS lpm = &sMems[0]; int i; free(pv); if( iAllCnt ) { for( i = 0; i < iAllCnt; i++ ) { if( lpm->m_vp == pv ) { lpm->m_vp = 0; break; } lpm++; } if( i == iAllCnt ) iMemErr++; } else iMemErr++; } void ShowMems( void ) { int i; int iNotF = 0; DWORD dwMin, dwMax; LPMMSTS lpm = &sMems[0]; LPTSTR lpo = &gcOutBuf[0]; dwMin = (DWORD)-1; dwMax = 0; for( i = 0; i < iAllCnt; i++ ) { if( lpm->m_vp ) iNotF++; if( lpm->m_sz > dwMax ) dwMax = lpm->m_sz; if( lpm->m_sz < dwMin ) dwMin = lpm->m_sz; lpm++; } sprintf(lpo, "Memory: %d allocs from %u to %u in size.", iAllCnt, dwMin, dwMax ); if( iNotF ) sprintf(EndBuf(lpo), " (%d not FREED)", iNotF); if( iMemErr ) sprintf(EndBuf(lpo), " (%d ERRORS!)", iMemErr); strcat(lpo,"\n"); prt(lpo); } #else // !MEMSTATS2 FNALLOC(mem_alloc) { void * vp; vp = malloc(cb); if(vp) ZeroMemory(vp, cb); return vp; } /* * Memory free function */ FNFREE(mem_free) { free(pv); } #endif // MEMSTATS2 y/n // file functions - open, read, write, seek, and close // *************************************************** #ifdef WIN32 // NOTE: This function ONLY handles the current known calls // There are presently only TWO calls #define FCALL1 ( _O_BINARY | _O_RDONLY | _O_SEQUENTIAL ) #define FCALL2 ( _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL ) FNOPEN(file_open) { HANDLE iRet; DWORD dwa, dwc; if( oflag & _O_CREAT ) { dwa = GENERIC_READ | GENERIC_WRITE; dwc = CREATE_ALWAYS; } else { dwa = GENERIC_READ; dwc = OPEN_EXISTING; } //return _open(pszFile, oflag, pmode); iRet = CreateFile( pszFile, // file name dwa, // access mode FILE_SHARE_READ, // share mode 0, // SD dwc, // how to create FILE_ATTRIBUTE_NORMAL, // file attributes 0 ); // handle to template file UNREFERENCED_PARAMETER(pmode); return iRet; } FNREAD(file_read) { UINT uRet = 0; // none yet ... DWORD dwr; // return _read(hf, pv, cb); if( ReadFile( (HANDLE)hf, // handle to file pv, // data buffer cb, // number of bytes to read &dwr, // number of bytes read 0 ) ) // overlapped buffer { // success uRet = dwr; // return READ amount } return uRet; } FNWRITE(file_write) { UINT uRet = 0; DWORD dww; //return _write(hf, pv, cb); if( WriteFile( (HANDLE)hf, // handle to file pv, // data buffer cb, // number of bytes to write &dww, // number of bytes written 0 ) ) // overlapped buffer { uRet = dww; } return uRet; } FNCLOSE(file_close) { int iRet = 0; //return _close(hf); if( CloseHandle((HANDLE)hf) ) iRet++; return iRet; } FNSEEK(file_seek) { DWORD dwi, dwm; DWORD dwh = 0; if( seektype == SEEK_SET ) // Beginning of file dwm = FILE_BEGIN; // The starting point is zero or the beginning of the file. else if( seektype == SEEK_CUR ) // Current position of file pointer dwm = FILE_CURRENT; // The starting point is the current value of the file pointer. else if( seektype == SEEK_END ) // End of file dwm = FILE_END; // The starting point is the current end-of-file position. else dwm = FILE_BEGIN; // default to this if NOT above !!!???!!! //return _lseek(hf, dist, seektype); dwi = SetFilePointer((HANDLE)hf, // handle to file dist, // bytes to move pointer (PLONG)&dwh, // bytes to move pointer dwm ); // starting point return dwi; } #else // !WIN32 FNOPEN(file_open) { return _open(pszFile, oflag, pmode); } FNREAD(file_read) { return _read(hf, pv, cb); } FNWRITE(file_write) { return _write(hf, pv, cb); } FNCLOSE(file_close) { return _close(hf); } FNSEEK(file_seek) { return _lseek(hf, dist, seektype); } #endif // WIN32 y/n FNFDINOTIFY(notification_function) { FILETIME local_filetime; FILETIME datetime; SYSTEMTIME st; DWORD attrs; char destination[256]; LPTSTR lpo = &gcOutBuf[0]; switch (fdint) { case fdintCABINET_INFO: // general information about the cabinet /* fdintCABINET_INFO: * Called exactly once for each cabinet opened by FDICopy(), including * continuation cabinets opened due to file(s) spanning cabinet * boundaries. Primarily intended to permit EXTRACT.EXE to * automatically select the next cabinet in a cabinet sequence even if * not copying files that span cabinet boundaries. * Entry: * pfdin->psz1 = name of next cabinet * pfdin->psz2 = name of next disk * pfdin->psz3 = cabinet path name * pfdin->setID = cabinet set ID (a random 16-bit number) * pfdin->iCabinet = Cabinet number within cabinet set (0-based) * Exit-Success: * Return anything but -1 * Exit-Failure: * Returns -1 => Abort FDICopy() call */ if (pfdin->hf) { strcpy(gcNextCab, pfdin->psz1); // = name of next cabinet strcpy(gcNextDisk, pfdin->psz2); // = name of next disk gdwInfoCnt++; if (gbShowInfo) { sprintf(lpo, "fdintCABINET_INFO\n" " next cabinet = %s\n" " next disk = %s\n" " cabinet path = %s\n" " cabinet set ID = %d\n" " cabinet # in set = %d (zero based)\n" "\n", pfdin->psz1, pfdin->psz2, pfdin->psz3, pfdin->setID, pfdin->iCabinet); prt(lpo); } else if (VERBMAX) { sprintf(lpo, "INFO: next cab=%s disk=%s path=%s ID=%#x Set#=%d.\n", pfdin->psz1, pfdin->psz2, pfdin->psz3, pfdin->setID, pfdin->iCabinet); prt(lpo); } } return 0; case fdintPARTIAL_FILE: // first file(s) in cabinet is continuation // but this is the whole file size // NOT the partial amount in this cabinet. // Really fizzles the % compression since do NOT know amount in // this cab or the amount in previous cab gdwInPrev++; gdwTotSize += pfdin->cb; // add file size to total strcpy(gcPrevCab,pfdin->psz2); strcpy(gcPrevDisk,pfdin->psz3); if( gbShowInfo ) { sprintf(lpo, "fdintPARTIAL_FILE\n" " name of continued file = %s\n" " name of cabinet where file starts = %s\n" " name of disk where file starts = %s\n", pfdin->psz1, pfdin->psz2, pfdin->psz3 ); prt(lpo); } else { strcpy( lpo, pfdin->psz1 ); while( strlen(lpo) < MMINNCOL ) strcat( lpo, " " ); sprintf3( EndBuf(lpo), "%10d", pfdin->cb ); strcat( lpo, " <PARTIAL> Begins in " ); strcat( lpo, pfdin->psz2 ); if( VERB2 ) { sprintf(EndBuf(lpo), " Disk=[%s]", pfdin->psz3 ); } strcat( lpo, "\n" ); prt( lpo ); } return 0; case fdintCOPY_FILE: // file to be copied { int response = 'N'; HANDLE handle; // char destination[256]; gdwComplete++; gdwTotSize += pfdin->cb; // add file size to total if( gbShowInfo ) { sprintf( destination, "%s%s", gszdest_dir, pfdin->psz1 ); sprintf(lpo, "fdintCOPY_FILE\n" " File name in cabinet = %s (size = %d)\n" " Output to %s\n", pfdin->psz1, pfdin->cb, destination ); prt(lpo); if( gfCopyAll ) { prt(" Copying ALL ..."); response = 'A'; } else if( gfCopyNone ) { prt(" Copying NONE ..."); response = 'X'; } else { prt(" Copy ALL? This file? None? (a/y/n/x): "); } if( !gfCopyAll && !gfCopyNone ) { do { response = getc(stdin); response = toupper(response); }while( (response != 'Y') && (response != 'N') && (response != 'A') && (response != 'X') ); } prt("\n"); if( ( response == 'Y' ) || ( response == 'A' ) ) { if( response == 'A' ) gfCopyAll = TRUE; handle = file_open( destination, _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL, _S_IREAD | _S_IWRITE ); if( ( handle ) && ( handle != (HANDLE)-1 ) ) { // success file_close(handle); return TRUE; } else { // file create error sprintf(lpo, "ERROR: Can NOT create [%s]!!!\n", destination ); prt(lpo); gfCopyAll = FALSE; // if this FAILED, ask again return 0; /* skip file */ } } else { if( response == 'X' ) gfCopyNone = TRUE; return 0; /* skip file */ } } else { strcpy( lpo, pfdin->psz1 ); while( strlen(lpo) < MMINNCOL ) strcat( lpo, " " ); sprintf3( EndBuf(lpo), "%10d", pfdin->cb ); strcat( lpo, " " ); if( ( DosDateTimeToFileTime( pfdin->date, pfdin->time, &datetime) ) && ( LocalFileTimeToFileTime( &datetime, &local_filetime) ) && ( FileTimeToSystemTime( &local_filetime, // file time to convert &st ) // receives system time ) ) { sprintf( EndBuf(lpo), "%02d/%02d/%02d %02d:%02d", st.wDay, st.wMonth, (st.wYear % 100), st.wHour, st.wMinute ); } else { strcat( lpo, "FILETIME!!!" ); } /* * Mask out attribute bits other than readonly, * hidden, system, and archive, since the other * attribute bits are reserved for use by * the cabinet format. */ attrs = pfdin->attribs; attrs &= (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_ARCH); destination[0] = 0; if( attrs & _A_RDONLY ) strcat( destination, "R" ); if( attrs & _A_HIDDEN ) strcat( destination, "H" ); if( attrs & _A_SYSTEM ) strcat( destination, "S" ); if( attrs & _A_ARCH ) strcat( destination, "A" ); if( destination[0] ) sprintf( EndBuf(lpo), " %s", destination ); strcat( lpo, "\n" ); prt( lpo ); return 0; /* skip file */ } } case fdintCLOSE_FILE_INFO: // close the file, set relevant info { HANDLE handle; // DWORD attrs; // char destination[256]; sprintf(lpo, "fdintCLOSE_FILE_INFO\n" " file name in cabinet = %s\n" "\n", pfdin->psz1 ); prt(lpo); sprintf( destination, "%s%s", gszdest_dir, pfdin->psz1 ); #ifdef WIN32 handle = (HANDLE)pfdin->hf; #else // !WIN32 file_close(pfdin->hf); /* * Set date/time * * Need Win32 type handle for to set date/time */ handle = CreateFile( destination, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); #endif // WIN32 y/n if( (handle) && (handle != INVALID_HANDLE_VALUE) ) { // FILETIME datetime; if(DosDateTimeToFileTime( pfdin->date, pfdin->time, &datetime)) { // FILETIME local_filetime; if(LocalFileTimeToFileTime( &datetime, &local_filetime)) { (void) SetFileTime( handle, &local_filetime, NULL, &local_filetime ); } } CloseHandle(handle); } else { sprintf(lpo, "ERROR: Handle of file %s is INVALID!"MEOR, pfdin->psz1 ); } /* * Mask out attribute bits other than readonly, * hidden, system, and archive, since the other * attribute bits are reserved for use by * the cabinet format. */ attrs = pfdin->attribs; attrs &= (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_ARCH); (void) SetFileAttributes( destination, attrs ); return TRUE; } case fdintNEXT_CABINET: // file continued to next cabinet gdwInNext++; gdwTotSize += pfdin->cb; // add file size to total if( gbShowInfo ) { sprintf(lpo, "fdintNEXT_CABINET\n" " name of next cabinet where file continued = %s\n" " name of next disk where file continued = %s\n" " cabinet path name = %s\n" "\n", pfdin->psz1, pfdin->psz2, pfdin->psz3 ); prt(lpo); } else { strcpy( lpo, pfdin->psz1 ); while( strlen(lpo) < MMINNCOL ) strcat( lpo, " " ); sprintf3( EndBuf(lpo), "%10d", pfdin->cb ); strcat( lpo, " <PARTIAL> Cont. in " ); strcat( lpo, pfdin->psz2 ); strcat( lpo, "\n" ); prt( lpo ); } return 0; case fdintENUMERATE: /* * Called once after a call to FDICopy() starts scanning a CAB's * CFFILE entries, and again when there are no more CFFILE entries. * If CAB spanning occurs, an additional call will occur after the * first spanned file is completed. If the pfdin->iFolder value is * changed from zero, additional calls will occur next time it reaches * zero. If iFolder is changed to zero, FDICopy will terminate, as if * there were no more CFFILE entries. Primarily intended to allow an * application with it's own file list to help FDI advance quickly to * a CFFILE entry of interest. Can also be used to allow an * application to determine the cb values for each file in the CAB. * Entry: * pfdin->cb = current CFFILE position * pfdin->iFolder = number of files remaining * pfdin->setID = current CAB's setID value * Exit-Don't Care: * Don't change anything. * Return anything but -1. */ if( VERBMAX ) { sprintf(lpo, "ENUMERATE: Pos=%s Folder=%d, ID=%#x.\n", GetDWStg2(pfdin->cb), pfdin->iFolder, pfdin->setID ); prt(lpo); } return 0; } return 0; } FNFDINOTIFY(note_function2) { switch (fdint) { case fdintCABINET_INFO: // general information about the cabinet /* fdintCABINET_INFO: * Called exactly once for each cabinet opened by FDICopy(), including * continuation cabinets opened due to file(s) spanning cabinet * boundaries. Primarily intended to permit EXTRACT.EXE to * automatically select the next cabinet in a cabinet sequence even if * not copying files that span cabinet boundaries. * Entry: * pfdin->psz1 = name of next cabinet * pfdin->psz2 = name of next disk * pfdin->psz3 = cabinet path name * pfdin->setID = cabinet set ID (a random 16-bit number) * pfdin->iCabinet = Cabinet number within cabinet set (0-based) * Exit-Success: * Return anything but -1 * Exit-Failure: * Returns -1 => Abort FDICopy() call */ strcpy(gcNextCab2,pfdin->psz1); return 0; case fdintPARTIAL_FILE: // first file(s) in cabinet is continuation /* fdintPARTIAL_FILE: * Called for files at the front of the cabinet that are CONTINUED * from a previous cabinet. This callback occurs only when FDICopy is * started on second or subsequent cabinet in a series that has files * continued from a previous cabinet. * Entry: * pfdin->psz1 = file name of file CONTINUED from a PREVIOUS cabinet * pfdin->psz2 = name of cabinet where file starts * pfdin->psz3 = name of disk where file starts * Exit-Success: * Return anything other than -1; enumeration continues * Exit-Failure: * Returns -1 => Abort FDICopy() call */ strcpy( gcPrevCab2, pfdin->psz2 ); return 0; case fdintCOPY_FILE: // file to be copied /* fdintCOPY_FILE: * Called for each file that *starts* in the current cabinet, giving * the client the opportunity to request that the file be copied or * skipped. * Entry: * pfdin->psz1 = file name in cabinet * pfdin->cb = uncompressed size of file * pfdin->date = file date * pfdin->time = file time * pfdin->attribs = file attributes * pfdin->iFolder = file's folder index * Exit-Success: * Return non-zero file handle for destination file; FDI writes * data to this file use the PFNWRITE function supplied to FDICreate, * and then calls fdintCLOSE_FILE_INFO to close the file and set * the date, time, and attributes. NOTE: This file handle returned * must also be closeable by the PFNCLOSE function supplied to * FDICreate, since if an error occurs while writing to this handle, * FDI will use the PFNCLOSE function to close the file so that the * client may delete it. * Exit-Failure: * Returns 0 => Skip file, do not copy * Returns -1 => Abort FDICopy() call */ return 0; /* skip file */ case fdintCLOSE_FILE_INFO: // close the file, set relevant info /* fdintCLOSE_FILE_INFO: * Called after all of the data has been written to a target file. * This function must close the file and set the file date, time, * and attributes. * Entry: * pfdin->psz1 = file name in cabinet * pfdin->hf = file handle * pfdin->date = file date * pfdin->time = file time * pfdin->attribs = file attributes * pfdin->iFolder = file's folder index * pfdin->cb = Run After Extract (0 - don't run, 1 Run) * Exit-Success: * Returns TRUE * Exit-Failure: * Returns FALSE, or -1 to abort; * * IMPORTANT NOTE IMPORTANT: * pfdin->cb is overloaded to no longer be the size of * the file but to be a binary indicated run or not * * IMPORTANT NOTE: * FDI assumes that the target file was closed, even if this * callback returns failure. FDI will NOT attempt to use * the PFNCLOSE function supplied on FDICreate() to close * the file! */ return TRUE; case fdintNEXT_CABINET: // file continued to next cabinet /* fdintNEXT_CABINET: * This function is *only* called when fdintCOPY_FILE was told to copy * a file in the current cabinet that is continued to a subsequent * cabinet file. It is important that the cabinet path name (psz3) * be validated before returning! This function should ensure that * the cabinet exists and is readable before returning. So, this * is the function that should, for example, issue a disk change * prompt and make sure the cabinet file exists. * * When this function returns to FDI, FDI will check that the setID * and iCabinet match the expected values for the next cabinet. * If not, FDI will continue to call this function until the correct * cabinet file is specified, or until this function returns -1 to * abort the FDICopy() function. pfdin->fdie is set to * FDIERROR_WRONG_CABINET to indicate this case. * * If you *haven't* ensured that the cabinet file is present and * readable, or the cabinet file has been damaged, pfdin->fdie will * receive other appropriate error codes: * * FDIERROR_CABINET_NOT_FOUND * FDIERROR_NOT_A_CABINET * FDIERROR_UNKNOWN_CABINET_VERSION * FDIERROR_CORRUPT_CABINET * FDIERROR_BAD_COMPR_TYPE * FDIERROR_RESERVE_MISMATCH * FDIERROR_WRONG_CABINET * * Entry: * pfdin->psz1 = name of next cabinet where current file is continued * pfdin->psz2 = name of next disk where current file is continued * pfdin->psz3 = cabinet path name; FDI concatenates psz3 with psz1 * to produce the fully-qualified path for the cabinet * file. The 256-byte buffer pointed at by psz3 may * be modified, but psz1 may not! * pfdin->fdie = FDIERROR_WRONG_CABINET if the previous call to * fdintNEXT_CABINET specified a cabinet file that * did not match the setID/iCabinet that was expected. * Exit-Success: * Return anything but -1 * Exit-Failure: * Returns -1 => Abort FDICopy() call * Notes: * This call is almost always made when a target file is open and * being written to, and the next cabinet is needed to get more * data for the file. */ return 0; case fdintENUMERATE: /* * Called once after a call to FDICopy() starts scanning a CAB's * CFFILE entries, and again when there are no more CFFILE entries. * If CAB spanning occurs, an additional call will occur after the * first spanned file is completed. If the pfdin->iFolder value is * changed from zero, additional calls will occur next time it reaches * zero. If iFolder is changed to zero, FDICopy will terminate, as if * there were no more CFFILE entries. Primarily intended to allow an * application with it's own file list to help FDI advance quickly to * a CFFILE entry of interest. Can also be used to allow an * application to determine the cb values for each file in the CAB. * Entry: * pfdin->cb = current CFFILE position * pfdin->iFolder = number of files remaining * pfdin->setID = current CAB's setID value * Exit-Don't Care: * Don't change anything. * Return anything but -1. */ return 0; } return 0; } BOOL CheckPrev( void ) { HFDI hfdi; HANDLE hf; int iPCnt, iNCnt; LPTSTR lpo = &gcOutBuf[0]; if( VERB5 ) { // see if we can construct the FULL chain of CABINET files prt( "Moment ... attempting to trace CAB CHAIN ..."MEOR ); if( ( gbHasPrev ) && ( gcPrevCab[0] ) ) { // lets use this PREVIOUS iPCnt = 0; Next_Cycle: sprintf( gcPrevFull, "%s%s", gcPrevPath, gcPrevCab ); hfdi = pfdicreat( mem_alloc, mem_free, file_open, file_read, file_write, file_close, file_seek, cpu80386, &gs_erf ); if(hfdi == 0 ) return FALSE; hf = file_open( gcPrevFull, (_O_BINARY | _O_RDONLY | _O_SEQUENTIAL), 0 ); if( ( hf == (HANDLE)-1 ) || ( hf == 0 ) ) { pfdidest(hfdi); sprintf(lpo,"ERROR: Unable to open [%s]!\n", gcPrevFull); prt(lpo); return FALSE; } ZeroMemory( &gs_fdici, sizeof(FDICABINETINFO) ); if( pfdiiscab( hfdi, hf, &gs_fdici) ) { file_close(hf); // ok, this is a CAB if( VERBMAX ) { sprintf(lpo, "CAB: %s has %3d file(s) (BT=%s ID=%#x CAB#=%d) ", gcPrevCab, gs_fdici.cFiles, GetDWStg2(gs_fdici.cbCabinet), gs_fdici.setID, gs_fdici.iCabinet ); if( gs_fdici.hasprev ) // == TRUE ? "yes" : "no", strcat(lpo, "P"); if( gs_fdici.hasnext ) //== TRUE ? "yes" : "no" ); strcat(lpo, "N"); strcat(lpo,"\n"); prt(lpo); } } else { /* ************************ * * No, it's not a cabinet! * ************************** */ file_close(hf); sprintf(lpo, "FDIIsCabinet() failed: [%s] is NOT a cabinet!\n", gcPrevFull ); prt(lpo); pfdidest(hfdi); return FALSE; } gcPrevCab2[0] = 0; // set no previous if( pfdicopy( hfdi, gcPrevCab, gcPrevPath, 0, note_function2, NULL, NULL) ) { // success iPCnt++; } else { // FAILED!!! sprintf(lpo, "FDICopy() failed: code %d [%s]\n", gs_erf.erfOper, return_fdi_error_string(gs_erf.erfOper) ); prt(lpo); pfdidest(hfdi); return FALSE; } // we are at the end of this CAB if( FALSE == pfdidest(hfdi) ) { pfdidest(hfdi); return FALSE; } // do we have more previous CABS if( ( gs_fdici.hasprev ) && ( gcPrevCab2[0] ) && ( STRCMPI(gcPrevCab,gcPrevCab2) ) ) { strcpy(gcPrevCab,gcPrevCab2); goto Next_Cycle; } sprintf(lpo, "Appears [%s] is first CAB in series ..."MEOR, gcPrevCab ); prt(lpo); } else { sprintf(lpo, "Appears [%s] is first CAB in series ..."MEOR, gc_cabinet_name ); prt(lpo); } if( ( gbHasNext ) && ( gcNextCab[0] ) ) { // lets use this PREVIOUS iNCnt = 0; Next_Cycle2: sprintf( gcPrevFull, "%s%s", gcPrevPath, gcNextCab ); hfdi = pfdicreat( mem_alloc, mem_free, file_open, file_read, file_write, file_close, file_seek, cpu80386, &gs_erf ); if(hfdi == 0 ) return FALSE; hf = file_open( gcPrevFull, (_O_BINARY | _O_RDONLY | _O_SEQUENTIAL), 0 ); if( ( hf == (HANDLE)-1 ) || ( hf == 0 ) ) { pfdidest(hfdi); sprintf(lpo,"ERROR: Unable to open [%s]!\n", gcPrevFull); prt(lpo); return FALSE; } ZeroMemory( &gs_fdici, sizeof(FDICABINETINFO) ); if( pfdiiscab( hfdi, hf, &gs_fdici) ) { file_close(hf); // ok, this is a CAB if( VERBMAX ) { sprintf(lpo, "CAB: %s has %3d file(s) (BT=%s ID=%#x CAB#=%d) ", gcNextCab, gs_fdici.cFiles, GetDWStg2(gs_fdici.cbCabinet), gs_fdici.setID, gs_fdici.iCabinet ); if( gs_fdici.hasprev ) // == TRUE ? "yes" : "no", strcat(lpo, "P"); if( gs_fdici.hasnext ) //== TRUE ? "yes" : "no" ); strcat(lpo, "N"); strcat(lpo,"\n"); prt(lpo); } } else { /* ************************ * * No, it's not a cabinet! * ************************** */ file_close(hf); sprintf(lpo, "FDIIsCabinet() failed: [%s] is NOT a cabinet!\n", gcPrevFull ); prt(lpo); pfdidest(hfdi); return FALSE; } gcNextCab2[0] = 0; // set no next if( pfdicopy( hfdi, gcNextCab, gcPrevPath, 0, note_function2, NULL, NULL) ) { // success iNCnt++; } else { // FAILED!!! sprintf(lpo, "FDICopy() failed: code %d [%s]\n", gs_erf.erfOper, return_fdi_error_string(gs_erf.erfOper) ); prt(lpo); pfdidest(hfdi); return FALSE; } // we are at the end of this CAB if( FALSE == pfdidest(hfdi) ) { pfdidest(hfdi); return FALSE; } // do we have more previous CABS if( ( gs_fdici.hasnext ) && ( gcNextCab2[0] ) && ( STRCMPI(gcNextCab,gcNextCab2) ) ) { strcpy(gcNextCab,gcNextCab2); goto Next_Cycle2; } sprintf(lpo, "Appears [%s] is last CAB in series ..."MEOR, gcNextCab ); prt(lpo); } else { sprintf(lpo, "Appears [%s] is last CAB in series ..."MEOR, gc_cabinet_name ); prt(lpo); } } return TRUE; } BOOL test_fdi(char *cabinet_fullpath) { HFDI hfdi; ERF erf; FDICABINETINFO fdici; HANDLE hf; char *p; LPTSTR lpo = &gcOutBuf[0]; // char cabinet_name[256]; // char cabinet_path[256]; gc_cabinet_name[0] = 0; gc_cabinet_path[0] = 0; gcPrevCab[0] = 0; gcPrevDisk[0] = 0; gcNextCab[0] = 0; // hfdi = FDICreate( hfdi = pfdicreat( mem_alloc, mem_free, file_open, file_read, file_write, file_close, file_seek, cpu80386, &erf ); if( hfdi == NULL ) { sprintf(lpo, "FDICreate() failed: code %d [%s]\n", erf.erfOper, return_fdi_error_string(erf.erfOper) ); prt(lpo); return FALSE; } else if( VERBMAX ) { sprintf(lpo, "FDICreate() returned handle: %p\n", hfdi); prt(lpo); } /* * Is this file really a cabinet? */ hf = file_open( cabinet_fullpath, _O_BINARY | _O_RDONLY | _O_SEQUENTIAL, 0 ); if( ( hf == (HANDLE)-1 ) || ( hf == 0 ) ) { //(void) FDIDestroy(hfdi); pfdidest(hfdi); sprintf(lpo,"ERROR: Unable to open [%s]!\n", cabinet_fullpath); prt(lpo); return FALSE; } else if( VERBMAX ) { LARGE_INTEGER li; li.LowPart = GetFileSize((HANDLE) hf, // handle to file (PULONG)&li.HighPart ); // high-order word of file size sprintf(lpo,"Openned with handle=%p Size=%s bytes.\n", hf, GetI64Stg2(li) ); prt(lpo); } // if (FALSE == FDIIsCabinet( // hfdi, // hf, // &fdici)) if( !pfdiiscab( hfdi, hf, &fdici) ) { /* ************************ * * No, it's not a cabinet! * ************************** */ file_close(hf); sprintf(lpo, "FDIIsCabinet() failed: [%s] is NOT a cabinet!\n", cabinet_fullpath ); prt(lpo); //(void) FDIDestroy(hfdi); (pfdidest) (hfdi); return FALSE; } else { file_close(hf); gdwCabSize = fdici.cbCabinet; gbHasPrev = fdici.hasprev; // TRUE ? "yes" : "no", gbHasNext = fdici.hasnext; // TRUE ? "yes" : "no" ); if( gbShowInfo ) { sprintf(lpo, "Information on cabinet file '%s'\n" " Total length of cabinet file : %d\n" " Number of folders in cabinet : %d\n" " Number of files in cabinet : %d\n" " Cabinet set ID : %d\n" " Cabinet number in set : %d\n" " RESERVE area in cabinet? : %s\n" " Chained to prev cabinet? : %s\n" " Chained to next cabinet? : %s\n" "\n", cabinet_fullpath, fdici.cbCabinet, fdici.cFolders, fdici.cFiles, fdici.setID, fdici.iCabinet, fdici.fReserve == TRUE ? "yes" : "no", fdici.hasprev == TRUE ? "yes" : "no", fdici.hasnext == TRUE ? "yes" : "no" ); prt(lpo); } else { sprintf(lpo, "List of %d File(s) (BT=%s ID=%#x CAB#=%d) ", fdici.cFiles, GetDWStg2(fdici.cbCabinet), fdici.setID, fdici.iCabinet ); if( fdici.hasprev ) // == TRUE ? "yes" : "no", strcat(lpo, "P"); if( fdici.hasnext ) //== TRUE ? "yes" : "no" ); strcat(lpo, "N"); strcat(lpo,"\n"); prt(lpo); } } p = strrchr(cabinet_fullpath, '\\'); if (p == NULL) { strcpy(gc_cabinet_name, cabinet_fullpath); strcpy(gc_cabinet_path, ""); } else { strcpy(gc_cabinet_name, p+1); strncpy(gc_cabinet_path, cabinet_fullpath, (int) (p-cabinet_fullpath)+1); gc_cabinet_path[ (int) (p-cabinet_fullpath)+1 ] = 0; } strcpy(gcPrevPath,gc_cabinet_path); // if (TRUE != FDICopy( // hfdi, // cabinet_name, // cabinet_path, // 0, // notification_function, // NULL, // NULL)) if( TRUE != pfdicopy( hfdi, gc_cabinet_name, gc_cabinet_path, 0, notification_function, NULL, NULL) ) { sprintf(lpo, "FDICopy() failed: code %d [%s]\n", erf.erfOper, return_fdi_error_string(erf.erfOper) ); prt(lpo); //(void) FDIDestroy(hfdi); pfdidest(hfdi); return FALSE; } // if (FDIDestroy(hfdi) != TRUE) if( ( pfdidest(hfdi) ) != TRUE ) { sprintf(lpo, "FDIDestroy() failed: code %d [%s]\n", erf.erfOper, return_fdi_error_string(erf.erfOper) ); prt(lpo); return FALSE; } // CheckPrev(); return TRUE; } char *return_fdi_error_string(FDIERROR err) { switch (err) { case FDIERROR_NONE: return "No error"; case FDIERROR_CABINET_NOT_FOUND: return "Cabinet not found"; case FDIERROR_NOT_A_CABINET: return "Not a cabinet"; case FDIERROR_UNKNOWN_CABINET_VERSION: return "Unknown cabinet version"; case FDIERROR_CORRUPT_CABINET: return "Corrupt cabinet"; case FDIERROR_ALLOC_FAIL: return "Memory allocation failed"; case FDIERROR_BAD_COMPR_TYPE: return "Unknown compression type"; case FDIERROR_MDI_FAIL: return "Failure decompressing data"; case FDIERROR_TARGET_FILE: return "Failure writing to target file"; case FDIERROR_RESERVE_MISMATCH: return "Cabinets in set have different RESERVE sizes"; case FDIERROR_WRONG_CABINET: return "Cabinet returned on fdintNEXT_CABINET is incorrect"; case FDIERROR_USER_ABORT: return "User aborted"; default: return "Unknown error"; } } // extracted from grmout.c - sept 2000 /* Oct 99 update - retreived from DDBData.c */ // =========================================================== // void Buffer2Stg( LPSTR lps, LPSTR lpb, int decimal, // int sign, int precision ) // // Purpose: Convert the string of digits from the _ecvt // function to a nice human readbale form. // // 1999 Sept 7 - Case of removing ?.?0000 the zeros // // =========================================================== void Buffer2Stg( LPSTR lps, LPSTR lpb, int decimal, int sign, int precision ) { int i, j, k, l, m, sig, cad; char c; k = 0; // Start at output beginning cad = 0; // Count AFTER the decimal j = strlen( lpb ); // Get LENGTH of buffer digits if( sign ) // if the SIGN flag is ON lps[k++] = '-'; // Fill in the negative l = decimal; if( l < 0 ) { // A NEGATIVE decimal position lps[k++] = '0'; lps[k++] = '.'; cad++; while( l < 0 ) { lps[k++] = '0'; l++; cad++; } } else if( ( decimal >= 0 ) && ( decimal < precision ) ) { // Possible shortened use of the digit string // ie possible LOSS of DIGITS to fit the precision requested. if( decimal == 0 ) { if( ( precision - 1 ) < j ) { //chkme(); j = precision - 1; } } else { if( precision < j ) { // chkme(); j = precision; } } } sig = 0; // Significant character counter // Process each digit of the digit list in the buffer // or LESS than the list if precision is LESS!!! for( i = 0; i < j; i++ ) { c = lpb[i]; // Get a DIGIT if( i == decimal ) // Have we reached the DECIMAL POINT? { // At the DECIMAL point if( i == 0 ) { // if no other digits BEFORE the decimal lps[k++] = '0'; // then plonk in a zero now } lps[k++] = '.'; // and ADD the decimal point cad++; } // Check for adding a comma for the THOUSANDS if( ( decimal > 0 ) && ( sig ) && ( i < decimal ) ) { m = decimal - i; if( (m % 3) == 0 ) lps[k++] = ','; // Add in a comma } lps[k++] = c; // Add this digit to the output if( sig ) // If we have HAD a significant char { sig++; // Then just count another, and another etc } else if( c > '0' ) { sig++; // First SIGNIFICANT character } if( cad ) cad++; } // while processing the digit list // FIX980509 - If digit length is LESS than decimal position // ========================================================= if( ( decimal > 0 ) && ( i < decimal ) ) { c = '0'; while( i < decimal ) { if( ( decimal > 0 ) && ( sig ) && ( i < decimal ) ) { m = decimal - i; if( (m % 3) == 0 ) lps[k++] = ','; // Add in a comma } lps[k++] = c; // Add this digit to the output i++; } } // ========================================================= if( cad ) cad--; lps[k] = 0; // zero terminate the output // FIX990907 - Remove unsightly ZEROs after decimal point for( i = 0; i < k; i++ ) { if( lps[i] == '.' ) break; } if( ( i < k ) && ( lps[i] == '.' ) ) { i++; if( lps[i] == '0' ) { while( k > i ) { k--; if( lps[k] == '0' ) lps[k] = 0; else break; } if( k > i ) { // we have backed to a not '0' value so STOP } else { // we backed all the way, so remove the DECIMAL also i--; lps[i] = 0; } } else { while( k > i ) { k--; if( lps[k] == '0' ) lps[k] = 0; else break; } } } } char GMUpper( char c ) { char d; if( (c >= 'a') && (c <= 'z') ) d = (char)(c & 0x5f); else d = c; return( d ); } int GMInStr( LPSTR lpsrc, LPSTR lpfind ) { int iAt, islen, iflen, i, j, k; char c, d, b; iAt = 0; // NOT FOOUND yet islen = iflen = 0; if( lpsrc && lpfind ) { islen = strlen( lpsrc ); iflen = strlen( lpfind ); } if( islen && iflen ) { d = GMUpper( lpfind[0] ); for( i = 0; i < islen; i++ ) { c = GMUpper( lpsrc[i] ); if( c == d ) { if( iflen == 1 ) { // The FIND location ***PLUS*** ONE (1)!!! iAt = i+1; break; } else { if( (islen - i) >= iflen ) { // ok, we have the length k = i + 1; // Get to NEXT char for( j = 1; j < iflen; j++ ) { c = GMUpper( lpsrc[k] ); // Get next b = GMUpper( lpfind[j] ); if( c != b ) break; k++; } if( j == iflen ) { // FIX981106 - This should be //iAt = k + 1; // The FIRST char FIND location // ***PLUS*** ONE (1)!!! iAt = i + 1; break; } } else { // not enough length left break; } } } } } return iAt; } void RTrimDecimal1( LPSTR lpr ) { int i, j, k, dlen; char c, d; LPSTR lpend; c = 0; i = j = k = 0; if( lpr ) { i = strlen( lpr ); k = GMInStr( lpr, "." ); j = ( i - k ); } if( ( i && k ) && ( i < 128 ) && ( j > 2 ) ) { // Also look for runs, especially say 0.799999997 dlen = j - 1; c = lpr[i - 1]; // Get last char of string if( ( c >= '0' ) && ( c <= '9' ) ) { lpend = &lpr[ i - 1 ]; *lpend = 0; // kill end lpend--; //k = i - k; if( c >= '5' ) { //if( k ) // k--; d = c; c = *lpend; if( ( c >= '0' ) && ( c <= '9' ) ) { if( c < '9' ) { c++; *lpend = c; } else { // if( k ) // k--; // while( k-- ) while( dlen-- ) { *lpend = '0'; lpend--; d = c; c = *lpend; if( ( c >= '0' ) && ( c <= '9' ) ) { if( c < '9' ) { c++; *lpend = c; break; } else { if( k ) { *lpend = '0'; lpend--; } } } else { break; } } // backing up } } // back one is a number } // we are removing a 5 or more } } } void RTrimDecimal( LPSTR lpr ) { int i, j, k, l; char c; char szless[128]; LPSTR lpl; i = 0; if( lpr ) i = strlen( lpr ); if(i) { k = GMInStr( lpr, "." ); if(k) { // Returns LOCATION of DECIMAL k--; // back to char BEFORE decimal for( j = (i - 1); j >= k; j-- ) { c = lpr[j]; // Get END (after DECIMAL POINT!) if( c == '0' ) { lpr[j] = 0; } else { if( c == '.' ) lpr[j] = 0; break; } } } // if it contains a DECIMAL point // ============================== // 2nd processing ============== // ============================== i = strlen( lpr ); k = GMInStr( lpr, "." ); if( ( i ) && ( k ) && ( i < 128 ) && ( ( i - k ) > 2 ) ) { // Also look for runs, especially say 0.799999997 j = ( k + 1 ); k = i - j; // length of decimal number lpl = &szless[0]; strcpy( lpl, lpr ); RTrimDecimal1( lpl ); if( ( strlen( lpl ) ) && ( strlen( lpl ) < i ) && ( GMInStr( lpl, "." ) ) ) { i = strlen( lpl ); k = GMInStr( lpl, "." ); for( j = (i - 1); j > k; j-- ) { c = lpl[j]; if( c == '0' ) { lpl[j] = 0; } else { break; } } if( (strlen(lpl) + 2 ) < strlen(lpr) ) { strcpy( lpr, lpl ); } } j = ( GMInStr( lpr, "." ) + 1 ); } // ============================== // 3rd processing ============== // ============================== i = strlen( lpr ); k = GMInStr( lpr, "." ); if( ( i ) && ( k ) && ( i < 128 ) && ( ( i - k ) > 6 ) ) { // Ok, I specifically want to avoid such things as // 48.000000082 and 47.999999992, etc // Returns LOCATION of DECIMAL k++; // to char AFTER decimal lpl = &szless[0]; j = k; l = 0; // Repeat counter *lpl = 0; for( ; j < i; j++ ) { c = lpr[j]; // Get chars (after DECIMAL POINT) if( c == *lpl ) { l++; // Count SAMENESS } else { if( l > 5 ) { // we have HAD 5 of these chars // ============================ l++; // Bump for FIRST of these lpl = &lpr[ ( j - l ) ]; // Get FIRST c = *lpl; // Get FIRST *lpl = 0; lpl--; // Back one more l++; // count one more back before the zero created if( *lpl == '.' ) { l++; // Count one more *lpl = 0; lpl--; } if( c >= '5' ) { for( j = (j - l); j >= 0; j-- ) { if( ( j ) && ( lpr[j] == '.' ) ) { // backed up to the DECIMAL lpr[j] = 0; // Kill it j--; // back one if( lpr[j] < '9' ) { c = lpr[j]; c++; lpr[j] = c; break; // all done here } else if( lpr[j] == '9' ) { lpr[j] = '0'; // bump to next } else { break; // a NON-NUMBER or "."!!! } } else if( lpr[j] < '9' ) { c = lpr[j]; c++; lpr[j] = c; break; // All done here } else if( lpr[j] == '9' ) { lpr[j] = '0'; // bump to next } else { break; } } // for a BACKWARDS count // SPECIAL CASE // ============ if( j < 0 ) { // Ok, we must INSERT a "1" lpl = &szless[0]; strcpy( lpl, lpr ); strcpy( lpr, "1" ); strcat( lpr, lpl ); } } // if ROUNDING-UP required. break; } l = 0; } *lpl = c; } } // if it contains ".", and is greater than 6 places } } // Dbl2Str Dbl2Stg DbltoStg void Double2Stg( LPSTR lps, double factor ) { int decimal, sign, precision; char * buffer; precision = 16; buffer = _ecvt( factor, precision, &decimal, &sign ); Buffer2Stg( lps, buffer, decimal, sign, precision ); } /* ======================================================= void Dbl2Stg( LPSTR lps, double factor, int prec ) if( prec ) precision = prec; else precision = 16; buffer = _ecvt( factor, precision, &decimal, &sign ); Buffer2Stg( lps, buffer, decimal, sign, precision ); ======================================================= */ void Dbl2Stg( LPSTR lps, double factor, int prec ) { int decimal, sign, precision; char * buffer; if( prec ) precision = prec; else precision = 16; buffer = _ecvt( factor, precision, &decimal, &sign ); Buffer2Stg( lps, buffer, decimal, sign, precision ); } int sprintf3( char * cp, char * fp, DWORD siz ) { int ilen, i, j, k; char buf[64]; ilen = sprintf( buf, fp, siz ); // format it to a buffer strcpy( cp, buf ); i = strlen(buf); if(i) { j = 0; k = i - 1; while( ( i >= 0 ) && ( k >= 0 ) ) { i--; if( buf[i] <= ' ' ) break; if( j == 3 ) { cp[k--] = ','; j = 0; } cp[k--] = buf[i]; j++; } } return ilen; } LPTSTR GetI64Stg2( LARGE_INTEGER li ) { static TCHAR _s_buf[ (64 + 16) ]; static _s_ii = 0; LPTSTR lps; TCHAR buf[32]; int i,j,k; sprintf(buf, "%I64d", li.QuadPart ); if( _s_ii ) { lps = &_s_buf[(32+8)]; _s_ii =0; } else { lps = &_s_buf[0]; _s_ii =1; } *lps = 0; // clear any previous i = strlen(buf); // get its length if( i ) // get its length { k = 32; j = 0; lps[k+1] = 0; // esure ZERO termination while( ( i > 0 ) && ( k >= 0 ) ) { i--; // back up one if( j == 3 ) // have we had a set of 3? { lps[k--] = ','; // ok, add a comma j = 0; // and restart count of digits } lps[k--] = buf[i]; // move the buffer digit j++; } k++; // back to LAST position lps = &lps[k]; // pointer to beginning of 'nice" number } return lps; } LPTSTR GetDWStg2( DWORD dwi ) { LARGE_INTEGER li; li.LowPart = dwi; li.HighPart = 0; return( GetI64Stg2(li) ); } /////////////////////////////////////////////////////////// #endif // eof - dircab.c // eof - Dump4Cab.c
8df80bd355f88e1ae83dd0db09861cb5d112a7b8
a2906a46f4f3126bd23c63132534eacc46dd8535
/C/list strings/ex3.c
de3a6c01f84e5661228c6067a56e6cfb5a4df3d3
[ "MIT" ]
permissive
JohnOliver23/activities-of-the-second-period
7155bad1d021ef8db56436520fc2cbe2b04aae29
92ebb12198c3be3d06686f5dc7159b3d6d5e4162
refs/heads/master
2021-09-07T17:06:17.233703
2018-02-26T15:22:07
2018-02-26T15:22:07
105,382,384
0
1
null
null
null
null
ISO-8859-1
C
false
false
618
c
ex3.c
#include <stdio.h> #include <string.h> int main(){ int i; char string1[200], string2[50], string3[10]="acabou"; for(i=0;i<1;i++){//for q pega a primeira palavra printf("digite uma palavra :"); gets(string2); strcpy(string1,string2); } for(i=0;strcmp(string2, string3)!=0;i++){//for de concatenação das strings printf("digite uma palavra"); gets(string2); if(strcmp(string2, string3)==0){ continue; } strcat(string1, " "); strcat(string1, string2); } printf("voce digitou %d pavavras\n", i); printf("a frase montada ficou \n%s", string1); return 0; }
4d36006c8bfa7d653fa5f2f6409896d0406e8d08
45604c5e2bcfd581b1f122a1a7102ea9c20eeb9f
/lib/cc_timer.c
cbd5f118c238dbe8a2f4f175b4f885c6f3a6d2b5
[]
no_license
wqlxx/c_controller_reconstruct
c83c4374d44b52c8139b300fd76f4e5a462a6ad3
377aa9e32e5b9321c1d55fed35fbf400b526b8a8
refs/heads/master
2016-09-05T17:03:34.723513
2013-06-06T13:22:56
2013-06-06T13:22:56
null
0
0
null
null
null
null
UTF-8
C
false
false
1,772
c
cc_timer.c
/* * cc_time functions. * * Author: qiang wang <wqlxx@yahoo.com.cn> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "cc_timer.h" #define CC_CONVERT 1000000 /* * return 0: it's not timeout * return 1: it's timeout * TO check whether the timer is out of deadline */ int cc_timer_check(struct timeval* start_tv, struct timeval* now_tv) { long sec_; long usec_; long time_; sec_ = now_tv->tv_sec - start_tv->tv_sec; usec_ = now_tv->tv_usec - start_tv->tv_usec; time_ = sec_ + usec_/CC_CONVERT; if( time_ > CC_ECHO_MAX_INTERVAL ) return CC_ERROR; return CC_SUCCESS; } /* *param: tv come from the xid table *TO write down the time call this function.and set as the begin time for a xid. *next time it got the same xid and we can use it as a value to check whether it is timeout */ int cc_timer_start(struct timeval* tv) { int ret; ret = gettimeofday(tv,NULL); if( ret == -1) return CC_ERROR; return CC_SUCCESS; } /* *param: tv come from the xid table *TO expire the begin time of a xid, and set it as zero */ int cc_timer_expire(struct timeval* tv) { tv->tv_sec = 0; tv->tv_usec = 0; return CC_SUCCESS; }
c2e5d10f78abd9a4d41c64c0f14329492fe34ef4
ccb6d2726b7522af43004875e2e233bc1088774a
/carma/szaslalib/dh2e.cc
4aa3e2e7aa23c0d618e3c1665dd1e3275640c65b
[ "FSFUL" ]
permissive
mpound/carma
a9ab28ed45b3114972d3f72bcc522c0010e80b42
9e317271eec071c1a53dca8b11af31320f69417b
refs/heads/master
2020-06-01T11:43:47.397953
2019-06-07T15:05:57
2019-06-07T15:05:57
190,763,870
2
0
null
null
null
null
UTF-8
C
false
false
2,273
cc
dh2e.cc
#include "slalib.h" #include "slamac.h" void slaDh2e ( double az, double el, double phi, double *ha, double *dec ) /* ** - - - - - - - - ** s l a D h 2 e ** - - - - - - - - ** ** Horizon to equatorial coordinates: Az,El to HA,Dec ** ** (double precision) ** ** Given: ** az double azimuth ** el double elevation ** phi double observatory latitude ** ** Returned: ** *ha double hour angle ** *dec double declination ** ** Notes: ** ** 1) All the arguments are angles in radians. ** ** 2) The sign convention for azimuth is north zero, east +pi/2. ** ** 3) HA is returned in the range +/-pi. Declination is returned ** in the range +/-pi/2. ** ** 4) The is latitude is (in principle) geodetic. In critical ** applications, corrections for polar motion should be applied. ** ** 5) In some applications it will be important to specify the ** correct type of elevation in order to produce the required ** type of HA,Dec. In particular, it may be important to ** distinguish between the elevation as affected by refraction, ** which will yield the "observed" HA,Dec, and the elevation ** in vacuo, which will yield the "topocentric" HA,Dec. If the ** effects of diurnal aberration can be neglected, the ** topocentric HA,Dec may be used as an approximation to the ** "apparent" HA,Dec. ** ** 6) No range checking of arguments is done. ** ** 7) In applications which involve many such calculations, rather ** than calling the present routine it will be more efficient to ** use inline code, having previously computed fixed terms such ** as sine and cosine of latitude. ** ** Last revision: 21 February 1996 ** ** Copyright P.T.Wallace. All rights reserved. */ { double sa, ca, se, ce, sp, cp, x, y, z, r; /* Useful trig functions */ sa = sin ( az ); ca = cos ( az ); se = sin ( el ); ce = cos ( el ); sp = sin ( phi ); cp = cos ( phi ); /* HA,Dec as x,y,z */ x = - ca * ce * sp + se * cp; y = - sa * ce; z = ca * ce * cp + se * sp; /* To spherical */ r = sqrt ( x * x + y * y ); *ha = ( r == 0.0 ) ? 0.0 : atan2 ( y, x ) ; *dec = atan2 ( z, r ); }
30ef850b51225b72458e1b6bbc08caebe7fc80f3
ef2844b35cf499a1db0faa210979afa11e94691b
/GPIB USB Adapter/GPIB USB 1.cydsn/settings.h
5b18e0b9b0f329807506cc56bdf167e7b268d81d
[]
no_license
essele/yaugi
b7dfa89fcb74d1dfbcfb3cf468dc77347610a96c
2108243b39b47a4370b38f9bc01b8f851b09b2e7
refs/heads/master
2020-08-21T17:23:25.316150
2019-10-27T14:50:55
2019-10-27T14:50:55
216,206,474
10
0
null
null
null
null
UTF-8
C
false
false
888
h
settings.h
/**** * YAUGI -- Yet Another USB GPIB Interface * * Lee Essen, 2019 * * This work is licensed under a Creative Commons * Attribution-NonCommercial-ShareAlike 4.0 International License. * */ #include "project.h" struct settings { uint32_t signature; uint16_t version; uint16_t address; // target GPIB address uint16_t autoread; // automatic reading uint16_t eoi; // use EOI signal when sending uint16_t eos; // send terminators after each GPIB output uint16_t eot_char; uint16_t eot_enable; uint16_t read_tmo_ms; // read timeout in ms // Extra settings... uint16_t interact; // 0 = non-interactive, 1 = interactive }; extern struct settings settings; int settings_init(); /* [] END OF FILE */
435229968e43788bf64393a33ee1946368e141cf
8ecbbba9d733a6e23e7dc7454412014707d1a2a8
/kernel/io/vga.c
9083fea6fdc2ed092e703b863c8f833b54a479c4
[]
no_license
AndrewBastin/teapot-os
2b420a15dea8e25affd7ebc82baa23bbfc91954f
ce30c982f6d3b59b9cda06b6bfc7f96f585f09d1
refs/heads/master
2021-05-24T14:56:32.425053
2020-04-06T21:10:57
2020-04-11T04:00:32
253,615,542
1
0
null
null
null
null
UTF-8
C
false
false
629
c
vga.c
#include "vga.h" #define VRAM 0xB8000 #define TM_WIDTH 80 #define TM_HEIGHT 25 void textmode_print(char *str, enum TTY_COLOR bg, enum TTY_COLOR fg, unsigned short x, unsigned short y) { volatile char *vram = (volatile char *) (VRAM + (y * TM_WIDTH * 2) + (x * 2)); char color = (bg << 4) | fg; while (*str != '\0') { *vram++ = *str++; *vram++ = color; } } // TODO : Rewrite this with a memcpy implementation to be faster void textmode_clrscr() { volatile char *vram = (volatile char *) VRAM; int i = 0; while (i < TM_WIDTH * TM_HEIGHT) { *vram++ = '\0'; *vram++ = 0x0; i++; } }
a2c2ceb29196f402558fc2191188a9fcc3d80e73
e4032a4907a207643cc4a1253cb8ab40121a79ee
/Middlewares/Third_Party/Marlin/thermistortable_1.h
0e5ebb3af1772ec6c314fe768551ab20bf674942
[]
no_license
makerbase-mks/MKS-Robin-Nano-Firmware
7d2b462e2fc759dd245395f8bbba2e55fb2eb670
b346a1f3b6d3296b8efee87e06c92da504b5c0c3
refs/heads/Nano-firmware-v2.x.x
2022-01-18T23:03:44.396988
2022-01-15T06:54:10
2022-01-15T06:54:10
241,003,307
29
22
null
2020-07-13T09:21:22
2020-02-17T02:26:33
Assembly
UTF-8
C
false
false
3,167
h
thermistortable_1.h
/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ // 100k bed thermistor const short temptable_1[][2] PROGMEM = { { OV( 23), 300-TEMPER_OFFSET }, { OV( 25), 295-TEMPER_OFFSET }, { OV( 27), 290-TEMPER_OFFSET }, { OV( 28), 285-TEMPER_OFFSET }, { OV( 31), 280-TEMPER_OFFSET }, { OV( 33), 275-TEMPER_OFFSET }, { OV( 35), 270-TEMPER_OFFSET }, { OV( 38), 265-TEMPER_OFFSET }, { OV( 41), 260-TEMPER_OFFSET }, { OV( 44), 255-TEMPER_OFFSET }, { OV( 48), 250-TEMPER_OFFSET }, { OV( 52), 245-TEMPER_OFFSET }, { OV( 56), 240-TEMPER_OFFSET }, { OV( 61), 235-TEMPER_OFFSET }, { OV( 66), 230-TEMPER_OFFSET }, { OV( 71), 225-TEMPER_OFFSET }, { OV( 78), 220-TEMPER_OFFSET }, { OV( 84), 215-TEMPER_OFFSET }, { OV( 92), 210-TEMPER_OFFSET }, { OV( 100), 205-TEMPER_OFFSET }, { OV( 109), 200-TEMPER_OFFSET }, { OV( 120), 195-TEMPER_OFFSET }, { OV( 131), 190-TEMPER_OFFSET }, { OV( 143), 185-TEMPER_OFFSET }, { OV( 156), 180-TEMPER_OFFSET }, { OV( 171), 175-TEMPER_OFFSET }, { OV( 187), 170-TEMPER_OFFSET }, { OV( 205), 165-TEMPER_OFFSET }, { OV( 224), 160-TEMPER_OFFSET }, { OV( 245), 155-TEMPER_OFFSET }, { OV( 268), 150-TEMPER_OFFSET }, { OV( 293), 145-TEMPER_OFFSET }, { OV( 320), 140-TEMPER_OFFSET }, { OV( 348), 135-TEMPER_OFFSET }, { OV( 379), 130-TEMPER_OFFSET }, { OV( 411), 125-TEMPER_OFFSET }, { OV( 445), 120-TEMPER_OFFSET }, { OV( 480), 115-TEMPER_OFFSET }, { OV( 516), 110-TEMPER_OFFSET }, { OV( 553), 105-TEMPER_OFFSET }, { OV( 591), 100-TEMPER_OFFSET }, { OV( 628), 95-TEMPER_OFFSET }, { OV( 665), 90-TEMPER_OFFSET }, { OV( 702), 85-TEMPER_OFFSET }, { OV( 737), 80-TEMPER_OFFSET }, { OV( 770), 75-TEMPER_OFFSET }, { OV( 801), 70-TEMPER_OFFSET }, { OV( 830), 65-TEMPER_OFFSET}, { OV( 857), 60-TEMPER_OFFSET }, { OV( 881), 55-TEMPER_OFFSET }, { OV( 903), 50-TEMPER_OFFSET }, { OV( 922), 45-TEMPER_OFFSET }, { OV( 939), 40-TEMPER_OFFSET }, { OV( 954), 35-TEMPER_OFFSET }, { OV( 966), 30-TEMPER_OFFSET }, { OV( 977), 25-TEMPER_OFFSET }, { OV( 985), 20-TEMPER_OFFSET }, { OV( 993), 15-TEMPER_OFFSET }, { OV( 999), 10-TEMPER_OFFSET }, { OV(1004), 5-TEMPER_OFFSET }, { OV(1008), 0-TEMPER_OFFSET }, { OV(1012), -5-TEMPER_OFFSET }, { OV(1016), -10-TEMPER_OFFSET }, { OV(1020), -15-TEMPER_OFFSET } };
d32805c28048a5c11d6244b8155c258f68f8c6ba
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/darwin-xnu/bsd/kern/extr_kern_resource.c_proc_limitblock.c
bd9f6650bc5d4a6ab3f8fed13dd30253d732ae0d
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,035
c
extr_kern_resource.c_proc_limitblock.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ typedef struct TYPE_5__ TYPE_1__ ; /* Type definitions */ typedef TYPE_1__* proc_t ; struct TYPE_5__ {int p_lflag; int /*<<< orphan*/ p_mlock; int /*<<< orphan*/ p_olimit; } ; /* Variables and functions */ int P_LLIMCHANGE ; int P_LLIMWAIT ; int /*<<< orphan*/ msleep (int /*<<< orphan*/ *,int /*<<< orphan*/ *,int /*<<< orphan*/ ,char*,int /*<<< orphan*/ *) ; int /*<<< orphan*/ proc_lock (TYPE_1__*) ; int /*<<< orphan*/ proc_unlock (TYPE_1__*) ; void proc_limitblock(proc_t p) { proc_lock(p); while (p->p_lflag & P_LLIMCHANGE) { p->p_lflag |= P_LLIMWAIT; msleep(&p->p_olimit, &p->p_mlock, 0, "proc_limitblock", NULL); } p->p_lflag |= P_LLIMCHANGE; proc_unlock(p); }
6ed86669be0d4ec93633ecebbacb874589d96a41
c55b55df5061ba6445a33de3220044f225ae73bd
/c02/ex03/ft_str_is_numeric.c
73f5a74d4b96db0655f868b3d3efbfc1bfed10f3
[]
no_license
JMDTol/42basecamp
c751660f8daafef481fabe8aa6ecfea0fae23a48
01a8630a399b4365baca18e8da05260d14012602
refs/heads/main
2023-06-05T13:04:40.353221
2021-06-24T04:27:43
2021-06-24T04:27:43
null
0
0
null
null
null
null
UTF-8
C
false
false
299
c
ft_str_is_numeric.c
int ft_char_is_numeric(char c) { if (c >= '0' && c <= '9') return (1); else return (0); } int ft_str_is_numeric(char *str) { int i; i = 0; while (str[i] != '\0') { if (ft_char_is_numeric(str[i])) { i++; continue ; } else { return (0); break ; } } return (1); }
f1674030e5cdce89f56adc529342df355f60af07
4902391c9fcbab620886c3b0a8dcc3b41fb1806f
/displayMemory.c
f9508ccbe44bae01f0fe7210e21bd73660e166f5
[]
no_license
githubkj/Three-Phase-Display-Firmware
7835dabe329503f291a7ae1fdaa8c937917777e3
a24e2b1d2a502d94dfa4c9cc19444de0c63c84cf
refs/heads/master
2021-01-23T07:55:50.801619
2017-03-28T14:08:00
2017-03-28T14:08:00
86,465,597
0
0
null
2017-03-28T14:08:01
2017-03-28T13:48:52
C
UTF-8
C
false
false
37,373
c
displayMemory.c
#include "displayPosition.h" #include "icon.h" #include "digit.h" #include "OLED.h" #include "PE_Types.h" #include "button.h" #include "text.h" #include "Events.h" #include "display_UART.h" #include <stdbool.h> #include "displayMemory.h" uint16_union modbus_ro_reg_rcv[RO_REG_LEN]; // read only registers controller copy byte modbus_rw_coil_rcv[RW_COIL_LEN/8+1]; // read/write coils controller copy /* Function Prototypes */ static void mainScreenDisplayMemory(void); static void mainMenuDisplayMemory(void); static void userInterfaceDisplayMemory(void); static void systemInterfaceDisplayMemory(void); static void enterPasswordDisplayMemory(void); static void showVersionNumber(int versionNumber, char page, char col); static void aboutMenuDisplayMemory(void); static void alarmDisplayMemory(int alarmPosition); static void coolingSetPointDisplayMemory(void); static void coolingDifferentialDisplayMemory(void); static void heatingSetPointDisplayMemory(void); static void heatingDifferentialDisplayMemory(void); static void highTempAlarmDisplayMemory(void); static void lowTempAlarmDisplayMemory(void); static void tempScaleDisplayMemory(void); static void hysteresisDisplayMemory(void); static void passwordDisplayMemory(void); static void languageDisplayMemory(void); static void doorSmokeAlarmDisplayMemory(void); static void disableSwitchAlarmDisplayMemory(void); static void alarmRelayOutputDisplayMemory(void); static void compressorRestartDelayDisplayMemory(void); static void compressorCurrentDisplayMemory(void); static void systemSettingsDisplayMemory(void); static void currentLimitSettingsDisplayMemory(void); static void malfDeactivateDisplayMemory(void); static void malfActivateDisplayMemory(void); static void hpcFanOnDisplayMemory(void); static void hpcFanOffDisplayMemory(void); static void showWorkingStatus1(void); static void showWorkingStatus2(void); static void showDegree(unsigned char page, unsigned char column); static void showTempReading(int tempReading, unsigned char page, unsigned char column); static void showTimer(const char font[], unsigned char minute, unsigned char second, unsigned char heightInPages, unsigned char widthInRows, unsigned char page, unsigned char column); /* ** =================================================================== ** Method : checkDisplayMemory ** Description : ** ** =================================================================== */ void checkDisplayMemory(void) { if (updateDisplayMemory) { updateDisplayMemory = false; if (refreshScreen) { refreshScreen = false; clearDisplay(); } updateScreen = true; switch (currentPosition.displayLevel) { /******************** Startup Screens **************************/ /* Display Pentair Logo for 1 second at Start-up */ case PENTAIR_ICON_POSITION: showIcon(Pentair_Logo, 128, 4, 2, 0); TI1_pentairIconTimer_Flag = true; break; /* Display All Icons for 1 second at Start-up */ case ICON_ALL_ON_POSITION: displayAllOn(); TI1_iconAllOnTimer_Flag = true; break; /******************** Startup Screens **************************/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ // Main Screen case MAIN_SCREEN_POSITION: mainScreenDisplayMemory(); updateDisplayMemory = true; // update main screen all the time (add a timer later) break; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /******************** Main Menu **************************/ case MAIN_MENU_POSITION: mainMenuDisplayMemory(); break; case USER_INTERFACE_POSITION: userInterfaceDisplayMemory(); break; case SYSTEM_INTERFACE_POSITION: systemInterfaceDisplayMemory(); break; case USER_PASSWORD_POSITION: case SYSTEM_PASSWORD_POSITION: enterPasswordDisplayMemory(); break; case ABOUT_POSITION: aboutMenuDisplayMemory(); break; /******************** Main Menu **************************/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /******************** User Interface **************************/ case COOLING_SET_POINT_POSITION: coolingSetPointDisplayMemory(); break; case COOLING_DIF_POSITION: coolingDifferentialDisplayMemory(); break; case HEATING_SET_POINT_POSITION: heatingSetPointDisplayMemory(); break; case HEATING_DIF_POSITION: heatingDifferentialDisplayMemory(); break; case HIGH_TEMP_ALARM_SP_POSITION: highTempAlarmDisplayMemory(); break; case LOW_TEMP_ALARM_SP_POSITION: lowTempAlarmDisplayMemory(); break; case TEMP_SCALE_POSITION: tempScaleDisplayMemory(); break; case HYSTERESIS_POSITION: hysteresisDisplayMemory(); break; case PASSWORD_POSITION: passwordDisplayMemory(); break; case LANGUAGE_MENU_POSITION: languageDisplayMemory(); break; /******************** User Interface **************************/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /******************** System Interface ************************/ case DOOR_SMOKE_ALARM_POSITION: doorSmokeAlarmDisplayMemory(); break; case DISABLE_SWITCH_POSITION: disableSwitchAlarmDisplayMemory(); break; case ALARM_RELAY_OUTPUT_POSITION: alarmRelayOutputDisplayMemory(); break; case COMPRESSOR_RESTART_DELAY_POSITION: compressorRestartDelayDisplayMemory(); break; case COMPRESSOR_CURRENT_POSITION: compressorCurrentDisplayMemory(); break; // System Settings case DISPLAY_SYS_SETTINGS_MENU_POSITION: systemSettingsDisplayMemory(); break; case CURRENT_LIMIT_SETTINGS_POSITION: currentLimitSettingsDisplayMemory(); break; case MALF_DEACTIVATE_POSITION: malfDeactivateDisplayMemory(); break; case MALF_ACTIVATE_POSITION: malfActivateDisplayMemory(); break; case HPC_FAN_ON_POSITION: hpcFanOnDisplayMemory(); break; case HPC_FAN_OFF_POSITION: hpcFanOffDisplayMemory(); break; /******************** System Interface **************************/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ // Push four buttons at same time case CHECK_ALL_PIXELS: fillDisplay(); TI1_checkPixelsTimer_Flag = true; break; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /******************** Alarms ***********************/ case HIGH_TEMP_ALARM_POSITION: case LOW_TEMP_ALARM_POSITION: case DOOR_ALARM_POSITION: case PHASE_MISSING_ALARM_POSITION: case EVAP_MI_THERMAL_OVERLOAD_ALARM_POSITION: case CONDENSOR_MI_THERMAL_OVERLOAD_ALARM_POSITION: case COMPRESSOR_THERMAL_OVERLOAD_ALARM_POSITION: case OVER_VOLTAGE_ALARM_POSITION: case UNDER_VOLTAGE_ALARM_POSITION: case BAD_BOARD_ALARM_POSITION: case HIGH_PRESSURE_ALARM_POSITION: case LOW_PRESSURE_ALARM_POSITION: case FROST_ALARM_POSITION: case DISABLE_SWITCH_ALARM_POSITION: case COIL_TEMP_SENSOR_FAULT_ALARM_POSITION: case INLET_TEMP_SENSOR_FAULT_ALARM_POSITION: case OUTLET_TEMP_SENSOR_FAULT_ALARM_POSITION: case OVER_CURRENT_ALARM_POSITION: case COMPRESSOR_RESTART_DELAY_COUNT_DOWN_POSITION: case COMPRESSOR_RESTART_DELAY_TIMER_POSITION: alarmDisplayMemory(currentPosition.displayLevel); break; /******************** Alarms ***********************/ default: break; } } } void mainScreenDisplayMemory(void) { /* Probe#1 - #3 */ switch (currentPosition.lineNumber) { case INLET_LINENUM: /* Power */ showIcon(snowFlakeIcon, 14, 2, 4, 0); /* Inlet Temperature Sensor Reading */ showTempReading(modbus_ro_reg_rcv[PROBE_1].ivalue, 1, 110); /* Working Status 1 */ showWorkingStatus1(); /* Working Status 2 */ showWorkingStatus2(); TI1_alarmTimer_Flag = true; break; case OUTLET_LINENUM: // Turn off alarm timer and clear its counter TI1_alarmTimer_Flag = false; TI1_alarmTimer = 0; displayString("Outlet Temp", arial_bold14, 0, 30); showTempReading(modbus_ro_reg_rcv[PROBE_2].ivalue, 3, 105); break; case COIL_LINENUM: // Turn off alarm timer and clear its counter TI1_alarmTimer_Flag = false; TI1_alarmTimer = 0; displayString("Cond Coil Temp", arial_bold14, 0, 20); showTempReading(modbus_ro_reg_rcv[PROBE_3].ivalue, 3, 105); break; default: break; } } void mainMenuDisplayMemory(void) { char *mainMenuItems[] = { " Main Menu ", " User Interface ", " System Interface ", " About " }; displayHighlightedString(mainMenuItems[0], arial_bold14, 0, 0); displayString(mainMenuItems[1], arial14, 2, 0); displayString(mainMenuItems[2], arial14, 4, 0); displayString(mainMenuItems[3], arial14, 6, 0); if (currentPosition.lineNumber%3 == 0) { displayString(" *", arial14, 6, 0); } else { displayString(" *", arial14, (currentPosition.lineNumber%3)*2, 0); } } void enterPasswordDisplayMemory(void) { displayHighlightedString(" Enter Password ", arial_bold14, 0, 0); if (userInput >= 0 && userInput <= 9) { showIntegerLeftAligned(digitCalibriLight4x28, userInput, 4, 28, 3, 65); showIntegerRightAligned(digitCalibriLight4x28, 0, 4, 28, 3, 65); } else { showIntegerLeftAligned(digitCalibriLight4x28, userInput, 4, 28, 3, 35); } } void userInterfaceDisplayMemory(void) { char *userInterfaceItems[] = { " User Interface ", " Cooling Set Point ", " Cooling Differential ", " Heating Set Point ", " Heating Differential ", " High Temp Alarm ", " Low Temp Alarm ", " Temperature Scale ", " Hysteresis ", " Language ", " Passcode enable/disable" }; displayHighlightedString(userInterfaceItems[0], arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: case 2: case 3: displayString(userInterfaceItems[1], arial14, 2, 0); displayString(userInterfaceItems[2], arial14, 4, 0); displayString(userInterfaceItems[3], arial14, 6, 0); break; case 4: case 5: case 6: displayString(userInterfaceItems[4], arial14, 2, 0); displayString(userInterfaceItems[5], arial14, 4, 0); displayString(userInterfaceItems[6], arial14, 6, 0); break; case 7: case 8: case 9: displayString(userInterfaceItems[7], arial14, 2, 0); displayString(userInterfaceItems[8], arial14, 4, 0); displayString(userInterfaceItems[9], arial14, 6, 0); break; case 10: displayString(userInterfaceItems[10], arial14, 2, 0); displayString(" ", arial14, 4, 0); displayString(" ", arial14, 6, 0); break; default: break; } if (currentPosition.lineNumber%3 == 0) { displayString(" *", arial14, 6, 0); } else { displayString(" *", arial14, (currentPosition.lineNumber%3)*2, 0); } } void systemInterfaceDisplayMemory(void) { char *systemInterfaceItems[] = { " System Interface ", " Door/Smoke Alarm ", " Disable Switch ", " Alarm relay output ", " Comp Restart Delay ", " Compressor Current ", " System Settings " }; displayHighlightedString(systemInterfaceItems[0], arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: case 2: case 3: displayString(systemInterfaceItems[1], arial14, 2, 0); displayString(systemInterfaceItems[2], arial14, 4, 0); displayString(systemInterfaceItems[3], arial14, 6, 0); break; case 4: case 5: case 6: displayString(systemInterfaceItems[4], arial14, 2, 0); displayString(systemInterfaceItems[5], arial14, 4, 0); displayString(systemInterfaceItems[6], arial14, 6, 0); break; default: break; } if (currentPosition.lineNumber%3 == 0) { displayString(" *", arial14, 6, 0); } else { displayString(" *", arial14, (currentPosition.lineNumber%3)*2, 0); } } void showVersionNumber(int versionNumber, char page, char col) { char minor = versionNumber & 0xff; char major = (versionNumber & 0xff00) >> 8; displayChar(major, arial14, page, col); displayChar('.', arial14, page, col+8); displayChar(minor, arial14, page, col+16); } void aboutMenuDisplayMemory(void) { displayString(" ECU Hardware:", arial14, 0, 0); showVersionNumber(modbus_ro_reg_rcv[HARDWARE_VERSION].ivalue, 0, 90); displayString(" ECU Firmware:", arial14, 2, 0); showVersionNumber(modbus_ro_reg_rcv[FIRMWARE_VERSION].ivalue, 2, 90); displayString(" DU Hardware:", arial14, 4, 0); showVersionNumber(modbus_wo_reg_snd[DISPLAY_HARDWARE_REV].ivalue, 4, 90); displayString(" DU Firmware:", arial14, 6, 0); showVersionNumber(modbus_wo_reg_snd[DISPLAY_FIRMWARE_REV].ivalue, 6, 90); } void alarmDisplayMemory(int alarmPosition) { switch (alarmPosition) { case HIGH_TEMP_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("High Temp Alarm", arial_bold14, 3, 23); break; case LOW_TEMP_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Low Temp Alarm", arial_bold14, 3, 23); break; case DOOR_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Door/Smoke Alarm", arial_bold14, 3, 25); break; case PHASE_MISSING_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 15); displayString("Phase Missing", arial_bold14, 3, 35); break; case EVAP_MI_THERMAL_OVERLOAD_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 3); displayString("Evaporator Fan", arial_bold14, 2, 23); displayString("Thermal Overload", arial_bold14, 4, 23); break; case CONDENSOR_MI_THERMAL_OVERLOAD_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 3); displayString("Condenser Fan", arial_bold14, 2, 23); displayString("Thermal Overload", arial_bold14, 4, 23); break; case COMPRESSOR_THERMAL_OVERLOAD_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 3); displayString("Compressor", arial_bold14, 2, 23); displayString("Thermal Overload", arial_bold14, 4, 23); break; case OVER_VOLTAGE_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 15); displayString("Over Voltage", arial_bold14, 3, 35); break; case UNDER_VOLTAGE_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 15); displayString("Under Voltage", arial_bold14, 3, 35); break; case BAD_BOARD_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Controller Board", arial_bold14, 2, 25); displayString("Malfunction", arial_bold14, 4, 26); break; case HIGH_PRESSURE_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Unit Malfunction:", arial_bold14, 2, 25); displayString("High Pressure", arial_bold14, 4, 25); break; case LOW_PRESSURE_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 15); displayString("Low Pressure", arial_bold14, 3, 35); break; case FROST_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Frost Detected", arial_bold14, 0, 25); displayString("Compressor and", arial_bold14, 2, 25); displayString("Condenser Fan", arial_bold14, 4, 25); displayString("Disabled", arial_bold14, 6, 25); break; case DISABLE_SWITCH_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 10); displayString("Disable Switch", arial_bold14, 2, 30); displayString("Activated", arial_bold14, 4, 30); break; case COIL_TEMP_SENSOR_FAULT_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Condenser Coil", arial_bold14, 1, 25); displayString("Temp Sensor", arial_bold14, 3, 25); displayString("Malfunction", arial_bold14, 5, 26); break; case INLET_TEMP_SENSOR_FAULT_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Enclosure Inlet", arial_bold14, 1, 25); displayString("Air Temp Sensor", arial_bold14, 3, 25); displayString("Malfunction", arial_bold14, 5, 26); break; case OUTLET_TEMP_SENSOR_FAULT_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 5); displayString("Enclosure Outlet", arial_bold14, 1, 25); displayString("Air Temp Sensor", arial_bold14, 3, 25); displayString("Malfunction", arial_bold14, 5, 26); break; case OVER_CURRENT_ALARM_POSITION: showIcon(attentionIcon, 16, 2, 3, 3); displayString("Compressor", arial_bold14, 2, 23); displayString("Overcurrent Alarm", arial_bold14, 4, 23); break; case COMPRESSOR_RESTART_DELAY_COUNT_DOWN_POSITION: displayString("Restart Delay Active", arial_bold14, 3, 5); break; case COMPRESSOR_RESTART_DELAY_TIMER_POSITION: showTimer(digitCalibriLight4x28, modbus_ro_reg_rcv[COMP_DELAY_TIMER].ivalue/60, modbus_ro_reg_rcv[COMP_DELAY_TIMER].ivalue%60, 4, 28, 2, 5); break; default: break; } // Turn on alarm timer TI1_alarmTimer_Flag = true; } void coolingSetPointDisplayMemory(void) { if (parameterIsSet) { displayString("Cooling set point", arial_bold14, 2, 10); displayString("is set to", arial_bold14, 4, 10); showIntegerLeftAligned(digitCourier2x7, userInput/10, 2, 7, 4, 75); showDegree(4, 100); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Cooling Set Point ", arial_bold14, 0, 0); showTempReading(userInput, 3, 110); } } void coolingDifferentialDisplayMemory(void) { if (parameterIsSet) { displayString("Cooling differential", arial_bold14, 2, 10); displayString("is set to", arial_bold14, 4, 10); showIntegerLeftAligned(digitCourier2x7, userInput/10, 2, 7, 4, 75); showDegree(4, 100); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Cooling Differential ", arial_bold14, 0, 0); showTempReading(userInput, 3, 110); } } void heatingSetPointDisplayMemory(void) { if (parameterIsSet) { displayString("Heating set point", arial_bold14, 2, 10); displayString("is set to", arial_bold14, 4, 10); showIntegerLeftAligned(digitCourier2x7, userInput/10, 2, 7, 4, 75); showDegree(4, 100); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Heating Set Point ", arial_bold14, 0, 0); showTempReading(userInput, 3, 110); } } void heatingDifferentialDisplayMemory(void) { if (parameterIsSet) { displayString("Heating differential", arial_bold14, 2, 10); displayString("is set to", arial_bold14, 4, 10); showIntegerLeftAligned(digitCourier2x7, userInput/10, 2, 7, 4, 75); showDegree(4, 100); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Heating Differential ", arial_bold14, 0, 0); showTempReading(userInput, 3, 110); } } void highTempAlarmDisplayMemory(void) { if (parameterIsSet) { displayString("High temp alarm", arial_bold14, 2, 10); displayString("is set to", arial_bold14, 4, 10); showIntegerLeftAligned(digitCourier2x7, userInput/10, 2, 7, 4, 75); showDegree(4, 100); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" High Temp Alarm ", arial_bold14, 0, 0); showTempReading(userInput, 3, 110); } } void lowTempAlarmDisplayMemory(void) { if (parameterIsSet) { displayString("Low temp alarm", arial_bold14, 2, 10); displayString("is set to", arial_bold14, 4, 10); showIntegerLeftAligned(digitCourier2x7, userInput/10, 2, 7, 4, 75); showDegree(4, 100); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Low Temp Alarm ", arial_bold14, 0, 0); showTempReading(userInput, 3, 110); } } void tempScaleDisplayMemory(void) { if (parameterIsSet) { switch (currentPosition.lineNumber) { case 1: displayString("Set to degree F ", arial_bold14, 3, 15); break; case 2: displayString("Set to degree C ", arial_bold14, 3, 15); break; default: break; } TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Temperature Scale ", arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: displayString(" * Fahrenheit", arial14, 2, 0); displayString(" Celsius", arial14, 4, 0); break; case 2: displayString(" Fahrenheit", arial14, 2, 0); displayString(" * Celsius", arial14, 4, 0); break; default: break; } } } void hysteresisDisplayMemory(void) { if (parameterIsSet) { switch (currentPosition.lineNumber) { case 1: // Positive displayString("Hysteresis: Positive", arial_bold14, 3, 5); break; case 2: // Negative displayString("Hysteresis: Negative", arial_bold14, 3, 5); break; default: break; } TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Hysteresis ", arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: displayString(" * Positive", arial14, 2, 0); displayString(" Negative", arial14, 4, 0); break; case 2: displayString(" Positive", arial14, 2, 0); displayString(" * Negative", arial14, 4, 0); break; default: break; } } } void passwordDisplayMemory(void) { if (parameterIsSet) { if (currentPosition.lineNumber == 2) { displayString(" Passcode for User", arial_bold14, 2, 0); displayString(" Interface is ON", arial_bold14, 4, 0); } else if (currentPosition.lineNumber == 1) { displayString(" Passcode for User", arial_bold14, 2, 0); displayString(" Interface is OFF", arial_bold14, 4, 0); } TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Passcode ", arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: displayString(" * No Passcode", arial14, 2, 0); displayString(" Enable Passcode", arial14, 4, 0); break; case 2: displayString(" No Passcode", arial14, 2, 0); displayString(" * Enable Passcode", arial14, 4, 0); break; default: break; } } } void languageDisplayMemory(void) { char *languageMenuItems[] = { " Language ", " English ", " Chinese ", " French ", " German ", " Italian ", " Polish ", " Spanish " }; displayHighlightedString(languageMenuItems[0], arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: case 2: case 3: displayString(languageMenuItems[1], arial14, 2, 0); displayString(languageMenuItems[2], arial14, 4, 0); displayString(languageMenuItems[3], arial14, 6, 0); break; case 4: case 5: case 6: displayString(languageMenuItems[4], arial14, 2, 0); displayString(languageMenuItems[5], arial14, 4, 0); displayString(languageMenuItems[6], arial14, 6, 0); break; case 7: displayString(languageMenuItems[7], arial14, 2, 0); displayString(" ", arial14, 4, 0); displayString(" ", arial14, 6, 0); break; default: break; } if (currentPosition.lineNumber%3 == 0) { displayString(" *", arial14, 6, 0); } else { displayString(" *", arial14, (currentPosition.lineNumber%3)*2, 0); } } void doorSmokeAlarmDisplayMemory(void) { if (parameterIsSet) { switch (currentPosition.lineNumber) { case 1: // Normally Open displayString(" Door/Smoke Alarm", arial_bold14, 2, 0); displayString(" is Normally Open", arial_bold14, 4, 0); break; case 2: // Normally Close displayString(" Door/Smoke Alarm", arial_bold14, 2, 0); displayString(" is Normally Close", arial_bold14, 4, 0); break; default: break; } TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Door/Smoke Alarm ", arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: displayString(" * Normally Open", arial14, 2, 0); displayString(" Normally Close", arial14, 4, 0); break; case 2: displayString(" Normally Open", arial14, 2, 0); displayString(" * Normally Close", arial14, 4, 0); break; default: break; } } } void disableSwitchAlarmDisplayMemory(void) { if (parameterIsSet) { switch (currentPosition.lineNumber) { case 1: // Normally Open displayString(" Disable Switch", arial_bold14, 2, 5); displayString(" is Normally Open", arial_bold14, 4, 5); break; case 2: // Normally Close displayString(" Disable Switch", arial_bold14, 2, 5); displayString(" is Normally Close", arial_bold14, 4, 5); break; default: break; } TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Disable Switch ", arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: displayString(" * Normally Open", arial14, 2, 0); displayString(" Normally Close", arial14, 4, 0); break; case 2: displayString(" Normally Open", arial14, 2, 0); displayString(" * Normally Close", arial14, 4, 0); break; default: break; } } } void alarmRelayOutputDisplayMemory(void) { if (parameterIsSet) { switch (currentPosition.lineNumber) { case 1: // Normally Open displayString("Alarm Relay Output", arial_bold14, 2, 10); displayString("is Normally Open", arial_bold14, 4, 10); break; case 2: // Normally Close displayString("Alarm Relay Output", arial_bold14, 2, 10); displayString("is Normally Close", arial_bold14, 4, 10); break; default: break; } TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Alarm Relay Output ", arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: displayString(" * Normally Open", arial14, 2, 0); displayString(" Normally Close", arial14, 4, 0); break; case 2: displayString(" Normally Open", arial14, 2, 0); displayString(" * Normally Close", arial14, 4, 0); break; default: break; } } } void compressorRestartDelayDisplayMemory(void) { if (parameterIsSet) { displayString("Comp Restart Delay", arial_bold14, 2, 5); showIntegerLeftAligned(digitCourier2x7, userInput/60, 2, 7, 4, 5); displayString("min", arial_bold14, 4, 25); showIntegerLeftAligned(digitCourier2x7, userInput%60, 2, 7, 4, 60); displayString("sec", arial_bold14, 4, 90); TI1_validationScreenTimer_Flag = true; } else { displayHighlightedString(" Comp Restart Delay ", arial_bold14, 0, 0); showTimer(digitCalibriLight4x28, userInput/60, userInput%60, 4, 28, 3, 5); } } void compressorCurrentDisplayMemory(void) { displayHighlightedString(" Compressor Current ", arial_bold14, 0, 0); displayString("Phase 1:", arial_bold14, 2, 2); displayString("Phase 2:", arial_bold14, 4, 2); displayString("Phase 3:", arial_bold14, 6, 2); if (modbus_ro_reg_rcv[PHASE_1_CURRENT].ivalue/10 <= 99) { showIntegerLeftAligned(digitCourier2x7, modbus_ro_reg_rcv[PHASE_1_CURRENT].ivalue/10, 2, 7, 2, 70); displayString("mA", arial_bold14, 2, 100); } else { showIntegerLeftAligned(digitCourier2x7, modbus_ro_reg_rcv[PHASE_1_CURRENT].ivalue/10000, 2, 7, 2, 70); displayString(".", courier7x14, 2, 78); // decimal point showIntegerLeftAligned(digitCourier2x7, (modbus_ro_reg_rcv[PHASE_1_CURRENT].ivalue/10-(modbus_ro_reg_rcv[PHASE_1_CURRENT].ivalue/10/1000)*1000)/100, 2, 7, 2, 85); displayString("A", arial_bold14, 2, 100); } if (modbus_ro_reg_rcv[PHASE_2_CURRENT].ivalue/10 <= 99) { showIntegerLeftAligned(digitCourier2x7, modbus_ro_reg_rcv[PHASE_2_CURRENT].ivalue/10, 2, 7, 4, 70); displayString("mA", arial_bold14, 4, 100); } else { showIntegerLeftAligned(digitCourier2x7, modbus_ro_reg_rcv[PHASE_2_CURRENT].ivalue/10000, 2, 7, 4, 70); displayString(".", courier7x14, 4, 78); // decimal point showIntegerLeftAligned(digitCourier2x7, (modbus_ro_reg_rcv[PHASE_2_CURRENT].ivalue/10-(modbus_ro_reg_rcv[PHASE_2_CURRENT].ivalue/10/1000)*1000)/100, 2, 7, 4, 85); displayString("A", arial_bold14, 4, 100); } if (modbus_ro_reg_rcv[PHASE_3_CURRENT].ivalue/10 <= 99) { showIntegerLeftAligned(digitCourier2x7, modbus_ro_reg_rcv[PHASE_3_CURRENT].ivalue/10, 2, 7, 6, 70); displayString("mA", arial_bold14, 6, 100); } else { showIntegerLeftAligned(digitCourier2x7, modbus_ro_reg_rcv[PHASE_3_CURRENT].ivalue/10000, 2, 7, 6, 70); displayString(".", courier7x14, 6, 78); // decimal point showIntegerLeftAligned(digitCourier2x7, (modbus_ro_reg_rcv[PHASE_3_CURRENT].ivalue/10-(modbus_ro_reg_rcv[PHASE_3_CURRENT].ivalue/10/1000)*1000)/100, 2, 7, 6, 85); displayString("A", arial_bold14, 6, 100); } } void systemSettingsDisplayMemory(void) { char *systemSettingItems[] = { " Display SYS Settings ", " Current limit setting ", " MALF Activate ", " MALF Deactivate ", " HPC Fan ON ", " HPC Fan OFF " }; displayHighlightedString(systemSettingItems[0], arial_bold14, 0, 0); switch (currentPosition.lineNumber) { case 1: case 2: case 3: displayString(systemSettingItems[1], arial14, 2, 0); displayString(systemSettingItems[2], arial14, 4, 0); displayString(systemSettingItems[3], arial14, 6, 0); break; case 4: case 5: displayString(systemSettingItems[4], arial14, 2, 0); displayString(systemSettingItems[5], arial14, 4, 0); displayString(" ", arial14, 6, 0); break; default: break; } if (currentPosition.lineNumber%3 == 0) { displayString(" *", arial14, 6, 0); } else { displayString(" *", arial14, (currentPosition.lineNumber%3)*2, 0); } } void currentLimitSettingsDisplayMemory(void) { displayHighlightedString(" Current limit setting ", arial_bold14, 0, 0); int currentLimit = modbus_ero_reg_rcv[4].ivalue/10; if (currentLimit <= 99) { showIntegerLeftAligned(digitCourier2x7, currentLimit, 2, 7, 3, 30); displayString("mA", arial_bold14, 3, 60); } else { showIntegerLeftAligned(digitCourier2x7, currentLimit/1000, 2, 7, 3, 25); displayString(".", courier7x14, 3, 40); // decimal point showIntegerLeftAligned(digitCourier2x7, (currentLimit-(currentLimit/1000)*1000)/100, 2, 7, 3, 60); displayString("A", arial_bold14, 3, 80); } } void malfDeactivateDisplayMemory(void) { displayHighlightedString(" MALF Deactivate ", arial_bold14, 0, 0); showTempReading(modbus_ero_reg_rcv[MALF_DEACTIVATE].ivalue, 3, 110); } void malfActivateDisplayMemory(void) { displayHighlightedString(" MALF Activate ", arial_bold14, 0, 0); showTempReading(modbus_ero_reg_rcv[MALF_ACTIVATE].ivalue, 3, 110); } void hpcFanOnDisplayMemory(void) { displayHighlightedString(" HPC Fan ON ", arial_bold14, 0, 0); showTempReading(modbus_ero_reg_rcv[HPC_DEACTIVATE].ivalue, 3, 110); } void hpcFanOffDisplayMemory(void) { displayHighlightedString(" HPC Fan OFF ", arial_bold14, 0, 0); showTempReading(modbus_ero_reg_rcv[HPC_ACTIVATE].ivalue, 3, 110); } void showWorkingStatus1(void) { int workingStatus1 = modbus_ro_reg_rcv[WORKING_STATUS_1].ivalue; // workingStatus1 = 0x0; // 0 - Phase Missing if (workingStatus1 & 0x0001) { alarmOutput[PHASE_MISSING] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[PHASE_MISSING] = 0; } // 1 - Evap MI Thermal Overload if (workingStatus1 & 0x0002) { alarmOutput[EVAP_MI_THERMAL_OVERLOAD] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[EVAP_MI_THERMAL_OVERLOAD] = 0; } // 2 - Imbalance Voltage // 3 - Over Voltage if (workingStatus1 & 0x0008) { alarmOutput[OVER_VOLTAGE] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[OVER_VOLTAGE] = 0; } // 4 - Under Voltage if (workingStatus1 & 0x0010) { alarmOutput[UNDER_VOLTAGE] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[UNDER_VOLTAGE] = 0; } // 5 - Door/Smoke Alarm if (workingStatus1 & 0x0020) { alarmOutput[DOOR_SMOKE] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[DOOR_SMOKE] = 0; } // 6 - Coil Temp Sensor Fault if (workingStatus1 & 0x0040) { alarmOutput[COIL_TEMP_SENSOR_FAULT] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[COIL_TEMP_SENSOR_FAULT] = 0; } // 7 - Low Pressure Alarm if (workingStatus1 & 0x0080) { alarmOutput[LOW_PRESSURE] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[LOW_PRESSURE] = 0; } // 8 - Compressor Thermal Overload if (workingStatus1 & 0x0100) { showIcon(bellIcon, 14, 2, 6, 15); alarmOutput[COMPRESSOR_THERMAL_OVERLOAD] = 1; } else { alarmOutput[COMPRESSOR_THERMAL_OVERLOAD] = 0; } // 9 - Bad Board if (workingStatus1 & 0x0200) { showIcon(bellIcon, 14, 2, 6, 15); alarmOutput[BAD_BOARD] = 1; } else { alarmOutput[BAD_BOARD] = 0; } // 10 - Reverse Relay On // 11 - High Pressure Alarm if (workingStatus1 & 0x0800) { showIcon(bellIcon, 14, 2, 6, 15); alarmOutput[HIGH_PRESSURE] = 1; } else { alarmOutput[HIGH_PRESSURE] = 0; } // 12 - Condensor MI Thermal Overload if (workingStatus1 & 0x1000) { showIcon(bellIcon, 14, 2, 6, 15); alarmOutput[CONDENSOR_MI_THERMAL_OVERLOAD] = 1; } else { alarmOutput[CONDENSOR_MI_THERMAL_OVERLOAD] = 0; } // 13 - Forward Relay On // 14 - Inlet Temp Sensor Fault if (workingStatus1 & 0x4000) { showIcon(bellIcon, 14, 2, 6, 15); alarmOutput[INLET_TEMP_SENSOR_FAULT] = 1; } else { alarmOutput[INLET_TEMP_SENSOR_FAULT] = 0; } // 15 - Outlet Temp Sensor Fault if (workingStatus1 & 0x8000) { alarmOutput[OUTLET_TEMP_SENSOR_FAULT] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[OUTLET_TEMP_SENSOR_FAULT] = 0; } } void showWorkingStatus2(void) { int workingStatus2 = modbus_ro_reg_rcv[WORKING_STATUS_2].ivalue; // workingStatus2 = 0; // 0 - Frost Alarm if (workingStatus2 & 0x0001) { alarmOutput[FROST] = 1; // showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[FROST] = 0; } // 1 - Degraded mode // 2 - Probe 2 Present // 3 - Diagnostics Mode // 4 - Low Temp Alarm if (workingStatus2 & 0x0010) { alarmOutput[LOW_TEMP] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[LOW_TEMP] = 0; } // 5 - High Temp Alarm if (workingStatus2 & 0x0020) { alarmOutput[HIGH_TEMP] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[HIGH_TEMP] = 0; } // 6 - Disable Switch Alarm if (workingStatus2 & 0x0040) { alarmOutput[DISABLE_SWITCH_ALARM] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[DISABLE_SWITCH_ALARM] = 0; } // 7 - Over Current if (workingStatus2 & 0x0080) { alarmOutput[OVER_CURRENT] = 1; showIcon(bellIcon, 14, 2, 6, 15); } else { alarmOutput[OVER_CURRENT] = 0; } // 8 - Cooling On if ((workingStatus2 & 0x0100) && modbus_ro_reg_rcv[COMP_DELAY_TIMER].ivalue > 0) { alarmOutput[COMPRESSOR_COUNT_DOWN] = 1; alarmOutput[COMPRESSOR_COUNT_DOWN_TIMER] = 1; } else { alarmOutput[COMPRESSOR_COUNT_DOWN] = 0; alarmOutput[COMPRESSOR_COUNT_DOWN_TIMER] = 0; } // 9 - Not Used // 10 - Not Used // 11 - Not Used // 12 - Heater On if (workingStatus2 & 0x1000) { showIcon(resisterIcon, 14, 2, 6, 34); } else { hideIcon(14, 6, 34); } // 13 - Condensor MI On if (workingStatus2 & 0x2000) { showIcon(condensorIcon, 14, 2, 6, 53); } else { hideIcon(14, 6, 53); } // 14 - Evap MI On if (workingStatus2 & 0x4000) { showIcon(evapIcon, 14, 2, 6, 91); } else { hideIcon(14, 6, 91); } // 15 - Compressor On if (workingStatus2 & 0x8000) { showIcon(compIcon, 14, 2, 6, 110); } else { hideIcon(14, 6, 110); } } void showDegree(unsigned char page, unsigned char column) { if (modbus_rw_coil_rcv[UNIT_OF_MEASURE/8] & UNIT_OF_MEASURE_F) { showIcon(degreeF, 8, 2, page, column); } else { showIcon(degreeC, 8, 2, page, column); } } void showTempReading(int tempReading, unsigned char page, unsigned char column) { if ((tempReading >= 1000) || (tempReading <= -1000)) { showIntegerRightAligned(digitCalibriLight4x28, tempReading/10, 4, 28, page, column); } else { showIntegerRightAligned(digitCalibriLight4x28, tempReading, 4, 28, page, column); showIcon(decimal_point, DECIMAL_POINT_WIDTH, 1, page+3, column-28); } showDegree(page,115); } void showTimer(const char font[], unsigned char minute, unsigned char second, unsigned char heightInPages, unsigned char widthInRows, unsigned char page, unsigned char column) { if (minute >= 100) { minute = 99; } else if (minute <= -1) { minute = 0; } if (second >= 60) { second = 59; } else if (second <= -1) { second = 0; } // Minute showDigit(font, minute/10, heightInPages, widthInRows, page, column); showDigit(font, minute%10, heightInPages, widthInRows, page, column+widthInRows); // : showIcon(decimal_point, DECIMAL_POINT_WIDTH, 1, page, column + widthInRows*2+2); showIcon(decimal_point, DECIMAL_POINT_WIDTH, 1, page+3, column + widthInRows*2+2); // second showDigit(font, second/10, heightInPages, widthInRows, page, column + widthInRows*2+6); showDigit(font, second%10, heightInPages, widthInRows, page, column + widthInRows*3+6); }
1db5019f09dbd2480d2c3e370a722cd124943805
ebd585fdafb22d31fcd6d04b209f81e88d1a2083
/modem_proc/modem/nas/mn/inc/mn.h
c25575ab1dac0b4166bb0b7b513c71f71e488c53
[ "Apache-2.0" ]
permissive
xusl/android-wilhelm
fd28144253cd9d7de0646f96ff27a1f4a9bec6e3
13c59cb5b0913252fe0b5c672d8dc2bf938bb720
refs/heads/master
2018-04-03T21:46:10.195170
2017-04-20T10:17:49
2017-04-20T10:17:49
88,847,837
11
10
null
null
null
null
UTF-8
C
false
false
43,225
h
mn.h
#ifndef mn_h #define mn_h /*=========================================================================== COPYRIGHT INFORMATION Copyright (c) 2001, 2002 QUALCOMM Technologies, Incorporated and its licensors. All Rights Reserved. QUALCOMM Proprietary. Export of this technology or software is regulated by the U.S. Government. Diversion contrary to U.S. law prohibited.. EDIT HISTORY FOR MODULE This section contains comments describing changes made to the module. Notice that changes are listed in reverse chronological order. $PVCSPath: L:/src/asw/MSM5200/mn/vcs/mn.h_v 1.33 17 Jun 2002 16:13:30 rgurumoo $ $Header: //source/qcom/qct/modem/nas/mn/main/latest/inc/mn.h#21 $ $DateTime: 2012/04/04 03:20:44 $ $Author: pmittal $ when who what, where, why -------- --- ---------------------------------------------------------- 26-Mar-2001 VT Added declaration for MN_put_mmi_call_connected_ind() 30-Apr-2001 VT Removed #ifndef FEATURE_TREX_UNIT_TEST, which was enclosing MN function declarations 5/4/01 CD Per CM request, included header files to make mn.h self-contained 5/4/01 CD Changed function protoptype of MN_handle_mmi_abort_cc_req, MN_handle_MNCC_ERR_IND, MN_handle_MNCC_REEST_IND, MN_process_mmi_0_send, MN_process_mmi_1_send, MN_process_mmi_2_send, MN_process_mmi_3_send, MN_process_mmi_mo_end_call_req MN_handle_mmi_check_for_smma_req to correct compile warning C4100 - unreferenced formal parameter 5/9/01 CD Included mn_ss.h 5/15/01 CD Added prototype for EncodeAnsInt() 5/21/01 CD Removed redundant declaration of MN_put_MNCC_SETUP_RES to avoid lint error 6/7/01 CD Changed function name of MN_route_SMS_MMI_to_MN_primitives() to MN_route_UASMS_MMI_to_MN_primitives() Deleted function prototypes for MN_handle_mmi_erase_ram_sm_req() MN_handle_mmi_confidure_SM_storage_req() MN_handle_mmi_read_short_message_req() MN_handle_mmi_submit_sm_from_sim_req() MN_handle_mmi_submit_sm_req() MN_handle_mmi_check_for_smma_req() MN_handle_mmi_abort_sm_req() MN_handle_mmi_sm_command_req() MN_adjust_tpoa_length() MN_put_tpdu_deliver() MN_put_tpdu_status_report() MN_get_free_record() MN_get_free_SIM_record() MN_get_free_SIM_record_quick() MN_get_free_RAM_record() MN_find_replacement() MN_find_replacement_record_in_RAM() MN_compare_sm_type() MN_read_sms_status() MN_write_sms_status() MN_handle_mt_tl_sms() MN_put_mmi_mt_sm_available_ind() MN_put_mmi_sm_status_report_ind() MN_put_mmi_mt_sms_ind() MN_put_mmi_deliver_sm_conf() MN_put_mmi_submit_sm_conf() MN_put_mmi_check_for_smma_conf() Added function prototype for MN_put_uasms_sm_data_ind() MN_put_uasms_sm_report_ind() 6/8/01 CD Added IMH_T header to SMR primitives. Added SM_RL_MEMORY_AVAILABLE_CONF_T and SM_RL_ABORT_SM_REQ_T 7/5/01 CD Added prototype for get_timer_name() 7/12/01 CD Removed CC, SS and SMS data definitions to mn_cc.h, mn_ss.h and mn_sms.h respectively Grouped function protoypes by module (CC/SS/SMS) 7/16/01 CD Added prototype for show_rl_state() 7/17/01 CD Changed function prototype of MN_process_SM_RL_MEM_AVIL_REQ. Passing the primitive is no longer needed 8/01/01 CD Removed include for cc_iei.h. It's now included by mn_cc.h Added include for mn_cm_exp.h 8/07/01 CD Removed function prototypes since they are not being used MN_handle_CM_to_MN_primitives MN_put_MNCC_SETUP_COMPL_RES MN_put_mmi_mt_data_connected_ind MN_put_ss_User_Data 08/16/01 AB Renamed MMI references to CM. 08/21/01 CD Added mnglobal.h 9/5/01 CD Added function prototypes for QXDM logging functions 9/13/01 CD Added function prototype for logging messages 9/18/01 CD Changed function prototype for mn_log_message 10/08/01 AB Change SS primitives function prototype to removed Lint casting error. 10/22/01 CD Removed customer.h. 12/01/01 AB Updated MN_start_ss_timer() prototype per interface changes. 01/22/02 AB Added new MN_whichMultiCallIndex() function prototype. 01/29/02 RG Change the prototype for MN_process_SM_RL_MEM_AVAIL_REQ() routine as a part of giving the UASMS the ability to correlate the Memory Availability Requests with the corresponding responses (the SM_RL_REPORT_IND). 01/28/02 CD Added cm_ss_conf_e_type to MN_put_cm_interrogate_ss_conf() and MN_handle_interrogate_ss_res() Updated Copyright 02/18/02 AB Updated SS Call independent confirmation routine prototype to a new IEI element interfaces changes. 03/12/02 AB Added 4_SEND and 4_X_SEND handler function prototypes used for Explicit call transfer and Call Defleection, respectively. 04/08/02 AB Added following function prototypes: MN_process_MNCC_DEFERRED_IND() MN_put_notify_deferred_ind(), and MN_get_ect_indicator(). 05/06/02 AB Removed unused MM_cm_release_ss_req() function prototypes. 05/31/02 CD Added connection_id as argument to MN_get_bearer_capability_data() 06/03/02 CD Merged in changes from revision 1.28.1.0 In the prototype for MN_disconnect_TCH(), added parameter of type mn_vocoder_ctrl_e_type. 09/04/02 AB Added MN_put_cm_manage_calls_x_conf() function prototype. 09/16/02 AB Added MN_put_MNCC_REL_COMPL_REQ() function prototype. 10/06/02 AB Added MN_process_cm_mo_end_x_call_req() prototype for aborting specific 2nd or subsequence call. 02/02/03 AB Added new function prototype, MN_get_name_indicator(), and MN_get_ccbs_indicator() prototype for processing of SS notify message. 04/04/03 AB Added reject cause value in the MN_put_cm_mo_call_conf(), MN_put_cm_mt_call_end_ind() function. 04/15/03 sbs Added support for Location Services related SS messages 09/10/03 AB Added MN_put_cm_rab_released_ind() function prototype. 09/16/03 AB Added support to release LCS session. 05/03/05 HS Added MN_get_element_length2() to correct element length calculation. 05/10/05 HS Added support for FEATURE_CCBS 07/08/05 HS MN_get_ccbs_indicator() not used anymore. Use MN_get_ccbs_feature() instead. 08/18/05 HS MN_num_of_calls_in_group() added 08/28/06 NR MN_release_invoke_ids() added for clearing invoke ids 01/11/07 NR Adding fix for rejecting multiple USSD with retaining transactin id inspite of invoke id being cleared 04/20/07 NR Adding new function for releasing MO invoke ids ===========================================================================*/ #include "sys_cnst_v.h" #include "sys_type.h" #include "sys_stru_v.h" #include "gs_v.h" #include "mn_cm_exp_v.h" #include "mn_cm.h" #include "mn_uasms_v.h" #include "mn_sms_v.h" #include "mn_cc_v.h" #include "mn_ss_v.h" #ifdef FEATURE_MODEM_HEAP #include "modem_mem.h" #endif /*********************** * Function Prototypes * ***********************/ /*****************************/ /**** Routing functions ****/ /*****************************/ VOID_FUNC MN_handle_MN_messaging(IMH_T *MN_input_primitives); VOID_FUNC MN_handle_CM_to_MN_primitives(IMH_T *CM_to_MN_primitives); VOID_FUNC MN_route_CC_CM_to_MN_primitives(IMH_T *message); VOID_FUNC MN_route_SS_CM_to_MN_primitives(IMH_T *); VOID_FUNC MN_route_SS_to_MN_primitives(IMH_T *); VOID_FUNC MN_route_UASMS_to_MN_primitives(IMH_T *); VOID_FUNC MN_route_SMS_to_MN_primitives(IMH_T *); VOID_FUNC MN_route_CC_to_MN_messages(IMH_T *message); /**********************************/ /**** Call Control functions ****/ /**********************************/ boolean MN_read_multicall_status(void); VOID_FUNC MN_request_mo_call_setup(IMH_T *message); VOID_FUNC MN_process_cm_start_dtmf_req(IMH_T *message); VOID_FUNC MN_process_cm_stop_dtmf_req(IMH_T *message); VOID_FUNC MN_process_cm_0_send(void); VOID_FUNC MN_process_cm_1_send(cm_n_send_req_T *message); VOID_FUNC MN_process_cm_1_x_send(cm_n_x_send_req_T *message); VOID_FUNC MN_process_cm_2_send(cm_n_send_req_T *message); VOID_FUNC MN_process_cm_2_x_send(cm_n_x_send_req_T *message); VOID_FUNC MN_process_cm_3_send(cm_n_send_req_T *message); VOID_FUNC MN_process_cm_4_send(cm_n_send_req_T *pointer); VOID_FUNC MN_process_cm_4_x_send(cm_4_x_send_req_T *pointer); #ifdef FEATURE_CCBS VOID_FUNC MN_process_cm_5_send(cm_5_send_req_T *pointer); #endif /* FEATURE_CCBS */ VOID_FUNC MN_process_cm_mo_end_call_req(void); VOID_FUNC MN_process_cm_mo_end_x_call_req(cm_n_x_send_req_T *message); VOID_FUNC MN_process_cm_mo_user_data_req(IMH_T *message); byte MN_put_USER_USER_DATA_REQ(connection_id_T connection_id); VOID_FUNC MN_put_MNCC_SETUP_RES(connection_id_T connection_id, cm_connected_subaddress_T *connected_subadd_ptr); VOID_FUNC MN_disconnect_TCH(mn_vocoder_ctrl_e_type mn_voc_ctrl); #ifdef FEATURE_DUAL_SIM #error code not present #endif VOID_FUNC MN_put_cm_call_progress_info_ind(connection_id_T connection_id, byte notification_indicator); #ifdef FEATURE_CCBS VOID_FUNC MN_put_cm_ccbs_info_ind (connection_id_T connection_id, boolean ccbs_allowed); VOID_FUNC MN_put_cm_recall_ind (connection_id_T connection_id, byte type); #endif /* FEATURE_CCBS */ VOID_FUNC MN_put_cm_srvcc_ho_complete_ind(connection_id_T connection_id); VOID_FUNC MN_handle_srvcc_ho_complete(IMH_T *message_header); VOID_FUNC MN_put_cm_call_connected_ind(connection_id_T connection_id); VOID_FUNC MN_put_cm_connected_number_ind(connection_id_T connection_id); VOID_FUNC MN_put_cm_manage_calls_conf(boolean call_ss_success, #ifdef FEATURE_DUAL_SIM #error code not present #endif ie_cm_ss_error_T cm_ss_error); VOID_FUNC MN_put_cm_manage_calls_x_conf(connection_id_T connection_id, boolean call_ss_success, ie_cm_ss_error_T cm_ss_error); #ifdef FEATURE_CCBS VOID_FUNC MN_put_cm_erase_cc_entry_conf ( boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_info_T *); VOID_FUNC MN_put_cm_5_send_conf (connection_id_T, cm_5_send_conf_e_type, ie_ccbs_indicator_T *, #ifdef FEATURE_DUAL_SIM #error code not present #endif ie_cm_ss_error_T *); #endif /* FEATURE_CCBS */ VOID_FUNC MN_put_cm_mt_setup_ind(connection_id_T connection_id); VOID_FUNC MN_put_cm_mo_call_conf(connection_id_T connection_id, boolean cm_service_success, cm_bearer_capability_T bearer_capability_1, cm_bearer_capability_T bearer_capability_2, ie_cm_cc_cause_T cc_cause, #ifdef FEATURE_DUAL_SIM #error code not present #endif #if defined(FEATURE_MULTIMEDIA_FALLBACK) || defined(FEATURE_REL6) ie_cm_cc_reject_T *cc_reject, cm_repeat_indicator_T *repeat_indicator_bc, cm_network_cc_capability_T *network_cc_capability #else ie_cm_cc_reject_T *cc_reject #endif ); VOID_FUNC MN_put_cm_mt_call_ind( #ifdef FEATURE_DUAL_SIM #error code not present #endif connection_id_T connection_id); #if defined(FEATURE_MULTIMEDIA_FALLBACK) || defined(FEATURE_REL6) VOID_FUNC MN_handle_cm_mo_modify_req(IMH_T *message); VOID_FUNC MN_handle_cm_mt_modify_res(IMH_T *); VOID_FUNC MN_put_cm_mo_modify_complete_conf(cm_modify_complete_data_T *cm_modify_complete_data); VOID_FUNC MN_put_cm_mt_modify_ind(connection_id_T, MNCC_MODIFY_data_T *); #endif VOID_FUNC MN_put_notify_deferred_ind( connection_id_T connection_id, ie_cm_notify_ss_T *cm_notify_ss_data); VOID_FUNC MN_put_cm_mt_call_ss_ind(connection_id_T connection_id, byte msg_type, ie_cm_notify_ss_T *cm_notify_ss_data, ie_cm_forward_charge_advice_req_T *cm_forward_charge_advice_data); VOID_FUNC MN_put_cm_mt_disc_ind(connection_id_T, ie_cm_cc_cause_T *); VOID_FUNC MN_put_cm_mt_end_call_ind(connection_id_T connection_id, ie_cm_cc_cause_T cm_cc_cause, #ifdef FEATURE_DUAL_SIM #error code not present #endif ie_cm_cc_reject_T *cm_cc_reject); VOID_FUNC MN_put_cm_rab_released_ind( #ifdef FEATURE_DUAL_SIM #error code not present #else void #endif ); VOID_FUNC MN_put_cm_mt_user_data_ind(connection_id_T connection_id, byte user_user_data[MAX_USER_USER_DATA_LENGTH], byte user_user_information_length, byte user_user_protocol_discriminator, boolean more_data, boolean deferred); VOID_FUNC MN_put_cm_congestion_ind(connection_id_T connection_id, byte cause, boolean receiver_ready); VOID_FUNC MN_put_cm_start_dtmf_conf(connection_id_T connection_id, #ifdef FEATURE_DUAL_SIM #error code not present #endif boolean dtmf_success); VOID_FUNC MN_put_cm_stop_dtmf_conf( #ifdef FEATURE_DUAL_SIM #error code not present #else connection_id_T connection_id #endif ); VOID_FUNC MN_put_MNCC_ALERT_REQ(connection_id_T connection_id); VOID_FUNC MN_put_MNCC_CALL_CONF_REQ(boolean negotiation, connection_id_T connection_id, ie_cm_cc_cause_T *cm_cc_cause); VOID_FUNC MN_put_MNCC_CALL_RETRIEVE_REQ(connection_id_T connection_id); VOID_FUNC MN_put_MNCC_DISC_REQ(connection_id_T connection_id, ie_cm_cc_cause_T *cm_cc_cause, ie_cm_cc_invoke_T *cm_cc_invoke); VOID_FUNC MN_put_MNCC_FACILITY_REQ(connection_id_T connection_id, byte components[MAX_COMPONENTS_LENGTH], int components_length, byte ss_version[MAX_SS_VERSION_IND_LENGTH], int ss_version_length); VOID_FUNC MN_put_MNCC_CALL_HOLD_REQ(connection_id_T connection_id); #if defined(FEATURE_MULTIMEDIA_FALLBACK) || defined(FEATURE_REL6) VOID_FUNC MN_put_MNCC_MODIFY_ACCEPT(connection_id_T connection_id, boolean accept); VOID_FUNC MN_put_MNCC_MODIFY_REQ(MNCC_MODIFY_data_T *modify_data_ptr); VOID_FUNC MN_put_MNCC_MODIFY_RES(connection_id_T connection_id, MNCC_MODIFY_data_T *modify_data_ptr); VOID_FUNC MN_get_MNCC_MODIFY_CNF(MNCC_MODIFY_CNF_T *message_ptr, MNCC_MODIFY_data_T *modify_data_ptr); VOID_FUNC MN_get_MNCC_MODIFY_data(int message_position, int message_length, byte *data_ptr, MNCC_MODIFY_data_T *modify_data_ptr, byte * last_octet_data_ptr); VOID_FUNC MN_get_MNCC_MODIFY_IND(MNCC_MODIFY_IND_T *message_ptr, MNCC_MODIFY_data_T *modify_data_ptr); #endif VOID_FUNC MN_put_MNCC_REJ_REQ(connection_id_T connection_id, ie_cm_cc_cause_T *cm_cc_cause); VOID_FUNC MN_put_MNCC_REL_REQ(connection_id_T connection_id, ie_cm_cc_cause_T *cm_cc_cause_1, ie_cm_cc_cause_T *cm_cc_cause_2, int no_of_causes #ifdef FEATURE_CCBS ,ie_facility_T *p_facility #endif /* FEATURE_CCBS */ ); VOID_FUNC MN_put_MNCC_REL_COMPL_REQ(connection_id_T connection_id, byte pd, byte cause, ie_facility_T *p_facility); VOID_FUNC MN_put_MNCC_SETUP_COMPL_REQ(connection_id_T connection_id); VOID_FUNC MN_put_MNCC_SETUP_REQ(connection_id_T connection_id); VOID_FUNC MN_put_MNCC_START_DTMF_REQ(connection_id_T connection_id, byte keypad_information); VOID_FUNC MN_put_MNCC_STOP_DTMF_REQ(connection_id_T connection_id); VOID_FUNC MN_put_MNCC_USER_USER_DATA_REQ(connection_id_T connection_id, ie_user_user_T *ie_user_user_ptr, boolean more_data); VOID_FUNC MN_process_MNCC_USER_DATA_DEFERRED_IND(IMH_T *message_ptr); boolean MN_get_cm_mo_call_req(connection_id_T new_connection_id, IMH_T *message_ptr); VOID_FUNC MN_get_MNCC_CALL_PROC_IND(MNCC_CALL_PROC_IND_T *message_ptr, MNCC_CALL_PROC_data_T *proc_data_ptr); VOID_FUNC MN_get_MNCC_REJ_IND(MNCC_REJ_IND_T *message_ptr, ie_cm_cc_cause_T *cause_data_ptr); VOID_FUNC MN_get_MNCC_REL_CNF(MNCC_REL_CNF_T *message_ptr, ie_cm_cc_cause_T *cm_cc_cause_ptr); int MN_get_MNCC_REL_IND(MNCC_REL_IND_T *message_ptr, ie_cm_cc_cause_T *cause_data_ptr_1, ie_cm_cc_cause_T *cause_data_ptr_2); connection_id_T MN_get_MNCC_SETUP_CNF(MNCC_SETUP_CNF_T *message_ptr); connection_id_T MN_get_MNCC_SETUP_IND(MNCC_SETUP_IND_T *message_ptr); VOID_FUNC MN_get_MNCC_DISC_IND(MNCC_DISC_IND_T *message_ptr, ie_cm_cc_cause_T *cm_cc_cause_ptr, cm_progress_indicator_T *cm_prog_ind_ptr #ifdef FEATURE_CCBS ,ie_cm_allowed_actions_T *allowed_actions_ptr #endif /* FEATURE_CCBS */ ); VOID_FUNC MN_get_MNCC_FACILITY_IND(byte *data_ptr, word message_length, MN_FACILITY_DATA_T *facility_data, byte *last_octet_data_pointer); int MN_get_bearer_capability_data(byte *data_ptr, cm_bearer_capability_T *cm_bearer_capability, connection_id_T connection_id, byte *last_octet_data_ptr); int MN_get_cause_data(byte *data_ptr, ie_cm_cc_cause_T *cm_cc_cause, byte *last_octet_data_ptr); int MN_get_llc_data(byte *data_ptr, cm_low_layer_compatibility_T *cm_low_layer_compatibility, byte *last_octet_data_ptr); int MN_get_hlc_data(byte *data_ptr, cm_high_layer_compatibility_T *cm_high_layer_compatibility, byte *last_octet_data_ptr); #ifdef FEATURE_CCBS void MN_fill_setup_from_mn (cm_mo_normal_call_req_T *msg, byte connection_id); #endif /* FEATURE_CCBS */ boolean MN_put_call_on_hold(connection_id_T connection_id); VOID_FUNC MN_execute_buildmpty_success(MN_FACILITY_DATA_T *facility_data, int component_number); VOID_FUNC MN_execute_buildmpty_error(MN_FACILITY_DATA_T *facility_data, int component_number, byte component_type); VOID_FUNC MN_execute_forward_charge_advice(MN_FACILITY_DATA_T *facility_data_ptr, int component_number); VOID_FUNC MN_execute_holdmpty_success(MN_FACILITY_DATA_T *facility_data, int component_number); VOID_FUNC MN_execute_holdmpty_error(MN_FACILITY_DATA_T *facility_data_ptr, int component_number, byte component_type); VOID_FUNC MN_execute_retrievempty_success(MN_FACILITY_DATA_T *facility_data, int component_number); VOID_FUNC MN_execute_retrievempty_error(MN_FACILITY_DATA_T *facility_data_ptr, int component_number, byte component_type); VOID_FUNC MN_execute_callDeflection_error(MN_FACILITY_DATA_T *facility_data_ptr, int component_number, byte component_type); VOID_FUNC MN_execute_splitmpty_success(MN_FACILITY_DATA_T *facility_data, int component_number); VOID_FUNC MN_execute_splitmpty_error(MN_FACILITY_DATA_T *facility_data_ptr, int component_number, byte component_type); #ifdef FEATURE_CCBS VOID_FUNC MN_execute_accessRegisterCCEntry_success( MN_FACILITY_DATA_T *facility_data, int component_number); VOID_FUNC MN_execute_accessRegisterCCEntry_error( MN_FACILITY_DATA_T *facility_data, int component_number, ie_cm_ss_error_T *cm_ss_error); #endif /* FEATURE_CCBS */ VOID_FUNC MN_connect_TCH(byte information_transfer_capability); boolean MN_call_over(connection_id_T connection_id); boolean MN_compare_bearer_capability(cm_bearer_capability_T *bearer_capability_1, cm_bearer_capability_T *bearer_capability_2, int direction); VOID_FUNC MN_handle_MNCC_ALERT_IND(IMH_T *); VOID_FUNC MN_handle_MNCC_CALL_PROC_IND(IMH_T *message); VOID_FUNC MN_handle_MNCC_DISC_IND(IMH_T *message); VOID_FUNC MN_handle_MNCC_ERR_IND( #ifdef FEATURE_DUAL_SIM #error code not present #else void #endif ); #if defined(FEATURE_MULTIMEDIA_FALLBACK) || defined(FEATURE_REL6) VOID_FUNC MN_handle_MNCC_MODIFY_CNF(IMH_T *message); VOID_FUNC MN_handle_MNCC_MODIFY_IND(IMH_T *message); #endif VOID_FUNC MN_handle_MNCC_NOTIFY_IND(IMH_T *message); VOID_FUNC MN_handle_MNCC_PROGRESS_IND(IMH_T *message); VOID_FUNC MN_handle_MNCC_REEST_IND(void); VOID_FUNC MN_handle_MNCC_REJ_IND(IMH_T *message); VOID_FUNC MN_handle_MNCC_REL_CNF(IMH_T *message); VOID_FUNC MN_handle_MNCC_REL_IND(IMH_T *message); VOID_FUNC MN_handle_MNCC_SYNC_IND(IMH_T *message); VOID_FUNC MN_handle_cm_abort_cc_req(cm_abort_cc_req_T *message_header); VOID_FUNC MN_handle_cm_mt_setup_res(IMH_T *message_header); VOID_FUNC MN_handle_cm_mt_call_res(IMH_T *message_header); #ifdef FEATURE_CCBS VOID_FUNC MN_handle_cm_recall_rsp(IMH_T *message_header); #endif /* FEATURE_CCBS */ VOID_FUNC MN_handle_mt_call_answer(IMH_T *message_header); VOID_FUNC MN_handle_mt_call_setup(IMH_T *message_header); VOID_FUNC MN_process_MNCC_CALL_HOLD_CNF(IMH_T *message); VOID_FUNC MN_process_MNCC_CALL_HOLD_REJ(IMH_T *message); VOID_FUNC MN_process_MNCC_CALL_RETRIEVE_CNF(IMH_T *message); VOID_FUNC MN_process_MNCC_CALL_RETRIEVE_REJ(IMH_T *message); VOID_FUNC MN_process_MNCC_FACILITY_IND(IMH_T *message); VOID_FUNC MN_process_MNCC_NOTIFY_DEFERRED_IND(IMH_T *message_ptr); VOID_FUNC MN_process_MNCC_SETUP_CNF(IMH_T *message); VOID_FUNC MN_process_MNCC_START_DTMF_CNF(IMH_T *message); VOID_FUNC MN_process_MNCC_STOP_DTMF_CNF(IMH_T *message); #ifdef FEATURE_UUS VOID_FUNC MN_process_MNCC_USER_USER_DATA_IND(IMH_T *message); VOID_FUNC MN_process_MNCC_CONGESTION_IND(IMH_T *message); #endif #ifdef FEATURE_CCBS VOID_FUNC MN_process_MNCC_RECALL_IND(IMH_T *message); VOID_FUNC MN_process_MNCC_CC_EST_IND (IMH_T *message); #endif /* FEATURE_CCBS */ int MN_put_bearer_capability(byte *data_ptr, cm_bearer_capability_T *cm_bearer_capability); int MN_put_cause_data(byte *data_ptr, ie_cm_cc_cause_T *cm_cc_cause, byte *last_octet_data_ptr); int MN_put_invoke_cd_data(byte *data_ptr, ie_cm_cc_invoke_T *cm_cc_invoke, byte *last_octet_data_ptr); int MN_put_llc_data(byte *data_ptr, cm_low_layer_compatibility_T *cm_low_layer_compatibility); int MN_put_hlc_data(byte *data_ptr, cm_high_layer_compatibility_T *cm_high_layer_compatibility); boolean MN_manage_CC_auxiliary_state(connection_id_T connection_id, int c_call_event); byte MN_request_invoke_id(byte ss_operation_code); byte MN_retrieve_ss_operation(byte invoke_id, boolean delete_entry); byte MN_retrieve_ss_connection_id(byte invoke_id, boolean delete_entry); VOID_FUNC MN_retrieve_call(byte Multicall_Status_index); boolean MN_reserve_call_object(connection_id_T new_connection_id ); VOID_FUNC MN_clear_call_data(connection_id_T connection_id); VOID_FUNC MN_put_cm_abort_cc_conf( #ifdef FEATURE_DUAL_SIM #error code not present #else void #endif ); return_size_T MN_get_element_length2(byte*, int, int); return_size_T MN_get_element_length(byte *,int, int); byte MN_put_charge_advice(byte *position, charge_advice_data_T *advice); boolean MN_check_for_inband_message(connection_id_T); /********************************************/ /**** Supplementary Services functions ****/ /********************************************/ boolean MN_get_bsg_list(byte *, int *,basic_service_group_list_T *,byte *); boolean MN_get_ff_list(byte *, int *,ie_forwarding_feature_list_T *, byte *last_octet_parameters_buf); #ifdef FEATURE_CCBS boolean MN_get_ccbs_feature (byte *param, int *msg_idx, ie_ccbs_indicator_T *ccbs, byte *last_octet_data_pointer); boolean MN_get_ccbs_list(byte *, int *, ccbs_info_T *, byte *last_octet_parameters_buf); #endif /* FEATURE_CCBS */ boolean MN_get_ft_number(byte *, int *,cm_called_party_bcd_no_T *, int); boolean MN_get_ect_indicator(ie_cm_notify_ss_T *notify_data, byte *parameter_pointer, int *notify_index, byte *last_octet_data_pointer ); boolean MN_get_name_indicator(ie_cm_notify_ss_T *notify_data, byte *parameter_pointer, int *notify_index, byte *last_octet_data_pointer ); #ifndef FEATURE_CCBS boolean MN_get_ccbs_indicator(ie_cm_notify_ss_T *notify_data, byte *parameter_pointer, int *notify_index, byte *last_octet_data_pointer ); #endif VOID_FUNC MN_get_ss_status(ie_ss_status_T *, byte *); boolean MN_release_ci_invoke_id(byte, byte, connection_id_T *,boolean); boolean MN_request_ci_invoke_id(byte *, connection_id_T *, boolean *, byte , byte ); VOID_FUNC MN_select_ss_error(byte, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ie_cm_ss_error_T); VOID_FUNC MN_get_MNSS_BEGIN_IND(MNSS_BEGIN_IND_T *); VOID_FUNC MN_get_MNSS_END_IND(MNSS_END_IND_T *); VOID_FUNC MN_get_MNSS_FACILITY_IND(MNCC_FACILITY_IND_T *); VOID_FUNC MN_get_MNSS_REJ_IND(MNSS_REJ_IND_T *); VOID_FUNC MN_put_cm_interrogate_ss_conf(boolean, byte , #ifdef FEATURE_DUAL_SIM #error code not present #endif cm_ss_conf_e_type, InterrogateSS_Res_T *); #if defined ( FEATURE_CM_MMGPS ) || defined ( FEATURE_CM_LCS ) VOID_FUNC MN_put_cm_lcs_molr_conf(boolean ss_success, byte cm_ss_ref, #ifdef FEATURE_DUAL_SIM #error code not present #endif lcs_molr_res_T *lcs_molr_res); #endif VOID_FUNC MN_put_cm_register_ss_conf(boolean, byte , #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_info_T *); VOID_FUNC MN_put_cm_erase_ss_conf(boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_info_T *); VOID_FUNC MN_put_cm_activate_ss_conf(boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_info_T *); VOID_FUNC MN_put_cm_deactivate_ss_conf(boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_info_T *); VOID_FUNC MN_put_cm_register_password_conf(boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_password_info_T *); VOID_FUNC MN_put_cm_process_unstructured_ss_data_conf(boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_UserData_info_T *); VOID_FUNC MN_put_cm_process_unstructured_ss_conf(boolean, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ss_data_info_T *); VOID_FUNC MN_handle_error(MN_FACILITY_DATA_T *, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif byte); VOID_FUNC MN_handle_invoke(MN_FACILITY_DATA_T * #ifdef FEATURE_DUAL_SIM #error code not present #endif ); VOID_FUNC MN_handle_cm_abort_ss_req(cm_abort_ss_req_T *message); VOID_FUNC MN_handle_cm_activate_ss_req(cm_activate_ss_req_T *); VOID_FUNC MN_handle_cm_deactivate_ss_req(cm_deactivate_ss_req_T *); VOID_FUNC MN_handle_cm_erase_ss_req(cm_erase_ss_req_T *); VOID_FUNC MN_handle_cm_unstructured_ss_res(cm_unstructured_ss_res_T *); VOID_FUNC MN_handle_cm_unstructured_ss_notify_res(cm_unstructured_ss_notify_res_T *); VOID_FUNC MN_handle_cm_process_unstructured_ss_data(cm_process_unstructured_ss_data_T *); VOID_FUNC MN_handle_cm_process_unstructured_ss_req(cm_process_unstructured_ss_req_T *); VOID_FUNC MN_handle_cm_release_ss_req(cm_release_ss_req_T *); VOID_FUNC MN_handle_cm_interrogate_ss_req(cm_interrogate_ss_req_T *); VOID_FUNC MN_handle_cm_register_password_req(cm_register_password_req_T *); VOID_FUNC MN_handle_cm_register_ss_req(cm_register_ss_req_T *); #ifdef FEATURE_UUS VOID_FUNC MN_handle_cm_activate_user_data_req(cm_mo_user_data_req_T *); #endif #if defined ( FEATURE_CM_MMGPS ) || defined ( FEATURE_CM_LCS ) VOID_FUNC MN_handle_cm_lcs_molr_req(cm_lcs_molr_req_T *message_ptr); VOID_FUNC MN_handle_cm_lcs_molr_completed(cm_lcs_molr_compl_T *message_ptr); #endif #ifdef FEATURE_CCBS VOID_FUNC MN_handle_cm_erase_cc_entry_req(cm_erase_cc_entry_req_T *message_ptr); #endif /* FEATURE_CCBS */ VOID_FUNC MN_put_cm_unstructured_ss_ind(byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif uss_data_T *); VOID_FUNC MN_put_cm_unstructured_ss_notify_ind(byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif uss_data_T *); VOID_FUNC MN_put_facility(byte *, ie_facility_T *, byte *last_octet_component_pointer); VOID_FUNC MN_put_invoke(byte *, int, byte, byte, byte *); int MN_put_ss_ForBS(ss_ForBS_T, byte *); VOID_FUNC MN_put_error(ie_cm_ss_error_T, byte, byte *, int, byte *); boolean MN_handle_result(const MN_FACILITY_DATA_T *, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif byte); VOID_FUNC MN_select_cc_cause(byte, byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif ie_cm_cc_cause_T); VOID_FUNC MN_put_reject(ss_reject_T, byte, byte *); int MN_put_registerSS_ARG(byte *, registerSS_ARG_T); #if defined ( FEATURE_CM_MMGPS ) || defined ( FEATURE_CM_LCS ) int MN_put_lcs_molr_ARG(byte *argument, lcs_molr_ARG_T *lcs_molr_ARG); #endif #ifdef FEATURE_CCBS int MN_put_eraseCCEntry_ARG (byte *, cm_erase_cc_entry_req_T *); #endif /* FEATURE_CCBS */ int MN_put_ss_code(byte, byte *); int MN_put_ussd_Res(uss_data_T *, byte *, byte); int MN_put_ussd_Arg(uss_data_T, byte *, byte); VOID_FUNC MN_put_MNSS_END_REQ(connection_id_T, ie_facility_T *); VOID_FUNC MN_put_MNSS_BEGIN_REQ(connection_id_T, ie_facility_T *); VOID_FUNC MN_put_MNSS_FACILITY_REQ(connection_id_T, ie_facility_T *); boolean MN_handle_ss_info(byte *, ss_info_T *, byte *last_octet_parameters_buf); VOID_FUNC MN_execute_ss_notify(MN_FACILITY_DATA_T *, int); VOID_FUNC MN_put_crss_reject(byte, byte, connection_id_T, byte); boolean MN_load_invoke_id(connection_id_T, byte, byte,byte); VOID_FUNC MN_put_cm_get_password_ind(byte, #ifdef FEATURE_DUAL_SIM #error code not present #endif byte); VOID_FUNC MN_put_cm_forward_check_ss_ind( #ifdef FEATURE_DUAL_SIM #error code not present #else void #endif ); int MN_encode_error_parameters(ie_cm_ss_error_T *, byte *); boolean MN_handle_interrogate_ss_res(byte *, cm_ss_conf_e_type *, InterrogateSS_Res_T *, byte *last_octet_parameters_buf); #if defined ( FEATURE_CM_MMGPS ) || defined ( FEATURE_CM_LCS ) boolean MN_handle_lcs_molr_res(byte *param_ptr, lcs_molr_res_T *lcs_molr_res, byte *last_octet_parameters_buf); VOID_FUNC MN_handle_cm_lcs_location_notification_res(cm_lcs_location_notification_res_T *message_ptr); #endif VOID_FUNC MN_handle_cm_get_password_res(cm_get_password_res_T *); VOID_FUNC MN_put_element_length(byte *, int *, int); VOID_FUNC MN_decode_error_parameters(ie_cm_ss_error_T *, MN_FACILITY_DATA_T *); VOID_FUNC MN_put_cm_release_unstructured_ss_ind( #ifdef FEATURE_DUAL_SIM #error code not present #else void #endif ); VOID_FUNC MN_handle_cm_mt_call_ss_res(cm_mt_call_ss_res_T *); VOID_FUNC MN_put_cm_connection_state_ind( #ifdef FEATURE_DUAL_SIM #error code not present #endif boolean); boolean MN_check_for_parallel_SS(connection_id_T); boolean MN_find_associated_invoke_id(byte , byte , byte *); boolean MN_release_ci_invoke_id_end(connection_id_T ); VOID_FUNC MN_release_invoke_ids(connection_id_T ); boolean MN_release_mo_invoke_id(byte, byte, connection_id_T *, boolean); #if defined ( FEATURE_CM_MMGPS ) || defined ( FEATURE_CM_LCS ) VOID_FUNC MN_put_cm_lcs_location_notification_ind(byte invoke_id, #ifdef FEATURE_DUAL_SIM #error code not present #endif location_notification_T *location_notification); #endif /********************************************/ /**** Short Message Services functions ****/ /********************************************/ control_sm_rl_return_data_T MN_control_SMS_RL(connection_id_T connection_id, byte sms_rl_stimulus); VOID_FUNC MN_handle_MNSMS_DATA_IND(IMH_T *message_header); VOID_FUNC MN_handle_MNSMS_ERROR_IND(IMH_T *message_header); VOID_FUNC MN_handle_MNSMS_EST_IND(IMH_T *message_header); VOID_FUNC MN_handle_MNSMS_CPACK_IND(IMH_T *message_header); connection_id_T MN_get_new_sms_connection_id(void); #ifdef FEATURE_DUAL_SIM #error code not present #endif byte MN_get_rl_mo_mr(void); VOID_FUNC MN_get_rp_report(SM_RL_REPORT_REQ_T *); VOID_FUNC MN_get_cp_user_data(connection_id_T connection_id, int message_length, rpdu_T cp_user_data); VOID_FUNC MN_put_rp_ack(byte rel_req, connection_id_T connection_id, SM_RL_REPORT_REQ_T *SM_RL_REPORT_REQ); VOID_FUNC MN_put_rp_error( rp_cause_T rp_cause, connection_id_T connection_id, byte rel_req, SM_RL_REPORT_REQ_T *SM_RL_REPORT_REQ); VOID_FUNC MN_put_uasms_sm_data_ind(SM_RL_DATA_IND_T *SM_RL_DATA_IND); VOID_FUNC MN_put_uasms_sm_report_ind(SM_RL_REPORT_IND_T *SM_RL_REPORT_IND); VOID_FUNC MN_put_uasms_link_control_report_ind ( sms_link_control_mode_T mode, #ifdef FEATURE_DUAL_SIM #error code not present #endif sms_link_control_status_T status); VOID_FUNC MN_process_SM_RL_DATA_REQ(SM_RL_DATA_REQ_T *message_ptr); VOID_FUNC MN_process_SM_RL_MEM_AVAIL_REQ(word short_message_identifier #ifdef FEATURE_DUAL_SIM #error code not present #endif ); VOID_FUNC MN_process_SM_RL_LINK_CONTRL_REQ(SM_RL_LINK_CONTROL_REQ_T *sms_link_control_req); VOID_FUNC MN_put_MNSMS_ABORT_REQ(connection_id_T connection_id, byte cause_value); VOID_FUNC MN_put_MNSMS_DATA_REQ(connection_id_T connection_id, byte *rpdu, byte rpdu_length); VOID_FUNC MN_put_MNSMS_EST_REQ(void); VOID_FUNC MN_put_MNSMS_REL_REQ(connection_id_T connection_id, byte cause_value); char * show_rl_state( byte rl_state ); /***********************************/ /**** Timer control functions ****/ /***********************************/ VOID_FUNC MN_handle_timeouts(IMH_T *message); VOID_FUNC MN_start_cc_timer(connection_id_T connection_id, byte message_IEI); VOID_FUNC MN_start_ss_timer(connection_id_T connection_id, byte invoke_id, milli_secs_T time); VOID_FUNC MN_stop_cc_timer(connection_id_T connection_id); VOID_FUNC MN_stop_ss_timer(byte invoke_id); VOID_FUNC MN_start_sms_timer(connection_id_T , byte); VOID_FUNC MN_stop_sms_timer(connection_id_T , byte); char * get_timer_name(timer_id_T timer_id); /***********************************/ /**** Miscellaneous functions ****/ /***********************************/ byte EncodeAsnInt ( byte *buf_ptr, unsigned long int data); gs_status_T MN_send_message( gs_queue_id_T, void *, boolean ); VOID_FUNC MN_handle_test(IMH_T *message); byte MN_whereami(connection_id_T connection_id); byte MN_whichMultiCallIndex (connection_id_T connection_id); byte MN_num_of_calls_in_group(int group); #ifdef FEATURE_UUS cm_mo_user_data_req_T * MN_alloc_user_data(void); void MN_free_user_data(cm_mo_user_data_req_T *user_data); cm_mo_user_data_req_T * MN_get_user_data(connection_id_T connection_id); void MN_put_user_data(connection_id_T connection_id, cm_mo_user_data_req_T *user_data); #endif /***********************************/ /**** QXDM logging functions ****/ /***********************************/ boolean mn_log_cs_call_setup_info(uint8 connection_id, uint8 call_type, uint8 orig_direction); boolean mn_log_cs_call_release_info(uint8 connection_id, uint8 release_cause); boolean mn_log_cs_call_change_info(uint8 connection_id); boolean mn_log_cs_connection_bc_info(uint8 connection_id, cm_bearer_capability_T bearer_capability); /**************/ /* F3 logging */ /**************/ VOID_FUNC mn_log_message(gs_queue_id_T queue_id,IMH_T *message_p); #define MN_MULTICALL_LOG(toomany_calls) { \ if(toomany_calls) \ MSG_HIGH("MN_read_multicall_status() got too many calls\n",\ 0, 0, 0);} VOID_FUNC MN_flush_queued_dtmf_requests(connection_id_T connection_id); VOID_FUNC MN_handle_ALT_proc_upon_call_release(connection_id_T connection_id #ifdef FEATURE_DUAL_SIM #error code not present #endif ); #ifdef FEATURE_DUAL_SIM #error code not present #endif #if defined(FEATURE_MULTIMEDIA_FALLBACK) || defined(FEATURE_REL6) void mn_store_rab_modify_status(void); #endif void mn_store_rab_status ( void ); byte mn_get_no_auto_answer_on_hold(void); byte mn_get_mt_call_reject_cause(void); byte mn_get_als_itc_aux_speech(void); #endif
499718e41249ee978cab75b2392ae5033d67b7fb
723d71307b7b3dea3d2ff357ca43a22c422624c7
/Show Home BT/OLD/2-BT37/Ver0.0/APP/Source/mcu_config.c
6661f627354be80fb15600d258d93b3be4e201ac
[]
no_license
afusco90/showhome
c4368b87f402b9ef940a75e1a0f83b1ceee9c89c
5851e276339a949150042e7d1a0e37c80188dc29
refs/heads/master
2022-01-06T18:03:22.899616
2018-08-29T06:09:58
2018-08-29T06:09:58
null
0
0
null
null
null
null
WINDOWS-1252
C
false
false
2,750
c
mcu_config.c
/***************************************** * FileName: mcu_config.h * Date: 2016.01.16 * Author: DS.Chin *******************************************/ #include "stm8s003f3p.h" #include "stm8s_bitsdefine.h" #include "system.h" /*++++++++++++++++++++++++++++++++++++++++ + FunctionName: ClkInit +++++++++++++++++++++++++++++++++++++++++*/ static void Clk_Init(void) { CLK_CKDIVR = 0x00; //Fcpu = 16/1 = 16M CLK_SWR = 0xE1; //HSI selected as system clock } /*+++++++++++++++++++++++++++++++++++++++ + FunctionName: GpioInit ++++++++++++++++++++++++++++++++++++++++*/ static void Gpio_Init(void) { /* Tx - PD5*/ PD_DDR |= 0x20; PD_CR1 |= 0x20; /* Rx - PD6 */ PD_DDR &= (~0x40); PD_CR1 |= 0x40; PD_CR2 &= (~0x40); /* Led port - PA3 */ PA_DDR |= 0x08; PA_CR1 |= 0x08; PA_ODR |= 0x08; /* Relay1 port - PD4 */ PD_DDR |= 0x10; PD_CR1 |= 0x10; PD_ODR &= (~0x10); /* Relay2 port -PD3 */ PD_DDR |= 0x08; PD_CR1 |= 0x08; PD_ODR &= (~0x08); /* Key port - PC7 */ PC_DDR &= (~0x80); PC_CR1 |= 0x80; PC_CR2 &= (~0x80); #ifdef TEST_CODE /* test Red port - PC4 */ PC_DDR |= 0x10; PC_CR1 |= 0x10; PC_ODR |= 0x10; /* test Green port - PC5 */ PC_DDR |= 0x20; PC_CR1 |= 0x20; PC_ODR &= (~0x20); #endif } /********************************************************************* * @ Function Name: TIM1_Init * @ Input: None * @Output: None */ static void TIM1_Init(void) { TIM1_CR1 |= 0x80; TIM2_IER = 0x00; TIM1_SR1 = 0x00; TIM1_PSCRH = 0x00; TIM1_PSCRL = 159; //16M/160 Hz = 10 us TIM1_CNTRH = 0; TIM1_CNTRL = 199; //2ms TIM1_ARRH = 0; TIM1_ARRL = 199; TIM1_CR1 |= 0x01; //Timer 4 enable } /*++++++++++++++++++++++++++++++++++++++++++ + FunctionName: UartInit +++++++++++++++++++++++++++++++++++++++++++*/ static void Uart_Init(void) { UART1_SR = 0x00; UART1_BRR2 = 0x02; UART1_BRR1 = 0x68; //115200b/s UART1_CR1 = 0x00; UART1_CR2 = 0x2C; //REN = 1, TEN = 1, RIEN = 1 } /********************************************* * Tim4_Init */ void Tim4_Init(void) { TIM4_PSCR = 0x06; //64·ÖƵ 4us TIM4_ARR = 249; //1ms TIM4_CNTR = 0; TIM4_IER = 0x01; // interrupt enable TIM4_CR1 |= 0x01; } /********************************************** * AD_Init */ void AD_Init(void) { ADC_CSR = 0x04; ADC_CR1 = 0x00; ADC_CR2 = 0x08; ADC_CR3 = 0x00; ADC_CR1 |= 0x01; } /*+++++++++++++++++++++++++++++++++++++++++ + FunctionName: McuConfig ++++++++++++++++++++++++++++++++++++++++++*/ void Mcu_Config(void) { _asm("sim"); //interrupt disable Clk_Init(); Gpio_Init(); TIM1_Init(); Tim4_Init(); Uart_Init(); // AD_Init(); _asm("rim"); //interrupt enable }
d26a913536b6eef94dac70b41a3d7c51e5fed9cd
f6614758d882b63d2c88a68be056697e226b3ee0
/include/csl/csl_version.h
a0516c903662e9e1bb3af96019a1227e8d3a13bc
[]
no_license
gzzaigcn/7inch_hd
1331f633d13d964db4f0bbdd56db9091c195c325
621f14aab0e599613b97c81cf2d49f6398edde88
refs/heads/master
2021-01-21T13:07:34.620343
2014-11-28T11:05:50
2014-11-28T11:05:50
null
0
0
null
null
null
null
UTF-8
C
false
false
912
h
csl_version.h
/* ============================================================================ * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied. * =========================================================================== */ #ifndef _CSL_VERSION_H_ #define _CSL_VERSION_H_ #define CSL_VERSION_ID (0x03000801) /* 0xAABBCCDD -> Arch (AA); API Changes (BB); Major (CC); Minor (DD) */ #define CSL_VERSION_STR "@(#) CSL Revision: 3.00.08.01;" extern void CSL_version3_00_08_01( ); #define CSL_CHIP_ID (0x300) #define CSL_CHIP_STR "Chip: DAVINCI, PG 1.0" extern void CSL_chip64plus(void); static void CSL_versionCheck(void) { CSL_version3_00_08_01(); CSL_chip64plus(); } #endif /* _CSL_VERSION_H_ */
c1bb9d0ae41c8e85f265b24a267ac27f97f92ac7
c3c848ae6c90313fed11be129187234e487c5f96
/VC6PLATSDK/samples/winbase/Cluster/Win2003/MyStorageResource/StdAfx.h
6f84bf1c875994b45487e8763684deb35c218e8a
[]
no_license
timxx/VC6-Platform-SDK
247e117cfe77109cd1b1effcd68e8a428ebe40f0
9fd59ed5e8e25a1a72652b44cbefb433c62b1c0f
refs/heads/master
2023-07-04T06:48:32.683084
2021-08-10T12:52:47
2021-08-10T12:52:47
null
0
0
null
null
null
null
UTF-8
C
false
false
4,515
h
StdAfx.h
////////////////////////////////////////////////////////////////////////////// // // Module Name: // StdAfx.h // // Description: // Project-wide include file. // // Implementation Files: // StdAfx.cpp // ////////////////////////////////////////////////////////////////////////////// #pragma once ////////////////////////////////////////////////////////////////////////////// // Project-wide pragmas ////////////////////////////////////////////////////////////////////////////// #pragma warning( disable : 4127 ) // C4127: conditional expression is constant (BEGIN_COM_MAP) #pragma warning( disable : 4505 ) // C4505: unreferenced local function has been removed #pragma warning( disable : 4514 ) // C4514: unreferenced inline function has been removed #pragma warning( disable : 4701 ) // C4701: local variable 'cchDestCurrent' may be used without having been initialized #pragma warning( disable : 4710 ) // C4710: function not expanded ////////////////////////////////////////////////////////////////////////////// // External Include Files ////////////////////////////////////////////////////////////////////////////// #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0502 #endif #ifndef UNICODE #define UNICODE #endif #pragma warning( push, 3 ) #define _ATL_APARTMENT_THREADED #include <atlbase.h> #include <Windows.h> extern CComModule _Module; #include <atlcom.h> // // These two include files contain all ClusCfg interface definitions and CATIDs. // #include <ClusCfgServer.h> #include <ClusCfgGuids.h> #include <clusapi.h> #include <assert.h> #include <WBemCli.h> // // MyStorageResource.h is generated from MyStorageResource.idl. // #include "MyStorageResource.h" #pragma warning( pop ) #pragma warning( push, 3 ) #include <strsafe.h> #pragma warning( pop ) ////////////////////////////////////////////////////////////////////////////// // Local Includes Files ////////////////////////////////////////////////////////////////////////////// #include "StringUtils.h" #include "resource.h" #include "guids.h" #include "common.h" #include "StringUtils.h" ////////////////////////////////////////////////////////////////////////////// // Define's ////////////////////////////////////////////////////////////////////////////// #ifndef RTL_NUMBER_OF #define RTL_NUMBER_OF(A) (sizeof(A)/sizeof((A)[0])) #endif // // COM Macros to gain type checking. // #if !defined( TypeSafeParams ) #define TypeSafeParams( _interface, _ppunk ) \ IID_##_interface, reinterpret_cast< void ** >( static_cast< _interface ** >( _ppunk ) ) #endif // !defined( TypeSafeParams ) #if !defined( TypeSafeQI ) #define TypeSafeQI( _interface, _ppunk ) \ QueryInterface( TypeSafeParams( _interface, _ppunk ) ) #endif // !defined( TypeSafeQI ) // // Custom error code used by the WMI code. // const HRESULT E_PROPTYPEMISMATCH = HRESULT_FROM_WIN32( ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH ); // // HeapReAlloc does not follow the same rules as the CRT realloc() when // reallocating a NULL pointer. This macro simulates the CRT behavior and // removes the need for the initial alloc of an empty buffer from the code. // #define HEAPREALLOC( _pvMem, _uBytes, _uFlags ) ( ( _pvMem == NULL ) \ ? HeapAlloc( GetProcessHeap(), _uFlags, _uBytes ) \ : HeapReAlloc( GetProcessHeap(), _uFlags, _pvMem, _uBytes ) ) ////////////////////////////////////////////////////////////////////////////// // Globals ////////////////////////////////////////////////////////////////////////////// // // This is the name of the cluster resource type that we use for this sample. // // // TODO: Change this to match your new resource type name. The resource type // display name is localizable and is located in the project's RC file. // #define RESTYPE_NAME L"Physical Disk" // // This is the name of the cluster resource type dll. // // // TODO: Change this to the name of the accompanying resource dll. // #define RESTYPE_DLL_NAME L"clusres.dll" ////////////////////////////////////////////////////////////////////////////// // Function Declarations ////////////////////////////////////////////////////////////////////////////// HRESULT HrSetInitialize( IUnknown * punkIn, IClusCfgCallback * picccIn, LCID lcidIn );
888c7715fd8bc700157bd80be0144455bc369837
055ab0407a4c2a94f3aa13d44b5fa3995f070e70
/riscv-probe/libfemto/include/arch/riscv/stdatomic.h
8672636796e981a95fdbbacaf36d7b9234707b9d
[ "LicenseRef-scancode-bsd-3-clause-jtag" ]
permissive
TianXIA88/UNPU-Emulator
c46e73aa9fe6eb5d1af45a08cf1a436f8c2398fd
6ffdcbe817ec6c04d8fa1bff7e70656cadd7ff97
refs/heads/master
2023-07-30T10:04:56.064846
2021-09-16T07:33:40
2021-09-16T07:33:40
367,066,616
0
1
null
null
null
null
UTF-8
C
false
false
27,173
h
stdatomic.h
// See LICENSE for license details. #pragma once #ifdef __cplusplus extern "C" { #endif /* * We use the GCC implementation of __atomic_is_lock_free */ #define atomic_is_lock_free(obj) \ __atomic_is_lock_free(sizeof(obj), obj) /* * GCC Built-in Atomics (not enabled by default, because they are buggy) */ #if defined(LIBFEMTO_USE_GCC_BUILTINS) #define atomic_flag_test_and_set(obj) \ __atomic_test_and_set(obj, __ATOMIC_SEQ_CST) #define atomic_flag_test_and_set_explicit(obj, order) \ __atomic_test_and_set(obj, order) #define atomic_flag_clear(obj) \ __atomic_test_and_set(obj, __ATOMIC_SEQ_CST) #define atomic_flag_clear_explicit(obj, order) \ __atomic_test_and_set(obj, order) #define atomic_thread_fence(order) \ __atomic_thread_fence(order) #define atomic_signal_fence(order) \ __atomic_signal_fence(order) #define atomic_store(obj, desired) \ __atomic_store_n(obj, desired, __ATOMIC_SEQ_CST) #define atomic_store_explicit(obj, desired, order) \ __atomic_store_n(obj, desired, order) #define atomic_load(obj) \ __atomic_load_n(obj, __ATOMIC_SEQ_CST) #define atomic_load_explicit(obj,order) \ __atomic_load_n(obj,order) #define atomic_exchange(obj, desired) \ __atomic_exchange_n(obj, desired, __ATOMIC_SEQ_CST) #define atomic_exchange_explicit(obj, desired, order) \ __atomic_exchange_n(obj, desired, order) #define atomic_compare_exchange_strong(obj, expected, desired) \ __atomic_compare_exchange_n(obj, expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) #define atomic_compare_exchange_strong_explicit(obj, expected, desired, succ, fail) \ __atomic_compare_exchange_n(obj, expected, desired, 0, succ, fail) #define atomic_compare_exchange_weak(obj, expected, desired) \ __atomic_compare_exchange_n(obj, expected, desired, 1, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) #define atomic_compare_exchange_weak_explicit(obj, expected, desired, succ, fail) \ __atomic_compare_exchange_n(obj, expected, desired, 1, succ, fail) #define atomic_fetch_add(obj, arg) \ __atomic_fetch_add(obj, arg, __ATOMIC_SEQ_CST) #define atomic_fetch_add_explicit(obj, arg, order) \ __atomic_fetch_add(obj, arg, order) #define atomic_fetch_sub(obj, arg) \ __atomic_fetch_sub(obj, arg, __ATOMIC_SEQ_CST) #define atomic_fetch_sub_explicit(obj, arg, order) \ __atomic_fetch_sub(obj, arg, order) #define atomic_fetch_or(obj, arg) \ __atomic_fetch_or(obj, arg, __ATOMIC_SEQ_CST) #define atomic_fetch_or_explicit(obj, arg, order) \ __atomic_fetch_or(obj, arg, order) #define atomic_fetch_xor(obj, arg) \ __atomic_fetch_xor(obj, arg, __ATOMIC_SEQ_CST) #define atomic_fetch_xor_explicit(obj, arg, order) \ __atomic_fetch_xor(obj, arg, order) #define atomic_fetch_and(obj, arg) \ __atomic_fetch_and(obj, arg, __ATOMIC_SEQ_CST) #define atomic_fetch_and_explicit(obj, arg, order) \ __atomic_fetch_and(obj, arg, order) #endif #elif defined(__riscv) /* * atomic_load */ #define __atomic_load_asm(obj, ASM_BARRIER, ASM_ACQUIRE) \ __extension__ ({ \ __typeof__(obj) __obj = (obj); \ __typeof__(*(obj)) __result; \ switch (sizeof(__typeof__(*obj))) { \ case 1: \ __asm__ volatile ( \ ASM_BARRIER "\n" "lb %0, %1\n" ASM_ACQUIRE \ : "=&r"(__result), "+A"(*__obj) \ ); \ break; \ case 2: \ __asm__ volatile ( \ ASM_BARRIER "\n" "lh %0, %1\n" ASM_ACQUIRE \ : "=&r"(__result), "+A"(*__obj) \ ); \ break; \ case 4: \ __asm__ volatile ( \ ASM_BARRIER "\n" "lw %0, %1\n" ASM_ACQUIRE \ : "=&r"(__result), "+A"(*__obj) \ ); \ break; \ case 8: \ if (__riscv_xlen < 64) __builtin_unreachable(); \ __asm__ volatile ( \ ASM_BARRIER "\n" "ld %0, %1\n" ASM_ACQUIRE \ : "=&r"(__result), "+A"(*__obj) \ ); \ break; \ } \ __result; \ }) #define __atomic_load_relaxed(obj) \ __atomic_load_asm(obj, "", "") #define __atomic_load_acquire(obj) \ __atomic_load_asm(obj, "", "fence r,rw") #define __atomic_load_seq_cst(obj) \ __atomic_load_asm(obj, "fence rw,rw", "fence r,rw") #define atomic_load_explicit(obj, order) \ __extension__ ({ \ __typeof__(*(obj)) __result; \ switch (order) { \ case __ATOMIC_ACQUIRE: \ __result = __atomic_load_acquire(obj) ; break; \ case __ATOMIC_SEQ_CST: \ __result = __atomic_load_seq_cst(obj) ; break; \ case __ATOMIC_RELAXED: \ default: \ __result = __atomic_load_relaxed(obj) ; break; \ } \ __result; \ }) #define atomic_load(obj) \ atomic_load_explicit(obj, __ATOMIC_SEQ_CST) /* * atomic_store */ #define __atomic_store_asm(obj, value, ASM_RELEASE) \ __extension__ ({ \ __typeof__(obj) __obj = (obj); \ __typeof__(*(obj)) __value = (value); \ switch (sizeof(__typeof__(*obj))) { \ case 1: \ __asm__ volatile ( \ ASM_RELEASE "\n" "sb %1, %0\n" \ : "+A"(*__obj) : "r"(__value) : "memory" \ ); \ break; \ case 2: \ __asm__ volatile ( \ ASM_RELEASE "\n" "sh %1, %0\n" \ : "+A"(*__obj) : "r"(__value) : "memory" \ ); \ break; \ case 4: \ __asm__ volatile ( \ ASM_RELEASE "\n" "sw %1, %0\n" \ : "+A"(*__obj) : "r"(__value) : "memory" \ ); \ break; \ case 8: \ if (__riscv_xlen < 64) __builtin_unreachable(); \ __asm__ volatile ( \ ASM_RELEASE "\n" "sd %1, %0\n" \ : "+A"(*__obj) : "r"(__value) : "memory" \ ); \ break; \ } \ }) #define __atomic_store_relaxed(obj, value) \ __atomic_store_asm(obj, value, "") #define __atomic_store_release(obj, value) \ __atomic_store_asm(obj, value, "fence rw,w") #define __atomic_store_seq_cst(obj, value) \ __atomic_store_asm(obj, value, "fence rw,w") #define atomic_store_explicit(obj, value, order) \ __extension__ ({ \ switch (order) { \ case __ATOMIC_RELEASE: \ __atomic_store_release(obj, value) ; break; \ case __ATOMIC_SEQ_CST: \ __atomic_store_seq_cst(obj, value) ; break; \ case __ATOMIC_RELAXED: \ default: \ __atomic_store_relaxed(obj, value) ; break; \ } \ }) #define atomic_store(obj, value) \ atomic_store_explicit(obj, value, __ATOMIC_SEQ_CST) /* * atomic_compare_exchange */ #define __atomic_cmpxchg_asm(obj, exp, val, ASM_AQ, ASM_RL) \ __extension__ ({ \ __typeof__(obj) __obj = (obj); \ __typeof__(*(obj)) __exp = (exp); \ __typeof__(*(obj)) __val = (val); \ __typeof__(*(obj)) __result; \ register unsigned int __ret; \ switch (sizeof(__typeof__(*obj))) { \ case 1: \ case 2: \ __builtin_unreachable(); \ break; \ case 4: \ __asm__ volatile ( \ "0: lr.w" ASM_AQ " %0, %2\n" \ " bne %0, %z3, 1f\n" \ " sc.w" ASM_RL " %1, %z4, %2\n" \ " bnez %1, 0b \n" /* always strong */ \ "1:\n" \ : "=&r"(__result), "=&r" (__ret), "+A"(*__obj) \ : "r"(__exp), "r"(__val) \ : "memory" \ ); \ break; \ case 8: \ if (__riscv_xlen < 64) __builtin_unreachable(); \ __asm__ volatile ( \ "0: lr.d" ASM_AQ " %0, %2\n" \ " bne %0, %z3, 1f\n" \ " sc.d" ASM_RL " %1, %z4, %2\n" \ " bnez %1, 0b \n" /* always strong */ \ "1:\n" \ : "=&r"(__result), "=&r" (__ret), "+A"(*__obj) \ : "r"(__exp), "r"(__val) \ : "memory" \ ); \ break; \ } \ __result; \ }) #define __atomic_cmpxchg_relaxed(obj, exp, val) \ __atomic_cmpxchg_asm(obj, exp, val, "", "") #define __atomic_cmpxchg_acquire(obj, exp, val) \ __atomic_cmpxchg_asm(obj, exp, val, ".aq", "") #define __atomic_cmpxchg_release(obj, exp, val) \ __atomic_cmpxchg_asm(obj, exp, val, "", ".rl") #define __atomic_cmpxchg_acq_rel(obj, exp, val) \ __atomic_cmpxchg_asm(obj, exp, val, ".aq", ".rl") #define __atomic_cmpxchg_seq_cst(obj, exp, val) \ __atomic_cmpxchg_asm(obj, exp, val, ".aqrl", ".rl") #define __atomic_cmpxchg_strong(obj, exp, val, succ, fail) \ __extension__ ({ \ __typeof__(*(obj)) __result; \ switch (succ) { \ case __ATOMIC_ACQUIRE: \ case __ATOMIC_CONSUME: /* promote to acquire for now */ \ __result = __atomic_cmpxchg_acquire(obj, exp, val); break; \ case __ATOMIC_RELEASE: \ __result = __atomic_cmpxchg_release(obj, exp, val); break; \ case __ATOMIC_ACQ_REL: \ __result = __atomic_cmpxchg_acq_rel(obj, exp, val); break; \ case __ATOMIC_SEQ_CST: \ __result = __atomic_cmpxchg_seq_cst(obj, exp, val); break; \ case __ATOMIC_RELAXED: \ default: \ __result = __atomic_cmpxchg_relaxed(obj, exp, val); break; \ } \ __result; \ }) #define atomic_compare_exchange_strong(obj, exp, val) \ __atomic_cmpxchg_strong(obj, exp, val, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) #define atomic_compare_exchange_strong_explicit(obj, exp, val, succ, fail) \ __atomic_cmpxchg_strong(obj, exp, val, succ, fail) #define atomic_compare_exchange_weak(obj, exp, val) \ __atomic_cmpxchg_strong(obj, exp, val, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) #define atomic_compare_exchange_weak_explicit(obj, exp, val, succ, fail) \ __atomic_cmpxchg_strong(obj, exp, val, succ, fail) /* * atomic_op template */ #define __atomic_op_asm(AMO_OP, obj, arg, ASM_AQRL) \ __extension__ ({ \ __typeof__(obj) __obj = (obj); \ __typeof__(*(obj)) __arg = (arg); \ __typeof__(*(obj)) __result; \ switch (sizeof(__typeof__(*obj))) { \ case 1: \ case 2: \ __builtin_unreachable(); \ break; \ case 4: \ __asm__ volatile ( \ AMO_OP ".w" ASM_AQRL " %0, %2, %1\n" \ : "=&r"(__result), "+A"(*__obj) \ : "r"(__arg) \ : "memory" \ ); \ break; \ case 8: \ if (__riscv_xlen < 64) __builtin_unreachable(); \ __asm__ volatile ( \ AMO_OP ".d" ASM_AQRL " %0, %2, %1\n" \ : "=&r"(__result), "+A"(*__obj) \ : "r"(__arg) \ : "memory" \ ); \ break; \ } \ __result; \ }) #define __atomic_op_relaxed(op, obj, arg) \ __atomic_op_asm(op, obj, arg, "") #define __atomic_op_acquire(op, obj, arg) \ __atomic_op_asm(op, obj, arg, ".aq") #define __atomic_op_release(op, obj, arg) \ __atomic_op_asm(op, obj, arg, ".rl") #define __atomic_op_acq_rel(op, obj, arg) \ __atomic_op_asm(op, obj, arg, ".aqrl") #define __atomic_op_seq_cst(op, obj, arg) \ __atomic_op_asm(op, obj, arg, ".aqrl") #define __atomic_op(op, obj, arg, order) \ __extension__ ({ \ __typeof__(*(obj)) __result; \ switch (order) { \ case __ATOMIC_ACQUIRE: \ case __ATOMIC_CONSUME: /* promote to acquire for now */ \ __result = __atomic_op_acquire(op, obj, arg); break; \ case __ATOMIC_RELEASE: \ __result = __atomic_op_release(op, obj, arg); break; \ case __ATOMIC_ACQ_REL: \ __result = __atomic_op_acq_rel(op, obj, arg); break; \ case __ATOMIC_SEQ_CST: \ __result = __atomic_op_seq_cst(op, obj, arg); break; \ case __ATOMIC_RELAXED: \ default: \ __result = __atomic_op_relaxed(op, obj, arg); break; \ } \ __result; \ }) /* * atomic_exchange */ #define atomic_exchange(obj, arg) \ __atomic_op("amoswap", obj, arg, __ATOMIC_SEQ_CST) #define atomic_exchange_explicit(obj, arg, order) \ __atomic_op("amoswap", obj, arg, order) /* * atomic_fetch_add */ #define atomic_fetch_add(obj, arg) \ __atomic_op("amoadd", obj, arg, __ATOMIC_SEQ_CST) #define atomic_fetch_add_explicit(obj, arg, order) \ __atomic_op("amoadd", obj, arg, order) /* * atomic_fetch_sub */ #define atomic_fetch_sub(obj, arg) \ __atomic_op("amoadd", obj, -arg, __ATOMIC_SEQ_CST) #define atomic_fetch_sub_explicit(obj, arg, order) \ __atomic_op("amoadd", obj, -arg, order) /* * atomic_fetch_or */ #define atomic_fetch_or(obj, arg) \ __atomic_op("amoor", obj, -arg, __ATOMIC_SEQ_CST) #define atomic_fetch_or_explicit(obj, arg, order) \ __atomic_op("amoor", obj, -arg, order) /* * atomic_fetch_xor */ #define atomic_fetch_xor(obj, arg) \ __atomic_op("amoxor", obj, -arg, __ATOMIC_SEQ_CST) #define atomic_fetch_xor_explicit(obj, arg, order) \ __atomic_op("amoxor", obj, -arg, order) /* * atomic_fetch_and */ #define atomic_fetch_and(obj, arg) \ __atomic_op("amoand", obj, -arg, __ATOMIC_SEQ_CST) #define atomic_fetch_and_explicit(obj, arg, order) \ __atomic_op("amoand", obj, -arg, order) /* * atomic_flag_test_and_set */ #define __atomic_flag_test_and_set_asm(obj, ASM_AQRL) \ __extension__ ({ \ struct atomic_flag* __obj = (obj); \ size_t __shift = (((unsigned long)__obj) & 3) << 3; \ uint32_t *__word = (uint32_t *)(((unsigned long)__obj) & ~3); \ uint32_t __mask = 1 << __shift; \ uint32_t __result; \ __asm__ volatile ( \ "amoor.w" ASM_AQRL " %0, %2, %1\n" \ : "=&r"(__result), "+A"(*__word) \ : "r"(__mask) \ : "memory" \ ); \ ((__result >> __shift) & 0xff); \ }) #define __atomic_flag_test_and_set_relaxed(obj) \ __atomic_flag_test_and_set_asm(obj, "") #define __atomic_flag_test_and_set_acquire(obj) \ __atomic_flag_test_and_set_asm(obj, ".aq") #define __atomic_flag_test_and_set_release(obj) \ __atomic_flag_test_and_set_asm(obj, ".rl") #define __atomic_flag_test_and_set_acq_rel(obj) \ __atomic_flag_test_and_set_asm(obj, ".aqrl") #define __atomic_flag_test_and_set_seq_cst(obj) \ __atomic_flag_test_and_set_asm(obj, ".aqrl") #define __atomic_flag_test_and_set(obj, order) \ __extension__ ({ \ _Bool __result; \ switch (order) { \ case __ATOMIC_ACQUIRE: \ case __ATOMIC_CONSUME: /* promote to acquire for now */ \ __result = __atomic_flag_test_and_set_acquire(obj); break; \ case __ATOMIC_RELEASE: \ __result = __atomic_flag_test_and_set_release(obj); break; \ case __ATOMIC_ACQ_REL: \ __result = __atomic_flag_test_and_set_acq_rel(obj); break; \ case __ATOMIC_SEQ_CST: \ __result = __atomic_flag_test_and_set_seq_cst(obj); break; \ case __ATOMIC_RELAXED: \ default: \ __result = __atomic_flag_test_and_set_relaxed(obj); break; \ } \ __result; \ }) #define atomic_flag_test_and_set_explicit(obj, order) \ __atomic_flag_test_and_set(obj, order) #define atomic_flag_test_and_set(obj, order) \ __atomic_flag_test_and_set(obj, __ATOMIC_SEQ_CST) /* * atomic_flag_clear */ #define __atomic_flag_clear_asm(obj, ASM_AQRL) \ __extension__ ({ \ struct atomic_flag* __obj = (obj); \ size_t __shift = (((unsigned long)__obj) & 3) << 3; \ uint32_t *__word = (uint32_t *)(((unsigned long)__obj) & ~3); \ uint32_t __mask = ~(0xff << __shift); \ uint32_t __result; \ __asm__ volatile ( \ "amoand.w" ASM_AQRL " %0, %2, %1\n" \ : "=&r"(__result), "+A"(*__word) \ : "r"(__mask) \ : "memory" \ ); \ ((__result >> __shift) & 0xff); \ }) #define __atomic_flag_clear_relaxed(obj) \ __atomic_flag_clear_asm(obj, "") #define __atomic_flag_clear_acquire(obj) \ __atomic_flag_clear_asm(obj, ".aq") #define __atomic_flag_clear_release(obj) \ __atomic_flag_clear_asm(obj, ".rl") #define __atomic_flag_clear_acq_rel(obj) \ __atomic_flag_clear_asm(obj, ".aqrl") #define __atomic_flag_clear_seq_cst(obj) \ __atomic_flag_clear_asm(obj, ".aqrl") #define __atomic_flag_clear(obj, order) \ __extension__ ({ \ _Bool __result; \ switch (order) { \ case __ATOMIC_ACQUIRE: \ case __ATOMIC_CONSUME: /* promote to acquire for now */ \ __result = __atomic_flag_clear_acquire(obj); break; \ case __ATOMIC_RELEASE: \ __result = __atomic_flag_clear_release(obj); break; \ case __ATOMIC_ACQ_REL: \ __result = __atomic_flag_clear_acq_rel(obj); break; \ case __ATOMIC_SEQ_CST: \ __result = __atomic_flag_clear_seq_cst(obj); break; \ case __ATOMIC_RELAXED: \ default: \ __result = __atomic_flag_clear_relaxed(obj); break; \ } \ __result; \ }) #define atomic_flag_clear_explicit(obj, order) \ __atomic_flag_clear(obj, order) #define atomic_flag_clear(obj, order) \ __atomic_flag_clear(obj, __ATOMIC_SEQ_CST) /* * atomic_thread_fence */ #define __atomic_thread_fence_asm(order) \ __extension__ ({ \ switch (order) { \ case __ATOMIC_ACQUIRE: \ case __ATOMIC_CONSUME: /* promote to acquire for now */ \ __asm__ volatile ("fence r,rw" ::: "memory"); break; \ case __ATOMIC_RELEASE: \ __asm__ volatile ("fence rw,w" ::: "memory"); break; \ case __ATOMIC_ACQ_REL: /* should be fence.tso */ \ __asm__ volatile ("fence rw,rw" ::: "memory"); break; \ case __ATOMIC_SEQ_CST: \ __asm__ volatile ("fence rw,rw" ::: "memory"); break; \ case __ATOMIC_RELAXED: \ default: \ __asm__ volatile ("" ::: "memory"); break; \ } \ }) #define atomic_thread_fence(order) \ __atomic_thread_fence_asm(order) /* * atomic_signal_fence */ #define atomic_signal_fence(order) \ __asm__ volatile ("" ::: "memory") #endif /* __riscv */ #ifdef __cplusplus } #endif
951c3c8dc7871a51add57f7e7ba5406bca90509b
b78e9b86e36e501c84b20ad5ddd02f059b5ba0ec
/lib_b/implementation.c
fdfc4084d5ec4a774afb0954b97ff6dd302e5fad
[]
no_license
brearleyt/callback-link-issue
63720fbd87d41c5cae76c1461264223192ef4cac
58957d85e1f4899203c71e6a1b156730ba8d6610
refs/heads/main
2023-01-15T20:35:28.907208
2020-11-18T10:40:55
2020-11-18T10:40:55
313,902,229
0
0
null
null
null
null
UTF-8
C
false
false
150
c
implementation.c
#include "lib_b.h" extern void foo(void); extern void bar(void); extern void baz(void); void initialise_b(void) { foo(); bar(); baz(); }
1b9345c475859a13fa31b223e3b0831bf8f8d8fa
dc25b23f8132469fd95cee14189672cebc06aa56
/vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6795/src/drivers/inc/mt_ptp2.h
f1ed42111974c36ac1400a22ee8280a4c5481f6f
[]
no_license
nofearnohappy/alps_mm
b407d3ab2ea9fa0a36d09333a2af480b42cfe65c
9907611f8c2298fe4a45767df91276ec3118dd27
refs/heads/master
2020-04-23T08:46:58.421689
2019-03-28T21:19:33
2019-03-28T21:19:33
171,048,255
1
5
null
2020-03-08T03:49:37
2019-02-16T20:25:00
Java
UTF-8
C
false
false
193
h
mt_ptp2.h
#ifndef __MT_PTP2_H__ #define __MT_PTP2_H__ extern void turn_on_FBB(void); extern void turn_off_FBB(void); extern void turn_on_LO(void); extern void ptp2_init(void); #endif // __MT_PTP2_H__
ee8b45acbf05faddba7cc46858bcfe614c711bdb
f86c2c02df3c9e1e643db598378fe07b6cd1e743
/srcs/ft_display_o.c
99cf2a1fedc58a3f79a24776cfd236d660339c33
[]
no_license
Nono144/ft_printf2
8e8d427d85bc164a7f16b5ea9dd95d3c45905fa1
74f466dc6b73b4cb9f8eaa7037167c324887085e
refs/heads/master
2022-11-12T12:54:55.888118
2020-06-24T07:37:55
2020-06-24T07:37:55
266,251,744
0
0
null
null
null
null
UTF-8
C
false
false
963
c
ft_display_o.c
#include "ft_printf.h" static void ft_display_pound(t_str *str, int l_pound) { if (l_pound != 0) ft_write(1, "0", 1, str); } static int ft_load_pound(t_str *str, char *s_num) { if ((s_num[0] == '\0' && str->precision < 0) || (ft_is_flag(str, '#') && s_num[0] != '0')) return (1); else return (0); } void ft_display_o(t_str *str) { char *s_num; size_t len; int l_pound; ft_get_unum(str); s_num = ft_itoa_o(str); l_pound = ft_load_pound(str, s_num); len = ft_strlen(s_num) + l_pound; if (!ft_is_flag(str, '-') && ft_is_flag(str, '0') && str->precision < 0) ft_display_z(ft_max(str->precision, len), str->width, str); else if (!ft_is_flag(str, '-')) ft_display_g(ft_max(str->precision, len), str->width, str); ft_display_pound(str, l_pound); ft_display_z(len, str->precision, str); ft_write(1, s_num, len - l_pound, str); if (ft_is_flag(str, '-')) ft_display_g(ft_max(str->precision, len), str->width, str); free(s_num); }
b863c8eb690b35e6fdc023420865f93c279e92d1
0ce320f25183c895ed827e68bc22166939e766ef
/Finding max min by array/main.c
bb28befd9643d5d93bf668214bba1197055637ab
[]
no_license
asirhameem/C-Programming
6d1f0c386e7fbeb47fa883001d078257e44a8705
ec80825c36c3ec88dcd353604cf2b6edcd0e154c
refs/heads/master
2022-08-27T12:33:39.283723
2020-05-29T09:30:18
2020-05-29T09:30:18
null
0
0
null
null
null
null
UTF-8
C
false
false
448
c
main.c
#include <stdio.h> #include <stdlib.h> int main() { int a[10],i; printf("enter 10 numbers:"); for(i=0;i<10;i++) { scanf("%d",&a[i]); } int max=0,min=0; for(i=0;i<10;i++) { if(max<a[i]){ max=a[i];} if(min>a[i]) { min=a[i]; } } printf("the maximum value is %d",max); printf("the minimium value is %d",min); return 0; }
0ff8ca163091bc0c5769fdc8abc02a077a7bc6c6
153eaecfe3a9fcce8180d602fb40114904662576
/I2C.C
5d7c1a2cd93014fe0ef575072963da530ce9d4c4
[]
no_license
g2545420172/HT2425
ba741f1914df95b105251862ff73b0159b0aa613
244ca5454c97bd6b1bdb8a2bc55bd46f21e82615
refs/heads/master
2022-02-24T16:08:46.041203
2019-09-12T03:23:24
2019-09-12T03:23:24
null
0
0
null
null
null
null
UTF-8
C
false
false
3,002
c
I2C.C
//************************************************************ // Data : 2019/04/17 // Programmer : Garfield.Lin // Function : I2C // MCU : MSP430G2553IPW28 // Oscillator : Internal DOC 12MHZ // Version : V0.1 // // //**************************************************************** #include "system.h" unsigned char IIC_Buffer[22]; unsigned char CRC8(unsigned char *ptr, unsigned char len,unsigned char key) { unsigned char i; unsigned char crc=0; while(len--!=0) { for(i=0x80; i!=0; i/=2) { if((crc & 0x80) != 0) { crc *= 2; crc ^= key; } else crc *= 2; if((*ptr & i)!=0) crc ^= key; } ptr++; } return(crc); } int I2C_Load_BQ76930 (UINT8 *DataBuffer ,UINT8 Addr, UINT8 Length) { unsigned char CRCInput[2]; unsigned char CRC = 0; int i; I2CReadBytes(Addr, IIC_Buffer, 2 * Length); CRCInput[0] = ADDR_IIC_R; CRCInput[1] = IIC_Buffer[0]; CRC = CRC8(CRCInput, 2, CRC_KEY); if (CRC != IIC_Buffer[1]) { return 1; } else { *DataBuffer = IIC_Buffer[0]; } DataBuffer++; if(Length>1) { for(i = 1; i < Length ; i++) { CRCInput[0] = IIC_Buffer[i*2]; CRC = CRC8(CRCInput, 1, CRC_KEY); if (CRC != IIC_Buffer[i*2+1]) { return 1; } else { *DataBuffer = IIC_Buffer[i*2]; } DataBuffer++; } } return 0; } int I2C_Master_TransmitByte (UINT8 Addr, UINT8 Data) { IIC_Buffer[0] = ADDR_IIC_W; IIC_Buffer[1] = Addr; IIC_Buffer[2] = Data; IIC_Buffer[3] = CRC8(IIC_Buffer, 3, CRC_KEY); //Buffer++; // if(Length>1) // { // for(i = 1; i < Length; i++) // { // data[0] = *Buffer; // IIC_Buffer[i*2+2] = *Buffer; // IIC_Buffer[i*2+3] = CRC8(data, 1, CRC_KEY); // Buffer++; // } // } I2CSendBytes(IIC_Buffer, (2*1 + 2)); return 0; } void I2CSendBytes(unsigned char *DataBuffer, unsigned int ByteCount) { unsigned char i = 0; IIC_Start(); for(i=0;i<ByteCount;i++) { IIC_Send_Byte(*DataBuffer); DataBuffer++; } IIC_Stop(); } int I2CReadBytes(unsigned char targer, unsigned char *DataBuffer, unsigned int ExpectedByteNumber) { u8 i=0; IIC_Start(); IIC_Send_Byte(ADDR_IIC_W); IIC_Send_Byte(targer); delay_us(20); IIC_Start(); IIC_Send_Byte(ADDR_IIC_R); for(i=0;i<ExpectedByteNumber-1;i++) { *DataBuffer =IIC_Read_Byte(ACK); DataBuffer++; } *DataBuffer =IIC_Read_Byte(NACK); IIC_Stop(); return 0; }
9db9ab7eed74733ed3db7e426cafb2aa9daf59f3
83a41274b36562096105f165726653ec93a687d6
/mp3_player/sources/drivers/LCD/LCD/LCD_240x320.c
79891ec54193edd92129a12afc94d570951e8aa1
[]
no_license
pixe1f10w/arm-mp3-player
1ff02e9d064f2372fccbb680f5abb5c8e1757374
bac7e50d6841c5b6783d87b8ac48faeeb17f5a2e
refs/heads/master
2021-01-23T14:04:40.594008
2011-12-01T16:30:16
2011-12-01T16:30:16
35,604,753
0
0
null
null
null
null
UTF-8
C
false
false
29,660
c
LCD_240x320.c
#include "inc/hw_nvic.h" #include "inc/hw_types.h" #include "driverlib/sysctl.h" #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "driverlib/gpio.h" #include "utils_custom_v1_02.h" #include "LCD_240x320.h" #include "font_engine_v1_00.h" #include "font_thai_plugin_v1_02.h" //#include "font_thai_plugin_v1_02.h" // _____________________ // | _______________ | // ||<-- origin in software // || --------- |[] | // || / |[] | // || --------> |[] | // ||_______________|[] | // |<-- LCD's origin (0x0000) // //define TS_ORN_PORTRAIT when your LCD is installed in vertical // ________________ // |<-- LCD's origin (0x0000) = origin in software // ||--------------|| // || || // || ------ || // || / || // || / || // || / || // || ------> || // ||______________|| // | [] [] [] [] [] | // |________________| // // //#define TS_ORN_PORTRAIT // /* #ifdef TS_ORN_PORTRAIT #define TS_SIZE_X 240 #define TS_SIZE_Y 320 #define TS_VAL_ENTRY_MOD 0x0030 #define TS_INS_GRAM_ADX TS_INS_GRAM_HOR_AD #define TS_INS_GRAM_ADY TS_INS_GRAM_VER_AD #define TS_INS_ROW_ADDR_SET TS_INS_HOR_START_AD #define TS_INS_END_ADX TS_INS_HOR_END_AD #define TS_INS_COL_ADDR_SET TS_INS_VER_START_AD #define TS_INS_END_ADY TS_INS_VER_END_AD #else #define TS_SIZE_X 320 #define TS_SIZE_Y 240 #define TS_VAL_ENTRY_MOD 0x0028 #define TS_INS_GRAM_ADX TS_INS_GRAM_VER_AD #define TS_INS_GRAM_ADY TS_INS_GRAM_HOR_AD #define TS_INS_ROW_ADDR_SET TS_INS_VER_START_AD #define TS_INS_END_ADX TS_INS_VER_END_AD #define TS_INS_COL_ADDR_SET TS_INS_HOR_START_AD #define TS_INS_END_ADY TS_INS_HOR_END_AD #endif */ typedef enum { ENG, EXT } font_mode_t; font_mode_t font_mode; unsigned char font_ext_adj = 0; unsigned char print_limit = 0; unsigned int print_limit_len; unsigned short font_color; unsigned short back_color; ts_pos_t offsetx,offsety; ts_pos_t ts_margin_xl = 0; ts_pos_t ts_margin_xr = TS_SIZE_X - 1; ts_pos_t ts_margin_yu = 0; ts_pos_t ts_margin_yl = TS_SIZE_Y - 1; #define TSLCDGetMarginXl() ts_margin_xl #define TSLCDGetMarginXr() ts_margin_xr #define TSLCDGetMarginYu() ts_margin_yu #define TSLCDGetMarginYl() ts_margin_yl void TSLCDCharDisp(char charactor,ts_pos_t sx,ts_pos_t sy,ts_mode_t mode); void display_buf(ts_pos_t sx,ts_pos_t sy,ts_mode_t mode); void TSLCDSetFontColor(unsigned short color) //set text's color { font_color = color; } void TSLCDSetBackColor(unsigned short color) //set back color for TS_MODE_FULL { back_color = color; } void TS_LCD_WRITE_DATA8BIT(unsigned char ucdata) { GPIOPinWrite(TS_LCD_DATA_PORT,TS_LCD_DATA,ucdata) ; } unsigned char TS_LCD_READ_DATA8BIT(void) { return ((unsigned char )(GPIOPinRead(TS_LCD_DATA_PORT,TS_LCD_DATA))); } /***********************/ /* milisecond delay funtion*/ /***********************/ void delay_1ms(unsigned long int microsecond) { SysCtlDelay(((unsigned long )microsecond*(SysCtlClockGet() / (3*1000)))); } void delay_1us(unsigned long int microsecond) { SysCtlDelay(((unsigned long )microsecond*(SysCtlClockGet() / (3*1000000)))); } void delay_us(unsigned long int microsecond) { SysCtlDelay(((unsigned long )microsecond*(SysCtlClockGet() / (3*1000000)))); } void TSLCDOutDat(unsigned short dat) { TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_SET(); TS_LCD_DATA_PORT_OUT(); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT((unsigned char) (dat >> 8)); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT((unsigned char) (dat & 0x00FF)); TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_DATA_PORT_IN() ; } void TSLCDOutDat8(unsigned char dat) //write data to LCD { TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_SET(); TS_LCD_DATA_PORT_OUT(); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT(dat); TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_DATA_PORT_IN() ; } void TSLCDOutDat2(unsigned char high,unsigned char low) { TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_SET(); TS_LCD_DATA_PORT_OUT(); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT(high); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT(low); TS_LCD_WR_SET(); TS_LCD_CS_SET(); //TS_LCD_DATA_PORT_IN() ; } void TSLCDOutIns(unsigned short ins) //write instruction to LCD { TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_CLR(); TS_LCD_DATA_PORT_OUT(); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT((unsigned char) (ins >> 8)); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT((unsigned char) (ins & 0x00FF)); TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_RS_SET(); //TS_LCD_DATA_PORT_IN() ; } void TSLCDOutIns8(unsigned char ins) //write instruction to LCD { TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_CLR(); TS_LCD_DATA_PORT_OUT(); TS_LCD_WR_SET(); TS_LCD_WR_CLR(); TS_LCD_WRITE_DATA8BIT(ins ); TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_RS_SET(); } unsigned short TSLCDInDat(void) //read data from LCD { unsigned short dat; TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_SET(); TS_LCD_DATA_PORT_IN(); //TS_LCD_RD_CLR(); //TS_LCD_RD_SET(); TS_LCD_RD_SET(); TS_LCD_RD_CLR(); dat = (unsigned short)TS_LCD_READ_DATA8BIT(); TS_LCD_RD_SET(); TS_LCD_RD_CLR(); dat = dat<< 8; dat |= (unsigned short)TS_LCD_READ_DATA8BIT(); //delay_1ms(1); TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_RS_SET(); //TS_LCD_DATA_PORT_IN() ; return (dat); } unsigned long TSLCDInDat32(void) //read data from LCD { unsigned long dat; TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_SET(); TS_LCD_DATA_PORT_IN(); //TS_LCD_RD_CLR(); //TS_LCD_RD_SET(); TS_LCD_RD_SET(); TS_LCD_RD_CLR(); dat = (unsigned short)TS_LCD_READ_DATA8BIT() <<24; TS_LCD_RD_SET(); TS_LCD_RD_CLR(); dat |= (unsigned short)TS_LCD_READ_DATA8BIT()<<16; TS_LCD_RD_SET(); TS_LCD_RD_CLR(); dat |= (unsigned short)TS_LCD_READ_DATA8BIT()<<8; TS_LCD_RD_SET(); TS_LCD_RD_CLR(); dat |= (unsigned short)TS_LCD_READ_DATA8BIT(); //delay_1ms(1); TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_RS_SET(); //TS_LCD_DATA_PORT_IN() ; return (dat); } unsigned short TSLCDInIns(void) //read data from LCD { unsigned short ins; TS_LCD_WR_SET(); TS_LCD_CS_SET(); TS_LCD_CS_CLR(); TS_LCD_RS_CLR(); TS_LCD_DATA_PORT_IN(); //TS_LCD_RD_CLR(); //TS_LCD_RD_SET(); TS_LCD_RD_SET(); TS_LCD_RD_CLR(); ins = (unsigned short)TS_LCD_READ_DATA8BIT(); TS_LCD_RD_SET(); TS_LCD_RD_CLR(); ins = ins << 8; ins |= (unsigned short)TS_LCD_READ_DATA8BIT(); //delay_1ms(1); TS_LCD_RD_SET(); TS_LCD_CS_SET(); TS_LCD_RS_SET(); //TS_LCD_DATA_PORT_IN() ; return (ins); } void TSLCDRst(void) //pulse reset signal to LCD { TS_LCD_RST_SET(); delay_1ms(1); TS_LCD_RST_CLR(); delay_1ms(10); TS_LCD_RST_SET(); delay_1ms(50); } void TSLCDInit(void) //initial LCD { TS_LCD_RST_SET(); delay_1ms(1); TS_LCD_RST_CLR(); delay_1ms(10); TS_LCD_RST_SET(); delay_1ms(50); //sleep out TSLCDOutIns8(0x11); delay_1ms(200); /* //normal mode TSLCDOutIns8(0x13); //AP [2:0} TSLCDOutIns8(0xCB); TSLCDOutDat8(0x01); delay_us(1); //power control 1 TSLCDOutIns8(0xC0); TSLCDOutDat8(0x26); TSLCDOutDat8(0x01); //power control 2 TSLCDOutIns8(0xC1); TSLCDOutDat8(0x10); //VCOM control 1 TSLCDOutIns8(0xC5); TSLCDOutDat8(0x16); TSLCDOutDat8(0x28); delay_us(1); //TSLCDOutDat(0x0016); //TSLCDOutDat(0x0028); //GAMA set TSLCDOutIns8(0x26); TSLCDOutDat8(0x01); //possitive Gama correction TSLCDOutIns8(0xE0); TSLCDOutDat8(0x0f); TSLCDOutDat8(0x22); TSLCDOutDat8(0x1b); TSLCDOutDat8(0x01); TSLCDOutDat8(0x08); TSLCDOutDat8(0x01); TSLCDOutDat8(0x49); TSLCDOutDat8(0x41); TSLCDOutDat8(0x3d); TSLCDOutDat8(0x01); TSLCDOutDat8(0x17); TSLCDOutDat8(0x04); TSLCDOutDat8(0x13); TSLCDOutDat8(0x0e); TSLCDOutDat8(0x00); delay_1ms(100); //negative Gama correction TSLCDOutIns8(0xE1); TSLCDOutDat8(0x00); TSLCDOutDat8(0x23); TSLCDOutDat8(0x22); TSLCDOutDat8(0x05); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0x39); TSLCDOutDat8(0x20); TSLCDOutDat8(0x49); TSLCDOutDat8(0x03); TSLCDOutDat8(0x0b); TSLCDOutDat8(0x0b); TSLCDOutDat8(0x33); TSLCDOutDat8(0x37); TSLCDOutDat8(0x0f); delay_1ms(100); //display on //TSLCDOutIns(0x0029); //columm address set TSLCDOutIns8(0x29); TSLCDOutIns8(0x2B); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0xEF); delay_us(100); ///TSLCDOutDat(0x0000); //TSLCDOutDat(0x00EF); //page address set TSLCDOutIns8(0x2A); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); //TSLCDOutDat(0x0000); TSLCDOutDat8(0x01); TSLCDOutDat8(0x3F); delay_1ms(100); TSLCDOutIns8(0x2B); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0xEF); delay_us(100); ///TSLCDOutDat(0x0000); //TSLCDOutDat(0x00EF); //page address set TSLCDOutIns8(0x2A); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); //TSLCDOutDat(0x0000); TSLCDOutDat8(0x01); TSLCDOutDat8(0x3F); delay_1ms(100); //memory access control TSLCDOutIns8(0x36); TSLCDOutDat8(0x08); delay_1ms(1); //TSLCDOutDat(0x00E8); //pixel format TSLCDOutIns8(0x3A); TSLCDOutDat8(0x05); delay_1ms(1); // memory write TSLCDOutIns8(0x2C); */ // // //normal mode TSLCDOutIns8(0x13); //AP [2:0} TSLCDOutIns8(0xCB); TSLCDOutDat8(0x01); //power control 1 TSLCDOutIns8(0xC0); TSLCDOutDat8(0x26); TSLCDOutDat8(0x01); //power control 2 TSLCDOutIns8(0xC1); TSLCDOutDat8(0x10); //VCOM control 1 TSLCDOutIns8(0xC5); TSLCDOutDat8(0x10); TSLCDOutDat8(0x52); delay_us(1); //TSLCDOutDat(0x0016); //TSLCDOutDat(0x0028); //GAMA set TSLCDOutIns8(0x26); TSLCDOutDat8(0x01); //possitive Gama correction TSLCDOutIns8(0xE0); TSLCDOutDat8(0x10); TSLCDOutDat8(0x10); TSLCDOutDat8(0x10); TSLCDOutDat8(0x08); TSLCDOutDat8(0x0e); TSLCDOutDat8(0x06); TSLCDOutDat8(0x42); TSLCDOutDat8(0x28); TSLCDOutDat8(0x36); TSLCDOutDat8(0x03); TSLCDOutDat8(0x0e); TSLCDOutDat8(0x04); TSLCDOutDat8(0x13); TSLCDOutDat8(0x0e); TSLCDOutDat8(0x0c); delay_1ms(100); //negative Gama correction TSLCDOutIns8(0xE1); TSLCDOutDat8(0x0c); TSLCDOutDat8(0x23); TSLCDOutDat8(0x26); TSLCDOutDat8(0x04); TSLCDOutDat8(0x0c); TSLCDOutDat8(0x04); TSLCDOutDat8(0x39); TSLCDOutDat8(0x24); TSLCDOutDat8(0x4b); TSLCDOutDat8(0x03); TSLCDOutDat8(0x0b); TSLCDOutDat8(0x0b); TSLCDOutDat8(0x33); TSLCDOutDat8(0x37); TSLCDOutDat8(0x0f); delay_1ms(100); // // memory order // TSLCDOutIns8(0x36); TSLCDOutIns8(0x00); //display on //TSLCDOutIns(0x0029); //columm address set //TSLCDOutIns8(0x29); TSLCDOutIns8(0x2B); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); TSLCDOutDat8(0xEF); delay_us(100); ///TSLCDOutDat(0x0000); //TSLCDOutDat(0x00EF); //page address set TSLCDOutIns8(0x2A); TSLCDOutDat8(0x00); TSLCDOutDat8(0x00); //TSLCDOutDat(0x0000); TSLCDOutDat8(0x01); TSLCDOutDat8(0x3F); delay_1ms(100); //memory access control TSLCDOutIns8(0x36); TSLCDOutDat8(0xe8); delay_1ms(1); //TSLCDOutDat(0x00E8); //pixel format TSLCDOutIns8(0x3A); TSLCDOutDat8(0x05); //TSLCDOutDat(0x0005); // TSLCDOutIns (TS_INS_RD_DISP_MODE); //display on TSLCDOutIns8(0x29); delay_1ms(10); // memory write TSLCDOutIns8(0x2C); } void TSLCDShowPic(ts_pos_t sx,ts_pos_t ex,ts_pos_t sy,ts_pos_t ey,const unsigned short *pic,ts_mode_t mode) { unsigned long k = 0; unsigned short color; unsigned int x,y; unsigned int i,j; //#ifndef TS_ORN_PORTRAIT if (sx < 0) sx = 0; if (ex > 239) ex = 239; if (sy < 0) sy = 0; if (ey > 319) ey =319; TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sx); TSLCDOutDat(ex); x = ex - sx + 1; TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sy); TSLCDOutDat(ey); y = ey - sy + 1; //#else // if (sx < 0) // sx = 0; //if (ex > 320) //ex = 320; //if (sy < 0) // sy = 0; //if (ey > 219) //ey =219; //TSLCDOutIns(TS_INS_ROW_ADDR_SET); //TSLCDOutDat(sx); //TSLCDOutDat(ex); //x = ex - sx + 1; //TSLCDOutIns(TS_INS_COL_ADDR_SET); //TSLCDOutDat(sy); //TSLCDOutDat(ey); //y = ey - sy + 1; //#endif TSLCDOutIns(TS_INS_MEM_WR); if (mode == TS_MODE_FULL) { for (j=0; j<y; j++) for (i=0; i<x; i++) { TSLCDOutDat(pic[k]); k++; } } else if (mode == TS_MODE_NORMAL) { for (j=0; j<y; j++) for (i=0; i<x; i++) { if (pic[k] == TS_COL_WHITE) { color = TSLCDInDat(); // ignore invalid data color = TSLCDInDat(); TSLCDOutDat(color); } else { TSLCDOutDat(pic[k]); } k++; } } } void TSLCDShowPic2(ts_pos_t sx,ts_pos_t ex,ts_pos_t sy,ts_pos_t ey,const unsigned short *pic,ts_mode_t mode) //show picture from code memory with specific size { unsigned long k = 0; unsigned short color; unsigned int x,y; unsigned int i,j; if (sx < ts_margin_xl) sx = ts_margin_xl; if (ex > ts_margin_xr) ex = ts_margin_xr; if (sy < ts_margin_yu) sy = ts_margin_yu; if (ey > ts_margin_yl) ey = ts_margin_yl; TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sx); //TSLCDOutIns(TS_INS_END_ADX); TSLCDOutDat(ex); //TSLCDOutIns(TS_INS_GRAM_ADX); //TSLCDOutDat(sx); x = ex - sx + 1; //#ifndef TS_ORN_PORTRAIT // sy = TS_SIZE_Y - 1 - sy; // mirror start y address //ey = TS_SIZE_Y - 1 - ey; // mirror end y address //TSLCDOutIns(TS_INS_COL_ADDR_SET); //TSLCDOutDat(ey); ///LCDOutIns(TS_INS_END_ADY); //TSLCDOutDat(sy); //LCDOutIns(TS_INS_GRAM_ADY); //LCDOutDat(sy);//fix from bug of v1_00 //y = sy - ey + 1; //#else // sy = TS_SIZE_Y - 1 - sy; // mirror start y address //ey = TS_SIZE_Y - 1 - ey; // mirror end y address TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sy); //TSLCDOutIns(TS_INS_END_ADY); TSLCDOutDat(ey); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy); y = ey - sy + 1; //#endif TSLCDOutIns(TS_INS_MEM_WR); if (mode == TS_MODE_FULL) { for (j=0; j<y; j++) for (i=0; i<x; i++) { TSLCDOutDat(code2(pic[k])); k++; } } else if (mode == TS_MODE_NORMAL) { for (j=0; j<y; j++) for (i=0; i<x; i++) { if (code2(pic[k]) == TS_COL_WHITE) { color = TSLCDInDat(); // ignore invalid data color = TSLCDInDat(); TSLCDOutDat(color); } else { TSLCDOutDat(code2(pic[k])); } k++; } } } //show picture from code memory, suited for showing background image void TSLCDShowPicBack(ts_pos_t sx,ts_pos_t ex,ts_pos_t sy,ts_pos_t ey,const unsigned short *pic,unsigned int total_x,unsigned int total_y,ts_mode_t mode) { unsigned long k,p; unsigned short color; unsigned int x,y; unsigned int i,j; p=sy*total_x+sx; k=p; if (sx < ts_margin_xl) sx = ts_margin_xl; if (ex > ts_margin_xr) ex = ts_margin_xr; if (sy < ts_margin_yu) sy = ts_margin_yu; if (ey > ts_margin_yl) ey = ts_margin_yl; TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sx); //TSLCDOutIns(TS_INS_END_ADX); TSLCDOutDat(ex); //TSLCDOutIns(TS_INS_GRAM_ADX); //TSLCDOutDat(sx); x = ex - sx + 1; //#ifndef TS_ORN_PORTRAIT //sy = TS_SIZE_Y - 1 - sy; // mirror start y address //ey = TS_SIZE_Y - 1 - ey; // mirror end y address TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sy); //TSLCDOutIns(TS_INS_END_ADY); TSLCDOutDat(ey); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy);//fix from bug of v1_00 y = sy - ey + 1; //#else //TSLCDOutIns(TS_INS_COL_ADDR_SET); //TSLCDOutDat(sy); //TSLCDOutIns(TS_INS_END_ADY); //TSLCDOutDat(ey); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy); //y = ey - sy + 1; //#endif TSLCDOutIns(TS_INS_MEM_WR); if (mode == TS_MODE_FULL) { for (j=sy; j<(sy+y); j++) for (i=p; i<p+x; i++) { TSLCDOutDat(code2(pic[k])); k++; } } else if (mode == TS_MODE_NORMAL) { for (j=sy; j<(sy+y); j++) { for (i=p; i<(p+x); i++) { if (code2(pic[k]) == TS_COL_WHITE) { color = TSLCDInDat(); // ignore invalid data color = TSLCDInDat(); TSLCDOutDat(color); } else { TSLCDOutDat(code2(pic[k])); } k++; } k+=total_x-x; } } } void TSLCDFillRect(ts_pos_t sx,ts_pos_t ex,ts_pos_t sy,ts_pos_t ey,unsigned short color,ts_mode_t mode) //draw a rectangular { unsigned int x,y; unsigned int i,j; #ifndef TS_ORN_PORTRAIT if (sx < 0) sx = 0; if (ex > 239) ex = 239; if (sy < 0) sy = 0; if (ey > 319) ey =319; TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sx); TSLCDOutDat(ex); x = ex - sx + 1; TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sy); TSLCDOutDat(ey); y = ey - sy + 1; #else if (sx < 0) sx = 0; if (ex > 320) ex = 320; if (sy < 0) sy = 0; if (ey > 219) ey =219; TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sx); TSLCDOutDat(ex); x = ex - sx + 1; TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sy); TSLCDOutDat(ey); y = ey - sy + 1; #endif TSLCDOutIns(TS_INS_MEM_WR); if ((mode == TS_MODE_NORMAL) || (mode == TS_MODE_FULL)) { for (j=0; j<x; j++) for (i=0; i<y; i++) { TSLCDOutDat(color); } } else if (mode == TS_MODE_INVERSE) { for (j=0; j<x; j++) for (i=0; i<y; i++) { color = TSLCDInDat(); // ignore invalid data color = TSLCDInDat(); TSLCDOutDat(~color); } } } void TSLCDFillCirc(ts_pos_t cx,ts_pos_t cy,ts_pos_t rad,unsigned short color, ts_mode_t mode) //draw a circle { #ifndef TS_ORN_PORTRAIT int sy_buf,ey_buf; #endif int sx,sy,ex,ey; int i,j; unsigned short color_buf; unsigned short rad2 = rad*rad; sx = cx - rad; ex = cx + rad; sy = cy - rad; ey = cy + rad; if (sx < ts_margin_xl) sx = ts_margin_xl; if (ex > ts_margin_xr) ex = ts_margin_xr; if (sy < ts_margin_yu) sy = ts_margin_yu; if (ey > ts_margin_yl) ey = ts_margin_yl; TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sx); //TSLCDOutIns(TS_INS_END_ADX); TSLCDOutDat(ex); //TSLCDOutIns(TS_INS_GRAM_ADX); //TSLCDOutDat(sx); // x = ex - sx + 1; #ifndef TS_ORN_PORTRAIT sy_buf = TS_SIZE_Y - 1 - sy; // mirror start y address ey_buf = TS_SIZE_Y - 1 - ey; // mirror end y address TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(ey_buf); //TSLCDOutIns(TS_INS_END_ADY); TSLCDOutDat(sy_buf); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy_buf);//fix from bug of v1_00 // y = sy_buf - ey_buf + 1; #else TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sy); //TSLCDOutIns(TS_INS_END_ADY); TSLCDOutDat(ey); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy); // y = ey - sy + 1; #endif TSLCDOutIns(TS_INS_MEM_WR); if (mode == TS_MODE_NORMAL) { for (j=sy-cy; j<=ey-cy; j++) for (i=sx-cx; i<=ex-cx; i++) { if ((i)*(i) + (j)*(j) < rad2) { TSLCDOutDat(color); } else { color_buf = TSLCDInDat(); // ignore invalid data color_buf = TSLCDInDat(); TSLCDOutDat(color_buf); } } } else if (mode == TS_MODE_INVERSE) { for (j=sy-cy; j<=ey-cy; j++) for (i=sx-cx; i<=ex-cx; i++) { if ((i)*(i) + (j)*(j) < rad2) { color_buf = TSLCDInDat(); // ignore invalid data color_buf = TSLCDInDat(); TSLCDOutDat(~color_buf); } else { color_buf = TSLCDInDat(); // ignore invalid data color_buf = TSLCDInDat(); TSLCDOutDat(color_buf); } } } else if (mode == TS_MODE_FULL) { for (j=sy-cy; j<=ey-cy; j++) for (i=sx-cx; i<=ex-cx; i++) { if ((i)*(i) + (j)*(j) < rad2) { TSLCDOutDat(color); } else { TSLCDOutDat(back_color); } } } } void TSLCDSetMargins(ts_pos_t xl,ts_pos_t xr,ts_pos_t yu,ts_pos_t yl) //set margins for FillRect,FillCirc { ts_margin_xl = xl; ts_margin_xr = xr; ts_margin_yu = yu; ts_margin_yl = yl; } void TSLCDSetMarginsDefault(void) //Reset margins to default value { ts_margin_xl = 0; ts_margin_xr = TS_SIZE_X - 1; ts_margin_yu = 0; ts_margin_yl = TS_SIZE_Y - 1; } void display_buf(ts_pos_t sx,ts_pos_t sy,ts_mode_t mode) { unsigned int x,y; unsigned char height; unsigned char i,j; ts_pos_t ex,ey; unsigned short c; if (font_mode == ENG) height = font_height; else height = font_ext_height; ex = sx + (last_non_zero - first_non_zero) + char_gap ; ey = sy + height - 1; TSLCDOutIns(TS_INS_COL_ADDR_SET); TSLCDOutDat(sx); //TSLCDOutIns(TS_INS_END_ADX); TSLCDOutDat(ex); //TSLCDOutIns(TS_INS_GRAM_ADX); //TSLCDOutDat(sx); x = ex - sx + 1; #ifndef TS_ORN_PORTRAIT sy = TS_SIZE_Y - 1 - sy; // mirror start y address ey = TS_SIZE_Y - 1 - ey; // mirror end y address TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(ey); //TSLCDOutIns(TS_INS_END_ADY); TSLCDOutDat(sy); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy);//fix from bug of v1_00 y = sy - ey + 1; #else TSLCDOutIns(TS_INS_ROW_ADDR_SET); TSLCDOutDat(sy); //TSLCDOutIns(TS_INS_END_ADY); TSLCDOutDat(ey); //TSLCDOutIns(TS_INS_GRAM_ADY); //TSLCDOutDat(sy); y = ey - sy + 1; #endif TSLCDOutIns(TS_INS_MEM_WR); if (mode == TS_MODE_NORMAL) { for (j=0; j<y; j++) for (i=0; i<x; i++) { if (buf_read(i,j)) { TSLCDOutDat(font_color); } else { c = TSLCDInDat(); // ignore invalid data c = TSLCDInDat(); TSLCDOutDat(c); } } } else if (mode == TS_MODE_INVERSE) { for (j=0; j<y; j++) for (i=0; i<x; i++) { c = TSLCDInDat(); // ignore invalid data c = TSLCDInDat(); if (buf_read(i,j)) { TSLCDOutDat(~c); } else { TSLCDOutDat(c); } } } else if (mode == TS_MODE_FULL) { for (j=0; j<y; j++) for (i=0; i<x; i++) { if (buf_read(i,j)) { TSLCDOutDat(font_color); } else { TSLCDOutDat(back_color); } } } } void TSLCDCharDisp(char character,ts_pos_t sx,ts_pos_t sy,ts_mode_t mode) //low level function to print a character on LCD { #ifdef FONT_EXT_PLUGIN char str[2]; str[1] = 0; if (TSLCDGetTypeExtFont(character) != OUT) { str[0] = character; TSLCDStoreExtFont(str); font_mode = EXT; display_buf(sx,sy - font_ext_adj,mode); } else #endif { font_mode = ENG; buf_store(character - 0x20); display_buf(sx,sy,mode); } } void TSLCDSetOffset(ts_pos_t x,ts_pos_t y) //set LCD offset for character display { offsetx = x; offsety = y; } void TSLCDPrintStr(unsigned char line,unsigned char column,char *str,ts_mode_t mode) //print string on LCD { int i = 0; ts_pos_t posx,posy; posx = offsetx + column*font_width; posy = offsety + line*font_height; while(str[i]) { #ifdef FONT_EXT_PLUGIN if (TSLCDGetTypeExtFont(str[i]) != OUT) { if (TSLCDStoreExtFont(str+i)) { font_mode = EXT; display_buf(posx,posy - font_ext_adj,mode); posx += last_non_zero-first_non_zero+1+char_gap; buf_clear(); } i++; } else #endif { font_mode = ENG; buf_store(str[i] - 0x20); display_buf(posx,posy,mode); posx += last_non_zero-first_non_zero+1+char_gap; i++; } if ((print_limit) && (posx > print_limit_len)) return; } } ///////////////////////////// void TSLCDPrint(ts_pos_t x,ts_pos_t y,const char *str,ts_mode_t mode) { int i = 0; ts_pos_t posx,posy; posx = x; posy = y+80; while(str[i]) { font_mode = ENG; buf_store(str[i] - 0x20); display_buf(posx,posy,mode); posx += last_non_zero-first_non_zero+1+char_gap; i++; if ((print_limit) && (posx > print_limit_len)) return; } } void TSLCDFixedPrint(ts_pos_t x,ts_pos_t y,int PixelLength,const char *str,ts_mode_t mode) { int i = 0; int tmp=0; ts_pos_t posx,posy; posx = x; posy = y+80; while(str[i] || tmp < PixelLength) { font_mode = ENG; if(str[i]) { buf_store(str[i] - 0x20); i++; } else buf_store(' ' - 0x20); display_buf(posx,posy,mode); posx += last_non_zero-first_non_zero+1+char_gap; tmp = posx -x; if ((print_limit) && (posx > print_limit_len)) return; } } //////////////////////////// void TSLCDPrintTxt(unsigned char line,unsigned char column,const char *txt,ts_mode_t mode) //print text from code memory { TSLCDPrintStr(line,column,(char *)txt,mode); } void TSLCDPrintCh(unsigned char line,unsigned char column,char c,ts_mode_t mode) //print a character on LCD { ts_pos_t posx,posy; posx = offsetx + column*font_width; posy = offsety + line*font_height; TSLCDCharDisp(c,posx,posy,mode); } void TSLCDPrintLimit(unsigned char on,int limit) //set limit for printstr (in pixel) { print_limit = on; print_limit_len = limit; }
eb13410d45d37fe1101e06036f22709681425125
b1fc6743e090f4a56152bad047101acb8f1e51f7
/ladr/clock.h
6b5a2ac6c1a62a53d109527a60e88a166846a477
[]
no_license
mmaroti/prover9
8885edffef7c7854f695dce185c45ad9c6fb1993
2db13c9750ad03a71a9e2a94f6d79fca8a477f48
refs/heads/master
2022-12-25T16:07:33.025832
2020-10-07T17:43:03
2020-10-07T17:43:03
280,725,389
1
0
null
null
null
null
UTF-8
C
false
false
2,523
h
clock.h
/* Copyright (C) 2006, 2007 William McCune This file is part of the LADR Deduction Library. The LADR Deduction Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2. The LADR Deduction Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the LADR Deduction Library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TP_CLOCK_H #define TP_CLOCK_H #include <time.h> #include "string.h" /* INTRODUCTION This package is for timing various operations. Say you need to time an operation P. You first call clock_init() to set up a clock, then you can start and stop the clock as you wish, then you can get the accumulated time with clock_value(). These clocks measure the user CPU time. <P> An unusual feature of these clocks is that they can be used inside of recursive routines. For example, you can start the clock at the beginning of a recursive routine and stop it at the end. If you start it 3 times then stop it three times, it will really stop only on the third call. This works by a counter of the number of extra times the clock has been started, and clock_stop() will stop the clock only when the count is 0. (This feature probably isn't very useful, and most people can ignore it.) <P> Also here are some routines for getting process system/user CPU time, elapsed wall-clock time, and the time/date. */ /* Public definitions */ typedef struct clock * Clock; /* End of public definitions */ /* Public function prototypes from clock.c */ void free_clock(Clock p); Clock clock_init(char *str); void clock_start(Clock p); void clock_stop(Clock p); unsigned clock_milliseconds(Clock p); double clock_seconds(Clock p); BOOL clock_running(Clock p); void clock_reset(Clock p); void fprint_clock(FILE *fp, Clock p); char * get_date(void); unsigned user_time(); double user_seconds(); unsigned system_time(); double system_seconds(); unsigned absolute_wallclock(void); void init_wallclock(); unsigned wallclock(); void disable_clocks(void); void enable_clocks(void); BOOL clocks_enabled(void); #endif /* conditional compilation of whole file */
c94b51281765ba99030fe2f7b7171644501ea5cf
3c4722294fe993300018245f79d26cd2e031a702
/WebUDP/WuHost.h
5491798970db34eb5568bd27baa4636174d71e3e
[ "MIT" ]
permissive
jaburns/webudp-rs
48f682762d54ad6633e652d74d6bc678b9b29233
5482ed51dcbf5a9f132616d1e93506cb6cca653f
refs/heads/main
2023-07-09T06:01:18.181091
2021-08-30T21:13:47
2021-08-30T21:13:47
353,546,646
2
0
null
null
null
null
UTF-8
C
false
false
944
h
WuHost.h
#pragma once #include <stdint.h> #include "Wu.h" #ifdef __cplusplus extern "C" { #endif typedef struct WuHost WuHost; int32_t WuHostCreate(const char* hostAddr, const char* port, int32_t maxClients, WuHost** host); void WuHostDestroy(WuHost* host); /* * Timeout: * -1 = Block until an event * 0 = Return immediately * >0 = Block for N milliseconds * Returns 1 if an event was received, 0 otherwise. */ int32_t WuHostServe(WuHost* host, WuEvent* evt, int timeout); void WuHostRemoveClient(WuHost* wu, WuClient* client); int32_t WuHostSendText(WuHost* host, WuClient* client, const char* text, int32_t length); int32_t WuHostSendBinary(WuHost* host, WuClient* client, const uint8_t* data, int32_t length); void WuHostSetErrorCallback(WuHost* host, WuErrorFn callback); WuClient* WuHostFindClient(const WuHost* host, WuAddress address); #ifdef __cplusplus } #endif
cb193e61310c1993aa6585f158d447dd7bc8534b
0463f5a7a732da635fc9794da86b9c40096023f4
/m516/c516/memory.c
760fc5c4f3b5b83bc24e95c566556c4c470faf81
[]
no_license
slebetman/movemachines
3ce4ed5e7c238abd50f8ba7d3a5ad16b9e6d8f93
a3f4727b9e7d5f284dc518560b608a8cf417fa4f
refs/heads/master
2023-03-08T21:48:31.600334
2023-02-25T15:05:24
2023-02-25T15:05:24
38,028,726
0
0
null
null
null
null
UTF-8
C
false
false
299
c
memory.c
#include "memory.h" #include <stddef.h> word RAM[0x10000]; void (*observeRAM)(word, word); word getRAM (word addr) { return RAM[addr]; } void setRAM (word addr, word val) { RAM[addr] = val; if (observeRAM != NULL) { (*observeRAM)(addr, val); } } void initRAM () { observeRAM = NULL; }
6878fdd8a924ae0d384dc25a0d2bf9cabc13c022
a02ef7730b9d444e749cbe1b164f190ccaaa95ab
/payment-through-coins-in-c++.c
6665f4ac1ad077484e06e1566ea2787b8876db2f
[]
no_license
prakhar290/kodekar-contest
28ea75375c9a90dba386f84ef70b16e545b26618
e5e8f1a8acd9ad31c780063b62e775447ab079e1
refs/heads/main
2023-08-23T03:24:52.246634
2021-09-15T12:50:23
2021-09-15T12:50:23
307,362,059
1
0
null
null
null
null
UTF-8
C
false
false
1,359
c
payment-through-coins-in-c++.c
You have bought some chocolates of cost N and find the number of ways to make change for N rupees, if we have infinite supply of each of S = { S1, S2, .. , SM } valued coins. Input Format First line contains the two Integer Value N and M. N denotes total cost and M denotes types of coins. Second line Contains different coin values in an array S[]. Constraints 1<= N,M <=10^3 Output Format Only print total ways to pay the total cost. Sample Input 0 4 3 1 2 3 Sample Output 0 4 Explanation 0 Input: N = 4 , M = 3 S[] = {1,2,3} Output: 4 Explanation: Four Possible ways are: {1,1,1,1},{1,1,2},{2,2},{1,3}. Sample Input 1 10 4 2 5 3 6 Sample Output 1 5 Explanation 1 Input: N = 10 , M = 4 S[] ={2,5,3,6} Output: 5 Explanation: Five Possible ways are: {2,2,2,2,2}, {2,2,3,3}, {2,2,6}, {2,3,5} and {5,5}. ///solution/// #include<bits/stdc++.h> using namespace std; int count(vector<int> s, int m, int n) { if(n == 0) return 1; if(n < 0) return 0; if(m <= 0 && n>=1) return 0; return count(s,m-1,n) + count(s,m,n-s[m-1]); } int main() { int n, m; cin>>n>>m; vector<int> s(m); for(int i = 0; i < m; i++) cin>>s[i]; int ans = count(s,m,n); cout<<ans; return 0; }
e14c2a230a9effff7e3455fc16e9807d717efe1c
0e3c919dfcef7c6815e6709faabb474595723546
/01 - Independent Study/UTAustinX_1201_RTOS/TM4C123Valvanoware/Lab4_Fitness_4C123/os.c
3bb825deb1de79f2ef08095e5e41054b40e4ea06
[ "MIT" ]
permissive
RyanTruran/EmbeddedSystems.Playground
4c00fff3cbb1cfe0cbefd0b1bd53e44f5d28f10a
0374b601ce9138d730d15acd4071275315e316d7
refs/heads/master
2021-09-25T21:56:03.070406
2018-10-26T03:19:03
2018-10-26T03:19:03
154,771,044
0
0
MIT
2018-10-26T03:18:05
2018-10-26T03:18:05
null
WINDOWS-1252
C
false
false
9,197
c
os.c
// os.c // Runs on LM4F120/TM4C123/MSP432 // A priority/blocking real-time operating system // Lab 4 starter file. // Daniel Valvano // March 25, 2016 // Hint: Copy solutions from Lab 3 into Lab 4 #include <stdint.h> #include "os.h" #include "CortexM.h" #include "BSP.h" #include "../inc/tm4c123gh6pm.h" // function definitions in osasm.s void StartOS(void); #define NUMTHREADS 8 // maximum number of threads #define NUMPERIODIC 2 // maximum number of periodic threads #define STACKSIZE 100 // number of 32-bit words in stack per thread struct tcb{ int32_t *sp; // pointer to stack (valid for threads not running struct tcb *next; // linked-list pointer //*FILL THIS IN**** }; typedef struct tcb tcbType; tcbType tcbs[NUMTHREADS]; tcbType *RunPt; int32_t Stacks[NUMTHREADS][STACKSIZE]; void static runperiodicevents(void); // ******** OS_Init ************ // Initialize operating system, disable interrupts // Initialize OS controlled I/O: periodic interrupt, bus clock as fast as possible // Initialize OS global variables // Inputs: none // Outputs: none void OS_Init(void){ DisableInterrupts(); BSP_Clock_InitFastest();// set processor clock to fastest speed // perform any initializations needed, // set up periodic timer to run runperiodicevents to implement sleeping } void SetInitialStack(int i){ // ****IMPLEMENT THIS**** // **Same as Lab 2 and Lab 3**** } //******** OS_AddThreads *************** // Add eight main threads to the scheduler // Inputs: function pointers to eight void/void main threads // priorites for each main thread (0 highest) // Outputs: 1 if successful, 0 if this thread can not be added // This function will only be called once, after OS_Init and before OS_Launch int OS_AddThreads(void(*thread0)(void), uint32_t p0, void(*thread1)(void), uint32_t p1, void(*thread2)(void), uint32_t p2, void(*thread3)(void), uint32_t p3, void(*thread4)(void), uint32_t p4, void(*thread5)(void), uint32_t p5, void(*thread6)(void), uint32_t p6, void(*thread7)(void), uint32_t p7){ // **similar to Lab 3. initialize priority field**** return 1; // successful } void static runperiodicevents(void){ // ****IMPLEMENT THIS**** // **DECREMENT SLEEP COUNTERS // In Lab 4, handle periodic events in RealTimeEvents } //******** OS_Launch *************** // Start the scheduler, enable interrupts // Inputs: number of clock cycles for each time slice // Outputs: none (does not return) // Errors: theTimeSlice must be less than 16,777,216 void OS_Launch(uint32_t theTimeSlice){ STCTRL = 0; // disable SysTick during setup STCURRENT = 0; // any write to current clears it SYSPRI3 =(SYSPRI3&0x00FFFFFF)|0xE0000000; // priority 7 STRELOAD = theTimeSlice - 1; // reload value STCTRL = 0x00000007; // enable, core clock and interrupt arm StartOS(); // start on the first task } // runs every ms void Scheduler(void){ // every time slice // ****IMPLEMENT THIS**** // look at all threads in TCB list choose // highest priority thread not blocked and not sleeping // If there are multiple highest priority (not blocked, not sleeping) run these round robin } //******** OS_Suspend *************** // Called by main thread to cooperatively suspend operation // Inputs: none // Outputs: none // Will be run again depending on sleep/block status void OS_Suspend(void){ STCURRENT = 0; // any write to current clears it INTCTRL = 0x04000000; // trigger SysTick // next thread gets a full time slice } // ******** OS_Sleep ************ // place this thread into a dormant state // input: number of msec to sleep // output: none // OS_Sleep(0) implements cooperative multitasking void OS_Sleep(uint32_t sleepTime){ // ****IMPLEMENT THIS**** // set sleep parameter in TCB, same as Lab 3 // suspend, stops running } // ******** OS_InitSemaphore ************ // Initialize counting semaphore // Inputs: pointer to a semaphore // initial value of semaphore // Outputs: none void OS_InitSemaphore(int32_t *semaPt, int32_t value){ // ****IMPLEMENT THIS**** // Same as Lab 3 } // ******** OS_Wait ************ // Decrement semaphore and block if less than zero // Lab2 spinlock (does not suspend while spinning) // Lab3 block if less than zero // Inputs: pointer to a counting semaphore // Outputs: none void OS_Wait(int32_t *semaPt){ // ****IMPLEMENT THIS**** // Same as Lab 3 } // ******** OS_Signal ************ // Increment semaphore // Lab2 spinlock // Lab3 wakeup blocked thread if appropriate // Inputs: pointer to a counting semaphore // Outputs: none void OS_Signal(int32_t *semaPt){ // ****IMPLEMENT THIS**** // Same as Lab 3 } #define FSIZE 10 // can be any size uint32_t PutI; // index of where to put next uint32_t GetI; // index of where to get next uint32_t Fifo[FSIZE]; int32_t CurrentSize;// 0 means FIFO empty, FSIZE means full uint32_t LostData; // number of lost pieces of data // ******** OS_FIFO_Init ************ // Initialize FIFO. The "put" and "get" indices initially // are equal, which means that the FIFO is empty. Also // initialize semaphores to track properties of the FIFO // such as size and busy status for Put and Get operations, // which is important if there are multiple data producers // or multiple data consumers. // Inputs: none // Outputs: none void OS_FIFO_Init(void){ // ****IMPLEMENT THIS**** // Same as Lab 3 } // ******** OS_FIFO_Put ************ // Put an entry in the FIFO. Consider using a unique // semaphore to wait on busy status if more than one thread // is putting data into the FIFO and there is a chance that // this function may interrupt itself. // Inputs: data to be stored // Outputs: 0 if successful, -1 if the FIFO is full int OS_FIFO_Put(uint32_t data){ // ****IMPLEMENT THIS**** // Same as Lab 3 return 0; // success } // ******** OS_FIFO_Get ************ // Get an entry from the FIFO. Consider using a unique // semaphore to wait on busy status if more than one thread // is getting data from the FIFO and there is a chance that // this function may interrupt itself. // Inputs: none // Outputs: data retrieved uint32_t OS_FIFO_Get(void){uint32_t data; // ****IMPLEMENT THIS**** // Same as Lab 3 return data; } // *****periodic events**************** int32_t *PeriodicSemaphore0; uint32_t Period0; // time between signals int32_t *PeriodicSemaphore1; uint32_t Period1; // time between signals void RealTimeEvents(void){int flag=0; static int32_t realCount = -10; // let all the threads execute once // Note to students: we had to let the system run for a time so all user threads ran at least one // before signalling the periodic tasks realCount++; if(realCount >= 0){ if((realCount%Period0)==0){ OS_Signal(PeriodicSemaphore0); flag = 1; } if((realCount%Period1)==0){ OS_Signal(PeriodicSemaphore1); flag=1; } if(flag){ OS_Suspend(); } } } // ******** OS_PeriodTrigger0_Init ************ // Initialize periodic timer interrupt to signal // Inputs: semaphore to signal // period in ms // priority level at 0 (highest // Outputs: none void OS_PeriodTrigger0_Init(int32_t *semaPt, uint32_t period){ PeriodicSemaphore0 = semaPt; Period0 = period; BSP_PeriodicTask_InitC(&RealTimeEvents,1000,0); } // ******** OS_PeriodTrigger1_Init ************ // Initialize periodic timer interrupt to signal // Inputs: semaphore to signal // period in ms // priority level at 0 (highest // Outputs: none void OS_PeriodTrigger1_Init(int32_t *semaPt, uint32_t period){ PeriodicSemaphore1 = semaPt; Period1 = period; BSP_PeriodicTask_InitC(&RealTimeEvents,1000,0); } //****edge-triggered event************ int32_t *edgeSemaphore; // ******** OS_EdgeTrigger_Init ************ // Initialize button1, PD6, to signal on a falling edge interrupt // Inputs: semaphore to signal // priority // Outputs: none void OS_EdgeTrigger_Init(int32_t *semaPt, uint8_t priority){ edgeSemaphore = semaPt; //***IMPLEMENT THIS*** // 1) activate clock for Port D // allow time for clock to stabilize // 2) no need to unlock PD6 // 3) disable analog on PD6 // 4) configure PD6 as GPIO // 5) make PD6 input // 6) disable alt funct on PD6 // disable pull-up on PD6 // 7) enable digital I/O on PD6 // (d) PD6 is edge-sensitive // PD6 is not both edges // PD6 is falling edge event // (e) clear PD6 flag // (f) arm interrupt on PD6 // priority on Port D edge trigger is NVIC_PRI0_R 31 – 29 // enable is bit 3 in NVIC_EN0_R } // ******** OS_EdgeTrigger_Restart ************ // restart button1 to signal on a falling edge interrupt // rearm interrupt // Inputs: none // Outputs: none void OS_EdgeTrigger_Restart(void){ //***IMPLEMENT THIS*** // rearm interrupt 3 in NVIC // clear flag6 } void GPIOPortD_Handler(void){ //***IMPLEMENT THIS*** // step 1 acknowledge by clearing flag // step 2 signal semaphore (no need to run scheduler) // step 3 disarm interrupt to prevent bouncing to create multiple signals }
f534435e0a5cf4a17c123d8138739ac4287ae2d8
cf4c7108d8f65e1023d36e6f5ddfa71a4cb6a7a0
/Zad2/vjezbe2.c
1d1255c9a43013319939fbee1358a3641f5d091d
[]
no_license
antekuic/fesb
98d2ba1c4ad2f734e55c32d86c003d9f42f6a121
c34a7c7c5e4e9e9927bac083e4cb48c47874dd97
refs/heads/main
2023-01-31T18:16:38.287832
2020-12-16T12:08:12
2020-12-16T12:08:12
305,615,635
0
0
null
null
null
null
UTF-8
C
false
false
5,121
c
vjezbe2.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_STRING 30 typedef struct _osoba* Pok; typedef struct _osoba { char ime[MAX_STRING]; char prezime[MAX_STRING]; int god; Pok next; } Osoba; int OsobaPoc(Pok, char*, char*, int); int OsobaKraj(Pok, char*, char*, int); int Ispis(Pok); int Brisanje(Pok, char*); Pok Trazi(Pok, char*); Pok ZadnjiClan(Pok); int main() { Osoba head; Pok c = NULL; char optionValue; char name[MAX_STRING], prezime[MAX_STRING]; int god = 0; int ind = 0; //RESETIRANJE HEADA NA OBIČNO head.next = NULL; strcpy(head.ime, ""); strcpy(head.prezime, ""); head.god = 0; printf("Opcije: p - unos na pocetak\nk - unos na kraj\ni - ispis clanova\nf - pretraga po prezimenu\nb - brisanje po prezimenu\ne- izlazak iz programa \nUnesite opciju: "); while ((optionValue = getchar()) && !ind) { switch (optionValue) { case 'p': { printf("\n"); printf("Unesite osobu za dodat na pocetak (ime prezime godine): "); scanf("%s %s %d", name, prezime, &god); getchar(); // zbog \n printf("\n"); if (!OsobaPoc(&head, name, prezime, god)) { printf("Osoba %s %s ( %d ) uspjesno dodana na pocetak.", name, prezime, god); } else { printf("Dogodila se greska kod dodavanja."); } printf("\n\n"); printf("Unesite komandu: "); ind = 0; break; } case 'k': { printf("\n"); printf("Unesite za dodat na kraj liste (ime prezime godine): "); scanf("%s %s %d", name, prezime, &god); getchar(); // zbog \n printf("\n"); if (!OsobaKraj(&head, name, prezime, god)) { printf("Osoba %s %s ( %d ) uspjesno dodana na kraj.", name, prezime, god); } else { printf("Dogodila se greska kod dodavanja."); } printf("\n\n"); printf("Unesite komandu: "); ind = 0; break; } case 'i': { printf("\n"); getchar(); // ZASTITA printf("ISPIS CLANOVA: \n"); if (Ispis(head.next) == -1) { printf("Nema niti jednog clana."); } printf("\n\n"); printf("Unesite komandu: "); ind = 0; break; } case 'f': { printf("\n"); printf("Pretraga ( prezime ): "); scanf("%s", prezime); getchar(); // ZASTITA // -> Trazenje po prezimenu if ((c = Trazi(head.next, prezime)) != NULL) { printf("%s %s %d", c->ime, c->prezime, c->god); } else { printf("Nije pronaden niti jedan takav clan."); } printf("\n\n"); printf("Unesite komandu: "); ind = 0; break; } case 'b': { printf("\n"); printf("Brisanje ( prezime ): "); scanf("%s", prezime); getchar(); // ZASTITA // -> Trazenje po prezimenu if (Brisanje(&head, prezime) == (-1 || 1)) { printf("Dogodila se pogreska, nismo pronasli clan."); } else { printf("Uspjesno obrisana osoba prezimena %s", prezime); } printf("\n\n"); printf("Unesite komandu: "); ind = 0; break; } default: { ind = 1; printf("\nIzlazak iz programa!\n"); break; }; } printf("\n"); } getchar(); return 0; } // TRAZENJA Pok ZadnjiClan(Pok p) // adresa heada { if (p != NULL) { while (p->next != NULL) { p = p->next; } return p; } return NULL; } Pok Trazi(Pok p, char prezime[]) // adresa prvog clana { if (p != NULL) { while (p != NULL && strcmp(p->prezime, prezime) != 0) { p = p->next; } return p; } return NULL; } // DODAVANJA int OsobaPoc(Pok p, char ime[], char prezime[], int god) // 0 - tocno 1- warning -1= greska { if (p != NULL) { Pok novi = NULL; novi = (Pok)malloc(sizeof(Osoba)); if (novi != NULL) { novi->next = p->next; p->next = novi; strcpy(novi->ime, ime); strcpy(novi->prezime, prezime); novi->god = god; return 0; // USPJESNO } return -1; } return -1; // GRESKA } int OsobaKraj(Pok p, char ime[], char prezime[], int god) // 0 - tocno 1- warning -1= greska { if (p != NULL) { Pok novi = NULL; novi = (Pok)malloc(sizeof(Osoba)); if (novi != NULL) { Pok c = ZadnjiClan(p); // adresa zadnjeg clana. c->next = novi; novi->next = NULL; strcpy(novi->ime, ime); strcpy(novi->prezime, prezime); novi->god = god; return 0; // USPJESNO } return -1; } return -1; // GRESKA } int Brisanje(Pok p, char prezime[]) // ADRESA HEADA { if (p != NULL) { Pok c = NULL; // pomocni pokazivac while (p != NULL && strcmp(p->prezime, prezime) != 0) { c = p; p = p->next; } if (p != NULL) { // OVDJE JE P ADRESA CLANA KOJEG BRISEMO; // c adresa prethodnog clana; c->next = p->next; free(p); return 0; } return 1; } return -1; } // ISPIS int Ispis(Pok p) // ADRESA PRVOG CLANA { if (p != NULL) { while (p != NULL) { printf("%s %s %d\n", p->ime, p->prezime, p->god); p = p->next; } return 0; } return -1; }
7ad993c3fe2f6909ae54598d63d5ac10176c8eb4
e07e3f41c9774c9684c4700a9772712bf6ac3533
/app/Temp/StagingArea/Data/il2cppOutput/mscorlib_System_Nullable_1_gen3624214719MethodDeclarations.h
b40217d2d59e028c4a160fcd00a4dd9e6c63a673
[]
no_license
gdesmarais-gsn/inprocess-mobile-skill-client
0171a0d4aaed13dbbc9cca248aec646ec5020025
2499d8ab5149a306001995064852353c33208fc3
refs/heads/master
2020-12-03T09:22:52.530033
2017-06-27T22:08:38
2017-06-27T22:08:38
95,603,544
0
0
null
null
null
null
UTF-8
C
false
false
4,335
h
mscorlib_System_Nullable_1_gen3624214719MethodDeclarations.h
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <assert.h> #include <exception> // System.Object struct Il2CppObject; // System.String struct String_t; #include "codegen/il2cpp-codegen.h" #include "mscorlib_System_Nullable_1_gen3624214719.h" #include "mscorlib_System_Security_AccessControl_AccessContr1066181108.h" #include "mscorlib_System_Object2689449295.h" // System.Void System.Nullable`1<System.Security.AccessControl.AccessControlActions>::.ctor(T) extern "C" void Nullable_1__ctor_m1482891721_gshared (Nullable_1_t3624214719 * __this, int32_t ___value0, const MethodInfo* method); #define Nullable_1__ctor_m1482891721(__this, ___value0, method) (( void (*) (Nullable_1_t3624214719 *, int32_t, const MethodInfo*))Nullable_1__ctor_m1482891721_gshared)(__this, ___value0, method) // System.Boolean System.Nullable`1<System.Security.AccessControl.AccessControlActions>::get_HasValue() extern "C" bool Nullable_1_get_HasValue_m3611615410_gshared (Nullable_1_t3624214719 * __this, const MethodInfo* method); #define Nullable_1_get_HasValue_m3611615410(__this, method) (( bool (*) (Nullable_1_t3624214719 *, const MethodInfo*))Nullable_1_get_HasValue_m3611615410_gshared)(__this, method) // T System.Nullable`1<System.Security.AccessControl.AccessControlActions>::get_Value() extern "C" int32_t Nullable_1_get_Value_m398922148_gshared (Nullable_1_t3624214719 * __this, const MethodInfo* method); #define Nullable_1_get_Value_m398922148(__this, method) (( int32_t (*) (Nullable_1_t3624214719 *, const MethodInfo*))Nullable_1_get_Value_m398922148_gshared)(__this, method) // System.Boolean System.Nullable`1<System.Security.AccessControl.AccessControlActions>::Equals(System.Object) extern "C" bool Nullable_1_Equals_m2682858182_gshared (Nullable_1_t3624214719 * __this, Il2CppObject * ___other0, const MethodInfo* method); #define Nullable_1_Equals_m2682858182(__this, ___other0, method) (( bool (*) (Nullable_1_t3624214719 *, Il2CppObject *, const MethodInfo*))Nullable_1_Equals_m2682858182_gshared)(__this, ___other0, method) // System.Boolean System.Nullable`1<System.Security.AccessControl.AccessControlActions>::Equals(System.Nullable`1<T>) extern "C" bool Nullable_1_Equals_m3000540731_gshared (Nullable_1_t3624214719 * __this, Nullable_1_t3624214719 ___other0, const MethodInfo* method); #define Nullable_1_Equals_m3000540731(__this, ___other0, method) (( bool (*) (Nullable_1_t3624214719 *, Nullable_1_t3624214719 , const MethodInfo*))Nullable_1_Equals_m3000540731_gshared)(__this, ___other0, method) // System.Int32 System.Nullable`1<System.Security.AccessControl.AccessControlActions>::GetHashCode() extern "C" int32_t Nullable_1_GetHashCode_m1431599130_gshared (Nullable_1_t3624214719 * __this, const MethodInfo* method); #define Nullable_1_GetHashCode_m1431599130(__this, method) (( int32_t (*) (Nullable_1_t3624214719 *, const MethodInfo*))Nullable_1_GetHashCode_m1431599130_gshared)(__this, method) // T System.Nullable`1<System.Security.AccessControl.AccessControlActions>::GetValueOrDefault() extern "C" int32_t Nullable_1_GetValueOrDefault_m2309296917_gshared (Nullable_1_t3624214719 * __this, const MethodInfo* method); #define Nullable_1_GetValueOrDefault_m2309296917(__this, method) (( int32_t (*) (Nullable_1_t3624214719 *, const MethodInfo*))Nullable_1_GetValueOrDefault_m2309296917_gshared)(__this, method) // T System.Nullable`1<System.Security.AccessControl.AccessControlActions>::GetValueOrDefault(T) extern "C" int32_t Nullable_1_GetValueOrDefault_m473612221_gshared (Nullable_1_t3624214719 * __this, int32_t ___defaultValue0, const MethodInfo* method); #define Nullable_1_GetValueOrDefault_m473612221(__this, ___defaultValue0, method) (( int32_t (*) (Nullable_1_t3624214719 *, int32_t, const MethodInfo*))Nullable_1_GetValueOrDefault_m473612221_gshared)(__this, ___defaultValue0, method) // System.String System.Nullable`1<System.Security.AccessControl.AccessControlActions>::ToString() extern "C" String_t* Nullable_1_ToString_m2998983480_gshared (Nullable_1_t3624214719 * __this, const MethodInfo* method); #define Nullable_1_ToString_m2998983480(__this, method) (( String_t* (*) (Nullable_1_t3624214719 *, const MethodInfo*))Nullable_1_ToString_m2998983480_gshared)(__this, method)
79efb60caffa55a86f2e4bc721c20ee800cda0f8
022e3c3a96f072f4a464099ff6bea3b7376e2f68
/CLWAPPX/api/VFPX-80164/VFP9/Tools/XSource/Wizards/AnchorEditor/anchoreditor.h
6bcfcf25f40bf3ba726006b97abe78340921f885
[]
no_license
kampee/CLW-System
d3ba52e02fe1f78d23373a85f60ec9c99649088d
d8d7c07f47514bb548ca1b26c4176db49b4f4f61
refs/heads/master
2022-11-23T13:42:14.347487
2019-12-18T09:47:05
2019-12-18T09:47:05
41,148,473
0
0
null
null
null
null
UTF-8
C
false
false
118
h
anchoreditor.h
#include AnchorEditorEnglish.H #include BaseEditor.H #include FoxPro.H #define ccCR chr(13) * Carriage return
1662c5907710c4709083ae0caaeaed83b561ce0b
1ac4ca8a1b33e908a4745558a70f04ddd64dc256
/src/network/TSocketRemoteConnection.h
47ab6658663268f0296df04a0c26302b3a008712
[ "MIT" ]
permissive
metopa/HTTP_Server
dd3754791f5e90d7e3c4d731068a43d1b95f845b
6917df87ceb3d0b9ac3d1b81536414d521cbc35b
refs/heads/master
2021-01-10T06:30:19.303703
2016-01-23T03:06:58
2016-01-23T03:06:58
50,219,931
4
0
null
null
null
null
UTF-8
C
false
false
833
h
TSocketRemoteConnection.h
// // Created by metopa on 4/16/15. // #ifndef HTTP_SERVER_TSOCKETREMOTECONNECTION_H #define HTTP_SERVER_TSOCKETREMOTECONNECTION_H #include <sys/socket.h> /** * This is helper class that stores information about connection socket and primary is used by CPortObtainer::accept() method. * \see CPortObtainer * \author Viacheslav Kroilov */ struct TSocketRemoteConnection { int sockfd_m; sockaddr_storage remoteaddr_m; socklen_t addrlen_m; TSocketRemoteConnection( int sockfd = 0 ) : sockfd_m( sockfd ), addrlen_m( sizeof( remoteaddr_m ) ) { } TSocketRemoteConnection( int sockfd, sockaddr_storage const& remoteaddr ) : sockfd_m( sockfd ), remoteaddr_m( remoteaddr ), addrlen_m( sizeof( remoteaddr_m ) ) { } operator int() const { return sockfd_m; } }; #endif //HTTP_SERVER_TSOCKETREMOTECONNECTION_H
0a0d0522236b3bc5f862c5dcaeac437e7d48c0f5
a3f62acfe83b28bb8c07977d52ddc7c7e4544e5c
/rt_lib/headers/sched_functions.h
9da030fad3304063a9f44a8ffa01f587868f0b99
[]
no_license
zahoussem/rt_par_platform
3f2289eeab9f59ed992a51d045a439797a17f0d0
721f1018f30680c1fda0f1367e6038cf567b8359
refs/heads/master
2021-01-21T15:22:05.681859
2017-06-25T21:09:18
2017-06-25T21:09:18
95,385,066
0
0
null
null
null
null
UTF-8
C
false
false
278
h
sched_functions.h
#ifndef SCHED_FUNCTIONS_H_INCLUDED #define SCHED_FUNCTIONS_H_INCLUDED #include <time.h> #include "structures.h" struct timespec now(); int goIdle(struct timespec* Next); int start(struct task tau); void createTask(int i, double D, double T, int itN, struct task *tau); #endif
4c20eac9c4529e3b017390eae0ac6081a13bcb56
1a20961af3b03b46c109b09812143a7ef95c6caa
/ZGame/UI/anttweakbar/src/TwEventGLFW.c
e4d382a93cb4d68374607fbe91e72229a54bb518
[ "Zlib" ]
permissive
JetAr/ZNginx
eff4ae2457b7b28115787d6af7a3098c121e8368
698b40085585d4190cf983f61b803ad23468cdef
refs/heads/master
2021-07-16T13:29:57.438175
2017-10-23T02:05:43
2017-10-23T02:05:43
26,522,265
3
1
null
null
null
null
UTF-8
C
false
false
6,321
c
TwEventGLFW.c
// --------------------------------------------------------------------------- // // @file TwEventGLFW.c // @brief Helper: // translate and re-send mouse and keyboard events // from GLFW event callbacks to AntTweakBar // // @author Philippe Decaudin // @license This file is part of the AntTweakBar library. // For conditions of distribution and use, see License.txt // // --------------------------------------------------------------------------- // #include <GL/glfw.h> #include "MiniGLFW.h" // a subset of GLFW.h needed to compile TwEventGLFW.c // note: AntTweakBar.dll does not need to link with GLFW, // it just needs some definitions for its helper functions. #include <AntTweakBar.h> int TW_CALL TwEventMouseButtonGLFW(int glfwButton, int glfwAction) { int handled = 0; TwMouseAction action = (glfwAction==GLFW_PRESS) ? TW_MOUSE_PRESSED : TW_MOUSE_RELEASED; if( glfwButton==GLFW_MOUSE_BUTTON_LEFT ) handled = TwMouseButton(action, TW_MOUSE_LEFT); else if( glfwButton==GLFW_MOUSE_BUTTON_RIGHT ) handled = TwMouseButton(action, TW_MOUSE_RIGHT); else if( glfwButton==GLFW_MOUSE_BUTTON_MIDDLE ) handled = TwMouseButton(action, TW_MOUSE_MIDDLE); return handled; } int g_KMod = 0; int TW_CALL TwEventKeyGLFW(int glfwKey, int glfwAction) { int handled = 0; // Register of modifiers state if( glfwAction==GLFW_PRESS ) { switch( glfwKey ) { case GLFW_KEY_LSHIFT: case GLFW_KEY_RSHIFT: g_KMod |= TW_KMOD_SHIFT; break; case GLFW_KEY_LCTRL: case GLFW_KEY_RCTRL: g_KMod |= TW_KMOD_CTRL; break; case GLFW_KEY_LALT: case GLFW_KEY_RALT: g_KMod |= TW_KMOD_ALT; break; } } else { switch( glfwKey ) { case GLFW_KEY_LSHIFT: case GLFW_KEY_RSHIFT: g_KMod &= ~TW_KMOD_SHIFT; break; case GLFW_KEY_LCTRL: case GLFW_KEY_RCTRL: g_KMod &= ~TW_KMOD_CTRL; break; case GLFW_KEY_LALT: case GLFW_KEY_RALT: g_KMod &= ~TW_KMOD_ALT; break; } } // Process key pressed if( glfwAction==GLFW_PRESS ) { int mod = g_KMod; int testkp = ((mod&TW_KMOD_CTRL) || (mod&TW_KMOD_ALT)) ? 1 : 0; if( (mod&TW_KMOD_CTRL) && glfwKey>0 && glfwKey<GLFW_KEY_SPECIAL ) // CTRL cases handled = TwKeyPressed(glfwKey, mod); else if( glfwKey>=GLFW_KEY_SPECIAL ) { int k = 0; if( glfwKey>=GLFW_KEY_F1 && glfwKey<=GLFW_KEY_F15 ) k = TW_KEY_F1 + (glfwKey-GLFW_KEY_F1); else if( testkp && glfwKey>=GLFW_KEY_KP_0 && glfwKey<=GLFW_KEY_KP_9 ) k = '0' + (glfwKey-GLFW_KEY_KP_0); else { switch( glfwKey ) { case GLFW_KEY_ESC: k = TW_KEY_ESCAPE; break; case GLFW_KEY_UP: k = TW_KEY_UP; break; case GLFW_KEY_DOWN: k = TW_KEY_DOWN; break; case GLFW_KEY_LEFT: k = TW_KEY_LEFT; break; case GLFW_KEY_RIGHT: k = TW_KEY_RIGHT; break; case GLFW_KEY_TAB: k = TW_KEY_TAB; break; case GLFW_KEY_ENTER: k = TW_KEY_RETURN; break; case GLFW_KEY_BACKSPACE: k = TW_KEY_BACKSPACE; break; case GLFW_KEY_INSERT: k = TW_KEY_INSERT; break; case GLFW_KEY_DEL: k = TW_KEY_DELETE; break; case GLFW_KEY_PAGEUP: k = TW_KEY_PAGE_UP; break; case GLFW_KEY_PAGEDOWN: k = TW_KEY_PAGE_DOWN; break; case GLFW_KEY_HOME: k = TW_KEY_HOME; break; case GLFW_KEY_END: k = TW_KEY_END; break; case GLFW_KEY_KP_ENTER: k = TW_KEY_RETURN; break; case GLFW_KEY_KP_DIVIDE: if( testkp ) k = '/'; break; case GLFW_KEY_KP_MULTIPLY: if( testkp ) k = '*'; break; case GLFW_KEY_KP_SUBTRACT: if( testkp ) k = '-'; break; case GLFW_KEY_KP_ADD: if( testkp ) k = '+'; break; case GLFW_KEY_KP_DECIMAL: if( testkp ) k = '.'; break; case GLFW_KEY_KP_EQUAL: if( testkp ) k = '='; break; } } if( k>0 ) handled = TwKeyPressed(k, mod); } } return handled; } int TW_CALL TwEventCharGLFW(int glfwChar, int glfwAction) { if( glfwAction==GLFW_PRESS && (glfwChar & 0xff00)==0 ) return TwKeyPressed(glfwChar, g_KMod); return 0; } // functions with __cdecl calling convension TW_API int TW_CDECL_CALL TwEventMouseButtonGLFWcdecl(int glfwButton, int glfwAction) { return TwEventMouseButtonGLFW(glfwButton, glfwAction); } TW_API int TW_CDECL_CALL TwEventKeyGLFWcdecl(int glfwKey, int glfwAction) { return TwEventKeyGLFW(glfwKey, glfwAction); } TW_API int TW_CDECL_CALL TwEventCharGLFWcdecl(int glfwChar, int glfwAction) { return TwEventCharGLFW(glfwChar, glfwAction); } TW_API int TW_CDECL_CALL TwEventMousePosGLFWcdecl(int mouseX, int mouseY) { return TwMouseMotion(mouseX, mouseY); } TW_API int TW_CDECL_CALL TwEventMouseWheelGLFWcdecl(int wheelPos) { return TwMouseWheel(wheelPos); }
bc5f6f603cf43f7d801485272f9157739c592a43
f8a29bd22820857e6ab6aab0e9824a3fbce4731f
/MMA8451_Driver/Sources/BoardConfig.c
b6979332fb1c2175363bd22716327e9609382e13
[]
no_license
carlosneri86/Accelerometer
09673d362bde1296adf31a31b44694155726f475
95daa941bb37d879fe5e0975037b7fc26b2468e2
refs/heads/master
2016-08-04T13:50:40.222763
2015-03-04T00:39:30
2015-03-04T00:39:30
31,629,227
1
0
null
null
null
null
UTF-8
C
false
false
8,380
c
BoardConfig.c
/*HEADER****************************************************************************************** * * Comments: * * **END********************************************************************************************/ /////////////////////////////////////////////////////////////////////////////////////////////////// // Includes Section /////////////////////////////////////////////////////////////////////////////////////////////////// #include <MKL25Z4.h> #include "BoardConfig.h" #include "GPIO_Mux.h" /////////////////////////////////////////////////////////////////////////////////////////////////// // Defines & Macros Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Typedef Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Function Prototypes Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Global Constants Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Static Constants Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Global Variables Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Static Variables Section /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// // Functions Section /////////////////////////////////////////////////////////////////////////////////////////////////// void BoardConfig_vfnInit(void) { #if TARGET_CLK == (8000000) /* SIM_SOPT2: PLLFLLSEL=1 */ SIM_SOPT2 |= SIM_SOPT2_PLLFLLSEL_MASK; /* Select PLL as a clock source for various peripherals */ /* SIM_SOPT1: OSC32KSEL=3 */ SIM_SOPT1 |= SIM_SOPT1_OSC32KSEL(0x03); /* LPO 1kHz oscillator drives 32 kHz clock for various peripherals */ /* Switch to FBE Mode */ /* MCG_C2: LOCRE0=0,??=0,RANGE0=2,HGO0=0,EREFS0=1,LP=0,IRCS=0 */ MCG_C2 = (MCG_C2_RANGE0(0x02) | MCG_C2_EREFS0_MASK); /* OSC0_CR: ERCLKEN=1,??=0,EREFSTEN=0,??=0,SC2P=0,SC4P=0,SC8P=0,SC16P=0 */ OSC0_CR = OSC_CR_ERCLKEN_MASK; /* MCG_C1: CLKS=2,FRDIV=3,IREFS=0,IRCLKEN=1,IREFSTEN=0 */ MCG_C1 = (MCG_C1_CLKS(0x02) | MCG_C1_FRDIV(0x03) | MCG_C1_IRCLKEN_MASK); /* MCG_C4: DMX32=0,DRST_DRS=0 */ MCG_C4 &= (uint8_t)~(uint8_t)((MCG_C4_DMX32_MASK | MCG_C4_DRST_DRS(0x03))); /* MCG_C5: ??=0,PLLCLKEN0=0,PLLSTEN0=0,PRDIV0=3 */ MCG_C5 = MCG_C5_PRDIV0(0x03); /* MCG_C6: LOLIE0=0,PLLS=0,CME0=0,VDIV0=0 */ MCG_C6 = MCG_C6_VDIV0(0x00); while((MCG_S & MCG_S_IREFST_MASK) != 0x00U) { /* Check that the source of the FLL reference clock is the external reference clock. */ } while((MCG_S & 0x0CU) != 0x08U) { /* Wait until external reference clock is selected as MCG output */ } /* Switch to PBE Mode */ /* MCG_C6: LOLIE0=0,PLLS=1,CME0=0,VDIV0=0 */ MCG_C6 = (MCG_C6_PLLS_MASK | MCG_C6_VDIV0(0x00)); while((MCG_S & 0x0CU) != 0x08U) { /* Wait until external reference clock is selected as MCG output */ } while((MCG_S & MCG_S_LOCK0_MASK) == 0x00U) { /* Wait until locked */ } #elif TARGET_CLK == (48000000) /* SIM_CLKDIV1: OUTDIV1=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,OUTDIV4=3,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */ SIM_CLKDIV1 = (SIM_CLKDIV1_OUTDIV1(0x00) | SIM_CLKDIV1_OUTDIV4(0x01)); /* Set the system prescalers to safe value */ /* SIM_SCGC5: PORTA=1 */ SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK; /* Enable clock gate for ports to enable pin routing */ if ((PMC_REGSC & PMC_REGSC_ACKISO_MASK) != 0x0U) { /* PMC_REGSC: ACKISO=1 */ PMC_REGSC |= PMC_REGSC_ACKISO_MASK; /* Release IO pads after wakeup from VLLS mode. */ } /* SIM_CLKDIV1: OUTDIV1=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,OUTDIV4=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */ SIM_CLKDIV1 = (SIM_CLKDIV1_OUTDIV1(0x00) | SIM_CLKDIV1_OUTDIV4(0x01)); /* Update system prescalers */ /* SIM_SOPT2: PLLFLLSEL=1 */ SIM_SOPT2 |= SIM_SOPT2_PLLFLLSEL_MASK; /* Select PLL as a clock source for various peripherals */ /* SIM_SOPT1: OSC32KSEL=3 */ SIM_SOPT1 |= SIM_SOPT1_OSC32KSEL(0x03); /* LPO 1kHz oscillator drives 32 kHz clock for various peripherals */ /* SIM_SOPT2: TPMSRC=1 */ SIM_SOPT2 = (uint32_t)((SIM_SOPT2 & (uint32_t)~(uint32_t)( SIM_SOPT2_TPMSRC(0x02) )) | (uint32_t)( SIM_SOPT2_TPMSRC(0x01) )); /* Set the TPM clock */ /* PORTA_PCR18: ISF=0,MUX=0 */ PORTA_PCR18 &= (uint32_t)~(uint32_t)((PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x07))); /* PORTA_PCR19: ISF=0,MUX=0 */ PORTA_PCR19 &= (uint32_t)~(uint32_t)((PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x07))); /* Switch to FBE Mode */ /* MCG_C2: LOCRE0=0,??=0,RANGE0=2,HGO0=0,EREFS0=1,LP=0,IRCS=0 */ MCG_C2 = (MCG_C2_RANGE0(0x02) | MCG_C2_EREFS0_MASK); /* OSC0_CR: ERCLKEN=1,??=0,EREFSTEN=0,??=0,SC2P=0,SC4P=0,SC8P=0,SC16P=0 */ OSC0_CR = OSC_CR_ERCLKEN_MASK; /* MCG_C1: CLKS=2,FRDIV=3,IREFS=0,IRCLKEN=1,IREFSTEN=0 */ MCG_C1 = (MCG_C1_CLKS(0x02) | MCG_C1_FRDIV(0x03) | MCG_C1_IRCLKEN_MASK); /* MCG_C4: DMX32=0,DRST_DRS=0 */ MCG_C4 &= (uint8_t)~(uint8_t)((MCG_C4_DMX32_MASK | MCG_C4_DRST_DRS(0x03))); /* MCG_C5: ??=0,PLLCLKEN0=0,PLLSTEN0=0,PRDIV0=3 */ MCG_C5 = MCG_C5_PRDIV0(0x03); /* MCG_C6: LOLIE0=0,PLLS=0,CME0=0,VDIV0=0 */ MCG_C6 = MCG_C6_VDIV0(0x00); while((MCG_S & MCG_S_IREFST_MASK) != 0x00U) { /* Check that the source of the FLL reference clock is the external reference clock. */ } while((MCG_S & 0x0CU) != 0x08U) { /* Wait until external reference clock is selected as MCG output */ } /* Switch to PBE Mode */ /* MCG_C6: LOLIE0=0,PLLS=1,CME0=0,VDIV0=0 */ MCG_C6 = (MCG_C6_PLLS_MASK | MCG_C6_VDIV0(0x00)); while((MCG_S & 0x0CU) != 0x08U) { /* Wait until external reference clock is selected as MCG output */ } while((MCG_S & MCG_S_LOCK0_MASK) == 0x00U) { /* Wait until locked */ } /* Switch to PEE Mode */ /* MCG_C1: CLKS=0,FRDIV=3,IREFS=0,IRCLKEN=1,IREFSTEN=0 */ MCG_C1 = (MCG_C1_CLKS(0x00) | MCG_C1_FRDIV(0x03) | MCG_C1_IRCLKEN_MASK); while((MCG_S & 0x0CU) != 0x0CU) { /* Wait until output of the PLL is selected */ } #endif SIM_SCGC5 |= SIM_SCGC5_PORTB_MASK | SIM_SCGC5_PORTC_MASK | SIM_SCGC5_PORTD_MASK; /* RGB Pins (Using TPMxCHx)*/ /* RED */ GPIO_vfnPinMux(GPIO_PORT_B,18,GPIO_MUX_ALT_3); /* GREEN */ GPIO_vfnPinMux(GPIO_PORT_B,19,GPIO_MUX_ALT_3); /* BLUE */ GPIO_vfnPinMux(GPIO_PORT_D,1,GPIO_MUX_ALT_4); /* I2C Pins set up */ GPIO_vfnPinMux(GPIO_PORT_E,24,GPIO_MUX_ALT_5); GPIO_vfnPinMux(GPIO_PORT_E,25,GPIO_MUX_ALT_5); /* UART pins */ /* RX */ GPIO_vfnPinMux(GPIO_PORT_A,1,GPIO_MUX_ALT_2); /* TX */ GPIO_vfnPinMux(GPIO_PORT_A,2,GPIO_MUX_ALT_2); GPIO_vfnPinMux(GPIO_PORT_B,1,GPIO_MUX_ALT_1); } /////////////////////////////////////////////////////////////////////////////////////////////////// // EOF ///////////////////////////////////////////////////////////////////////////////////////////////////
b178261c2e0e52f4254bc9489e1bb3f686eb4071
4ef6ec00ca25cdd78d6a1ea52d126ef5d83c7948
/C/CreHtmlc.c
8dffb3f604a348bbae2ffd82a63ba5536cda8bf0
[ "BSD-2-Clause" ]
permissive
bendisposto/BToolkit
40f41f499f0236b61a7d42fbc11eccb46a175be8
0bd1476c92c1130100c401a96cf015962106c80e
refs/heads/master
2020-12-11T07:32:35.835519
2014-06-25T13:59:03
2014-06-25T13:59:03
null
0
0
null
null
null
null
UTF-8
C
false
false
17,865
c
CreHtmlc.c
/* Copyright (c) 1985-2012, B-Core (UK) Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "../MOTIF/BMotif_version.c" #define max_name 55 #define max_ref 5000 FILE * Bcom; FILE * Outfile; FILE * Infile; char word [ 5002 ]; char _dirname_ [ 400 ]; char filename [ max_name ]; char mchname [ max_name ]; char impname [ max_name ]; char own_arr_val [ max_ref ] [ max_name ]; char own_arr_type [ max_ref ]; int tot_own_arr; char ref_arr_mch_val [ max_ref ] [ max_name ]; char ref_arr_name_val [ max_ref ] [ max_name ]; char ref_arr_type [ max_ref ]; int tot_ref_arr; int c, i, ll; int in_annot = 0; /***/ void print_data () { printf ( "_dirname_: %s\nfilename: %s\nmchname: %s\nimpname: %s\n", _dirname_, filename, mchname, impname ); printf ( " own:\n" ); for ( i = 0 ; i < tot_own_arr ; i++ ) { printf ( " `%c' `%s'\n", own_arr_type [ i ], own_arr_val [ i ] ); } printf ( " ref:\n" ); for ( i = 0 ; i < tot_ref_arr ; i++ ) { printf ( " `%c' `%s' `%s'\n", ref_arr_type [ i ], ref_arr_mch_val [ i ], ref_arr_name_val [ i ] ); } } /***/ void err_exit ( n ) int n; { printf ( "\n\n CreHtmlc: error code %d\n", n ); exit ( 1 ); } void CheckForReference () { int i, found; i = 0; found = 0; while ( ! found && i < tot_own_arr ) { if ( strcmp ( word, own_arr_val [ i ] ) == 0 ) { fprintf ( Outfile, "<A NAME=\"" ); if ( own_arr_type [ i ] == 'P' ) { /* slib ops */ if ( ( strlen ( word ) > 5 ) && ( word [ 0 ] == 'I' ) && ( word [ 1 ] == 'N' ) && ( word [ 2 ] == 'I' ) && ( word [ 3 ] == '_' ) ) { fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.mch.html\">%s</A></A>", "OPNAME", word, mchname, word ); } else { fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.mch.html#OPNAME!%s\">%s</A></A>", "OPNAME", word, mchname, word, word ); } } else if ( own_arr_type [ i ] == 'O' ) { if ( ( strlen ( word ) > 5 ) && ( word [ 0 ] == 'I' ) && ( word [ 1 ] == 'N' ) && ( word [ 2 ] == 'I' ) && ( word [ 3 ] == '_' ) ) { fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.html#IMPORTS\">%s</A></A>", "OPNAME", word, impname, word ); } else { fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.html#OPNAME!%s\">%s</A></A>", "OPNAME", word, impname, word, word ); } } else if ( own_arr_type [ i ] == 'C' ) { /* constants from the .imp */ fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.html#CONSTANTS\">%s</A></A>", "CONSTANTS", word, impname, word ); } else if ( own_arr_type [ i ] == 'D' ) { /* constants from the .mch */ fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.mch.html#CONSTANTS\">%s</A></A>", "CONSTANTS", word, mchname, word ); } else if ( own_arr_type [ i ] == 'S' ) { /* enum elements from the .imp */ fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.html#SETS\">%s</A></A>", "SETS", word, impname, word ); } else if ( own_arr_type [ i ] == 'T' ) { /* enum elements from the .mch */ fprintf ( Outfile, "%s!%s\"><A HREF=\"%s.mch.html#SETS\">%s</A></A>", "SETS", word, mchname, word ); } else if ( own_arr_type [ i ] == 'M' ) { fprintf ( Outfile, "%s!%s\">%s</A>", "IMPLEMENTATION", word, word ); } else if ( own_arr_type [ i ] == 'F' ) { fprintf ( Outfile, "%s\">%s</A>", "MODULENAME", word ); } found = 1; strcpy ( own_arr_val [ i ], "" ); /* do it once only */ } i++; } if ( ! found ) { i = 0; while ( ! found && i < tot_ref_arr ) { /*** printf ( "looking for word `%s'\n", ref_arr_name_val [ i ] ); ***/ if ( strcmp ( word, ref_arr_name_val [ i ] ) == 0 ) { if ( ref_arr_type [ i ] == 'b' ) { fprintf ( Outfile, "<B>%s</B>", word ); } else { fprintf ( Outfile, "<A HREF=\"%s.html", ref_arr_mch_val [ i ] ); if ( ref_arr_type [ i ] == 'o' ) { fprintf ( Outfile, "#%s!%s\">%s</A>", "OPNAME", word, word ); } else if ( ref_arr_type [ i ] == 'c' ) { fprintf ( Outfile, "#%s!%s\">%s</A>", "CONST", word, word ); } else if ( ref_arr_type [ i ] == 'i' ) { /* imported module */ fprintf ( Outfile, "#%s\">%s</A>", "MODULENAME", word ); } else if ( ref_arr_type [ i ] == 'm' ) { fprintf ( Outfile, "#%s!%s\">%s</A>", "MCHNAME", word, word ); } else if ( ref_arr_type [ i ] == 'v' ) { /* ref subsid SET (eg BYTE) */ fprintf ( Outfile, "#%s\">%s</A>", "SETS", word ); } else if ( ref_arr_type [ i ] == 'w' ) { /* ref global (imported) var */ fprintf ( Outfile, "#%s\">%s</A>", "MACHINE", word ); } else if ( ref_arr_type [ i ] == 'h' ) { /* VHDL var */ fprintf ( Outfile, "#%s\">%s</A>", "INVARIANT", word ); } else if ( ref_arr_type [ i ] == 'x' ) { /* ref to subsidiary mch/imp */ fprintf ( Outfile, "#%s\">%s</A>", word, word ); } else if ( ref_arr_type [ i ] == 's' ) { /* imp from which translated */ fprintf ( Outfile, "#%s\">%s</A>", "MACHINE", word ); } else if ( ref_arr_type [ i ] == 't' ) { /* code module */ fprintf ( Outfile, "\">%s</A>", word ); } else if ( ref_arr_type [ i ] == 'y' ) { /* SLIB mch for .param code */ fprintf ( Outfile, "#%s\">%s</A>", "IMPLEMENTATION", word ); } else if ( ref_arr_type [ i ] == 'z' ) { /* op in imp */ fprintf ( Outfile, "#%s\">%s</A>", word, word ); } else if ( ref_arr_type [ i ] == 'a' ) { /* ARCHITECTURE */ char buf [ 250 ]; strcpy ( buf, ref_arr_mch_val [ i ] ); buf [ strlen ( buf ) - 7 ] = '\0'; fprintf ( Outfile, "#%s!%s_architecture\"><B>%s</B></A>", "OPNAME", buf, word ); } /* else if ( ref_arr_type [ i ] == 'p' ) { /? PORT ?/ char buf [ 250 ]; strcpy ( buf, ref_arr_mch_val [ i ] ); buf [ strlen ( buf ) - 7 ] = '\0'; fprintf ( Outfile, "#%s!%s_port\">%s</A>", "OPNAME", buf, word ); } */ } found = 1; } i++; } if ( ! found ) { /* not referenced */ char buf [ 1000 ]; int r; int k = 0; while ( word [ k ] != '\0' ) { r = 0; while ( ( word [ k ] != '\0' ) && ( word [ k ] != '[' ) && ( word [ k ] != ']' ) ) { buf [ r++ ] = word [ k++ ]; } buf [ r ] = '\0'; if ( strcmp ( buf, "ARRAY" ) == 0 ) { fprintf ( Outfile, "<B>ARRAY</B>" ); } else if ( strcmp ( buf, "[" ) == 0 ) { fprintf ( Outfile, "<B>[</B>" ); } else if ( strcmp ( buf, "]" ) == 0 ) { fprintf ( Outfile, "<B>]</B>" ); } else { fputs ( buf, Outfile ); } if ( word [ k ] == '[' ) { fprintf ( Outfile, "<B>[</B>" ); k++; } else if ( word [ k ] == ']' ) { fprintf ( Outfile, "<B>]</B>" ); k++; } } } /* if ( ! found ) */ } /* if ( ! found ) */ } void GetNextWord () { int i; c = getc ( Infile ); while ( ( c < 'a' || c > 'z' ) && ( c < 'A' || c > 'Z' ) && ( c < '0' || c > '9' ) && ( c != '.' ) && ( c != '#' ) && ( c != '{' ) && ( c != '}' ) && ( c != '[' ) && ( c != ']' ) && ( c != '_' ) && ( c != '.' ) && ( c != '/' ) && ( c != '*' ) && ( c != EOF ) ) { putc ( c, Outfile ); c = getc ( Infile ); } if ( c != EOF ) { i = 0; while ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) || ( c == '.' ) || ( c == '#' ) || ( c == '{' ) || ( c == '}' ) || ( c == '[' ) || ( c == ']' ) || ( c == '_' ) || ( c == '.' ) || /* ( c == '/' ) || */ ( c == '*' ) ) { word [ i ] = ( char ) c; c = getc ( Infile ); i++; } word [ i ] = '\0'; /*** printf ( " word: |%s|\n", word ); ***/ if ( ! in_annot ) { if ( strcmp ( word, "/*" ) == 0 ) { in_annot = /* 1 */ 0; /***** so, it's not used ! *****/ /*** printf ( "in_annot = 1\n" ); ***/ } } else { if ( strcmp ( word, "*/" ) == 0 ) { in_annot = 0; /*** printf ( "in_annot = 0\n" ); ***/ } } if ( ( ! in_annot ) && ( ( word [ 0 ] >= 'a' && word [ 0 ] <= 'z' ) || ( word [ 0 ] >= 'A' && word [ 0 ] <= 'Z' ) || ( word [ 0 ] == '#' ) || ( strcmp ( word, "}" ) == 0 ) || ( strcmp ( word, "{" ) == 0 ) ) ) { CheckForReference (); } else { fprintf ( Outfile, "%s", word ); } if ( c != EOF ) { putc ( c, Outfile ); } } } void pre_process_file_into_Bhtx () { /*** replaces < and > with &lt; and &gt; ***/ strcpy ( word, _dirname_ ); strcat ( word, filename ); Infile = fopen ( word, "r" ); if ( Infile == NULL ) { printf ( "\n\n CreHtmlc: can't open \"%s\" for reading\n", word ); exit ( 1 ); } Outfile = fopen ( "TMP/.Bhtx", "w" ); if ( Outfile == NULL ) { printf ( "\n\n CreHtml: can't open %s for writing\n", "TMP/.Bhtx" ); exit ( 1 ); } c = getc ( Infile ); while ( c != EOF ) { /*** load line into buf ***/ i = 0; while ( ( c != EOF ) && ( c != '\n' ) && i < 5000 ) { word [ i++ ] = c; c = getc ( Infile ); } word [ i ] = '\0'; ll = i; i = 0; for ( i = 0 ; i < ll ; i++ ) { if ( word [ i ] == '<' ) { fputs ( "&lt;", Outfile ); } else if ( word [ i ] == '>' ) { fputs ( "&gt;", Outfile ); } else { putc ( word [ i ], Outfile ); } } if ( c != EOF ) { putc ( c, Outfile ); c = getc ( Infile ); } } fclose ( Infile ); fclose ( Outfile ); /*** sprintf ( word, "diff %s%s %s", _dirname_, filename, "TMP/.Bhtx" ); printf ( "\n\n------\ndiff: < %s%s > %s\n", _dirname_, filename, "TMP/.Bhtx" ); system ( word ); printf ( "------\n" ); ***/ } /*void*/ /* should be int*/ int main ( argc, argv ) int argc; char *argv[]; { time_t time_now; char * name, bkit [ 250 ]; printf ( "." ); fflush ( stdout ); name = getenv ( "BKIT" ); if ( name == NULL ) { printf ( "\n\n Environment variable BKIT not set\n" ); exit ( 1 ); } strcpy ( bkit, name ); tot_own_arr = 0; tot_ref_arr = 0; /*** printf ( "contents of .Bcom:\n" ); system ( "cat .Bcom" ); ***/ Bcom = fopen ( ".Bcom", "r" ); if ( Bcom == NULL ) { printf ( "\n\n CreHtmlc: can't open \".Bcom\" for reading\n" ); exit ( 1 ); } c = getc ( Bcom ); i = 0; while ( c != '|' && c != EOF ) { _dirname_ [ i ] = ( char ) c; i++; c = getc ( Bcom ); } if ( c == EOF ) { err_exit ( 1 ); } _dirname_ [ i ] = '\0'; c = getc ( Bcom ); i = 0; while ( c != '|' && c != EOF ) { filename [ i ] = ( char ) c; i++; c = getc ( Bcom ); } if ( c == EOF ) { err_exit ( 2 ); } filename [ i ] = '\0'; c = getc ( Bcom ); i = 0; while ( c != '|' && c != EOF ) { impname [ i ] = ( char ) c; i++; c = getc ( Bcom ); } if ( c == EOF ) { err_exit ( 3 ); } impname [ i ] = '\0'; c = getc ( Bcom ); i = 0; while ( c != '\n' && c != EOF ) { mchname [ i ] = ( char ) c; i++; c = getc ( Bcom ); } if ( c == EOF ) { err_exit ( 4 ); } mchname [ i ] = '\0'; own_arr_type [ tot_own_arr ] = 'M'; strcpy ( own_arr_val [ tot_own_arr ], mchname ); tot_own_arr++; /*** printf ( "tot_own_arr=%3d max_ref=%3d\n", tot_own_arr, max_ref ); ***/ printf ( "." ); fflush ( stdout ); c = getc ( Bcom ); while ( c != EOF ) { if ( c >= 'A' && c <= 'Z' ) { /* own_arr */ if ( tot_own_arr < max_ref ) { own_arr_type [ tot_own_arr ] = ( char ) c; } c = getc ( Bcom ); /* read `|' */ if ( c == EOF ) { err_exit ( 5 ); } i = 0; c = getc ( Bcom ); while ( c != '\n' && c != EOF ) { if ( tot_own_arr < max_ref ) { own_arr_val [ tot_own_arr ] [ i ] = ( char ) c; i++; } c = getc ( Bcom ); } if ( tot_own_arr < max_ref ) { own_arr_val [ tot_own_arr ] [ i ] = '\0'; tot_own_arr++; } /*** printf ( "tot_own_arr=%3d max_ref=%3d\n", tot_own_arr, max_ref ); ***/ } else { /* ref_arr */ if ( tot_ref_arr < max_ref ) { ref_arr_type [ tot_ref_arr ] = ( char ) c; } c = getc ( Bcom ); if ( c == EOF ) { err_exit ( 6 ); } i = 0; while ( c != '|' && c != EOF ) { if ( tot_ref_arr < max_ref ) { ref_arr_mch_val [ tot_ref_arr ] [ i ] = ( char ) c; i++; } c = getc ( Bcom ); } ref_arr_mch_val [ tot_ref_arr ] [ i ] = '\0'; if ( c == EOF ) { err_exit ( 7 ); } c = getc ( Bcom ); i = 0; while ( c != '\n' && c != EOF ) { ref_arr_name_val [ tot_ref_arr ] [ i ] = ( char ) c; i++; c = getc ( Bcom ); } if ( tot_ref_arr < max_ref ) { ref_arr_name_val [ tot_ref_arr ] [ i ] = '\0'; tot_ref_arr++; } /*** printf ( "tot_ref_arr=%3d max_ref=%3d\n", tot_ref_arr, max_ref ); ***/ } if ( c != EOF ) { c = getc ( Bcom ); } } fclose ( Bcom ); /*** if error - report only once (last - .g file) ***/ if ( ( ( tot_own_arr == max_ref ) || ( tot_ref_arr == max_ref ) ) && ( filename [ strlen ( filename ) - 1 ] == 'g' ) ) { printf ( " CreHtmlc: capacity reached\n\n All references may not be present in the html modules\n\n" ); } /*** printf ( "_dirname_: %s\nfilename: %s\nmchname: %s\nimpname: %s\n", _dirname_, filename, mchname, impname ); ***/ /*** print_data (); ***/ pre_process_file_into_Bhtx (); Infile = fopen ( "TMP/.Bhtx", "r" ); if ( Outfile == NULL ) { printf ( "\n\n CreHtmlc: can't open \"%s\" for reading\n", "TMP/.Bhtx" ); exit ( 1 ); } strcpy ( word, "HTX/" ); strcat ( word, filename ); strcat ( word, ".html" ); Outfile = fopen ( word, "w" ); if ( Outfile == NULL ) { printf ( "\n\n CreHtmlc: can't open \"%s\" for writing\n", word ); exit ( 1 ); } /*** printf ( " %s opened for reading\n", word ); ***/ /*** printf ( " %s opened for writing\n", word ); ***/ fprintf ( Outfile, "<HTML>\n<HEAD>\n <META NAME=\"Author\" CONTENT=\"%s\">\n <META NAME=\"Description\" CONTENT=\"Hypertext version of %s Code Module\">\n <TITLE>%s Code Module</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#CCCCCC\" LINK=\"#2A9BFF\" VLINK=\"#FF6565\" ALINK=\"#FF0000\">\n<PRE>\n", toolkit_ver, filename, filename ); printf ( "." ); fflush ( stdout ); c = 'a'; while ( c != EOF ) { GetNextWord (); } fprintf ( Outfile, "</PRE>\n<P><HR>\n<P>\n<H3><FONT COLOR=\"#004EFF\">Analysed Constructs</FONT></H3>\n\n<MENU>\n<DD><A HREF=\"ConstructsSummary.html\">Hypertext Constructs Page</A></DD>\n</MENU>\n\n<H3><FONT COLOR=\"#004EFF\">On-line Help</FONT></H3>\n\n" ); time_now = time ( NULL ); fprintf ( Outfile, "<MENU>\n<DD><A HREF=\"%s/BHELP/Contents.html\">Help Contents Page</A>\n<DD><A HREF=\"%s/BHELP/Index.html\">Index</A></DD>\n</MENU>\n<CENTER>\n<HR WIDTH=33%% SIZE=2 COLOR=\"#CF6500\" NOSHADE>\n<FONT FACE=\"sans-serif, Arial, Helvetica\"><FONT COLOR=\"#CF6500\"><FONT SIZE=-2>Document Last Updated: %s<BR>\n<IMG SRC=\"%s/BHELP/B.gif\" VSPACE=5><BR>%s</FONT></FONT></FONT>\n<CENTER>\n<HR WIDTH=33%% SIZE=2 COLOR=\"#CF6500\" NOSHADE>\n</CENTER>\n</BODY>\n</HTML>\n", bkit, bkit, ctime ( & time_now ), bkit, toolkit_ver ); fclose ( Infile ); fclose ( Outfile ); exit ( 0 ); }
36235c6993ee91ed8bfe4d36a750acabbdfa58aa
b2a0bc03d73b670c657ab03768eb41756bb0c0a4
/Silicon/Intel/WhitleySiliconPkg/Pch/SouthClusterLbg/Include/Register/PchRegsPsf.h
e824e989132574c752c8d7938ea64f73657ea067
[ "BSD-2-Clause-Patent", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown", "BSD-2-Clause", "FreeBSD-DOC", "Zlib", "BSD-3-Clause", "Python-2.0", "DOC", "MIT" ]
permissive
zhujun74/edk2-platforms
69566361c00a67c03a30e600c3e78f7dfa822284
9131d63e08b6845d28778a73c719ae3ef08e42f2
refs/heads/master
2023-08-14T15:17:04.432766
2023-07-13T05:29:38
2023-07-17T05:31:23
142,731,135
0
0
BSD-2-Clause
2018-07-29T04:38:42
2018-07-29T04:38:42
null
UTF-8
C
false
false
24,331
h
PchRegsPsf.h
/** @file Register definition for PSF component Conventions: Prefixes: Definitions beginning with "R_" are registers Definitions beginning with "B_" are bits within registers Definitions beginning with "V_" are meaningful values within the bits Definitions beginning with "S_" are register sizes Definitions beginning with "N_" are the bit position In general, PCH registers are denoted by "_PCH_" in register names Registers / bits that are different between PCH generations are denoted by _PCH_[generation_name]_" in register/bit names. Registers / bits that are specific to PCH-H denoted by "_H_" in register/bit names. Registers / bits that are specific to PCH-LP denoted by "_LP_" in register/bit names. e.g., "_PCH_H_", "_PCH_LP_" Registers / bits names without _H_ or _LP_ apply for both H and LP. Registers / bits that are different between SKUs are denoted by "_[SKU_name]" at the end of the register/bit names Registers / bits of new devices introduced in a PCH generation will be just named as "_PCH_" without [generation_name] inserted. @copyright Copyright 2014 - 2021 Intel Corporation. <BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _PCH_REGS_PSF_H_ #define _PCH_REGS_PSF_H_ // // Private chipset regsiter (Memory space) offset definition // The PCR register defines is used for PCR MMIO programming and PCH SBI programming as well. // // // PSFx segment registers // #define R_PCH_PCR_PSF_GLOBAL_CONFIG 0x4000 ///< PSF Segment Global Configuration Register #define B_PCH_PCR_PSF_GLOBAL_CONFIG_ENTCG BIT4 #define B_PCH_PCR_PSF_GLOBAL_CONFIG_ENLCG BIT3 #define R_PCH_PCR_PSF_ROOTSPACE_CONFIG_RS0 0x4014 ///< PSF Segment Rootspace Configuration Register #define B_PCH_PCR_PSF_ROOTSPACE_CONFIG_RS0_ENADDRP2P BIT1 #define B_PCH_PCR_PSF_ROOTSPACE_CONFIG_RS0_VTDEN BIT0 #define R_PCH_PCR_PSF_PORT_CONFIG_PG0_PORT0 0x4020 ///< PSF Segment Port Configuration Register #define S_PCH_PSF_DEV_GNTCNT_RELOAD_DGCR 4 #define S_PCH_PSF_TARGET_GNTCNT_RELOAD 4 #define B_PCH_PSF_DEV_GNTCNT_RELOAD_DGCR_GNT_CNT_RELOAD 0x1F #define B_PCH_PSF_TARGET_GNTCNT_RELOAD_GNT_CNT_RELOAD 0x1F // // PSFx PCRs definitions // #define R_PCH_PCR_PSFX_T0_SHDW_BAR0 0 ///< PCI BAR0 #define R_PCH_PCR_PSFX_T0_SHDW_BAR1 0x04 ///< PCI BAR1 #define R_PCH_PCR_PSFX_T0_SHDW_BAR2 0x08 ///< PCI BAR2 #define R_PCH_PCR_PSFX_T0_SHDW_BAR3 0x0C ///< PCI BAR3 #define R_PCH_PCR_PSFX_T0_SHDW_BAR4 0x10 ///< PCI BAR4 #define R_PCH_PSFX_PCR_T0_SHDW_PCIEN 0x1C ///< PCI configuration space enable bits #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_BAR0DIS BIT16 ///< Disable BAR0 #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_BAR1DIS BIT17 ///< Disable BAR1 #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_BAR2DIS BIT18 ///< Disable BAR2 #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_BAR3DIS BIT19 ///< Disable BAR3 #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_BAR4DIS BIT20 ///< Disable BAR4 #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_BAR5DIS BIT21 ///< Disable BAR5 #define B_PCH_PSFX_PCR_T0_SHDW_PCIEN_FUNDIS BIT8 ///< Function disable #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_MEMEN BIT1 ///< Memory decoding enable #define B_PCH_PCR_PSFX_T0_SHDW_PCIEN_IOEN BIT0 ///< IO decoding enable #define R_PCH_PCR_PSFX_T0_SHDW_PMCSR 0x20 ///< PCI power management configuration #define B_PCH_PCR_PSFX_T0_SHDW_PMCSR_PWRST (BIT1 | BIT0) ///< Power status #define R_PCH_PCR_PSFX_T0_SHDW_CFG_DIS 0x38 ///< PCI configuration disable #define B_PCH_PCR_PSFX_T0_SHDW_CFG_DIS_CFGDIS BIT0 ///< config disable #define R_PCH_PCR_PSFX_T1_SHDW_PCIEN 0x3C ///< PCI configuration space enable bits #define B_PCH_PSFX_PCR_T1_SHDW_PCIEN_FUNDIS BIT8 ///< Function disable #define B_PCH_PCR_PSFX_T1_SHDW_PCIEN_MEMEN BIT1 ///< Memory decoding enable #define B_PCH_PCR_PSFX_T1_SHDW_PCIEN_IOEN BIT0 ///< IO decoding enable #define B_PCH_PCR_PSFX_TX_AGENT_FUNCTION_CONFIG_DEVICE 0x01F0 ///< device number #define N_PCH_PCR_PSFX_TX_AGENT_FUNCTION_CONFIG_DEVICE 4 #define B_PCH_PCR_PSFX_TX_AGENT_FUNCTION_CONFIG_FUNCTION (BIT3 | BIT2 | BIT1) ///< function number #define N_PCH_PCR_PSFX_TX_AGENT_FUNCTION_CONFIG_FUNCTION 1 #define V_PCH_LP_PCR_PSFX_PSF_MC_AGENT_MCAST_TGT_P2SB 0x38A00 #define V_PCH_H_PCR_PSFX_PSF_MC_AGENT_MCAST_TGT_P2SB 0x38B00 // // PSF1 PCRs // // PSF1 PCH-LP Specific Base Address #define R_PCH_LP_PCR_PSF1_T0_SHDW_GBE_REG_BASE 0x0200 ///< D31F6 PSF base address (GBE) #define R_PCH_LP_PCR_PSF1_T0_SHDW_CAM_REG_BASE 0x0300 ///< D20F3 PSF base address (CAM) #define R_PCH_LP_PCR_PSF1_T0_SHDW_CSE_WLAN_REG_BASE 0x0500 ///< D22F7 PSF base address (CSME: WLAN) #define R_PCH_LP_PCR_PSF1_T0_SHDW_HECI3_REG_BASE 0x0700 ///< D22F4 PSF base address (CSME: HECI3) #define R_PCH_LP_PCR_PSF1_T0_SHDW_HECI2_REG_BASE 0x0800 ///< D22F1 PSF base address (CSME: HECI2) #define R_PCH_LP_PCR_PSF1_T0_SHDW_CSE_UMA_REG_BASE 0x0900 ///< D18F3 PSF base address (CSME: CSE UMA) #define R_PCH_LP_PCR_PSF1_T0_SHDW_HECI1_REG_BASE 0x0A00 ///< D22F0 PSF base address (CSME: HECI1) #define R_PCH_LP_PCR_PSF1_T0_SHDW_KT_REG_BASE 0x0B00 ///< D22F3 PSF base address (CSME: KT) #define R_PCH_LP_PCR_PSF1_T0_SHDW_IDER_REG_BASE 0x0C00 ///< D22F2 PSF base address (CSME: IDER) #define R_PCH_LP_PCR_PSF1_T0_SHDW_CLINK_REG_BASE 0x0D00 ///< D18F1 PSF base address (CSME: CLINK) #define R_PCH_LP_PCR_PSF1_T0_SHDW_PMT_REG_BASE 0x0E00 ///< D18F2 PSF base address (CSME: PMT) #define R_PCH_LP_PCR_PSF1_T0_SHDW_KVM_REG_BASE 0x0F00 ///< D18F0 PSF base address (CSME: KVM) #define R_PCH_LP_PCR_PSF1_T0_SHDW_SATA_REG_BASE 0x1000 ///< PCH-LP D23F0 PSF base address (SATA) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE12_REG_BASE 0x2000 ///< PCH-LP D29F3 PSF base address (PCIE PORT 12) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE11_REG_BASE 0x2100 ///< PCH-LP D29F2 PSF base address (PCIE PORT 11) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE10_REG_BASE 0x2200 ///< PCH-LP D29F1 PSF base address (PCIE PORT 10) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE09_REG_BASE 0x2300 ///< PCH-LP D29F0 PSF base address (PCIE PORT 09) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE08_REG_BASE 0x2400 ///< PCH-LP D28F7 PSF base address (PCIE PORT 08) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE07_REG_BASE 0x2500 ///< PCH-LP D28F6 PSF base address (PCIE PORT 07) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE06_REG_BASE 0x2600 ///< PCH-LP D28F5 PSF base address (PCIE PORT 06) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE05_REG_BASE 0x2700 ///< PCH-LP D28F4 PSF base address (PCIE PORT 05) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE04_REG_BASE 0x2800 ///< PCH-LP D28F3 PSF base address (PCIE PORT 04) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE03_REG_BASE 0x2900 ///< PCH-LP D28F2 PSF base address (PCIE PORT 03) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE02_REG_BASE 0x2A00 ///< PCH-LP D28F1 PSF base address (PCIE PORT 02) #define R_PCH_LP_PCR_PSF1_T1_SHDW_PCIE01_REG_BASE 0x2B00 ///< PCH-LP D28F0 PSF base address (PCIE PORT 01) // PSF1 PCH-H Specific Base Address #define R_PCH_H_PCR_PSF1_T0_SHDW_CSE_WLAN_REG_BASE 0x0200 ///< D22F7 PSF base address (CSME: WLAN) #define R_PCH_H_PCR_PSF1_T0_SHDW_HECI3_REG_BASE 0x0300 ///< SPT-H D22F4 PSF base address (CSME: HECI3) #define R_PCH_H_PCR_PSF1_T0_SHDW_HECI2_REG_BASE 0x0400 ///< SPT-H D22F1 PSF base address (CSME: HECI2) #define R_PCH_H_PCR_PSF1_T0_SHDW_CSE_UMA_REG_BASE 0x0500 ///< D18F3 PSF base address (CSME: CSE UMA) #define R_PCH_H_PCR_PSF1_T0_SHDW_HECI1_REG_BASE 0x0600 ///< SPT-H D22F0 PSF base address (CSME: HECI1) #define R_PCH_H_PCR_PSF1_T0_SHDW_KT_REG_BASE 0x0700 ///< SPT-H D22F3 PSF base address (CSME: KT) #define R_PCH_H_PCR_PSF1_T0_SHDW_IDER_REG_BASE 0x0800 ///< SPT-H D22F2 PSF base address (CSME: IDER) #define R_PCH_H_PCR_PSF1_T0_SHDW_PMT_REG_BASE 0x0900 ///< D18F2 PSF base address (CSME: PMT) #define R_PCH_H_PCR_PSF1_T0_SHDW_IEPMT_REG_BASE 0x0A00 ///< D16F5 PSF base address (CSME: IEPMT) #define R_PCH_H_PCR_PSF1_T0_SHDW_SATA_REG_BASE 0x0B00 ///< D23F0 PSF base address (SATA) #define R_PCH_H_PCR_PSF1_T0_SHDW_sSATA_REG_BASE 0x0C00 ///< D17F5 PSF base address (sSATA) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE20_REG_BASE 0x2000 ///< PCH-H D27F3 PSF base address (PCIE PORT 20) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE19_REG_BASE 0x2100 ///< PCH-H D27F2 PSF base address (PCIE PORT 19) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE18_REG_BASE 0x2200 ///< PCH-H D27F1 PSF base address (PCIE PORT 18) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE17_REG_BASE 0x2300 ///< PCH-H D27F0 PSF base address (PCIE PORT 17) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE16_REG_BASE 0x2400 ///< PCH-H D29F7 PSF base address (PCIE PORT 16) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE15_REG_BASE 0x2500 ///< PCH-H D29F6 PSF base address (PCIE PORT 15) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE14_REG_BASE 0x2600 ///< PCH-H D29F5 PSF base address (PCIE PORT 14) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE13_REG_BASE 0x2700 ///< PCH-H D29F4 PSF base address (PCIE PORT 13) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE12_REG_BASE 0x2800 ///< PCH-H D29F3 PSF base address (PCIE PORT 10) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE11_REG_BASE 0x2900 ///< PCH-H D29F2 PSF base address (PCIE PORT 11) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE10_REG_BASE 0x2A00 ///< PCH-H D29F1 PSF base address (PCIE PORT 10) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE09_REG_BASE 0x2B00 ///< PCH-H D29F0 PSF base address (PCIE PORT 09) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE08_REG_BASE 0x2C00 ///< PCH-H D28F7 PSF base address (PCIE PORT 08) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE07_REG_BASE 0x2D00 ///< PCH-H D28F6 PSF base address (PCIE PORT 07) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE06_REG_BASE 0x2E00 ///< PCH-H D28F5 PSF base address (PCIE PORT 06) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE05_REG_BASE 0x2F00 ///< PCH-H D28F4 PSF base address (PCIE PORT 05) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE04_REG_BASE 0x3000 ///< PCH-H D28F3 PSF base address (PCIE PORT 04) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE03_REG_BASE 0x3100 ///< PCH-H D28F2 PSF base address (PCIE PORT 03) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE02_REG_BASE 0x3200 ///< PCH-H D28F1 PSF base address (PCIE PORT 02) #define R_PCH_H_PCR_PSF1_T1_SHDW_PCIE01_REG_BASE 0x3300 ///< PCH-H D28F0 PSF base address (PCIE PORT 01) // Other PSF1 PCRs definition #define R_PCH_H_PCR_PSF1_T0_SHDW_SATA_VS_CAP_VR_RS0_D23_F0_OFFSET16 0x1024 #define R_PCH_H_PCR_PSF1_T0_SHDW_SATA_MMIOPI_VR_RS0_D23_F0_OFFSET16 0x1030 #define R_PCH_H_PCR_PSF1_PSF_PORT_CONFIG_PG1_PORT7 0x4040 ///< PSF Port Configuration Register #define R_PCH_LP_PCR_PSF1_PSF_PORT_CONFIG_PG1_PORT7 0x403C ///< PSF Port Configuration Register #define R_PCH_LP_PCR_PSF1_PSF_MC_CONTROL_MCAST0_EOI 0x4050 ///< Multicast Control Register #define R_PCH_LP_PCR_PSF1_PSF_MC_AGENT_MCAST0_TGT0_EOI 0x4060 ///< Destination ID #define R_PCH_H_PCR_PSF1_PSF_MC_CONTROL_MCAST0_EOI 0x4054 ///< Multicast Control Register #define R_PCH_H_PCR_PSF1_PSF_MC_AGENT_MCAST0_TGT0_EOI 0x406C ///< Destination ID //PSF 1 Multicast Message Configuration #define R_PCH_PCR_PSF1_RC_OWNER_RS0 0x4008 ///< Destination ID #define B_PCH_PCR_PSF1_TARGET_CHANNELID 0xFF #define B_PCH_PCR_PSF1_TARGET_PORTID 0x7F00 #define N_PCH_PCR_PSF1_TARGET_PORTID 8 #define B_PCH_PCR_PSF1_TARGET_PORTGROUPID BIT15 #define N_PCH_PCR_PSF1_TARGET_PORTGROUPID 15 #define B_PCH_PCR_PSF1_TARGET_PSFID 0xFF0000 #define N_PCH_PCR_PSF1_TARGET_PSFID 16 #define B_PCH_PCR_PSF1_TARGET_CHANMAP BIT31 #define V_PCH_PCR_PSF1_RC_OWNER_RS0_CHANNELID 0 #define V_PCH_PCR_PSF1_RC_OWNER_RS0_PORTID 10 #define V_PCH_PCR_PSF1_RC_OWNER_RS0_PORTGROUPID_DOWNSTREAM 1 #define V_PCH_PCR_PSF1_RC_OWNER_RS0_PSFID_PMT 0 #define V_PCH_PCR_PSF1_RC_OWNER_RS0_PSFID_PSF1 1 #define R_PCH_LP_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGT0_MCTP1 0x409C ///< Destination ID #define R_PCH_H_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGT0_MCTP1 0x40D0 ///< Destination ID #define R_PCH_H_PCR_PSF5_PSF_MC_AGENT_MCAST0_RS0_TGT0_MCTP0 0x404C ///< Destination ID #define R_PCH_H_PCR_PSF6_PSF_MC_AGENT_MCAST0_RS0_TGT0_MCTP0 0x4050 ///< Destination ID #define V_PCH_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGTX_MCTP1_PORTGROUPID_UPSTREAM 0 #define V_PCH_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGTX_MCTP1_PORTGROUPID_DOWNSTREAM 1 #define V_PCH_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGTX_MCTP1_PSFID_PSF1 1 #define R_PCH_H_PCR_PSF1_PSF_MC_CONTROL_MCAST1_RS0_MCTP1 0x4060 ///< Multicast Control Register #define R_PCH_LP_PCR_PSF1_PSF_MC_CONTROL_MCAST1_RS0_MCTP1 0x4058 ///< Multicast Control Register #define R_PCH_H_PCR_PSF5_PSF_MC_CONTROL_MCAST0_RS0_MCTP0 0x4040 ///< Multicast Control Register #define R_PCH_H_PCR_PSF6_PSF_MC_CONTROL_MCAST0_RS0_MCTP0 0x4044 ///< Multicast Control Register #define B_PCH_PCR_PSF1_PSF_MC_CONTROL_MCAST1_RS0_MCTP1_MULTCEN BIT0 #define B_PCH_PCR_PSF1_PSF_MC_CONTROL_MCAST1_RS0_MCTP1_NUMMC 0xFE #define N_PCH_PCR_PSF1_PSF_MC_CONTROL_MCAST1_RS0_MCTP1_NUMMC 1 #define V_PCH_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGTX_MCTP1_CHANNELID_DMI 0 #define V_PCH_PCR_PSF1_PSF_MC_AGENT_MCAST1_RS0_TGTX_MCTP1_PORTID_DMI 0 #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_VR_RS0_D23_F0 0x4240 ///< VR #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_PMT_RS0_D18_F2 0x4248 ///< PMT #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_PTIO_RS0_D22_F2 0x424C ///< PTIO #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_PTIO_RS0_D22_F3 0x4250 ///< PTIO #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_CSE_RS0_D22_F0 0x4254 ///< CSE #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_CSE_RS0_D18_F3 0x4258 ///< CSE #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_CSE_RS0_D22_F1 0x425C ///< CSE #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_CSE_RS0_D22_F4 0x4260 ///< CSE #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_CSE_RS0_D22_F7 0x4264 ///< CSE #define R_PCH_PCR_PSF1_T0_AGENT_FUNCTION_CONFIG_CSE_RS0_D18_F4 0x4268 ///< CSE #define B_PCH_PCR_PSFX_TX_AGENT_FUNCTION_CONFIG_IFR BIT0 ///< IFR #define R_PCH_PCR_PSF1_RS_IFR 0x42C0 ///< This register can be used to reset all functions in a particular Root Space simultaneously // // controls the PCI configuration header of a PCI function // #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F0 0x4198 ///< SPA #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F1 0x419C ///< SPA #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F2 0x41A0 ///< SPA #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F3 0x41A4 ///< SPA #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F4 0x41A8 ///< SPB #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F5 0x41AC ///< SPB #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F6 0x41B0 ///< SPB #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F7 0x41B4 ///< SPB #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F0 0x41B8 ///< SPC #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F1 0x41BC ///< SPC #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F2 0x41C0 ///< SPC #define R_PCH_LP_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F3 0x41C4 ///< SPC #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F0 0x426C ///< SPA #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F1 0x4270 ///< SPA #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F2 0x4274 ///< SPA #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPA_D28_F3 0x4278 ///< SPA #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F4 0x427C ///< SPB #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F5 0x4280 ///< SPB #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F6 0x4284 ///< SPB #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPB_D28_F7 0x4288 ///< SPB #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F0 0x428C ///< SPC #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F1 0x4290 ///< SPC #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F2 0x4294 ///< SPC #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPC_D29_F3 0x4298 ///< SPC #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPD_D29_F4 0x429C ///< SPD #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPD_D29_F5 0x42A0 ///< SPD #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPD_D29_F6 0x42A4 ///< SPD #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPD_D29_F7 0x42A8 ///< SPD #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPE_D27_F0 0x42AC ///< SPE #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPE_D27_F1 0x42B0 ///< SPE #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPE_D27_F2 0x42B4 ///< SPE #define R_PCH_H_PCR_PSF1_T1_AGENT_FUNCTION_CONFIG_SPE_D27_F3 0x42B8 ///< SPE // // PSF1 grant count registers // #define R_PCH_LP_PSF1_DEV_GNTCNT_RELOAD_DGCR0 0x41CC #define R_PCH_LP_PSF1_TARGET_GNTCNT_RELOAD_PG1_TGT0 0x45D0 #define R_PCH_H_PSF1_DEV_GNTCNT_RELOAD_DGCR0 0x42C0 #define R_PCH_H_PSF1_TARGET_GNTCNT_RELOAD_PG1_TGT0 0x47AC // // PSF2 PCRs (PID:PSF2) // #define R_PCH_PCR_PSF2_T0_SHDW_TRH_REG_BASE 0x0100 ///< D20F2 PSF base address (Thermal). // LP&H // PSF2 PCH-LP Specific Base Address #define R_PCH_LP_PCR_PSF2_T0_SHDW_UFS_REG_BASE 0x0200 ///< D30F7 PSF base address (SCC: UFS) #define R_PCH_LP_PCR_PSF2_T0_SHDW_SDCARD_REG_BASE 0x0300 ///< D30F6 PSF base address (SCC: SDCard) #define R_PCH_LP_PCR_PSF2_T0_SHDW_SDIO_REG_BASE 0x0400 ///< D30F5 PSF base address (SCC: SDIO) #define R_PCH_LP_PCR_PSF2_T0_SHDW_EMMC_REG_BASE 0x0500 ///< D30F4 PSF base address (SCC: eMMC) #define R_PCH_LP_PCR_PSF2_T0_SHDW_OTG_REG_BASE 0x0600 ///< D20F1 PSF base address (USB device controller: OTG) #define R_PCH_LP_PCR_PSF2_T0_SHDW_XHCI_REG_BASE 0x0700 ///< D20F0 PSF base address (XHCI) // PSF2 PCH-H Specific Base Address #define R_PCH_H_PCR_PSF2_T0_SHDW_OTG_REG_BASE 0x0200 ///< D20F1 PSF base address (USB device controller: OTG) #define R_PCH_H_PCR_PSF2_T0_SHDW_XHCI_REG_BASE 0x0300 ///< D20F0 PSF base address (XHCI) // // PSF3 PCRs (PID:PSF3) // #define R_PCH_PCR_PSF3_T0_SHDW_HECI3_REG_BASE 0x0100 ///< D16F4 PSF base address (IE: HECI3) #define R_PCH_PCR_PSF3_T0_SHDW_HECI2_REG_BASE 0x0200 ///< D16F1 PSF base address (IE: HECI2) #define R_PCH_PCR_PSF3_T0_SHDW_HECI1_REG_BASE 0x0400 ///< D16F0 PSF base address (IE: HECI1) #define R_PCH_PCR_PSF3_T0_SHDW_KT_REG_BASE 0x0500 ///< D16F3 PSF base address (IE: KT) #define R_PCH_PCR_PSF3_T0_SHDW_IDER_REG_BASE 0x0600 ///< D16F2 PSF base address (IE: IDER) #define R_PCH_PCR_PSF3_T0_SHDW_P2SB_REG_BASE 0x0700 ///< D31F1 PSF base address (P2SB) #define R_PCH_PCR_PSF3_T0_SHDW_TRACE_HUB_ACPI_REG_BASE 0x0800 ///< D20F4 PSF base address (TraceHub ACPI) #define R_PCH_PCR_PSF3_T0_SHDW_TRACE_HUB_REG_BASE 0x0900 ///< D31F7 PSF base address (TraceHub PCI) #define R_PCH_PCR_PSF3_T0_SHDW_LPC_REG_BASE 0x0A00 ///< D31F0 PSF base address (LPC) #define R_PCH_PCR_PSF3_T0_SHDW_SMBUS_REG_BASE 0x0B00 ///< D31F4 PSF base address (SMBUS) #define R_PCH_PCR_PSF3_T0_SHDW_PMC_REG_BASE 0x0E00 ///< D31F2 PSF base address (PMC) #define R_PCH_PCR_PSF3_T0_SHDW_SPI_SPI_REG_BASE 0x1300 ///< D31F5 PSF base address (SPI SPI) #define R_PCH_H_PCR_PSF3_T0_SHDW_GBE_REG_BASE 0x1600 ///< D31F6 PSF base address (GBE) #define R_PCH_PCR_PSF3_T0_SHDW_AUD_REG_BASE 0x1800 ///< D31F3 PSF base address (HDA, ADSP) #define R_PCH_PCR_PSF3_T0_SHDW_AUD_PCIEN 0x181C ///< D31F3 PCI Configuration space enable bits (HDA, ADSP) #define R_PCH_PCR_PSF3_T0_SHDW_MROM1_REG_BASE 0x1A00 ///< D17F1 PSF base address (MROM1) #define B_PCH_PCR_PSF3_T0_SHDW_AUD_PCIEN_FUNDIS BIT8 ///< D31F3 Function Disable #define R_PCH_PSF3_T0_SHDW_AUD_RS1_D24_F0_BASE 0x1700 ///< RS1D24F0 PSF base address (HDA) #define R_PCH_PCR_PSF3_T0_AGENT_FUNCTION_CONFIG_GBE_RS0_D31_F6 0x40F8 ///< GBE #define R_PCH_PCR_PSF3_PSF_MC_CONTROL_MCAST0_EOI 0x4058 ///< Multicast Control Register #define R_PCH_PCR_PSF3_PSF_MC_AGENT_MCAST0_TGT0_EOI 0x4064 ///< Destination ID #endif
e465500bb0125a56b1890abe81860e720f167344
9608919979b73824fc9c877e4c30f076781b8205
/OptimisationStudies/Plots/JetEnergyResolutions/JER_vs_MagneticFieldStrength_360GeV_DiJet_Breakdown.C
0f7c78fbfad3c9a84428486bc3bd122c8a67e1c6
[]
no_license
StevenGreen1/Thesis
cb6ad5d3dc7a369a659c85bde7506765c971f591
2b9e749d95404dbc83609cc51ce20d11878395b5
refs/heads/master
2021-01-21T15:19:39.244177
2017-11-23T09:32:16
2017-11-23T09:32:16
58,470,579
0
0
null
null
null
null
UTF-8
C
false
false
4,401
c
JER_vs_MagneticFieldStrength_360GeV_DiJet_Breakdown.C
{ gStyle->SetOptStat(0); TCanvas *pCanvasEj = new TCanvas(); pCanvasEj->SetTopMargin(0.05); pCanvasEj->SetRightMargin(0.05); pCanvasEj->cd(); TH2F *pAxesEj = new TH2F("axesEj","",1200,0.5,5.5,12000,0,6); pAxesEj->GetYaxis()->SetTitle("RMS_{90}(E_{j}) / Mean_{90}(E_{j}) [%]"); pAxesEj->GetYaxis()->SetTitleOffset(0.8); pAxesEj->GetYaxis()->SetDecimals(); pAxesEj->GetYaxis()->SetTitleSize(0.05); pAxesEj->GetYaxis()->SetLabelSize(0.05); pAxesEj->GetXaxis()->SetTitle("Magnetic Field Strength [T]"); pAxesEj->GetXaxis()->SetTitleOffset(0.95); pAxesEj->GetXaxis()->SetDecimals(); pAxesEj->GetXaxis()->SetTitleSize(0.05); pAxesEj->GetXaxis()->SetLabelSize(0.05); pAxesEj->Draw(); float xAxisVairable[9] = {1,1.5,2,2.5,3,3.5,4,4.5,5}; float xAxisVairableError[9] = {0,0,0,0,0,0,0,0,0}; float Pandora_Settings_Default_JER[9] = {3.61798,3.47626,3.25132,3.13399,3.01075,2.84624,2.80579,2.72983,2.67988}; float Pandora_Settings_PerfectPFA_JER[9] = {2.00645,1.84881,1.75397,1.76674,1.76591,1.79003,1.75838,1.78577,1.81116}; float Pandora_Settings_TotalConfusion_JER[9] = {3.01063742053,2.94385549433,2.73763967342,2.58853686327,2.43847850809,2.2128883245,2.18644855867,2.0647027234,1.97521043659}; float Pandora_Settings_PhotonConfusion_JER[9] = {1.41809737677,1.36540904245,1.30488193412,1.1096696799,1.07341005795,1.01562417296,0.923051662693,0.903777657668,0.822962734454}; float Pandora_Settings_Default_JERError[9] = {0.0460823,0.0442773,0.0414122,0.0399178,0.038348,0.0363619,0.0357375,0.03477,0.0341337}; float Pandora_Settings_PerfectPFA_JERError[9] = {0.0255563,0.0235484,0.0223404,0.0225031,0.0224925,0.0228684,0.0223966,0.0227455,0.0230688}; float Pandora_Settings_TotalConfusion_JERError[9] = {0.0526943609209,0.0501498311999,0.0470538323987,0.0458237691187,0.0444575934214,0.0429552070939,0.0421755291057,0.0415488509868,0.0411980370838}; float Pandora_Settings_PhotonConfusion_JERError[9] = {0.0626169029672,0.0601540687356,0.0561580583567,0.0546547683667,0.0524805022522,0.0497590592529,0.0491541111798,0.0478059406097,0.0471197549862}; TLegend *pLegend = new TLegend(0.15, 0.70, 0.9, 0.925); pLegend->SetNColumns(2); pLegend->SetTextSize(0.05); TGraphErrors *pTGraphErrors_Pandora_SettingsDefault = new TGraphErrors(9,xAxisVairable,Pandora_Settings_Default_JER,xAxisVairableError,Pandora_Settings_Default_JERError); pTGraphErrors_Pandora_SettingsDefault->SetLineColor(1); pTGraphErrors_Pandora_SettingsDefault->SetMarkerColor(1); pTGraphErrors_Pandora_SettingsDefault->Draw("lp,same"); pLegend->AddEntry(pTGraphErrors_Pandora_SettingsDefault, "#splitline{Standard}{Reconstruction}", "lp"); TGraphErrors *pTGraphErrors_Pandora_SettingsPerfectPFA = new TGraphErrors(9,xAxisVairable,Pandora_Settings_PerfectPFA_JER,xAxisVairableError,Pandora_Settings_PerfectPFA_JERError); pTGraphErrors_Pandora_SettingsPerfectPFA->SetLineColor(4); pTGraphErrors_Pandora_SettingsPerfectPFA->SetMarkerColor(4); pTGraphErrors_Pandora_SettingsPerfectPFA->Draw("lp,same"); pLegend->AddEntry(pTGraphErrors_Pandora_SettingsPerfectPFA, "#splitline{Intrinsic Energy}{Resolution}", "lp"); TGraphErrors *pTGraphErrors_Pandora_SettingsTotalConfusion = new TGraphErrors(9,xAxisVairable,Pandora_Settings_TotalConfusion_JER,xAxisVairableError,Pandora_Settings_TotalConfusion_JERError); pTGraphErrors_Pandora_SettingsTotalConfusion->SetLineColor(2); pTGraphErrors_Pandora_SettingsTotalConfusion->SetMarkerColor(2); pTGraphErrors_Pandora_SettingsTotalConfusion->Draw("lp,same"); pLegend->AddEntry(pTGraphErrors_Pandora_SettingsTotalConfusion, "Total Confusion", "lp"); TGraphErrors *pTGraphErrors_Pandora_SettingsPhotonConfusion = new TGraphErrors(9,xAxisVairable,Pandora_Settings_PhotonConfusion_JER,xAxisVairableError,Pandora_Settings_PhotonConfusion_JERError); pTGraphErrors_Pandora_SettingsPhotonConfusion->SetLineColor(kMagenta); pTGraphErrors_Pandora_SettingsPhotonConfusion->SetMarkerColor(kMagenta); pTGraphErrors_Pandora_SettingsPhotonConfusion->Draw("lp,same"); pLegend->AddEntry(pTGraphErrors_Pandora_SettingsPhotonConfusion, "Photon Confusion", "lp"); pLegend->SetFillStyle(0); pLegend->Draw("same"); pCanvasEj->SaveAs("JER_vs_MagneticFieldStrength_360GeV_DiJet_Breakdown.pdf"); }
9d462a41165e21b3c3ca1268ab08bf2dd0819c00
d5e86cf64c203750ed7707b755a729327c3f9d18
/stack.c
86110cf24948d8789c646fe56372eada257d5bfa
[]
no_license
bearlhl/Linux_final_test
1f69e0fb8d65f685543290f22f516d6568670c49
c9a0ead206206a1d163d9d40ce248b06f3ea0633
refs/heads/master
2021-01-22T22:02:49.012964
2017-05-31T07:46:15
2017-05-31T07:46:15
92,751,373
0
0
null
null
null
null
UTF-8
C
false
false
1,752
c
stack.c
#include<stdio.h> #include<stdlib.h> #include"stack.h" //创建一个空栈,里面没有任何有效数据; void Create_Stack(PSTACK S) { S->pBottom=(struct Node *)malloc(sizeof(struct Node)); if(NULL==S->pBottom) { printf("Memory allocation failure"); exit(-1); } S->pTop=S->pBottom; S->pTop->data=0; S->pTop->pNext=NULL; //防止出现野指针 } //进栈 void Push_Stack(PSTACK S,int val) { PNODE p=(struct Node *)malloc(sizeof(struct Node)); if(NULL==p) { printf("Memory allocation failure"); exit(-1); } p->data=val; p->pNext=S->pTop; //让p的指针域指向上一个节点 S->pTop=p; //让pTop指针指向栈顶元素 } //打印出栈里面的元素 void Traverse_Stack(PSTACK S) { PNODE p=S->pTop; printf("栈中的元素是:\n"); while(p!=S->pBottom) { printf("%d ",p->data); p=p->pNext; } printf("\n"); } bool Is_Empty(PSTACK pS) { if (pS->pTop == pS->pBottom) return true; else return false; } bool Pop_Stack(PSTACK S,int *val) { if(Is_Empty(S)) return false; else { PNODE p=S->pTop; *val=S->pTop->data; S->pTop=S->pTop->pNext; //使pTop指针指向栈顶元素; free(p); //释放p指针所指向的那个节点的内存; p=NULL; //要养成好的习惯; return true; } } void Clear_Stack(PSTACK S) { if(Is_Empty(S)) return; else { PNODE p=NULL; //养成一好习惯,定义指针记得初始化; while(S->pTop!=S->pBottom) { p=S->pTop; S->pTop=S->pTop->pNext; free(p); p=NULL; } } }
45e89ac4cb31f1b9e5c37ad0d962777a27bab823
ea7ac6b27714158225b349e6d418ca0a130d0653
/09_EXTI_JOGSW_LED_TOGGLE_HAL_main.c
a7b9736a18ac036aadb63077016bfaa0953e2c5e
[]
no_license
husker1984/Hardware-STM32F405
bad9178ee678f00810a4870f386d2b37b120e0a8
c7bb820b9c1a9e43987c82fc5004dced2419adb1
refs/heads/master
2020-04-04T16:47:26.978314
2017-09-07T08:11:22
2017-09-07T08:11:22
null
0
0
null
null
null
null
UTF-8
C
false
false
4,021
c
09_EXTI_JOGSW_LED_TOGGLE_HAL_main.c
/* * This file is part of the 쨉OS++ distribution. * (https://github.com/micro-os-plus) * Copyright (c) 2014 Liviu Ionescu. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include "diag/Trace.h" // ---------------------------------------------------------------------------- // // Standalone STM32F4 empty sample (trace via ITM). // // Trace support is enabled by adding the TRACE macro definition. // By default the trace messages are forwarded to the ITM output, // but can be rerouted to any device or completely suppressed, by // changing the definitions required in system/src/diag/trace_impl.c // (currently OS_USE_TRACE_ITM, OS_USE_TRACE_SEMIHOSTING_DEBUG/_STDOUT). // // ----- main() --------------------------------------------------------------- // Sample pragmas to cope with warnings. Please note the related line at // the end of this function, used to pop the compiler diagnostics status. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wmissing-declarations" #pragma GCC diagnostic ignored "-Wreturn-type" //;************************************************************************************** //;* 09_EXTI_JOGSW_LED_ON_OFF_HAL //;* //;* 이 프로그램은 PB2에 연결된 JOGSW_CEN에서 상승에지가 발생할 때마다 LED1,LED2를 ON/OFF한다 //;* Target: stm32f4 //;************************************************************************************** #include "stm32f4xx_hal.h" //관련 레지스터의 주소 지정 #include "stm32f4xx_it.h" //인터럽트 사용에 필요한 헤더파일 GPIO_InitTypeDef LED; GPIO_InitTypeDef JOG_CEN; void EXTILine2_Config(void) { /* Enable GPIOB clock */ __HAL_RCC_GPIOB_CLK_ENABLE(); /* Configure PB2 pin as input floating */ JOG_CEN.Pin = GPIO_PIN_2; JOG_CEN.Mode = GPIO_MODE_IT_RISING; JOG_CEN.Pull = GPIO_NOPULL; JOG_CEN.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(GPIOB, &JOG_CEN); /* Enable and set EXTI Line15 Interrupt to the lowest priority */ HAL_NVIC_SetPriority(EXTI2_IRQn, 2, 0); HAL_NVIC_EnableIRQ(EXTI2_IRQn); } /*메인루틴*/ int main(int argc, char* argv[]) { /*##-1- Enable GPIOA Clock (to be able to program the configuration registers) */ __HAL_RCC_GPIOA_CLK_ENABLE(); // LED1(PA2), LED2(PA3) /*##-2- Configure PA2, PA3 IO in output push-pull mode to drive external LED ###*/ LED.Pin = GPIO_PIN_2 | GPIO_PIN_3; LED.Mode = GPIO_MODE_OUTPUT_PP; LED.Pull = GPIO_NOPULL; LED.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(GPIOA, &LED); /* Configure EXTI Line2 (connected to PB2 pin) in interrupt mode */ EXTILine2_Config(); while (1); } /*인터럽트 루틴*/ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_2); HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_3); } // ----------------------------------------------------------------------------
9fd595546ca0bfc0920c5ebf18a82fc688322128
c9ecf7c629857cef2f2f7f3616eaf7c575980377
/src/Biblioteca.h
d38d234c3b42989656092d79c6d98ed8bb7de272
[]
no_license
FranciscoTf/TP-1
ad451846bc7ea039fdea390dc20782dcc9c6a04d
1dfe4f9010477a0479b50d67759bd9db88541ad4
refs/heads/main
2023-08-14T19:11:17.577278
2021-09-26T02:05:42
2021-09-26T02:05:42
410,411,536
0
0
null
null
null
null
UTF-8
C
false
false
416
h
Biblioteca.h
/* * Biblioteca.h * Author: Francisco Thomas Faig * Description : Prototipos */ #ifndef BIBLIOTECA_H_ #define BIBLIOTECA_H_ float IngresarFlotante(); float Sumar(float operandoA, float operandoB); float Restar(float operandoA, float operandoB); float Multiplicar(float operandoA, float operandoB); float Dividir(float operandoA, float operandoB); int Factoriar(float operando); #endif /* BIBLIOTECA_H_ */
f29bf953927a7a1615bf88c188cc6776fb1e8fd2
81b7f7d97b19a135091744a074de0e491f2a3328
/evolveLPT.H
fbdf02896cd0d3aba081fb6f4c2dbdea77ecb18b
[]
no_license
AlexLadino/pimpleLPTTKEFoam3
ad354c833cee81b9c3bed07229667f548155b401
f96971c091c17f5b5c2ece9f7deeb927ec758d4f
refs/heads/master
2023-09-05T14:01:24.085064
2021-10-27T18:22:41
2021-10-27T18:22:41
null
0
0
null
null
null
null
UTF-8
C
false
false
104
h
evolveLPT.H
Info<< "\nEvolving " << kinematicCloud3.name() << endl; kinematicCloud3.evolve();
1d920cfc5674c9899a19952949c9387da081cc18
b3655f5ebbc28d106af603569ad2ed8a1bd39d60
/c2/arraylist.c
1d4b920fb29085b61069254e1dfa89893259a370
[]
no_license
vfwz/C-quick-learn
08ea7579d77afb7999274276b0aab2e002503bf9
7952d6a7ee028478b83f96300e97b9c9a7586ebe
refs/heads/master
2020-03-27T23:30:47.825676
2018-09-12T10:03:18
2018-09-12T10:03:18
147,323,582
0
0
null
null
null
null
GB18030
C
false
false
1,646
c
arraylist.c
Status InitList(SqList *L) { (*L).data = (ElemType*)malloc(MaxSize*sizeof(ElemType)); (*L).length = 0; return OK; } Status ListGet(SqList L, int i, ElemType *e) { if(i<1 || i > L.length-1) return ERROR; *e = L.data[i-1]; return OK; } // 本算法实现将元素e插入到顺序表L中的第i个位置 Status ListAdd(SqList *L, ElemType e) { int j; if((*L).length>=MaxSize) // 当前存储空间已满,不能插入 return ERROR; (*L).data[(*L).length] = e; // 在表尾放入e (*L).length++; // 线性表长度加1 return OK; } // 本算法实现将元素e插入到顺序表L中的第i个位置 Status ListInsert(SqList L, int i, ElemType *e) { int j; if(i<1 || i>L.length+1) // 判断i的范围是否有效 return ERROR; if(L.length>=MaxSize) // 当前存储空间已满,不能插入 return ERROR; for(j=L.length; j>=i; j--) // 将第i个元素及之后的元素后移 L.data[j] = L.data[j-1]; L.data[i-1] = *e; // 在位置i处放入e L.length++; // 线性表长度加1 return OK; } // 本算法实现删除顺序表L中的第i个位置的元素 Status ListDelete(SqList L, int i, ElemType e) { int j; if(i<1 || i>L.length+1) // 判断i的范围是否有效 return ERROR; e = L.data[i-1]; // 将被删除的元素赋值给e for(j=i; j<L.length; j++) L.data[j-1] = L.data[j];// 将第i个位置之后的元素前移 L.length--; return OK; } void PrintList(SqList L){ int i; if(L.length == 0){ printf("----Empty SqList----\n"); } else{ printf("----SqList----\n"); for(i=0; i<L.length; i++){ printf("[%d]:[%d]", i, L.data[i]); } printf("----SqList----\n"); } }
d11682e3d837ca9d467559ece4f3746cfb5ba9ef
35f13483248ca0b30af09748c76d606cf5271a27
/filesystem/ifile.h
40a35d957b74333171f8fe4d0596ad19cd148db6
[]
no_license
marcbal/M1S1-ASE
039b18ab0152ada91534a2c438ca660fe4781076
07ef4a6ee1201e59ee3488439c91ccb1299a8873
refs/heads/master
2021-01-11T14:51:43.597464
2017-01-27T18:57:38
2017-01-27T19:02:23
80,236,138
0
1
null
null
null
null
UTF-8
C
false
false
1,432
h
ifile.h
#ifndef IFILE_H #define IFILE_H #include <inttypes.h> #include "primtypes.h" #include "fs.h" #define READ_EOF -1 #define READ_INVALID -2 #define WRITE_NO_FREE_SPACE -1 #define WRITE_INVALID -2 typedef struct file_desc_t{ uint32_t id; uint32_t inode; file_type_e type; uint64_t size; uint64_t storedSize; uint64_t currentPos; // current position in the file, in byte uint32_t currentPosInBuffer; // current position in the current buffer, in byte uint64_t bufferPos; // position, in byte from the begining of the file, of the first byte of the buffer uint32_t bufferIndex; // block index of the current buffer in the file uint32_t bufferBlock; // block position of the current buffer in the volume unsigned char* buffer; bool bufferModified; } file_desc_t; void ifile_init(); uint32_t ifile_create(file_type_e type); int ifile_delete(uint32_t inumber); int ifile_truncate(uint32_t inumber); /** * return 1 if ok, 0 otherwise */ int ifile_open(file_desc_t *fd, uint32_t inumber); void ifile_close(file_desc_t *fd); void ifile_flush(file_desc_t *fd); void ifile_seek(file_desc_t *fd, int64_t r_offset); /* relatif */ void ifile_seek2(file_desc_t *fd, uint64_t a_offset); /* absolu */ int ifile_readc(file_desc_t *fd); int ifile_read(file_desc_t *fd, void *buf, unsigned int nbyte); int ifile_writec(file_desc_t *fd, char c); int ifile_write(file_desc_t *fd, const void *buf, unsigned int nbyte); #endif
cd85bbe355800802c8cbde162c9fd951159d733c
aa718aec9ffc0da45ac3e857f6e80d64b222a99a
/CanOpen/module_canopen/src/nmt.h
07e575ebeb81f8cab685a3090fa9b651a81a9ba3
[ "LicenseRef-scancode-other-permissive" ]
permissive
yuvarajve/epl_mii_tester_scripts
d024e6090a4d310b9a235165f21fb735988f5889
bfd610f7db4bc43039108f77ca475537a38c1584
refs/heads/master
2021-01-23T15:51:28.440188
2014-01-21T11:26:07
2014-01-21T11:26:07
null
0
0
null
null
null
null
UTF-8
C
false
false
3,284
h
nmt.h
/** * The copyrights, all other intellectual and industrial * property rights are retained by XMOS and/or its licensors. * Terms and conditions covering the use of this code can * be found in the Xmos End User License Agreement. * * Copyright XMOS Ltd 2012 * * In the case where this code is a modification of existing code * under a separate license, the separate license terms are shown * below. The modifications to the code are still covered by the * copyright notice above. * **/ #ifndef __nmt_h__ #define __nmt_h__ /*--------------------------------------------------------------------------- prototypes ---------------------------------------------------------------------------*/ /*==========================================================================*/ /** * initialize is the function in order to initialize the parameters of canopen * slave using object dictionary entry * * \param sync_timer Channel connecting to can module * \param pdo_event structure with Events of PDOs * \param tpdo_inhibit_time_values Structure with Inhibit time value of TPDOs * \param sync_window_length synchronous window time * \param guard_time node guard time * \param life_time lie time of node guard * \param producer_heart_beat heartbeat time of the slave * \param heart_beat_active heartbeat active flag * \return none **/ void initialize(NULLABLE_ARRAY_OF(tx_sync_timer, sync_timer), NULLABLE_ARRAY_OF(pdo_event_timer, pdo_event), NULLABLE_ARRAY_OF(tpdo_inhibit_time, tpdo_inhibit_time_values), REFERENCE_PARAM(unsigned, sync_window_length), REFERENCE_PARAM(unsigned, guard_time), REFERENCE_PARAM(unsigned, life_time), REFERENCE_PARAM(unsigned, producer_heart_beat), REFERENCE_PARAM(char, heart_beat_active )); /*==========================================================================*/ /** * send_heartbeat_message is the function in order to transmit heartbeat * messages on the canbus * * \param c_rx_tx Channel connecting to can module * \param can_frame canframe to transmit on canbus * \param canopen_state current state of canopen node * \return none **/ void send_heartbeat_message(chanend c_rx_tx, can_frame frame, unsigned char canopen_state); /*==========================================================================*/ /** * send_nodeguard_message is the function in order to transmit nodeguard * messages on the canbus. This function will send: * * \param c_rx_tx Channel connecting to can module * \param can_frame canframe to transmit on canbus * \param toggle toggle bit that toggles with every node guard message received * \param state current state of canopen node * \return none **/ void send_nodeguard_message(chanend c_rx_tx, can_frame frame, char toggle, unsigned char state); /*==========================================================================*/ /** * send_boot_up_message is the function in order to transmit bootup * message on the canbus after initialisation * * \param c_rx_tx Channel connecting to can module * \return none **/ void send_boot_up_message(chanend c_rx_tx); #endif
08f70b142778f6821358dd33b42b5072766c8d89
7000e273664f986bb4c96e1a568c98a2a24edbb3
/Lab4/Task1/Lab.c
5bbab2889f12e0363461ae6aca50a305f5130243
[]
no_license
esinyakov/Programming-course-pt.I
07b527257ceffef73ded69706489802c776a7a36
2ac80f058d456cf95a175c8a826faaea2ddc0fda
refs/heads/master
2020-03-30T21:33:11.206730
2019-04-14T21:56:56
2019-04-14T21:56:56
151,632,222
0
0
null
null
null
null
UTF-8
C
false
false
925
c
Lab.c
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { const int n = 20, r = 100; int i, a[n]; srand((unsigned)time(NULL)); for(i = 0; i < n; i++) { a[i] = (int)(rand()%r); printf("%d ",a[i]); } int min = a[0],max =a[0]; for(i = 0; i < n; i++) { if (a[i] < min) min = a[i]; if (a[i] > max) max = a[i]; } int iminpr,imaxpr; int k = 0; for(i = 0;i < n; i++) { if (a[i]%2 == 0) { k++; if (k == 1) iminpr = i; else imaxpr = i; } } if (k < 2) printf("\nImpossible because of parity numbers less then two"); else { a[iminpr] = min; a[imaxpr] = max; printf("\nResult:\n"); for(i = 0; i < n; i++) printf("%d ",a[i]); } getch(); return 0; }
d4b4dfcfeac2953f7a1c5350d9dfcd9439152396
8ef21e125b5c2f4f2470a5311c84dc7e98a52bdf
/source/merge_sort.c
5d3a85d9aed63284832fe7005f8f006b6e0ede30
[]
no_license
Ben-Dudley/Lem_in
9cb5a71e382a85d097e3cc19a9208ddb0517840e
ed50c2ef039e6a086feb9d2b17eeacfccafa8823
refs/heads/master
2020-07-06T11:19:16.808251
2019-10-29T13:04:55
2019-10-29T13:04:55
202,999,990
0
0
null
null
null
null
UTF-8
C
false
false
2,419
c
merge_sort.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* merge_sort.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: hharrold <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/03 18:11:04 by hharrold #+# #+# */ /* Updated: 2019/10/03 18:11:51 by hharrold ### ########.fr */ /* */ /* ************************************************************************** */ #include "lem_in.h" static int length(t_link *head) { int count; t_link *current; count = 0; current = head; while (current != NULL) { count += 1; current = current->next; } return (count); } static t_link *sortedmerge(t_graph **graph, t_link *a, t_link *b) { t_link *result; result = NULL; if (a == NULL) return (b); else if (b == NULL) return (a); if (graph[0][a->node].weight <= graph[0][b->node].weight) { result = a; result->next = sortedmerge(graph, a->next, b); } else { result = b; result->next = sortedmerge(graph, a, b->next); } return (result); } static void front_back_split(t_link *source, t_link **frontref, t_link **backref) { int len; int i; t_link *current; int hopcount; current = source; len = length(source); i = 0; if (len < 2) { *frontref = source; *backref = NULL; } else { hopcount = (len - 1) / 2; while (i < hopcount) { current = current->next; i += 1; } *frontref = source; *backref = current->next; current->next = NULL; } } static void merge_sort_helper(t_graph **graph, t_link **base) { t_link *link; t_link *a; t_link *b; link = *base; if ((link == NULL) || (link->next == NULL)) return ; front_back_split(link, &a, &b); merge_sort_helper(graph, &a); merge_sort_helper(graph, &b); *base = sortedmerge(graph, a, b); } void merge_sort(t_graph **graph, t_info *info) { int i; i = 0; while (i < info->count_node) { merge_sort_helper(graph, &graph[0][i].link); i += 1; } }
29551abfeaa618d6db0b5b402b7c52b5989d636e
291518167046253d43db25706adc8b94fe2588ec
/21_piscine/rush02/ex00/srcs/ft_filetostr.c
325692b20a63119fc42fa0471ed1c712982131b2
[]
no_license
KaitekinaFune/sch21
6439604f82ce80c8108054d08a4f77884570b41f
e83581ca8aec679d2d25472bdd9fb5b0b7620670
refs/heads/master
2023-02-10T02:43:34.530439
2021-01-03T07:54:02
2021-01-03T07:54:02
295,666,434
0
0
null
null
null
null
UTF-8
C
false
false
139
c
ft_filetostr.c
#include "../includes/ft.h" char *ft_filetostr(int fd) { char *buf; buf = malloc(BUF_SIZE); read(fd, buf, BUF_SIZE); return (buf); }
f07d859a5dc75f613094c49bbc888fb139c3966c
33a82980352cf366b9c288cf8a74d2740272d90b
/nfp/net/driver/list.h
d2bfce3f2cf99753283a4fd40b8b5e843492324a
[ "MS-PL" ]
permissive
microkatz/Windows-driver-samples
d249ecb8ab1be5a05bf8644ebeaca0bf13db1dad
98a43841cb18b034c7808bc570c47556e332df2f
refs/heads/master
2022-05-09T17:42:10.796047
2022-04-20T20:47:03
2022-04-20T20:47:03
161,238,613
2
0
MS-PL
2022-04-20T20:47:03
2018-12-10T21:28:00
C
UTF-8
C
false
false
1,980
h
list.h
#pragma once FORCEINLINE VOID InitializeListHead( _Out_ PLIST_ENTRY ListHead ) { ListHead->Flink = ListHead->Blink = ListHead; } _Check_return_ BOOLEAN FORCEINLINE IsListEmpty( _In_ const LIST_ENTRY * ListHead ) { return (BOOLEAN)(ListHead->Flink == ListHead); } FORCEINLINE BOOLEAN RemoveEntryList( _In_ PLIST_ENTRY Entry ) { PLIST_ENTRY Blink; PLIST_ENTRY Flink; Flink = Entry->Flink; Blink = Entry->Blink; Blink->Flink = Flink; Flink->Blink = Blink; return (BOOLEAN)(Flink == Blink); } FORCEINLINE PLIST_ENTRY RemoveHeadList( _Inout_ PLIST_ENTRY ListHead ) { PLIST_ENTRY Flink; PLIST_ENTRY Entry; Entry = ListHead->Flink; Flink = Entry->Flink; ListHead->Flink = Flink; Flink->Blink = ListHead; return Entry; } FORCEINLINE PLIST_ENTRY RemoveTailList( _Inout_ PLIST_ENTRY ListHead ) { PLIST_ENTRY Blink; PLIST_ENTRY Entry; Entry = ListHead->Blink; Blink = Entry->Blink; ListHead->Blink = Blink; Blink->Flink = ListHead; return Entry; } FORCEINLINE VOID InsertTailList( _Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry ) { PLIST_ENTRY Blink; Blink = ListHead->Blink; Entry->Flink = ListHead; Entry->Blink = Blink; Blink->Flink = Entry; ListHead->Blink = Entry; } FORCEINLINE VOID InsertHeadList( _Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry ) { PLIST_ENTRY Flink; Flink = ListHead->Flink; Entry->Flink = Flink; Entry->Blink = ListHead; Flink->Blink = Entry; ListHead->Flink = Entry; } FORCEINLINE VOID AppendTailList( _Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY ListToAppend ) { PLIST_ENTRY ListEnd = ListHead->Blink; ListHead->Blink->Flink = ListToAppend; ListHead->Blink = ListToAppend->Blink; ListToAppend->Blink->Flink = ListHead; ListToAppend->Blink = ListEnd; }
403b4e56ee9e7b624b953fb20b106e937acc90a2
9173b58127dc611f1e9d7abfdea4525dcc6f8dfe
/complex_calc.c
b305fedf673bf9acbfea3b987b4cbfbbf06cac64
[]
no_license
JacquetThomas/Fractol
a190f63dc425b172f4d4805106891c557eb4df5a
558f5ef48f8c9adb99b884609ca0740cb0daf4e3
refs/heads/master
2021-03-27T10:43:41.341503
2019-07-02T11:22:02
2019-07-02T11:22:02
101,189,001
0
0
null
null
null
null
UTF-8
C
false
false
2,018
c
complex_calc.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* complex_calc.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cjacquet <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/08/20 11:39:26 by cjacquet #+# #+# */ /* Updated: 2017/08/27 15:46:20 by cjacquet ### ########.fr */ /* */ /* ************************************************************************** */ #include "fractol.h" t_plex c_mul(t_plex un, t_plex deux) { t_plex new; new.r = un.r * deux.r - un.i * deux.i; new.i = un.r * deux.i + un.i * deux.r; return (new); } t_plex c_add(t_plex un, t_plex deux) { t_plex new; new.r = un.r + deux.r; new.i = un.i + deux.i; return (new); } t_plex c_sous(t_plex un, t_plex deux) { t_plex new; new.r = un.r - deux.r; new.i = un.i - deux.i; return (new); } t_plex c_div(t_plex un, t_plex deux) { t_plex new; t_plex conj; t_plex tmp; conj.r = deux.r; conj.i = -deux.i; tmp = c_mul(un, conj); new.r = tmp.r / ((deux.r * deux.r) + (deux.i * deux.i)); new.i = tmp.i / ((deux.r * deux.r) + (deux.i * deux.i)); return (new); } t_plex map(int x, int y, t_env *env, int pxy) { t_plex new; if (pxy != 2) { new.r = ((float)x / W_WIDTH) * (env->max_x - env->min_x) + env->min_x; new.i = ((float)y / W_HEIGHT) * (env->max_y - env->min_y) + env->min_y; if (pxy == 1) { new.r += env->px; new.i += env->py; } } if (pxy == 2) { new.r = ((float)x / W_WIDTH) * (1 - (-1)) + (-1); new.i = ((float)y / W_HEIGHT) * (1 - (-1)) + (-1); } return (new); }
13350fa7c6e9e119385d437cdc19fb51df0f3472
9fa062dc8868accebd986dbd2b56fe82020c8e9c
/n queens/nqueens.c
e1ef3b95f30d7c892ab4d61bcefffcb345643522
[]
no_license
eugeneum99/c
62468a60846821199a747a35d5f17a9ace366c86
6a2065130503ed6a3cb8f09d1ff9ae5d97a341b8
refs/heads/master
2020-09-17T07:52:44.138928
2016-06-22T19:39:13
2016-06-22T19:39:13
null
0
0
null
null
null
null
UTF-8
C
false
false
3,397
c
nqueens.c
/* * nqueens.c * * Created on: Sep 23, 2014 * Author: Alec Webb * solves the N-queens chess problem through permutations */ #include <stdlib.h> #include <stdio.h> #include "nqueens_lib.c" #include "nqueens.h" int main() { //declare function variables int i,k,j,l; int n=0; int pass=0; double numArray[]; int minout[ARRAYLEN]; int maxout[ARRAYLEN]; double meanout[ARRAYLEN]; double ntimesn[ARRAYLEN]; double nfacout[ARRAYLEN]; double mean=0; double sizesquare=0; double nfactorial, nsq; //seed the generator srandom(RNG_SEED); //introduction message printf("Project 1, Created by: Alec Webb, Description: Solves the nqueens problem using permutations\n"); printf("---------------------------------------------------------------\n"); for(j=4; j<=ARRAYLEN; j++){ //start n loop int solutionFound=0; //used to determine first run or not int nCounter=0; //used to count number of runs for 10 solutions int pncount=0; //used to calulate current number of runs for max min functions int current=0; //for max min functions int minimum=0; //for max min comparisons int maximum=0; //for max min comparisons n=j; //set size of array nsq=j; //set size for calculations for(k=0; k<LOOPTIME; k++){ //find 10 solutions pass=0; //to continue after a first match is found pncount = nCounter; //for maxmin calc while(pass==0) { InitializeArray(numArray, n); //call initialize method randperm(numArray, n); //call randperm function pass = checkboard(numArray, n); //check the permutation nCounter++; //total# of runs } current = nCounter-pncount; //for max min,current run time if(pncount==0) //to account for a run that has not occured { //avoids min being set to 0 minimum = maximum = current; } else { minimum = min(minimum, current); //compare maximum = max(maximum, current); //compare } solutionFound++; //indicate first solution has been found if(solutionFound <=1) //handles the first and only first solution { displayboard(numArray, n); //print the solution found printf("---------------------------------------------------------------\n"); printf(" "); for(i=0; i<n; i++){ //print the numerical solution found printf("%-3.0lf", numArray[i]); } printf(": Solution for board size %d\n", n); printf("---------------------------------------------------------------\n"); } } //calculate and store relevent values mean = nCounter/10; //determine mean sizesquare = nsquared(nsq,n); //determine n^n nfactorial = factorial(n); //determine n! //stores the values for printing minout[j-4] = minimum; maxout[j-4] = maximum; meanout[j-4] = mean; ntimesn[j-4] = sizesquare; nfacout[j-4] = nfactorial; }//end n loop //the following prints out the results of the 10 runs for each n printf("size min max mean size**size size!\n"); printf("---------------------------------------------------------------\n"); for(l=0; l<NUMBEROFBOARDS; l++) { printf("%4d %8d %10d %12.1e %12.1e %12.1e\n", (l+4), minout[l], maxout[l], meanout[l], ntimesn[l], nfacout[l]); } return 0; }//end main
0b8c4413e8a80156ac0cf369719e2c71790e2e4e
9a78bac8cb2c8f2d38808053a10b33b26a1448c3
/philo/srcs/utils.c
09d704c5ca2f5ae11b94a205417b50aff5ae91a9
[]
no_license
subin195-09/42_philosohpers
6ef155b83a384b9722c002625096c7ebb1534011
051527b6484fb72f8286664321a8aa2c0915761a
refs/heads/main
2023-06-07T12:44:08.706371
2021-07-06T07:14:15
2021-07-06T07:14:15
383,375,005
0
0
null
null
null
null
UTF-8
C
false
false
1,928
c
utils.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* utils.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: skim <skim@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/06/15 18:46:13 by skim #+# #+# */ /* Updated: 2021/06/21 19:26:35 by skim ### ########.fr */ /* */ /* ************************************************************************** */ #include "philo.h" int ft_atoi(const char *str) { int i; long long num; int sign; i = 0; num = 0; sign = 1; while ((str[i] >= 9 && str[i] <= 13) || str[i] == ' ') i++; if (str[i] == '+' || str[i] == '-') { if (str[i] == '-') sign *= -1; i++; } while (str[i] >= '0' && str[i] <= '9') num = num * 10 + str[i++] - '0'; return ((int)(sign * num)); } size_t ft_strlen(const char *str) { size_t i; i = 0; while (str[i]) i++; return (i); } int ft_putendl_fd(char *s, int fd) { if (!s) return (-1); write(fd, s, ft_strlen(s)); write(fd, "\n", 1); if (fd == 2) return (-1); else return (1); } void write_num(long long temp, int fd) { char temp_write; if (temp == 0) return ; else { write_num(temp / 10, fd); temp_write = (temp % 10) + '0'; write(fd, &temp_write, 1); } } void ft_putnbr_fd(int n, int fd) { long long temp; temp = n; temp = (temp > 0) ? temp : -temp; if (n == 0) { write(fd, "0", 1); return ; } if (n < 0) write(fd, "-", 1); write_num(temp, fd); }
888489c5abf3042b768c018b904944ff235e335e
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/linux/drivers/gpu/drm/radeon/extr_sumo_dpm.c_sumo_program_ttt.c
da09b38d42fad52c2c74120395153372749e0cbf
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,148
c
extr_sumo_dpm.c_sumo_program_ttt.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ typedef int u32 ; struct sumo_power_info {scalar_t__ thermal_auto_throttling; } ; struct radeon_device {int dummy; } ; /* Variables and functions */ int /*<<< orphan*/ CG_SCLK_DPM_CTRL_3 ; int GNB_THERMTHRO_MASK ; int GNB_TT (scalar_t__) ; int GNB_TT_MASK ; int RREG32 (int /*<<< orphan*/ ) ; int /*<<< orphan*/ WREG32 (int /*<<< orphan*/ ,int) ; struct sumo_power_info* sumo_get_pi (struct radeon_device*) ; __attribute__((used)) static void sumo_program_ttt(struct radeon_device *rdev) { u32 cg_sclk_dpm_ctrl_3 = RREG32(CG_SCLK_DPM_CTRL_3); struct sumo_power_info *pi = sumo_get_pi(rdev); cg_sclk_dpm_ctrl_3 &= ~(GNB_TT_MASK | GNB_THERMTHRO_MASK); cg_sclk_dpm_ctrl_3 |= GNB_TT(pi->thermal_auto_throttling + 49); WREG32(CG_SCLK_DPM_CTRL_3, cg_sclk_dpm_ctrl_3); }
6fe6729e63c5da6bef1340f8be76c441641cf56f
9b4c80e60b0c0f5f4ebdc5242ef8c3a7577f4604
/Data Structure/Array/intersection.c
f620b8be09e6646968aa163e48a834a39ec89fc7
[]
no_license
Himanshu-Negi8/Post-Grad
0c27328ee7e7de8d73295e4423bf0b9317438fe0
b8ebaa84db82e2d987baac4fed221bf65b01345d
refs/heads/master
2021-05-16T20:31:09.224565
2020-12-07T15:22:56
2020-12-07T15:22:56
250,458,611
1
0
null
null
null
null
UTF-8
C
false
false
641
c
intersection.c
#include<stdio.h> void intersection(int[],int,int[],int); void main() { int n1,n2; printf("enter the sizes of the array : "); scanf("%d%d",&n1,&n2); int arr1[n1],arr2[n2],i; printf("\nenter the elements for array1 : "); for(i=0;i<n1;i++) { scanf("%d",&arr1[i]); } printf("\nenter the elements for array2 : "); for(i=0;i<n2;i++) { scanf("%d",&arr2[i]); } intersection(arr1,n1,arr2,n2); } void intersection(int arr1[],int n1,int arr2[],int n2) { int i=0,j=0; while(i<n1 && j<n2) { if(arr1[i]>arr2[j]) { j++; } if(arr2[j]>arr1[i]) { i++; } else { printf("%d\t",arr1[i]); i++;j++; } } }