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
42b8ef46d57e9845cd977e6bad99a2a9032935eb
8dc412daec15ac0151b250ac318435d0a48c604c
/Sets/UID(unsorted).c
55184642b5dceeade69f2d0bde568484b38d8409
[]
no_license
ethanray123/C-Codes
97e970b6e5bf52aac225a8fea6a36289120ee4b0
a967436e14ed3914ccf9fb583046990db39d6879
refs/heads/master
2020-03-22T10:02:00.266264
2016-11-21T14:21:24
2016-11-21T14:21:24
74,370,753
0
0
null
null
null
null
UTF-8
C
false
false
1,891
c
UID(unsorted).c
#include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct cell{ int elem; struct cell* next; }ctype,*SET; int main(){ return 0; } SET AunionB(SET A, SET B){ SET C,*temp,*trav; temp=&C; (*temp)=(SET)malloc(sizeof(ctype)); while(A!=NULL){ (*temp)->next=(SET)malloc(sizeof(ctype)); (*temp)->elem=A->elem; temp=&(*temp)->next; A=A->next; } while(B!=NULL){ trav=&C; while((*trav)!=NULL && B->elem!=(*trav)->elem){trav=&(*trav)->next;} if((*trav)==NULL){ (*temp)->next=(SET)malloc(sizeof(ctype)); (*temp)->elem=B->elem; temp=&(*temp)->next; } B=B->next; } free(temp); (*temp)=NULL; return C; } SET AintersectionB(SET A, SET B){ SET C, *temp,*trav; temp=&C; (*temp)=(SET)malloc(sizeof(ctype)); while(A!=NULL){ trav=&B; while((*trav)!=NULL && A->elem != (*trav)->elem){ trav=&(*trav)->next; } if(A->elem == (*trav)->elem){ (*temp)->next=(SET)malloc(sizeof(ctype)); (*temp)->elem=A->elem; temp=&(*temp)->next; } A=A->next; } free(temp); (*temp)=NULL; return C; } SET AminusB(SET A, SET B){ SET C,*temp,*trav; temp=&C; (*temp)=(SET)malloc(sizeof(ctype)); while(A!=NULL){ trav=&B; while((*trav)!=NULL && A->elem != (*trav)->elem){ trav=&(*trav)->next; } if((*trav)==NULL){ (*temp)->next=(SET)malloc(sizeof(ctype)); (*temp)->elem=A->elem; temp=&(*temp)->next; } A=A->next; } free(temp); (*temp)=NULL; return C; }
a4adf730c8fc1c60cf97bab0eb3c2102b17a2ae0
ac93d6e3f60c3436303980a03ac3286fcad12b70
/src/link/C/zig.h
72868e4400f380b3300b92746eecb2042790bf14
[ "MIT", "LicenseRef-scancode-other-permissive" ]
permissive
ZystemOS/zig
223452d9eaed13516aae512abd4e26a73e59eb31
c6288b97bae5d91beb73f8bb26926e8967e3d3d7
refs/heads/master
2023-08-16T06:58:01.600287
2021-10-16T18:00:30
2021-10-17T16:44:22
417,420,613
1
0
MIT
2021-10-15T19:28:04
2021-10-15T08:14:03
Zig
UTF-8
C
false
false
15,617
h
zig.h
#if __STDC_VERSION__ >= 201112L #define zig_noreturn _Noreturn #define zig_threadlocal thread_local #elif __GNUC__ #define zig_noreturn __attribute__ ((noreturn)) #define zig_threadlocal __thread #elif _MSC_VER #define zig_noreturn __declspec(noreturn) #define zig_threadlocal __declspec(thread) #else #define zig_noreturn #define zig_threadlocal zig_threadlocal_unavailable #endif #if __GNUC__ #define ZIG_COLD __attribute__ ((cold)) #else #define ZIG_COLD #endif #if __STDC_VERSION__ >= 199901L #define ZIG_RESTRICT restrict #elif defined(__GNUC__) #define ZIG_RESTRICT __restrict #else #define ZIG_RESTRICT #endif #if __STDC_VERSION__ >= 199901L #include <stdbool.h> #else #define bool unsigned char #define true 1 #define false 0 #endif #if defined(__GNUC__) #define zig_unreachable() __builtin_unreachable() #else #define zig_unreachable() #endif #ifdef __cplusplus #define ZIG_EXTERN_C extern "C" #else #define ZIG_EXTERN_C #endif #if defined(_MSC_VER) #define zig_breakpoint() __debugbreak() #elif defined(__MINGW32__) || defined(__MINGW64__) #define zig_breakpoint() __debugbreak() #elif defined(__clang__) #define zig_breakpoint() __builtin_debugtrap() #elif defined(__GNUC__) #define zig_breakpoint() __builtin_trap() #elif defined(__i386__) || defined(__x86_64__) #define zig_breakpoint() __asm__ volatile("int $0x03"); #else #define zig_breakpoint() raise(SIGTRAP) #endif #if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__) #include <stdatomic.h> #define zig_cmpxchg_strong(obj, expected, desired, succ, fail) atomic_compare_exchange_strong_explicit(obj, &(expected), desired, succ, fail) #define zig_cmpxchg_weak (obj, expected, desired, succ, fail) atomic_compare_exchange_weak_explicit (obj, &(expected), desired, succ, fail) #define zig_atomicrmw_xchg(obj, arg, order) atomic_exchange_explicit (obj, arg, order) #define zig_atomicrmw_add (obj, arg, order) atomic_fetch_add_explicit (obj, arg, order) #define zig_atomicrmw_sub (obj, arg, order) atomic_fetch_sub_explicit (obj, arg, order) #define zig_atomicrmw_or (obj, arg, order) atomic_fetch_or_explicit (obj, arg, order) #define zig_atomicrmw_xor (obj, arg, order) atomic_fetch_xor_explicit (obj, arg, order) #define zig_atomicrmw_and (obj, arg, order) atomic_fetch_and_explicit (obj, arg, order) #define zig_atomicrmw_nand(obj, arg, order) atomic_fetch_nand_explicit(obj, arg, order) #define zig_atomicrmw_min (obj, arg, order) atomic_fetch_min_explicit (obj, arg, order) #define zig_atomicrmw_max (obj, arg, order) atomic_fetch_max_explicit (obj, arg, order) #define zig_atomic_store (obj, arg, order) atomic_store_explicit (obj, arg, order) #define zig_atomic_load (obj, order) atomic_load_explicit (obj, order) #define zig_fence(order) atomic_thread_fence(order) #elif __GNUC__ #define memory_order_relaxed __ATOMIC_RELAXED #define memory_order_consume __ATOMIC_CONSUME #define memory_order_acquire __ATOMIC_ACQUIRE #define memory_order_release __ATOMIC_RELEASE #define memory_order_acq_rel __ATOMIC_ACQ_REL #define memory_order_seq_cst __ATOMIC_SEQ_CST #define zig_cmpxchg_strong(obj, expected, desired, succ, fail) __atomic_compare_exchange_n(obj, &(expected), desired, false, succ, fail) #define zig_cmpxchg_weak (obj, expected, desired, succ, fail) __atomic_compare_exchange_n(obj, &(expected), desired, true , succ, fail) #define zig_atomicrmw_xchg(obj, arg, order) __atomic_exchange_n(obj, arg, order) #define zig_atomicrmw_add (obj, arg, order) __atomic_fetch_add (obj, arg, order) #define zig_atomicrmw_sub (obj, arg, order) __atomic_fetch_sub (obj, arg, order) #define zig_atomicrmw_or (obj, arg, order) __atomic_fetch_or (obj, arg, order) #define zig_atomicrmw_xor (obj, arg, order) __atomic_fetch_xor (obj, arg, order) #define zig_atomicrmw_and (obj, arg, order) __atomic_fetch_and (obj, arg, order) #define zig_atomicrmw_nand(obj, arg, order) __atomic_fetch_nand(obj, arg, order) #define zig_atomicrmw_min (obj, arg, order) __atomic_fetch_min (obj, arg, order) #define zig_atomicrmw_max (obj, arg, order) __atomic_fetch_max (obj, arg, order) #define zig_atomic_store (obj, arg, order) __atomic_store (obj, arg, order) #define zig_atomic_load (obj, order) __atomic_load (obj, order) #define zig_fence(order) __atomic_thread_fence(order) #else #define memory_order_relaxed 0 #define memory_order_consume 1 #define memory_order_acquire 2 #define memory_order_release 3 #define memory_order_acq_rel 4 #define memory_order_seq_cst 5 #define zig_cmpxchg_strong(obj, expected, desired, succ, fail) zig_unimplemented() #define zig_cmpxchg_weak (obj, expected, desired, succ, fail) zig_unimplemented() #define zig_atomicrmw_xchg(obj, arg, order) zig_unimplemented() #define zig_atomicrmw_add (obj, arg, order) zig_unimplemented() #define zig_atomicrmw_sub (obj, arg, order) zig_unimplemented() #define zig_atomicrmw_or (obj, arg, order) zig_unimplemented() #define zig_atomicrmw_xor (obj, arg, order) zig_unimplemented() #define zig_atomicrmw_and (obj, arg, order) zig_unimplemented() #define zig_atomicrmw_nand(obj, arg, order) zig_unimplemented() #define zig_atomicrmw_min (obj, arg, order) zig_unimplemented() #define zig_atomicrmw_max (obj, arg, order) zig_unimplemented() #define zig_atomic_store (obj, arg, order) zig_unimplemented() #define zig_atomic_load (obj, order) zig_unimplemented() #define zig_fence(order) zig_unimplemented() #endif #include <stdint.h> #include <stddef.h> #include <limits.h> #define int128_t __int128 #define uint128_t unsigned __int128 ZIG_EXTERN_C void *memcpy (void *ZIG_RESTRICT, const void *ZIG_RESTRICT, size_t); ZIG_EXTERN_C void *memset (void *, int, size_t); static inline uint8_t zig_addw_u8(uint8_t lhs, uint8_t rhs, uint8_t max) { uint8_t thresh = max - rhs; if (lhs > thresh) { return lhs - thresh - 1; } else { return lhs + rhs; } } static inline int8_t zig_addw_i8(int8_t lhs, int8_t rhs, int8_t min, int8_t max) { if ((lhs > 0) && (rhs > 0)) { int8_t thresh = max - rhs; if (lhs > thresh) { return min + lhs - thresh - 1; } } else if ((lhs < 0) && (rhs < 0)) { int8_t thresh = min - rhs; if (lhs < thresh) { return max + lhs - thresh + 1; } } return lhs + rhs; } static inline uint16_t zig_addw_u16(uint16_t lhs, uint16_t rhs, uint16_t max) { uint16_t thresh = max - rhs; if (lhs > thresh) { return lhs - thresh - 1; } else { return lhs + rhs; } } static inline int16_t zig_addw_i16(int16_t lhs, int16_t rhs, int16_t min, int16_t max) { if ((lhs > 0) && (rhs > 0)) { int16_t thresh = max - rhs; if (lhs > thresh) { return min + lhs - thresh - 1; } } else if ((lhs < 0) && (rhs < 0)) { int16_t thresh = min - rhs; if (lhs < thresh) { return max + lhs - thresh + 1; } } return lhs + rhs; } static inline uint32_t zig_addw_u32(uint32_t lhs, uint32_t rhs, uint32_t max) { uint32_t thresh = max - rhs; if (lhs > thresh) { return lhs - thresh - 1; } else { return lhs + rhs; } } static inline int32_t zig_addw_i32(int32_t lhs, int32_t rhs, int32_t min, int32_t max) { if ((lhs > 0) && (rhs > 0)) { int32_t thresh = max - rhs; if (lhs > thresh) { return min + lhs - thresh - 1; } } else if ((lhs < 0) && (rhs < 0)) { int32_t thresh = min - rhs; if (lhs < thresh) { return max + lhs - thresh + 1; } } return lhs + rhs; } static inline uint64_t zig_addw_u64(uint64_t lhs, uint64_t rhs, uint64_t max) { uint64_t thresh = max - rhs; if (lhs > thresh) { return lhs - thresh - 1; } else { return lhs + rhs; } } static inline int64_t zig_addw_i64(int64_t lhs, int64_t rhs, int64_t min, int64_t max) { if ((lhs > 0) && (rhs > 0)) { int64_t thresh = max - rhs; if (lhs > thresh) { return min + lhs - thresh - 1; } } else if ((lhs < 0) && (rhs < 0)) { int64_t thresh = min - rhs; if (lhs < thresh) { return max + lhs - thresh + 1; } } return lhs + rhs; } static inline intptr_t zig_addw_isize(intptr_t lhs, intptr_t rhs, intptr_t min, intptr_t max) { return (intptr_t)(((uintptr_t)lhs) + ((uintptr_t)rhs)); } static inline short zig_addw_short(short lhs, short rhs, short min, short max) { return (short)(((unsigned short)lhs) + ((unsigned short)rhs)); } static inline int zig_addw_int(int lhs, int rhs, int min, int max) { return (int)(((unsigned)lhs) + ((unsigned)rhs)); } static inline long zig_addw_long(long lhs, long rhs, long min, long max) { return (long)(((unsigned long)lhs) + ((unsigned long)rhs)); } static inline long long zig_addw_longlong(long long lhs, long long rhs, long long min, long long max) { return (long long)(((unsigned long long)lhs) + ((unsigned long long)rhs)); } static inline uint8_t zig_subw_u8(uint8_t lhs, uint8_t rhs, uint8_t max) { if (lhs < rhs) { return max - rhs - lhs + 1; } else { return lhs - rhs; } } static inline int8_t zig_subw_i8(int8_t lhs, int8_t rhs, int8_t min, int8_t max) { if ((lhs > 0) && (rhs < 0)) { int8_t thresh = lhs - max; if (rhs < thresh) { return min + (thresh - rhs - 1); } } else if ((lhs < 0) && (rhs > 0)) { int8_t thresh = lhs - min; if (rhs > thresh) { return max - (rhs - thresh - 1); } } return lhs - rhs; } static inline uint16_t zig_subw_u16(uint16_t lhs, uint16_t rhs, uint16_t max) { if (lhs < rhs) { return max - rhs - lhs + 1; } else { return lhs - rhs; } } static inline int16_t zig_subw_i16(int16_t lhs, int16_t rhs, int16_t min, int16_t max) { if ((lhs > 0) && (rhs < 0)) { int16_t thresh = lhs - max; if (rhs < thresh) { return min + (thresh - rhs - 1); } } else if ((lhs < 0) && (rhs > 0)) { int16_t thresh = lhs - min; if (rhs > thresh) { return max - (rhs - thresh - 1); } } return lhs - rhs; } static inline uint32_t zig_subw_u32(uint32_t lhs, uint32_t rhs, uint32_t max) { if (lhs < rhs) { return max - rhs - lhs + 1; } else { return lhs - rhs; } } static inline int32_t zig_subw_i32(int32_t lhs, int32_t rhs, int32_t min, int32_t max) { if ((lhs > 0) && (rhs < 0)) { int32_t thresh = lhs - max; if (rhs < thresh) { return min + (thresh - rhs - 1); } } else if ((lhs < 0) && (rhs > 0)) { int32_t thresh = lhs - min; if (rhs > thresh) { return max - (rhs - thresh - 1); } } return lhs - rhs; } static inline uint64_t zig_subw_u64(uint64_t lhs, uint64_t rhs, uint64_t max) { if (lhs < rhs) { return max - rhs - lhs + 1; } else { return lhs - rhs; } } static inline int64_t zig_subw_i64(int64_t lhs, int64_t rhs, int64_t min, int64_t max) { if ((lhs > 0) && (rhs < 0)) { int64_t thresh = lhs - max; if (rhs < thresh) { return min + (thresh - rhs - 1); } } else if ((lhs < 0) && (rhs > 0)) { int64_t thresh = lhs - min; if (rhs > thresh) { return max - (rhs - thresh - 1); } } return lhs - rhs; } static inline intptr_t zig_subw_isize(intptr_t lhs, intptr_t rhs, intptr_t min, intptr_t max) { return (intptr_t)(((uintptr_t)lhs) - ((uintptr_t)rhs)); } static inline short zig_subw_short(short lhs, short rhs, short min, short max) { return (short)(((unsigned short)lhs) - ((unsigned short)rhs)); } static inline int zig_subw_int(int lhs, int rhs, int min, int max) { return (int)(((unsigned)lhs) - ((unsigned)rhs)); } static inline long zig_subw_long(long lhs, long rhs, long min, long max) { return (long)(((unsigned long)lhs) - ((unsigned long)rhs)); } static inline long long zig_subw_longlong(long long lhs, long long rhs, long long min, long long max) { return (long long)(((unsigned long long)lhs) - ((unsigned long long)rhs)); } #define zig_add_sat_u(ZT, T) static inline T zig_adds_##ZT(T x, T y, T max) { \ return (x > max - y) ? max : x + y; \ } #define zig_add_sat_s(ZT, T, T2) static inline T zig_adds_##ZT(T2 x, T2 y, T2 min, T2 max) { \ T2 res = x + y; \ return (res < min) ? min : (res > max) ? max : res; \ } zig_add_sat_u( u8, uint8_t) zig_add_sat_s( i8, int8_t, int16_t) zig_add_sat_u(u16, uint16_t) zig_add_sat_s(i16, int16_t, int32_t) zig_add_sat_u(u32, uint32_t) zig_add_sat_s(i32, int32_t, int64_t) zig_add_sat_u(u64, uint64_t) zig_add_sat_s(i64, int64_t, int128_t) zig_add_sat_s(isize, intptr_t, int128_t) zig_add_sat_s(short, short, int) zig_add_sat_s(int, int, long) zig_add_sat_s(long, long, long long) #define zig_sub_sat_u(ZT, T) static inline T zig_subs_##ZT(T x, T y, T max) { \ return (x > max + y) ? max : x - y; \ } #define zig_sub_sat_s(ZT, T, T2) static inline T zig_subs_##ZT(T2 x, T2 y, T2 min, T2 max) { \ T2 res = x - y; \ return (res < min) ? min : (res > max) ? max : res; \ } zig_sub_sat_u( u8, uint8_t) zig_sub_sat_s( i8, int8_t, int16_t) zig_sub_sat_u(u16, uint16_t) zig_sub_sat_s(i16, int16_t, int32_t) zig_sub_sat_u(u32, uint32_t) zig_sub_sat_s(i32, int32_t, int64_t) zig_sub_sat_u(u64, uint64_t) zig_sub_sat_s(i64, int64_t, int128_t) zig_sub_sat_s(isize, intptr_t, int128_t) zig_sub_sat_s(short, short, int) zig_sub_sat_s(int, int, long) zig_sub_sat_s(long, long, long long) #define zig_mul_sat_u(ZT, T, T2) static inline T zig_muls_##ZT(T2 x, T2 y, T2 max) { \ T2 res = x * y; \ return (res > max) ? max : res; \ } #define zig_mul_sat_s(ZT, T, T2) static inline T zig_muls_##ZT(T2 x, T2 y, T2 min, T2 max) { \ T2 res = x * y; \ return (res < min) ? min : (res > max) ? max : res; \ } zig_mul_sat_u(u8, uint8_t, uint16_t) zig_mul_sat_s(i8, int8_t, int16_t) zig_mul_sat_u(u16, uint16_t, uint32_t) zig_mul_sat_s(i16, int16_t, int32_t) zig_mul_sat_u(u32, uint32_t, uint64_t) zig_mul_sat_s(i32, int32_t, int64_t) zig_mul_sat_u(u64, uint64_t, uint128_t) zig_mul_sat_s(i64, int64_t, int128_t) zig_mul_sat_s(isize, intptr_t, int128_t) zig_mul_sat_s(short, short, int) zig_mul_sat_s(int, int, long) zig_mul_sat_s(long, long, long long) #define zig_shl_sat_u(ZT, T, bits) static inline T zig_shls_##ZT(T x, T y, T max) { \ if(x == 0) return 0; \ T bits_set = 64 - __builtin_clzll(x); \ return (bits_set + y > bits) ? max : x << y; \ } #define zig_shl_sat_s(ZT, T, bits) static inline T zig_shls_##ZT(T x, T y, T min, T max) { \ if(x == 0) return 0; \ T x_twos_comp = x < 0 ? -x : x; \ T bits_set = 64 - __builtin_clzll(x_twos_comp); \ T min_or_max = (x < 0) ? min : max; \ return (y + bits_set > bits ) ? min_or_max : x << y; \ } zig_shl_sat_u(u8, uint8_t, 8) zig_shl_sat_s(i8, int8_t, 7) zig_shl_sat_u(u16, uint16_t, 16) zig_shl_sat_s(i16, int16_t, 15) zig_shl_sat_u(u32, uint32_t, 32) zig_shl_sat_s(i32, int32_t, 31) zig_shl_sat_u(u64, uint64_t, 64) zig_shl_sat_s(i64, int64_t, 63) zig_shl_sat_s(isize, intptr_t, ((sizeof(intptr_t)) * CHAR_BIT - 1)) zig_shl_sat_s(short, short, ((sizeof(short )) * CHAR_BIT - 1)) zig_shl_sat_s(int, int, ((sizeof(int )) * CHAR_BIT - 1)) zig_shl_sat_s(long, long, ((sizeof(long )) * CHAR_BIT - 1))
1b9e771d463b72e89582ad2cba9d252600e18541
5121a1340c667572dd8370c0b0a444559a9dae57
/SYN_FASTAtools_2018/src/change_str.c
692a22b81c9f950ea2388b7bd428d9f9950f4f5a
[]
no_license
2l2tg/Synthesis_pool
331061c0505500b113fe7078285c1f0206b737f0
8ab23060cd0566f31e69ae110a8a448f894d37db
refs/heads/master
2020-06-23T10:03:02.093350
2019-07-24T08:30:02
2019-07-24T08:30:02
198,591,468
0
0
null
null
null
null
UTF-8
C
false
false
1,235
c
change_str.c
/* ** EPITECH PROJECT, 2019 ** change_str ** File description: ** pisicne synthèse */ #include "../include/my.h" char *del_space(char *str) { for (int i = 0; str[i]; i++) if (str[i] == '\n') str[i] = '\0'; return (str); } int find_space(char *file, int i) { while (file[i] != '\n') i = i + 1; return (i + 1); } char *capitalize(char *file) { int x = 0; while (file[x]) { if (file[x] >= 'a' && file[x] <= 'z') file[x] = file[x] - 32; x = x + 1; } return (file); } char *delete_space(char *file) { char *tmp = NULL; int x = 0; int y = 0; tmp = malloc(sizeof(char) * (strlen(file))); while (file[x]) { if (file[x] == ' ' || file[x] == '\n') { x = x + 1; continue; } tmp[y] = file[x]; y = y + 1; x = x + 1; } tmp[y] = '\0'; return (tmp); } char *delete_line(char *file) { int x = 0; while (file[x]) { if (x > 0 && file[x] == '>') file[x - 1] = '\n'; if (file[x] == '>') x = find_space(file, x); if (file[x] == '\n') file[x] = ' '; x = x + 1; } return (file); }
1d2f8037b02223ad0e981feef5f6fbb5993cc43a
3a0908d25c02a77e4173b426f8402af374f5b712
/src/dotC_files/HT/HT.c
96f4e59462bb9ddff087b371fb33168f497f772a
[ "MIT" ]
permissive
andrewpap22/Database_Management_System
1709f8b5649a8c72dede0243c35ce7a3a1481f6b
46484e02f6297fbe98b77976cbce681c2d0fa3a6
refs/heads/master
2023-02-17T14:12:31.326210
2021-01-20T13:46:05
2021-01-20T13:46:05
313,393,742
1
0
null
null
null
null
UTF-8
C
false
false
14,642
c
HT.c
#include "../../header_files/HT/HT.h" #include "../../../BF_lib/BF.h" #include <stdlib.h> #include <string.h> #include <assert.h> int HT_CreateIndex(char *fileName, char attrType, char *attrName, int attrLength, int buckets) { HT_info info; void *first_block; //first block holds info info.attrLength = attrLength; info.attrName = attrName; info.attrType = attrType; info.buckets = buckets; if (BF_CreateFile(fileName) < 0) { BF_PrintError("[!] Error in creating the file in HT_CreateFile"); return -1; } if ((info.fileDesc = BF_OpenFile(fileName)) < 0) { BF_PrintError("[!] Error in opening the file in HT_CreateFile"); return -1; } if (BF_AllocateBlock(info.fileDesc) < 0) { BF_PrintError("[!] Error in allocating the block in HT_CreateFile"); BF_CloseFile(info.fileDesc); return -1; } if (BF_ReadBlock(info.fileDesc, 0, &first_block) < 0) { BF_PrintError("[!] Error in reading the block in HT_CreateFile"); BF_CloseFile(info.fileDesc); return -1; } memcpy(first_block, &info, sizeof(HT_info)); if (BF_WriteBlock(info.fileDesc, 0) < 0) { BF_PrintError("[!] Error in writing to block in HT_CreateFile"); BF_CloseFile(info.fileDesc); return -1; } if (BF_CloseFile(info.fileDesc) < 0) { BF_PrintError("[!] Error in closing the file in HT_CreateFile"); return -1; } //same procedure but for each bucket: void *new_page; Block new_block; new_block.maxRecords = 512 / (sizeof(Record) - 2 * sizeof(char) - sizeof(int)); new_block.currRecords = 0; new_block.nextBlock = -1; for (int i = 1; i <= buckets; i++) { if ((info.fileDesc = BF_OpenFile(fileName)) < 0) { BF_PrintError("[!] Error in opening the file in HT_CreateFile"); return -1; } if (BF_AllocateBlock(info.fileDesc) < 0) { BF_PrintError("[!] Error in allocating the block in HT_CreateFile"); BF_CloseFile(info.fileDesc); return -1; } if (BF_ReadBlock(info.fileDesc, i, &new_page) < 0) { BF_PrintError("[!] Error in reading the block in HT_CreateFile"); BF_CloseFile(info.fileDesc); return -1; } memcpy(new_page, &new_block, sizeof(HT_info)); if (BF_WriteBlock(info.fileDesc, i) < 0) { BF_PrintError("[!] Error in writing to block in HT_CreateFile"); BF_CloseFile(info.fileDesc); return -1; } if (BF_CloseFile(info.fileDesc) < 0) { BF_PrintError("[!] Error in closing the file in HT_CreateFile"); return -1; } } return 0; //success } HT_info *HT_OpenIndex(char *fileName) { HT_info *info; Block *block; info = malloc(sizeof(HT_info)); if ((info->fileDesc = BF_OpenFile(fileName)) < 0) { BF_PrintError("[!] Error in opening the hash file in HT_OpenFile"); return -1; } if (BF_ReadBlock(BF_OpenFile(fileName), 0, &block) < 0) { BF_PrintError("[!] Error in reading the block in HT_OpenFile"); BF_CloseFile(info->fileDesc); return -1; } memcpy(info, block, sizeof(HT_info)); return info; } int HT_CloseIndex(HT_info *header_info) { if (BF_CloseFile(header_info->fileDesc) < 0) { BF_PrintError("[!] Error in closing the file in HT_CloseFile"); return -1; } free(header_info); return 0; } int HT_InsertEntry(HT_info *header_info, Record record) { int key = hashfunction(header_info->attrType, header_info->buckets, &record.id); void *page; Block block; if (BF_ReadBlock(header_info->fileDesc, key, &page) < 0) //first page for this key { BF_PrintError("[!] Error in reading the block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } memcpy(&block, page, sizeof(Block)); while (block.nextBlock != -1) //check if there is a chain of blocks and get to the last one { key = block.nextBlock; if (BF_ReadBlock(header_info->fileDesc, key, &page) < 0) { BF_PrintError("[!] Error in reading the block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } memcpy(&block, page, sizeof(Block)); } if (block.maxRecords == block.currRecords) //block is full { void *new_page; Block new_block; new_block.maxRecords = 512 / (sizeof(Record) - 2 * sizeof(char) - sizeof(int)); new_block.currRecords = 0; new_block.nextBlock = -1; new_block.records[0] = record; new_block.currRecords++; int num_blocks; if ((num_blocks = BF_GetBlockCounter(header_info->fileDesc)) < 0) { BF_PrintError("[!] Error in getting the block counter inside HP_InsertEntry"); return -1; } block.nextBlock = num_blocks; memcpy(page, &block, sizeof(Block)); if (BF_WriteBlock(header_info->fileDesc, key) < 0) { BF_PrintError("[!] Error in writing block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } if (BF_AllocateBlock(header_info->fileDesc) < 0) { BF_PrintError("[!] Error in allocating the block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } if (BF_ReadBlock(header_info->fileDesc, num_blocks, &new_page) < 0) { BF_PrintError("[!] Error in reading the block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } memcpy(new_page, &new_block, sizeof(Block)); if (BF_WriteBlock(header_info->fileDesc, num_blocks) < 0) { BF_PrintError("[!] Error in writing block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } } else //block has space left to save new record { block.records[block.currRecords] = record; block.currRecords++; memcpy(page, &block, sizeof(Block)); if (BF_WriteBlock(header_info->fileDesc, key) < 0) { BF_PrintError("[!] Error in writing block in HT_InsertEntry"); BF_CloseFile(header_info->fileDesc); return -1; } } return key; } int hashfunction(char attrType, int numBuckets, void *value) { int a = 678, b = 345, p = 100019; if (attrType == 'c') { int hashedId = 0; char *str = (char *)value; while (str[0] != '\0') { hashedId = (hashedId * a + str[0]) % p; str++; } return (hashedId % numBuckets) + 1; //+1 to avoid having 0 as bucket number (as it is the info bucket) } else if (attrType == 'i') { int *id = (int *)value; return (((a * b + (*id)) % p) % numBuckets) + 1; } else { return -1; } } int HT_GetAllEntries(HT_info info, void *value) { int key = hashfunction(info.attrType, info.buckets, value); void *page; Block block; int blocks_read = 0; if (BF_ReadBlock(info.fileDesc, key, &page) < 0) //first page for this key { BF_PrintError("[!] Error in reading the block in HT_GetAllEntries"); BF_CloseFile(info.fileDesc); return -1; } blocks_read++; memcpy(&block, page, sizeof(Block)); for (int j = 0; j < block.currRecords; j++) //print records { Record currRecord = block.records[j]; printf("%d %s %s %s \n", currRecord.id, currRecord.name, currRecord.surname, currRecord.address); } if (block.nextBlock != -1) //there are more pages for this key { while (block.nextBlock != -1) //until the last linked page { if (BF_ReadBlock(info.fileDesc, block.nextBlock, &page) < 0) { BF_PrintError("[!] Error in reading the block in HT_GetAllEntries"); BF_CloseFile(info.fileDesc); return -1; } blocks_read++; memcpy(&block, page, sizeof(Block)); for (int j = 0; j < block.currRecords; j++) { Record currRecord = block.records[j]; printf("%d %s %s %s \n", currRecord.id, currRecord.name, currRecord.surname, currRecord.address); } } } return blocks_read; } int HashStatistics(char *fileName) { HT_info *info; void *first_block; if ((info = HT_OpenIndex(fileName)) == NULL) { fprintf(stderr, "[!] Error in opening hash_file in main()\n"); HT_CloseIndex(info); return -1; } if (BF_ReadBlock(info->fileDesc, 0, &first_block) < 0) { BF_PrintError("[!] Error in reading the block in HT_OpenFile"); BF_CloseFile(info->fileDesc); return -1; } memcpy(info, first_block, sizeof(HT_info)); int num_blocks = 0; //holds the number of blocks of the file; int min_records; int max_records; int average_records; int overload_buckets = 0; int overload[info->buckets]; memset(overload, 0, info->buckets); for (int i = 1; i <= info->buckets; i++) //for each bucket { Block block; void *page; if (BF_ReadBlock(info->fileDesc, i, &page) < 0) { BF_PrintError("[!] Error in reading the block in HashStatistics"); BF_CloseFile(info->fileDesc); return -1; } num_blocks++; memcpy(&block, page, sizeof(Block)); min_records = block.currRecords; max_records = block.currRecords; average_records = block.currRecords; int j = 1; while (block.nextBlock != -1) //more blocks linked { overload_buckets++; j++; //holds the number of blocks per bucket; if (BF_ReadBlock(info->fileDesc, block.nextBlock, &page) < 0) { BF_PrintError("[!] Error in reading the block in HashStatistics"); BF_CloseFile(info->fileDesc); return -1; } num_blocks++; memcpy(&block, page, sizeof(Block)); if (block.currRecords > max_records) { max_records = block.currRecords; } else if (block.currRecords < min_records) { min_records = block.currRecords; } average_records += block.currRecords; } overload[i - 1] = overload_buckets; average_records = average_records / j; printf("Bucket number %d has max number of records = %d, min number of records = %d and an average number of %d records\n", i, max_records, min_records, average_records); } printf("File %s has %d blocks\n", fileName, num_blocks); int average_blocks = num_blocks / info->buckets; printf("The average number of blocks is %d\n", average_blocks); printf("There are %d overload buckets:\n", overload_buckets); for (int k = 0; k < info->buckets; k++) { if (overload[k] != 0) { printf("bucket number %d has %d blocks\n", k + 1, overload[k]); } } if (HT_CloseIndex(info) < 0) { fprintf(stderr, "[!] Error in closing hashfile in main()\n"); return -1; } return 0; } int HT_DeleteEntry(HT_info info, void *value) { int key = hashfunction(info.attrType, info.buckets, &value); void *page; Block block; Record currRecord; if (BF_ReadBlock(info.fileDesc, key, &page) < 0) //first page for this key { BF_PrintError("[!] Error in reading the block in HT_DeleteEntry"); BF_CloseFile(info.fileDesc); return -1; } memcpy(&block, page, sizeof(Block)); int i = 0; while (i <= block.currRecords) { currRecord = block.records[i]; if (currRecord.id == (int)value || currRecord.id == (char)value) { memset(&block.records[i], 0, sizeof(Record)); //delete item from array // block.currRecords--; return 0; } i++; } //if this place is reached then the item is not found yet if (block.nextBlock != -1) //there are more pages for this key { while (block.nextBlock != -1) //until the last linked page { if (BF_ReadBlock(info.fileDesc, block.nextBlock, &page) < 0) { BF_PrintError("[!] Error in reading the block in HT_DeleteEntry"); BF_CloseFile(info.fileDesc); return -1; } memcpy(&block, page, sizeof(Block)); i = 0; while (i <= block.currRecords) { currRecord = block.records[i]; if (currRecord.id == (int)value || currRecord.id == (char)value) { memset(&block.records[i], 0, sizeof(Record)); //delete item from array // block.currRecords--; return 0; } i++; } } } //if this place is reached then the item does not exist printf("Item to be deleted does not exist\n"); return 0; } void InsertEntries(HT_info *info) { FILE *FP; char *line = NULL; size_t length = 0; ssize_t read; // size type with an error value (-1) FP = stdin; Record record; int id; while ((read = getline(&line, &length, FP)) != -1) { line[read - 2] = 0; line++; char *tmp; tmp = strtok(line, ","); record.id = atoi(tmp); tmp = strtok(NULL, ","); tmp++; tmp[strlen(tmp) - 1] = '\0'; strncpy(record.name, tmp, sizeof(record.name)); tmp = strtok(NULL, ","); tmp++; tmp[strlen(tmp) - 1] = '\0'; strncpy(record.surname, tmp, sizeof(record.surname)); tmp = strtok(NULL, ","); tmp++; tmp[strlen(tmp) - 1] = '\0'; strncpy(record.address, tmp, sizeof(record.address)); line--; //assert(!HT_InsertEntry(info, record)); id = HT_InsertEntry(info, record); } free(line); }
98162e6e528545318d347994d064a5b870f08398
6af50a4b5b928211880dd9f1c6ce92c2afea828b
/include/section_tags.h
ce6853cde40aca4b1814958be813a5744e8eb46b
[ "Apache-2.0" ]
permissive
erwango/zephyr
1c7aa447f613de76439291ba9dde1e4dc7c5786e
162f4574c781ae17d3fecfd4ac10df111e90ae3c
refs/heads/arm
2023-08-11T10:29:20.031948
2017-05-10T09:50:21
2017-05-10T14:22:48
76,642,373
6
0
Apache-2.0
2020-02-04T19:16:46
2016-12-16T09:52:08
C
UTF-8
C
false
false
637
h
section_tags.h
/* Macros for tagging symbols and putting them in the correct sections. */ /* * Copyright (c) 2013-2014, Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef _section_tags__h_ #define _section_tags__h_ #include <toolchain.h> #if !defined(_ASMLANGUAGE) #define __noinit __in_section_unique(NOINIT) #define __irq_vector_table _GENERIC_SECTION(IRQ_VECTOR_TABLE) #define __sw_isr_table _GENERIC_SECTION(SW_ISR_TABLE) #if defined(CONFIG_ARM) #define __kinetis_flash_config_section __in_section_unique(KINETIS_FLASH_CONFIG) #endif /* CONFIG_ARM */ #endif /* !_ASMLANGUAGE */ #endif /* _section_tags__h_ */
07e1f72884bed85c2ff89c0acefc210838e5682e
39d74b0051f758b392c311eb807bba22fce474ce
/project/sb_json/src/browser.h
5416740b89a4a135226539b5dafd5be66b151cda
[]
no_license
xgc820313/npapi-mdns
d2db29433d20f369a8a820a0ae2e6abc9d06ff07
c7cdbd4347d262f2d6a9b0ef50af4448a8becdb8
refs/heads/master
2016-09-06T19:27:58.916320
2009-11-18T02:54:36
2009-11-18T02:54:36
38,345,194
0
0
null
null
null
null
UTF-8
C
false
false
542
h
browser.h
/* * browser.h * * Created on: 2009-10-28 * Author: jldupont */ #ifndef BROWSER_H_ #define BROWSER_H_ #include <pthread.h> #include "macros.h" #include "dbus/dbus.h" typedef enum { BROWSER_OK = 0, BROWSER_INVALID_CODE, BROWSER_MALLOC_ERROR, BROWSER_DBUS_CONN_ERROR, BROWSER_DBUS_FILTER_ERROR, BROWSER_DBUS_MATCH_ERROR, BROWSER_DBUS_SERVICE_ERROR, } BrowserReturnCode; // PROTOTYPES // =========== BrowserReturnCode browser_setup_dbus_conn(DBusConnection **conn); #endif /* BROWSER_H_ */
e4a62879644e03728237ff2769807a5ab1ce78e3
67cb51b9e77b783ad0c2f0293bb4c105e72d7a79
/src/dynamic/include/hil/sys/timer/rtimer-object.h
d053e58db564744dfd4b357eafb358b012e27474
[]
no_license
pruckebusch/GITAR
2caee0e20a327beb690914fe968252c5401eef50
f945187ffb163964ae55eef265d95bafe71d640c
refs/heads/master
2020-04-30T22:57:03.198541
2019-03-22T11:49:19
2019-03-22T11:49:19
177,132,137
0
0
null
null
null
null
UTF-8
C
false
false
411
h
rtimer-object.h
#ifndef __RTIMER_COMPONENT_OBJECT_H__ #define __RTIMER_COMPONENT_OBJECT_H__ #include "hil/sys/timer/rtimer.h" #include "include/hil/sys/timer/rtimer-constdef.h" static const void* const rtimer_fnctarray[FUNCTION_RTIMER_LAST] = {rtimer_init,rtimer_run_next,rtimer_set,rtimer_now}; static const hil_cmp_object_t const rtimer_cmpobj = { RTIMER_UID, {rtimer_fnctarray}}; #endif /*__RTIMER_COMPONENT_OBJECT_H__*/
8b7ef2e95e2691c5058d0cb27440d03f5f45ba0b
7d4ca7e114d15e45a007efc57b760302d6c7b569
/Neural_FPGA_Project/LearningNetwork/isim/LearningNetwork_isim_beh.exe.sim/work/a_3516827427_3212880686.c
f28127360d5adf92b54b80c11f874d17418ab180
[]
no_license
Zhang-Yong/Neural_Network_FPGA-Project
d89892fe42a6feaf8db6cf7d2f7ea8c51a0dc3fe
d8afc30656f1c44c5eff4f551d51fd6a2910ce4b
refs/heads/master
2021-01-19T22:09:13.457496
2017-07-29T04:36:23
2017-07-29T04:36:23
88,760,544
1
0
null
null
null
null
UTF-8
C
false
false
17,147
c
a_3516827427_3212880686.c
/**********************************************************************/ /* ____ ____ */ /* / /\/ / */ /* /___/ \ / */ /* \ \ \/ */ /* \ \ Copyright (c) 2003-2009 Xilinx, Inc. */ /* / / All Right Reserved. */ /* /---/ /\ */ /* \ \ / \ */ /* \___\/\___\ */ /***********************************************************************/ /* This file is designed for use with ISim build 0x7708f090 */ #define XSI_HIDE_SYMBOL_SPEC true #include "xsi.h" #include <memory.h> #ifdef __GNUC__ #include <stdlib.h> #else #include <malloc.h> #define alloca _alloca #endif static const char *ng0 = "E:/Xilinx/Neural_FPGA_Project/Hardware_Neural_Net-master/Node/Node/WeightMult.vhd"; extern char *IEEE_P_2592010699; extern char *IEEE_P_1242562249; char *ieee_p_1242562249_sub_3273497107_1035706684(char *, char *, char *, char *, char *, char *); char *ieee_p_1242562249_sub_3481121704_1035706684(char *, char *, char *, char *); static void work_a_3516827427_3212880686_p_0(char *t0) { char *t1; char *t2; int t3; unsigned int t4; unsigned int t5; unsigned int t6; unsigned char t7; unsigned char t8; char *t9; char *t10; char *t11; char *t12; char *t13; char *t14; char *t15; char *t16; char *t17; char *t18; char *t19; char *t20; char *t21; char *t22; LAB0: xsi_set_current_line(21, ng0); t1 = (t0 + 1192U); t2 = *((char **)t1); t3 = (4 - 4); t4 = (t3 * -1); t5 = (1U * t4); t6 = (0 + t5); t1 = (t2 + t6); t7 = *((unsigned char *)t1); t8 = (t7 == (unsigned char)3); if (t8 != 0) goto LAB3; LAB4: LAB5: t15 = xsi_get_transient_memory(8U); memset(t15, 0, 8U); t16 = t15; memset(t16, (unsigned char)2, 8U); t17 = (t0 + 5616); t18 = (t17 + 56U); t19 = *((char **)t18); t20 = (t19 + 56U); t21 = *((char **)t20); memcpy(t21, t15, 8U); xsi_driver_first_trans_fast(t17); LAB2: t22 = (t0 + 5440); *((int *)t22) = 1; LAB1: return; LAB3: t9 = (t0 + 1032U); t10 = *((char **)t9); t9 = (t0 + 5616); t11 = (t9 + 56U); t12 = *((char **)t11); t13 = (t12 + 56U); t14 = *((char **)t13); memcpy(t14, t10, 8U); xsi_driver_first_trans_fast(t9); goto LAB2; LAB6: goto LAB2; } static void work_a_3516827427_3212880686_p_1(char *t0) { char t17[16]; char t19[16]; char t24[16]; char *t1; char *t2; int t3; unsigned int t4; unsigned int t5; unsigned int t6; unsigned char t7; unsigned char t8; char *t9; char *t11; char *t12; unsigned int t13; unsigned int t14; unsigned int t15; char *t16; char *t18; char *t20; char *t21; int t22; unsigned int t23; char *t25; int t26; char *t27; char *t28; char *t29; char *t30; char *t31; char *t32; char *t33; char *t34; char *t35; char *t36; char *t37; char *t38; LAB0: xsi_set_current_line(23, ng0); t1 = (t0 + 1192U); t2 = *((char **)t1); t3 = (3 - 4); t4 = (t3 * -1); t5 = (1U * t4); t6 = (0 + t5); t1 = (t2 + t6); t7 = *((unsigned char *)t1); t8 = (t7 == (unsigned char)3); if (t8 != 0) goto LAB3; LAB4: LAB5: t31 = xsi_get_transient_memory(8U); memset(t31, 0, 8U); t32 = t31; memset(t32, (unsigned char)2, 8U); t33 = (t0 + 5680); t34 = (t33 + 56U); t35 = *((char **)t34); t36 = (t35 + 56U); t37 = *((char **)t36); memcpy(t37, t31, 8U); xsi_driver_first_trans_fast(t33); LAB2: t38 = (t0 + 5456); *((int *)t38) = 1; LAB1: return; LAB3: t9 = (t0 + 9109); t11 = (t0 + 1032U); t12 = *((char **)t11); t13 = (7 - 7); t14 = (t13 * 1U); t15 = (0 + t14); t11 = (t12 + t15); t18 = ((IEEE_P_2592010699) + 4024); t20 = (t19 + 0U); t21 = (t20 + 0U); *((int *)t21) = 0; t21 = (t20 + 4U); *((int *)t21) = 0; t21 = (t20 + 8U); *((int *)t21) = 1; t22 = (0 - 0); t23 = (t22 * 1); t23 = (t23 + 1); t21 = (t20 + 12U); *((unsigned int *)t21) = t23; t21 = (t24 + 0U); t25 = (t21 + 0U); *((int *)t25) = 7; t25 = (t21 + 4U); *((int *)t25) = 1; t25 = (t21 + 8U); *((int *)t25) = -1; t26 = (1 - 7); t23 = (t26 * -1); t23 = (t23 + 1); t25 = (t21 + 12U); *((unsigned int *)t25) = t23; t16 = xsi_base_array_concat(t16, t17, t18, (char)97, t9, t19, (char)97, t11, t24, (char)101); t25 = (t0 + 5680); t27 = (t25 + 56U); t28 = *((char **)t27); t29 = (t28 + 56U); t30 = *((char **)t29); memcpy(t30, t16, 8U); xsi_driver_first_trans_fast(t25); goto LAB2; LAB6: goto LAB2; } static void work_a_3516827427_3212880686_p_2(char *t0) { char t17[16]; char t19[16]; char t24[16]; char *t1; char *t2; int t3; unsigned int t4; unsigned int t5; unsigned int t6; unsigned char t7; unsigned char t8; char *t9; char *t11; char *t12; unsigned int t13; unsigned int t14; unsigned int t15; char *t16; char *t18; char *t20; char *t21; int t22; unsigned int t23; char *t25; int t26; char *t27; char *t28; char *t29; char *t30; char *t31; char *t32; char *t33; char *t34; char *t35; char *t36; char *t37; char *t38; LAB0: xsi_set_current_line(25, ng0); t1 = (t0 + 1192U); t2 = *((char **)t1); t3 = (2 - 4); t4 = (t3 * -1); t5 = (1U * t4); t6 = (0 + t5); t1 = (t2 + t6); t7 = *((unsigned char *)t1); t8 = (t7 == (unsigned char)3); if (t8 != 0) goto LAB3; LAB4: LAB5: t31 = xsi_get_transient_memory(8U); memset(t31, 0, 8U); t32 = t31; memset(t32, (unsigned char)2, 8U); t33 = (t0 + 5744); t34 = (t33 + 56U); t35 = *((char **)t34); t36 = (t35 + 56U); t37 = *((char **)t36); memcpy(t37, t31, 8U); xsi_driver_first_trans_fast(t33); LAB2: t38 = (t0 + 5472); *((int *)t38) = 1; LAB1: return; LAB3: t9 = (t0 + 9110); t11 = (t0 + 1032U); t12 = *((char **)t11); t13 = (7 - 7); t14 = (t13 * 1U); t15 = (0 + t14); t11 = (t12 + t15); t18 = ((IEEE_P_2592010699) + 4024); t20 = (t19 + 0U); t21 = (t20 + 0U); *((int *)t21) = 0; t21 = (t20 + 4U); *((int *)t21) = 1; t21 = (t20 + 8U); *((int *)t21) = 1; t22 = (1 - 0); t23 = (t22 * 1); t23 = (t23 + 1); t21 = (t20 + 12U); *((unsigned int *)t21) = t23; t21 = (t24 + 0U); t25 = (t21 + 0U); *((int *)t25) = 7; t25 = (t21 + 4U); *((int *)t25) = 2; t25 = (t21 + 8U); *((int *)t25) = -1; t26 = (2 - 7); t23 = (t26 * -1); t23 = (t23 + 1); t25 = (t21 + 12U); *((unsigned int *)t25) = t23; t16 = xsi_base_array_concat(t16, t17, t18, (char)97, t9, t19, (char)97, t11, t24, (char)101); t25 = (t0 + 5744); t27 = (t25 + 56U); t28 = *((char **)t27); t29 = (t28 + 56U); t30 = *((char **)t29); memcpy(t30, t16, 8U); xsi_driver_first_trans_fast(t25); goto LAB2; LAB6: goto LAB2; } static void work_a_3516827427_3212880686_p_3(char *t0) { char t17[16]; char t19[16]; char t24[16]; char *t1; char *t2; int t3; unsigned int t4; unsigned int t5; unsigned int t6; unsigned char t7; unsigned char t8; char *t9; char *t11; char *t12; unsigned int t13; unsigned int t14; unsigned int t15; char *t16; char *t18; char *t20; char *t21; int t22; unsigned int t23; char *t25; int t26; char *t27; char *t28; char *t29; char *t30; char *t31; char *t32; char *t33; char *t34; char *t35; char *t36; char *t37; char *t38; LAB0: xsi_set_current_line(27, ng0); t1 = (t0 + 1192U); t2 = *((char **)t1); t3 = (1 - 4); t4 = (t3 * -1); t5 = (1U * t4); t6 = (0 + t5); t1 = (t2 + t6); t7 = *((unsigned char *)t1); t8 = (t7 == (unsigned char)3); if (t8 != 0) goto LAB3; LAB4: LAB5: t31 = xsi_get_transient_memory(8U); memset(t31, 0, 8U); t32 = t31; memset(t32, (unsigned char)2, 8U); t33 = (t0 + 5808); t34 = (t33 + 56U); t35 = *((char **)t34); t36 = (t35 + 56U); t37 = *((char **)t36); memcpy(t37, t31, 8U); xsi_driver_first_trans_fast(t33); LAB2: t38 = (t0 + 5488); *((int *)t38) = 1; LAB1: return; LAB3: t9 = (t0 + 9112); t11 = (t0 + 1032U); t12 = *((char **)t11); t13 = (7 - 7); t14 = (t13 * 1U); t15 = (0 + t14); t11 = (t12 + t15); t18 = ((IEEE_P_2592010699) + 4024); t20 = (t19 + 0U); t21 = (t20 + 0U); *((int *)t21) = 0; t21 = (t20 + 4U); *((int *)t21) = 2; t21 = (t20 + 8U); *((int *)t21) = 1; t22 = (2 - 0); t23 = (t22 * 1); t23 = (t23 + 1); t21 = (t20 + 12U); *((unsigned int *)t21) = t23; t21 = (t24 + 0U); t25 = (t21 + 0U); *((int *)t25) = 7; t25 = (t21 + 4U); *((int *)t25) = 3; t25 = (t21 + 8U); *((int *)t25) = -1; t26 = (3 - 7); t23 = (t26 * -1); t23 = (t23 + 1); t25 = (t21 + 12U); *((unsigned int *)t25) = t23; t16 = xsi_base_array_concat(t16, t17, t18, (char)97, t9, t19, (char)97, t11, t24, (char)101); t25 = (t0 + 5808); t27 = (t25 + 56U); t28 = *((char **)t27); t29 = (t28 + 56U); t30 = *((char **)t29); memcpy(t30, t16, 8U); xsi_driver_first_trans_fast(t25); goto LAB2; LAB6: goto LAB2; } static void work_a_3516827427_3212880686_p_4(char *t0) { char t17[16]; char t19[16]; char t24[16]; char *t1; char *t2; int t3; unsigned int t4; unsigned int t5; unsigned int t6; unsigned char t7; unsigned char t8; char *t9; char *t11; char *t12; unsigned int t13; unsigned int t14; unsigned int t15; char *t16; char *t18; char *t20; char *t21; int t22; unsigned int t23; char *t25; int t26; char *t27; char *t28; char *t29; char *t30; char *t31; char *t32; char *t33; char *t34; char *t35; char *t36; char *t37; char *t38; LAB0: xsi_set_current_line(29, ng0); t1 = (t0 + 1192U); t2 = *((char **)t1); t3 = (0 - 4); t4 = (t3 * -1); t5 = (1U * t4); t6 = (0 + t5); t1 = (t2 + t6); t7 = *((unsigned char *)t1); t8 = (t7 == (unsigned char)3); if (t8 != 0) goto LAB3; LAB4: LAB5: t31 = xsi_get_transient_memory(8U); memset(t31, 0, 8U); t32 = t31; memset(t32, (unsigned char)2, 8U); t33 = (t0 + 5872); t34 = (t33 + 56U); t35 = *((char **)t34); t36 = (t35 + 56U); t37 = *((char **)t36); memcpy(t37, t31, 8U); xsi_driver_first_trans_fast(t33); LAB2: t38 = (t0 + 5504); *((int *)t38) = 1; LAB1: return; LAB3: t9 = (t0 + 9115); t11 = (t0 + 1032U); t12 = *((char **)t11); t13 = (7 - 7); t14 = (t13 * 1U); t15 = (0 + t14); t11 = (t12 + t15); t18 = ((IEEE_P_2592010699) + 4024); t20 = (t19 + 0U); t21 = (t20 + 0U); *((int *)t21) = 0; t21 = (t20 + 4U); *((int *)t21) = 3; t21 = (t20 + 8U); *((int *)t21) = 1; t22 = (3 - 0); t23 = (t22 * 1); t23 = (t23 + 1); t21 = (t20 + 12U); *((unsigned int *)t21) = t23; t21 = (t24 + 0U); t25 = (t21 + 0U); *((int *)t25) = 7; t25 = (t21 + 4U); *((int *)t25) = 4; t25 = (t21 + 8U); *((int *)t25) = -1; t26 = (4 - 7); t23 = (t26 * -1); t23 = (t23 + 1); t25 = (t21 + 12U); *((unsigned int *)t25) = t23; t16 = xsi_base_array_concat(t16, t17, t18, (char)97, t9, t19, (char)97, t11, t24, (char)101); t25 = (t0 + 5872); t27 = (t25 + 56U); t28 = *((char **)t27); t29 = (t28 + 56U); t30 = *((char **)t29); memcpy(t30, t16, 8U); xsi_driver_first_trans_fast(t25); goto LAB2; LAB6: goto LAB2; } static void work_a_3516827427_3212880686_p_5(char *t0) { char t1[16]; char t2[16]; char t3[16]; char t4[16]; char *t5; char *t6; char *t7; char *t8; char *t9; char *t10; char *t11; char *t12; char *t13; char *t14; char *t15; char *t16; char *t17; char *t18; char *t19; unsigned int t20; unsigned int t21; unsigned char t22; char *t23; char *t24; char *t25; char *t26; char *t27; char *t28; LAB0: xsi_set_current_line(32, ng0); LAB3: t5 = (t0 + 2472U); t6 = *((char **)t5); t5 = (t0 + 9016U); t7 = (t0 + 2312U); t8 = *((char **)t7); t7 = (t0 + 9016U); t9 = ieee_p_1242562249_sub_3273497107_1035706684(IEEE_P_1242562249, t4, t6, t5, t8, t7); t10 = (t0 + 2152U); t11 = *((char **)t10); t10 = (t0 + 9016U); t12 = ieee_p_1242562249_sub_3273497107_1035706684(IEEE_P_1242562249, t3, t9, t4, t11, t10); t13 = (t0 + 1992U); t14 = *((char **)t13); t13 = (t0 + 9016U); t15 = ieee_p_1242562249_sub_3273497107_1035706684(IEEE_P_1242562249, t2, t12, t3, t14, t13); t16 = (t0 + 1832U); t17 = *((char **)t16); t16 = (t0 + 9016U); t18 = ieee_p_1242562249_sub_3273497107_1035706684(IEEE_P_1242562249, t1, t15, t2, t17, t16); t19 = (t1 + 12U); t20 = *((unsigned int *)t19); t21 = (1U * t20); t22 = (8U != t21); if (t22 == 1) goto LAB5; LAB6: t23 = (t0 + 5936); t24 = (t23 + 56U); t25 = *((char **)t24); t26 = (t25 + 56U); t27 = *((char **)t26); memcpy(t27, t18, 8U); xsi_driver_first_trans_fast(t23); LAB2: t28 = (t0 + 5520); *((int *)t28) = 1; LAB1: return; LAB4: goto LAB2; LAB5: xsi_size_not_matching(8U, t21, 0); goto LAB6; } static void work_a_3516827427_3212880686_p_6(char *t0) { char t28[16]; char *t1; char *t2; int t3; unsigned int t4; unsigned int t5; unsigned int t6; unsigned char t7; unsigned char t8; char *t9; char *t10; char *t11; char *t12; char *t13; char *t14; char *t15; char *t16; unsigned char t18; unsigned int t19; char *t20; char *t21; char *t22; char *t23; char *t24; char *t25; char *t26; char *t27; char *t29; char *t30; char *t31; char *t32; char *t33; char *t34; char *t35; char *t36; char *t37; LAB0: xsi_set_current_line(33, ng0); t1 = (t0 + 1032U); t2 = *((char **)t1); t3 = (7 - 7); t4 = (t3 * -1); t5 = (1U * t4); t6 = (0 + t5); t1 = (t2 + t6); t7 = *((unsigned char *)t1); t8 = (t7 == (unsigned char)2); if (t8 != 0) goto LAB3; LAB4: t15 = (t0 + 1192U); t16 = *((char **)t15); t15 = (t0 + 9119); t18 = 1; if (5U == 5U) goto LAB7; LAB8: t18 = 0; LAB9: if (t18 != 0) goto LAB5; LAB6: LAB13: t29 = (t0 + 1512U); t30 = *((char **)t29); t29 = (t0 + 8984U); t31 = ieee_p_1242562249_sub_3481121704_1035706684(IEEE_P_1242562249, t28, t30, t29); t32 = (t0 + 6000); t33 = (t32 + 56U); t34 = *((char **)t33); t35 = (t34 + 56U); t36 = *((char **)t35); memcpy(t36, t31, 8U); xsi_driver_first_trans_fast_port(t32); LAB2: t37 = (t0 + 5536); *((int *)t37) = 1; LAB1: return; LAB3: t9 = (t0 + 1512U); t10 = *((char **)t9); t9 = (t0 + 6000); t11 = (t9 + 56U); t12 = *((char **)t11); t13 = (t12 + 56U); t14 = *((char **)t13); memcpy(t14, t10, 8U); xsi_driver_first_trans_fast_port(t9); goto LAB2; LAB5: t22 = (t0 + 1032U); t23 = *((char **)t22); t22 = (t0 + 6000); t24 = (t22 + 56U); t25 = *((char **)t24); t26 = (t25 + 56U); t27 = *((char **)t26); memcpy(t27, t23, 8U); xsi_driver_first_trans_fast_port(t22); goto LAB2; LAB7: t19 = 0; LAB10: if (t19 < 5U) goto LAB11; else goto LAB9; LAB11: t20 = (t16 + t19); t21 = (t15 + t19); if (*((unsigned char *)t20) != *((unsigned char *)t21)) goto LAB8; LAB12: t19 = (t19 + 1); goto LAB10; LAB14: goto LAB2; } extern void work_a_3516827427_3212880686_init() { static char *pe[] = {(void *)work_a_3516827427_3212880686_p_0,(void *)work_a_3516827427_3212880686_p_1,(void *)work_a_3516827427_3212880686_p_2,(void *)work_a_3516827427_3212880686_p_3,(void *)work_a_3516827427_3212880686_p_4,(void *)work_a_3516827427_3212880686_p_5,(void *)work_a_3516827427_3212880686_p_6}; xsi_register_didat("work_a_3516827427_3212880686", "isim/LearningNetwork_isim_beh.exe.sim/work/a_3516827427_3212880686.didat"); xsi_register_executes(pe); }
38642bdffced0cbabd4a02a1b00342b981f59ab4
8430dad17fa75e1681ced7965379729abfac4a55
/bebop_ws/devel/include/topic_tools/MuxListRequest.h
fad2bb8ba75f960f8608b3a6ee4ce703068fac44
[]
no_license
cvr-lab/Indoor_Dron_Experiments_ROS
7d3eb61a780d8ec74043487f257499a00c12fdfe
296671036dca9170e2013362c9ff30daee8bad3f
refs/heads/master
2020-04-27T06:48:46.967636
2019-01-24T20:58:34
2019-01-24T20:58:34
null
0
0
null
null
null
null
UTF-8
C
false
false
84
h
MuxListRequest.h
/home/cezar/bebop_ws/devel/.private/topic_tools/include/topic_tools/MuxListRequest.h
d7750ed91937223c9f2c71eaa125a83d4b2e523c
bdad5d4613367936a5e022e0b83f5cb35742329f
/mdb_manage.h
66f342a41b9de60d600861aaf03d45ada9aaebc1
[]
no_license
cdo256/mathdb
a579934efe8180bd167bc4c21263257f5569f930
f8694821a7440cac25fd039139f61f88a529afc7
refs/heads/master
2021-11-10T16:03:24.705741
2020-05-10T13:38:20
2020-05-10T13:38:20
150,709,745
0
0
null
null
null
null
UTF-8
C
false
false
198
h
mdb_manage.h
#pragma once #include "mdb_base.h" #include "mdb_graph.h" void MDB_stdcall MDB_CreateGraph(void); void MDB_stdcall MDB_FreeGraph(void); void MDB_stdcall MDB_SetErrorBreakpointsEnabled(s32 enable);
96ef715f1ad1a3723d1e166a67c0e63b0dc846db
9ceacf33fd96913cac7ef15492c126d96cae6911
/sys/arch/hppa/dev/apic.c
ee416c6e40e8eb579197d4ac4c6e8cd4bc533f86
[]
no_license
openbsd/src
ab97ef834fd2d5a7f6729814665e9782b586c130
9e79f3a0ebd11a25b4bff61e900cb6de9e7795e9
refs/heads/master
2023-09-02T18:54:56.624627
2023-09-02T15:16:12
2023-09-02T15:16:12
66,966,208
3,394
1,235
null
2023-08-08T02:42:25
2016-08-30T18:18:25
C
UTF-8
C
false
false
8,810
c
apic.c
/* $OpenBSD: apic.c,v 1.19 2018/05/14 13:54:39 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff * Copyright (c) 2007 Mark Kettenis * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/param.h> #include <sys/systm.h> #include <sys/device.h> #include <sys/evcount.h> #include <sys/malloc.h> #include <machine/autoconf.h> #include <machine/pdc.h> #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcidevs.h> #include <hppa/dev/elroyreg.h> #include <hppa/dev/elroyvar.h> #define APIC_INT_LINE_MASK 0x0000ff00 #define APIC_INT_LINE_SHIFT 8 #define APIC_INT_IRQ_MASK 0x0000001f #define APIC_INT_LINE(x) (((x) & APIC_INT_LINE_MASK) >> APIC_INT_LINE_SHIFT) #define APIC_INT_IRQ(x) ((x) & APIC_INT_IRQ_MASK) /* * Interrupt types match the Intel MP Specification. */ #define MPS_INTPO_DEF 0 #define MPS_INTPO_ACTHI 1 #define MPS_INTPO_ACTLO 3 #define MPS_INTPO_SHIFT 0 #define MPS_INTPO_MASK 3 #define MPS_INTTR_DEF 0 #define MPS_INTTR_EDGE 1 #define MPS_INTTR_LEVEL 3 #define MPS_INTTR_SHIFT 2 #define MPS_INTTR_MASK 3 #define MPS_INT(p,t) \ ((((p) & MPS_INTPO_MASK) << MPS_INTPO_SHIFT) | \ (((t) & MPS_INTTR_MASK) << MPS_INTTR_SHIFT)) struct apic_iv { struct elroy_softc *sc; pci_intr_handle_t ih; int (*handler)(void *); void *arg; struct apic_iv *next; struct evcount *cnt; }; struct apic_iv *apic_intr_list[CPU_NINTS]; void apic_get_int_tbl(struct elroy_softc *); u_int32_t apic_get_int_ent0(struct elroy_softc *, int); #ifdef DEBUG void apic_dump(struct elroy_softc *); #endif void apic_write(volatile struct elroy_regs *r, u_int32_t reg, u_int32_t val); u_int32_t apic_read(volatile struct elroy_regs *r, u_int32_t reg); void apic_write(volatile struct elroy_regs *r, u_int32_t reg, u_int32_t val) { elroy_write32(&r->apic_addr, htole32(reg)); elroy_write32(&r->apic_data, htole32(val)); elroy_read32(&r->apic_data); } u_int32_t apic_read(volatile struct elroy_regs *r, u_int32_t reg) { elroy_write32(&r->apic_addr, htole32(reg)); return letoh32(elroy_read32(&r->apic_data)); } void apic_attach(struct elroy_softc *sc) { volatile struct elroy_regs *r = sc->sc_regs; u_int32_t data; data = apic_read(r, APIC_VERSION); sc->sc_nints = (data & APIC_VERSION_NENT) >> APIC_VERSION_NENT_SHIFT; printf(" APIC ver %x, %d pins", data & APIC_VERSION_MASK, sc->sc_nints); sc->sc_irq = mallocarray(sc->sc_nints, sizeof(int), M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->sc_irq == NULL) panic("apic_attach: cannot allocate irq table"); apic_get_int_tbl(sc); #ifdef DEBUG apic_dump(sc); #endif } int apic_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) { struct elroy_softc *sc = pa->pa_pc->_cookie; pci_chipset_tag_t pc = pa->pa_pc; pcitag_t tag = pa->pa_tag; pcireg_t reg; int line; reg = pci_conf_read(pc, tag, PCI_INTERRUPT_REG); #ifdef DEBUG printf(" pin=%d line=%d ", PCI_INTERRUPT_PIN(reg), PCI_INTERRUPT_LINE(reg)); #endif line = PCI_INTERRUPT_LINE(reg); if (sc->sc_irq[line] <= 0) { if ((sc->sc_irq[line] = cpu_intr_findirq()) == -1) return 1; } *ihp = (line << APIC_INT_LINE_SHIFT) | sc->sc_irq[line]; return (APIC_INT_IRQ(*ihp) == 0); } const char * apic_intr_string(void *v, pci_intr_handle_t ih) { static char buf[32]; snprintf(buf, 32, "line %ld irq %ld", APIC_INT_LINE(ih), APIC_INT_IRQ(ih)); return (buf); } void * apic_intr_establish(void *v, pci_intr_handle_t ih, int pri, int (*handler)(void *), void *arg, const char *name) { struct elroy_softc *sc = v; volatile struct elroy_regs *r = sc->sc_regs; hppa_hpa_t hpa = cpu_gethpa(0); struct evcount *cnt; struct apic_iv *aiv, *biv; void *iv; int irq = APIC_INT_IRQ(ih); int line = APIC_INT_LINE(ih); u_int32_t ent0; /* no mapping or bogus */ if (irq <= 0 || irq > 31) return (NULL); aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT); if (aiv == NULL) return (NULL); cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT); if (!cnt) { free(aiv, M_DEVBUF, sizeof *aiv); return (NULL); } aiv->sc = sc; aiv->ih = ih; aiv->handler = handler; aiv->arg = arg; aiv->next = NULL; aiv->cnt = cnt; evcount_attach(cnt, name, NULL); if (apic_intr_list[irq]) { biv = apic_intr_list[irq]; while (biv->next) biv = biv->next; biv->next = aiv; return (arg); } if ((iv = cpu_intr_establish(pri, irq, apic_intr, aiv, NULL))) { ent0 = (31 - irq) & APIC_ENT0_VEC; ent0 |= apic_get_int_ent0(sc, line); #if 0 if (cold) { sc->sc_imr |= (1 << irq); ent0 |= APIC_ENT0_MASK; } #endif apic_write(sc->sc_regs, APIC_ENT0(line), APIC_ENT0_MASK); apic_write(sc->sc_regs, APIC_ENT1(line), ((hpa & 0x0ff00000) >> 4) | ((hpa & 0x000ff000) << 12)); apic_write(sc->sc_regs, APIC_ENT0(line), ent0); /* Signal EOI. */ elroy_write32(&r->apic_eoi, htole32((31 - irq) & APIC_ENT0_VEC)); apic_intr_list[irq] = aiv; } return (arg); } void apic_intr_disestablish(void *v, void *cookie) { } int apic_intr(void *v) { struct apic_iv *iv = v; struct elroy_softc *sc = iv->sc; volatile struct elroy_regs *r = sc->sc_regs; pci_intr_handle_t ih = iv->ih; int claimed = 0; while (iv) { claimed = iv->handler(iv->arg); if (claimed != 0 && iv->cnt) iv->cnt->ec_count++; if (claimed == 1) break; iv = iv->next; } /* Signal EOI. */ elroy_write32(&r->apic_eoi, htole32((31 - APIC_INT_IRQ(ih)) & APIC_ENT0_VEC)); return (claimed); } /* Maximum number of supported interrupt routing entries. */ #define MAX_INT_TBL_SZ 16 void apic_get_int_tbl(struct elroy_softc *sc) { struct pdc_pat_io_num int_tbl_sz PDC_ALIGNMENT; struct pdc_pat_pci_rt int_tbl[MAX_INT_TBL_SZ] PDC_ALIGNMENT; size_t size; /* * XXX int_tbl should not be allocated on the stack, but we need a * 1:1 mapping, and malloc doesn't provide that. */ if (pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SZ, &int_tbl_sz, 0, 0, 0, 0, 0)) return; if (int_tbl_sz.num > MAX_INT_TBL_SZ) panic("interrupt routing table too big (%d entries)", int_tbl_sz.num); size = int_tbl_sz.num * sizeof(struct pdc_pat_pci_rt); sc->sc_int_tbl_sz = int_tbl_sz.num; sc->sc_int_tbl = malloc(size, M_DEVBUF, M_NOWAIT); if (sc->sc_int_tbl == NULL) return; if (pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL, &int_tbl_sz, 0, &int_tbl, 0, 0, 0)) return; memcpy(sc->sc_int_tbl, int_tbl, size); } u_int32_t apic_get_int_ent0(struct elroy_softc *sc, int line) { volatile struct elroy_regs *r = sc->sc_regs; int trigger = MPS_INT(MPS_INTPO_DEF, MPS_INTTR_DEF); u_int32_t ent0 = APIC_ENT0_LOW | APIC_ENT0_LEV; int bus, mpspo, mpstr; int i; bus = letoh32(elroy_read32(&r->busnum)) & 0xff; for (i = 0; i < sc->sc_int_tbl_sz; i++) { if (bus == sc->sc_int_tbl[i].bus && line == sc->sc_int_tbl[i].line) trigger = sc->sc_int_tbl[i].trigger; } mpspo = (trigger >> MPS_INTPO_SHIFT) & MPS_INTPO_MASK; mpstr = (trigger >> MPS_INTTR_SHIFT) & MPS_INTTR_MASK; switch (mpspo) { case MPS_INTPO_DEF: break; case MPS_INTPO_ACTHI: ent0 &= ~APIC_ENT0_LOW; break; case MPS_INTPO_ACTLO: ent0 |= APIC_ENT0_LOW; break; default: panic("unknown MPS interrupt polarity %d", mpspo); } switch(mpstr) { case MPS_INTTR_DEF: break; case MPS_INTTR_LEVEL: ent0 |= APIC_ENT0_LEV; break; case MPS_INTTR_EDGE: ent0 &= ~APIC_ENT0_LEV; break; default: panic("unknown MPS interrupt trigger %d", mpstr); } return ent0; } #ifdef DEBUG void apic_dump(struct elroy_softc *sc) { int i; for (i = 0; i < sc->sc_nints; i++) printf("0x%04x 0x%04x\n", apic_read(sc->sc_regs, APIC_ENT0(i)), apic_read(sc->sc_regs, APIC_ENT1(i))); for (i = 0; i < sc->sc_int_tbl_sz; i++) { printf("type=%x ", sc->sc_int_tbl[i].type); printf("len=%d ", sc->sc_int_tbl[i].len); printf("itype=%d ", sc->sc_int_tbl[i].itype); printf("trigger=%x ", sc->sc_int_tbl[i].trigger); printf("pin=%x ", sc->sc_int_tbl[i].pin); printf("bus=%d ", sc->sc_int_tbl[i].bus); printf("line=%d ", sc->sc_int_tbl[i].line); printf("addr=%x\n", sc->sc_int_tbl[i].addr); } } #endif
9303a1743ebcb62ed3dfe1f6c1b68ebb74f93f99
dee68baad76e346f9dc25fc1f5275f574a873f0f
/tests/pretty_printing/relations.c
9e1e63aaa0f4c4c56b039ebdc740e353891f4d30
[]
no_license
cirosantilli/frama-c
2ad1a5252c6bf1daa2db10850c26825c0e5c6077
439bddd91e0686429a585ec3ae28200b60a31e8b
refs/heads/master
2016-09-05T10:39:18.243261
2015-06-25T05:25:50
2015-06-25T05:25:50
38,029,724
2
4
null
null
null
null
UTF-8
C
false
false
189
c
relations.c
/*@ predicate rel1(integer x, integer y, integer z, integer t) = x <= y <= z && z >= t; */ /*@ predicate rel2(integer x, integer y, integer z, integer t) = x <= y == z && z >= t; */
b28af0b17a02274cce77e326fa182f11fb3b715c
0b2937133caa8e8f568fc57b5740e333c8024782
/ble_central_functions.c
ddb794bd1f80e036f4595076e23874c48136f236
[]
no_license
pgils/ble_plant_monitor
38f922887e0b5166564ea6e1ad20561615ea9b2e
b73e4196afde66a5feb9886365cfbc8a6e5f9f7b
refs/heads/master
2021-02-15T06:15:03.877349
2020-05-27T05:07:18
2020-05-27T05:07:18
244,871,134
0
0
null
2020-05-27T05:07:29
2020-03-04T10:26:14
C
UTF-8
C
false
false
13,153
c
ble_central_functions.c
/** **************************************************************************************** * * @file ble_peripheral_task.c * * @brief BLE peripheral task * * Copyright (C) 2019 Dialog Semiconductor. * This computer program includes Confidential, Proprietary Information * of Dialog Semiconductor. All Rights Reserved. * **************************************************************************************** */ #include <stdlib.h> #include <string.h> #include <stdio.h> #include "osal.h" #include "time.h" #include "sys_watchdog.h" #include "sdk_list.h" #include "ble_att.h" #include "ble_gap.h" #include "ble_gattc.h" #include "ble_gatts.h" #include "ble_service.h" #include "ble_uuid.h" #include "ble_common.h" /* Required libraries for the target application */ #include "ble_central_functions.h" #include "ble_bluetanist_common.h" #include "ble_custom_service.h" /* List of devices waiting for connection */ // TODO: use a queue for this __RETAINED static void *node_devices_scanned; /* List of devices connected */ __RETAINED static void *node_devices_connected; /* Retained return data array for slave sensor data */ __RETAINED static uint8_t *node_data; /* * helper function for finding a node by connection id in a linked list */ void *list_find_node_by_connid(void *head, const uint8_t idx) { struct node_list_elem *e = head; while (e && !(e->conn_idx == idx)) { e = e->next; } return e; } /* * helper function for finding an attribute list item by handle */ void *list_find_attr_by_handle(void *head, const uint16_t handle) { struct sensor_attr_list_elem *e = head; while (e && !(e->handle == handle)) { e = e->next; } return e; } void list_foreach_nonconst(void *head, void (* cb) (const void *, void *), void *ud) { struct list_elem *e = head; while (e) { cb(e, ud); e = e->next; } } void discover_node_service(const void *elem, const void *ud) { ble_error_t status; const struct node_list_elem *node = elem; const att_uuid_t *svc_uuid = ud; printf("Starting service discovery for connection: %d\r\n", node->conn_idx); status = ble_gattc_discover_svc(node->conn_idx, svc_uuid); } void copy_attribute_value(const void *elem, void *ud) { const struct sensor_attr_list_elem *attr = elem; uint8_t *target = ud; uint16_t offset = 0; // compare this attribute's UUID to make sure data ordering is identical between nodes and read cycles // the data frame: [connid][temp][humid][water] // TODO: make some something better for this if(ble_uuid_equal(&attr->uuid, &node_data_attr_temp)) { offset = sizeof(attr->value); } else if(ble_uuid_equal(&attr->uuid, &node_data_attr_humid)) { offset = sizeof(attr->value)*2; } else if(ble_uuid_equal(&attr->uuid, &node_data_attr_water)) { offset = sizeof(attr->value)*3; } else { printf("copy_attribute_value(): unknown attribute uuid: %s\r\n", ble_uuid_to_string(&attr->uuid)); return; } memcpy(target+offset, &attr->value, sizeof(attr->value)); } void copy_node_sensor_data(const void *elem, void *ud) { const struct node_list_elem *node = elem; uint16_t *offset = ud; uint8_t attribute_data[NODE_SENSOR_DATA_TRANSFER_SIZE] = { 0 }; // copy the connection id for identification // TODO: send the device MAC address as well memcpy(attribute_data, &node->conn_idx, sizeof(node->conn_idx)); // index += 2 effectively; for each attribute as all attributes are 2 bytes list_foreach_nonconst(node->attr_list, copy_attribute_value, &attribute_data); memcpy(node_data+*offset, attribute_data, sizeof(attribute_data)); *offset += sizeof(attribute_data); } /* * @brief Read request callback * * This callback is fired when a peer device issues a read request. This implies that * that the peer device wants to read the Characteristic Attribute value. User should * provide the requested data. * * \param [in] value: The value returned back to the peer device * * \param [in] length: The number of bytes/octets returned * * * \warning: The callback function should have that specific prototype * * \warning: The BLE stack will not proceed with the next BLE event until the * callback returns. */ void get_node_data_cb(uint8_t **value, uint16_t *length) { ble_error_t status; uint8_t conn_count; uint16_t *conn_idx; int i; /* * 1: push all connected nodes in the connected node list */ taskENTER_CRITICAL(); status = ble_gap_get_connected(&conn_count, &conn_idx); taskEXIT_CRITICAL(); if(status == BLE_STATUS_OK) { printf("Requesting data from %d nodes\r\n", conn_count); } for (i = 0; i < conn_count; i++) { // skip if connected device already in list if(list_find_node_by_connid(node_devices_connected, conn_idx[i]) != NULL) { continue; } // append the node to the linked list for later connection struct node_list_elem *node = OS_MALLOC(sizeof(*node)); // initial zero values /* zero the struct */ memset((void *)node, 0x00, sizeof(*node)); memcpy(&node->conn_idx, &conn_idx[i], sizeof(node->conn_idx)); list_add(&node_devices_connected, node); } OS_FREE(conn_idx); /* * 2: request new node data * Initiate a service scan for the node data service, this will trigger * a chain of async calls with eventually new sensor data. * TODO: this should be done periodically */ att_uuid_t data_svc_uuid; ble_uuid_from_string(NODE_DATA_SVC_UUID, &data_svc_uuid); list_foreach(node_devices_connected, discover_node_service, &data_svc_uuid); /* * 3: return (old) node data */ uint16_t offset = 0; if(node_data != NULL) { OS_FREE(node_data); } node_data = OS_MALLOC(list_size(node_devices_connected) * NODE_SENSOR_DATA_TRANSFER_SIZE); list_foreach_nonconst(node_devices_connected, copy_node_sensor_data, &offset); *value = node_data; *length = offset; } /* * Main code */ /* * Handler for ble_gap_scan_start call. * Initiates a scan procedure. * Prints scan parameters and status returned by call */ bool gap_scan_start() { ble_error_t status; gap_scan_params_t scan_params; gap_scan_type_t type = CFG_SCAN_TYPE; gap_scan_mode_t mode = CFG_SCAN_MODE; bool filt_dup = CFG_SCAN_FILT_DUPLT; bool wlist = CFG_SCAN_FILT_WLIST; uint16_t interval, window; ble_gap_scan_params_get(&scan_params); window = scan_params.window; interval = scan_params.interval; status = ble_gap_scan_start(type, mode, interval, window, wlist, filt_dup); printf("BlueTanist node scan started [%d]\r\n", status); return true; } /* * Handler for ble_gap_connect call. * Initiates a direct connection procedure to a specified peer device. */ bool gap_connect(const bd_address_t *addr) { gap_conn_params_t params = CFG_CONN_PARAMS; printf("Initiating connection to: %s\r\n", ble_address_to_string(addr)); // keep trying if busy connecting other node while(BLE_ERROR_BUSY == ble_gap_connect(addr, &params)) { // Arbitrary delay to not flood the connect OS_DELAY_MS(100); } return true; } /* * Print GAP advertising report event information * Whitelist management API is not present in this SDK release. so we scan for all devices * and filter them manually. */ void handle_ble_evt_gap_adv_report(ble_evt_gap_adv_report_t *info) { int i; int offset; // the tail of the adv info is AD flags. Get the offset where the actual id starts. offset = info->length - adv_data->len; // compare the device advertised UUID against our advertised UUID for (i = info->length-1; i >= offset; i--) { if(info->data[i] != adv_data->data[i-offset]) { return; } } printf("BlueTanist node found: [%s]\r\n", ble_address_to_string(&info->address)); // append the node to the linked list for later connection struct node_list_elem *node = OS_MALLOC(sizeof(*node)); memcpy(&node->addr, &info->address, sizeof(node->addr)); list_add(&node_devices_scanned, node); } /* * Print GAP scan completed event information */ void handle_ble_evt_gap_scan_completed(const ble_evt_gap_scan_completed_t *info) { struct node_list_elem *element; printf("BlueTanist node scan completed. Found %d nodes\r\n", list_size(node_devices_scanned)); // connect all found nodes while(node_devices_scanned != NULL) { element = (struct node_list_elem *) list_pop_back(&node_devices_scanned); gap_connect(&element->addr); OS_FREE(element); } } /* * Handle service discoverd */ void handle_ble_evt_gattc_discover_svc(const ble_evt_gattc_discover_svc_t *info) { ble_error_t status; // sensor data service discovered, scan for attributes printf("Service discovered for %d: %s\r\n", info->conn_idx, ble_uuid_to_string(&info->uuid)); status = ble_gattc_discover_char(info->conn_idx, info->start_h, info->end_h, NULL); } /* * Handle characteristic discovered */ void handle_ble_evt_gattc_discover_char(const ble_evt_gattc_discover_char_t *info) { ble_error_t status; printf("Characteristic discovered for %d: %s\r\n", info->conn_idx, ble_uuid_to_string(&info->uuid)); // add the attribute to the node's attribute list struct node_list_elem *node = list_find_node_by_connid(node_devices_connected, info->conn_idx); if(node == NULL) { return; } // add the attribute to the attr list if needed (not needed on re-reads) struct sensor_attr_list_elem *elem = list_find_attr_by_handle(node->attr_list, info->handle); if(elem == NULL) { struct sensor_attr_list_elem *elem = OS_MALLOC(sizeof(*elem)); memcpy(&elem->handle, &info->handle, sizeof(elem->handle)); memcpy(&elem->uuid, &info->uuid, sizeof(elem->uuid)); list_add(&node->attr_list, elem); } // read the attribute status = ble_gattc_read(info->conn_idx, info->value_handle, 0); } /* * Handle characteristic data retrieved */ void handle_ble_evt_gattc_read_completed(ble_evt_gattc_read_completed_t *info) { int i; printf("Characteristic read for %d, length: %d, value: ", info->conn_idx, info->length); if(info->status == ATT_ERROR_OK) { /* * copy the value to the list element * if node or attribute do not yet exist something has gone wrong; ignore it */ struct node_list_elem *node = list_find_node_by_connid(node_devices_connected, info->conn_idx); if(node == NULL) { return; } // TODO: why is `handle` off by 1? struct sensor_attr_list_elem *elem = list_find_attr_by_handle(node->attr_list, info->handle-1); if(elem == NULL) { return; } memcpy(&elem->value, &info->value, sizeof(elem->value)); for (i = 0; i < info->length; ++i) { printf("%02x", elem->value[i]); } printf("\r\n"); } } bool pmp_ble_handle_event(const ble_evt_hdr_t *evt) { switch (evt->evt_code) { case BLE_EVT_GAP_ADV_REPORT: handle_ble_evt_gap_adv_report((ble_evt_gap_adv_report_t *) evt); break; case BLE_EVT_GAP_SCAN_COMPLETED: handle_ble_evt_gap_scan_completed((ble_evt_gap_scan_completed_t *) evt); break; case BLE_EVT_GAP_CONNECTION_COMPLETED: handle_ble_evt_gap_connection_completed((ble_evt_gap_connection_completed_t *) evt); break; case BLE_EVT_GATTC_DISCOVER_SVC: handle_ble_evt_gattc_discover_svc((ble_evt_gattc_discover_svc_t *) evt); break; case BLE_EVT_GATTC_DISCOVER_CHAR: handle_ble_evt_gattc_discover_char((ble_evt_gattc_discover_char_t *) evt); break; case BLE_EVT_GATTC_READ_COMPLETED: handle_ble_evt_gattc_read_completed((ble_evt_gattc_read_completed_t *) evt); } return false; }
d8d31f4ef2848341e5e65ba7829d68348438174a
4f2782c00074585a005732ed4f715b7ea1038161
/WMCamera/Pods/Runtopia-Defines/RuntopiaDefines/RuntopiaDefines/Runtopia-Defines.h
26d514f075e97d3b18e8fc4c45b9ba4820567a8c
[ "MIT" ]
permissive
hardik27194/WMCamera
4c5e2d5bca5fb2b6e5001f625322af9997626237
544348d14e180d791629f13d0a87b868fe64003b
refs/heads/master
2021-01-20T06:38:39.467982
2016-10-14T05:16:27
2016-10-14T05:16:27
null
0
0
null
null
null
null
UTF-8
C
false
false
365
h
Runtopia-Defines.h
// // Runtopia-Defines.h // RuntopiaDefines // // Created by LeoKing on 16/10/12. // Copyright © 2016年 Runtopia. All rights reserved. // #ifndef Runtopia_Defines_h #define Runtopia_Defines_h #define Runtopia_Debug YES #define RELEASE_TO_APPSTORE (!Runtopia_Debug) #define FLURRY(x) (Runtopia_Debug? : [Flurry logEvent:x]) #endif /* Runtopia_Defines_h */
2bd400bb3acd959a3e99d62bbc0958ddcf961a02
14d7517310bd12536a39d59f04815e5930bd72b5
/practica3/G2201_P06_3/src/ejercicio5.c
21fb77a8e49a5e0dad553b7296c46f4d398124c4
[]
no_license
luiscarabe/SOPER
249c78d44e99e78a5c9db4e8c5eca24bd6ec6cc6
86354ce2d4480f7d7313ab080a70dc9b8946afda
refs/heads/master
2021-03-29T15:14:09.874325
2017-05-12T19:59:28
2017-05-12T19:59:28
80,942,602
1
0
null
null
null
null
UTF-8
C
false
false
9,509
c
ejercicio5.c
/** * @brief Programa correspondiente al ejercicio 5 de la práctica 3 de Sistemas Operativos * * Este programa prueba que funciona nuestra libreria semaforos.h implementada en el ejercicio anterior * * @file ejercicio5.c * @author Luis Carabe y Emilio Cuesta * @date 05-04-2017 */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> #include <string.h> #include <errno.h> #include <sys/shm.h> #include <unistd.h> #include <signal.h> #include "semaforos.h" #define FILEKEY "/bin/cat" /*Util para ftok */ #define KEY 1300 #define SEMNUM 5 /** * @brief Estructura guardada en la region de memoria compartida. * * Esta estructura dispone de dos campos, una cadena de caracteres que almacena el nombre * de un cliente y un entero que seria su id. */ typedef struct _info{ char nombre[80]; int id; } info; /** * @brief Manejador definido para la senial SIGUSR1. * * Imprime el nombre y el id de un usuario por pantalla */ void manejador_SIGUSR1(); /*Variable global del tipo struct a la que tienen acceso los dos procesos. Se declara global para que en el codigo del manejador se pueda acceder a ella*/ info* buffer; /** * @brief Esta funcion (del ejercicio 2) crea una zona de memoria compartida, * posteriormente, realiza un fork. Desde el proceso hijo se solicita la informacion * de los nuevos clientes por pantalla. Desde el proceso padre, se imprime desde el * manejador esta informacion cuando se recibe la senial SIGUSR1 que envia el hijo * una vez recibida la informacion. En este ejercicio lo implementamos con semáforos * @param int num Numero de usuarios que se van a introducir. */ int ejercicio2Sem(int num); /** * @brief Funcion main del programa que primero comprueba que todas las funciones * de la libreria semaforos.h realizan bien su trabajo, tras esto, aplicamos * las funciones a un ejemplo práctico, como el realizado en el ejercicio2.c, que * ahora implementamos con semáforos, quitando el sleep */ int main(){ int semid, key; int i, num; int* active; unsigned short* init; union semun { int val; struct semid_ds *semstat; unsigned short *array; } arg; key = ftok(FILEKEY, KEY); if (key == -1) { fprintf (stderr, "Error with key \n"); return -1; } /*Comprobacion de Crear_Semaforo*/ if(Crear_Semaforo(key, SEMNUM, &semid) != 0){ fprintf(stderr, "Error en Crear_Semaforo(retorno)\n"); return -1; } if(semid < 1){ fprintf(stderr, "Error en Crear_Semaforo(id mal generado)\n"); return -1; } arg.array = (unsigned short*)malloc(SEMNUM*sizeof(unsigned int)); semctl(semid,0, GETALL, arg); for(i=0; i<SEMNUM; i++){ if(arg.array[i] != 0){ fprintf(stderr, "Error en Crear_Semaforo(no bien inicializado)\n"); return -1; } } if(Crear_Semaforo(key, SEMNUM, &semid) != 1){ fprintf(stderr, "Error en Crear_Semaforo(retorno)\n"); return -1; } /*Comprobacion de Inicializar_Semaforo*/ init = (unsigned short*) malloc (SEMNUM*sizeof(unsigned short)); if(init == NULL){ return -1; } for(i=0; i< SEMNUM; i++){ init[i] = i; } if(Inicializar_Semaforo(semid, init) == ERROR){ fprintf(stderr, "Error en Inicializar_Semaforo (Retorno)\n" ); free(init); return -1; } semctl(semid,0, GETALL, arg); for(i=0; i<SEMNUM; i++){ if(arg.array[i] != i){ fprintf(stderr, "Error en Inicializar_Semaforo (valores)\n"); free(init); return -1; } } free(init); /*Comprobacion de UpMultiple_Semaforo*/ active = (int*)malloc(SEMNUM*sizeof(int)); if(active == NULL){ return -1; } for(i=0; i<SEMNUM; i++){ active[i] = i; } if(UpMultiple_Semaforo(semid, SEMNUM, SEM_UNDO, active) == ERROR){ fprintf(stderr, "Error en UpMultiple_Semaforo (Retorno)\n" ); free(active); return -1; } semctl(semid,0, GETALL, arg); for(i=0; i < SEMNUM; i++){ if(arg.array[i] != i+1){ fprintf(stderr, "Error en UpMultiple_Semaforo (valores)\n"); free(active); return -1; } } /*Comprobacion de DownMultiple_Semaforo*/ if(DownMultiple_Semaforo(semid, SEMNUM, SEM_UNDO, active) == ERROR){ fprintf(stderr, "Error en DownMultiple_Semaforo (Retorno)\n" ); free(active); return -1; } semctl(semid,0, GETALL, arg); for(i=0; i<SEMNUM; i++){ if(arg.array[i] != i){ fprintf(stderr, "Error en DownMultiple_Semaforo (valores)\n"); free(active); return -1; } } free(active); /*Comprobacion de Up_Semaforo*/ if(Up_Semaforo(semid, 2, SEM_UNDO) == ERROR){ fprintf(stderr, "Error en Up_Semaforo (Retorno)\n" ); return -1; } if(semctl(semid, 2, GETVAL, arg) != 3){ fprintf(stderr, "Error en Up_Semaforo (Incremento mal realizado)\n" ); return -1; }; /*Comprobacion del Down_Semaforo*/ if(Down_Semaforo(semid, 2, SEM_UNDO) == ERROR){ fprintf(stderr, "Error en Down_Semaforo (Retorno)\n" ); return -1; } if(semctl(semid, 2, GETVAL, arg) != 2){ fprintf(stderr, "Error en Down_Semaforo (Decremento mal realizado)\n" ); return -1; }; /*Comprobacion de Borrar_Semaforo*/ if(Borrar_Semaforo(semid) == ERROR){ fprintf(stderr, "Error en Borrar_Semaforo"); return -1; } fprintf(stdout, "No se han producido errores en la primera prueba de la librería \"semáforos.h\"\n"); free(arg.array); /* A continuación adaptaremos el código del ejercicio 2 para que funcione debidamente con semáforos*/ fprintf(stdout, "Introduce el número de procesos hijos a generar en el ejercicio2 realizado con semáforos:\n"); fscanf(stdin, "%d", &num); if(ejercicio2Sem(num)==-1){ perror("Error en el ejercicio2 con semáforos\n"); return -1; } fprintf(stdout, "No se han producido errores en la segunda prueba de la librería \"semáforos.h\"\n"); return 0; } int ejercicio2Sem(int num){ int id_zone, pid, semid; int i; int key, key2; unsigned short* init; union semun { int val; struct semid_ds *semstat; unsigned short *array; } arg; key2 = ftok(FILEKEY, KEY); if (key2 == -1) { fprintf (stderr, "Error with key \n"); return -1; } /*Creamos el semáforo*/ if(Crear_Semaforo(key2, 1, &semid) != 0){ fprintf(stderr, "Error en Crear_Semaforo(retorno)\n"); return -1; } if(semid < 1){ fprintf(stderr, "Error en Crear_Semaforo(id mal generado)\n"); return -1; } /*Inicializamos el semaforo*/ init = (unsigned short*) malloc (1*sizeof(unsigned short)); if(init == NULL){ return -1; } init[0] = 1; if(Inicializar_Semaforo(semid, init) == ERROR){ fprintf(stderr, "Error en Inicializar_Semaforo (Retorno)\n" ); free(init); return -1; } /*Armamos el manejador de la señal SIGUSR1*/ if(signal (SIGUSR1, manejador_SIGUSR1)==SIG_ERR){ perror("Error definiendo el manejador de senales"); free(init); exit(EXIT_FAILURE); } /*Creamos la zona de memoria compartida*/ key = ftok(FILEKEY, KEY); if (key == -1) { fprintf (stderr, "Error with key \n"); free(init); return -1; } id_zone = shmget(key, sizeof(info), IPC_CREAT | IPC_EXCL | SHM_R | SHM_W); if( id_zone == -1){ fprintf(stderr, "Error with id_zone \n"); free(init); exit(EXIT_FAILURE); } buffer = shmat( id_zone, (char*) 0, 0); if(buffer == NULL){ fprintf(stderr, "Error reserve shared memory \n"); free(init); exit(EXIT_FAILURE); } for (i=0, pid = 1; pid!=0 && i < num; i++){ pid = fork(); if(pid == -1){ perror("Error realizando el fork"); } if(pid == 0){ /*Ya no tenemos que hacer sleep, simplemente utilizamos el semáforo*/ if(Down_Semaforo(semid, 0, SEM_UNDO) == ERROR){ fprintf(stderr, "Error en Down_Semaforo (Retorno)\n" ); return -1; } printf("ALTA DE UN NUEVO CLIENTE (Proceso %d). Introduzca su nombre:\n", getpid()); scanf("%s", buffer->nombre); buffer->id++; kill(getppid(), SIGUSR1); shmdt ((char *)buffer); if(Up_Semaforo(semid, 0, SEM_UNDO) == ERROR){ fprintf(stderr, "Error en Up_Semaforo (Retorno)\n" ); return -1; } exit(EXIT_SUCCESS); } } for(i=0; i < num; i++){ wait(NULL); } /*Liberamos recursos*/ if(Borrar_Semaforo(semid) == ERROR){ fprintf(stderr, "Error en Borrar_Semaforo"); free(init); return -1; } free(init); shmdt ((char *)buffer); shmctl (id_zone, IPC_RMID, (struct shmid_ds *)NULL); return 0; } void manejador_SIGUSR1(){ printf("Nombre de usuario: %s, ID: %d\n", buffer->nombre, buffer->id); if(signal (SIGUSR1, manejador_SIGUSR1)==SIG_ERR){ perror("Error en definiciendo el manejador de senales"); exit(EXIT_FAILURE); } }
627369c9b30c1707810d2f5cabb51447a06e7dec
f2f7be4a46fa2a20a4c160f998b238b110725b27
/ios/Pods/Headers/Private/OpenSSL-Universal/openssl/ts.h
bb8467fe6d8d7152b1b24e9886fc3f148448505e
[]
no_license
shashankgogi/PushNotificationDemo
0ae6b2959fc76192ec09a07830a3504a27167fb4
72009945f2d46b0a3d6298879b38f1b957126547
refs/heads/main
2023-08-22T06:15:17.283708
2021-10-13T10:15:40
2021-10-13T10:15:40
416,678,197
0
0
null
null
null
null
UTF-8
C
false
false
1,067
h
ts.h
XSym 0054 ad0016467819cd44193e028708e255df ../../../../OpenSSL-Universal/ios/include/openssl/ts.h
8100cea48625c18123480dea1f8282fcb5f1f625
222098098796dfad4fe357f3587993c9646906f2
/led.h
64de5071443d4dbabac51b4c07b6d73586a03840
[]
no_license
Sergiorus/MPS_Coursework
5788b5c9256ad83a5eed1fdcd802d653768a0606
5a9c25377b782f9945468dc2c26627eb666287ba
refs/heads/main
2023-03-11T09:35:29.138980
2021-02-16T20:39:42
2021-02-16T20:39:42
321,060,740
0
0
null
2021-02-16T20:39:43
2020-12-13T12:33:40
null
UTF-8
C
false
false
289
h
led.h
#ifndef LED_H_ #define LED_H_ 1 #include <stdbool.h> enum led_id { LED1, LED2, LEDS0, LEDS1, LEDS2, LEDS3, LEDS4, LEDS5, LED_READY, }; void led_turn_on(enum led_id id); void led_turn_off(enum led_id id); void led_def(enum led_id id, bool val); void led_flush(void); #endif
ff313cb614de4fa57c63e5a87cae06b658330528
1f497a25af0068f83539c52fcdd72c2ade9d7369
/libinclude/DMA/dma3_16.h
baffcfff5c21cf3be683bdfa788a97250d3cac8c
[ "MIT" ]
permissive
LinoBigatti/APIagb
1425d1c1b7df6341f088758cbc73fed8023bfe21
5401548a8e723614f19034e1411055bda500430e
refs/heads/master
2020-04-21T01:51:20.317712
2019-12-06T22:11:56
2019-12-06T22:11:56
169,236,449
0
0
null
null
null
null
UTF-8
C
false
false
312
h
dma3_16.h
//Copy using 16 bit DMA, channel 3. #ifndef DMA3_16_H #define DMA3_16_H #ifdef __cplusplus extern "C" { #endif #include <basics/types.h> #include <IO.h> void dma3_16(const void *src, const void *dst, u32 length, u32 da, u32 sa, u32 timing, u32 other); #ifdef __cplusplus } #endif #endif
9527f8ae2882aaf50fd378559e2a9db07322bf32
bcd5fdefdc69244084d8cc057f74842d4044c882
/include/func.h
7f6047c7ac6c93d0f0bdca045731ea3e337a75ec
[]
no_license
lesterbogran/Mute-OS
39abf53201f22b664ba44bbe0923c35f2b807447
ec927dab915e22913e3cf82a742272a485f361c8
refs/heads/master
2020-04-02T04:53:57.287484
2017-03-31T01:40:13
2017-03-31T01:40:13
null
0
0
null
null
null
null
UTF-8
C
false
false
2,705
h
func.h
/** * func.h * Global functions declarition */ #include "console.h" #include "tty.h" #include "process.h" /* kernel/clock.c */ PUBLIC void clock_handler(int irq); PUBLIC void mili_delay(int milli_sec); PUBLIC void delay(int sec); /* kernel/kernel.asm */ PUBLIC void restart(); PUBLIC void sys_call(); /* kernel/protect.c */ PUBLIC void init_prot(); PUBLIC void init_8259A(); PUBLIC void exception_handler(int vec_no, int err_code, int eip, int cs, int eflags); PUBLIC void spurious_irq(int irq); PUBLIC u32 seg2phys(u16 seg); PUBLIC void put_irq_handler(int irq, irq_handler handler); PUBLIC void sleep(int milli_sec); /* kernel/keyboard.c */ PUBLIC void init_keyboard(); PUBLIC void keyboard_handler(int irq); PUBLIC void keyboard_read(TTY* p_tty); /* kernel/main.c */ PUBLIC int kernel_main(); PUBLIC void init_clock(); PUBLIC void TestB(); /* kernel/process.c */ PUBLIC int sys_get_ticks(); PUBLIC void schedule(); /* syscall.asm */ PUBLIC int get_ticks(); PUBLIC void write(char* buf, int len); PUBLIC void clscreen(); PUBLIC void disable_tty_output(); PUBLIC void enable_tty_output(); PUBLIC int get_key(); /* kernel/tty.c */ PUBLIC void task_tty(); PUBLIC void init_tty(TTY* p_tty); PUBLIC void in_process(TTY* p_tty ,u32 key); PUBLIC int sys_write(char* buf, int len, PROCESS* p_proc); PUBLIC void tty_write(TTY* p_tty, char* buf, int len); PUBLIC void sys_disable_tty_output(PROCESS* p_proc); PUBLIC void sys_enable_tty_output(PROCESS* p_proc); PUBLIC void sys_read_tty(PROCESS* p_proc); /* kernel/console.c */ PUBLIC void out_char(CONSOLE* p_con, char ch, int color); PUBLIC int is_current_console(CONSOLE* p_con); PUBLIC void clear_screen(CONSOLE* p_con); PUBLIC void sys_clear(PROCESS* p_proc); PUBLIC void init_screen(TTY* p_tty); PUBLIC void out_char(CONSOLE* p_con, char ch, int color); PUBLIC void out_string(CONSOLE* p_con, char* str, int color); PUBLIC void select_console(int nr_console); PUBLIC void scroll_screen(CONSOLE* p_con, int direction); /* lib/lib.asm */ PUBLIC void* memocpy(void* pDst, void* pSrc, int iSize); PUBLIC void memoset(void* p_dst, char ch, int size); PUBLIC void print(const char* pszInfo, const int color); PUBLIC char* strcpy(char* p_dst, char* p_src); PUBLIC void out_byte(u16 port, u8 value); PUBLIC u8 in_byte(u16 port); PUBLIC void disable_irq(int irq); PUBLIC void enable_irq(int irq); PUBLIC void disable_int(); PUBLIC void enable_int(); /* lib/stdlib.c */ PUBLIC char* itoa(char * str, int num); PUBLIC void print_bit(int input, char color); PUBLIC int printf(const char* fmt, ...); PUBLIC char* itoa10(char* str, int num); PUBLIC int strlen(char* str); PUBLIC void clear(); PUBLIC char keyboard_input(); PUBLIC int random(int max);
d72722cf04653f6f5555bf1f17f61de9f8a10952
d9acbf1a686bf590a19ba3aac1ab7f8af6954479
/Utils/paquete.h
e50b3f34edb90d2646dab3300066d388eada6617
[]
no_license
rbestardpino/Delibird
71cc3d55484844dad6f6f37bccb086abb6d526e0
c01e462ac110fe4957904aef7cf9bc63de7d60d0
refs/heads/master
2022-12-02T07:29:52.105981
2020-08-03T00:49:46
2020-08-03T00:49:46
284,567,047
0
0
null
null
null
null
UTF-8
C
false
false
347
h
paquete.h
#pragma once #include <netdb.h> #include <stdbool.h> typedef struct { uint32_t codigoOperacion; uint32_t tamanio; void* stream; int desplazamiento; } Paquete; extern void* Paquete_Serializar(Paquete* paquete, size_t* tamanioFinal); extern int Paquete_Procesar(int numSocket, Paquete* paquete); extern void Paquete_Liberar(Paquete* paquete);
9b0b97645756b3c9630797cd0b4e5e4c09714272
db869d424e2f132e2df9dbb78e169ae1ff031469
/PHY62XX_SDK_2.0.1/example/ble_peripheral/wrist_dfl/Source/ble/wristservice.c
e0184e6cea9935477ed5aebe27690882523e7c05
[ "Apache-2.0" ]
permissive
sentervip/phy62xBleSDk2.0.1
ad236f503807fc2a1cfa2cf8902115dd7444efec
edbb43c98d3f27a584a0026a5aac8197d7a219d0
refs/heads/master
2020-08-03T04:37:18.726232
2019-12-04T09:39:47
2019-12-04T09:39:47
211,626,151
2
0
null
null
null
null
UTF-8
C
false
false
25,292
c
wristservice.c
/************************************************************************************************** Phyplus Microelectronics Limited confidential and proprietary. All rights reserved. IMPORTANT: All rights of this software belong to Phyplus Microelectronics Limited ("Phyplus"). Your use of this Software is limited to those specific rights granted under the terms of the business contract, the confidential agreement, the non-disclosure agreement and any other forms of agreements as a customer or a partner of Phyplus. You may not use this Software unless you agree to abide by the terms of these agreements. You acknowledge that the Software may not be modified, copied, distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy (BLE) integrated circuit, either as a product or is integrated into your products. Other than for the aforementioned purposes, you may not use, reproduce, copy, prepare derivative works of, modify, distribute, perform, display or sell this Software and/or its documentation for any purposes. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. **************************************************************************************************/ /************************************************************************************************** Filename: wristservice.c Revised: $Date: 2018-02-06 13:33:47 -0700 (Mon, 06 May 2013) $ Revision: $Revision: 34153 $ **************************************************************************************************/ /********************************************************************* * INCLUDES */ #include <string.h> #include "bcomdef.h" #include "OSAL.h" #include "linkdb.h" #include "att.h" #include "gatt.h" #include "gatt_uuid.h" #include "gattservapp.h" #include "gapbondmgr.h" #include "ui_page.h" #include "led_light.h" #include "em70xx.h" #include "wristservice.h" #include "dfl.h" #include "log.h" #include "error.h" /********************************************************************* * MACROS */ #define SERVAPP_NUM_ATTR_SUPPORTED 8 /********************************************************************* * CONSTANTS */ /********************************************************************* * TYPEDEFS */ /********************************************************************* * GLOBAL VARIABLES */ // Wrist GATT Profile Service UUID: 0xFF01 CONST uint8 wristServUUID[ATT_BT_UUID_SIZE] = { LO_UINT16(WRIST_SERV_UUID), HI_UINT16(WRIST_SERV_UUID) }; // Characteristic 1 UUID: 0xFF02 CONST uint8 wristProfilecharCommandUUID[ATT_BT_UUID_SIZE] = { LO_UINT16(WRIST_CHAR_COMMAND_UUID), HI_UINT16(WRIST_CHAR_COMMAND_UUID) }; // Characteristic 2 UUID: 0xFF10 CONST uint8 wristProfilecharReadonlyUUID[ATT_BT_UUID_SIZE] = { LO_UINT16(WRIST_CHAR_READONLY_UUID), HI_UINT16(WRIST_CHAR_READONLY_UUID) }; /********************************************************************* * EXTERNAL VARIABLES */ /********************************************************************* * EXTERNAL FUNCTIONS */ /********************************************************************* * LOCAL VARIABLES */ /********************************************************************* * Profile Attributes - variables */ // Wrist Profile Service attribute static CONST gattAttrType_t wristProfileService = { ATT_BT_UUID_SIZE, wristServUUID }; // Wrist Profile Characteristic 1 Properties static uint8 wristProfileCharCommandProps = GATT_PROP_READ | GATT_PROP_WRITE|GATT_PROP_NOTIFY; // Characteristic 1 Value static uint8 wristProfileCharCommand[20]; // Wrist Profile Characteristic 4 Configuration Each client has its own // instantiation of the Client Characteristic Configuration. Reads of the // Client Characteristic Configuration only shows the configuration for // that client and writes only affect the configuration of that client. static gattCharCfg_t wristProfileCmdCCC[GATT_MAX_NUM_CONN]; // Wrist Profile Characteristic 1 User Description static uint8 wristProfileCharCommandUserDesp[14] = "CharCommand\0"; // Wrist Profile Characteristic 2 Properties static uint8 wristProfileCharReadonlyProps = GATT_PROP_READ; // Characteristic 2 Value static uint8 wristProfileCharReadonly[20]; // Wrist Profile Characteristic 2 User Description static uint8 wristProfileCharReadonlyUserDesp[14] = "CharReadonly\0"; /********************************************************************* * Profile Attributes - Table */ static gattAttribute_t wristProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] = { // Wrist Profile Service { { ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */ GATT_PERMIT_READ, /* permissions */ 0, /* handle */ (uint8 *)&wristProfileService /* pValue */ }, // Command Characteristic Declaration { { ATT_BT_UUID_SIZE, characterUUID }, GATT_PERMIT_READ, 0, &wristProfileCharCommandProps }, // Characteristic Value 1 { { ATT_BT_UUID_SIZE, wristProfilecharCommandUUID }, GATT_PERMIT_READ | GATT_PERMIT_WRITE, 0, &wristProfileCharCommand[0] }, // Characteristic configuration { { ATT_BT_UUID_SIZE, clientCharCfgUUID }, GATT_PERMIT_READ | GATT_PERMIT_WRITE, 0, (uint8 *)wristProfileCmdCCC }, // Characteristic command User Description { { ATT_BT_UUID_SIZE, charUserDescUUID }, GATT_PERMIT_READ, 0, wristProfileCharCommandUserDesp }, // Characteristic readonly Declaration { { ATT_BT_UUID_SIZE, characterUUID }, GATT_PERMIT_READ, 0, &wristProfileCharReadonlyProps }, // Characteristic Value 2 { { ATT_BT_UUID_SIZE, wristProfilecharReadonlyUUID }, GATT_PERMIT_READ, 0, &wristProfileCharReadonly[0] }, // Characteristic 2 User Description { { ATT_BT_UUID_SIZE, charUserDescUUID }, GATT_PERMIT_READ, 0, wristProfileCharReadonlyUserDesp } }; static wristServiceCB_t wristServiceCB = NULL; static wristService_t sWristService; static bool sNotifyAccelerationDataFlag = FALSE; static char s_msg_notif_data[MSG_NOTIF_SIZE]; /********************************************************************* * LOCAL FUNCTIONS */ static uint8 wristProfile_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen ); static bStatus_t wristProfile_WriteAttrCB( uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 len, uint16 offset ); static int wristProfile_Notify(attHandleValueNoti_t *pNoti ); static int cmd_response_err(const uint8* data, uint16 len, uint8 err_code); static int cmd_response(const uint8* data, uint16 len); static uint8 checksum(const uint8* data, uint8 len) { uint8 i = 0; uint8 chksum = 0; for(i = 0; i < len; i ++) chksum = chksum^data[i]; return chksum; } static void print_hex (const uint8 *data, uint16 len) { uint16 i; for (i = 0; i < len - 1; i++) { LOG("%x",data[i]); LOG(" "); } LOG("%x\n",data[i]); } static int cmd_query_version(const uint8* data) { wristRspVersion_t version; version.cmd = data[0]; //cmd version.csn = data[1]; //csn version.ver_fw[0] = 1;//FW_VER_MAJOR; version.ver_fw[1] = 0;//FW_VER_MINOR; version.ver_fw[2] = 2;//FW_VER_REVISION; version.ver_stack[0] = 1; version.ver_stack[1] = 0; version.ver_hw[0] = 1; version.ver_hw[1] = 0; GAPRole_GetParameter(GAPROLE_BD_ADDR,version.mac); //version.capability = (CAPABILITY_LCD| // CAPABILITY_SE| // CAPABILITY_HRATE| // CAPABILITY_GSENSOR| // CAPABILITY_LONG_SIT| // CAPABILITY_ANCS| // CAPABILITY_WECHAT| // CAPABILITY_HAND_UP| // CAPABILITY_LOSE_REMIND); version.chksum = checksum((uint8*)(&version), sizeof(version)-1); return cmd_response((uint8*)(&version), sizeof(version)); } static int cmd_set_time(const uint8* data, uint16 len) { int ret = APP_SUCCESS; datetime_t dtm, dtm_new; wristCmdTM_t* psettm = (wristCmdTM_t*) data; //apply datetime app_datetime(&dtm); BCDTM2DTM(&dtm_new, psettm->datetime); LOG("cmd_set_time: %d,%d,%d,%d,%,%d\n", dtm_new.year,dtm_new.month,dtm_new.day,dtm_new.hour,dtm_new.minutes,dtm_new.seconds); ret = app_datetime_set(dtm_new); return cmd_response_err(data, len, ret); } static int cmd_get_time(const uint8* data, uint16 len) { datetime_t dtm; wristCmdTM_t rsp; //apply datetime app_datetime(&dtm); rsp.cmd = data[0]; rsp.csn = data[1]; DTM2BCDTM(rsp.datetime, &dtm); rsp.chksum = checksum((uint8*)(&rsp), sizeof(rsp)-1); return cmd_response((uint8*)(&rsp), sizeof(rsp)); } static int cmd_HR_get_status(const uint8_t* data, uint16_t len) { return cmd_response_err(data, len, 0); } static int cmd_HR_start(const uint8_t* data, uint16_t len) { em70xx_start(); return cmd_response_err(data, len, APP_ERR_NOT_IMPLEMENTED); } static int cmd_HR_stop(const uint8_t* data, uint16_t len) { em70xx_stop(); return cmd_response_err(data, len, APP_SUCCESS); } static int cmd_acc_notif_start(const uint8* data, uint16 len) { sNotifyAccelerationDataFlag = TRUE; return cmd_response_err(data, len, APP_SUCCESS); } static int cmd_acc_notif_stop(const uint8* data, uint16 len) { sNotifyAccelerationDataFlag = FALSE; return cmd_response_err(data, len, APP_SUCCESS); } static int cmd_light_ctrl(const uint8_t* data, uint16_t len) { int ret; wristCmdLight_t* plight = (wristCmdLight_t*)data; ret = light_ctrl(plight->ch, plight->value); ret = (ret == PPlus_SUCCESS) ? APP_SUCCESS: APP_ERR_PARAM; return cmd_response_err(data, len, ret); } static int cmd_new_theme(const uint8_t* data, uint16_t len) { int ret; ui_ev_t ev; wristCmdTheme_t* uiindex = (wristCmdTheme_t*)data; dfl_load(uiindex->index); ev.ev = UI_EV_PAGE_DESTRUCT; ret = ui_fsm_run(&ev); ret = (ret == PPlus_SUCCESS) ? APP_SUCCESS: APP_ERR_PARAM; ev.param = uiindex->index; ev.ev = UI_EV_NEW_THEME; ret = ui_fsm_run(&ev); ret = (ret == PPlus_SUCCESS) ? APP_SUCCESS: APP_ERR_PARAM; return cmd_response_err(data, len, ret); } static int cmd_lookup_bracelet(const uint8* data, uint16 len) { //add code for vibrating the bracelet //...... //response code return cmd_response_err(data, len, APP_SUCCESS); } static int cmd_read_batt_volt(const uint8* data, uint16 len) { wristRspBatt_t battrsp; uint16_t volt = (uint16_t)batt_voltage_int(); LOG("cmd_read_batt_volt: %x\n",volt); battrsp.cmd = data[0]; battrsp.csn = data[1]; battrsp.batt[0] = (uint8_t)(volt&0xff); battrsp.batt[1] = (uint8_t)((volt>>8)&0xff); battrsp.chksum = checksum((uint8*)(&battrsp), sizeof(battrsp)-1); return cmd_response((uint8_t*)(&battrsp), sizeof(battrsp)); } void msg_notif_dispatch(void) { notifInfo_t* p_notifInfo = &(sWristService.notifInfo); ui_ev_t ev; switch(p_notifInfo->type){ case MSG_NOTIF_T_UNDEF:// 0 break; case MSG_NOTIF_T_CALL:// 1 ev.ev = UI_EV_BLE_CALL; ui_fsm_run(&ev); ev.ev = UI_EV_BLE_CALL_INFO; ev.data = (uint8*)p_notifInfo->data; ui_fsm_run(&ev); break; case MSG_NOTIF_T_CALL_OFF:// 2 ev.ev = UI_EV_BLE_CALL_OFF; ui_fsm_run(&ev); break; case MSG_NOTIF_T_SMS:// 3 ev.ev = UI_EV_BLE_SMS; ev.data = (uint8*)p_notifInfo->data; ui_fsm_run(&ev); break; case MSG_NOTIF_T_MAIL:// 4 ev.ev = UI_EV_BLE_MAIL; ev.data = (uint8*)p_notifInfo->data; ui_fsm_run(&ev); break; case MSG_NOTIF_T_WECHAT:// 5 ev.ev = UI_EV_BLE_WECHAT; ev.data = (uint8*)p_notifInfo->data; ui_fsm_run(&ev); break; case MSG_NOTIF_T_QQ:// 6 ev.ev = UI_EV_BLE_QQ; ev.data = (uint8*)p_notifInfo->data; ui_fsm_run(&ev); break; case MSG_NOTIF_T_APP:// 7 ev.ev = UI_EV_BLE_MSG_NOTIFY; ev.data = (uint8*)p_notifInfo->data; ui_fsm_run(&ev); break; default: break; } } static int cmd_msg_notification(const uint8* data, uint16 len) { wristCmdNotif_t* p_msg = (wristCmdNotif_t*)data; notifInfo_t* p_notif_info = &(sWristService.notifInfo); char* p_data = p_notif_info->data; uint8 msg_len = len - 4; uint8 msg_type = p_msg->msg_type; uint8 pkt_type = p_msg->pkt_type; bool flg = p_notif_info->flg; //if just brief info, discard exist message, replaced new if(pkt_type == MSG_NOTIF_BRIEF || pkt_type == MSG_NOTIF_BRIEF_E){ memset(p_data, 0, MSG_NOTIF_SIZE); memcpy(p_data, p_msg->msg_data, msg_len); p_notif_info->type = msg_type; p_notif_info->offset = msg_len; p_notif_info->flg = false; if(pkt_type == MSG_NOTIF_BRIEF){ p_notif_info->flg = false; msg_notif_dispatch(); return cmd_response_err(data, len, APP_SUCCESS); } else { p_notif_info->flg = true; return cmd_response_err(data, len, MSG_NOTIF_MORE_DATA); } } else if(flg){ if(msg_type != p_notif_info->type){ p_notif_info->type = 0; return cmd_response_err(data, len, APP_ERR_PARAM); } memcpy(p_data + p_notif_info->offset, p_msg->msg_data, msg_len); p_notif_info->offset += msg_len; if(pkt_type == MSG_NOTIF_DATA){ p_notif_info->flg = false; msg_notif_dispatch(); return cmd_response_err(data, len, APP_SUCCESS); } else { p_notif_info->flg = true; return cmd_response_err(data, len, MSG_NOTIF_MORE_DATA); } } return APP_SUCCESS; } int on_recieved_cmd_packet(const uint8* data, uint16 len) { uint32 ret = APP_SUCCESS; uint8 chksum = data[len-1]; uint8 err_data = 0; LOG("RX Cmd:"); print_hex(data, len); if(chksum != checksum(data, len-1)){ err_data = WRIST_CMD_UNKNOW; return cmd_response_err(&err_data, sizeof(err_data), APP_ERR_CRC); } switch(data[0]){ case WRIST_CMD_QUERY_VERSION: ret = cmd_query_version(data); break; case WRIST_CMD_SET_TIME: ret = cmd_set_time(data, len); break; case WRIST_CMD_GET_TIME: ret = cmd_get_time(data, len); break; case WRIST_CMD_LOOKUP_BRACELET: ret = cmd_lookup_bracelet(data, len); break; case WRIST_CMD_READ_BATT_VOLT: ret = cmd_read_batt_volt(data, len); break; case WRIST_CMD_HR_GET_STATUS: ret = cmd_HR_get_status(data, len); break; case WRIST_CMD_HR_START: ret = cmd_HR_start(data, len); break; case WRIST_CMD_HR_STOP: ret = cmd_HR_stop(data, len); break; case WRIST_CMD_ACC_NOTIF_START: ret = cmd_acc_notif_start(data, len); break; case WRIST_CMD_ACC_NOTIF_STOP: ret = cmd_acc_notif_stop(data, len); break; case WRIST_CMD_LIGHT_CTRL: ret = cmd_light_ctrl(data, len); break; case WRIST_CMD_NEW_THEME: ret = cmd_new_theme(data, len); break; case WRIST_CMD_MSG_NOTIF: ret = cmd_msg_notification(data, len); break; default: err_data = WRIST_CMD_UNKNOW; return cmd_response_err(&err_data, sizeof(err_data), APP_ERR_UNKNOW_CMD); //unknow command } return ret; } static int cmd_response_err(const uint8* data, uint16 len, uint8 err_code) { attHandleValueNoti_t notif; wristRsp_t data_rsp; data_rsp.cmd = data[0]; data_rsp.csn = (len >1) ? data[1] : 0; data_rsp.err_code = err_code; data_rsp.chksum = checksum((uint8*)&data_rsp, sizeof(wristRsp_t)-1); memset(&notif, 0, sizeof(notif)); notif.len = sizeof(data_rsp); notif.value[0] = data_rsp.cmd; notif.value[1] = data_rsp.csn; notif.value[2] = data_rsp.err_code; notif.value[3] = data_rsp.chksum; return wristProfile_Notify(&notif); } static int cmd_response(const uint8* data, uint16 len) { int i; attHandleValueNoti_t notif; memset(&notif, 0, sizeof(notif)); notif.len = len; for(i = 0; i< len; i++) notif.value[i] = data[i]; return wristProfile_Notify(&notif); } /********************************************************************* * PROFILE CALLBACKS */ // Wrist Profile Service Callbacks CONST gattServiceCBs_t wristProfileCBs = { wristProfile_ReadAttrCB, // Read callback function pointer wristProfile_WriteAttrCB, // Write callback function pointer NULL // Authorization callback function pointer }; /********************************************************************* * PUBLIC FUNCTIONS */ int wristProfileResponseHRValue(uint8_t HR_Value) { wristRspHrValue_t value; value.cmd = WRIST_NOTIFY_HR; value.csn = 0; value.value = HR_Value; value.chksum = checksum((uint8*)(&value), sizeof(value)-1); return cmd_response((uint8*)(&value), sizeof(value)); } int wristProfileResponseHRRawData(uint8_t cnt, uint16_t* pdata) { wristRspHrRaw_t rawdata; rawdata.cmd = WRIST_NOTIFY_HR_RAW; rawdata.csn = 0; memcpy(rawdata.raw, pdata, cnt*2); rawdata.chksum = checksum((uint8*)(&rawdata), sizeof(rawdata)-1); return cmd_response((uint8*)(&rawdata), sizeof(rawdata)); } /*acc_value: 1000 == 1G*/ int wristProfileResponseAccelerationData(int gx, int gy, int gz) { if(sNotifyAccelerationDataFlag){ int acc[3]; wristRspAcc_t accdata; acc[0] = gx; acc[1] = gy; acc[2] = gz; accdata.cmd = WRIST_NOTIFY_ACC; accdata.csn = 0; LOG("%d, %d, %d\n",gx,gy,gz); memcpy(accdata.acc, (void*)acc, 4*3); accdata.chksum = checksum((uint8*)(&accdata), sizeof(accdata)-1); return cmd_response((uint8*)(&accdata), sizeof(accdata)); } return APP_SUCCESS; } /*response key scan data*/ int wristProfileResponseKScan(uint8_t num, uint8_t* key) { wristRspKScan_t kscandata; memset(&kscandata, 0, sizeof(kscandata)); kscandata.cmd = WRIST_NOTIFY_KSCAN; kscandata.csn = 0; kscandata.num = num; memcpy(kscandata.key, (void*)key, num); kscandata.chksum = checksum((uint8*)(&kscandata), sizeof(kscandata)-1); return cmd_response((uint8*)(&kscandata), sizeof(kscandata)); } /********************************************************************* * @fn SimpleProfile_AddService * * @brief Initializes the Wrist Profile service by registering * GATT attributes with the GATT server. * * @param services - services to add. This is a bit map and can * contain more than one service. * * @return Success or Failure */ bStatus_t wristProfile_AddService(wristServiceCB_t cb) { uint8 status = SUCCESS; sWristService.notifInfo.data = s_msg_notif_data; // Initialize Client Characteristic Configuration attributes GATTServApp_InitCharCfg( INVALID_CONNHANDLE, wristProfileCmdCCC ); // Register GATT attribute list and CBs with GATT Server App status = GATTServApp_RegisterService( wristProfileAttrTbl, GATT_NUM_ATTRS( wristProfileAttrTbl ), &wristProfileCBs ); wristServiceCB = cb; return ( status ); } /********************************************************************* * @fn wristProfile_ReadAttrCB * * @brief Read an attribute. * * @param connHandle - connection message was received on * @param pAttr - pointer to attribute * @param pValue - pointer to data to be read * @param pLen - length of data to be read * @param offset - offset of the first octet to be read * @param maxLen - maximum length of data to be read * * @return Success or Failure */ static uint8 wristProfile_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen ) { bStatus_t status = SUCCESS; // If attribute permissions require authorization to read, return error if ( gattPermitAuthorRead( pAttr->permissions ) ) { // Insufficient authorization return ( ATT_ERR_INSUFFICIENT_AUTHOR ); } // Make sure it's not a blob operation (no attributes in the profile are long) if ( offset > 0 ) { return ( ATT_ERR_ATTR_NOT_LONG ); } if ( pAttr->type.len == ATT_BT_UUID_SIZE ) { // 16-bit UUID uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]); switch ( uuid ) { case WRIST_CHAR_COMMAND_UUID: case WRIST_CHAR_READONLY_UUID: *pLen = 10; pValue[0] = 1; pValue[1] = 2; pValue[2] = 3; pValue[3] = 4; pValue[4] = 5; pValue[5] = 6; pValue[6] = 7; break; default: // Should never get here! (characteristics 3 and 4 do not have read permissions) *pLen = 0; status = ATT_ERR_ATTR_NOT_FOUND; break; } } else { // 128-bit UUID *pLen = 0; status = ATT_ERR_INVALID_HANDLE; } return ( status ); } /********************************************************************* * @fn wristProfile_WriteAttrCB * * @brief Validate attribute data prior to a write operation * * @param connHandle - connection message was received on * @param pAttr - pointer to attribute * @param pValue - pointer to data to be written * @param len - length of data * @param offset - offset of the first octet to be written * * @return Success or Failure */ static bStatus_t wristProfile_WriteAttrCB( uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 len, uint16 offset ) { bStatus_t status = SUCCESS; // If attribute permissions require authorization to write, return error if ( gattPermitAuthorWrite( pAttr->permissions ) ) { // Insufficient authorization return ( ATT_ERR_INSUFFICIENT_AUTHOR ); } if ( pAttr->type.len == ATT_BT_UUID_SIZE ) { // 16-bit UUID uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]); switch ( uuid ) { case WRIST_CHAR_COMMAND_UUID: on_recieved_cmd_packet(pValue, len); break; case GATT_CLIENT_CHAR_CFG_UUID: status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len, offset, GATT_CLIENT_CFG_NOTIFY ); if ( status == SUCCESS && wristServiceCB) { uint16 charCfg = BUILD_UINT16( pValue[0], pValue[1] ); uint8 evt = (charCfg == GATT_CFG_NO_OPERATION) ? WRIST_NOTI_DISABLED :WRIST_NOTI_ENABLED; (*wristServiceCB)(evt , 0, NULL); } break; default: // Should never get here! (characteristics 2 and 4 do not have write permissions) status = ATT_ERR_ATTR_NOT_FOUND; break; } } else { // 128-bit UUID status = ATT_ERR_INVALID_HANDLE; } return ( status ); } /********************************************************************* * @fn wristProfile_HandleConnStatusCB * * @brief Wrist Profile link status change handler function. * * @param connHandle - connection handle * @param changeType - type of change * * @return none */ void wristProfile_HandleConnStatusCB( uint16 connHandle, uint8 changeType ) { // Make sure this is not loopback connection if ( connHandle != LOOPBACK_CONNHANDLE ) { // Reset Client Char Config if connection has dropped if ( ( changeType == LINKDB_STATUS_UPDATE_REMOVED ) || ( ( changeType == LINKDB_STATUS_UPDATE_STATEFLAGS ) && ( !linkDB_Up( connHandle ) ) ) ) { GATTServApp_InitCharCfg( connHandle, wristProfileCmdCCC ); } } } static int wristProfile_Notify(attHandleValueNoti_t *pNoti ) { uint16 connHandle; uint16 value; GAPRole_GetParameter(GAPROLE_CONNHANDLE, &connHandle); value = GATTServApp_ReadCharCfg( connHandle, wristProfileCmdCCC); // If notifications enabled if ( value & GATT_CLIENT_CFG_NOTIFY ) { bStatus_t st; // Set the handle pNoti->handle = wristProfileAttrTbl[2].handle; LOG("GATT_Notification: %x\n", value); // Send the notification st = GATT_Notification( connHandle, pNoti, FALSE); LOG("st: %x\n", st); if(st != SUCCESS) return APP_ERR_BLE_SEND_FAIL; return APP_SUCCESS; } return APP_ERR_INVALID_STATE; } /********************************************************************* *********************************************************************/
fa99c03f6dbb7da74196cfebbbde81aeabf545b1
78dfafd8f86d58e70cd1d755f016fa6f26a5ead9
/ftc2013/Virtual Worlds/Scissorbot - Remote Control.c
e1057b959a04fd85173a3a8e90efd917d04e1f41
[]
no_license
tectronics/team-fermion
947eec97fcf8c243e05b258efd9e581e8a24cb8a
f2b78784696be56de546a9352feff210f13c9429
refs/heads/master
2018-01-11T15:03:11.736225
2014-12-09T23:55:53
2014-12-09T23:55:53
45,731,007
1
0
null
null
null
null
UTF-8
C
false
false
5,505
c
Scissorbot - Remote Control.c
#pragma config(Hubs, S1, HTMotor, HTMotor, HTMotor, none) #pragma config(Sensor, S2, IRSeeker, sensorHiTechnicIRSeeker1200) #pragma config(Sensor, S3, lightSensor, sensorLightActive) #pragma config(Sensor, S4, sonarSensor, sensorSONAR) #pragma config(Motor, motorA, gripperMotor, tmotorNXT, PIDControl, encoder) #pragma config(Motor, motorB, wristMotor, tmotorNXT, PIDControl, encoder) #pragma config(Motor, mtr_S1_C1_1, frontRightMotor, tmotorTetrix, openLoop) #pragma config(Motor, mtr_S1_C1_2, frontLeftMotor, tmotorTetrix, openLoop, reversed) #pragma config(Motor, mtr_S1_C2_1, rearRightMotor, tmotorTetrix, openLoop, encoder) #pragma config(Motor, mtr_S1_C2_2, rearLeftMotor, tmotorTetrix, openLoop, reversed, encoder) #pragma config(Motor, mtr_S1_C3_1, rightScissorMotor, tmotorTetrix, openLoop, encoder) #pragma config(Motor, mtr_S1_C3_2, leftScissorMotor, tmotorTetrix, openLoop, encoder) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// /*+++++++++++++++++++++++++++++++++++++++++++++| Notes |++++++++++++++++++++++++++++++++++++++++++++++ Scissorbot - Remote Control - NOTE: Scissorbot can be used to pick object up off of the ground and to hang from the bar. - This program allows you to remotely control your robot using the USB Logitech Joysticks. - This program also ignores low values that would cause your robot to move when the joysticks fail to return back to exact center. You may need to adjust the 'threshold' value to get it just right. Robot Model(s): TETRIX Scissorbot (Virtual Worlds) [I/O Port] [Name] [Type] [Description] Motor Port A gripperMotor NXT Motor NXT Gripper Motor Motor Port B wristMotor NXT Motor NXT Wrist Motor Motor Port D frontRightMotor TETRIX Motor Front Right side motor Motor Port E frontLeftMotor TETRIX Motor Front Left side motor Motor Port F rearRightMotor TETRIX Motor Rear Right side motor Motor Port G rearLeftMotor TETRIX Motor Rear Left side motor Motor Port H rightScissorMotor TETRIX Motor Right Scissor Lift motor Motor Port I leftScissorMotor TETRIX Motor Left Scissor Lift motor Sensor Port 2 IRSeeker HiTechnic IR Seeker HiTechnic IR Seeker Sensor Port 3 lightSensor Light Sensor NXT Light Sensor (Active) Sensor Port 4 sonarSensor Sonar Sensor NXT Sonar Sensor ----------------------------------------------------------------------------------------------------*/ #pragma debuggerWindows("joystickSimple"); #include "JoystickDriver.c" task main() { //Integer variable that allows you to specify a "deadzone" where values (both positive or negative) //less than the threshold will be ignored. int threshold = 10; //Loop Forever while(1 == 1) { //Get the Latest joystick values getJoystickSettings(joystick); //Driving Control if(abs(joystick.joy1_y2) > threshold) // If the right analog stick's Y-axis readings are either above or below the threshold... { motor[frontRightMotor] = joystick.joy1_y2; // ...move the right side of the robot. motor[rearRightMotor] = joystick.joy1_y2; } else // Else the readings are within the threshold, so... { motor[frontRightMotor] = 0; // ...stop the right side of the robot. motor[rearRightMotor] = 0; } if(abs(joystick.joy1_y1) > threshold) // If the left analog stick's Y-axis readings are either above or below the threshold... { motor[frontLeftMotor] = joystick.joy1_y1; // ...move the left side of the robot. motor[rearLeftMotor] = joystick.joy1_y1; } else // Else the readings are within the threshold, so... { motor[frontLeftMotor] = 0; // ...stop the left side of the robot. motor[rearLeftMotor] = 0; } //Scissor Lift Control if(joy1Btn(6) == 1) // If button 6 (RB) is pressed... { motor[rightScissorMotor] = 70; // ...raise the scissor lift. motor[leftScissorMotor] = 70; } else if(joy1Btn(8) == 1) // Else, if button 8 (RT) is pressed... { motor[rightScissorMotor] = -70; // ...lower the scissor lift. motor[leftScissorMotor] = -70; } else // Else (neither button is pressed)... { motor[rightScissorMotor] = 0; // ...stop the scissor lift. motor[leftScissorMotor] = 0; } //Wrist Motor Control if(joy1Btn(5) == 1) // If button 5 (LB) is pressed... { motor[wristMotor] = 75; //...rotate the gripper up. } else if(joy1Btn(7) == 1) // Else, if button 7 (LT) is pressed... { motor[wristMotor] = -75; // ...rotate the gripper down. } else // Else (neither button is pressed)... { motor[wristMotor] = 0; // ...stop rotating the gripper. } //Gripper Motor Control if(joy1Btn(1) == 1) // If button 1 (X) is pressed... { motor[gripperMotor] = -50; // ...open the gripper. } else if(joy1Btn(2) == 1) // Else, if button 2 (A) is pressed... { motor[gripperMotor] = 50; // ...close the gripper. } else // Else (neither button is pressed)... { motor[gripperMotor] = 0; // ...stop the gripper. } } }
63defb73ad7acb85534b4daf941cd43a692b3776
dc0986d4e9920b524668c443e8163d9367aaa561
/nfs/kernel/teacher/mm/02/test.c
1fa4b98cb63936d3766cf948a0b78ba4907fc955
[]
no_license
dongdong-2009/kernel_code_note
042487757851f593a367a0bd28eadeacd866bcc0
3819c3e1fe28f999b5389777e375f7a02d0e4612
refs/heads/master
2021-06-10T06:59:23.771193
2017-01-12T03:20:04
2017-01-12T03:20:04
null
0
0
null
null
null
null
UTF-8
C
false
false
700
c
test.c
#include <linux/module.h> #include <linux/fs.h> #include <linux/delay.h> #include <linux/uaccess.h> #include <linux/gpio.h> #include <linux/sched.h> #include <linux/interrupt.h> #include <linux/slab.h> #include <linux/vmalloc.h> #define DEV_NAME "test_dev" int test_init(void) { int *p = NULL; int i; printk("module init\n"); p = vmalloc(40); if(IS_ERR_OR_NULL(p)) return -ENOMEM; printk("p = %p\n", p); for(i = 0; i < 10; i++) { p[i] = i; printk("p[%d] = %d\n", i, p[i]); } vfree(p); return 0; } void test_exit(void) { printk("cleanup module\n"); } module_init(test_init); //1)启动时自动调用2)插入模块时调用; module_exit(test_exit); MODULE_LICENSE("GPL");
70d7a536c0a09c6db6f6c6d9f6ba2843b41b761c
243e2124bd5d97cca023a6c40bb2c2e4c776d29d
/Mathematics/Absolute_Value_Of_A_Number.c
ff95b9446605334f52f99ddfa9543cd3c6f22162
[ "MIT" ]
permissive
riyakansal14/Engineering-Daze
12ded68cea4543e33124dc4210c6b6b146c07f55
b39a9bc6452cfe8dac62bc12acaae5962969cec1
refs/heads/main
2023-08-28T11:18:12.029480
2021-10-31T16:35:02
2021-10-31T16:35:02
null
0
0
null
null
null
null
UTF-8
C
false
false
1,295
c
Absolute_Value_Of_A_Number.c
//C Program to find the absolute value of a number: //Problem Statement: Given a number, write a program to find its absolute value. /* Algorithm- To find the absolute value of a number: 1. Start 2. Declare variable 'num' to store input value. 3. Take input from user. 4. if num<0, display -num, else display num 5. Stop */ #include<stdio.h> //Included the standard input/output header file //User-Defined Function Body containing logic: int avalue(int num) /*declaring and defining user-defined function, avalue() which finds the absolute value of a number.*/ { if(num < 0) // If conditional statement to check if input value is negative. return -num; // Will return -(-num) which is +num, if num is negative. return num; // Otherwise, will return num. } //Main Function: int main() { int num; printf("Enter a number:"); scanf("%d",&num); //Taking input from user printf("Absolute value of inputted number: %d", avalue(num)); //Calling user-defined function avalue() in main() return 0; } /* Test Case 1: Input: Enter a number: -20 Output: Absolute value of inputted number: 20 Test Case 2: Input: Enter a number: 20 Output: Absolute value of inputted number: 20 Time Complexity: O(1) Space Complexity: O(1) */
4361d2a4b2a48d03ba66ad20924d8225dde8806d
5ed15f758da0aec98fbab593ea497656f92cba26
/GeometricPrimitives/Line.C
ac7de58160a4deebe49780d95ef1fc6c3810eb46
[]
no_license
meroJamjoom/MDA_win
777fdb0d2d175ff73f28be8b8800f53924def899
bf14a47cdc54428620f26e479a19e9ccf0acf129
refs/heads/master
2020-05-22T06:43:01.534736
2016-09-14T01:39:46
2016-09-14T01:39:46
64,056,480
0
0
null
null
null
null
UTF-8
C
false
false
2,290
c
Line.C
// ========================================================================== // $Id:$ // ========================================================================== // License: Internal use at UBC only! External use is a copyright violation! // ========================================================================== // (C)opyright: // // 2007-, UBC // // Creator: Felix Heide // Email: heide@informatik.uni-siegen.de // ========================================================================== #ifndef GEOMETRICPRIMITIVES_LINE_C #define GEOMETRICPRIMITIVES_LINE_C #include "Line.hh" namespace MDA { // the "using" statements have to be inside the MDA scope so // that inclusion of C files as required by gcc does not yield // problems with other packages! using namespace std; /** default constructor, line is empty*/ Line::Line(){} /** line is first axis of coordinate system with parameterized dimensions*/ Line::Line( unsigned long dimensions): p1(dimensions, 0.0) , p2(dimensions, 0.0) { p2[0] = 1.0; return; } /** a line defined by two points on it*/ Line::Line( Vector &p1, Vector &p2 ) { //Exit, if wrong size if( p1.getSize() != p2.getSize() ) { cerr << "Vector dimensions must match! " << std::endl; return; } (this->p1).copy( p1 ); (this->p2).copy( p2 ); return; } /** default destructor */ Line::~Line(){} /** returns allways false, as a line is infinitively thin*/ bool Line::inside( Vector &point ) { return false; } // // methods involving Lines // /** distance between a line and a point */ double dist( const Line &line, const Vector &point) { //Express the nearest point p on the line as p = line.p1 + u*(line.p2-line.p1) //then it has to be (point - p)dot(line.p2 - line.p1) = 0, and consequently: Vector lineVec( 2 ); lineVec.copy( line.p2 ); lineVec -= line.p1; Vector pointVec( 2 ); pointVec.copy( point ); pointVec -= line.p1; double u = dot( pointVec, lineVec ) / dot( lineVec, lineVec ); Vector p( 2 ); p.copy( line.p1 ); lineVec *= u; p += lineVec; return dist(point, p); } } /* namespace */ #endif /* GEOMETRICPRIMITIVES_LINE_C */
de24e58372d7028da4bfd548dbb7466296da7159
afb7006e47e70c1deb2ddb205f06eaf67de3df72
/third_party/python/gyp/test/include_dirs/src/subdir/subdir_includes.c
6da7ae70d53aae68df75584612c48ed330fdb6dc
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
marco-c/gecko-dev-wordified
a66383f85db33911b6312dd094c36f88c55d2e2c
3509ec45ecc9e536d04a3f6a43a82ec09c08dff6
refs/heads/master
2023-08-10T16:37:56.660204
2023-08-01T00:39:54
2023-08-01T00:39:54
211,297,590
1
0
null
null
null
null
UTF-8
C
false
false
345
c
subdir_includes.c
# include < stdio . h > # include " inc . h " # include " include1 . h " # include " include2 . h " int main ( void ) { printf ( " Hello from subdir / subdir_includes . c \ n " ) ; printf ( " Hello from % s \ n " INC_STRING ) ; printf ( " Hello from % s \ n " INCLUDE1_STRING ) ; printf ( " Hello from % s \ n " INCLUDE2_STRING ) ; return 0 ; }
cb531d6df60deb1614f955ab3a208ce89b0b9069
34d0bad8a2849447925fef0c752406122baae3f2
/ti_tools/ipc_1_25_03_15/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.h
1883d40c62a1bea7c89f82dc93fab5b9c2b74b71
[]
no_license
pamsimochen/hardwork
5e05154fac35a0aacc0f8b64c21b2ca767fd4a3d
1e0a4cafdd1722eb58c4261bad68e602352f2079
refs/heads/master
2021-09-07T22:44:16.620515
2018-03-02T09:48:40
2018-03-02T09:48:40
103,899,662
1
0
null
null
null
null
UTF-8
C
false
false
40,478
h
NotifyDriverShm.h
/* * Copyright 2013 by Texas Instruments Incorporated. * */ /* * Do not modify this file; it is automatically * generated and any modifications will be overwritten. * * @(#) xdc-y44 */ /* * ======== GENERATED SECTIONS ======== * * PROLOGUE * INCLUDES * * INTERNAL DEFINITIONS * MODULE-WIDE CONFIGS * PER-INSTANCE TYPES * VIRTUAL FUNCTIONS * FUNCTION DECLARATIONS * FUNCTION SELECTORS * CONVERTORS * SYSTEM FUNCTIONS * * EPILOGUE * STATE STRUCTURES * PREFIX ALIASES */ /* * ======== PROLOGUE ======== */ #ifndef ti_sdo_ipc_notifyDrivers_NotifyDriverShm__include #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm__include #ifndef __nested__ #define __nested__ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm__top__ #endif #ifdef __cplusplus #define __extern extern "C" #else #define __extern extern #endif #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm___VERS 150 /* * ======== INCLUDES ======== */ #include <xdc/std.h> #include <xdc/runtime/xdc.h> #include <xdc/runtime/Types.h> #include <xdc/runtime/IInstance.h> #include <ti/sdo/ipc/notifyDrivers/package/package.defs.h> #include <ti/sdo/utils/MultiProc.h> #include <ti/sdo/ipc/Notify.h> #include <ti/sdo/ipc/notifyDrivers/IInterrupt.h> #include <ti/sdo/ipc/interfaces/INotifyDriver.h> #include <xdc/runtime/Error.h> #include <ti/sdo/ipc/notifyDrivers/package/NotifyDriverShm_InterruptProxy.h> /* * ======== AUXILIARY DEFINITIONS ======== */ /* * ======== INTERNAL DEFINITIONS ======== */ /* DOWN */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_DOWN (0) /* UP */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_UP (1) /* INIT_STAMP */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_INIT_STAMP (0xA9C8B7D6) /* EventEntry */ struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_EventEntry { volatile xdc_Bits32 flag; volatile xdc_Bits32 payload; volatile xdc_Bits32 reserved; }; /* ProcCtrl */ struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_ProcCtrl { volatile xdc_Bits32 recvInitStatus; volatile xdc_Bits32 sendInitStatus; volatile xdc_Bits32 eventRegMask; volatile xdc_Bits32 eventEnableMask; }; /* Instance_State */ typedef xdc_UInt32 __T1_ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State__regChart; typedef xdc_UInt32 *__ARRAY1_ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State__regChart; typedef __ARRAY1_ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State__regChart __TA_ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State__regChart; /* * ======== MODULE-WIDE CONFIGS ======== */ /* Module__diagsEnabled */ typedef xdc_Bits32 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsEnabled; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsEnabled ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsEnabled__C; /* Module__diagsIncluded */ typedef xdc_Bits32 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsIncluded; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsIncluded ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsIncluded__C; /* Module__diagsMask */ typedef xdc_Bits16* CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask__C; /* Module__gateObj */ typedef xdc_Ptr CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__gateObj; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__gateObj ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__gateObj__C; /* Module__gatePrms */ typedef xdc_Ptr CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__gatePrms; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__gatePrms ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__gatePrms__C; /* Module__id */ typedef xdc_runtime_Types_ModuleId CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__id; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__id ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__id__C; /* Module__loggerDefined */ typedef xdc_Bool CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerDefined; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerDefined ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerDefined__C; /* Module__loggerObj */ typedef xdc_Ptr CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerObj; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerObj ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerObj__C; /* Module__loggerFxn0 */ typedef xdc_runtime_Types_LoggerFxn0 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn0; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn0 ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn0__C; /* Module__loggerFxn1 */ typedef xdc_runtime_Types_LoggerFxn1 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn1; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn1 ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn1__C; /* Module__loggerFxn2 */ typedef xdc_runtime_Types_LoggerFxn2 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn2; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn2 ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn2__C; /* Module__loggerFxn4 */ typedef xdc_runtime_Types_LoggerFxn4 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn4; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn4 ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn4__C; /* Module__loggerFxn8 */ typedef xdc_runtime_Types_LoggerFxn8 CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn8; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn8 ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__loggerFxn8__C; /* Module__startupDoneFxn */ typedef xdc_Bool (*CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDoneFxn)(void); __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDoneFxn ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDoneFxn__C; /* Object__count */ typedef xdc_Int CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__count; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__count ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__count__C; /* Object__heap */ typedef xdc_runtime_IHeap_Handle CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__heap; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__heap ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__heap__C; /* Object__sizeof */ typedef xdc_SizeT CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__sizeof; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__sizeof ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__sizeof__C; /* Object__table */ typedef xdc_Ptr CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__table; __extern __FAR__ const CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__table ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__table__C; /* * ======== PER-INSTANCE TYPES ======== */ /* Params */ struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params { size_t __size; const void* __self; void* __fxns; xdc_runtime_IInstance_Params* instance; xdc_Ptr sharedAddr; xdc_Bool cacheEnabled; xdc_SizeT cacheLineSize; xdc_UInt16 remoteProcId; xdc_UInt intVectorId; xdc_UInt localIntId; xdc_UInt remoteIntId; xdc_runtime_IInstance_Params __iprms; }; /* Struct */ struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct { const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Fxns__* __fxns; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_ProcCtrl* __f0; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_ProcCtrl* __f1; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_EventEntry* __f2; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_EventEntry* __f3; ti_sdo_ipc_Notify_Handle __f4; __TA_ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State__regChart __f5; xdc_UInt __f6; xdc_UInt __f7; ti_sdo_ipc_notifyDrivers_IInterrupt_IntInfo __f8; xdc_UInt16 __f9; xdc_UInt __f10; xdc_Bool __f11; xdc_SizeT __f12; xdc_runtime_Types_CordAddr __name; }; /* * ======== VIRTUAL FUNCTIONS ======== */ /* Fxns__ */ struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Fxns__ { xdc_runtime_Types_Base* __base; const xdc_runtime_Types_SysFxns2* __sysp; xdc_Void (*registerEvent)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle, xdc_UInt32); xdc_Void (*unregisterEvent)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle, xdc_UInt32); xdc_Int (*sendEvent)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle, xdc_UInt32, xdc_UInt32, xdc_Bool); xdc_Void (*disable)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle); xdc_Void (*enable)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle); xdc_Void (*disableEvent)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle, xdc_UInt32); xdc_Void (*enableEvent)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle, xdc_UInt32); xdc_Void (*setNotifyHandle)(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle, xdc_Ptr); xdc_runtime_Types_SysFxns2 __sfxns; }; /* Module__FXNS__C */ __extern const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Fxns__ ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__FXNS__C; /* * ======== FUNCTION DECLARATIONS ======== */ /* Module_startup */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_startup( state ) (-1) /* Instance_init__F */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init") __extern int ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object*, const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params*, xdc_runtime_Error_Block* ); /* Instance_finalize__F */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize") __extern void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* , int ); /* Instance_init__R */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init__R, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init") __extern int ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object*, const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params*, xdc_runtime_Error_Block* ); /* Instance_finalize__R */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize__R, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize") __extern void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* , int ); /* Handle__label__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle__label__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle__label") __extern xdc_runtime_Types_Label* ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle__label__S( xdc_Ptr obj, xdc_runtime_Types_Label* lab ); /* Module__startupDone__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDone__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDone") __extern xdc_Bool ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDone__S( void ); /* Object__create__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__create__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__create") __extern xdc_Ptr ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__create__S( xdc_Ptr __oa, xdc_SizeT __osz, xdc_Ptr __aa, const xdc_UChar* __pa, xdc_SizeT __psz, xdc_runtime_Error_Block* __eb ); /* Object__delete__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__delete__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__delete") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__delete__S( xdc_Ptr instp ); /* Object__destruct__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__destruct__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__destruct") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__destruct__S( xdc_Ptr objp ); /* Object__get__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__get__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__get") __extern xdc_Ptr ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__get__S( xdc_Ptr oarr, xdc_Int i ); /* Object__first__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__first__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__first") __extern xdc_Ptr ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__first__S( void ); /* Object__next__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__next__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__next") __extern xdc_Ptr ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__next__S( xdc_Ptr obj ); /* Params__init__S */ xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params__init__S, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params__init") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params__init__S( xdc_Ptr dst, xdc_Ptr src, xdc_SizeT psz, xdc_SizeT isz ); /* registerEvent__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst, xdc_UInt32 eventId ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); /* unregisterEvent__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst, xdc_UInt32 eventId ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); /* sendEvent__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent") __extern xdc_Int ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId, xdc_UInt32 payload, xdc_Bool waitClear ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent") __extern xdc_Int ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst, xdc_UInt32 eventId, xdc_UInt32 payload, xdc_Bool waitClear ); __extern xdc_Int ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId, xdc_UInt32 payload, xdc_Bool waitClear ); /* disable__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst ); /* enable__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst ); /* disableEvent__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst, xdc_UInt32 eventId ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); /* enableEvent__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst, xdc_UInt32 eventId ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_UInt32 eventId ); /* setNotifyHandle__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle__E( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_Ptr driverHandle ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle__F( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* __inst, xdc_Ptr driverHandle ); __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle__R( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle __inst, xdc_Ptr driverHandle ); /* sharedMemReq__E */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq__E xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq__E, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq") __extern xdc_SizeT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq__E( const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* params ); xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq__F, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq") __extern xdc_SizeT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq__F( const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* params ); __extern xdc_SizeT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq__R( const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* params ); /* isr__I */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_isr ti_sdo_ipc_notifyDrivers_NotifyDriverShm_isr__I xdc__CODESECT(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_isr__I, "ti_sdo_ipc_notifyDrivers_NotifyDriverShm_isr") __extern xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_isr__I( xdc_UArg arg ); /* * ======== FUNCTION SELECTORS ======== */ /* registerEvent_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent_FxnT)(void*, xdc_UInt32); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent; } /* unregisterEvent_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent_FxnT)(void*, xdc_UInt32); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent; } /* sendEvent_{FxnT,fxnP} */ typedef xdc_Int (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent_FxnT)(void*, xdc_UInt32, xdc_UInt32, xdc_Bool); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent; } /* disable_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable_FxnT)(void*); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable; } /* enable_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable_FxnT)(void*); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable; } /* disableEvent_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent_FxnT)(void*, xdc_UInt32); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent; } /* enableEvent_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent_FxnT)(void*, xdc_UInt32); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent; } /* setNotifyHandle_{FxnT,fxnP} */ typedef xdc_Void (*ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle_FxnT)(void*, xdc_Ptr); static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle_fxnP( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle_FxnT)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle; } /* * ======== CONVERTORS ======== */ /* Module_upCast */ static inline ti_sdo_ipc_interfaces_INotifyDriver_Module ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_upCast( void ) { return (ti_sdo_ipc_interfaces_INotifyDriver_Module)&ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__FXNS__C; } /* Module_to_ti_sdo_ipc_interfaces_INotifyDriver */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_to_ti_sdo_ipc_interfaces_INotifyDriver ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_upCast /* Handle_upCast */ static inline ti_sdo_ipc_interfaces_INotifyDriver_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_upCast( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle i ) { return (ti_sdo_ipc_interfaces_INotifyDriver_Handle)i; } /* Handle_to_ti_sdo_ipc_interfaces_INotifyDriver */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_to_ti_sdo_ipc_interfaces_INotifyDriver ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_upCast /* Handle_downCast */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_downCast( ti_sdo_ipc_interfaces_INotifyDriver_Handle i ) { ti_sdo_ipc_interfaces_INotifyDriver_Handle i2 = (ti_sdo_ipc_interfaces_INotifyDriver_Handle)i; return (void*)i2->__fxns == (void*)&ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__FXNS__C ? (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle)i : 0; } /* Handle_from_ti_sdo_ipc_interfaces_INotifyDriver */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_from_ti_sdo_ipc_interfaces_INotifyDriver ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_downCast /* * ======== SYSTEM FUNCTIONS ======== */ /* Module_startupDone */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_startupDone() ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__startupDone__S() /* Object_heap */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_heap() ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__heap__C /* Module_heap */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_heap() ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__heap__C /* Module_id */ static inline CT__ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__id ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_id( void ) { return ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__id__C; } /* Module_hasMask */ static inline xdc_Bool ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_hasMask( void ) { return ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask__C != NULL; } /* Module_getMask */ static inline xdc_Bits16 ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_getMask( void ) { return ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask__C != NULL ? *ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask__C : 0; } /* Module_setMask */ static inline xdc_Void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_setMask( xdc_Bits16 mask ) { if (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask__C != NULL) *ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module__diagsMask__C = mask; } /* Params_init */ static inline void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params_init( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* prms ) { if (prms) { ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params__init__S(prms, 0, sizeof(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params), sizeof(xdc_runtime_IInstance_Params)); } } /* Params_copy */ static inline void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params_copy( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* dst, const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* src ) { if (dst) { ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params__init__S(dst, (xdc_Ptr)src, sizeof(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params), sizeof(xdc_runtime_IInstance_Params)); } } /* Object_count */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_count() ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__count__C /* Object_sizeof */ #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_sizeof() ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__sizeof__C /* Object_get */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_get( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State* oarr, int i ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__get__S(oarr, i); } /* Object_first */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_first( void ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__first__S(); } /* Object_next */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_next( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object* obj ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__next__S(obj); } /* Handle_label */ static inline xdc_runtime_Types_Label* ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_label( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle inst, xdc_runtime_Types_Label* lab ) { return ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle__label__S(inst, lab); } /* Handle_name */ static inline String ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_name( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle inst ) { xdc_runtime_Types_Label lab; return ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle__label__S(inst, &lab)->iname; } /* create */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_create( const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* __prms, xdc_runtime_Error_Block* __eb ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle)ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__create__S(0, 0, 0, (const xdc_UChar*)__prms, sizeof(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params), __eb); } /* construct */ static inline void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_construct( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct* __obj, const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params* __prms, xdc_runtime_Error_Block* __eb ) { ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__create__S(__obj, sizeof (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct), 0, (const xdc_UChar*)__prms, sizeof(ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params), __eb); } /* delete */ static inline void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_delete( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle* instp ) { ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__delete__S(instp); } /* destruct */ static inline void ti_sdo_ipc_notifyDrivers_NotifyDriverShm_destruct( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct* obj ) { ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object__destruct__S(obj); } /* handle */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_handle( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct* str ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle)str; } /* struct */ static inline ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct* ti_sdo_ipc_notifyDrivers_NotifyDriverShm_struct( ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle inst ) { return (ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct*)inst; } /* * ======== EPILOGUE ======== */ #ifdef ti_sdo_ipc_notifyDrivers_NotifyDriverShm__top__ #undef __nested__ #endif #endif /* ti_sdo_ipc_notifyDrivers_NotifyDriverShm__include */ /* * ======== STATE STRUCTURES ======== */ #if defined(__config__) || (!defined(__nested__) && defined(ti_sdo_ipc_notifyDrivers_NotifyDriverShm__internalaccess)) #ifndef ti_sdo_ipc_notifyDrivers_NotifyDriverShm__include_state #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm__include_state /* Object */ struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object { const ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Fxns__* __fxns; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_ProcCtrl* selfProcCtrl; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_ProcCtrl* otherProcCtrl; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_EventEntry* selfEventChart; ti_sdo_ipc_notifyDrivers_NotifyDriverShm_EventEntry* otherEventChart; ti_sdo_ipc_Notify_Handle notifyHandle; __TA_ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State__regChart regChart; xdc_UInt selfId; xdc_UInt otherId; ti_sdo_ipc_notifyDrivers_IInterrupt_IntInfo intInfo; xdc_UInt16 remoteProcId; xdc_UInt nesting; xdc_Bool cacheEnabled; xdc_SizeT eventEntrySize; }; #endif /* ti_sdo_ipc_notifyDrivers_NotifyDriverShm__include_state */ #endif /* * ======== PREFIX ALIASES ======== */ #if !defined(__nested__) && !defined(ti_sdo_ipc_notifyDrivers_NotifyDriverShm__nolocalnames) #ifndef ti_sdo_ipc_notifyDrivers_NotifyDriverShm__localnames__done #define ti_sdo_ipc_notifyDrivers_NotifyDriverShm__localnames__done /* module prefix */ #define NotifyDriverShm_Instance ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance #define NotifyDriverShm_Handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle #define NotifyDriverShm_Module ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module #define NotifyDriverShm_Object ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object #define NotifyDriverShm_Struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Struct #define NotifyDriverShm_DOWN ti_sdo_ipc_notifyDrivers_NotifyDriverShm_DOWN #define NotifyDriverShm_UP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_UP #define NotifyDriverShm_INIT_STAMP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_INIT_STAMP #define NotifyDriverShm_EventEntry ti_sdo_ipc_notifyDrivers_NotifyDriverShm_EventEntry #define NotifyDriverShm_ProcCtrl ti_sdo_ipc_notifyDrivers_NotifyDriverShm_ProcCtrl #define NotifyDriverShm_Instance_State ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_State #define NotifyDriverShm_Params ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params #define NotifyDriverShm_registerEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent #define NotifyDriverShm_registerEvent_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent_fxnP #define NotifyDriverShm_registerEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_registerEvent_FxnT #define NotifyDriverShm_unregisterEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent #define NotifyDriverShm_unregisterEvent_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent_fxnP #define NotifyDriverShm_unregisterEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_unregisterEvent_FxnT #define NotifyDriverShm_sendEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent #define NotifyDriverShm_sendEvent_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent_fxnP #define NotifyDriverShm_sendEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sendEvent_FxnT #define NotifyDriverShm_disable ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable #define NotifyDriverShm_disable_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable_fxnP #define NotifyDriverShm_disable_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disable_FxnT #define NotifyDriverShm_enable ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable #define NotifyDriverShm_enable_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable_fxnP #define NotifyDriverShm_enable_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enable_FxnT #define NotifyDriverShm_disableEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent #define NotifyDriverShm_disableEvent_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent_fxnP #define NotifyDriverShm_disableEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_disableEvent_FxnT #define NotifyDriverShm_enableEvent ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent #define NotifyDriverShm_enableEvent_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent_fxnP #define NotifyDriverShm_enableEvent_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_enableEvent_FxnT #define NotifyDriverShm_setNotifyHandle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle #define NotifyDriverShm_setNotifyHandle_fxnP ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle_fxnP #define NotifyDriverShm_setNotifyHandle_FxnT ti_sdo_ipc_notifyDrivers_NotifyDriverShm_setNotifyHandle_FxnT #define NotifyDriverShm_sharedMemReq ti_sdo_ipc_notifyDrivers_NotifyDriverShm_sharedMemReq #define NotifyDriverShm_Module_name ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_name #define NotifyDriverShm_Module_id ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_id #define NotifyDriverShm_Module_startup ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_startup #define NotifyDriverShm_Module_startupDone ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_startupDone #define NotifyDriverShm_Module_hasMask ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_hasMask #define NotifyDriverShm_Module_getMask ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_getMask #define NotifyDriverShm_Module_setMask ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_setMask #define NotifyDriverShm_Object_heap ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_heap #define NotifyDriverShm_Module_heap ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_heap #define NotifyDriverShm_construct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_construct #define NotifyDriverShm_create ti_sdo_ipc_notifyDrivers_NotifyDriverShm_create #define NotifyDriverShm_handle ti_sdo_ipc_notifyDrivers_NotifyDriverShm_handle #define NotifyDriverShm_struct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_struct #define NotifyDriverShm_Handle_label ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_label #define NotifyDriverShm_Handle_name ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_name #define NotifyDriverShm_Instance_init ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_init #define NotifyDriverShm_Object_count ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_count #define NotifyDriverShm_Object_get ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_get #define NotifyDriverShm_Object_first ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_first #define NotifyDriverShm_Object_next ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_next #define NotifyDriverShm_Object_sizeof ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Object_sizeof #define NotifyDriverShm_Params_copy ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params_copy #define NotifyDriverShm_Params_init ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Params_init #define NotifyDriverShm_Instance_finalize ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Instance_finalize #define NotifyDriverShm_delete ti_sdo_ipc_notifyDrivers_NotifyDriverShm_delete #define NotifyDriverShm_destruct ti_sdo_ipc_notifyDrivers_NotifyDriverShm_destruct #define NotifyDriverShm_Module_upCast ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_upCast #define NotifyDriverShm_Module_to_ti_sdo_ipc_interfaces_INotifyDriver ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Module_to_ti_sdo_ipc_interfaces_INotifyDriver #define NotifyDriverShm_Handle_upCast ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_upCast #define NotifyDriverShm_Handle_to_ti_sdo_ipc_interfaces_INotifyDriver ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_to_ti_sdo_ipc_interfaces_INotifyDriver #define NotifyDriverShm_Handle_downCast ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_downCast #define NotifyDriverShm_Handle_from_ti_sdo_ipc_interfaces_INotifyDriver ti_sdo_ipc_notifyDrivers_NotifyDriverShm_Handle_from_ti_sdo_ipc_interfaces_INotifyDriver /* proxies */ #include <ti/sdo/ipc/notifyDrivers/package/NotifyDriverShm_InterruptProxy.h> #endif /* ti_sdo_ipc_notifyDrivers_NotifyDriverShm__localnames__done */ #endif /* * @(#) ti.sdo.ipc.notifyDrivers; 1, 0, 0, 0,; 5-10-2013 12:31:13; /db/vtree/library/trees/ipc/ipc-i15/src/ xlibrary */
c9843888b621ef0cbac01c5f24536f2b2431c7ff
ed96f213c9ef9c2e3b9fd9f5057d4fec470c4ff9
/render_gdi.c
6a0b6f96d08a421f47e9dfbb58b981d31eee43bf
[ "MIT" ]
permissive
cnsuhao/svideo
85a49e48597298122fd0531913675d7bf1d653e1
98a924748b8734b8d551df3c2d8f66e579a20592
refs/heads/master
2021-06-18T21:08:47.779772
2017-07-07T07:47:25
2017-07-07T13:05:47
null
0
0
null
null
null
null
UTF-8
C
false
false
1,784
c
render_gdi.c
#include <stdlib.h> #include <windows.h> #include "svideo_convert.h" #include "irender.h" #include "winapi.h" struct render_gdi { render base; BITMAPINFO bmp; HDC dc; svideo_convert *convert; uint8_t *buf; RECT rec; }; void gdi_free(render **h) { if((*h)==0)return; struct render_gdi *self=(struct render_gdi*)(*h); FillRect(self->dc,&self->rec,(HBRUSH)(pGetStockObject(BLACK_BRUSH))); ReleaseDC((HWND)self->base.hwnd,self->dc); svideo_convert_free(&self->convert); free(*h); *h=0; } int gdi_draw(render *h,hvframe *frame) { struct render_gdi *self=(struct render_gdi*)h; svideo_convert_convert2(self->convert, frame, self->buf); pSetStretchBltMode(self->dc, STRETCH_HALFTONE); pStretchDIBits(self->dc, 0, 0, self->rec.right, self->rec.bottom, 0, 0, self->bmp.bmiHeader.biWidth, frame->h, self->buf, &self->bmp, DIB_RGB_COLORS, SRCCOPY); return 0; } render *gdi_new(int32_t hwnd,int pic_w,int pic_h) { struct render_gdi *re = (struct render_gdi *)calloc(1,sizeof(*re)); re->convert = svideo_convert_new(pic_w, pic_h, pic_w, pic_h, PF_YUV420P, PF_BGR24); re->dc = GetDC((HWND)hwnd); re->base.hwnd = hwnd; GetClientRect((HWND)re->base.hwnd, &re->rec); re->buf = (uint8_t*)malloc(svideo_convert_get_size(pic_w, pic_h, PF_RGB24)); re->bmp.bmiHeader.biBitCount = 24; re->bmp.bmiHeader.biClrImportant = BI_RGB; re->bmp.bmiHeader.biClrUsed = 0; re->bmp.bmiHeader.biCompression = 0; re->bmp.bmiHeader.biHeight = -pic_h; re->bmp.bmiHeader.biWidth = pic_w; re->bmp.bmiHeader.biPlanes = 1; re->bmp.bmiHeader.biSize = sizeof(re->bmp.bmiHeader); re->bmp.bmiHeader.biSizeImage = pic_w*pic_h * 3; re->bmp.bmiHeader.biXPelsPerMeter = 0; re->bmp.bmiHeader.biYPelsPerMeter = 0; re->base.destory=gdi_free; re->base.draw=gdi_draw; return (render *)re; }
67dda04fb42cf59ecac5153aaa0a045210cc85e4
a844cc62818c895eddfa9995b818991669322fa7
/srcs/actions/undo.c
dca298c4c12d52c4a3f2531233531969e1f5a13e
[]
no_license
mint42/ft_select
e1badefd0c6735c4984c934fe629129c6a46140e
e9519b0db98293dee1709c1e633ae12c3545fe2d
refs/heads/master
2020-08-28T22:06:39.925809
2020-04-23T04:00:02
2020-04-23T04:00:02
217,835,113
0
0
null
null
null
null
UTF-8
C
false
false
1,851
c
undo.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* undo.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rreedy <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/13 07:46:46 by rreedy #+# #+# */ /* Updated: 2019/11/20 23:51:38 by rreedy ### ########.fr */ /* */ /* ************************************************************************** */ #include "errors.h" #include "screen.h" #include "struct_info.h" #include "struct_arg.h" #include <stdint.h> static inline void undo_deleted(struct s_info *info, uint32_t arg) { info->args[info->args[arg].active_prev].active_next = arg; info->args[info->args[arg].active_next].active_prev = arg; info->args[arg].status = UNSELECTED; info->args[arg].delete_group_id = 0; if (arg < info->starting_arg) info->starting_arg = arg; if (arg < info->cursor_arg) ++info->cursor_coord; ++info->n_active_args; } int action_undo(struct s_info *info) { uint32_t arg; if (!info->max_delete_group_id) return (SUCCESS); arg = 0; while (arg < info->n_args) { if (info->args[arg].status == DELETED && info->args[arg].delete_group_id == info->max_delete_group_id) { undo_deleted(info, arg); } ++arg; } --info->max_delete_group_id; find_new_max_arg_len(info); if (update_screen(info) == ERROR) return (ERROR); return (SUCCESS); }
d413e5583856386d5d0be27fdbba0788755f2c88
36fdd61cc85005b8766c99013d936957b05e3144
/fprintf-test.c
801b16c9c219c7bd7622f7f4b6249c3b59f0147a
[]
no_license
kanekohehe/kaneF
901b51cbb4f515c0408a526255bacfc3e35039f2
3be11398a6d56be11a5129eaaf1245da820b0b7a
refs/heads/master
2021-01-23T13:41:40.846484
2014-02-08T07:27:26
2014-02-08T07:27:26
null
0
0
null
null
null
null
UTF-8
C
false
false
155
c
fprintf-test.c
#include <stdio.h> int main () { printf("printf\n"); fprintf(stdout, "fprintf stdout\n"); fprintf(stderr, "fprintf stderr\n"); return 0; }
50cd3f0eac8b573e7cc4aa92928fa6e2b005fa76
db74b48fade89698de010478fed0bd08430cc3cb
/stats.c
5ecd98949209f36df8b3c641205e3468ac3b0ddc
[]
no_license
KishanShingala/shingala_Coursera
cbf646fe3135dd811f7fd7fddccf547b5b4d006a
ea997a8336a9f95b41763de2477e52b621ecb5f4
refs/heads/master
2022-10-02T13:59:21.426499
2020-06-06T05:55:04
2020-06-06T05:55:04
269,880,978
0
0
null
null
null
null
UTF-8
C
false
false
3,815
c
stats.c
/****************************************************************************** * Copyright (C) 2017 by Alex Fosdick - University of Colorado * * Redistribution, modification or use of this software in source or binary * forms is permitted as long as the files maintain this copyright. Users are * permitted to modify this and use it to learn about the field of embedded * software. Alex Fosdick and the University of Colorado are not liable for any * misuse of this material. * *****************************************************************************/ /** * @file stats.c * @brief statistical analytics on a dataset * * Analyze an array of unsigned char data items and report analytics on the * maximum, minimum, mean, and median of the data set. The data set is ordered * from large to small. All statistics should be rounded down to the nearest integer. * The data should be printed to the screen in nicely formatted presentation. * * @author Kishan Shingala * @date 6 june 2020 * */ #include <stdio.h> #include "stats.h" /* Size of the Data Set */ #define SIZE (40) void main() { unsigned char test[SIZE] = { 34, 201, 190, 154, 8, 194, 2, 6, 114, 88, 45, 76, 123, 87, 25, 23, 200, 122, 150, 90, 92, 87, 177, 244, 201, 6, 12, 60, 8, 2, 5, 67, 7, 87, 250, 230, 99, 3, 100, 90}; /* Other Variable Declarations Go Here */ /* Statistics and Printing Functions Go Here */ } /** * @brief Print statistics of array. * * A function that prints the statistics of an array including minimum, maximum, * mean, and median. * * @param median Median value * @param mean Mean value * @param max Maximum value * @param min Minimum value * * @return void */ void print_statistics(int median, int mean, int max, int min) { } /** * @brief Prints array to screen. * * Given an array of data and a length, prints the array to the screen. * * @param data Char data array * @param len Array length * * @return void */ void print_array(unsigned char *data, int len) { } /** * @brief Calculate array data median value. * * Given an array of data and a length, returns the median value. * Assume the array is ordered. * * @param data Char data array * @param len Array length * * @return The data median value */ int find_median(unsigned char *data, int len) { } /** * @brief Calculate array data mean value. * * Given an array of data and a length, returns the mean. * Assume the array is ordered. * * @param data Char data array * @param len Array length * * @return The data mean value */ int find_mean(unsigned char *data, int len) { } /** * @brief Calculate array data maximum value. * * Given an array of data and a length, returns the maximum. * Assume the array is not ordered. * * @param data Char data array * @param len Array length * * @return The data maximum value */ int find_maximum(unsigned char *data, int len) { } /** * @brief Calculate array data minimum value. * * Given an array of data and a length, returns the minimum. * Assume the array is not ordered. * * @param data Char data array * @param len Array length * * @return The data minimum value */ int find_minimum(unsigned char *data, int len) { } /** * @brief Calculate array data mean value. * * Given an array of data and a length, sorts the array from * largest to smallest. (The zeroth Element should be the largest * value, and the last element (n-1) should be the smallest value). * * @param data Char data array * @param len Array length * * @return void */ void sort_array(unsigned char *data, int len) { }
b40710a695897d2573ebdd11190cee4e8f5e22a4
7685d9fd6a2a9f2ea1b2fd833f4a0e4a63321c8a
/kernel/x86/display/tty.c
fb6df40cd0e037252589699e22673996dcaeed66
[ "MIT" ]
permissive
aqrln/aquarius-os
02b13a98c810dba031e1426f24c4032f802b1ff0
acd4027bd2edc9b2d523b32a7cc30bfdd6b05363
refs/heads/master
2020-06-05T07:56:22.764921
2014-02-01T17:19:03
2014-02-01T17:19:03
16,436,559
16
0
null
null
null
null
UTF-8
C
false
false
2,536
c
tty.c
#include <kernel.h> #include "tty.h" #include <io.h> #include <vga.h> static u8 x, y; static u16 attribute; static u16 *video_memory; static void update_cursor(void) { u16 pos = y * 80 + x; outb(0x3D4, 14); outb(0x3D5, pos >> 8); outb(0x3D4, 15); outb(0x3D5, (u8) pos); } void tty_scroll(void) { u16 line, col, pos; for (line = 0; line < 24; line++) { for (col = 0; col < 80; col++) { pos = line * 80 + col; video_memory[pos] = video_memory[pos + 80]; } } for (col = 0; col < 80; col++) { video_memory[24 * 80 + col] = ' ' | attribute; } } void tty_move(u8 new_x, u8 new_y) { x = new_x; y = new_y; update_cursor(); } void tty_clear(void) { int i, j; for (i = 0; i < 25; i++) { for (j = 0; j < 80; j++) { video_memory[i * 80 + j] = ' ' | attribute; } } tty_move(0, 0); } void tty_putc(char c) { switch (c) { case 8: //Backspace if (x == 0) { if (y == 0) break; y--; x = 79; } else { x--; } video_memory[y * 80 + x + 1] = ' ' | BLACK_BG; break; case '\t': x = (x + 8) & ~7; break; case '\r': x = 0; break; case '\n': x = 0; y++; break; default: video_memory[y * 80 + x] = c | attribute; x++; if (x >= 80) { x = 0; y++; } break; } if (y >= 25) { y = 24; tty_scroll(); } update_cursor(); } void tty_puts(char *s) { while (*s) { tty_putc(*s++); } } void tty_attr(u16 attr) { attribute = attr; } void tty_init(void) { vga_set_text_mode(); video_memory = (u16*) 0xB8000; attribute = BLACK_BG | WHITE; tty_clear(); } void tty_puthex(u32 n) { s32 tmp; tty_puts("0x"); char noZeroes = 1; int i; for (i = 28; i > 0; i -= 4) { tmp = (n >> i) & 0xF; if (tmp == 0 && noZeroes != 0) { continue; } if (tmp >= 0xA) { noZeroes = 0; tty_putc (tmp-0xA+'a' ); } else { noZeroes = 0; tty_putc( tmp+'0' ); } } tmp = n & 0xF; if (tmp >= 0xA) { tty_putc (tmp-0xA+'a'); } else { tty_putc (tmp+'0'); } } void tty_putdec(u32 n) { if (n == 0) { tty_putc('0'); return; } s32 acc = n; char c[32]; int i = 0; while (acc > 0) { c[i] = '0' + acc%10; acc /= 10; i++; } c[i] = 0; char c2[32]; c2[i--] = 0; int j = 0; while(i >= 0) { c2[i--] = c[j++]; } tty_puts(c2); }
2934c76783b9c8f0b86384d0fef54a1a8ca1857d
a50182a57102d384bb7969da1ef3c8c197dcd179
/c/001OnComputer/04/4.2PrintTele.c
c7f06d1fa89d15a6ff262c80d377966938488ce5
[]
no_license
rammiah/DailyTest
cad72ccc38df62c7b177104910a852bab6287a7e
806779c1a6820904f6c8664191f694cfd8161aad
refs/heads/master
2021-09-12T16:23:09.253515
2018-04-18T13:31:09
2018-04-18T13:31:09
null
0
0
null
null
null
null
UTF-8
C
false
false
594
c
4.2PrintTele.c
#include <stdio.h> #define CNANGE 0 void Print(char* str){ #if CNANGE char*_str = str; while (*_str){ if (*_str >= 'a' && *_str <= 'z'){ printf("%c", *_str - 'a' + 'A'); } else if(*_str >= 'A' && *_str <= 'Z'){ printf("%c", *_str - 'A' + 'a'); } else{ printf("%c", *_str); } ++_str; } #else printf("%s", str); #endif // CNANGE printf("\n"); } int main(void){ char str[100]; printf("Input a string:\n"); scanf("%[^\n]", str); Print(str); return 0; }
c8b2b6d72ad0e2230a1c1ca530bb440b46754956
16c7083af14af891c64ccffb071aaa995024db11
/test/UploadServer/ClientSession/JpegImage.h
793a300c6801d2ac57b7cda903f19dca7c9e1b6b
[]
no_license
glandu2/rzauth
a062c5d7d57e32642cefdb6a73d93c63f4bcfd87
296b790ddfebce6260b19436964d643e2781231a
refs/heads/master
2021-05-24T03:39:25.636507
2020-08-28T12:56:41
2020-08-28T12:56:41
36,559,779
1
3
null
null
null
null
UTF-8
C
false
false
4,030
h
JpegImage.h
#pragma once // One pixel image created with mspaint static const unsigned char ONE_PIXEL_IMAGE[631] = { 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x05, 0x03, 0x03, 0x03, 0x03, 0x03, 0x06, 0x04, 0x04, 0x03, 0x05, 0x07, 0x06, 0x07, 0x07, 0x07, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0B, 0x09, 0x08, 0x08, 0x0A, 0x08, 0x07, 0x07, 0x0A, 0x0D, 0x0A, 0x0A, 0x0B, 0x0C, 0x0C, 0x0C, 0x0C, 0x07, 0x09, 0x0E, 0x0F, 0x0D, 0x0C, 0x0E, 0x0B, 0x0C, 0x0C, 0x0C, 0xFF, 0xDB, 0x00, 0x43, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x06, 0x03, 0x03, 0x06, 0x0C, 0x08, 0x07, 0x08, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x01, 0x00, 0x01, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01, 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F, 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05, 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1, 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00, 0xFD, 0xFC, 0xA2, 0x8A, 0x28, 0x03, 0xFF, 0xD9};
5517547e10b587c493c74f72ee3116f910ffdd54
95e4a9f1b752f5c97c0c49da5dfc1f6b8f7090f6
/hello.c
7613881656130c405f5945f05f1e964213a31f46
[]
no_license
kilzol/hacker_rank_c
917c4adba846de66bd3439af8f7407c6a4dd1469
ed706adccb7ca21dbcb387c3e2fe394242a210ae
refs/heads/master
2020-07-29T00:30:39.490271
2019-10-14T14:32:09
2019-10-14T14:32:09
209,598,687
0
0
null
null
null
null
UTF-8
C
false
false
268
c
hello.c
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { char s[100]; int i=0; scanf("%[^\n]%*c", &s); printf("Hello, World!\n"); while(s[i]!='\0'){ printf("%c",s[i]); i++; } return 0; }
83f64902f955a22c4e297b0f2c3975cec10d6c49
1b45337a4822bd1a1de1ddf67e9319c52ea3e687
/5- Two Sum/C/hashtable.h
de40d44ac46f40b86209e3d465309ff3a8ea8bb1
[]
no_license
LockedThread/Learn-A-Language
64f957e00d4dacab8d7e300f382715b2eea43f56
6f5c34723ba179353a5fc641522c1f9002c00d51
refs/heads/master
2023-03-23T11:41:27.925084
2021-03-20T18:45:53
2021-03-20T18:45:53
348,920,421
0
0
null
null
null
null
UTF-8
C
false
false
1,410
h
hashtable.h
// // Created by warrens on 3/18/21. // #ifndef C_HASHTABLE_H #define C_HASHTABLE_H /* * Holds the key and value pair of the hashtable entry. */ typedef struct { int *key; // The un-hashed key to the entry int *value; } hashtable_entry; /* * Holds an array of hashtable entries, the max size, and the current count for used indices. */ typedef struct { hashtable_entry **entries; int size; int count; } hashtable; /* * Creates and initializes the hashtable struct. */ hashtable *hashtable_create(int initialSize); /* * Inserts or replaces a key-value pair into the hashtable. */ void hashtable_insert(hashtable *table, int key, int value); /* * Retrieves a value from the hashtable according to the key. */ hashtable_entry *hashtable_get(hashtable *table, int key); /* * Removes and frees a hashtable entry according to it's key. */ hashtable_entry *hashtable_remove(hashtable *table, int key); /* * Returns a boolean 1 or 0 in correlation to whether or not an entry is found with the key provided. */ int hashtable_contains(hashtable *table, int key); /* * Impl only use. Creates a hashtable_entry object. */ hashtable_entry *hashtable_create_entry(int *key, int *value); /* * Frees the hashtable. */ void hashtable_free(hashtable *table); /* * Frees a specific hashtable_entry */ void hashtable_entry_free(hashtable_entry *entries); #endif //C_HASHTABLE_H
8f5246731a02a711e5f7d708606fb661342e0e8e
333b58a211c39f7142959040c2d60b69e6b20b47
/Include/CTTables/ExportTableUserInfoTable.h
b2195d96e7665c3b358f5c972d13e8205ddd5c5f
[]
no_license
JoeAltmaier/Odyssey
d6ef505ade8be3adafa3740f81ed8d03fba3dc1a
121ea748881526b7787f9106133589c7bd4a9b6d
refs/heads/master
2020-04-11T08:05:34.474250
2015-09-09T20:03:29
2015-09-09T20:03:29
42,187,845
0
0
null
null
null
null
UTF-8
C
false
false
1,679
h
ExportTableUserInfoTable.h
/************************************************************************* * This material is a confidential trade secret and proprietary * information of ConvergeNet Technologies, Inc. which may not be * reproduced, used, sold or transferred to any third party without the * prior written consent of ConvergeNet Technologies, Inc. This material * is also copyrighted as an unpublished work under sections 104 and 408 * of Title 17 of the United States Code. Law prohibits unauthorized * use, copying or reproduction. * * File Name: * ExportTableUserInfo.h * * Description: * * This the table used to store row ids of various string resources * supplied by the user when mapping a storage element to a LUN for further * exporting. *************************************************************************/ #ifndef __EXPORT_TABLE_USER_INFO_H__ #define __EXPORT_TABLE_USER_INFO_H__ #include "CtTypes.h" #include "TableMsgs.h" #pragma pack(4) extern fieldDef ExportTableUserInfoTable_FieldDefs[]; extern U32 cbExportTableUserInfoTable_FieldDefs; #pragma pack(4) #define EXPORT_TABLE_USER_INFO_TABLE_NAME "ExportTableUserInfoTable" #define EXPORT_TABLE_USER_INFO_TABLE_VERSION 1 struct ExportTableUserInfoRecord { rowID rid; // rid of this record U32 version; // version of this record U32 size; // size of this record rowID ridName; // LUN map name (in a string resource tbl) rowID ridDescription; // LUN map description (in a string resource tbl) }; #define TFN_ETUI_RIDNAME "ridName" #define TFN_ETUI_RIDDESCRIPTION "ridDescription" #endif // __EXPORT_TABLE_USER_INFO_H__
b7e7423b4073425681393daeb2e9b0cfe90b378a
fcf2c9bd344ecb168592da92697850d5070228b5
/inputTools.h
faf01623b68ad0eb40cb9bc20a4bed78df753521
[]
no_license
cescarez/cs260_project1
657c3801268caa4adccb94086c8482fc17e10ce0
0a876c62a42c6416721d88a1cb6766dd0fc3c3a6
refs/heads/master
2020-05-09T15:37:00.746490
2019-04-27T07:34:00
2019-04-27T07:34:00
181,239,979
0
0
null
null
null
null
UTF-8
C
false
false
649
h
inputTools.h
//Christabel Escarez //CS260 - Spring 2019 //Project #1 - inputTools.h //header file for standard input tools #ifndef INPUT_TOOLS_H #define INPUT_TOOLS_H const int MAX_SIZE = 100; const int MAX_RESPONSE = 3; //check for legal inputs; note overloaded checkInput char checkInput (char &response); int checkInput (int &response, const int &maxThreshold); bool checkCstring(char response[]); //display prompt for user input, returning the legal //value back to the calling environment int readInt (const char prompt[], const int &maxThreshold); char readChar (const char prompt[]); void readString (const char prompt[], char inputString[]); #endif
02c8a75dfdec310d1a939220dc3fea6fe22e42f8
8947812c9c0be1f0bb6c30d1bb225d4d6aafb488
/02_Library/Include/XMFFmpeg/config.h
fef4617680a6ec24c272edfb84046d8b4b283f7f
[ "MIT" ]
permissive
alissastanderwick/OpenKODE-Framework
cbb298974e7464d736a21b760c22721281b9c7ec
d4382d781da7f488a0e7667362a89e8e389468dd
refs/heads/master
2021-10-25T01:33:37.821493
2016-07-12T01:29:35
2016-07-12T01:29:35
null
0
0
null
null
null
null
UTF-8
C
false
false
60,147
h
config.h
#ifndef FFMPEG_CONFIG_H #define FFMPEG_CONFIG_H #define FFMPEG_CONFIGURATION "XMSoft Configuration" #define FFMPEG_LICENSE "LGPL version 2.1 or later" //#define FFMPEG_DATADIR "/usr/local/share/ffmpeg" //#define AVCONV_DATADIR "/usr/local/share/ffmpeg" //#define CC_TYPE "llvm_gcc" //#define CC_VERSION __VERSION__ #define restrict //#define EXTERN_PREFIX "_" //#define EXTERN_ASM _ //#define SLIBSUF ".dylib" #if defined (SHP) #elif defined (_WIN32) #if !defined (WINCE) #define _CONFIG_AVISYNTH 1 #endif #define _HAVE_WINSOCK2_H 1 #define _HAVE_ISATTY 0 #define _HAVE_LRINT 0 #define _HAVE_LRINTF 0 #define _HAVE_ROUND 0 #define _HAVE_ROUNDF 0 #define _HAVE_TRUNC 0 #define _HAVE_TRUNCF 0 #else #endif #ifndef _HAVE_ISATTY #define _HAVE_ISATTY 1 #endif #ifndef _HAVE_WINSOCK2_H #define _HAVE_WINSOCK2_H 0 #endif #ifndef _CONFIG_AVISYNTH #define _CONFIG_AVISYNTH 0 #endif #ifndef _HAVE_LRINT #define _HAVE_LRINT 1 #endif #ifndef _HAVE_LRINTF #define _HAVE_LRINTF 1 #endif #ifndef _HAVE_ROUND #define _HAVE_ROUND 1 #endif #ifndef _HAVE_ROUNDF #define _HAVE_ROUNDF 1 #endif #ifndef _HAVE_TRUNC #define _HAVE_TRUNC 1 #endif #ifndef _HAVE_TRUNCF #define _HAVE_TRUNCF 1 #endif #define ARCH_ALPHA 0 #define ARCH_ARM 0 #define ARCH_AVR32 0 #define ARCH_AVR32_AP 0 #define ARCH_AVR32_UC 0 #define ARCH_BFIN 0 #define ARCH_IA64 0 #define ARCH_M68K 0 #define ARCH_MIPS 0 #define ARCH_MIPS64 0 #define ARCH_PARISC 0 #define ARCH_PPC 0 #define ARCH_PPC64 0 #define ARCH_S390 0 #define ARCH_SH4 0 #define ARCH_SPARC 0 #define ARCH_SPARC64 0 #define ARCH_TOMI 0 #define ARCH_X86 0 #define ARCH_X86_32 0 #define ARCH_X86_64 0 #define HAVE_ALTIVEC 0 #define HAVE_AMD3DNOW 0 #define HAVE_AMD3DNOWEXT 0 #define HAVE_ARMV5TE 0 #define HAVE_ARMV6 0 #define HAVE_ARMV6T2 0 #define HAVE_ARMVFP 0 #define HAVE_AVX 0 #define HAVE_IWMMXT 0 #define HAVE_MMI 0 #define HAVE_MMX 0 #define HAVE_MMX2 0 #define HAVE_NEON 0 #define HAVE_PPC4XX 0 #define HAVE_SSE 0 #define HAVE_SSSE3 0 #define HAVE_VFPV3 0 #define HAVE_VIS 0 #define HAVE_BIGENDIAN 0 #define HAVE_FAST_UNALIGNED 1 #define HAVE_PTHREADS 0 #define HAVE_W32THREADS 0 #define HAVE_OS2THREADS 0 #define HAVE_ALIGNED_STACK 1 #define HAVE_ALSA_ASOUNDLIB_H 0 #define HAVE_ALTIVEC_H 0 #define HAVE_ARPA_INET_H 0 #define HAVE_ASM_MOD_Y 0 #define HAVE_ASM_TYPES_H 0 #define HAVE_ATTRIBUTE_MAY_ALIAS 1 #define HAVE_ATTRIBUTE_PACKED 1 #define HAVE_CBRTF 0 #define HAVE_CLOSESOCKET 0 #define HAVE_CMOV 0 #define HAVE_DCBZL 0 #define HAVE_DEV_BKTR_IOCTL_BT848_H 0 #define HAVE_DEV_BKTR_IOCTL_METEOR_H 0 #define HAVE_DEV_IC_BT8XX_H 0 #define HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H 0 #define HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H 0 #define HAVE_DLFCN_H 0 #define HAVE_DLOPEN 1 #define HAVE_DOS_PATHS 0 #define HAVE_EBP_AVAILABLE 1 #define HAVE_EBX_AVAILABLE 1 #define HAVE_EXP2 0 #define HAVE_EXP2F 0 #define HAVE_FAST_64BIT 0 #define HAVE_FAST_CLZ 0 #define HAVE_FAST_CMOV 0 #define HAVE_FCNTL 0 #define HAVE_FORK 0 #define HAVE_GETADDRINFO 0 #define HAVE_GETHRTIME 0 #define HAVE_GETPROCESSAFFINITYMASK 0 #define HAVE_GETPROCESSMEMORYINFO 0 #define HAVE_GETPROCESSTIMES 0 #define HAVE_GETRUSAGE 0 #define HAVE_GNU_AS 0 #define HAVE_IBM_ASM 0 #define HAVE_INET_ATON 0 #define HAVE_INLINE_ASM 0 #define HAVE_ISATTY _HAVE_ISATTY #define HAVE_KBHIT 0 #define HAVE_LDBRX 0 #define HAVE_LLRINT 0 #define HAVE_LLRINTF 0 #define HAVE_LOCAL_ALIGNED_16 1 #define HAVE_LOCAL_ALIGNED_8 1 #define HAVE_LOCALTIME_R 1 #define HAVE_LOG2 0 #define HAVE_LOG2F 0 #define HAVE_LOONGSON 0 #define HAVE_LRINT _HAVE_LRINT #define HAVE_LRINTF _HAVE_LRINTF #define HAVE_LZO1X_999_COMPRESS 0 #define HAVE_MACHINE_IOCTL_BT848_H 0 #define HAVE_MACHINE_IOCTL_METEOR_H 0 #define HAVE_MAKEINFO 1 #define HAVE_MALLOC_H 0 #define HAVE_MAPVIEWOFFILE 0 #define HAVE_MEMALIGN 0 #define HAVE_MKSTEMP 0 #define HAVE_MMAP 0 #define HAVE_PEEKNAMEDPIPE 0 #define HAVE_POLL_H 0 #define HAVE_POSIX_MEMALIGN 0 #define HAVE_ROUND _HAVE_ROUND #define HAVE_ROUNDF _HAVE_ROUNDF #define HAVE_SCHED_GETAFFINITY 0 #define HAVE_SDL 0 #define HAVE_SDL_VIDEO_SIZE 0 #define HAVE_SETMODE 0 #define HAVE_SETRLIMIT 1 #define HAVE_SNDIO_H 0 #define HAVE_SOCKLEN_T 1 #define HAVE_SOUNDCARD_H 0 #define HAVE_STRERROR_R 0 #define HAVE_STRPTIME 0 #define HAVE_STRUCT_ADDRINFO 1 #define HAVE_STRUCT_IPV6_MREQ 1 #define HAVE_STRUCT_RUSAGE_RU_MAXRSS 1 #define HAVE_STRUCT_SOCKADDR_IN6 1 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1 #define HAVE_STRUCT_SOCKADDR_STORAGE 1 #define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 #define HAVE_SYMVER 0 #define HAVE_SYMVER_ASM_LABEL 0 #define HAVE_SYMVER_GNU_ASM 0 #define HAVE_SYSCONF 1 #define HAVE_SYSCTL 1 #define HAVE_SYS_MMAN_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_SOUNDCARD_H 0 #define HAVE_SYS_VIDEOIO_H 0 #define HAVE_TERMIOS_H 1 #define HAVE_THREADS 1 #define HAVE_TRUNC _HAVE_TRUNC #define HAVE_TRUNCF _HAVE_TRUNCF #define HAVE_VFP_ARGS 0 #define HAVE_VIRTUALALLOC 0 #define HAVE_WINSOCK2_H _HAVE_WINSOCK2_H #define HAVE_XFORM_ASM 0 #define HAVE_XMM_CLOBBERS 1 #define HAVE_YASM 0 #define CONFIG_BSFS 1 #define CONFIG_DECODERS 1 #define CONFIG_DEMUXERS 1 #define CONFIG_ENCODERS 1 #define CONFIG_FILTERS 0 #define CONFIG_HWACCELS 1 #define CONFIG_INDEVS 0 #define CONFIG_MUXERS 1 #define CONFIG_OUTDEVS 0 #define CONFIG_PARSERS 1 #define CONFIG_PROTOCOLS 1 #define CONFIG_FFPLAY 0 #define CONFIG_FFPROBE 0 #define CONFIG_FFSERVER 0 #define CONFIG_FFMPEG 0 #define CONFIG_AVPLAY 0 #define CONFIG_AVPROBE 0 #define CONFIG_AVSERVER 0 #define CONFIG_AANDCT 1 #define CONFIG_AC3DSP 1 #define CONFIG_AVCODEC 1 #define CONFIG_AVDEVICE 0 #define CONFIG_AVFILTER 1 #define CONFIG_AVFORMAT 1 #define CONFIG_AVISYNTH _CONFIG_AVISYNTH #define CONFIG_BZLIB 0 #define CONFIG_CRYSTALHD 0 #define CONFIG_DCT 1 #define CONFIG_DOC 0 #define CONFIG_DWT 1 #define CONFIG_DXVA2 0 #define CONFIG_FASTDIV 1 #define CONFIG_FFT 1 #define CONFIG_FREI0R 0 #define CONFIG_GNUTLS 0 #define CONFIG_GOLOMB 1 #define CONFIG_GPL 0 #define CONFIG_GRAY 0 #define CONFIG_H264CHROMA 1 #define CONFIG_H264DSP 1 #define CONFIG_H264PRED 1 #define CONFIG_HARDCODED_TABLES 0 #define CONFIG_HUFFMAN 1 #define CONFIG_LIBAACPLUS 0 #define CONFIG_LIBASS 0 #define CONFIG_LIBCDIO 0 #define CONFIG_LIBCELT 0 #define CONFIG_LIBDC1394 0 #define CONFIG_LIBDIRAC 0 #define CONFIG_LIBFAAC 0 #define CONFIG_LIBFREETYPE 0 #define CONFIG_LIBGSM 0 #define CONFIG_LIBMODPLUG 0 #define CONFIG_LIBMP3LAME 0 #define CONFIG_LIBNUT 0 #define CONFIG_LIBOPENCORE_AMRNB 0 #define CONFIG_LIBOPENCORE_AMRWB 0 #define CONFIG_LIBOPENCV 0 #define CONFIG_LIBOPENJPEG 0 #define CONFIG_LIBPULSE 0 #define CONFIG_LIBRTMP 0 #define CONFIG_LIBSCHROEDINGER 0 #define CONFIG_LIBSPEEX 0 #define CONFIG_LIBSTAGEFRIGHT_H264 0 #define CONFIG_LIBTHEORA 0 #define CONFIG_LIBUTVIDEO 0 #define CONFIG_LIBV4L2 0 #define CONFIG_LIBVO_AACENC 0 #define CONFIG_LIBVO_AMRWBENC 0 #define CONFIG_LIBVORBIS 0 #define CONFIG_LIBVPX 0 #define CONFIG_LIBX264 0 #define CONFIG_LIBXAVS 0 #define CONFIG_LIBXVID 0 #define CONFIG_LPC 1 #define CONFIG_LSP 1 #define CONFIG_MDCT 1 #define CONFIG_MEMALIGN_HACK 0 #define CONFIG_MLIB 0 #define CONFIG_MPEGAUDIODSP 1 #define CONFIG_NETWORK 0 #define CONFIG_NONFREE 0 #define CONFIG_OPENAL 0 #define CONFIG_OPENSSL 0 #define CONFIG_PIC 1 #define CONFIG_POSTPROC 0 #define CONFIG_RDFT 1 #define CONFIG_RTPDEC 0 #define CONFIG_RUNTIME_CPUDETECT 0 #define CONFIG_SAFE_BITSTREAM_READER 1 #define CONFIG_SHARED 1 #define CONFIG_SINEWIN 1 #define CONFIG_SMALL 0 #define CONFIG_SRAM 0 #define CONFIG_STATIC 1 #define CONFIG_SWRESAMPLE 1 #define CONFIG_SWSCALE 1 #define CONFIG_SWSCALE_ALPHA 1 #define CONFIG_THUMB 0 #define CONFIG_VAAPI 0 #define CONFIG_VDA 0 #define CONFIG_VDPAU 0 #define CONFIG_VERSION3 0 #define CONFIG_X11GRAB 0 #define CONFIG_ZLIB 1 #define CONFIG_AVUTIL 1 #define CONFIG_GPLV3 0 #define CONFIG_LGPLV3 0 #define CONFIG_AAC_ADTSTOASC_BSF 1 #define CONFIG_CHOMP_BSF 1 #define CONFIG_DUMP_EXTRADATA_BSF 1 #define CONFIG_H264_MP4TOANNEXB_BSF 1 #define CONFIG_IMX_DUMP_HEADER_BSF 1 #define CONFIG_MJPEG2JPEG_BSF 1 #define CONFIG_MJPEGA_DUMP_HEADER_BSF 1 #define CONFIG_MP3_HEADER_COMPRESS_BSF 1 #define CONFIG_MP3_HEADER_DECOMPRESS_BSF 1 #define CONFIG_MOV2TEXTSUB_BSF 1 #define CONFIG_NOISE_BSF 1 #define CONFIG_REMOVE_EXTRADATA_BSF 1 #define CONFIG_TEXT2MOVSUB_BSF 1 #define CONFIG_AASC_DECODER 1 #define CONFIG_AMV_DECODER 1 #define CONFIG_ANM_DECODER 1 #define CONFIG_ANSI_DECODER 1 #define CONFIG_ASV1_DECODER 1 #define CONFIG_ASV2_DECODER 1 #define CONFIG_AURA_DECODER 1 #define CONFIG_AURA2_DECODER 1 #define CONFIG_AVRP_DECODER 1 #define CONFIG_AVS_DECODER 1 #define CONFIG_BETHSOFTVID_DECODER 1 #define CONFIG_BFI_DECODER 1 #define CONFIG_BINK_DECODER 1 #define CONFIG_BMP_DECODER 1 #define CONFIG_BMV_VIDEO_DECODER 1 #define CONFIG_C93_DECODER 1 #define CONFIG_CAVS_DECODER 1 #define CONFIG_CDGRAPHICS_DECODER 1 #define CONFIG_CINEPAK_DECODER 1 #define CONFIG_CLJR_DECODER 1 #define CONFIG_CSCD_DECODER 1 #define CONFIG_CYUV_DECODER 1 #define CONFIG_DFA_DECODER 1 #define CONFIG_DIRAC_DECODER 1 #define CONFIG_DNXHD_DECODER 1 #define CONFIG_DPX_DECODER 1 #define CONFIG_DSICINVIDEO_DECODER 1 #define CONFIG_DVVIDEO_DECODER 1 #define CONFIG_DXA_DECODER 1 #define CONFIG_DXTORY_DECODER 1 #define CONFIG_EACMV_DECODER 1 #define CONFIG_EAMAD_DECODER 1 #define CONFIG_EATGQ_DECODER 1 #define CONFIG_EATGV_DECODER 1 #define CONFIG_EATQI_DECODER 1 #define CONFIG_EIGHTBPS_DECODER 1 #define CONFIG_EIGHTSVX_EXP_DECODER 1 #define CONFIG_EIGHTSVX_FIB_DECODER 1 #define CONFIG_ESCAPE124_DECODER 1 #define CONFIG_ESCAPE130_DECODER 1 #define CONFIG_FFV1_DECODER 1 #define CONFIG_FFVHUFF_DECODER 1 #define CONFIG_FLASHSV_DECODER 1 #define CONFIG_FLASHSV2_DECODER 1 #define CONFIG_FLIC_DECODER 1 #define CONFIG_FLV_DECODER 1 #define CONFIG_FOURXM_DECODER 1 #define CONFIG_FRAPS_DECODER 1 #define CONFIG_FRWU_DECODER 1 #define CONFIG_GIF_DECODER 1 #define CONFIG_H261_DECODER 1 #define CONFIG_H263_DECODER 1 #define CONFIG_H263I_DECODER 1 #define CONFIG_H264_DECODER 1 #define CONFIG_H264_CRYSTALHD_DECODER 0 #define CONFIG_H264_VDPAU_DECODER 0 #define CONFIG_HUFFYUV_DECODER 1 #define CONFIG_IDCIN_DECODER 1 #define CONFIG_IFF_BYTERUN1_DECODER 1 #define CONFIG_IFF_ILBM_DECODER 1 #define CONFIG_INDEO2_DECODER 1 #define CONFIG_INDEO3_DECODER 1 #define CONFIG_INDEO4_DECODER 1 #define CONFIG_INDEO5_DECODER 1 #define CONFIG_INTERPLAY_VIDEO_DECODER 1 #define CONFIG_JPEG2000_DECODER 1 #define CONFIG_JPEGLS_DECODER 1 #define CONFIG_JV_DECODER 1 #define CONFIG_KGV1_DECODER 1 #define CONFIG_KMVC_DECODER 1 #define CONFIG_LAGARITH_DECODER 1 #define CONFIG_LOCO_DECODER 1 #define CONFIG_MDEC_DECODER 1 #define CONFIG_MIMIC_DECODER 1 #define CONFIG_MJPEG_DECODER 1 #define CONFIG_MJPEGB_DECODER 1 #define CONFIG_MMVIDEO_DECODER 1 #define CONFIG_MOTIONPIXELS_DECODER 1 #define CONFIG_MPEG_XVMC_DECODER 0 #define CONFIG_MPEG1VIDEO_DECODER 1 #define CONFIG_MPEG2VIDEO_DECODER 1 #define CONFIG_MPEG4_DECODER 1 #define CONFIG_MPEG4_CRYSTALHD_DECODER 0 #define CONFIG_MPEG4_VDPAU_DECODER 0 #define CONFIG_MPEGVIDEO_DECODER 1 #define CONFIG_MPEG_VDPAU_DECODER 0 #define CONFIG_MPEG1_VDPAU_DECODER 0 #define CONFIG_MPEG2_CRYSTALHD_DECODER 0 #define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 #define CONFIG_MSMPEG4V1_DECODER 1 #define CONFIG_MSMPEG4V2_DECODER 1 #define CONFIG_MSMPEG4V3_DECODER 1 #define CONFIG_MSRLE_DECODER 1 #define CONFIG_MSVIDEO1_DECODER 1 #define CONFIG_MSZH_DECODER 1 #define CONFIG_MXPEG_DECODER 1 #define CONFIG_NUV_DECODER 1 #define CONFIG_PAM_DECODER 1 #define CONFIG_PBM_DECODER 1 #define CONFIG_PCX_DECODER 1 #define CONFIG_PGM_DECODER 1 #define CONFIG_PGMYUV_DECODER 1 #define CONFIG_PICTOR_DECODER 1 #define CONFIG_PNG_DECODER 1 #define CONFIG_PPM_DECODER 1 #define CONFIG_PRORES_DECODER 1 #define CONFIG_PRORES_LGPL_DECODER 1 #define CONFIG_PTX_DECODER 1 #define CONFIG_QDRAW_DECODER 1 #define CONFIG_QPEG_DECODER 1 #define CONFIG_QTRLE_DECODER 1 #define CONFIG_R10K_DECODER 1 #define CONFIG_R210_DECODER 1 #define CONFIG_RAWVIDEO_DECODER 1 #define CONFIG_RL2_DECODER 1 #define CONFIG_ROQ_DECODER 1 #define CONFIG_RPZA_DECODER 1 #define CONFIG_RV10_DECODER 1 #define CONFIG_RV20_DECODER 1 #define CONFIG_RV30_DECODER 1 #define CONFIG_RV40_DECODER 1 #define CONFIG_S302M_DECODER 1 #define CONFIG_SGI_DECODER 1 #define CONFIG_SMACKER_DECODER 1 #define CONFIG_SMC_DECODER 1 #define CONFIG_SNOW_DECODER 1 #define CONFIG_SP5X_DECODER 1 #define CONFIG_SUNRAST_DECODER 1 #define CONFIG_SVQ1_DECODER 1 #define CONFIG_SVQ3_DECODER 1 #define CONFIG_TARGA_DECODER 1 #define CONFIG_THEORA_DECODER 1 #define CONFIG_THP_DECODER 1 #define CONFIG_TIERTEXSEQVIDEO_DECODER 1 #define CONFIG_TIFF_DECODER 1 #define CONFIG_TMV_DECODER 1 #define CONFIG_TRUEMOTION1_DECODER 1 #define CONFIG_TRUEMOTION2_DECODER 1 #define CONFIG_TSCC_DECODER 1 #define CONFIG_TXD_DECODER 1 #define CONFIG_ULTI_DECODER 1 #define CONFIG_UTVIDEO_DECODER 1 #define CONFIG_V210_DECODER 1 #define CONFIG_V210X_DECODER 1 #define CONFIG_V308_DECODER 1 #define CONFIG_V410_DECODER 1 #define CONFIG_VB_DECODER 1 #define CONFIG_VBLE_DECODER 1 #define CONFIG_VC1_DECODER 1 #define CONFIG_VC1_CRYSTALHD_DECODER 0 #define CONFIG_VC1_VDPAU_DECODER 0 #define CONFIG_VC1IMAGE_DECODER 1 #define CONFIG_VCR1_DECODER 1 #define CONFIG_VMDVIDEO_DECODER 1 #define CONFIG_VMNC_DECODER 1 #define CONFIG_VP3_DECODER 1 #define CONFIG_VP5_DECODER 1 #define CONFIG_VP6_DECODER 1 #define CONFIG_VP6A_DECODER 1 #define CONFIG_VP6F_DECODER 1 #define CONFIG_VP8_DECODER 1 #define CONFIG_VQA_DECODER 1 #define CONFIG_WMV1_DECODER 1 #define CONFIG_WMV2_DECODER 1 #define CONFIG_WMV3_DECODER 1 #define CONFIG_WMV3_CRYSTALHD_DECODER 0 #define CONFIG_WMV3_VDPAU_DECODER 0 #define CONFIG_WMV3IMAGE_DECODER 1 #define CONFIG_WNV1_DECODER 1 #define CONFIG_XAN_WC3_DECODER 1 #define CONFIG_XAN_WC4_DECODER 1 #define CONFIG_XL_DECODER 1 #define CONFIG_XWD_DECODER 1 #define CONFIG_Y41P_DECODER 1 #define CONFIG_YOP_DECODER 1 #define CONFIG_YUV4_DECODER 1 #define CONFIG_ZLIB_DECODER 1 #define CONFIG_ZMBV_DECODER 1 #define CONFIG_AAC_DECODER 1 #define CONFIG_AAC_LATM_DECODER 1 #define CONFIG_AC3_DECODER 1 #define CONFIG_ALAC_DECODER 1 #define CONFIG_ALS_DECODER 1 #define CONFIG_AMRNB_DECODER 1 #define CONFIG_AMRWB_DECODER 1 #define CONFIG_APE_DECODER 1 #define CONFIG_ATRAC1_DECODER 1 #define CONFIG_ATRAC3_DECODER 1 #define CONFIG_BINKAUDIO_DCT_DECODER 1 #define CONFIG_BINKAUDIO_RDFT_DECODER 1 #define CONFIG_BMV_AUDIO_DECODER 1 #define CONFIG_COOK_DECODER 1 #define CONFIG_DCA_DECODER 1 #define CONFIG_DSICINAUDIO_DECODER 1 #define CONFIG_EAC3_DECODER 1 #define CONFIG_FFWAVESYNTH_DECODER 1 #define CONFIG_FLAC_DECODER 1 #define CONFIG_G723_1_DECODER 1 #define CONFIG_G729_DECODER 1 #define CONFIG_GSM_DECODER 1 #define CONFIG_GSM_MS_DECODER 1 #define CONFIG_IMC_DECODER 1 #define CONFIG_MACE3_DECODER 1 #define CONFIG_MACE6_DECODER 1 #define CONFIG_MLP_DECODER 1 #define CONFIG_MP1_DECODER 1 #define CONFIG_MP1FLOAT_DECODER 1 #define CONFIG_MP2_DECODER 1 #define CONFIG_MP2FLOAT_DECODER 1 #define CONFIG_MP3_DECODER 1 #define CONFIG_MP3FLOAT_DECODER 1 #define CONFIG_MP3ADU_DECODER 1 #define CONFIG_MP3ADUFLOAT_DECODER 1 #define CONFIG_MP3ON4_DECODER 1 #define CONFIG_MP3ON4FLOAT_DECODER 1 #define CONFIG_MPC7_DECODER 1 #define CONFIG_MPC8_DECODER 1 #define CONFIG_NELLYMOSER_DECODER 1 #define CONFIG_QCELP_DECODER 1 #define CONFIG_QDM2_DECODER 1 #define CONFIG_RA_144_DECODER 1 #define CONFIG_RA_288_DECODER 1 #define CONFIG_SHORTEN_DECODER 1 #define CONFIG_SIPR_DECODER 1 #define CONFIG_SMACKAUD_DECODER 1 #define CONFIG_SONIC_DECODER 1 #define CONFIG_TRUEHD_DECODER 1 #define CONFIG_TRUESPEECH_DECODER 1 #define CONFIG_TTA_DECODER 1 #define CONFIG_TWINVQ_DECODER 1 #define CONFIG_VMDAUDIO_DECODER 1 #define CONFIG_VORBIS_DECODER 1 #define CONFIG_WAVPACK_DECODER 1 #define CONFIG_WMALOSSLESS_DECODER 1 #define CONFIG_WMAPRO_DECODER 1 #define CONFIG_WMAV1_DECODER 1 #define CONFIG_WMAV2_DECODER 1 #define CONFIG_WMAVOICE_DECODER 1 #define CONFIG_WS_SND1_DECODER 1 #define CONFIG_PCM_ALAW_DECODER 1 #define CONFIG_PCM_BLURAY_DECODER 1 #define CONFIG_PCM_DVD_DECODER 1 #define CONFIG_PCM_F32BE_DECODER 1 #define CONFIG_PCM_F32LE_DECODER 1 #define CONFIG_PCM_F64BE_DECODER 1 #define CONFIG_PCM_F64LE_DECODER 1 #define CONFIG_PCM_LXF_DECODER 1 #define CONFIG_PCM_MULAW_DECODER 1 #define CONFIG_PCM_S8_DECODER 1 #define CONFIG_PCM_S8_PLANAR_DECODER 1 #define CONFIG_PCM_S16BE_DECODER 1 #define CONFIG_PCM_S16LE_DECODER 1 #define CONFIG_PCM_S16LE_PLANAR_DECODER 1 #define CONFIG_PCM_S24BE_DECODER 1 #define CONFIG_PCM_S24DAUD_DECODER 1 #define CONFIG_PCM_S24LE_DECODER 1 #define CONFIG_PCM_S32BE_DECODER 1 #define CONFIG_PCM_S32LE_DECODER 1 #define CONFIG_PCM_U8_DECODER 1 #define CONFIG_PCM_U16BE_DECODER 1 #define CONFIG_PCM_U16LE_DECODER 1 #define CONFIG_PCM_U24BE_DECODER 1 #define CONFIG_PCM_U24LE_DECODER 1 #define CONFIG_PCM_U32BE_DECODER 1 #define CONFIG_PCM_U32LE_DECODER 1 #define CONFIG_PCM_ZORK_DECODER 1 #define CONFIG_INTERPLAY_DPCM_DECODER 1 #define CONFIG_ROQ_DPCM_DECODER 1 #define CONFIG_SOL_DPCM_DECODER 1 #define CONFIG_XAN_DPCM_DECODER 1 #define CONFIG_ADPCM_4XM_DECODER 1 #define CONFIG_ADPCM_ADX_DECODER 1 #define CONFIG_ADPCM_CT_DECODER 1 #define CONFIG_ADPCM_EA_DECODER 1 #define CONFIG_ADPCM_EA_MAXIS_XA_DECODER 1 #define CONFIG_ADPCM_EA_R1_DECODER 1 #define CONFIG_ADPCM_EA_R2_DECODER 1 #define CONFIG_ADPCM_EA_R3_DECODER 1 #define CONFIG_ADPCM_EA_XAS_DECODER 1 #define CONFIG_ADPCM_G722_DECODER 1 #define CONFIG_ADPCM_G726_DECODER 1 #define CONFIG_ADPCM_IMA_AMV_DECODER 1 #define CONFIG_ADPCM_IMA_APC_DECODER 1 #define CONFIG_ADPCM_IMA_DK3_DECODER 1 #define CONFIG_ADPCM_IMA_DK4_DECODER 1 #define CONFIG_ADPCM_IMA_EA_EACS_DECODER 1 #define CONFIG_ADPCM_IMA_EA_SEAD_DECODER 1 #define CONFIG_ADPCM_IMA_ISS_DECODER 1 #define CONFIG_ADPCM_IMA_QT_DECODER 1 #define CONFIG_ADPCM_IMA_SMJPEG_DECODER 1 #define CONFIG_ADPCM_IMA_WAV_DECODER 1 #define CONFIG_ADPCM_IMA_WS_DECODER 1 #define CONFIG_ADPCM_MS_DECODER 1 #define CONFIG_ADPCM_SBPRO_2_DECODER 1 #define CONFIG_ADPCM_SBPRO_3_DECODER 1 #define CONFIG_ADPCM_SBPRO_4_DECODER 1 #define CONFIG_ADPCM_SWF_DECODER 1 #define CONFIG_ADPCM_THP_DECODER 1 #define CONFIG_ADPCM_XA_DECODER 1 #define CONFIG_ADPCM_YAMAHA_DECODER 1 #define CONFIG_ASS_DECODER 1 #define CONFIG_DVBSUB_DECODER 1 #define CONFIG_DVDSUB_DECODER 1 #define CONFIG_PGSSUB_DECODER 1 #define CONFIG_SRT_DECODER 1 #define CONFIG_XSUB_DECODER 1 #define CONFIG_LIBCELT_DECODER 0 #define CONFIG_LIBDIRAC_DECODER 0 #define CONFIG_LIBGSM_DECODER 0 #define CONFIG_LIBGSM_MS_DECODER 0 #define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 #define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 #define CONFIG_LIBOPENJPEG_DECODER 0 #define CONFIG_LIBSCHROEDINGER_DECODER 0 #define CONFIG_LIBSPEEX_DECODER 0 #define CONFIG_LIBSTAGEFRIGHT_H264_DECODER 0 #define CONFIG_LIBUTVIDEO_DECODER 0 #define CONFIG_LIBVPX_DECODER 0 #define CONFIG_BINTEXT_DECODER 1 #define CONFIG_XBIN_DECODER 1 #define CONFIG_IDF_DECODER 1 #define CONFIG_AAC_DEMUXER 1 #define CONFIG_AC3_DEMUXER 1 #define CONFIG_ACT_DEMUXER 1 #define CONFIG_ADF_DEMUXER 1 #define CONFIG_ADX_DEMUXER 1 #define CONFIG_AEA_DEMUXER 1 #define CONFIG_AIFF_DEMUXER 1 #define CONFIG_AMR_DEMUXER 1 #define CONFIG_ANM_DEMUXER 1 #define CONFIG_APC_DEMUXER 1 #define CONFIG_APE_DEMUXER 1 #define CONFIG_APPLEHTTP_DEMUXER 1 #define CONFIG_ASF_DEMUXER 1 #define CONFIG_ASS_DEMUXER 1 #define CONFIG_AU_DEMUXER 1 #define CONFIG_AVI_DEMUXER 1 #define CONFIG_AVISYNTH_DEMUXER 0 #define CONFIG_AVS_DEMUXER 1 #define CONFIG_BETHSOFTVID_DEMUXER 1 #define CONFIG_BFI_DEMUXER 1 #define CONFIG_BINTEXT_DEMUXER 1 #define CONFIG_BINK_DEMUXER 1 #define CONFIG_BIT_DEMUXER 1 #define CONFIG_BMV_DEMUXER 1 #define CONFIG_C93_DEMUXER 1 #define CONFIG_CAF_DEMUXER 1 #define CONFIG_CAVSVIDEO_DEMUXER 1 #define CONFIG_CDG_DEMUXER 1 #define CONFIG_DAUD_DEMUXER 1 #define CONFIG_DFA_DEMUXER 1 #define CONFIG_DIRAC_DEMUXER 1 #define CONFIG_DNXHD_DEMUXER 1 #define CONFIG_DSICIN_DEMUXER 1 #define CONFIG_DTS_DEMUXER 1 #define CONFIG_DV_DEMUXER 1 #define CONFIG_DXA_DEMUXER 1 #define CONFIG_EA_DEMUXER 1 #define CONFIG_EA_CDATA_DEMUXER 1 #define CONFIG_EAC3_DEMUXER 1 #define CONFIG_FFM_DEMUXER 1 #define CONFIG_FFMETADATA_DEMUXER 1 #define CONFIG_FILMSTRIP_DEMUXER 1 #define CONFIG_FLAC_DEMUXER 1 #define CONFIG_FLIC_DEMUXER 1 #define CONFIG_FLV_DEMUXER 1 #define CONFIG_FOURXM_DEMUXER 1 #define CONFIG_G722_DEMUXER 1 #define CONFIG_G723_1_DEMUXER 1 #define CONFIG_G729_DEMUXER 1 #define CONFIG_GSM_DEMUXER 1 #define CONFIG_GXF_DEMUXER 1 #define CONFIG_H261_DEMUXER 1 #define CONFIG_H263_DEMUXER 1 #define CONFIG_H264_DEMUXER 1 #define CONFIG_ICO_DEMUXER 1 #define CONFIG_IDCIN_DEMUXER 1 #define CONFIG_IDF_DEMUXER 1 #define CONFIG_IFF_DEMUXER 1 #define CONFIG_IMAGE2_DEMUXER 1 #define CONFIG_IMAGE2PIPE_DEMUXER 1 #define CONFIG_INGENIENT_DEMUXER 1 #define CONFIG_IPMOVIE_DEMUXER 1 #define CONFIG_ISS_DEMUXER 1 #define CONFIG_IV8_DEMUXER 1 #define CONFIG_IVF_DEMUXER 1 #define CONFIG_JV_DEMUXER 1 #define CONFIG_LATM_DEMUXER 1 #define CONFIG_LMLM4_DEMUXER 1 #define CONFIG_LOAS_DEMUXER 1 #define CONFIG_LXF_DEMUXER 1 #define CONFIG_M4V_DEMUXER 1 #define CONFIG_MATROSKA_DEMUXER 1 #define CONFIG_MICRODVD_DEMUXER 1 #define CONFIG_MJPEG_DEMUXER 1 #define CONFIG_MLP_DEMUXER 1 #define CONFIG_MM_DEMUXER 1 #define CONFIG_MMF_DEMUXER 1 #define CONFIG_MOV_DEMUXER 1 #define CONFIG_MP3_DEMUXER 1 #define CONFIG_MPC_DEMUXER 1 #define CONFIG_MPC8_DEMUXER 1 #define CONFIG_MPEGPS_DEMUXER 1 #define CONFIG_MPEGTS_DEMUXER 1 #define CONFIG_MPEGTSRAW_DEMUXER 1 #define CONFIG_MPEGVIDEO_DEMUXER 1 #define CONFIG_MSNWC_TCP_DEMUXER 1 #define CONFIG_MTV_DEMUXER 1 #define CONFIG_MVI_DEMUXER 1 #define CONFIG_MXF_DEMUXER 1 #define CONFIG_MXG_DEMUXER 1 #define CONFIG_NC_DEMUXER 1 #define CONFIG_NSV_DEMUXER 1 #define CONFIG_NUT_DEMUXER 1 #define CONFIG_NUV_DEMUXER 1 #define CONFIG_OGG_DEMUXER 1 #define CONFIG_OMA_DEMUXER 1 #define CONFIG_PCM_ALAW_DEMUXER 1 #define CONFIG_PCM_MULAW_DEMUXER 1 #define CONFIG_PCM_F64BE_DEMUXER 1 #define CONFIG_PCM_F64LE_DEMUXER 1 #define CONFIG_PCM_F32BE_DEMUXER 1 #define CONFIG_PCM_F32LE_DEMUXER 1 #define CONFIG_PCM_S32BE_DEMUXER 1 #define CONFIG_PCM_S32LE_DEMUXER 1 #define CONFIG_PCM_S24BE_DEMUXER 1 #define CONFIG_PCM_S24LE_DEMUXER 1 #define CONFIG_PCM_S16BE_DEMUXER 1 #define CONFIG_PCM_S16LE_DEMUXER 1 #define CONFIG_PCM_S8_DEMUXER 1 #define CONFIG_PCM_U32BE_DEMUXER 1 #define CONFIG_PCM_U32LE_DEMUXER 1 #define CONFIG_PCM_U24BE_DEMUXER 1 #define CONFIG_PCM_U24LE_DEMUXER 1 #define CONFIG_PCM_U16BE_DEMUXER 1 #define CONFIG_PCM_U16LE_DEMUXER 1 #define CONFIG_PCM_U8_DEMUXER 1 #define CONFIG_PMP_DEMUXER 1 #define CONFIG_PVA_DEMUXER 1 #define CONFIG_QCP_DEMUXER 1 #define CONFIG_R3D_DEMUXER 1 #define CONFIG_RAWVIDEO_DEMUXER 1 #define CONFIG_RL2_DEMUXER 1 #define CONFIG_RM_DEMUXER 1 #define CONFIG_ROQ_DEMUXER 1 #define CONFIG_RPL_DEMUXER 1 #define CONFIG_RSO_DEMUXER 1 #define CONFIG_RTP_DEMUXER 0 #define CONFIG_RTSP_DEMUXER 0 #define CONFIG_SAP_DEMUXER 0 #define CONFIG_SBG_DEMUXER 1 #define CONFIG_SDP_DEMUXER 0 #define CONFIG_SEGAFILM_DEMUXER 1 #define CONFIG_SHORTEN_DEMUXER 1 #define CONFIG_SIFF_DEMUXER 1 #define CONFIG_SMACKER_DEMUXER 1 #define CONFIG_SMJPEG_DEMUXER 1 #define CONFIG_SOL_DEMUXER 1 #define CONFIG_SOX_DEMUXER 1 #define CONFIG_SPDIF_DEMUXER 1 #define CONFIG_SRT_DEMUXER 1 #define CONFIG_STR_DEMUXER 1 #define CONFIG_SWF_DEMUXER 1 #define CONFIG_THP_DEMUXER 1 #define CONFIG_TIERTEXSEQ_DEMUXER 1 #define CONFIG_TMV_DEMUXER 1 #define CONFIG_TRUEHD_DEMUXER 1 #define CONFIG_TTA_DEMUXER 1 #define CONFIG_TXD_DEMUXER 1 #define CONFIG_TTY_DEMUXER 1 #define CONFIG_VC1_DEMUXER 1 #define CONFIG_VC1T_DEMUXER 1 #define CONFIG_VMD_DEMUXER 1 #define CONFIG_VOC_DEMUXER 1 #define CONFIG_VQF_DEMUXER 1 #define CONFIG_W64_DEMUXER 1 #define CONFIG_WAV_DEMUXER 1 #define CONFIG_WC3_DEMUXER 1 #define CONFIG_WSAUD_DEMUXER 1 #define CONFIG_WSVQA_DEMUXER 1 #define CONFIG_WTV_DEMUXER 1 #define CONFIG_WV_DEMUXER 1 #define CONFIG_XA_DEMUXER 1 #define CONFIG_XBIN_DEMUXER 1 #define CONFIG_XMV_DEMUXER 1 #define CONFIG_XWMA_DEMUXER 1 #define CONFIG_YOP_DEMUXER 1 #define CONFIG_YUV4MPEGPIPE_DEMUXER 1 #define CONFIG_LIBMODPLUG_DEMUXER 0 #define CONFIG_LIBNUT_DEMUXER 0 #define CONFIG_A64MULTI_ENCODER 1 #define CONFIG_A64MULTI5_ENCODER 1 #define CONFIG_AMV_ENCODER 1 #define CONFIG_ASV1_ENCODER 1 #define CONFIG_ASV2_ENCODER 1 #define CONFIG_AVRP_ENCODER 1 #define CONFIG_BMP_ENCODER 1 #define CONFIG_CLJR_ENCODER 1 #define CONFIG_DNXHD_ENCODER 1 #define CONFIG_DPX_ENCODER 1 #define CONFIG_DVVIDEO_ENCODER 1 #define CONFIG_FFV1_ENCODER 1 #define CONFIG_FFVHUFF_ENCODER 1 #define CONFIG_FLASHSV_ENCODER 1 #define CONFIG_FLASHSV2_ENCODER 1 #define CONFIG_FLV_ENCODER 1 #define CONFIG_GIF_ENCODER 1 #define CONFIG_H261_ENCODER 1 #define CONFIG_H263_ENCODER 1 #define CONFIG_H263P_ENCODER 1 #define CONFIG_HUFFYUV_ENCODER 1 #define CONFIG_JPEG2000_ENCODER 1 #define CONFIG_JPEGLS_ENCODER 1 #define CONFIG_LJPEG_ENCODER 1 #define CONFIG_MJPEG_ENCODER 1 #define CONFIG_MPEG1VIDEO_ENCODER 1 #define CONFIG_MPEG2VIDEO_ENCODER 1 #define CONFIG_MPEG4_ENCODER 1 #define CONFIG_MSMPEG4V2_ENCODER 1 #define CONFIG_MSMPEG4V3_ENCODER 1 #define CONFIG_MSVIDEO1_ENCODER 1 #define CONFIG_PAM_ENCODER 1 #define CONFIG_PBM_ENCODER 1 #define CONFIG_PCX_ENCODER 1 #define CONFIG_PGM_ENCODER 1 #define CONFIG_PGMYUV_ENCODER 1 #define CONFIG_PNG_ENCODER 1 #define CONFIG_PPM_ENCODER 1 #define CONFIG_PRORES_ENCODER 1 #define CONFIG_QTRLE_ENCODER 1 #define CONFIG_R10K_ENCODER 1 #define CONFIG_R210_ENCODER 1 #define CONFIG_RAWVIDEO_ENCODER 1 #define CONFIG_ROQ_ENCODER 1 #define CONFIG_RV10_ENCODER 1 #define CONFIG_RV20_ENCODER 1 #define CONFIG_SGI_ENCODER 1 #define CONFIG_SNOW_ENCODER 1 #define CONFIG_SVQ1_ENCODER 1 #define CONFIG_TARGA_ENCODER 1 #define CONFIG_TIFF_ENCODER 1 #define CONFIG_V210_ENCODER 1 #define CONFIG_V308_ENCODER 1 #define CONFIG_V410_ENCODER 1 #define CONFIG_WMV1_ENCODER 1 #define CONFIG_WMV2_ENCODER 1 #define CONFIG_XWD_ENCODER 1 #define CONFIG_Y41P_ENCODER 1 #define CONFIG_YUV4_ENCODER 1 #define CONFIG_ZLIB_ENCODER 1 #define CONFIG_ZMBV_ENCODER 1 #define CONFIG_AAC_ENCODER 1 #define CONFIG_AC3_ENCODER 1 #define CONFIG_AC3_FIXED_ENCODER 1 #define CONFIG_ALAC_ENCODER 1 #define CONFIG_DCA_ENCODER 1 #define CONFIG_EAC3_ENCODER 1 #define CONFIG_FLAC_ENCODER 1 #define CONFIG_G723_1_ENCODER 1 #define CONFIG_MP2_ENCODER 1 #define CONFIG_NELLYMOSER_ENCODER 1 #define CONFIG_RA_144_ENCODER 1 #define CONFIG_SONIC_ENCODER 1 #define CONFIG_SONIC_LS_ENCODER 1 #define CONFIG_VORBIS_ENCODER 1 #define CONFIG_WMAV1_ENCODER 1 #define CONFIG_WMAV2_ENCODER 1 #define CONFIG_PCM_ALAW_ENCODER 1 #define CONFIG_PCM_F32BE_ENCODER 1 #define CONFIG_PCM_F32LE_ENCODER 1 #define CONFIG_PCM_F64BE_ENCODER 1 #define CONFIG_PCM_F64LE_ENCODER 1 #define CONFIG_PCM_MULAW_ENCODER 1 #define CONFIG_PCM_S8_ENCODER 1 #define CONFIG_PCM_S16BE_ENCODER 1 #define CONFIG_PCM_S16LE_ENCODER 1 #define CONFIG_PCM_S24BE_ENCODER 1 #define CONFIG_PCM_S24DAUD_ENCODER 1 #define CONFIG_PCM_S24LE_ENCODER 1 #define CONFIG_PCM_S32BE_ENCODER 1 #define CONFIG_PCM_S32LE_ENCODER 1 #define CONFIG_PCM_U8_ENCODER 1 #define CONFIG_PCM_U16BE_ENCODER 1 #define CONFIG_PCM_U16LE_ENCODER 1 #define CONFIG_PCM_U24BE_ENCODER 1 #define CONFIG_PCM_U24LE_ENCODER 1 #define CONFIG_PCM_U32BE_ENCODER 1 #define CONFIG_PCM_U32LE_ENCODER 1 #define CONFIG_ROQ_DPCM_ENCODER 1 #define CONFIG_ADPCM_ADX_ENCODER 1 #define CONFIG_ADPCM_G722_ENCODER 1 #define CONFIG_ADPCM_G726_ENCODER 1 #define CONFIG_ADPCM_IMA_QT_ENCODER 1 #define CONFIG_ADPCM_IMA_WAV_ENCODER 1 #define CONFIG_ADPCM_MS_ENCODER 1 #define CONFIG_ADPCM_SWF_ENCODER 1 #define CONFIG_ADPCM_YAMAHA_ENCODER 1 #define CONFIG_ASS_ENCODER 1 #define CONFIG_DVBSUB_ENCODER 1 #define CONFIG_DVDSUB_ENCODER 1 #define CONFIG_SRT_ENCODER 1 #define CONFIG_XSUB_ENCODER 1 #define CONFIG_LIBAACPLUS_ENCODER 0 #define CONFIG_LIBDIRAC_ENCODER 0 #define CONFIG_LIBFAAC_ENCODER 0 #define CONFIG_LIBGSM_ENCODER 0 #define CONFIG_LIBGSM_MS_ENCODER 0 #define CONFIG_LIBMP3LAME_ENCODER 0 #define CONFIG_LIBOPENCORE_AMRNB_ENCODER 0 #define CONFIG_LIBOPENJPEG_ENCODER 0 #define CONFIG_LIBSCHROEDINGER_ENCODER 0 #define CONFIG_LIBSPEEX_ENCODER 0 #define CONFIG_LIBTHEORA_ENCODER 0 #define CONFIG_LIBVO_AACENC_ENCODER 0 #define CONFIG_LIBVO_AMRWBENC_ENCODER 0 #define CONFIG_LIBVORBIS_ENCODER 0 #define CONFIG_LIBVPX_ENCODER 0 #define CONFIG_LIBX264_ENCODER 0 #define CONFIG_LIBX264RGB_ENCODER 0 #define CONFIG_LIBXAVS_ENCODER 0 #define CONFIG_LIBXVID_ENCODER 0 #define CONFIG_ACONVERT_FILTER 0 #define CONFIG_AFORMAT_FILTER 0 #define CONFIG_AMERGE_FILTER 0 #define CONFIG_ANULL_FILTER 0 #define CONFIG_ARESAMPLE_FILTER 0 #define CONFIG_ASHOWINFO_FILTER 0 #define CONFIG_ASPLIT_FILTER 0 #define CONFIG_ASTREAMSYNC_FILTER 0 #define CONFIG_EARWAX_FILTER 0 #define CONFIG_PAN_FILTER 0 #define CONFIG_SILENCEDETECT_FILTER 0 #define CONFIG_VOLUME_FILTER 0 #define CONFIG_ABUFFER_FILTER 0 #define CONFIG_AEVALSRC_FILTER 0 #define CONFIG_AMOVIE_FILTER 0 #define CONFIG_ANULLSRC_FILTER 0 #define CONFIG_ABUFFERSINK_FILTER 0 #define CONFIG_ANULLSINK_FILTER 0 #define CONFIG_ASS_FILTER 0 #define CONFIG_BLACKFRAME_FILTER 0 #define CONFIG_BOXBLUR_FILTER 0 #define CONFIG_COPY_FILTER 0 #define CONFIG_CROP_FILTER 0 #define CONFIG_CROPDETECT_FILTER 0 #define CONFIG_DELOGO_FILTER 0 #define CONFIG_DESHAKE_FILTER 0 #define CONFIG_DRAWBOX_FILTER 0 #define CONFIG_DRAWTEXT_FILTER 0 #define CONFIG_FADE_FILTER 0 #define CONFIG_FIELDORDER_FILTER 0 #define CONFIG_FIFO_FILTER 0 #define CONFIG_FORMAT_FILTER 0 #define CONFIG_FREI0R_FILTER 0 #define CONFIG_GRADFUN_FILTER 0 #define CONFIG_HFLIP_FILTER 0 #define CONFIG_HQDN3D_FILTER 0 #define CONFIG_LUT_FILTER 0 #define CONFIG_LUTRGB_FILTER 0 #define CONFIG_LUTYUV_FILTER 0 #define CONFIG_MP_FILTER 0 #define CONFIG_NEGATE_FILTER 0 #define CONFIG_NOFORMAT_FILTER 0 #define CONFIG_NULL_FILTER 0 #define CONFIG_OCV_FILTER 0 #define CONFIG_OVERLAY_FILTER 0 #define CONFIG_PAD_FILTER 0 #define CONFIG_PIXDESCTEST_FILTER 0 #define CONFIG_SCALE_FILTER 0 #define CONFIG_SELECT_FILTER 0 #define CONFIG_SETDAR_FILTER 0 #define CONFIG_SETPTS_FILTER 0 #define CONFIG_SETSAR_FILTER 0 #define CONFIG_SETTB_FILTER 0 #define CONFIG_SHOWINFO_FILTER 0 #define CONFIG_SLICIFY_FILTER 0 #define CONFIG_SPLIT_FILTER 0 #define CONFIG_SWAPUV_FILTER 0 #define CONFIG_THUMBNAIL_FILTER 0 #define CONFIG_TINTERLACE_FILTER 0 #define CONFIG_TRANSPOSE_FILTER 0 #define CONFIG_UNSHARP_FILTER 0 #define CONFIG_VFLIP_FILTER 0 #define CONFIG_YADIF_FILTER 0 #define CONFIG_CELLAUTO_FILTER 0 #define CONFIG_COLOR_FILTER 0 #define CONFIG_FREI0R_SRC_FILTER 0 #define CONFIG_LIFE_FILTER 0 #define CONFIG_MANDELBROT_FILTER 0 #define CONFIG_MOVIE_FILTER 0 #define CONFIG_MPTESTSRC_FILTER 0 #define CONFIG_NULLSRC_FILTER 0 #define CONFIG_RGBTESTSRC_FILTER 0 #define CONFIG_TESTSRC_FILTER 0 #define CONFIG_BUFFERSINK_FILTER 0 #define CONFIG_NULLSINK_FILTER 0 #define CONFIG_H263_VAAPI_HWACCEL 0 #define CONFIG_H264_DXVA2_HWACCEL 0 #define CONFIG_H264_VAAPI_HWACCEL 0 #define CONFIG_H264_VDA_HWACCEL 0 #define CONFIG_MPEG1_VDPAU_HWACCEL 0 #define CONFIG_MPEG2_DXVA2_HWACCEL 0 #define CONFIG_MPEG2_VAAPI_HWACCEL 0 #define CONFIG_MPEG2_VDPAU_HWACCEL 0 #define CONFIG_MPEG4_VAAPI_HWACCEL 0 #define CONFIG_VC1_DXVA2_HWACCEL 0 #define CONFIG_VC1_VAAPI_HWACCEL 0 #define CONFIG_WMV3_DXVA2_HWACCEL 0 #define CONFIG_WMV3_VAAPI_HWACCEL 0 #define CONFIG_ALSA_INDEV 0 #define CONFIG_BKTR_INDEV 0 #define CONFIG_DSHOW_INDEV 0 #define CONFIG_DV1394_INDEV 0 #define CONFIG_FBDEV_INDEV 0 #define CONFIG_JACK_INDEV 0 #define CONFIG_LAVFI_INDEV 0 #define CONFIG_OPENAL_INDEV 0 #define CONFIG_OSS_INDEV 0 #define CONFIG_PULSE_INDEV 0 #define CONFIG_SNDIO_INDEV 0 #define CONFIG_V4L2_INDEV 0 #define CONFIG_V4L_INDEV 0 #define CONFIG_VFWCAP_INDEV 0 #define CONFIG_X11_GRAB_DEVICE_INDEV 0 #define CONFIG_LIBCDIO_INDEV 0 #define CONFIG_LIBDC1394_INDEV 0 #define CONFIG_A64_MUXER 1 #define CONFIG_AC3_MUXER 1 #define CONFIG_ADTS_MUXER 1 #define CONFIG_ADX_MUXER 1 #define CONFIG_AIFF_MUXER 1 #define CONFIG_AMR_MUXER 1 #define CONFIG_ASF_MUXER 1 #define CONFIG_ASS_MUXER 1 #define CONFIG_ASF_STREAM_MUXER 1 #define CONFIG_AU_MUXER 1 #define CONFIG_AVI_MUXER 1 #define CONFIG_AVM2_MUXER 1 #define CONFIG_BIT_MUXER 1 #define CONFIG_CAF_MUXER 1 #define CONFIG_CAVSVIDEO_MUXER 1 #define CONFIG_CRC_MUXER 1 #define CONFIG_DAUD_MUXER 1 #define CONFIG_DIRAC_MUXER 1 #define CONFIG_DNXHD_MUXER 1 #define CONFIG_DTS_MUXER 1 #define CONFIG_DV_MUXER 1 #define CONFIG_EAC3_MUXER 1 #define CONFIG_FFM_MUXER 1 #define CONFIG_FFMETADATA_MUXER 1 #define CONFIG_FILMSTRIP_MUXER 1 #define CONFIG_FLAC_MUXER 1 #define CONFIG_FLV_MUXER 1 #define CONFIG_FRAMECRC_MUXER 1 #define CONFIG_FRAMEMD5_MUXER 1 #define CONFIG_G722_MUXER 1 #define CONFIG_G723_1_MUXER 1 #define CONFIG_GIF_MUXER 1 #define CONFIG_GXF_MUXER 1 #define CONFIG_H261_MUXER 1 #define CONFIG_H263_MUXER 1 #define CONFIG_H264_MUXER 1 #define CONFIG_IMAGE2_MUXER 1 #define CONFIG_IMAGE2PIPE_MUXER 1 #define CONFIG_IPOD_MUXER 1 #define CONFIG_ISMV_MUXER 1 #define CONFIG_IVF_MUXER 1 #define CONFIG_LATM_MUXER 1 #define CONFIG_M4V_MUXER 1 #define CONFIG_MD5_MUXER 1 #define CONFIG_MATROSKA_MUXER 1 #define CONFIG_MATROSKA_AUDIO_MUXER 1 #define CONFIG_MICRODVD_MUXER 1 #define CONFIG_MJPEG_MUXER 1 #define CONFIG_MLP_MUXER 1 #define CONFIG_MMF_MUXER 1 #define CONFIG_MOV_MUXER 1 #define CONFIG_MP2_MUXER 1 #define CONFIG_MP3_MUXER 1 #define CONFIG_MP4_MUXER 1 #define CONFIG_MPEG1SYSTEM_MUXER 1 #define CONFIG_MPEG1VCD_MUXER 1 #define CONFIG_MPEG1VIDEO_MUXER 1 #define CONFIG_MPEG2DVD_MUXER 1 #define CONFIG_MPEG2SVCD_MUXER 1 #define CONFIG_MPEG2VIDEO_MUXER 1 #define CONFIG_MPEG2VOB_MUXER 1 #define CONFIG_MPEGTS_MUXER 1 #define CONFIG_MPJPEG_MUXER 1 #define CONFIG_MXF_MUXER 1 #define CONFIG_MXF_D10_MUXER 1 #define CONFIG_NULL_MUXER 1 #define CONFIG_NUT_MUXER 1 #define CONFIG_OGG_MUXER 1 #define CONFIG_OMA_MUXER 1 #define CONFIG_PCM_ALAW_MUXER 1 #define CONFIG_PCM_MULAW_MUXER 1 #define CONFIG_PCM_F64BE_MUXER 1 #define CONFIG_PCM_F64LE_MUXER 1 #define CONFIG_PCM_F32BE_MUXER 1 #define CONFIG_PCM_F32LE_MUXER 1 #define CONFIG_PCM_S32BE_MUXER 1 #define CONFIG_PCM_S32LE_MUXER 1 #define CONFIG_PCM_S24BE_MUXER 1 #define CONFIG_PCM_S24LE_MUXER 1 #define CONFIG_PCM_S16BE_MUXER 1 #define CONFIG_PCM_S16LE_MUXER 1 #define CONFIG_PCM_S8_MUXER 1 #define CONFIG_PCM_U32BE_MUXER 1 #define CONFIG_PCM_U32LE_MUXER 1 #define CONFIG_PCM_U24BE_MUXER 1 #define CONFIG_PCM_U24LE_MUXER 1 #define CONFIG_PCM_U16BE_MUXER 1 #define CONFIG_PCM_U16LE_MUXER 1 #define CONFIG_PCM_U8_MUXER 1 #define CONFIG_PSP_MUXER 1 #define CONFIG_RAWVIDEO_MUXER 1 #define CONFIG_RM_MUXER 1 #define CONFIG_ROQ_MUXER 1 #define CONFIG_RSO_MUXER 1 #define CONFIG_RTP_MUXER 1 #define CONFIG_RTSP_MUXER 0 #define CONFIG_SAP_MUXER 0 #define CONFIG_SEGMENT_MUXER 1 #define CONFIG_SMJPEG_MUXER 1 #define CONFIG_SOX_MUXER 1 #define CONFIG_SPDIF_MUXER 1 #define CONFIG_SRT_MUXER 1 #define CONFIG_SWF_MUXER 1 #define CONFIG_TG2_MUXER 1 #define CONFIG_TGP_MUXER 1 #define CONFIG_MKVTIMESTAMP_V2_MUXER 1 #define CONFIG_TRUEHD_MUXER 1 #define CONFIG_VC1T_MUXER 1 #define CONFIG_VOC_MUXER 1 #define CONFIG_WAV_MUXER 1 #define CONFIG_WEBM_MUXER 1 #define CONFIG_WTV_MUXER 1 #define CONFIG_YUV4MPEGPIPE_MUXER 1 #define CONFIG_LIBNUT_MUXER 0 #define CONFIG_ALSA_OUTDEV 0 #define CONFIG_OSS_OUTDEV 0 #define CONFIG_SDL_OUTDEV 0 #define CONFIG_SNDIO_OUTDEV 0 #define CONFIG_AAC_PARSER 1 #define CONFIG_AAC_LATM_PARSER 1 #define CONFIG_AC3_PARSER 1 #define CONFIG_ADX_PARSER 1 #define CONFIG_CAVSVIDEO_PARSER 1 #define CONFIG_DCA_PARSER 1 #define CONFIG_DIRAC_PARSER 1 #define CONFIG_DNXHD_PARSER 1 #define CONFIG_DVBSUB_PARSER 1 #define CONFIG_DVDSUB_PARSER 1 #define CONFIG_FLAC_PARSER 1 #define CONFIG_GSM_PARSER 1 #define CONFIG_H261_PARSER 1 #define CONFIG_H263_PARSER 1 #define CONFIG_H264_PARSER 1 #define CONFIG_MJPEG_PARSER 1 #define CONFIG_MLP_PARSER 1 #define CONFIG_MPEG4VIDEO_PARSER 1 #define CONFIG_MPEGAUDIO_PARSER 1 #define CONFIG_MPEGVIDEO_PARSER 1 #define CONFIG_PNM_PARSER 1 #define CONFIG_RV30_PARSER 1 #define CONFIG_RV40_PARSER 1 #define CONFIG_VC1_PARSER 1 #define CONFIG_VP3_PARSER 1 #define CONFIG_VP8_PARSER 1 #define CONFIG_APPLEHTTP_PROTOCOL 1 #define CONFIG_CACHE_PROTOCOL 1 #define CONFIG_CONCAT_PROTOCOL 1 #define CONFIG_CRYPTO_PROTOCOL 1 #define CONFIG_FILE_PROTOCOL 1 #define CONFIG_GOPHER_PROTOCOL 0 #define CONFIG_HTTP_PROTOCOL 0 #define CONFIG_HTTPPROXY_PROTOCOL 0 #define CONFIG_HTTPS_PROTOCOL 0 #define CONFIG_MMSH_PROTOCOL 0 #define CONFIG_MMST_PROTOCOL 0 #define CONFIG_MD5_PROTOCOL 1 #define CONFIG_PIPE_PROTOCOL 1 #define CONFIG_RTMP_PROTOCOL 0 #define CONFIG_RTMPT_PROTOCOL 1 #define CONFIG_RTMPE_PROTOCOL 1 #define CONFIG_RTMPTE_PROTOCOL 1 #define CONFIG_RTMPS_PROTOCOL 1 #define CONFIG_RTP_PROTOCOL 0 #define CONFIG_TCP_PROTOCOL 0 #define CONFIG_TLS_PROTOCOL 0 #define CONFIG_UDP_PROTOCOL 0 #endif /* FFMPEG_CONFIG_H */
7333c364be2f92a1d0cd6e9d4c9905e116106a24
ea08eb5963712763c09308048375f704e99611d1
/deleteDuplicates_82.c
5a3b77a1fd53501afe52ea80117484869b8e2e6c
[ "MIT" ]
permissive
metouch/algorithm
26e2d4cce2b181547946a2c6ce1279256ad10e5f
8df946d1c685854e9eb01dc62a7d819ce698fc63
refs/heads/master
2023-06-16T01:12:16.531837
2023-06-05T11:25:31
2023-06-05T11:25:31
196,372,469
0
0
null
null
null
null
UTF-8
C
false
false
3,961
c
deleteDuplicates_82.c
// // Created by me_touch on 20-11-9. // #include <stdio.h> #include <stdlib.h> /* * 给定一个排序链表,删除所有含有重复数字的节点,只保留原始链表中 没有重复出现 的数字。 示例 1: 输入: 1->2->3->3->4->4->5 输出: 1->2->5 示例 2: 输入: 1->1->1->2->3 输出: 2->3 */ struct ListNode { int val; struct ListNode *next; }; struct ListNode *deleteDuplicates2(struct ListNode *head) { if (head == NULL) { return NULL; } struct ListNode *next = head->next; char a = 0; while (next != NULL && next->val == head->val) { struct ListNode *temp = next; next = next->next; head->next = next; free(temp); a = 1; } if (a == 0) { head->next = deleteDuplicates2(next); } else { head = deleteDuplicates2(next); } return head; } struct ListNode *deleteDuplicates1(struct ListNode *head) { if (head == NULL) { return NULL; } struct ListNode *f = NULL; struct ListNode *p = head; struct ListNode *q = p->next; struct ListNode *r = NULL; char count = 0; while (q != NULL) { if (q->val == p->val) { free(p); p = q; q = q->next; count = 1; } else { if (count == 0) { if (f == NULL) { f = p; r = f; } else { r->next = p; r = r->next; } } else { free(p); } p = q; q = q->next; count = 0; } } if (count == 0) { if (f == NULL) { f = p; } else { r->next = p; } } else { free(p); if (r != NULL) { r->next = NULL; } } return f; } struct ListNode *deleteDuplicates(struct ListNode *head) { struct ListNode* first = NULL; struct ListNode* below = NULL; struct ListNode* p = head; char count = 0; while (p != NULL) { struct ListNode* next = p->next; while (next != NULL && next->val == p->val) { struct ListNode* temp = next; next = next->next; free(temp); count = 1; } if (count == 0) { if (first == NULL) { first = p; below = first; } else { below->next = p; below = below->next; } } else { free(p); } p = next; count = 0; } if (below != NULL) { below->next = NULL; } return first; } int main(int argc, char *argv[]) { struct ListNode *l1 = (struct ListNode *) malloc(sizeof(struct ListNode)); l1->val = 1; struct ListNode *n1 = (struct ListNode *) malloc(sizeof(struct ListNode)); n1->val = 1; l1->next = n1; n1->next = NULL; struct ListNode *n2 = (struct ListNode *) malloc(sizeof(struct ListNode)); n2->val = 2; n1->next = n2; n2->next = NULL; struct ListNode *n3 = (struct ListNode *) malloc(sizeof(struct ListNode)); n3->val = 3; n2->next = n3; struct ListNode *n4 = (struct ListNode *) malloc(sizeof(struct ListNode)); n4->val = 4; n3->next = n4; struct ListNode *n5 = (struct ListNode *) malloc(sizeof(struct ListNode)); n5->val = 4; n4->next = n5; struct ListNode *n6 = (struct ListNode *) malloc(sizeof(struct ListNode)); n6->val = 4; n5->next = n6; n6->next = NULL; struct ListNode *p = deleteDuplicates(l1); while (p != NULL) { printf("%d", p->val); p = p->next; if (p != NULL) { printf(" -> "); } } }
d1007bc78ac71f46434932aab826888432e8fffd
03e2b1c70971498dc27a60ad3fc5cb51f243b33b
/lemin_src/ft_13_pattern_bad_command.c
2b01235b9d8b008770b4110079b693d371d4c8b5
[]
no_license
amkv/lem-in
96bc4fca5e7a02839d5e876e22879e4e7bf3db85
6aaf7dfd0f28d6b31af769e30b0b735266366123
refs/heads/master
2021-01-19T10:26:44.104487
2017-04-10T23:15:01
2017-04-10T23:15:01
87,865,982
1
0
null
null
null
null
UTF-8
C
false
false
1,619
c
ft_13_pattern_bad_command.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_13_pattern_bad_command.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: akalmyko <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/28 19:55:11 by akalmyko #+# #+# */ /* Updated: 2017/02/28 19:55:13 by akalmyko ### ########.fr */ /* */ /* ************************************************************************** */ #include "lheader.h" static int ft_is_bad_command_pattern(t_lem *lem) { char *copy; copy = lem->map_string; if (ft_strlen(copy) < 5) return (TRUE); if (*copy == '#' && *(copy + 1) == '#') { copy = (copy + 2); if (ft_strcmp(copy, "end") == EQUAL) return (FALSE); else if (ft_strcmp(copy, "end") == EQUAL) return (FALSE); else return (TRUE); } else return (FALSE); } static void ft_set_bad_command_error(t_lem *lem) { lem->b_err = TRUE; } void ft_check_bad_command(t_lem *lem) { if (lem->namei != NEUTRAL) return (ft_set_bad_command_error(lem)); if (ft_is_bad_command_pattern(lem) == FALSE) return (ft_set_bad_command_error(lem)); ft_set_pattern_name(lem, BADCOM, "not a command"); }
4bcd3a9c9ff9349a757443d6a3458ff1019af953
096d674366c1114f98d21b76fbc49664f6dd20c6
/source/anyka_ipc/app/src/anyka_config.c
76931a728b67abc0bf969ba99441767ebeece761
[]
no_license
github188/SmartCamera
09ff86109420cb0126dd99ed0ed4d59e13a32a82
a5bece938ff0dc019ead3d62fa6adefbc8c497fe
refs/heads/master
2020-04-28T10:24:22.890431
2018-04-28T10:08:52
2018-04-28T10:08:52
175,199,992
0
1
null
2019-03-12T11:48:52
2019-03-12T11:48:52
null
UTF-8
C
false
false
50,569
c
anyka_config.c
#include "common.h" #include "anyka_config.h" #include "PTZControl.h" #define BUF_SIZE (100) /* 各种系统配置文件路径、目前为同一个 */ #define CONFIG_ANYKA_FILE_NAME "/etc/jffs2/anyka_cfg.ini" #define CONFIG_VIDEO_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_ALARM_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_CAMERA_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_CLOUD_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_ONVIF_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_ETH_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_RECORD_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_USER_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_WIFI_FILE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_FTP_UPDATE_NAME CONFIG_ANYKA_FILE_NAME #define CONFIG_PTZ_UNHIT_NAME "/tmp/ak_sys_start_flag" /* 定义各种设置句柄 */ system_user_info *psystem_user_info = NULL; video_setting *pvideo_default_config = NULL; video_record_setting *psys_record_plan_info = NULL; Psystem_alarm_set_info psys_alarm_info = NULL; Psystem_cloud_set_info psys_cloud_info = NULL; Psystem_onvif_set_info psys_onvif_info = NULL; Psystem_net_set_info psys_net_info = NULL; Psystem_wifi_set_info psys_wifi_info = NULL; Pcamera_disp_setting psys_camera_info = NULL; system_ftp_update_info *psys_ftp_update_info = NULL; /** * @brief anyka_init_ftp_update_info * 初始化FTP升级配置 * @date 2015/3 * @param: system_ftp_update_info *psys_ftp_update_info * @return int * @retval */ int anyka_init_ftp_update_info(system_ftp_update_info *psys_ftp_update_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_FTP_UPDATE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return -1; } /*** ??ȡftp ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "ftp_info", "ftp_server", value, "121.14.38.22"); strcpy(psys_ftp_update_info->ftp_server, value); anyka_config_get_title(config_handle, "ftp_info", "user_name", value, "anyka_ipc"); strcpy(psys_ftp_update_info->user_name, value); anyka_config_get_title(config_handle, "ftp_info", "ftp_pwd", value, "Anyka_Ipc"); strcpy(psys_ftp_update_info->password, value); anyka_config_get_title(config_handle, "ftp_info", "ftp_file_path", value, "IntCamPTZ/IntCam-A/"); strcpy(psys_ftp_update_info->ftp_file_path, value); anyka_config_get_title(config_handle, "ftp_info", "update_start_time", value, "2"); psys_ftp_update_info->update_start_time = atoi(value); anyka_config_get_title(config_handle, "ftp_info", "update_end_time", value, "4"); psys_ftp_update_info->update_end_time = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_FTP_UPDATE_NAME, config_handle); return 0; } /** * @brief anyka_get_sys_video_setting * 获取系统视频设置信息 * @date 2015/3 * @param: void * @return video_setting * * @retval */ video_setting *anyka_get_sys_video_setting(void) { return pvideo_default_config; } /** * @brief anyka_get_record_plan 获取计划录像句柄 * @date 2015/3 * @param: void * @return video_record_setting * * @retval */ video_record_setting *anyka_get_record_plan(void) { return psys_record_plan_info; } /** * @brief anyka_init_video_param 初始化视频编码参数 * @date 2015/3 * @param: video_setting *para * @return int * @retval */ int anyka_init_video_param(video_setting *para) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_VIDEO_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡvideo ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "video", "minqp", value, "10"); para->minQp = atoi(value); anyka_config_get_title(config_handle, "video", "maxqp", value, "36"); para->maxQp = atoi(value); anyka_config_get_title(config_handle, "video", "v720pfps", value, "10"); para->V720Pfps = atoi(value); anyka_config_get_title(config_handle, "video", "v720pminkbps", value, "250"); para->V720Pminkbps = atoi(value); anyka_config_get_title(config_handle, "video", "v720pmaxkbps", value, "500"); para->V720Pmaxkbps = atoi(value); anyka_config_get_title(config_handle, "video", "save_cyc_flag", value, "1"); para->save_cyc_flag = atoi(value); anyka_config_get_title(config_handle, "video", "savefilefps", value, "25"); para->savefilefps = atoi(value); anyka_config_get_title(config_handle, "video", "savefilekbps", value, "1024"); para->savefilekbps = atoi(value); anyka_config_get_title(config_handle, "video", "recpath", value, "/mnt/CYC_DV/"); strcpy(para->recpath , value); anyka_config_get_title(config_handle, "video", "vgapfps", value, "15"); para->VGAPfps = atoi(value); anyka_config_get_title(config_handle, "video", "vgaminkbps", value, "250"); para->VGAminkbps = atoi(value); anyka_config_get_title(config_handle, "video", "vgamaxkbps", value, "500"); para->VGAmaxkbps = atoi(value); anyka_config_get_title(config_handle, "video", "goplen", value, "2"); para->gopLen = atoi(value); anyka_config_get_title(config_handle, "video", "quality", value, "80"); para->quality = atoi(value); anyka_config_get_title(config_handle, "video", "pic_ch", value, "1"); para->pic_ch = atoi(value); anyka_config_get_title(config_handle, "video", "video_mode", value, "0"); para->video_mode = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_VIDEO_FILE_NAME, config_handle); return 0; } /** * @brief anyka_init_sys_alarm_status 初始化侦测配置信息 * @date 2015/3 * @param: Psystem_alarm_set_info palarm_info net_info * @return uint8 * @retval */ uint8 anyka_init_sys_alarm_status(Psystem_alarm_set_info palarm_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_ALARM_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡalarm ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "alarm", "motion_detection", value, "3"); palarm_info->motion_detection = atoi(value); anyka_config_get_title(config_handle, "alarm", "motion_detection_1", value, "450"); palarm_info->motion_detection_1 = atoi(value); anyka_config_get_title(config_handle, "alarm", "motion_detection_2", value, "300"); palarm_info->motion_detection_2 = atoi(value); anyka_config_get_title(config_handle, "alarm", "motion_detection_3", value, "200"); palarm_info->motion_detection_3 = atoi(value); anyka_config_get_title(config_handle, "alarm", "opensound_detection", value, "0"); palarm_info->opensound_detection = atoi(value); anyka_config_get_title(config_handle, "alarm", "opensound_detection_1", value, "10"); palarm_info->opensound_detection_1 = atoi(value); anyka_config_get_title(config_handle, "alarm", "opensound_detection_2", value, "20"); palarm_info->opensound_detection_2 = atoi(value); anyka_config_get_title(config_handle, "alarm", "opensound_detection_3", value, "30"); palarm_info->opensound_detection_3 = atoi(value); anyka_config_get_title(config_handle, "alarm", "openi2o_detection", value, "0"); palarm_info->openi2o_detection = atoi(value); anyka_config_get_title(config_handle, "alarm", "smoke_detection", value, "0"); palarm_info->smoke_detection = atoi(value); anyka_config_get_title(config_handle, "alarm", "shadow_detection", value, "0"); palarm_info->shadow_detection = atoi(value); anyka_config_get_title(config_handle, "alarm", "other_detection", value, "0"); palarm_info->other_detection = atoi(value); anyka_config_get_title(config_handle, "alarm", "alarm_send_type", value, "0"); palarm_info->alarm_send_type = atoi(value); anyka_config_get_title(config_handle, "alarm", "alarm_interval_time", value, "500"); palarm_info->alarm_interval_time = atoi(value); anyka_config_get_title(config_handle, "alarm", "alarm_default_record_dir", value, "/mnt/alarm_record_dir/"); strcpy(palarm_info->alarm_default_record_dir, value); anyka_config_get_title(config_handle, "alarm", "alarm_move_over_time", value, "60"); palarm_info->alarm_move_over_time = atoi(value); anyka_config_get_title(config_handle, "alarm", "alarm_record_time", value, "300"); palarm_info->alarm_record_time = atoi(value); anyka_config_get_title(config_handle, "alarm", "alarm_send_msg_time", value, "60"); palarm_info->alarm_send_msg_time = atoi(value); anyka_config_get_title(config_handle, "alarm", "alarm_save_record", value, "0"); palarm_info->alarm_save_record = atoi(value); anyka_config_get_title(config_handle, "alarm", "motion_size_x", value, "4"); palarm_info->motion_size_x = atoi(value); anyka_config_get_title(config_handle, "alarm", "motion_size_y", value, "4"); palarm_info->motion_size_y = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_ALARM_FILE_NAME, config_handle); return 0; } /** * @brief anyka_init_sys_net_status 初始化有线网配置信息 * @date 2015/3 * @param: Psystem_net_set_info net_info * @return uint8 * @retval */ uint8 anyka_init_sys_net_status(Psystem_net_set_info net_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_ETH_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡethernet ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "ethernet", "dhcp", value, "1"); net_info->dhcp = atoi(value); anyka_config_get_title(config_handle, "ethernet", "ipaddr", value, "192.168.1.88"); strcpy(net_info->ipaddr, value); anyka_config_get_title(config_handle, "ethernet", "netmask", value, "255.255.0.0"); strcpy(net_info->netmask, value); anyka_config_get_title(config_handle, "ethernet", "gateway", value, "192.168.1.1"); strcpy(net_info->gateway, value); anyka_config_get_title(config_handle, "ethernet", "firstdns", value, "8.8.8.8"); strcpy(net_info->firstdns, value); anyka_config_get_title(config_handle, "ethernet", "backdns", value, "108.108.108.108"); strcpy(net_info->backdns, value); /*** free resource ***/ anyka_config_destroy(CONFIG_ETH_FILE_NAME, config_handle); return 0; } /** * @brief anyka_save_sys_net_info ????ϵͳ??????Ϣ * @date 2015/3 * @param: void * @return uint8 * @retval ?ɹ?0?? ʧ??1 */ uint8 anyka_save_sys_net_info() { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_ETH_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ????ethernet ?εĸ?????Ϣ ***/ sprintf(value,"%d", psys_net_info->dhcp ); anyka_config_set_title(config_handle, "ethernet", "dhcp", value); sprintf(value,"%s", psys_net_info->ipaddr ); anyka_config_set_title(config_handle, "ethernet", "ipaddr", value); sprintf(value,"%s", psys_net_info->netmask ); anyka_config_set_title(config_handle, "ethernet", "netmask", value); sprintf(value,"%s", psys_net_info->gateway ); anyka_config_set_title(config_handle, "ethernet", "gateway", value); sprintf(value,"%s", psys_net_info->firstdns ); anyka_config_set_title(config_handle, "ethernet", "firstdns", value); sprintf(value,"%s", psys_net_info->backdns ); anyka_config_set_title(config_handle, "ethernet", "backdns", value); /*** free resource ***/ anyka_config_destroy(CONFIG_ETH_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_net_info 获取系统实时IP/NM/GW * @date 2015/3 * @param: void * @return void * @retval */ static void anyka_get_net_info(void) { system("ifconfig eth0 >> /tmp/eth.txt"); //save ethnet info int eth0_file; char *net_info = (char *)malloc(4096), *find_start, *find_end; int i = 0; char gateway[64]={0}; if(net_info == NULL) { return; } eth0_file = open("/tmp/eth.txt", O_RDWR); //open the info file if(eth0_file < 0) { free(net_info); return ; } memset(net_info, 0, 4096); read(eth0_file, net_info, 4096); if(NULL != (find_start = strstr(net_info, "inet addr:"))) //find lable { find_start += strlen("inet addr:"); find_end= strstr(find_start , " "); /** get info we need **/ memset(psys_net_info->ipaddr, 0, sizeof(psys_net_info->ipaddr)); memcpy(psys_net_info->ipaddr, find_start, (unsigned long)find_end - (unsigned long)find_start); } if(NULL != (find_start = strstr(net_info, "Mask:"))) { find_start += strlen("Mask:"); //find lable find_end= strstr(find_start , "\x0a"); /** get info we need **/ memset(psys_net_info->netmask, 0, sizeof(psys_net_info->netmask)); memcpy(psys_net_info->netmask, find_start, (unsigned long)find_end - (unsigned long)find_start); } close(eth0_file); free(net_info); system("rm -rf /tmp/eth.txt"); //remove the info file do_syscmd("route | grep 'default' | awk '{print $2}'", gateway); while(gateway[i]) { if (gateway[i]=='\n' || gateway[i]=='\r' || gateway[i]==' ') gateway[i] = '\0'; i++; } memset(psys_net_info->gateway, 0, sizeof(psys_net_info->gateway)); strcpy(psys_net_info->gateway, gateway); } /** * @brief anyka_get_sys_net_setting 获取系统网络配置信息 * @date 2015/3 * @param: void * @return Psystem_net_set_info * @retval */ Psystem_net_set_info anyka_get_sys_net_setting(void) { if(psys_net_info->dhcp == 1) { anyka_get_net_info(); } return psys_net_info; } /** * @brief anyka_set_sys_net_setting * 设置系统网络配置信息 * @date 2015/3 * @param: Psystem_net_set_info user * @return void * @retval */ void anyka_set_sys_net_setting(Psystem_net_set_info user) { memcpy(psys_net_info, user, sizeof(system_net_set_info)); anyka_save_sys_net_info(); } /** * @brief anyka_save_sys_wifi_info ????wifi??Ϣ * @date 2015/3 * @param: void * @return uint8 * @retval ?ɹ?0?? ʧ??1 */ uint8 anyka_save_sys_wifi_info(void) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_WIFI_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ????wireless ?εĸ?????Ϣ ***/ //the ssid save to /tmp/wireless/ //sprintf(value,"%s", psys_wifi_info->ssid ); //anyka_config_set_title(config_handle, "wireless", "ssid", value); sprintf(value,"%s", psys_wifi_info->passwd ); anyka_config_set_title(config_handle, "wireless", "password", value); /*** free resource ***/ anyka_config_destroy(CONFIG_WIFI_FILE_NAME, config_handle); return 0; } /** * @brief anyka_init_sys_wifi_status ??ʼ??wifi״̬ * @date 2015/3 * @param: Psystem_wifi_set_info net_info ָ??Ҫ???õ?״̬?ṹ??ָ?? * @return uint8 * @retval ?ɹ?0?? ʧ??1 */ uint8 anyka_init_sys_wifi_status(Psystem_wifi_set_info net_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_WIFI_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡsoftap ?κ?wireless ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "softap", "s_ssid", value, "AKIPC_XXX"); strcpy(net_info->ssid, value); anyka_config_get_title(config_handle, "softap", "s_password", value, ""); strcpy(net_info->ssid, value); anyka_config_get_title(config_handle, "wireless", "ssid", value, ""); strcpy(net_info->ssid, value); anyka_config_get_title(config_handle, "wireless", "mode", value, "Infra"); strcpy(net_info->mode, value); anyka_config_get_title(config_handle, "wireless", "password", value, "123456789"); strcpy(net_info->passwd, value); anyka_config_get_title(config_handle, "wireless", "security", value, "WPA/WPA2 PSK"); if(strstr(value, "WPA")) { net_info->enctype = WIFI_ENCTYPE_WPA2_TKIP; } else if(strstr(value, "WEP")) { net_info->enctype = WIFI_ENCTYPE_WEP; } else { net_info->enctype = WIFI_ENCTYPE_NONE; } /*** free resource ***/ anyka_config_destroy(CONFIG_WIFI_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_sys_wifi_setting 获取系统WiFi配置信息 * @date 2015/3 * @param: void * @return Psystem_wifi_set_info * @retval */ Psystem_wifi_set_info anyka_get_sys_wifi_setting(void) { return psys_wifi_info; } /** * @brief anyka_set_sys_wifi_setting 设置系统WiFi信息 * @date 2015/3 * @param: Psystem_wifi_set_info pointer * @return void * @retval */ void anyka_set_sys_wifi_setting(Psystem_wifi_set_info user) { memcpy(psys_wifi_info, user, sizeof(system_wifi_set_info)); anyka_save_sys_wifi_info(); } /** * @brief anyka_get_sys_onvif_setting ??ȡϵͳonvif ??????Ϣ * @date 2015/3 * @param: void * @return Psystem_onvif_set_info * @retval ָ?????õ???Ϣ?ṹ??ָ?? */ uint8 anyka_init_sys_onvif_status(Psystem_onvif_set_info onvif) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_ONVIF_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡonvif ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "onvif", "fps1", value, "25"); onvif->fps1 = atoi(value); anyka_config_get_title(config_handle, "onvif", "kbps1", value, "2048"); onvif->kbps1 = atoi(value); anyka_config_get_title(config_handle, "onvif", "quality1", value, "50"); onvif->quality1 = atoi(value); anyka_config_get_title(config_handle, "onvif", "fps2", value, "25"); onvif->fps2 = atoi(value); anyka_config_get_title(config_handle, "onvif", "kbps2", value, "800"); onvif->kbps2 = atoi(value); anyka_config_get_title(config_handle, "onvif", "quality2", value, "50"); onvif->quality2 = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_ONVIF_FILE_NAME, config_handle); return 0; } /** * @brief anyka_save_sys_onvif_info ????ϵͳonvif ??????Ϣ * @date 2015/3 * @param: void * @return uint8 * @retval ?ɹ?0?? ʧ??1 */ uint8 anyka_save_sys_onvif_info() { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_ONVIF_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ????onvif ?εĸ?????Ϣ ***/ sprintf(value, "%d", psys_onvif_info->fps1 ); anyka_config_set_title(config_handle, "onvif", "fps1", value); sprintf(value, "%d", psys_onvif_info->kbps1); anyka_config_set_title(config_handle, "onvif", "kbps1", value); sprintf(value, "%d", psys_onvif_info->quality1); anyka_config_set_title(config_handle, "onvif", "quality1", value); sprintf(value, "%d", psys_onvif_info->fps2 ); anyka_config_set_title(config_handle, "onvif", "fps2", value); sprintf(value, "%d", psys_onvif_info->kbps2); anyka_config_set_title(config_handle, "onvif", "kbps2", value); sprintf(value, "%d", psys_onvif_info->quality2); anyka_config_set_title(config_handle, "onvif", "quality2", value); /*** free resource ***/ anyka_config_destroy(CONFIG_ONVIF_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_sys_onvif_setting 获取ONVIF 平台配置信息 * @date 2015/3 * @param: void * @return Psystem_onvif_set_info * @retval */ Psystem_onvif_set_info anyka_get_sys_onvif_setting(void ) { return psys_onvif_info; } /** * @brief anyka_set_sys_onvif_setting * 获取ONVIF 平台配置信息 * @date 2015/3 * @param: Psystem_onvif_set_info user * @return void * @retval */ void anyka_set_sys_onvif_setting(Psystem_onvif_set_info user) { memcpy(psys_onvif_info, user, sizeof(system_onvif_set_info)); anyka_save_sys_onvif_info(); } /** * @brief anyka_init_sys_cloud_setting 初始化系统云平台配置信息 * @date 2015/3 * @param: Psystem_cloud_set_info cloud * @return Psystem_cloud_set_info * @retval */ int anyka_init_sys_cloud_setting(Psystem_cloud_set_info cloud) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_CLOUD_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡcloud ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ #ifdef CONFIG_ONVIF_SUPPORT anyka_config_get_title(config_handle, "cloud", "onvif", value, "1"); #else anyka_config_get_title(config_handle, "cloud", "onvif", value, "0"); #endif cloud->onvif = atoi(value); #ifdef CONFIG_DANA_SUPPORT anyka_config_get_title(config_handle, "cloud", "dana", value, "1"); #else anyka_config_get_title(config_handle, "cloud", "dana", value, "0"); #endif cloud->dana = atoi(value); anyka_config_get_title(config_handle, "cloud", "tutk", value, "0"); cloud->tutk = atoi(value); #ifdef CONFIG_TENCENT_SUPPORT anyka_config_get_title(config_handle, "cloud", "tencent", value, "1"); #else anyka_config_get_title(config_handle, "cloud", "tencent", value, "0"); #endif cloud->tencent= atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_CLOUD_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_sys_cloud_setting * 获取系统云平台配置信息 * @date 2015/3 * @param: void * @return Psystem_cloud_set_info * @retval */ Psystem_cloud_set_info anyka_get_sys_cloud_setting(void) { return psys_cloud_info; } /** * @brief anyka_sys_alarm_info * 获取侦测信息句柄 * @date 2015/3 * @param: void * @return Psystem_alarm_set_info * @retval */ Psystem_alarm_set_info anyka_sys_alarm_info(void) { return psys_alarm_info; } /** * @brief anyka_set_sys_alarm_status 设置侦测信息 * @date 2015/3 * @param: void * @return uint8 * @retval */ uint8 anyka_set_sys_alarm_status(void) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_ALARM_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /***????alarm ?εĸ?????Ϣ ***/ sprintf(value,"%d", psys_alarm_info->motion_detection ); anyka_config_set_title(config_handle, "alarm", "motion_detection", value); sprintf(value,"%d", psys_alarm_info->motion_detection_1 ); anyka_config_set_title(config_handle, "alarm", "motion_detection_1", value); sprintf(value,"%d", psys_alarm_info->motion_detection_2 ); anyka_config_set_title(config_handle, "alarm", "motion_detection_2", value); sprintf(value,"%d", psys_alarm_info->motion_detection_3 ); anyka_config_set_title(config_handle, "alarm", "motion_detection_3", value); sprintf(value,"%d", psys_alarm_info->opensound_detection ); anyka_config_set_title(config_handle, "alarm", "opensound_detection", value); sprintf(value,"%d", psys_alarm_info->opensound_detection_1 ); anyka_config_set_title(config_handle, "alarm", "opensound_detection_1", value); sprintf(value,"%d", psys_alarm_info->opensound_detection_2 ); anyka_config_set_title(config_handle, "alarm", "opensound_detection_2", value); sprintf(value,"%d", psys_alarm_info->opensound_detection_3 ); anyka_config_set_title(config_handle, "alarm", "opensound_detection_3", value); sprintf(value,"%d", psys_alarm_info->openi2o_detection ); anyka_config_set_title(config_handle, "alarm", "openi2o_detection", value); sprintf(value,"%d", psys_alarm_info->shadow_detection ); anyka_config_set_title(config_handle, "alarm", "shadow_detection", value); sprintf(value,"%d", psys_alarm_info->shadow_detection ); anyka_config_set_title(config_handle, "alarm", "shadow_detection", value); sprintf(value,"%d", psys_alarm_info->other_detection ); anyka_config_set_title(config_handle, "alarm", "other_detection", value); sprintf(value,"%d", psys_alarm_info->alarm_send_type ); anyka_config_set_title(config_handle, "alarm", "alarm_send_type", value); /*** free resource ***/ anyka_config_destroy(CONFIG_ALARM_FILE_NAME, config_handle); return 0; } /** * @brief anyka_init_record_plan_info 初始化计划录像参数 * @date 2015/3 * @param: video_record_setting *psys_record_plan_info * @return int * @retval */ int anyka_init_record_plan_info(video_record_setting *psys_record_plan_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_RECORD_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /***??ȡrecord ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "record", "video_index", value, "1"); psys_record_plan_info->video_index = atoi(value); anyka_config_get_title(config_handle, "record", "record_start_run1", value, "0"); psys_record_plan_info->record_plan[0].active = atoi(value); anyka_config_get_title(config_handle, "record", "record_start_time1", value, "0"); psys_record_plan_info->record_plan[0].start_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_end_time1", value, "86399"); psys_record_plan_info->record_plan[0].end_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_cyc1", value, "127"); psys_record_plan_info->record_plan[0].day_flag = atoi(value); anyka_config_get_title(config_handle, "record", "record_time", value, "5"); psys_record_plan_info->record_plan[0].record_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_start_run2", value, "0"); psys_record_plan_info->record_plan[1].active = atoi(value); anyka_config_get_title(config_handle, "record", "record_start_time2", value, "68760"); psys_record_plan_info->record_plan[1].start_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_end_time2", value, "83160"); psys_record_plan_info->record_plan[1].end_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_cyc2", value, "1"); psys_record_plan_info->record_plan[1].day_flag = atoi(value); anyka_config_get_title(config_handle, "record", "record_start_run3", value, "0"); psys_record_plan_info->record_plan[2].active = atoi(value); anyka_config_get_title(config_handle, "record", "record_start_time3", value, "0"); psys_record_plan_info->record_plan[2].start_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_end_time3", value, "33780"); psys_record_plan_info->record_plan[2].end_time = atoi(value); anyka_config_get_title(config_handle, "record", "record_cyc3", value, "16"); psys_record_plan_info->record_plan[2].day_flag = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_RECORD_FILE_NAME, config_handle); return 0; } /** * @brief anyka_set_record_plan_info 设置计划录像参数 * @date 2015/3 * @param: video_record_setting *psys_record_plan_info * @return int * @retval */ int anyka_set_record_plan_info(video_record_setting *psys_record_plan_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_RECORD_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /***????record ?εĸ?????Ϣ ***/ sprintf(value, "%d", psys_record_plan_info->video_index ); anyka_config_set_title(config_handle, "record", "video_index", value); sprintf(value, "%d", psys_record_plan_info->record_plan[0].active ); anyka_config_set_title(config_handle, "record", "record_start_run1", value); sprintf(value, "%d", psys_record_plan_info->record_plan[0].start_time); anyka_config_set_title(config_handle, "record", "record_start_time1", value); sprintf(value, "%d", psys_record_plan_info->record_plan[0].end_time); anyka_config_set_title(config_handle, "record", "record_end_time1", value); sprintf(value, "%d", psys_record_plan_info->record_plan[0].day_flag); anyka_config_set_title(config_handle, "record", "record_cyc1", value); sprintf(value, "%d", psys_record_plan_info->record_plan[1].active ); anyka_config_set_title(config_handle, "record", "record_start_run2", value); sprintf(value, "%d", psys_record_plan_info->record_plan[1].start_time); anyka_config_set_title(config_handle, "record", "record_start_time2", value); sprintf(value, "%d", psys_record_plan_info->record_plan[1].end_time); anyka_config_set_title(config_handle, "record", "record_end_time2", value); sprintf(value, "%d", psys_record_plan_info->record_plan[1].day_flag); anyka_config_set_title(config_handle, "record", "record_cyc2", value); sprintf(value, "%d", psys_record_plan_info->record_plan[2].active ); anyka_config_set_title(config_handle, "record", "record_start_run3", value); sprintf(value, "%d", psys_record_plan_info->record_plan[2].start_time); anyka_config_set_title(config_handle, "record", "record_start_time3", value); sprintf(value, "%d", psys_record_plan_info->record_plan[2].end_time); anyka_config_set_title(config_handle, "record", "record_end_time3", value); sprintf(value, "%d", psys_record_plan_info->record_plan[2].day_flag); anyka_config_set_title(config_handle, "record", "record_cyc3", value); /*** free resource ***/ anyka_config_destroy(CONFIG_RECORD_FILE_NAME, config_handle); return 0; } /** * @brief anyka_init_camera_info * 初始化摄像头采集/显示参数 * @date 2015/3 * @param: Pcamera_disp_setting pcamera_disp_setting * @return int * @retval */ int anyka_init_camera_info(Pcamera_disp_setting pcamera_disp_setting) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_CAMERA_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡcamera ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "camera", "width", value, "1280"); pcamera_disp_setting->width = atoi(value); anyka_config_get_title(config_handle, "camera", "height", value, "720"); pcamera_disp_setting->height = atoi(value); anyka_config_get_title(config_handle, "camera", "osd_position", value, "1"); pcamera_disp_setting->osd_position = atoi(value); anyka_config_get_title(config_handle, "camera", "osd_switch", value, "1"); pcamera_disp_setting->osd_switch = atoi(value); anyka_config_get_title(config_handle, "camera", "osd_name", value, "\xe5\x8a\x9e\xe5\x85\xac\xe5\xae\xa4"); strcpy(pcamera_disp_setting->osd_name, value); pcamera_disp_setting->osd_unicode_name_len = font_utf8_to_unicode((char *)pcamera_disp_setting->osd_name, (char *)pcamera_disp_setting->osd_unicode_name); pcamera_disp_setting->osd_unicode_name_len >>= 1; font_lib_init(pcamera_disp_setting->osd_unicode_name, pcamera_disp_setting->osd_unicode_name_len); anyka_print("anyka_init_camera_info: %d, %s\n", pcamera_disp_setting->osd_unicode_name_len, pcamera_disp_setting->osd_name); anyka_config_get_title(config_handle, "camera", "time_switch", value, "1"); pcamera_disp_setting->time_switch = atoi(value); anyka_config_get_title(config_handle, "camera", "date_format", value, "1"); pcamera_disp_setting->date_format = atoi(value); anyka_config_get_title(config_handle, "camera", "hour_format", value, "1"); pcamera_disp_setting->hour_format = atoi(value); anyka_config_get_title(config_handle, "camera", "week_format", value, "1"); pcamera_disp_setting->week_format = atoi(value); anyka_config_get_title(config_handle, "camera", "ircut_mode", value, "0"); pcamera_disp_setting->ircut_mode = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_CAMERA_FILE_NAME, config_handle); return 0; } /** * @brief anyka_set_camera_info * 设置摄像头采集/显示参数 * @date 2015/3 * @param: Pcamera_disp_setting pcamera_disp_setting * @return int * @retval */ int anyka_set_camera_info(Pcamera_disp_setting pcamera_disp_setting) { void *config_handle; char value[50]; anyka_debug("osd_name len : %d\n", strlen(pcamera_disp_setting->osd_name)); /*** open config file ***/ config_handle = anyka_config_init(CONFIG_CAMERA_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /***????camera ?εĸ?????Ϣ ***/ sprintf(value, "%d", pcamera_disp_setting->width); anyka_config_set_title(config_handle, "camera", "width", value); sprintf(value, "%d", pcamera_disp_setting->height); anyka_config_set_title(config_handle, "camera", "height", value); sprintf(value, "%d", pcamera_disp_setting->osd_position); anyka_config_set_title(config_handle, "camera", "osd_position", value); sprintf(value, "%d", pcamera_disp_setting->osd_switch); anyka_config_set_title(config_handle, "camera", "osd_switch", value); sprintf(value, "%s", pcamera_disp_setting->osd_name); anyka_config_set_title(config_handle, "camera", "osd_name", value); sprintf(value, "%d", pcamera_disp_setting->time_switch); anyka_config_set_title(config_handle, "camera", "time_switch", value); sprintf(value, "%d", pcamera_disp_setting->date_format); anyka_config_set_title(config_handle, "camera", "date_format", value); sprintf(value, "%d", pcamera_disp_setting->hour_format); anyka_config_set_title(config_handle, "camera", "hour_format", value); sprintf(value, "%d", pcamera_disp_setting->week_format); anyka_config_set_title(config_handle, "camera", "week_format", value); sprintf(value, "%d", pcamera_disp_setting->ircut_mode); anyka_config_set_title(config_handle, "camera", "ircut_mode", value); /*** free resource ***/ anyka_config_destroy(CONFIG_CAMERA_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_camera_info * 获取摄像头采集/显示参数 * @date 2015/3 * @param: void *con int para1 * @return Pcamera_disp_setting * @retval */ Pcamera_disp_setting anyka_get_camera_info(void) { return psys_camera_info; } /** * @brief anyka_net_set_record_plan * 通过网络设置计划录像信息 * @date 2015/3 * @param: void *con int para1 * @return int * @retval */ void anyka_net_set_record_plan(record_plan_info *plan) { int index = 0; int record_time; if(plan->active) { for(index = 0; index < MAX_RECORD_PLAN_NUM; index ++) { if(psys_record_plan_info->record_plan[index].active == 0) { break; } } if(index != MAX_RECORD_PLAN_NUM) { record_time = psys_record_plan_info->record_plan[index].record_time; memcpy(&psys_record_plan_info->record_plan[index], plan, sizeof(record_plan_info)); psys_record_plan_info->record_plan[index].record_time = record_time; } } else { for(index = 0; index < MAX_RECORD_PLAN_NUM; index ++) { if((psys_record_plan_info->record_plan[index].start_time == plan->start_time) && (psys_record_plan_info->record_plan[index].end_time == plan->end_time) && (psys_record_plan_info->record_plan[index].day_flag== plan->day_flag)) { psys_record_plan_info->record_plan[index].active = 0; break; } } } anyka_set_record_plan_info(psys_record_plan_info); } /** * @brief anyka_set_ptz_info * 设置云台转动信息 * @date 2015/3 * @param: void *con int para1 * @return int * @retval */ int anyka_set_ptz_info(void *con, int para1) { struct ptz_pos *ptz_contrl = (struct ptz_pos *)con; char *title = "ptz"; char name[50]; char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_USER_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ????ptz ?εĸ?????Ϣ ***/ sprintf(name, "p%dL", para1); sprintf(value, "%d", ptz_contrl[para1-1].left); anyka_config_set_title(config_handle, title, name, value); sprintf(name, "p%dU", para1); sprintf(value, "%d", ptz_contrl[para1-1].up); anyka_config_set_title(config_handle, title, name, value); /*** free resource ***/ anyka_config_destroy(CONFIG_USER_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_ptz_info * 获取云台转动信息 * @date 2015/3 * @param: void *con int para1 * @return int * @retval */ int anyka_get_ptz_info(void *con, int para1) { struct ptz_pos * ptz_contrl = (struct ptz_pos *)con; char *title = "ptz"; char name[50]; char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_USER_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡptz ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ sprintf(name, "p%dL", para1); anyka_config_get_title(config_handle, title, name, value, "999"); ptz_contrl[para1-1].left = atoi(value); sprintf(name, "p%dU", para1); anyka_config_get_title(config_handle, title, name, value, "999"); ptz_contrl[para1-1].up = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_USER_FILE_NAME, config_handle); return 0; } /** * @brief anyka_set_ptz_unhit_info * 设置云台非撞击信息 * @date 2015/3 * @param: void *con * @return int * @retval */ int anyka_set_ptz_unhit_info(void *con) { struct ptz_pos *ptz_contrl = (struct ptz_pos *)con; char *title = "ptz"; char value[50]; void *config_handle; if (access(CONFIG_PTZ_UNHIT_NAME, F_OK) != 0) { sprintf(value, "echo \"[%s]\" > %s", title, CONFIG_PTZ_UNHIT_NAME); system(value); } /*** open config file ***/ config_handle = anyka_config_init(CONFIG_PTZ_UNHIT_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ????ptz ?εĸ?????Ϣ ***/ sprintf(value, "%d", ptz_contrl[0].left); anyka_config_set_title(config_handle, title, "hitL", value); sprintf(value, "%d", ptz_contrl[0].up); anyka_config_set_title(config_handle, title, "hitU", value); /*** free resource ***/ anyka_config_destroy(CONFIG_PTZ_UNHIT_NAME, config_handle); return 0; } /** * @brief anyka_get_ptz_unhit_info * 获取云台非撞击信息 * @date 2015/3 * @param: void *con * @return int * @retval */ int anyka_get_ptz_unhit_info(void *con) { struct ptz_pos * ptz_contrl = (struct ptz_pos *)con; char *title = "ptz"; char value[50]; void *config_handle; if (access(CONFIG_PTZ_UNHIT_NAME, F_OK) != 0) { sprintf(value, "echo \"[%s]\" > %s", title, CONFIG_PTZ_UNHIT_NAME); system(value); } /*** open config file ***/ config_handle = anyka_config_init(CONFIG_PTZ_UNHIT_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡptz ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, title, "hitL", value, "999"); ptz_contrl[0].left = atoi(value); anyka_config_get_title(config_handle, title, "hitU", value, "999"); ptz_contrl[0].up = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_PTZ_UNHIT_NAME, config_handle); return 0; } /** * @brief anyka_init_system_user_info * 初始化系统用户配置信息 * @date 2015/3 * @param: system_user_info pointer * @return int * @retval */ int anyka_init_system_user_info(system_user_info *psys_user_info) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_USER_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return 1; } /*** ??ȡglobal ?εĸ?????Ϣ????û????ʹ??Ĭ??ֵ ***/ anyka_config_get_title(config_handle, "global", "user", value, "admin"); strcpy(psys_user_info->user, value); anyka_config_get_title(config_handle, "global", "secret", value, "admin"); strcpy(psys_user_info->secret, value); anyka_config_get_title(config_handle, "global", "debuglog", value, "0"); psys_user_info->debuglog = atoi(value); anyka_config_get_title(config_handle, "global", "rtsp_support", value, "0"); psys_user_info->rtsp_support = atoi(value); anyka_config_get_title(config_handle, "global", "firmware_update", value, "0"); psys_user_info->firmware_update = atoi(value); anyka_config_get_title(config_handle, "global", "dev_name", value, "ak_ipc_dev_name"); strcpy(psys_user_info->dev_name, value); anyka_config_get_title(config_handle, "global", "soft_version", value, "1000"); psys_user_info->soft_version = atoi(value); /*** free resource ***/ anyka_config_destroy(CONFIG_USER_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_system_user_info * 获取系统用户配置信息 * @date 2015/3 * @param: void * @param: system_user_info pointer * @retval */ system_user_info *anyka_get_system_user_info(void) { return psystem_user_info; } /** * @brief anyka_set_system_user_info * 设置系统用户配置信息 * @date 2015/3 * @param: system_user_info pointer * @return int * @retval */ int anyka_set_system_user_info(system_user_info * user_info) { char *title = "global"; char value[100]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_USER_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return -1; } /*** ??ptz ???????????????? ***/ sprintf(value, "%s", user_info->user); anyka_config_set_title(config_handle, title, "user", value); sprintf(value, "%s", user_info->secret); anyka_config_set_title(config_handle, title, "secret", value); sprintf(value, "%s", user_info->dev_name); anyka_config_set_title(config_handle, title, "dev_name", value); sprintf(value, "%d", user_info->firmware_update); anyka_config_set_title(config_handle, title, "firmware_update", value); sprintf(value, "%d", user_info->rtsp_support); anyka_config_set_title(config_handle, title, "rtsp_support", value); sprintf(value, "%u", user_info->soft_version); anyka_config_set_title(config_handle, title, "soft_version", value); /*** free resource ***/ anyka_config_destroy(CONFIG_USER_FILE_NAME, config_handle); return 0; } /** * @brief anyka_get_sys_ftp_update_info * 获取FTP升级配置 * @date 2015/3 * @param: void * @return system_ftp_update_info pointer * @retval */ system_ftp_update_info *anyka_get_sys_ftp_update_info(void) { return psys_ftp_update_info; } /** * @brief anyka_init_update_config * according soft version, modify some configure * @date 2016/4 * @param: void * @return void * @retval void */ void anyka_init_update_config(unsigned int sys_version) { char value[50]; void *config_handle; /*** open config file ***/ config_handle = anyka_config_init(CONFIG_VIDEO_FILE_NAME); if(config_handle == NULL) { anyka_print("[%s:%d] init config file failed.\n", __func__, __LINE__); return ; } //???ݰ汾????????Ϣ, ע???汾??һ??Ҫд??, ??ʽ??Ҫ?? if(psystem_user_info) { /** do update config file things if current version is new than the old **/ if (sys_version > psystem_user_info->soft_version && psys_cloud_info->tencent) { anyka_print("sys_version = %u\n", psystem_user_info->soft_version); if (psys_record_plan_info->record_plan[0].active != 1) { psys_record_plan_info->record_plan[0].active = 1; sprintf(value, "%d",psys_record_plan_info->record_plan[0].active); anyka_config_set_title(config_handle, "record", "record_start_run1", value); } if (pvideo_default_config->savefilefps != 10) { pvideo_default_config->savefilefps = 10; sprintf(value, "%d",pvideo_default_config->savefilefps); anyka_config_set_title(config_handle, "video", "savefilefps", value); } if (pvideo_default_config->savefilekbps != 256) { pvideo_default_config->savefilekbps = 256; sprintf(value, "%d",pvideo_default_config->savefilekbps); anyka_config_set_title(config_handle, "video", "savefilekbps", value); } if (psys_alarm_info->alarm_save_record != 0) { psys_alarm_info->alarm_save_record = 0; sprintf(value, "%d",psys_alarm_info->alarm_save_record); anyka_config_set_title(config_handle, "alarm", "alarm_save_record", value); } /** save the current system software version to config file **/ sprintf(value, "%d", sys_version); anyka_config_set_title(config_handle, "global", "soft_version", value); } } else { anyka_print("[%s:%d] config file is newst.\n", __func__, __LINE__); } anyka_config_destroy(CONFIG_VIDEO_FILE_NAME, config_handle); } /** * @brief anyka_init_setting * 初始化系统ini文件配置信息 * @date 2015/3 * @param: unsigned int sys_version : 当前软件最新版本 * @return void * @retval */ void anyka_init_setting(unsigned int sys_version) { void *config_handle; anyka_config_init_lock(); config_handle = anyka_config_init(CONFIG_ANYKA_FILE_NAME); if(NULL == config_handle) { anyka_print("[%s:%d] open config file failed, create it.\n", __func__, __LINE__); system("cp /usr/local/factory_cfg.ini /etc/jffs2/anyka_cfg.ini"); } else { anyka_print("[%s:%d] anyka config file check ok.\n", __func__, __LINE__); anyka_config_destroy(CONFIG_ANYKA_FILE_NAME, config_handle); } pvideo_default_config = (video_setting *)malloc(sizeof(video_setting)); psys_record_plan_info = (video_record_setting *)malloc(sizeof(video_record_setting)); psys_alarm_info = (Psystem_alarm_set_info)malloc(sizeof(system_alarm_set_info)); psys_onvif_info = (Psystem_onvif_set_info)malloc(sizeof(system_onvif_set_info)); psys_cloud_info = (Psystem_cloud_set_info)malloc(sizeof(system_cloud_set_info)); psys_net_info = (Psystem_net_set_info)malloc(sizeof(system_net_set_info)); psys_wifi_info = (Psystem_wifi_set_info)malloc(sizeof(system_wifi_set_info)); psys_camera_info = (Pcamera_disp_setting)malloc(sizeof(camera_disp_setting)); psystem_user_info = (system_user_info *)malloc(sizeof(system_user_info)); psys_ftp_update_info = (system_ftp_update_info*)malloc(sizeof(system_ftp_update_info)); anyka_init_video_param(pvideo_default_config); //init video anyka_init_record_plan_info(psys_record_plan_info); //init record plan anyka_init_sys_alarm_status(psys_alarm_info); //init alarm status anyka_init_sys_onvif_status(psys_onvif_info); //init onvif message anyka_init_sys_cloud_setting(psys_cloud_info); //init cloud message anyka_init_sys_net_status(psys_net_info); //init net status anyka_init_sys_wifi_status(psys_wifi_info); //init wifi status anyka_init_camera_info(psys_camera_info); //init camera info anyka_init_system_user_info(psystem_user_info); //init user info anyka_init_ftp_update_info(psys_ftp_update_info); //init ftp update info anyka_init_update_config(sys_version); }
e1518dd1f6e7889c7dcce1181c4b25a1718fd7d7
972bd3bf25461fceac434896082135ad6c8f6f6c
/demoLecture9-UARTchat.X/uartComm.c
81302285906fd62413516dc9d2c9d6f3e28676ef
[]
no_license
magarcia1/ucontrol
f2a990458d9a965e2d5efdf09d7cc69b11c07115
f69fea8752069a1d76dde7687189de19a55d5648
refs/heads/master
2021-01-17T14:22:06.546787
2015-03-13T18:18:11
2015-03-13T18:18:11
null
0
0
null
null
null
null
UTF-8
C
false
false
1,460
c
uartComm.c
/* * File: uartComm.h * Author: garrettvanhoy * * Created on December 27, 2014, 12:13 PM */ // ******************************************************************************************* // // Defines to simply UART's baud rate generator (BRG) regiser // given the osicllator freqeuncy and PLLMODE. #define XTFREQ 7372800 // On-board Crystal frequency #define PLLMODE 4 // On-chip PLL setting (Fosc) #define FCY (XTFREQ*PLLMODE)/2 // Instruction Cycle Frequency (Fosc/2) #define BAUDRATE 115200 #define BRGVAL ((FCY/BAUDRATE)/16)-1 // ******************************************************************************************* // #include "p24fj64ga002.h" #include "uartComm.h" #include <stdio.h> void initUART1(){ //Peripheral Pin Mapping RPINR18bits.U1RXR = 9; //pin 18 UART Receive RPOR4bits.RP8R = 3; //pin 17 UART Transmit //Configuring the UART U1BRG = BRGVAL; U1MODE = 0x8000; U1MODEbits.PDSEL = 2; U1STA = 0x0440; //Putting the UART interrupt flag down. IFS0bits.U1RXIF = 0; } void initUART2(){ //Peripheral Pin Mapping RPINR19bits.U2RXR = 14; //pin 25 UART 2 Receive RPOR6bits.RP13R = 5; //pin 24 UART 2 Transmit //Configuring the UART U2BRG = BRGVAL; U2MODEbits.UARTEN = 1; U2MODEbits.UEN = 0; U2STA = 0x0440; //Putting the UART interrupt flag down. IFS1bits.U2RXIF = 0; }
af8483316879bfa73716443be8d5242f75351642
2b3b4b8bd8965efdc7b505ac3de6ef5f9be31447
/zad2/reverse.h
affcd0dd18e3d323a5506f9e1d0975e9e962b1d4
[]
no_license
prazek/cuda-exercises
6803339796dd6142ab669e9c082914db5d754a96
463951580c3c065e9660c2d23212d18f5c47d4e2
refs/heads/master
2021-01-10T04:37:49.198539
2016-04-06T21:39:25
2016-04-06T21:39:25
55,642,223
0
0
null
null
null
null
UTF-8
C
false
false
410
h
reverse.h
// // Created by prazek on 03.04.16. // #ifndef ZAD2_REVERSE_H #define ZAD2_REVERSE_H #include <device_launch_parameters.h> __global__ void reverse(int *d_input, int n) { const int index = blockIdx.x * blockDim.x + threadIdx.x; if (index >= n) return; int tmp = d_input[index]; d_input[index] = d_input[n - index - 1]; d_input[n - index - 1] = tmp; } #endif //ZAD2_REVERSE_H
72ef43389b87e1e600f731b7a9a721280e982934
16a76ee66d9b2f59c9beee4a4a0e104ce347e32a
/from_decompile-it.com/lynx/ia32_elf_from_website/by_decompile-it.com/WWW/Library/Implementation/HTParse.c.h
6fa0cd45213c5dbc0f98ae4e75a3f0208482cb4c
[]
no_license
rfalke/decompiler-subjects
4cee3263fa9116285b4bc4b6373efd2e4efa925f
7187fa93b285c32325826eecd0128e907a28809b
refs/heads/master
2023-08-10T08:24:27.198393
2023-07-28T19:44:41
2023-07-28T19:44:41
3,725,678
41
12
null
2023-03-15T16:14:41
2012-03-15T06:01:36
null
UTF-8
C
false
false
4,262
h
HTParse.c.h
#define __MOD(a,b) a % b /*****************************************************************************************/ /****** ******/ /****** Structure Definitions ******/ /****** ******/ /*****************************************************************************************/ struct struct_parts { char *access; char *host; char *absolute; char *relative; char *search; char *anchor; } ; typedef struct _IO_FILE FILE; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; } ; typedef long __off_t; typedef void _IO_lock_t; typedef long long __quad_t; typedef __quad_t __off64_t; typedef unsigned int size_t; struct _IO_FILE { int _flags; char *_IO_read_ptr; char *_IO_read_end; char *_IO_read_base; char *_IO_write_base; char *_IO_write_ptr; char *_IO_write_end; char *_IO_buf_base; char *_IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[40]; } ; typedef char BOOLEAN; /*****************************************************************************************/ /****** ******/ /****** Function Prototypes ******/ /****** ******/ /*****************************************************************************************/ char *LYRemoveBlanks( char * ); FILE *TraceFP( void ); UrlTypes is_url( char * ); void outofmem( char *, char * ); void LYFillLocalFileURL( char **, char * ); void scan( char *, struct struct_parts * ); char *strchr_or_end( char *, int ); char *HTParsePort( char *, int * ); char *HTParse( char *, char *, int ); char *HTParseAnchor( char * ); void HTSimplify( char * ); char *HTRelative( char *, char * ); char *HTEscape( char *, unsigned char ); char *HTEscapeUnsafe( char * ); char *HTEscapeSP( char *, unsigned char ); char from_hex( char ); char *HTUnEscape( char * ); char *HTUnEscapeSome( char *, char * ); void HTMake822Word( char **, int ); int strcasecomp( char *, char * ); int strncasecomp( char *, char *, int ); char *HTSACopy( char **, char * ); char *strchr( char *, char ); void *calloc( unsigned int , unsigned int ); void *strtol( char *, char **, int ); void free( void * ); short **__ctype_b_loc( void ); void *memcpy( void *, void *, unsigned int ); unsigned int strlen( char * ); char *strcpy( char *, char * ); int fprintf( FILE *, char *, ... ); void __stack_chk_fail( void ); char *strcat( char *, char * ); int strncmp( char *, char *, unsigned int ); int strcmp( char *, char * ); /*****************************************************************************************/ /****** ******/ /****** Forward Var Declarations ******/ /****** ******/ /*****************************************************************************************/ extern BOOLEAN WWW_TraceFlag; /*****************************************************************************************/ /****** ******/ /****** Inline Function Definitions ******/ /****** ******/ /*****************************************************************************************/
cc20dd0b8970bea5bd2970dd3e8731a5afe23ce3
9254939d504e935ec93f516c79ef6f79c17062a0
/src/pairFinderModified.c
f12bc882e69f4984862673351c829638e88fb9a8
[ "MIT" ]
permissive
LLNL/ddcMD
5f11fa81d1337ef862336b97075d1b88f1fe0f5f
3545c823359ff7010ecd17240487935d3907b9b5
refs/heads/master
2023-06-03T21:30:52.021716
2022-12-06T20:04:48
2022-12-06T20:04:48
269,431,133
28
8
MIT
2020-08-05T22:11:01
2020-06-04T18:09:40
C
UTF-8
C
false
false
5,033
c
pairFinderModified.c
// should the create return type PAIR_FINDER_MODIFIED* instead? #include <math.h> #include <stdio.h> #include <string.h> #include "object.h" #include "pio.h" #include "io.h" #include "simulate.h" #include "system.h" #include "ddcMalloc.h" #include "heap.h" #include "crc32.h" #include "units.h" #include "preduce.h" #include "dataExchange.h" #include "dataExchangeUtils.h" #include "pairIterator.h" #include "pairFinder.h" #include "pairFinderModified.h" int getRank(int); void pfm_destroy(PAIR_FINDER_MODIFIED * pfm) { ///////////////////////////////////////////////////// // This is analogous to a C++ destructor function. // // It must be used to prevent a memory leak. // ///////////////////////////////////////////////////// heapFree(pfm->iBlk); heapFree(pfm->vBlk); heapFree(pfm->rBlk); pfs_destroy(&(pfm->pfs)); heapFree(pfm->pBlk); } PAIR_FINDER_MODIFIED * pfm_create(SYSTEM *sys, double rcut) { //////////////////////////////////////////////////////////////////// // This is analogous to a C++ constructor function. // //////////////////////////////////////////////////////////////////// // Group together Dave's simple pair finder struct with a list of // // the required atom positions, relative to an arbitrary origin. // // Construct all needed data from scratch. // //////////////////////////////////////////////////////////////////// // PAIR_FINDER_MODIFIED * pfm = ddcMalloc(sizeof(PAIR_FINDER_MODIFIED)); unsigned int pBlkTmp; PAIR_FINDER_MODIFIED * pfm = heapGet(&pBlkTmp); heapEndBlock(pBlkTmp, sizeof(PAIR_FINDER_MODIFIED)); pfm->pBlk=pBlkTmp; STATE * state = system_getState(NULL); unsigned nLocal = sys->nlocal; ////////////////////////////////////////////////////////// // Create the struct for data exchange (halo exchange). // ////////////////////////////////////////////////////////// DATA_EXCHANGE_PARMS dxParms = mkRemoteAtomDep(rcut); unsigned nRemote = dep_nRemote(dxParms); pfm->nAtoms = nLocal+nRemote; // printf("ddt %d: nAtoms=%d\n", getRank(0), pfm->nAtoms); //////////////////////////////////////////////////// // Create space for nion coordinates in the heap. // //////////////////////////////////////////////////// pfm->rr = heapGet(&(pfm->rBlk)); heapEndBlock(pfm->rBlk, pfm->nAtoms*sizeof(THREE_VECTOR)); /////////////////////////////////////////////////// // Create space for nion velocities in the heap. // /////////////////////////////////////////////////// pfm->vr = heapGet(&(pfm->vBlk)); heapEndBlock(pfm->vBlk, pfm->nAtoms*sizeof(THREE_VECTOR)); //////////////////////////////////////////////// // Create space for nion species in the heap. // //////////////////////////////////////////////// pfm->atomType = heapGet(&(pfm->iBlk)); heapEndBlock(pfm->iBlk, pfm->nAtoms*sizeof(int)); ///////////////////////////////////////////////////////////// // Copy all of the local coordinates into that heap space. // ///////////////////////////////////////////////////////////// for (unsigned ii=0; ii<nLocal; ++ii) { pfm->rr[ii].x = state->rx[ii]; pfm->rr[ii].y = state->ry[ii]; pfm->rr[ii].z = state->rz[ii]; pfm->vr[ii].x = state->vx[ii]; pfm->vr[ii].y = state->vy[ii]; pfm->vr[ii].z = state->vz[ii]; pfm->atomType[ii] = state->atomtype[ii]; } //////////////////////////////////////////////////////// // Execute the halo exchange of nremote coordinates // // Each task sends local coordinates from ptr rr // // and receives remote coordinates to rr+nlocal. // //////////////////////////////////////////////////////// dxParms.width = sizeof(THREE_VECTOR); dep_exchange(pfm->rr, pfm->rr+nLocal, &dxParms); dep_exchange(pfm->vr, pfm->vr+nLocal, &dxParms); ///////////////////////////////////////////// // Repeat halo exchange for species types. // ///////////////////////////////////////////// dxParms.width = sizeof(int); dep_exchange(pfm->atomType, pfm->atomType+nLocal, &dxParms); ///////////////////////////////////////////////////// // make atoms spatially compact; // // Define a local origin, r0, and map // // relative positions to lie inside one unit cell. // ///////////////////////////////////////////////////// THREE_VECTOR r0 = pfm->rr[0]; for (unsigned ii=0; ii<pfm->nAtoms; ++ii) { pfm->rr[ii].x -= r0.x; pfm->rr[ii].y -= r0.y; pfm->rr[ii].z -= r0.z; nearestImage_fast(&(pfm->rr[ii].x), &(pfm->rr[ii].y), &(pfm->rr[ii].z)); } ///////////////////////////////////////// // Create struct for simple pair list. // ///////////////////////////////////////// pfm->rcut = rcut; pfm->rcut2 = rcut*rcut; pfm->pfs = pfs_create(pfm->rr, pfm->nAtoms, nearestImage_fast, pfm->rcut); dep_free(&dxParms); ////////////////////////////////////// // Return the simple pair list // // along with all atom coordinates. // ////////////////////////////////////// return pfm; } /* Local Variables: */ /* tab-width: 3 */ /* End: */
28d55df07eb7bfc4b89c86722f6765bba06a32f3
f026cb616ef14bae15a1d251ca6dbe0f55016d9c
/linux/23444.c
fd7624e2d2e03df96279a76c8663cd0da90d7150
[]
no_license
jajajasalu2/cocci-lkmp-c-files
3eb7d451929dca5cb6beb56aabd69fe3f7fc176c
5da943aabe1589e393a131121dbf8e7a84b3cf2a
refs/heads/master
2020-12-02T17:30:14.411816
2020-01-29T08:36:30
2020-01-29T08:36:30
231,053,574
1
0
null
null
null
null
UTF-8
C
false
false
2,523
c
23444.c
cocci_test_suite() { uint8_t cocci_id/* sound/soc/codecs/adau17x1.c 982 */[ADAU17X1_SAFELOAD_DATA_SIZE]; uint8_t cocci_id/* sound/soc/codecs/adau17x1.c 981 */[ADAU17X1_WORD_SIZE]; const uint8_t cocci_id/* sound/soc/codecs/adau17x1.c 979 */[]; size_t cocci_id/* sound/soc/codecs/adau17x1.c 979 */; struct sigmadsp *cocci_id/* sound/soc/codecs/adau17x1.c 978 */; struct snd_soc_dapm_context *cocci_id/* sound/soc/codecs/adau17x1.c 941 */; struct device *cocci_id/* sound/soc/codecs/adau17x1.c 786 */; enum adau17x1_micbias_voltage cocci_id/* sound/soc/codecs/adau17x1.c 770 */; const struct snd_soc_dai_ops cocci_id/* sound/soc/codecs/adau17x1.c 759 */; int cocci_id/* sound/soc/codecs/adau17x1.c 69 */(struct snd_soc_component *component, unsigned int rate); const struct snd_kcontrol_new cocci_id/* sound/soc/codecs/adau17x1.c 51 */[]; struct snd_pcm_substream *cocci_id/* sound/soc/codecs/adau17x1.c 458 */; unsigned int cocci_id/* sound/soc/codecs/adau17x1.c 429 */; struct snd_pcm_hw_params *cocci_id/* sound/soc/codecs/adau17x1.c 426 */; struct snd_soc_dai *cocci_id/* sound/soc/codecs/adau17x1.c 425 */; const char *const cocci_id/* sound/soc/codecs/adau17x1.c 35 */[]; bool cocci_id/* sound/soc/codecs/adau17x1.c 325 */; struct soc_enum *cocci_id/* sound/soc/codecs/adau17x1.c 236 */; struct snd_ctl_elem_value *cocci_id/* sound/soc/codecs/adau17x1.c 232 */; struct snd_soc_dapm_update cocci_id/* sound/soc/codecs/adau17x1.c 193 */; const struct snd_soc_dapm_route cocci_id/* sound/soc/codecs/adau17x1.c 176 */; const struct snd_soc_dapm_route cocci_id/* sound/soc/codecs/adau17x1.c 161 */[]; const struct snd_soc_dapm_widget cocci_id/* sound/soc/codecs/adau17x1.c 136 */[]; const struct snd_kcontrol_new cocci_id/* sound/soc/codecs/adau17x1.c 133 */; void cocci_id/* sound/soc/codecs/adau17x1.c 1094 */; struct adau *cocci_id/* sound/soc/codecs/adau17x1.c 106 */; struct snd_soc_component *cocci_id/* sound/soc/codecs/adau17x1.c 105 */; const char *cocci_id/* sound/soc/codecs/adau17x1.c 1030 */; struct snd_kcontrol *cocci_id/* sound/soc/codecs/adau17x1.c 103 */; void (*cocci_id/* sound/soc/codecs/adau17x1.c 1029 */)(struct device *dev); enum adau17x1_type cocci_id/* sound/soc/codecs/adau17x1.c 1029 */; struct regmap *cocci_id/* sound/soc/codecs/adau17x1.c 1028 */; const struct sigmadsp_ops cocci_id/* sound/soc/codecs/adau17x1.c 1024 */; struct snd_soc_dapm_widget *cocci_id/* sound/soc/codecs/adau17x1.c 102 */; int cocci_id/* sound/soc/codecs/adau17x1.c 102 */; }
736ad1fab9af5dfad9b40a942b956d933c0bd600
a694c8c63423a92cc50844c71925669a508939e2
/soft pagol/uva 12403 save setu.c
237ce3be2a704def9234cb955510bcac90bca2e6
[]
no_license
bhagyo/faltu-code
3614a64a799667fad20efc5c15eb742929fdde67
2158159bfde959eb945ed95964bc6f8909750fda
refs/heads/master
2020-04-03T07:38:43.611125
2018-11-12T21:13:45
2018-11-12T21:13:45
155,108,943
0
0
null
null
null
null
UTF-8
C
false
false
380
c
uva 12403 save setu.c
#include <stdio.h> #include <string.h> int main () { int cases,store=0,donate; char category[15]; scanf("%d",&cases); while(cases--) { scanf("%s",category); if (strcmp (category,"donate")==0) { scanf ("%d",&donate); store+=donate; } else printf ("%d\n",store); } return 0; }
19fe22d33606376f28adbdaea3c355dc82f058d4
bbc3a967651889351cc07ffcf930982fc115d54f
/p.c
effc78a73c411c6acf2c0e297a0fb33fd4674f75
[]
no_license
Manzood/Random-Stuff
a5e122cec1ae80df592802a4475b5061d9443f03
eac3846667b18e348ebd7bb813a5db28f2cea0c1
refs/heads/master
2022-05-07T08:20:24.181988
2022-03-06T09:51:12
2022-03-06T09:51:12
240,892,186
0
0
null
null
null
null
UTF-8
C
false
false
168
c
p.c
#include<stdio.h> int main() { int n,counter=1; int ans=0; scanf("%d",&n); while (n>0) { ans+=(n%2)*(counter); counter*=10; n=n/2; } printf("%d\n",ans); }
3b11354b2b6f3805e92272daa14c6d53332c74bb
753e9d4969594d47587292cb972808340bc73dae
/gecko/emlib/src/em_prs.c
4334c756e656f570825b6b4a9979c051b3dc2f03
[ "Zlib" ]
permissive
zephyrproject-rtos/hal_silabs
aa8da171c886acdeecc59a948a48cb2c55ac255c
d184c2ccc0ec5a7189d6d5cb7645c7f9bd38c2b5
refs/heads/master
2023-08-31T04:03:09.786479
2023-07-27T14:19:21
2023-08-03T10:12:36
179,893,214
8
36
null
2023-09-14T07:32:42
2019-04-06T22:27:02
C
UTF-8
C
false
false
21,844
c
em_prs.c
/***************************************************************************//** * @file * @brief Peripheral Reflex System (PRS) Peripheral API ******************************************************************************* * # License * <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b> ******************************************************************************* * * SPDX-License-Identifier: Zlib * * The licensor of this software is Silicon Laboratories Inc. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * ******************************************************************************/ #include "em_prs.h" #if defined(PRS_COUNT) && (PRS_COUNT > 0) #include "em_assert.h" /***************************************************************************//** * @addtogroup prs PRS - Peripheral Reflex System * @brief Peripheral Reflex System (PRS) Peripheral API * @details * This module contains functions to control the PRS peripheral of Silicon * Labs 32-bit MCUs and SoCs. The PRS allows configurable, fast, and autonomous * communication between peripherals on the MCU or SoC. * @{ ******************************************************************************/ /******************************************************************************* ************************** LOCAL FUNCTIONS ******************************** ******************************************************************************/ /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */ /***************************************************************************//** * @brief * Get PRS source signal for a channel. * * @param[in] type * PRS channel type. This can be either @ref prsTypeAsync or * @ref prsTypeSync. * * @param[in] ch * channel number. * * @return * PRS signal assigned to the channel. ******************************************************************************/ static PRS_Signal_t getSignal(unsigned int ch, PRS_ChType_t type) { PRS_Signal_t signal; #if defined(_PRS_ASYNC_CH_CTRL_SOURCESEL_MASK) if (type == prsTypeAsync) { signal = (PRS_Signal_t) (PRS->ASYNC_CH[ch].CTRL & (_PRS_ASYNC_CH_CTRL_SOURCESEL_MASK | _PRS_ASYNC_CH_CTRL_SIGSEL_MASK)); } else { signal = (PRS_Signal_t) (PRS->SYNC_CH[ch].CTRL & (_PRS_SYNC_CH_CTRL_SOURCESEL_MASK | _PRS_SYNC_CH_CTRL_SIGSEL_MASK)); } #else (void) type; signal = (PRS_Signal_t) (PRS->CH[ch].CTRL & (_PRS_CH_CTRL_SOURCESEL_MASK | _PRS_CH_CTRL_SIGSEL_MASK)); #endif return signal; } #if defined(_SILICON_LABS_32B_SERIES_2) /***************************************************************************//** * @brief * Convert an async PRS source to a sync source. * * @details * This conversion must be done because the id's of the same peripheral * source is different depending on if it's used as an asynchronous PRS source * or a synchronous PRS source. * * @param[in] asyncSource * The id of the asynchronous PRS source. * * @return * The id of the corresponding synchronous PRS source. ******************************************************************************/ uint32_t PRS_ConvertToSyncSource(uint32_t asyncSource) { uint32_t syncSource = 0; switch (asyncSource) { case _PRS_ASYNC_CH_CTRL_SOURCESEL_NONE: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_NONE; break; case _PRS_ASYNC_CH_CTRL_SOURCESEL_IADC0: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_IADC0; break; case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER0: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_TIMER0; break; case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER1: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_TIMER1; break; case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER2: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_TIMER2; break; case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER3: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_TIMER3; break; #if defined(TIMER4) case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER4: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_TIMER4; break; #endif #if defined(VDAC0) case _PRS_ASYNC_CH_CTRL_SOURCESEL_VDAC0L: syncSource = _PRS_SYNC_CH_CTRL_SOURCESEL_VDAC0; break; #endif default: EFM_ASSERT(false); break; } return syncSource; } /***************************************************************************//** * @brief * Convert an async PRS signal to a sync signal. * * @details * PRS values for TIMER2 and TIMER3 signals differ between asynchronous and * synchronous PRS channels. This function must be used to handle the * conversion. * * @param[in] asyncSource * The id of the asynchronous PRS source. * * @param[in] asyncSignal * The id of the asynchronous PRS signal. * * @return * The id of the corresponding synchronous PRS signal. ******************************************************************************/ uint32_t PRS_ConvertToSyncSignal(uint32_t asyncSource, uint32_t asyncSignal) { uint32_t syncSignal = asyncSignal; switch (asyncSource) { case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER0: case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER1: switch (asyncSignal) { case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER1UF: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER1UF; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER1OF: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER1OF; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER1CC0: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER1CC0; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2CC1: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER1CC1; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2CC2: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER1CC2; break; default: EFM_ASSERT(false); break; } break; case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER2: case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER3: #if defined(_PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER4) case _PRS_ASYNC_CH_CTRL_SOURCESEL_TIMER4: #endif switch (asyncSignal) { case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2UF: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER2UF; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2OF: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER2OF; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2CC0: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER2CC0; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2CC1: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER2CC1; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_TIMER2CC2: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_TIMER2CC2; break; default: EFM_ASSERT(false); break; } break; #if defined(IADC0) case _PRS_ASYNC_CH_CTRL_SOURCESEL_IADC0: switch (asyncSignal) { case _PRS_ASYNC_CH_CTRL_SIGSEL_IADC0SCANENTRYDONE: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_IADC0SCANENTRYDONE; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_IADC0SCANTABLEDONE: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_IADC0SCANTABLEDONE; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_IADC0SINGLEDONE: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_IADC0SINGLEDONE; break; default: EFM_ASSERT(false); break; } break; #endif #if defined(VDAC0) case _PRS_ASYNC_CH_CTRL_SOURCESEL_VDAC0L: switch (asyncSignal) { case _PRS_ASYNC_CH_CTRL_SIGSEL_VDAC0LCH0DONEASYNC: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_VDAC0CH0DONESYNC; break; case _PRS_ASYNC_CH_CTRL_SIGSEL_VDAC0LCH1DONEASYNC: syncSignal = _PRS_SYNC_CH_CTRL_SIGSEL_VDAC0CH1DONESYNC; break; default: EFM_ASSERT(false); break; } break; #endif default: // No translation break; } return syncSignal; } #endif /** @endcond */ /******************************************************************************* ************************** GLOBAL FUNCTIONS ******************************* ******************************************************************************/ /***************************************************************************//** * @brief * Set a source and signal for a channel. * * @param[in] ch * A channel to define the signal and source for. * * @param[in] source * A source to select for the channel. Use one of PRS_CH_CTRL_SOURCESEL_x defines. * * @param[in] signal * A signal (for selected @p source) to use. Use one of PRS_CH_CTRL_SIGSEL_x * defines. * * @param[in] edge * An edge (for selected source/signal) to generate the pulse for. ******************************************************************************/ void PRS_SourceSignalSet(unsigned int ch, uint32_t source, uint32_t signal, PRS_Edge_TypeDef edge) { #if defined(_PRS_SYNC_CH_CTRL_MASK) (void) edge; EFM_ASSERT(ch < PRS_SYNC_CHAN_COUNT); PRS->SYNC_CH[ch].CTRL = (source & _PRS_SYNC_CH_CTRL_SOURCESEL_MASK) | (signal & _PRS_SYNC_CH_CTRL_SIGSEL_MASK); #else EFM_ASSERT(ch < PRS_CHAN_COUNT); PRS->CH[ch].CTRL = (source & _PRS_CH_CTRL_SOURCESEL_MASK) | (signal & _PRS_CH_CTRL_SIGSEL_MASK) | (uint32_t)edge << _PRS_CH_CTRL_EDSEL_SHIFT; #endif } #if defined(PRS_ASYNC_SUPPORTED) /***************************************************************************//** * @brief * Set the source and asynchronous signal for a channel. * * @details * Asynchronous reflexes are not clocked on HFPERCLK and can be used even in * EM2/EM3. * There is a limitation to reflexes operating in asynchronous mode in * that they can only be used by a subset of the reflex consumers. See * the PRS chapter in the reference manual for the complete list of * supported asynchronous signals and consumers. * * @note * This function is not supported on EFM32GxxxFyyy parts. * In asynchronous mode, the edge detector only works in EM0 and should * not be used. The EDSEL parameter in PRS_CHx_CTRL register is set to 0 (OFF) * by default. * * @param[in] ch * A channel to define the source and asynchronous signal for. * * @param[in] source * A source to select for the channel. Use one of PRS_CH_CTRL_SOURCESEL_x defines. * * @param[in] signal * An asynchronous signal (for selected @p source) to use. Use one of the * PRS_CH_CTRL_SIGSEL_x defines that support asynchronous operation. ******************************************************************************/ void PRS_SourceAsyncSignalSet(unsigned int ch, uint32_t source, uint32_t signal) { PRS_ConnectSignal(ch, prsTypeAsync, (PRS_Signal_t) (source | signal)); } #endif #if defined(_PRS_ROUTELOC0_MASK) || (_PRS_ROUTE_MASK) /***************************************************************************//** * @brief * Send the output of a PRS channel to a GPIO pin. * * @details * This function is used to send the output of a PRS channel to a GPIO pin. * Note that there are certain restrictions to where a PRS channel can be * routed. Consult the datasheet of the device to see if a channel can be * routed to the requested GPIO pin. * * @param[in] ch * PRS channel number. * * @param[in] location * PRS routing location. ******************************************************************************/ void PRS_GpioOutputLocation(unsigned int ch, unsigned int location) { EFM_ASSERT(ch < PRS_CHAN_COUNT); #if defined(_PRS_ROUTE_MASK) PRS->ROUTE |= (location << _PRS_ROUTE_LOCATION_SHIFT) | (1 << ch); #else uint32_t shift = (ch % 4) * 8; uint32_t mask = location << shift; uint32_t locationGroup = ch / 4; /* Since all ROUTELOCx registers are in consecutive memory locations, we can treat them * as an array starting at ROUTELOC0 and use locationGroup to index into this array */ volatile uint32_t * routeloc = &PRS->ROUTELOC0; routeloc[locationGroup] |= mask; PRS->ROUTEPEN |= 1 << ch; #endif } #endif /***************************************************************************//** * @brief * Search for the first free PRS channel. * * @param[in] type * PRS channel type. This can be either @ref prsTypeAsync or * @ref prsTypeSync. * * @return * Channel number >= 0 if an unused PRS channel was found. If no free PRS * channel was found then -1 is returned. ******************************************************************************/ int PRS_GetFreeChannel(PRS_ChType_t type) { int ch = -1; PRS_Signal_t signal; int max; if (type == prsTypeAsync) { max = PRS_ASYNC_CHAN_COUNT; } else { max = PRS_SYNC_CHAN_COUNT; } for (int i = 0; i < max; i++) { signal = getSignal(i, type); if (signal == prsSignalNone) { ch = i; break; } } return ch; } /***************************************************************************//** * @brief * Reset all PRS channels * * @details * This function will reset all the PRS channel configuration. ******************************************************************************/ void PRS_Reset(void) { unsigned int i; #if defined(_SILICON_LABS_32B_SERIES_2) PRS->ASYNC_SWLEVEL = 0; for (i = 0; i < PRS_ASYNC_CHAN_COUNT; i++) { PRS->ASYNC_CH[i].CTRL = _PRS_ASYNC_CH_CTRL_RESETVALUE; } for (i = 0; i < PRS_SYNC_CHAN_COUNT; i++) { PRS->SYNC_CH[i].CTRL = _PRS_SYNC_CH_CTRL_RESETVALUE; } #else PRS->SWLEVEL = 0x0; for (i = 0; i < PRS_CHAN_COUNT; i++) { PRS->CH[i].CTRL = _PRS_CH_CTRL_RESETVALUE; } #endif } /***************************************************************************//** * @brief * Connect a PRS signal to a channel. * * @details * This function will make the PRS signal available on the specific channel. * Only a single PRS signal can be connected to any given channel. * * @param[in] ch * PRS channel number. * * @param[in] type * PRS channel type. This can be either @ref prsTypeAsync or * @ref prsTypeSync. * * @param[in] signal * This is the PRS signal that should be placed on the channel. ******************************************************************************/ void PRS_ConnectSignal(unsigned int ch, PRS_ChType_t type, PRS_Signal_t signal) { #if defined(_PRS_ASYNC_CH_CTRL_MASK) // Series 2 devices uint32_t sourceField = ((uint32_t)signal & _PRS_ASYNC_CH_CTRL_SOURCESEL_MASK) >> _PRS_ASYNC_CH_CTRL_SOURCESEL_SHIFT; uint32_t signalField = ((uint32_t)signal & _PRS_ASYNC_CH_CTRL_SIGSEL_MASK) >> _PRS_ASYNC_CH_CTRL_SIGSEL_SHIFT; if (type == prsTypeAsync) { EFM_ASSERT(ch < PRS_ASYNC_CHAN_COUNT); PRS->ASYNC_CH[ch].CTRL = PRS_ASYNC_CH_CTRL_FNSEL_A | (sourceField << _PRS_ASYNC_CH_CTRL_SOURCESEL_SHIFT) | (signalField << _PRS_ASYNC_CH_CTRL_SIGSEL_SHIFT); } else { EFM_ASSERT(ch < PRS_SYNC_CHAN_COUNT); signalField = PRS_ConvertToSyncSignal(sourceField, signalField); sourceField = PRS_ConvertToSyncSource(sourceField); PRS->SYNC_CH[ch].CTRL = (sourceField << _PRS_SYNC_CH_CTRL_SOURCESEL_SHIFT) | (signalField << _PRS_SYNC_CH_CTRL_SIGSEL_SHIFT); } #else // Series 0 and Series 1 devices uint32_t signalField = (uint32_t) signal & (_PRS_CH_CTRL_SOURCESEL_MASK | _PRS_CH_CTRL_SIGSEL_MASK); if (type == prsTypeAsync) { #if defined(PRS_ASYNC_SUPPORTED) EFM_ASSERT(ch < PRS_ASYNC_CHAN_COUNT); PRS->CH[ch].CTRL = PRS_CH_CTRL_EDSEL_OFF | PRS_CH_CTRL_ASYNC | signalField; #endif } else { EFM_ASSERT(ch < PRS_SYNC_CHAN_COUNT); PRS->CH[ch].CTRL = PRS_CH_CTRL_EDSEL_OFF | signalField; } #endif } #if defined(_SILICON_LABS_32B_SERIES_2) /***************************************************************************//** * @brief * Connect a peripheral consumer to a PRS channel. * * @details * Different peripherals can use PRS channels as their input. This function * can be used to connect a peripheral consumer to a PRS channel. Multiple * consumers can be connected to a single PRS channel. * * @param[in] ch * PRS channel number. * * @param[in] type * PRS channel type. This can be either @ref prsTypeAsync or * @ref prsTypeSync. * * @param[in] consumer * This is the PRS consumer. ******************************************************************************/ void PRS_ConnectConsumer(unsigned int ch, PRS_ChType_t type, PRS_Consumer_t consumer) { EFM_ASSERT((uint32_t)consumer <= 0xFFF); volatile uint32_t * addr = (volatile uint32_t *) PRS; uint32_t offset = (uint32_t) consumer; addr = addr + offset / 4; if (consumer != prsConsumerNone) { if (type == prsTypeAsync) { *addr = ch << _PRS_CONSUMER_TIMER0_CC0_PRSSEL_SHIFT; } else { *addr = ch << _PRS_CONSUMER_TIMER0_CC0_SPRSSEL_SHIFT; } } } /***************************************************************************//** * @brief * Send the output of a PRS channel to a GPIO pin. * * @details * This function is used to send the output of a PRS channel to a GPIO pin. * Note that there are certain restrictions to where a PRS channel can be * routed. Consult the datasheet of the device to see if a channel can be * routed to the requested GPIO pin. Some devices for instance can only route * the async channels 0-5 on GPIO pins PAx and PBx while async channels 6-11 * can only be routed to GPIO pins PCx and PDx * * @param[in] ch * PRS channel number. * * @param[in] type * PRS channel type. This can be either @ref prsTypeAsync or * @ref prsTypeSync. * * @param[in] port * GPIO port * * @param[in] pin * GPIO pin ******************************************************************************/ void PRS_PinOutput(unsigned int ch, PRS_ChType_t type, GPIO_Port_TypeDef port, uint8_t pin) { volatile uint32_t * addr; if (type == prsTypeAsync) { addr = &GPIO->PRSROUTE[0].ASYNCH0ROUTE; } else { addr = &GPIO->PRSROUTE[0].SYNCH0ROUTE; } addr += ch; *addr = ((uint32_t)port << _GPIO_PRS_ASYNCH0ROUTE_PORT_SHIFT) | (pin << _GPIO_PRS_ASYNCH0ROUTE_PIN_SHIFT); if (type == prsTypeAsync) { GPIO->PRSROUTE[0].ROUTEEN |= 0x1 << (ch + _GPIO_PRS_ROUTEEN_ASYNCH0PEN_SHIFT); } else { GPIO->PRSROUTE[0].ROUTEEN |= 0x1 << (ch + _GPIO_PRS_ROUTEEN_SYNCH0PEN_SHIFT); } } /***************************************************************************//** * @brief * Combine two PRS channels using a logic function. * * @details * This function allows you to combine the output of one PRS channel with the * the signal of another PRS channel using various logic functions. Note that * for series 2, config 1 devices, the hardware only allows a PRS channel to * be combined with the previous channel. So for instance channel 5 can be * combined only with channel 4. * * The logic function operates on two PRS channels called A and B. The output * of PRS channel B is combined with the PRS source configured for channel A * to produce an output. This output is used as the output of channel A. * * @param[in] chA * PRS Channel for the A input. * * @param[in] chB * PRS Channel for the B input. * * @param[in] logic * The logic function to use when combining the Channel A and Channel B. The * output of the logic function is the output of Channel A. Function like * AND, OR, XOR, NOT and more are available. ******************************************************************************/ void PRS_Combine(unsigned int chA, unsigned int chB, PRS_Logic_t logic) { EFM_ASSERT(chA < PRS_ASYNC_CHAN_COUNT); EFM_ASSERT(chB < PRS_ASYNC_CHAN_COUNT); #if defined(_SILICON_LABS_32B_SERIES_2_CONFIG_1) EFM_ASSERT(chA == ((chB + 1) % PRS_ASYNC_CHAN_COUNT)); PRS->ASYNC_CH[chA].CTRL = (PRS->ASYNC_CH[chA].CTRL & ~_PRS_ASYNC_CH_CTRL_FNSEL_MASK) | ((uint32_t)logic << _PRS_ASYNC_CH_CTRL_FNSEL_SHIFT); #else PRS->ASYNC_CH[chA].CTRL = (PRS->ASYNC_CH[chA].CTRL & ~(_PRS_ASYNC_CH_CTRL_FNSEL_MASK | _PRS_ASYNC_CH_CTRL_AUXSEL_MASK)) | ((uint32_t)logic << _PRS_ASYNC_CH_CTRL_FNSEL_SHIFT) | ((uint32_t)chB << _PRS_ASYNC_CH_CTRL_AUXSEL_SHIFT); PRS->ASYNC_CH[chB].CTRL = (PRS->ASYNC_CH[chB].CTRL & ~_PRS_ASYNC_CH_CTRL_FNSEL_MASK) | PRS_ASYNC_CH_CTRL_FNSEL_DEFAULT; #endif } #endif /** @} (end addtogroup prs) */ #endif /* defined(PRS_COUNT) && (PRS_COUNT > 0) */
e2267ba3e6236f109b6fc9a88c46ed72b639aa18
358796ae816f9c281f4ea4733cbd7974ebe009cb
/includes/fdf.h
47d597e1c31402959e1fca4a37c669e4489e249d
[]
no_license
tasertasertaser/fdf
7cb5b8268a058e97d913464b939457563f0504c5
aa3949f8f70b1ffa30e32be7cb22ca539965d78a
refs/heads/master
2020-05-24T06:52:12.209892
2019-07-09T23:04:11
2019-07-09T23:04:11
187,147,748
1
0
null
null
null
null
UTF-8
C
false
false
4,939
h
fdf.h
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* fdf.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cschulle <cschulle@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/05 15:08:41 by cschulle #+# #+# */ /* Updated: 2019/06/08 20:52:27 by cschulle ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef FDF_H # define FDF_H /* ** ======== inclyoooods ======== */ # include <fcntl.h> # include <unistd.h> # include <stdlib.h> # include "../mlx/mlx.h" # include "../libft/libft.h" # include <math.h> /* ** ======== testing ======== */ # define TESTFILE "maps/10-2.fdf" /* ** ======== strooocts ======== */ typedef struct s_pt { int z; int color; } t_pt; typedef struct s_coord { int x; int y; int color; } t_coord; typedef struct s_line { t_coord a; t_coord b; } t_line; typedef struct s_lineshit { double slope; int intr; int sign; int len; } t_lineshit; typedef struct s_map { int rows; int columns; int max_z; int min_z; t_pt **points; } t_map; typedef struct s_im { void *imptr; int *pixels; } t_im; typedef struct s_bigstruct { char *file; int center_x; int center_y; void *wn; void *mlx; t_im *img; int rows; int columns; int max_z; int min_z; t_pt **points; t_coord **grid; char proj; t_coord origin; double unit; float z_mod; int clr; int color1; int color2; int helptoggle; } t_bigstruct; /* ** ======== colorstuff ======== */ # define R(a) (a) >> 16 # define G(a) ((a) >> 8) & 0xFF # define B(a) (a) & 0xFF # define RGB(a, b, c) ((a) << 16) + ((b) << 8) + (c) # define PNK 0xFF57A4 # define ORN 0xF99C4F # define YLW 0xFCD14F # define GRN 0x97F53B # define AQU 0x43FFB5 # define BLU 0x53ADFC # define PRP 0x9F29FF # define GRY 0x404040 # define BLK 0x000000 # define WHT 0xFFFFFF /* ** ======== keys ======== */ # define I_KEY 34 # define O_KEY 31 # define P_KEY 35 # define W_KEY 13 # define A_KEY 0 # define S_KEY 1 # define D_KEY 2 # define Z_KEY 6 # define X_KEY 7 # define J_KEY 38 # define K_KEY 40 # define C_KEY 8 # define SPACE_KEY 49 # define H_KEY 4 # define ESC_KEY 53 /* ** ======== display ======== */ # define WND_W 1280 # define WND_H 720 # define PRSP_BACKEDGE .3 # define PRSP_FRONTEDGE .9 # define ZOOM_MAX 100 # define ZOOM_MIN 2 /* ** ======== fn declarations ======== */ /* ** ...parsing & allocation... */ void parse(char *filename, t_bigstruct *mr_struct); void valid_check(char *row, int columns); t_coord **malloc_grid(t_bigstruct mr_struct); char *getthedamnline(int fd); /* ** ...ui... */ int key_press(int key, t_bigstruct *mr_struct); void coloroptions(t_bigstruct *mr_struct); void give_usage(void); void help(t_bigstruct *mr_struct); void bottomline(t_bigstruct mr_struct); /* ** ...moving the map... */ void plot(int key, t_bigstruct *mr_struct); void move(int key, t_bigstruct *mr_struct); void zoom(int key, t_bigstruct *mr_struct); void elevate(int key, t_bigstruct *mr_struct); void reset(t_bigstruct *mr_struct); /* ** ...drawing & projections... */ void create_grid(t_bigstruct mr_struct, char projection); double get_unit(t_bigstruct mr_struct); t_coord get_origin(t_bigstruct mr_struct, double unit); void draw_line(t_line line, t_bigstruct mr_struct); void connect(t_coord **grid, t_bigstruct mr_struct); void make_orth(t_bigstruct mr_struct, t_coord **grid); void make_iso(t_bigstruct mr_struct, t_coord **grid); void make_prsp(t_bigstruct mr_struct, t_coord **grid); double get_xunit(t_bigstruct mr_struct, int y); /* ** ...colors... */ int zcolor(t_bigstruct mr_struct, int x, int y); int gradient(int startcolor, int endcolor, int len, int pos); void color_select(int key, t_bigstruct *mr_struct); void color_cycle(t_bigstruct *mr_struct); /* ** ...images... */ t_im *img_factory(void *mlx); void drawpixel(t_im *img, int x, int y, int color); void clear_image(t_im *image); /* ** ...frees... */ void ft_strcjoinfree(char **old, char *new, char c); void free_grid(t_coord **grid, t_bigstruct mr_struct); /* ** ...testing... */ void draw_centerline(t_bigstruct mr_struct, char axis); /* ** ...error... */ void error(char *description); void nullcheck(char *string); #endif
f582b9993c32f774d158b3e180354e132056823b
d6db534430f48c3c066da2e2da745bff9a5b4334
/f340/F34x_SMBus_Slave_Multibyte.c
853df3570fb74e4f695cbe51e0b1fc9f86e05fcd
[ "MIT" ]
permissive
ThmX/raspi-silabs-i2c
f3f862bfafe730ffe8d1e95ac03de73a03835bef
64e5a6e49352ca7887247ef4f4bcdb57b073e4e4
refs/heads/master
2020-05-20T15:30:32.477738
2014-02-02T18:24:51
2014-02-02T18:24:51
null
0
0
null
null
null
null
UTF-8
C
false
false
16,188
c
F34x_SMBus_Slave_Multibyte.c
//----------------------------------------------------------------------------- // F34x_SMBus_Slave_Multibyte.c //----------------------------------------------------------------------------- // Copyright 2006 Silicon Laboratories, Inc. // http://www.silabs.com // // Program Description: // // Example software to demonstrate the C8051F34x SMBus interface in Slave mode // - Interrupt-driven SMBus implementation // - Only slave states defined // - Multi-byte SMBus data holders used for both transmit and receive // - Timer1 used as SMBus clock rate (used only for free timeout detection) // - Timer3 used by SMBus for SCL low timeout detection // - ARBLOST support included // - supports multiple-byte writes and multiple-byte reads // - Pinout: // P0.0 -> SDA (SMBus) // P0.1 -> SCL (SMBus) // // P2.2 -> LED // // all other port pins unused // // How To Test: // // 1) Download code to a 'F34x device that is connected to a SMBus master. // 2) Run the code. The slave code will copy the write data to the read // data, so a successive write and read will effectively echo the data // written. To verify that the code is working properly, verify on the // master that the data received is the same as the data written. // // // FID: 34X000073 // Target: C8051F34x // Tool chain: Keil C51 7.50 / Keil EVAL C51 // Command Line: None // // Release 1.0 // -Initial Revision (TP) // -30 MAR 2006 // //----------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------- #include <C8051F340.h> //----------------------------------------------------------------------------- // Global Constants //----------------------------------------------------------------------------- #define SYSCLK 12000000 // System clock frequency in Hz #define SMB_FREQUENCY 10000 // Target SMBus frequency // This example supports between 10kHz // and 100kHz #define WRITE 0x00 // SMBus WRITE command #define READ 0x01 // SMBus READ command #define SLAVE_ADDR 0xEE // Device addresses (7 bits, // lsb is a don't care) // Status vector - top 4 bits only #define SMB_SRADD 0x20 // (SR) slave address received // (also could be a lost // arbitration) #define SMB_SRSTO 0x10 // (SR) STOP detected while SR or ST, // or lost arbitration #define SMB_SRDB 0x00 // (SR) data byte received, or // lost arbitration #define SMB_STDB 0x40 // (ST) data byte transmitted #define SMB_STSTO 0x50 // (ST) STOP detected during a // transaction; bus error // End status vector definition #define NUM_BYTES_WR 1 // Number of bytes to write // Slave <- Master #define NUM_BYTES_RD 1 // Number of bytes to read // Slave -> Master //----------------------------------------------------------------------------- // Global VARIABLES //----------------------------------------------------------------------------- // Global holder for SMBus data. // All receive data is written here // NUM_BYTES_WR used because an SMBus write is Master->Slave unsigned char SMB_DATA_IN[NUM_BYTES_WR]; // Global holder for SMBus data. // All transmit data is read from here // NUM_BYTES_RD used because an SMBus read is Slave->Master unsigned char SMB_DATA_OUT[NUM_BYTES_RD]; bit DATA_READY = 0; // Set to '1' by the SMBus ISR // when a new data byte has been // received. // 16-bit SFR declarations sfr16 TMR3RL = 0x92; // Timer3 reload registers sfr16 TMR3 = 0x94; // Timer3 counter registers sbit LED = P2^2; // LED on port P2.2 //----------------------------------------------------------------------------- // Function PROTOTYPES //----------------------------------------------------------------------------- void SMBus_Init (void); void Timer1_Init (void); void Timer3_Init (void); void Port_Init (void); void SMBus_ISR (void); void Timer3_ISR (void); //----------------------------------------------------------------------------- // MAIN Routine //----------------------------------------------------------------------------- // // Main routine performs all configuration tasks, then waits for SMBus // communication. // void main (void) { unsigned char i; PCA0MD &= ~0x40; // WDTE = 0 (Disable watchdog // timer) OSCICN |= 0x03; // Set internal oscillator to highest // setting of 12000000 Port_Init(); // Initialize Crossbar and GPIO Timer1_Init(); // Configure Timer1 for use // with SMBus baud rate Timer3_Init (); // Configure Timer3 for use with // SCL low timeout detect SMBus_Init (); // Configure and enable SMBus EIE1 |= 0x01; // Enable the SMBus interrupt LED = 1; EA = 1; // Global interrupt enable // Initialize the outgoing data array in case a read is done before a // write for (i = 0; i < NUM_BYTES_RD; i++) { SMB_DATA_OUT[i] = 0xFD; } while(1) { while(!DATA_READY); // New SMBus data received? DATA_READY = 0; // Copy the data from the input array to the output array for (i = 0; i < NUM_BYTES_RD; i++) { SMB_DATA_OUT[i] = SMB_DATA_IN[i]; } LED = ~LED; } } //----------------------------------------------------------------------------- // Initialization Routines //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // SMBus_Init() //----------------------------------------------------------------------------- // // Return Value : None // Parameters : None // // SMBus configured as follows: // - SMBus enabled // - Slave mode not inhibited // - Timer1 used as clock source. The maximum SCL frequency will be // approximately 1/3 the Timer1 overflow rate // - Setup and hold time extensions enabled // - Bus Free and SCL Low timeout detection enabled // void SMBus_Init (void) { SMB0CF = 0x1D; // Use Timer1 overflows as SMBus clock // source; // Enable slave mode; // Enable setup & hold time // extensions; // Enable SMBus Free timeout detect; // Enable SCL low timeout detect; SMB0CF |= 0x80; // Enable SMBus; } //----------------------------------------------------------------------------- // Timer1_Init() //----------------------------------------------------------------------------- // // Return Value : None // Parameters : None // // Timer1 configured as the SMBus clock source as follows: // - Timer1 in 8-bit auto-reload mode // - SYSCLK or SYSCLK / 4 as Timer1 clock source // - Timer1 overflow rate => 3 * SMB_FREQUENCY // - The resulting SCL clock rate will be ~1/3 the Timer1 overflow rate // - Timer1 enabled // void Timer1_Init (void) { // Make sure the Timer can produce the appropriate frequency in 8-bit mode // Supported SMBus Frequencies range from 10kHz to 100kHz. The CKCON register // settings may need to change for frequencies outside this range. #if ((SYSCLK/SMB_FREQUENCY/3) < 255) #define SCALE 1 CKCON |= 0x08; // Timer1 clock source = SYSCLK #elif ((SYSCLK/SMB_FREQUENCY/4/3) < 255) #define SCALE 4 CKCON |= 0x01; CKCON &= ~0x0A; // Timer1 clock source = SYSCLK / 4 #endif TMOD = 0x20; // Timer1 in 8-bit auto-reload mode // Timer1 configured to overflow at 1/3 the rate defined by SMB_FREQUENCY TH1 = -(SYSCLK/SMB_FREQUENCY/SCALE/3); TL1 = TH1; // Init Timer1 TR1 = 1; // Timer1 enabled } //----------------------------------------------------------------------------- // Timer3_Init() //----------------------------------------------------------------------------- // // Return Value : None // Parameters : None // // Timer3 configured for use by the SMBus low timeout detect feature as // follows: // - Timer3 in 16-bit auto-reload mode // - SYSCLK/12 as Timer3 clock source // - Timer3 reload registers loaded for a 25ms overflow period // - Timer3 pre-loaded to overflow after 25ms // - Timer3 enabled // void Timer3_Init (void) { TMR3CN = 0x00; // Timer3 configured for 16-bit auto- // reload, low-byte interrupt disabled CKCON &= ~0x40; // Timer3 uses SYSCLK/12 TMR3RL = -(SYSCLK/12/40); // Timer3 configured to overflow after TMR3 = TMR3RL; // ~25ms (for SMBus low timeout detect): // 1/.025 = 40 EIE1 |= 0x80; // Timer3 interrupt enable TMR3CN |= 0x04; // Start Timer3 } //----------------------------------------------------------------------------- // PORT_Init //----------------------------------------------------------------------------- // // Return Value : None // Parameters : None // // Configure the Crossbar and GPIO ports. // // P0.0 digital open-drain SMBus SDA // P0.1 digital open-drain SMBus SCL // // P2.2 digital push-pull LED // // all other port pins unused // void PORT_Init (void) { P0MDOUT = 0x00; // All P0 pins open-drain output P2MDOUT |= 0x04; // Make the LED (P2.2) a push-pull // output XBR0 = 0x04; // Enable SMBus pins XBR1 = 0x40; // Enable crossbar and weak pull-ups P0 = 0xFF; } //----------------------------------------------------------------------------- // Interrupt Service Routines //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // SMBus Interrupt Service Routine (ISR) //----------------------------------------------------------------------------- // // SMBus ISR state machine // - Slave only implementation - no master states defined // - All incoming data is written to global variable <SMB_data_IN> // - All outgoing data is read from global variable <SMB_data_OUT> // void SMBus_ISR (void) interrupt 7 { static unsigned char sent_byte_counter; static unsigned char rec_byte_counter; static unsigned char tmp_counter; if (ARBLOST == 0) { switch (SMB0CN & 0xF0) // Decode the SMBus status vector { // Slave Receiver: Start+Address received case SMB_SRADD: STA = 0; // Clear STA bit sent_byte_counter = 1; // Reinitialize the data counters rec_byte_counter = 1; if ((SMB0DAT&0xFE) == (SLAVE_ADDR&0xFE)) // Decode address { // If the received address matches, ACK = 1; // ACK the received slave address if((SMB0DAT&0x01) == READ) // If the transfer is a master READ, { // Prepare outgoing byte SMB0DAT = SMB_DATA_OUT[sent_byte_counter-1]; sent_byte_counter++; } } else // If received slave address does not { // match, ACK = 0; // NACK received address } break; // Slave Receiver: Data received case SMB_SRDB: if (rec_byte_counter < NUM_BYTES_WR) { // Store incoming data SMB_DATA_IN[rec_byte_counter-1] = SMB0DAT; rec_byte_counter++; ACK = 1; // ACK received data } else { // Store incoming data SMB_DATA_IN[rec_byte_counter-1] = SMB0DAT; DATA_READY = 1; // Indicate new data fully received ACK = 1; // ACK received data } break; // Slave Receiver: Stop received while either a Slave Receiver or // Slave Transmitter case SMB_SRSTO: STO = 0; // STO must be cleared by software when // a STOP is detected as a slave break; // Slave Transmitter: Data byte transmitted case SMB_STDB: if (ACK == 1) // If Master ACK's, send the next byte { if (sent_byte_counter <= NUM_BYTES_RD) { // Prepare next outgoing byte SMB0DAT = SMB_DATA_OUT[sent_byte_counter-1]; sent_byte_counter++; } } // Otherwise, do nothing break; // Slave Transmitter: Arbitration lost, Stop detected // // This state will only be entered on a bus error condition. // In normal operation, the slave is no longer sending data or has // data pending when a STOP is received from the master, so the TXMODE // bit is cleared and the slave goes to the SRSTO state. case SMB_STSTO: STO = 0; // STO must be cleared by software when // a STOP is detected as a slave break; // Default: all other cases undefined default: SMB0CF &= ~0x80; // Reset communication SMB0CF |= 0x80; STA = 0; STO = 0; ACK = 0; break; } } // ARBLOST = 1, Abort failed transfer else { STA = 0; STO = 0; ACK = 0; } SI = 0; // Clear SMBus interrupt flag } //----------------------------------------------------------------------------- // Timer3 Interrupt Service Routine (ISR) //----------------------------------------------------------------------------- // // A Timer3 interrupt indicates an SMBus SCL low timeout. // The SMBus is disabled and re-enabled here // void Timer3_ISR (void) interrupt 14 { SMB0CF &= ~0x80; // Disable SMBus SMB0CF |= 0x80; // Re-enable SMBus TMR3CN &= ~0x80; // Clear Timer3 interrupt-pending flag } //----------------------------------------------------------------------------- // End Of File //-----------------------------------------------------------------------------
a95404d214d06ad1d14c5e61a2e845859dfb0e0a
99e5e3f6a31a226f23179dd748b1c4e0fd984e8e
/develop/tests/varinit_bug1.c
53d5e3b67087dec7d6543afd3efe64371ba22b0e
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
certik/nwcc
80359f5f0ebd92a4d8b81a5aa3e9f3c3d1ada6de
826512b3234585ec004ce7fa3f981af64b0d4393
refs/heads/master
2021-01-10T13:31:23.950780
2014-11-23T23:04:32
2014-11-23T23:04:32
43,717,336
7
1
null
null
null
null
UTF-8
C
false
false
567
c
varinit_bug1.c
#include <stdio.h> static int func1() { return 1; } static int func2() { return 2; } static int func3() { return 3; } static int func6() { return func3()+func2()+func1(); } int main() { /* Check with more than one storage unit, and whether * mixing with ordinary char at end works and still * aligns properly * * Mix with variable initializers too */ struct foo { char x; /* align me */ char gnu; unsigned d; } fa /*[]*/ = { func1(), 5, 6 }; int i; printf("%d\n", (int)sizeof(struct foo)); printf("%u\n", fa/*[0]*/.d); return 0; }
b8755f0b4f12a004f7b1c5fe8c4514816bb33511
fb1ef513518cf578e29fed19dc1dc4b4975c8791
/a1/MyMap/EIFGENs/mymap/W_code/C6/ch174d.c
583ca6adba3e46a639b0f3f4b6e12dd92d4dc0a8
[]
no_license
MichaelWilliams92/EECS3311
9fb31ac91127a16519a0020a13540bd3a3b1d63f
1cf53864e12b044c1a3635b6fb0dd4bbe6dccd20
refs/heads/master
2020-03-07T07:45:55.768230
2018-03-29T23:29:24
2018-03-29T23:29:24
127,357,883
0
0
null
null
null
null
UTF-8
C
false
false
5,085
c
ch174d.c
/* * Class reference CHARACTER_32 */ #include "eif_macros.h" #ifdef __cplusplus extern "C" { #endif static const EIF_TYPE_INDEX egt_0_174 [] = {0xFF01,194,0xFFFF}; static const EIF_TYPE_INDEX egt_1_174 [] = {0xFF01,317,173,0xFFFF}; static const EIF_TYPE_INDEX egt_2_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_3_174 [] = {0,0xFFFF}; static const EIF_TYPE_INDEX egt_4_174 [] = {0,0xFFFF}; static const EIF_TYPE_INDEX egt_5_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_6_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_7_174 [] = {0,0xFFFF}; static const EIF_TYPE_INDEX egt_8_174 [] = {0xFF01,10,0xFFFF}; static const EIF_TYPE_INDEX egt_9_174 [] = {0xFF01,194,0xFFFF}; static const EIF_TYPE_INDEX egt_10_174 [] = {0xFF01,194,0xFFFF}; static const EIF_TYPE_INDEX egt_11_174 [] = {0xFF01,11,0xFFFF}; static const EIF_TYPE_INDEX egt_12_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_13_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_14_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_15_174 [] = {0xFF01,173,0xFFFF}; static const EIF_TYPE_INDEX egt_16_174 [] = {0xFF01,171,0xFFFF}; static const EIF_TYPE_INDEX egt_17_174 [] = {0xFF01,4,0xFFFF}; static const struct desc_info desc_174[] = { {EIF_GENERIC(NULL), 0xFFFFFFFF, 0xFFFFFFFF}, {EIF_GENERIC(egt_0_174), 0, 0xFFFFFFFF}, {EIF_GENERIC(egt_1_174), 1, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 2, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 3, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9398, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 5, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 6, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 7, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 8, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9, 0xFFFFFFFF}, {EIF_GENERIC(egt_2_174), 10, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 11, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 12, 0xFFFFFFFF}, {EIF_GENERIC(egt_3_174), 13, 0xFFFFFFFF}, {EIF_GENERIC(egt_4_174), 14, 0xFFFFFFFF}, {EIF_GENERIC(egt_5_174), 15, 0xFFFFFFFF}, {EIF_GENERIC(egt_6_174), 16, 0xFFFFFFFF}, {EIF_GENERIC(egt_7_174), 17, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 18, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 19, 0xFFFFFFFF}, {EIF_GENERIC(egt_8_174), 20, 0xFFFFFFFF}, {EIF_GENERIC(egt_9_174), 9405, 0xFFFFFFFF}, {EIF_GENERIC(egt_10_174), 22, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 23, 0xFFFFFFFF}, {EIF_GENERIC(egt_11_174), 24, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 25, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 26, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 27, 0xFFFFFFFF}, {EIF_GENERIC(egt_12_174), 28, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0171 /*184*/), 29, 0xFFFFFFFF}, {EIF_GENERIC(egt_13_174), 30, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x016B /*181*/), 9392, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 6943, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9397, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 2380, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 2381, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 2382, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x016B /*181*/), 2384, 0xFFFFFFFF}, {EIF_GENERIC(egt_14_174), 2385, 0xFFFFFFFF}, {EIF_GENERIC(egt_15_174), 2386, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9390, 0}, {EIF_NON_GENERIC(0x016B /*181*/), 9429, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x013B /*157*/), 9430, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x013B /*157*/), 9394, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x013B /*157*/), 9395, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x013B /*157*/), 9396, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9399, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9400, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0123 /*145*/), 9401, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9402, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9403, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 9404, 0xFFFFFFFF}, {EIF_GENERIC(NULL), 9406, 0xFFFFFFFF}, {EIF_GENERIC(egt_16_174), 9407, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x015F /*175*/), 9431, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9409, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9410, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9411, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9412, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0159 /*172*/), 9413, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9414, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9415, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9416, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9417, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9418, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9419, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9420, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9421, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9422, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9423, 0xFFFFFFFF}, {EIF_NON_GENERIC(0x0165 /*178*/), 9424, 0xFFFFFFFF}, {EIF_GENERIC(egt_17_174), 9425, 0xFFFFFFFF}, }; void Init174(void) { IDSC(desc_174, 0, 173); IDSC(desc_174 + 1, 2, 173); IDSC(desc_174 + 32, 48, 173); IDSC(desc_174 + 34, 72, 173); IDSC(desc_174 + 38, 139, 173); IDSC(desc_174 + 41, 54, 173); } #ifdef __cplusplus } #endif
19f9c3ef52479c66c99c92fc6687e786fb5939fb
2c39a7fb145e978cdb07dbc2c3d4f55957548e7f
/misc.h
a984206747f4991dc9a50a535bb20a1d8e54fa0d
[]
no_license
dreamcat4/libsvc
4779a3a7ec7daf8143260ca7b834181bfb83fa56
c3d6810882f2eb07c36808527b3682833d33006c
refs/heads/master
2021-01-16T22:43:00.689204
2014-07-11T10:22:30
2014-07-11T10:23:13
null
0
0
null
null
null
null
UTF-8
C
false
false
1,569
h
misc.h
#pragma once #include <alloca.h> #include <stdint.h> #include <sys/time.h> #define URL_ESCAPE_PATH 1 #define URL_ESCAPE_PARAM 2 int url_escape(char *dst, const int size, const char *src, int how); char *base64_encode(char *out, int out_size, const uint8_t *in, int in_size); int base64_decode(uint8_t *out, const char *in, int out_size); #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) int dictcmp(const char *a, const char *b); #define WRITEFILE_NO_CHANGE 1000000 int writefile(const char *path, const void *buf, int size); char *readfile(const char *path, int *intptr, time_t *ts); void url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url); int makedirs(const char *path); #define mystrdupa(n) ({ int my_l = strlen(n); \ char *my_b = alloca(my_l + 1); \ memcpy(my_b, n, my_l + 1); }) static inline const char *mystrbegins(const char *s1, const char *s2) { while(*s2) if(*s1++ != *s2++) return NULL; return s1; } static inline int64_t get_ts(void) { struct timeval tv; gettimeofday(&tv, NULL); return (int64_t)tv.tv_sec * 1000000LL + tv.tv_usec; } int str_tokenize(char *buf, char **vec, int vecsize, int delimiter); int hexnibble(char c); int hex2bin(uint8_t *buf, size_t buflen, const char *str); void bin2hex(char *dst, size_t dstlen, const uint8_t *src, size_t srclen); const char *time_to_RFC_1123(time_t t);
d5e3da7d54fedbcec3cfaa02dac6678adebca5a3
90429827ad7a4e3ea45e2f61d37d2e092b7f1501
/Finch2.0 Firmware/Finch2.0 Firmware/USB_HID_START_EXAMPLE/USB_HID_START_EXAMPLE/src/sound.c
cbe97217c88ba9ae1809de248c1fec85d8e87e0d
[]
no_license
raghunathF/FB2
6fa44d5d5c115fb19faf1a4e81eb34e1623a2282
f044df321fcbc49744648c307aa6518c1e30a778
refs/heads/master
2021-06-21T07:51:14.547538
2017-08-07T16:58:23
2017-08-07T16:58:23
null
0
0
null
null
null
null
UTF-8
C
false
false
4,152
c
sound.c
/* * sound.c * * Created: 3/1/2016 10:31:07 AM * Author: Tom */ #include <asf.h> #include <dac.h> #include "sound.h" #define AUDIO_SDB PIN_PB23 static uint8_t waveform_type = ramp; static uint16_t count_timer = 0; static uint16_t waveform_volume = highest_volume; //0x3ff highest analog value to be generated static uint16_t waveform_frequency = 1000; //1KHz void configure_dac(void) { struct dac_config config_dac; dac_get_config_defaults(&config_dac); config_dac.reference = DAC_REFERENCE_AVCC; dac_init(&dac_instance, DAC, &config_dac); //dac_enable(&dac_instance); } void configure_dac_channel(void) { struct dac_chan_config config_dac_chan; dac_chan_get_config_defaults(&config_dac_chan); dac_chan_set_config(&dac_instance, DAC_CHANNEL_0, &config_dac_chan); dac_chan_enable(&dac_instance, DAC_CHANNEL_0); } void configure_buzzer_pins() { // Enable output on the I/O line struct port_config config_port_pin; port_get_config_defaults(&config_port_pin); config_port_pin.direction = PORT_PIN_DIR_OUTPUT; //port_pin_set_config(PIN_PA02, &config_port_pin); port_pin_set_config(AUDIO_SDB, &config_port_pin); } void calculate_initial_count() { count_timer = OPTIMIZE_COUNT/waveform_frequency; count_timer = MAX_COUNT_VALUE - count_timer; } void disable_TC5_callback() { tc_disable_callback(&tc_instance5, TC_CALLBACK_OVERFLOW); } void disable_dac_callbacks() { disable_TC5_callback(); } void disable_speaker() { disable_dac_callbacks(); port_pin_set_output_level(AUDIO_SDB, false); } void write_sound(uint8_t waveform_type_temp,uint16_t waveform_frequency_temp,uint16_t waveform_volume_temp) { //Ugly waveform_frequency = waveform_frequency_temp; waveform_type = waveform_type_temp; waveform_volume = waveform_volume_temp; if((waveform_frequency > 0) && (waveform_volume > 0)) { update_sound = true; calculate_initial_count(waveform_frequency_temp); enable_speaker(); } else { disable_speaker(); } } void configure_tc5() { struct tc_config config_tc; tc_get_config_defaults(&config_tc); config_tc.counter_size = TC_COUNTER_SIZE_16BIT; //16 config_tc.clock_source = GCLK_GENERATOR_0; config_tc.clock_prescaler = TC_CLOCK_PRESCALER_DIV64; //64 config_tc.counter_16_bit.value = 0xA9D5; // 1KHz ramp waveform config_tc.count_direction = TC_COUNT_DIRECTION_UP; tc_init(&tc_instance5, TC5, &config_tc); } void TC5_OV_callback(struct tc_module *const module_inst) { //Update the DAC buffer value static int i = 1; static int count = 0 ; static uint8_t local_waveform = 0; static uint16_t local_count = 0 ; static uint16_t local_volume = 0; tc_stop_counter(&tc_instance5); static bool order= true; //port_pin_set_output_level(PIN_PA08,1); if(update_sound) { local_waveform = waveform_type; local_count = count_timer; local_volume = waveform_volume; i = 0; update_sound = false; } dac_chan_write(&dac_instance, DAC_CHANNEL_0, i); if (local_waveform == ramp ) { i = i+30; if(i>= local_volume) { i=0; } } else if(local_waveform == triangular) { if(order == true) { i = i + 60; if(i>= local_volume) { i = local_volume; order = false; } } else { i = i - 60; if(i<=0) { i = 0; order = true; } } } tc_set_count_value(&tc_instance5, local_count); //port_pin_toggle_output_level(PIN_PA08); //port_pin_set_output_level(PIN_PA08,0); tc_start_counter(&tc_instance5); // else if(i == 0) // { // order = true; // } // if(order) // { // i++; // } // else // { // i--; // } } void configure_TC5_callback() { tc_register_callback(&tc_instance5, TC5_OV_callback,TC_CALLBACK_OVERFLOW); tc_enable_callback(&tc_instance5, TC_CALLBACK_OVERFLOW); } void configure_dac_callbacks() { configure_TC5_callback(); } void enable_speaker() { configure_dac_callbacks(); tc_enable(&tc_instance5); dac_enable(&dac_instance); port_pin_set_output_level(AUDIO_SDB, true); } void configure_buzzer_modules() { configure_dac(); configure_dac_channel(); configure_tc5(); } void configure_buzzer() { configure_buzzer_pins(); configure_buzzer_modules(); //enable_speaker(); }
2c37a8ffc7480587fdbc1cc27a064da72f72459a
39bfbbebd8c2a4b1e8bc49503addb7fa5a683374
/CppSource/Include/xsapi/system_c.h
8b5b0261272c64d6efbaa1377b3de383bc0cd6f4
[ "MIT" ]
permissive
TautvydasZilys/xbox-live-unity-plugin
961431f53b336faca5eeea542a1ae0919464c16c
469711cca540946e69994de8898e5935b590697a
refs/heads/master
2021-07-01T09:54:39.920397
2017-09-14T22:32:56
2017-09-14T22:35:02
103,588,191
0
0
null
2017-09-14T22:31:36
2017-09-14T22:31:34
null
UTF-8
C
false
false
4,159
h
system_c.h
// Copyright (c) Microsoft Corporation // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include "types_c.h" #include "xsapi/errors_c.h" #if defined(__cplusplus) extern "C" { #endif #if !XDK_API struct XboxLiveUserImpl; typedef enum SIGN_IN_STATUS { /// <summary> /// Signed in successfully. /// </summary> SUCCESS = 0, /// <summary> /// Need to invoke the signin API (w/ UX) to let the user take necessary actions for the sign-in operation to continue. /// Can only be returned from signin_silently(). /// </summary> USER_INTERACTION_REQUIRED, /// <summary> /// The user decided to cancel the sign-in operation. /// Can only be returned from signin(). /// </summary> USER_CANCEL } SIGN_IN_STATUS; typedef struct XboxLiveUser { PCSTR_T xboxUserId; PCSTR_T gamertag; PCSTR_T ageGroup; PCSTR_T privileges; bool isSignedIn; #if UWP_API PCSTR_T webAccountId; Windows::System::User^ windowsSystemUser; #endif XboxLiveUserImpl *pImpl; } XboxLiveUser; typedef struct SignInResultPayload { SIGN_IN_STATUS status; } SignInResultPayload; typedef struct SignInResult { XboxLiveResult result; SignInResultPayload payload; } SignInResult; typedef struct TokenAndSignatureResultPayload { PCSTR_T token; PCSTR_T signature; PCSTR_T xboxUserId; PCSTR_T gamertag; PCSTR_T xboxUserHash; PCSTR_T ageGroup; PCSTR_T privileges; PCSTR_T webAccountId; } TokenAndSignatureResultPayload; typedef struct TokenAndSignatureResult { XboxLiveResult result; TokenAndSignatureResultPayload payload; } TokenAndSignatureResult; XSAPI_DLLEXPORT XboxLiveUser* XBL_CALLING_CONV XboxLiveUserCreate(); #if UWP_API XSAPI_DLLEXPORT XboxLiveUser* XBL_CALLING_CONV XboxLiveUserCreateFromSystemUser( _In_ Windows::System::User^ creationContext ); #endif XSAPI_DLLEXPORT void XBL_CALLING_CONV XboxLiveUserDelete( _In_ XboxLiveUser *user ); typedef void(*SignInCompletionRoutine)( _In_ SignInResult result, _In_opt_ void* context ); XSAPI_DLLEXPORT void XBL_CALLING_CONV XboxLiveUserSignIn( _Inout_ XboxLiveUser* user, _In_ SignInCompletionRoutine completionRoutine, _In_opt_ void* completionRoutineContext, _In_ uint64_t taskGroupId ); XSAPI_DLLEXPORT void XBL_CALLING_CONV XboxLiveUserSignInSilently( _Inout_ XboxLiveUser* user, _In_ SignInCompletionRoutine completionRoutine, _In_opt_ void* completionRoutineContext, _In_ uint64_t taskGroupId ); #if WINAPI_FAMILY && WINAPI_FAMILY==WINAPI_FAMILY_APP XSAPI_DLLEXPORT void XBL_CALLING_CONV XboxLiveUserSignInWithCoreDispatcher( _Inout_ XboxLiveUser* user, _In_ Platform::Object^ coreDispatcher, _In_ SignInCompletionRoutine completionRoutine, _In_opt_ void* completionRoutineContext, _In_ uint64_t taskGroupId ); XSAPI_DLLEXPORT void XBL_CALLING_CONV XboxLiveUserSignInSilentlyWithCoreDispatcher( _Inout_ XboxLiveUser* user, _In_ Platform::Object^ coreDispatcher, _In_ SignInCompletionRoutine completionRoutine, _In_opt_ void* completionRoutineContext, _In_ uint64_t taskGroupId ); #endif typedef void(*GetTokenAndSignatureCompletionRoutine)( _In_ TokenAndSignatureResult result, _In_opt_ void* context ); XSAPI_DLLEXPORT void XBL_CALLING_CONV XboxLiveUserGetTokenAndSignature( _Inout_ XboxLiveUser* user, _In_ PCSTR_T httpMethod, _In_ PCSTR_T url, _In_ PCSTR_T headers, _In_ PCSTR_T requestBodyString, _In_ GetTokenAndSignatureCompletionRoutine completionRoutine, _In_opt_ void* completionRoutineContext, _In_ uint64_t taskGroupId ); typedef void(*SignOutCompletedHandler)( _In_ XboxLiveUser* user ); XSAPI_DLLEXPORT function_context XBL_CALLING_CONV AddSignOutCompletedHandler( _In_ SignOutCompletedHandler signOutHandler ); XSAPI_DLLEXPORT void XBL_CALLING_CONV RemoveSignOutCompletedHandler( _In_ function_context context ); #endif //!XDK_API #if defined(__cplusplus) } // end extern "C" #endif // defined(__cplusplus)
f5a3e87d995676eabdbc6c99ad8bbf3233d077db
6432ffa0649947cdb0c2045a3a7b2b2bee27e8c2
/cmds/std/task.c
137a99a1de4fc007e5e885ec42672fcaf9385418
[]
no_license
MudRen/xkx100
f2e314a542e459502e28f311cd9f20ee7f7c6f43
dfca57e056460d7c0532a6e19a5e4add94a5588d
refs/heads/main
2022-03-05T00:08:01.398338
2022-01-25T09:00:27
2022-01-25T09:00:27
313,971,845
6
3
null
null
null
null
UTF-8
C
false
false
1,004
c
task.c
// /cmds/std/task.c // Created by Constant Jan 4 2001 inherit F_CLEAN_UP; #include <ansi.h> int main(object me, string str) { string output; output = HIC"\n≡" + HIY"------------------------"+ HIC"飞雪连天任务榜" + HIY"------------------------"+ HIC"≡\n"NOR; output += HIG" 「任务物品」" + " " + " 「物品主人」\n"NOR; output += HIY" --------------------------------------------------------------"NOR + "\n"; if (!str || str != "-u") output += TASK_D->dyn_quest_list(0); else output += TASK_D->dyn_quest_list(1); output += HIC"≡"HIY"--------------------------------------------------------------"HIC"≡\n"NOR; output += HIW" 前面带"HIR"√"HIW"的表示该任务已完成。"NOR; me->start_more(output); return 1; } int help(object me) { write(@HELP 指令格式: task [-u] 这个指令是用来得知目前的所有使命,带-u参数则显示所有未 完成之使命。 HELP ); return 1; }
c397675226d34067ef055accbc4f0d2da8ece4bd
52c10b42f8b67a631e714375c21b14d9398ff3ce
/askisi6.c
b1f5842ecb944d309c777d3f6641b28898096225
[]
no_license
stratoseus1998/axastoi
d0e6b2aaeeacb239d43d9997d96aaccd5a080466
6f51430bb67061755115acc7bddc9757619e3c8c
refs/heads/main
2023-08-05T15:18:23.252896
2021-09-24T20:29:59
2021-09-24T20:29:59
408,866,219
0
0
null
null
null
null
UTF-8
C
false
false
353
c
askisi6.c
#include <stdio.h> void f_to_c( float celsius ){ double fahrenheit; fahrenheit = (9/5 * celsius )+ 32 ; printf("%.2f celsius = %.2f fahrenheit", celsius, fahrenheit); } int main() { float celsius; printf("Enter temperature in celsius: "); celsius=scanf("%f", &celsius); f_to_c (celsius); return 0; }
d971b13784cf2f2808d18a2e59f2fd2f80aa1bcf
d2d7203497d9a30125e598b0fc46763e31071ed4
/Pim/mbrecord/MBRecordList.h
78f3c43194aef29375febb9d4a7676db4dc7ade1
[]
no_license
zy0016/Pim
0a95faac7488bd4a7737f43f36a3b792306ed35e
50d2a24edc9b52a4d939eddd602fec26cf033ced
refs/heads/master
2020-03-31T17:36:49.063285
2018-10-10T13:33:31
2018-10-10T13:33:31
152,427,943
0
0
null
null
null
null
GB18030
C
false
false
1,414
h
MBRecordList.h
/*************************************************************************** * * Pollex Mobile Platform * * Copyright (c) 2004 by Pollex Mobile Software Co., Ltd. * All Rights Reserved * * Module : * * Purpose : * \**************************************************************************/ #ifndef _MBRECORDLIST_ #define _MBRECORDLIST_ typedef enum { MBL_WS_DEFAULT = 0x00, //默认风格 MBL_WS_COUNT = 0x01, //在标题栏显示电话个数 MBL_WS_NOVSCROLL = 0x02, //不显示滚动条 MBL_WS_MIDDLEBUTTON = 0x04, //显示中间键 MBL_WS_NODATA_SHOWMESSAGEBOX = 0x08, //没有数据的时候只显示提示框,不进入窗口,提示框中显示"无号码记录" MBL_WS_NODATA_NOTSHOWLIST = 0x16, //没有数据的时候不显示列表框,只在界面上显示"无号码记录" MBL_WS_NOSHOWREPEATDATA = 0x32 //列表中不显示号码重复的数据(但是文件中保存有号码重复的记录) }MBRECORDLIST_STYLE;//列表项风格 //hwndCall:父窗口句柄 //dtype:通话记录的类型(未接,已接,已拨),可以使用"|",支持任意两项,和全部三项的或关系 //MBRecordList_Style:列表项风格 BOOL CallMBLogListExtWindow(HWND hwndCall,DWORD dtype,DWORD MBRecordList_Style); #endif
4f67423e88da21d2c499276333bce83e7786bb61
becd03468b1bd82def9b72920661284e1ecff6f6
/Aula 4/GPIO_REGISTRADORES_LED/src/Driver2/pmc_maua.c
292f894846faca45a104eb0ece2196d353f658d0
[]
no_license
PabloSilva-WorkSpace/Entregas
f3f8b96370cdc04c00731bbef5f67eb6e1107623
8676eec99f5cffedd29ab8d2c30c3a4863bed42c
refs/heads/master
2021-01-16T21:29:23.696495
2016-04-08T01:50:46
2016-04-08T01:50:46
55,734,255
0
0
null
2016-04-07T23:13:38
2016-04-07T23:13:38
null
UTF-8
C
false
false
80
c
pmc_maua.c
/* * pmc_maua.c * * Created: 07/04/2016 20:43:04 * Author: 09.01688-0 */
df60f849afa29ad8efc726399b150d0322183ad5
7465082971e26b8cb643f6a2ed918f046fe42f42
/src/ludwig.h
ed4dc013fdff73e52810ba0a16cb21f1723281f0
[]
no_license
YinLiu-91/HLBM
2dccd82817a9a004f8945175ba18cb0979681314
7ecc19de253e7890d8ef6663858458430ea86487
refs/heads/master
2022-11-28T04:00:50.495882
2020-08-03T14:39:44
2020-08-03T14:39:44
null
0
0
null
null
null
null
UTF-8
C
false
false
2,295
h
ludwig.h
/* * ludwig.h * * Created by Emmanuel Leveque and Tobias Horstmann * Copyright 2016 CNRS. All rights reserved. * */ #define NSTEPS 1751 // results in a single domain passage #define period 10 // filter coefficient #define alpha 0.1 // Time-marching scheme: 0 -> Runge-Kutta 4; 1 -> Runge-Kutta 2 #define time_marching 0 // coefficient for hybrid recursive regularization #define sigma2 0.98 enum {E = 0, W, N, S}; enum {RHO=0, RHOUX, RHOUY, PXX, PXY, PYX, PYY}; enum {PIXX=3, PIXY, PIYX, PIYY}; enum {UXX=0, UXY, UYX, UYY}; #define max(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; }) #define min(a,b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; }) /* * * Y * ^ * | * | * Z ----> X * * periodic BC in all directions for root grid */ /* * CELL-CENTRED DATA POINTS */ // NS #define xMax_NS 100 #define yMax_NS 200 #define xMaxp_NS (xMax_NS + 2) // padded dimensions for periodic BC #define yMaxp_NS (yMax_NS + 2) // LB #define xMax_LB 100 #define yMax_LB 100 #define xMaxp_LB (xMax_LB + 2) // padded dimensions for periodic BC and transition overlay #define yMaxp_LB (yMax_LB + 2) /* * MESH */ #define NX_NS (xMax_NS + 1) #define NY_NS (yMax_NS + 1) #define NX_LB (xMax_LB + 1) #define NY_LB (yMax_LB + 1) // vertical displacement between NS and LB #define shift 50 #define i_c (i+1)/2 // shifted by 1 #define i_f i*2-1 // shifted by 1 #define NPOP 9 // model D2Q9 by default #define N_fcol xMaxp_LB * yMaxp_LB * NPOP * 2 #define IDF(i,j,l) (NPOP*((j)+yMaxp_LB*(i))+(l)) #define IDM_NS(i,j) (i) * yMaxp_NS + (j) #define IDM_LB(i,j) (i) * yMaxp_LB + (j) #define u2 ux*ux+uy*uy // shared variables extern const double w[NPOP]; extern const int ex[NPOP]; extern const int ey[NPOP]; extern const int finv[NPOP]; extern int current_slot, other_slot; extern double rho0; // density parameter extern const double Csound; // sound speed extern double U0, V0; // velocity parameter extern double Es; extern double Pref; // pressure reference extern double P0; // pressure parameter extern double viscosity; // viscosity extern double Mach; extern double Cs2; extern double invCs4; extern double Length; extern double pos; extern double DX; extern double Dt; extern double omega_g, tau, tau_g;
9e8103efbe389d542af2ca61977d71773a95448f
8ac6c4a2ba83d00d7e24f9831bb0c934ec83c81a
/Drv8302_freeRTOS_mkv46f256vlh16_sevro_soft/middleware/rtcesl/CM4F_RTCESL_4.5_IAR/AMCLIB/Include/amclib_FP.h
7b89037347a901b0943d83f4fefe083e85fcf1b0
[]
no_license
haliwt/freeRTOS_mkv46f256vlh16_servo
5ca3433195939ff72ff7c4b9c250d8fc4301af79
396fe932ec4d5b2ac25e2d265397365a24b4c9aa
refs/heads/master
2021-02-27T04:19:02.927951
2020-03-19T07:41:28
2020-03-19T07:41:28
245,578,109
0
0
null
null
null
null
UTF-8
C
false
false
3,822
h
amclib_FP.h
<?xml version="1.0" encoding="iso-8859-1"?> <project> <fileVersion>2</fileVersion> <configuration> <name>mk60d10</name> <toolchain> <name>ARM</name> </toolchain> <debug>1</debug> <settings> <name>General</name> <archiveVersion>3</archiveVersion> <data> <version>22</version> <wantNonLocal>1</wantNonLocal> <debug>1</debug> <option> <name>ExePath</name> <state>mk60d10\Exe</state> </option> <option> <name>ObjPath</name> <state>mk60d10\Obj</state> </option> <option> <name>ListPath</name> <state>mk60d10\List</state> </option> <option> <name>Variant</name> <version>21</version> <state>39</state> </option> <option> <name>GEndianMode</name> <state>0</state> </option> <option> <name>Input variant</name> <version>3</version> <state>0</state> </option> <option> <name>Input description</name> <state>Automatic choice of formatter.</state> </option> <option> <name>Output variant</name> <version>2</version> <state>0</state> </option> <option> <name>Output description</name> <state>Automatic choice of formatter.</state> </option> <option> <name>GOutputBinary</name> <state>0</state> </option> <option> <name>FPU</name> <version>5</version> <state>0</state> </option> <option> <name>OGCoreOrChip</name> <state>1</state> </option> <option> <name>GRuntimeLibSelect</name> <version>0</version> <state>1</state> </option> <option> <name>GRuntimeLibSelectSlave</name> <version>0</version> <state>1</state> </option> <option> <name>RTDescription</name> <state>Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state> </option> <option> <name>OGProductVersion</name> <state>6.60.1.5099</state> </option> <option> <name>OGLastSavedByProductVersion</name> <state>7.40.2.8567</state> </option> <option> <name>GeneralEnableMisra</name> <state>0</state> </option> <option> <name>GeneralMisraVerbose</name> <state>0</state> </option> <option> <name>OGChipSelectEditMenu</name> <state>MK60DN512Zxxx10 Freescale MK60DN512Zxxx10</state> </option> <option> <name>GenLowLevelInterface</name> <state>1</state> </option> <option> <name>GEndianModeBE</name> <state>1</state> </option> <option> <name>OGBufferedTerminalOutput</name> <state>0</state> </option> <option> <name>GenStdoutInterface</name> <state>0</state> </option> <option> <name>GeneralMisraRules98</name> <version>0</version> <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state> </option> <option> <name>GeneralMisraVer</name> <state>0</state> </option> <option> <name>GeneralMisraRules04</name> <version>0</version> <state>11110111001011111
bcdabdc434a9a60af9ec7fa58199d08a8b331d21
6048e4d4b3495fb06366ce890d2498efed2b14f6
/hw5/Jiyu_Huang_tests/bad_arg.c
d1abe1fb75f7525d31dfb8d122be74d42d6b05fa
[]
no_license
JiyuHuang/BMC-CS355
2481d9b12d9f699fbcf6bcf1f6269878a83738d3
6efe1d74050df2be932e5406b38405892edd99b0
refs/heads/master
2020-09-07T21:08:58.473348
2019-11-11T06:15:09
2019-11-11T06:15:09
220,910,596
0
0
null
2019-11-11T05:51:52
2019-11-11T05:51:51
null
UTF-8
C
false
false
295
c
bad_arg.c
#include <stdlib.h> #include <unistd.h> #include "mem.h" int main() { if (!Mem_Init(0)) return EXIT_FAILURE; if (!Mem_Init(-1)) return EXIT_FAILURE; if (Mem_Init(getpagesize())) return EXIT_FAILURE; if (!Mem_Init(getpagesize())) return EXIT_FAILURE; return EXIT_SUCCESS; }
8afe26aaa9058761cb44eb1bdf130d73b4a33daf
fac1cedd69a722601c3c6f610b9d9deb3944c7ad
/tests/c-tests/basic_lexicon.c
3fdf50d791a0b0fd5dc0f901b1660aef3f5460b1
[ "MIT" ]
permissive
yjh0502/traildb
07b762b0b37b22c9a3a038d9b7faa68c6642c2b0
b70d9e98eac3b3887f0adc8fe2750b0d4d4b94a4
refs/heads/master
2020-12-27T03:46:17.351224
2020-02-02T10:25:02
2020-02-02T10:25:02
237,753,573
0
1
null
2020-02-02T10:24:03
2020-02-02T10:24:02
null
UTF-8
C
false
false
2,107
c
basic_lexicon.c
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> #include <traildb.h> #include "tdb_test.h" static uint8_t uuid[16]; int main(int argc, char** argv) { /* note that the order of values1, values2, values3 makes a difference here: We want to insert a longer string first (len(blue) > len(red)) since the small case of judy_str_map reorders these strings (red comes before blue). We want to test that this case is handled correctly. */ const char *fields[] = {"a", "b"}; const char *values1[] = {"blue", "blue1"}; const uint64_t lengths1[] = {4, 5}; const char *values2[] = {"red", "red1"}; const uint64_t lengths2[] = {3, 4}; const char *values3[] = {"0123456789", "red1"}; const uint64_t lengths3[] = {10, 4}; const char *p; uint64_t len; tdb_cons* c = tdb_cons_init(); test_cons_settings(c); assert(tdb_cons_open(c, getenv("TDB_TMP_DIR"), fields, 2) == 0); tdb_cons_add(c, uuid, 0, values1, lengths1); tdb_cons_add(c, uuid, 0, values2, lengths2); tdb_cons_add(c, uuid, 0, values3, lengths3); assert(tdb_cons_finalize(c) == 0); tdb_cons_close(c); tdb *t = tdb_init(); assert(tdb_open(t, getenv("TDB_TMP_DIR")) == 0); assert(tdb_lexicon_size(t, 0) == 0); assert(tdb_lexicon_size(t, 1) == 4); assert(tdb_lexicon_size(t, 2) == 3); p = tdb_get_value(t, 1, 0, &len); assert(len == 0); assert(memcmp(p, "", len) == 0); p = tdb_get_value(t, 1, 1, &len); assert(len == 4); assert(memcmp(p, "blue", len) == 0); p = tdb_get_value(t, 1, 2, &len); assert(len == 3); assert(memcmp(p, "red", len) == 0); p = tdb_get_value(t, 1, 3, &len); assert(len == 10); assert(memcmp(p, "0123456789", len) == 0); p = tdb_get_value(t, 2, 0, &len); assert(len == 0); assert(memcmp(p, "", len) == 0); p = tdb_get_value(t, 2, 1, &len); assert(len == 5); assert(memcmp(p, "blue1", len) == 0); p = tdb_get_value(t, 2, 2, &len); assert(len == 4); assert(memcmp(p, "red1", len) == 0); return 0; }
22b9bbe040261f030f77c1998683812ccc93c253
fdff4293793c8df49ce2132a7f7b108e59bb6356
/main.c
9aa34ea600905c46ca843136b16af1a025a8d9be
[]
no_license
Mabedin00/dir
a663f1eee8bf63253c1a69c63fd017e19baccc1a
95b3ef9ed0ec367c03b33cf87c401a3617cbc168
refs/heads/master
2020-09-11T20:41:57.250868
2019-11-19T00:47:49
2019-11-19T00:47:49
222,184,782
0
0
null
null
null
null
UTF-8
C
false
false
1,040
c
main.c
# include <stdlib.h> # include <stdio.h> # include <string.h> # include <sys/stat.h> # include <dirent.h> # include <sys/types.h> # include <errno.h> # include <unistd.h> int main(int argc, char* argv[]){ char dir [50]; if (argc <= 1){ printf("Showing current directory, if you want a different directory add DIR=<directory> after make run\n\n" ); strcpy(dir,"."); } else { strcpy(dir,argv[1]); } printf("Statistics for directory: %s\n", dir); DIR * d = opendir(dir); int i; struct dirent * directory; struct stat *file= malloc(sizeof(struct stat)); int totalSize = 0; for (; directory != NULL; directory = readdir(d)){ stat(directory->d_name, file); totalSize += file->st_size; if (directory->d_type == DT_DIR){ printf("Directory: %s\n", directory->d_name); } if (directory->d_type == DT_REG){ printf("Regular File: %s\n", directory->d_name); } } printf("Total size is %d\n", totalSize); }
0afa93ed70b45f9cb75bb65f5efa78916dc481d1
3a966bc4dd7b1424b040ea52599ef4b4a555eb0a
/srcs/proves.c
1eab42aeccd788309b4b6ebbd34c6d24ee6621b5
[]
no_license
pomponchik/fillit
3018a0e17c8ea330cd789884475e6a8000f2488b
f723031d625a3400a9549381c9bf25fda21719dd
refs/heads/master
2022-09-30T05:24:42.182397
2022-09-18T16:36:10
2022-09-18T16:36:10
170,916,578
0
1
null
2019-02-25T22:05:18
2019-02-15T19:21:52
C
UTF-8
C
false
false
1,957
c
proves.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* proves.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ahalmon- <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/02/20 05:34:23 by ahalmon- #+# #+# */ /* Updated: 2019/02/20 05:38:34 by ahalmon- ### ########.fr */ /* */ /* ************************************************************************** */ #include "head.h" static int letters_prove(t_list *lst) { char *str; size_t index; while (lst) { str = lst->content; index = 0; while (str[index]) { if (str[index] == '.' || str[index] == '#') index++; else return (0); } lst = lst->next; } return (1); } static int number_lattice_prove(t_list *lst) { size_t index; index = 0; while (lst) { index += ft_numch(lst->content, '#'); lst = lst->next; } if (index != 4) return (0); return (1); } static int width_and_height_lst_prove(t_list *lst) { size_t width_counter; size_t height_counter; if (!lst) return (0); height_counter = 0; while (lst) { width_counter = ft_strlen(lst->content); height_counter++; if (width_counter != 4) return (0); lst = lst->next; } if (height_counter != 4) return (0); return (1); } int proves(t_list *chain) { if (!width_and_height_lst_prove(chain)) return (0); if (!number_lattice_prove(chain)) return (0); if (!letters_prove(chain)) return (0); if (!links_prove(chain)) return (0); return (1); }
d4acbe2ed0374254fbeba757130a8b908eb00201
07664200f77c4d87baf972e367e772be8d5a65cd
/sys/crypto/sha1/sha1.h
a7ee13906f483c1ba6b1d6ac5a5bcca96a0acb09
[ "BSD-3-Clause", "BSD-4-Clause-UC" ]
permissive
TheSledgeHammer/2.11BSD_X44
77e0f9cab93eb3abb337dd6ab7530a317cceecbd
a342c2465bd295632d1b0ff1e3d11903bd9b2f4a
refs/heads/master
2023-08-29T12:24:17.677815
2023-08-29T11:30:11
2023-08-29T11:30:11
206,938,721
9
0
null
null
null
null
UTF-8
C
false
false
490
h
sha1.h
/* $NetBSD: sha1.h,v 1.3 2003/07/08 06:18:00 itojun Exp $ */ /* * SHA-1 in C * By Steve Reid <steve@edmweb.com> * 100% Public Domain */ #ifndef _SHA1_H_ #define _SHA1_H_ typedef struct { u_int32_t state[5]; u_int32_t count[2]; u_char buffer[64]; } SHA1_CTX; __BEGIN_DECLS void SHA1Transform(u_int32_t[5], const u_char[64]); void SHA1Init(SHA1_CTX *); void SHA1Update(SHA1_CTX *, const u_char *, u_int); void SHA1Final(u_char[20], SHA1_CTX *); __END_DECLS #endif /* _SHA1_H_ */
cc54b484d9346a902224342d112bc47054c62bb0
6409376322c8cb807f2c1d1137affed097568842
/ITE_Castor3_SDK/sdk/driver/xcpu_master/file.c
e8aaf39bd925c7d15da41a24feca00f1fb0c42ec
[]
no_license
Music802/Midea_Hsg_SDK_V2281
141dd25eda566162eb95641c1f397cceb6ad12bf
0acf53d1d551d5092cf8e63e3a1ee7680c5edbd0
refs/heads/master
2021-08-22T21:21:29.821756
2017-12-01T09:49:34
2017-12-01T09:49:34
112,737,483
1
0
null
2017-12-01T12:28:13
2017-12-01T12:28:13
null
UTF-8
C
false
false
7,023
c
file.c
/* * Copyright (c) 2013 ITE Technology Corp. All Rights Reserved. */ /** @file file.c * * @version 0.1 */ #include "itx.h" #if ITX_BOOT_TYPE == ITX_HOST_BOOT #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "file.h" #include "xcpu_io.h" #include "sys_msgq.h" #include "xcpu_msgq.h" #include "pal.h" //============================================================================= // Constant Definition //============================================================================= #define OFFSET_OFFSET 8 #define HEADER1 ((((int)'S')<<24)+(((int)'M')<<16)+(((int)'E')<<8)+(((int)'D')<<0)) #define HEADER2 ((((int)'I')<<24)+(((int)'A')<<16)+(((int)'0')<<8)+(((int)'2')<<0)) //============================================================================= // Macro Definition //============================================================================= //============================================================================= // Structure Definition //============================================================================= //============================================================================= // Global Data Definition //============================================================================= //============================================================================= // Private Function Declaration //============================================================================= static int parser_rom(unsigned int* buffer, int* startAddr, unsigned int* pBinSize); //============================================================================= // Public Function Definition //============================================================================= //============================================================================= /** * Used to get the information (including the file size) of a specific file * identified by an unique id. * * @param id The corresponding id for a specific file. * @param ptInfo The output file information. * @return 0 If successful. Otherwise, return a nonzero value. */ //============================================================================= MMP_RESULT UserFileSize( MMP_UINT32* pFileSize) { MMP_RESULT errCode = MMP_RESULT_SUCCESS; MMP_UINT32 dwFileSize = 0; FILE* file; #if (ITX_BUS_TYPE == ITX_BUS_SPI) mmpSpiSetControlMode(SPI_CONTROL_NOR); #endif file = fopen(BOOT_FILE_PATH, "rb"); if (!file) printf("cannot open file: %s\n", BOOT_FILE_PATH); else printf("open file: %s\n", BOOT_FILE_PATH); if (file) { /*--- get file size ---*/ errCode = fseek(file, 0L, SEEK_END); if (errCode < 0) { dwFileSize = 0; } dwFileSize = ftell(file); errCode = fseek(file, 0L, SEEK_SET); if (errCode < 0) { dwFileSize = 0; } errCode = fclose(file); } else { errCode = MMP_RESULT_ERROR; } *pFileSize = dwFileSize; #if (ITX_BUS_TYPE == ITX_BUS_SPI) mmpSpiResetControl(); #endif return errCode; } //============================================================================= /** * Used to load the content of the specific file into buffer. * * @param id The corresponding id for a specific file. * @param pBuffer The output buffer. * @param size Maximum size in bytes to be loaded. * @return The number of bytes actually loaded. */ //============================================================================= MMP_RESULT UserFileLoad( MMP_UINT32 vRamAddress, MMP_UINT32 size) { MMP_RESULT errCode = MMP_RESULT_SUCCESS; MMP_UINT32 loadSize = 0; MMP_UINT32 totalLoadSize = 0; MMP_UINT8* buffer = NULL; MMP_UINT8* dstbuffer = NULL; MMP_UINT32 binSize = 0; MMP_UINT32 index = 0; FILE* file; #if (ITX_BUS_TYPE == ITX_BUS_SPI) mmpSpiSetControlMode(SPI_CONTROL_NOR); #endif file = fopen(BOOT_FILE_PATH, "rb"); if (file) { buffer = PalMalloc(size); if (buffer) { int startAddr; unsigned char* pStartBuffer = 0; loadSize = fread(buffer, 1, size, file); // skip script and decompress parser_rom((unsigned int*)buffer, &startAddr, &binSize); if (binSize) { dstbuffer = PalMalloc(binSize); PalMemset(dstbuffer, 0xFF, binSize); } //printf("[Get] startAddr:0x%x, bufstart: 0x%X, load:%u\n",startAddr, buffer, loadSize); { MMP_UINT32 inSize = loadSize - (startAddr - (unsigned int)buffer) - 4; pStartBuffer = ((unsigned char*) startAddr) + 4; printf("in: %u, outlen: %u\n", inSize, binSize); // decompress do_decompress(startAddr, dstbuffer); } #if (ITX_BUS_TYPE == ITX_BUS_SPI) mmpSpiResetControl(); mmpSpiSetControlMode(SPI_CONTROL_SLAVE); #endif xCpuIO_WriteMemory( vRamAddress + totalLoadSize, (MMP_UINT32)dstbuffer, binSize); #if (ITX_BUS_TYPE == ITX_BUS_SPI) mmpSpiResetControl(); mmpSpiSetControlMode(SPI_CONTROL_NOR); #endif //totalLoadSize += binSize; PalFree(buffer); PalFree(dstbuffer); } errCode = fclose(file); } #if (ITX_BUS_TYPE == ITX_BUS_SPI) mmpSpiResetControl(); mmpSpiSetControlMode(SPI_CONTROL_SLAVE); #endif return errCode; } int parser_rom(unsigned int* buffer, int* startAddr, unsigned int* pBinSize) { unsigned char* pCurPos = buffer; int scriptOffset = 0; int scriptLen = 0; int binSize = 0; int header1 = 0; int header2 = 0; header1 = (int) (pCurPos[0] << 24 | pCurPos[1] << 16 | pCurPos[2] << 8 | pCurPos[3]); header2 = (int) (pCurPos[4] << 24 | pCurPos[5] << 16 | pCurPos[6] << 8 | pCurPos[7]); if (header1 != HEADER1 && header2 != HEADER2) { return MMP_RESULT_ERROR; } pCurPos += OFFSET_OFFSET; scriptOffset = (int) (pCurPos[0] << 24 | pCurPos[1] << 16 | pCurPos[2] << 8 | pCurPos[3]); //printf("scrip offset: 0x%X\n", scriptOffset); pCurPos = ((unsigned char*) buffer + scriptOffset); scriptLen = (int) (pCurPos[0] << 24 | pCurPos[1] << 16 | pCurPos[2] << 8 | pCurPos[3]); //printf("scrip len: %u\n", scriptLen); pCurPos += (sizeof(int) + scriptLen * sizeof(int)); // CRC 4bytes, decompress bin size 4bytes, SMAZ 4bytes binSize = (int) (pCurPos[4] << 24 | pCurPos[5] << 16 | pCurPos[6] << 8 | pCurPos[7]); //printf("bin Size: %u\n", binSize); pCurPos += 12; *startAddr = pCurPos; *pBinSize = binSize; return MMP_RESULT_SUCCESS; } #endif
4054caa0d21ee7267a324aa6be154b69b40cfc74
9149f6d01d24ee76fe90df4d927379c51f13e1cb
/HARDWARE/OV7670/ov7670.h
e234da76ee8c77a1b2803cb6e44d4632ebf6600b
[]
no_license
weimaqi/The-Fingerprint-Lock
80517ff783473f16f1c447679e94265d60e97201
6f308179bd31154e064fce5775de48c679ea94c3
refs/heads/master
2021-04-27T05:40:24.846149
2017-09-17T08:22:04
2017-09-17T08:22:04
122,600,221
1
0
null
2018-02-23T09:25:52
2018-02-23T09:25:52
null
GB18030
C
false
false
1,524
h
ov7670.h
#ifndef _OV7670_H #define _OV7670_H #include "sys.h" #include "sccb.h" ////////////////////////////////////////////////////////////////////////////////// //本程序参考自网友guanfu_wang代码。 //ALIENTEK战舰STM32开发板V3 //OV7670 驱动代码 //正点原子@ALIENTEK //技术论坛:www.openedv.com //创建日期:2015/1/18 //版本:V1.0 ////////////////////////////////////////////////////////////////////////////////// #define OV7670_VSYNC PAin(8) //同步信号检测IO #define OV7670_WRST PBout(7) //写指针复位 #define OV7670_WREN PGout(9) //写入FIFO使能 #define OV7670_RCK_H GPIOA->BSRRL=GPIO_Pin_6//设置读数据时钟高电平 #define OV7670_RCK_L GPIOA->BSRRH=GPIO_Pin_6 //设置读数据时钟低电平 #define OV7670_RRST PAout(4) //读指针复位 #define OV7670_CS PGout(15) //片选信号(OE) #define OV7670_DATA ((GPIOC->IDR&0x0040)>>6)&0x01 | ((GPIOC->IDR&0x0080)>>6)&0x02 | ((GPIOC->IDR&0x0100)>>6)&0x04 | ((GPIOC->IDR&0x0200)>>6)&0x08 | ((GPIOC->IDR&0x0800)>>7)&0x10 | ((GPIOB->IDR&0x0100)>>3)&0x20 | ((GPIOE->IDR&0x0020)<<1)&0x40 | ((GPIOE->IDR&0x0040)<<1)&0x80 ///////////////////////////////////////// u8 OV7670_Init(void); void OV7670_Light_Mode(u8 mode); void OV7670_Color_Saturation(u8 sat); void OV7670_Brightness(u8 bright); void OV7670_Contrast(u8 contrast); void OV7670_Special_Effects(u8 eft); void OV7670_Window_Set(u16 sx,u16 sy,u16 width,u16 height); #endif
90c7fa308347307155d64a949b6af4654a82836a
2334ccad25f56ba53becb1ecd0f28e4f09985fde
/proj2/shared.c
ec6da769c3a679775ab11295c0dc49df21169e43
[]
no_license
marques999/feup-rcom
e9f29008a801fbdb357c56f50ebe518898f98c16
28ead50855ece724b114858b9c11ca99f8dd4b26
refs/heads/master
2020-12-25T02:11:04.591666
2015-12-20T12:34:35
2018-10-20T13:46:16
42,989,898
1
0
null
null
null
null
UTF-8
C
false
false
1,530
c
shared.c
#include "shared.h" void clearBuffer() { int c; while ((c = getchar()) != '\n' && c != EOF); } int readInteger(int start, int end) { int input; while (1) { printf("? "); if (scanf("%d", &input) == 1 && input >= start && input <= end) { break; } puts("[ERROR] you have entered an invalid value, please try again..."); clearBuffer(); } return input; } char* readString() { char* input = malloc(PATH_MAX * sizeof(char)); while (1) { printf("? "); if (scanf("%s", input) == 1) { break; } puts("[ERROR] you have entered an invalid value, please try again..."); clearBuffer(); } return input; } long long getCurrentTime() { struct timeval te; gettimeofday(&te, NULL); return (te.tv_sec * 1000LL) + (te.tv_usec / 1000LL); } char* getIP(const char* hostName) { struct hostent *h = gethostbyname(hostName); if (h == NULL) { puts("[ERROR] unknown host, check your network connection!"); return NULL; } return inet_ntoa(*((struct in_addr *)h->h_addr)); } void logProgress(double current, double total, double speed) { int i; if (total > 0.0) { const double percentage = 100.0 * current / total; const int progressLength = 40; const int pos = (int)(percentage * progressLength / 100.0); printf("\033cCompleted: %6.2f%% [", percentage); for (i = 0; i < progressLength; i++) { i <= pos ? printf("=") : printf(" "); } printf("] %.2f kBytes/sec\n", speed); } else { printf("\033c%.2f kBytes written, %.2f kBytes/sec\n", current * 0.001, speed); } }
48879cf64bfad97daf2c27180ce0840aa1babb8e
02520d761773c75f7dab92a9dc317a37514c9011
/I2C.h
b9d1b66aede8748ca47204f19a1820fe4f66337d
[]
no_license
Jhosep99/Parqueadero-Automatizado
b5f6089bf6742d964b942c8161bc45f082924200
e2ebfa3450368748a39bde8b127adc1137cc36c8
refs/heads/main
2023-08-13T02:23:10.683548
2021-10-12T04:43:31
2021-10-12T04:43:31
416,183,133
0
0
null
null
null
null
UTF-8
C
false
false
1,413
h
I2C.h
/* * File: I2C.h * Author: jdgar * * Created on 11 de octubre de 2021, 11:29 AM */ #ifndef I2C_H #define I2C_H #define _XTAL_FREQ 900000 #include <xc.h> void I2C_Init(unsigned long FOSC); void I2C_Condiciones_Espera(); void I2C_Start(); void I2C_Stop(); void I2C_Enviar(char dato); void I2C_Reiniciar(); unsigned char I2C_Read(); void I2C_Init(unsigned long FOSC){ TRISC4 = 1; //Sda TRISC3 = 1; //Scl SSPSTATbits.SMP=1; // frec 100Khz a 1Mhz SSPCONbits.SSPEN=1; // habilitamos modulos i2c SSPCONbits.SSPM=0b1000; // FOSC = _XTAL/(4*SSPADD+1) SSPADD = (unsigned int)((_XTAL_FREQ/(4.0*FOSC))-1); SSPCON2=0x00; } void I2C_Condiciones_Espera(){ while( (SSPCON2 & 0x1F ) || (SSPSTAT & 0x04) ); } void I2C_Start(){ I2C_Condiciones_Espera(); SSPCON2bits.SEN=1; } void I2C_Stop(){ I2C_Condiciones_Espera(); SSPCON2bits.PEN=1; } void I2C_Enviar(char dato){ I2C_Condiciones_Espera(); SSPBUF=dato; } void I2C_Reiniciar(){ I2C_Condiciones_Espera(); SSPCON2bits.RSEN =1; } unsigned char I2C_Read(){ unsigned char datoR; I2C_Condiciones_Espera(); SSPCON2bits.RCEN=1; I2C_Condiciones_Espera(); datoR = SSPBUF; I2C_Condiciones_Espera(); SSPCON2bits.ACKDT = 1; SSPCON2bits.ACKEN=1; return datoR; } #endif /* I2C_H */
0c8896431f02686b3d56ab13d460d311020bfbe5
4e2230746514e3b4ad1692f94de4c81c81de20e1
/(五).4.c
f1c3244298de3dce82786c89be4d6d9e930ea971
[]
no_license
jfz2016666/c-
428d6798f371d503b253d4fc80f8f0259088c70f
da74443fe70ea5c10431696bb21335919afdec10
refs/heads/master
2020-03-09T18:46:30.317498
2018-06-12T09:54:34
2018-06-12T09:54:34
128,940,530
0
0
null
null
null
null
UTF-8
C
false
false
544
c
(五).4.c
#include <stdio.h> #include <stdlib.h> #define N 10 void shift(p,x) float *p; int x; { float a[N],*q,*o;int i; o=a;q=p; for(i=0;i<x;i++) *(o+i)=*(q+N-x+i); for(p=p+N-1;p>=q;p--) *p=*(p-x); for(i=0;i<x;i++) *(q+i)=*(o+i); return; } /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { float shuzhu[N],*u,*v; int h,i;u=v=shuzhu; scanf("%f",&h); for(;u<v+N;u++) scanf("%f",u); shift(v,h); for(u=v;u<v+N;u++) printf("%.2f",*u); printf("\n"); return 0; }
d3f94af6fdb801a1179aaaa0e6900d2078fe6fdd
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/linux/drivers/pci/controller/dwc/extr_pcie-kirin.c_kirin_pcie_add_msi.c
c3accbd4ddf23bef24e01a33ed30e5c74a2f6411
[]
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,105
c
extr_pcie-kirin.c_kirin_pcie_add_msi.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_2__ TYPE_1__ ; /* Type definitions */ struct platform_device {int /*<<< orphan*/ dev; } ; struct TYPE_2__ {int msi_irq; } ; struct dw_pcie {TYPE_1__ pp; } ; /* Variables and functions */ int /*<<< orphan*/ CONFIG_PCI_MSI ; scalar_t__ IS_ENABLED (int /*<<< orphan*/ ) ; int /*<<< orphan*/ dev_err (int /*<<< orphan*/ *,char*,int) ; int platform_get_irq (struct platform_device*,int /*<<< orphan*/ ) ; __attribute__((used)) static int kirin_pcie_add_msi(struct dw_pcie *pci, struct platform_device *pdev) { int irq; if (IS_ENABLED(CONFIG_PCI_MSI)) { irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "failed to get MSI IRQ (%d)\n", irq); return irq; } pci->pp.msi_irq = irq; } return 0; }
8976900db2f1720ddc69cd977ffa7576e4877170
f8368db646ee8e864b8f5fb43f7a9a3d01cd2e7b
/src/fluidSolvers/pimpleFluid/UEqn.H
47e4bf58e64176d69d34e0a0310274bf1f3e6fe8
[]
no_license
SPHewitt/OpenFPCI
6550e93474f3d2aee6bf8172e872de6199043f0e
f7bec22545b776ae524acbec27474a5420219023
refs/heads/master
2021-01-22T18:24:39.340877
2019-07-23T09:38:25
2019-07-23T09:38:25
86,063,738
16
7
null
null
null
null
UTF-8
C
false
false
486
h
UEqn.H
fvVectorMatrix UEqn ( fvm::ddt(U_) + fvm::div(phi_, U_) + turbulence_->divDevReff() ); /* if (oCorr == nOuterCorr - 1) { if (mesh.solutionDict().relax("UFinal")) { UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal")); } else { UEqn.relax(1); } } else { UEqn.relax(); } */ if (momentumPredictor) { //solve(UEqn == -fvc::grad(p_)); solve(UEqn == -gradp_); }
50877da737d0f00290f7b6063821f9c152489e4a
4ca902ecf839162092049a3909a72be3d2efce45
/common.h
98dbe3ca1c238bf1462ffe815bc3ddb3efb69349
[]
no_license
PSP-Archive/CustomHOME
8c2be175b4f20bf5b1511a3736d6cc74f175760b
313307b1f0e62b326ee57412911cced0c089cd7d
refs/heads/main
2023-02-07T16:31:56.135881
2021-01-02T13:37:09
2021-01-02T13:37:09
326,155,018
1
0
null
null
null
null
SHIFT_JIS
C
false
false
3,952
h
common.h
#ifndef COMMON_H #define COMMON_H #include <pspctrl.h> #include <pspctrl_kernel.h> #include <pspdisplay.h> #include <pspdisplay_kernel.h> #include <pspimpose_driver.h> #include <pspkernel.h> #include <pspmoduleinfo.h> #include <psppower.h> #include <psprtc.h> #include <pspsdk.h> #include <pspsysevent.h> #include <kubridge.h> #include <systemctrl.h> #include <systemctrl_se.h> #include <stdarg.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <locale.h> #include "cmlib/cmlibaudio.h" #include "cmlib/cmlibctrl.h" #include "cmlib/cmlibmenu.h" #include "syslibc/sysclib.h" #include "struct.h" #include "cushome.h" #include "pict/pict.h" #include "memory.h" #include "libinip.h" #include "color.h" #include "states.h" #include "getname.h" #include "menu.h" #include "thread.h" //マクロ-------------------------------------------------------- //#define MAKE_CALL(a, f) _sw(0x0C000000 | (((u32)(f) >> 2) & 0x03FFFFFF), a); #define MAKE_JUMP(a, f) _sw(0x08000000 | (((u32)(f) & 0x0ffffffc) >> 2), a); //#define PSP_FIRMWARE(f) ((((f >> 8) & 0xF) << 24) | (((f >> 4) & 0xF) << 16) | ((f & 0xF) << 8) | 0x10) #define EBOOTBIN "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN" #define UMDSFO "disc0:/PSP_GAME/PARAM.SFO" libm_draw_info dinfo; libm_vram_info vinfo; libm_draw_info bar_d[4]; libm_vram_info bar_v[4]; libm_draw_info menu_d; libm_vram_info menu_v; libm_draw_info check_d; libm_vram_info check_v; extern String string; extern CONFIG conf; extern bool setting_flag, states_flag, menu_flag; extern bool thread; extern int model; extern char prxPath[]; extern char imagePath[]; extern char drive[]; extern bool check_flag; extern int setting_pos, menu_pos; extern char dialog_str[]; extern int usb; extern int right_pos[]; extern char gamename[]; extern char *gameid; extern bool StopGame; extern bool maskflag, muteflag; extern bool sub_flag; extern bool suspendCB; extern bool once_print[]; extern char *ColorList[]; extern int backKey, selectKey; extern u32 draw_p; extern u32 color[]; //スレッド停止 #define LIBM_TSUSPEND LIBM_TCMD_SUSPEND #define LIBM_TRESUME LIBM_TCMD_RESUME #define MAX_NUMBER_OF_THREADS 64 #define PSP_SYSEVENT_SUSPEND_QUERY 0x100 #define ITEM_COUNT 80 u16 *tempar; #define home_col 0x9ce7 typedef enum { Color_none, Color_main_b, Color_main_f, Color_nom_b1, Color_nom_b2, Color_nom_f1, Color_nom_f2, Color_act_b1, Color_act_f1, Color_bright, Color_bat_gre, Color_bat_yel, Color_bat_ora, Color_bat_red } Color_num; //********************************************************* // 文字列 String の文字列 From を文字列 To で置換する。 // 置換後の文字列 String のサイズが String の記憶領域を超える場合の動作は未定義。 //********************************************************* char *StrReplace( char *String, const char *From, const char *To ); void Redraw(); int mySuspendThread(); int myResumeThread(); int loadLibraries( void ); int GetColerNum(int color); void SetColorName(int num, int colornum); int sceKernelCheckExitCallback(void); int LoadStartModule(char *module); int connect_usb(); int DialogMethod(); void DrowMethod(); void CloseMethod(); char *GetMenuStr(int num); u32 GetHomeAddr(); void PspLsLibrarySaveStates(char number, int flag); void PspLsLibraryLoadStates(char number, int flag); void ClearCaches(void); int Callback_Suspend(int ev_id, char *ev_name, void *param, int *result); void GetButtons(SceCtrlData *pad, int fwait, int nwait, int (*func)(bool check, int button, void *ptr_), void *ptr); void write_conf(CONFIG *conf_p); void make_conf(CONFIG *conf_p); //LoadExecVSH int LoadExecVSH(int apitype, char *path); void qsort(void *base, unsigned num, unsigned width, int (*comp)(const void *, const void *)); void *getmem_vram(int size); int free_vram(void *ptr); int draw_image(const char *path, u16 *vram); int init_image(const char *path, u16 *vram); #endif
dcdd946ad89858e1e721762e2f105f1000baebd8
aeb7a528f40d1d2e2244d2ee03d9c3b33d33a41e
/src/term_init.c
990aba5bc2ec07ff2a04fddba1f98d9eaf4fb8b3
[]
no_license
r-maury/ft_select
34282e4941290eeb778453701ee0891285e4e106
26a5f1331f5fcf54cd412b237f080936a3bb7a44
refs/heads/master
2020-12-26T15:18:55.043155
2015-06-14T15:29:40
2015-06-14T15:29:40
33,137,082
0
0
null
null
null
null
UTF-8
C
false
false
1,498
c
term_init.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* term_init.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rmaury <rmaury@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/03/30 17:12:24 by rmaury #+# #+# */ /* Updated: 2015/06/14 17:28:59 by rmaury ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_select.h" void term_init(void) { char *name; struct termios term; if ((name = getenv("TERM")) == NULL || ft_strcmp(name, "") == 0) { ft_putendl("getenv error"); exit(1); } ft_putendl_fd(name, fd); if (tgetent(NULL, name) == ERR) { ft_putendl("tgetent error"); exit(1); } if (tcgetattr(0, &term) == -1) { ft_putendl("tgetattr error"); exit(1); } term.c_lflag &= ~(ICANON); term.c_lflag &= ~(ECHO); term.c_cc[VTIME] = 1; term.c_cc[VMIN] = 0; tcsetattr(0, TCSADRAIN, &term); ft_putstr_fd(tgetstr("vi", NULL), g_fd); ft_putstr_fd(tgetstr("ti", NULL), g_fd); }
fcbb5574e082ca63d4d7c318c0a59a0f2d3e1311
67f62674ad3aa8950e990001deed2e17007744f6
/src/github.com/getlantern/lantern-mobile/external/badvpn/flow/RouteBuffer.c
dec7be4ca9e6edeca298434bb1acd6463bd33ccf
[ "Apache-2.0" ]
permissive
Ethan561/lantern
da50b8089b87cf6bb86debb0785c5a884b85d0b7
f6a98cf108830b0f6a7743d4ba2fe5a2183a311c
refs/heads/devel
2021-07-01T12:42:55.135742
2018-07-25T21:54:01
2018-07-25T21:54:01
152,728,994
1
1
Apache-2.0
2020-09-02T04:15:20
2018-10-12T09:42:59
Go
UTF-8
C
false
false
6,950
c
RouteBuffer.c
/** * @file RouteBuffer.c * @author Ambroz Bizjak <ambrop7@gmail.com> * * @section LICENSE * * 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. * 3. Neither the name of the author nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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 AUTHOR 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 <stddef.h> #include <stdlib.h> #include <string.h> #include <misc/offset.h> #include <flow/RouteBuffer.h> static struct RouteBuffer_packet * alloc_packet (int mtu) { if (mtu > SIZE_MAX - sizeof(struct RouteBuffer_packet)) { return NULL; } // allocate memory struct RouteBuffer_packet *p = (struct RouteBuffer_packet *)malloc(sizeof(*p) + mtu); if (!p) { return NULL; } return p; } static int alloc_free_packet (RouteBuffer *o) { struct RouteBuffer_packet *p = alloc_packet(o->mtu); if (!p) { return 0; } // add to free packets list LinkedList1_Append(&o->packets_free, &p->node); return 1; } static void free_free_packets (RouteBuffer *o) { while (!LinkedList1_IsEmpty(&o->packets_free)) { // get packet struct RouteBuffer_packet *p = UPPER_OBJECT(LinkedList1_GetLast(&o->packets_free), struct RouteBuffer_packet, node); // remove from free packets list LinkedList1_Remove(&o->packets_free, &p->node); // free memory free(p); } } static void release_used_packet (RouteBuffer *o) { ASSERT(!LinkedList1_IsEmpty(&o->packets_used)) // get packet struct RouteBuffer_packet *p = UPPER_OBJECT(LinkedList1_GetFirst(&o->packets_used), struct RouteBuffer_packet, node); // remove from used packets list LinkedList1_Remove(&o->packets_used, &p->node); // add to free packets list LinkedList1_Append(&o->packets_free, &p->node); } static void send_used_packet (RouteBuffer *o) { ASSERT(!LinkedList1_IsEmpty(&o->packets_used)) // get packet struct RouteBuffer_packet *p = UPPER_OBJECT(LinkedList1_GetFirst(&o->packets_used), struct RouteBuffer_packet, node); // send PacketPassInterface_Sender_Send(o->output, (uint8_t *)(p + 1), p->len); } static void output_handler_done (RouteBuffer *o) { ASSERT(!LinkedList1_IsEmpty(&o->packets_used)) DebugObject_Access(&o->d_obj); // release packet release_used_packet(o); // send next packet if there is one if (!LinkedList1_IsEmpty(&o->packets_used)) { send_used_packet(o); } } int RouteBuffer_Init (RouteBuffer *o, int mtu, PacketPassInterface *output, int buf_size) { ASSERT(mtu >= 0) ASSERT(PacketPassInterface_GetMTU(output) >= mtu) ASSERT(buf_size > 0) // init arguments o->mtu = mtu; o->output = output; // init output PacketPassInterface_Sender_Init(o->output, (PacketPassInterface_handler_done)output_handler_done, o); // init free packets list LinkedList1_Init(&o->packets_free); // init used packets list LinkedList1_Init(&o->packets_used); // allocate packets for (int i = 0; i < buf_size; i++) { if (!alloc_free_packet(o)) { goto fail1; } } DebugObject_Init(&o->d_obj); return 1; fail1: free_free_packets(o); return 0; } void RouteBuffer_Free (RouteBuffer *o) { DebugObject_Free(&o->d_obj); // release packets so they can be freed while (!LinkedList1_IsEmpty(&o->packets_used)) { release_used_packet(o); } // free packets free_free_packets(o); } int RouteBuffer_GetMTU (RouteBuffer *o) { DebugObject_Access(&o->d_obj); return o->mtu; } int RouteBufferSource_Init (RouteBufferSource *o, int mtu) { ASSERT(mtu >= 0) // init arguments o->mtu = mtu; // allocate current packet if (!(o->current_packet = alloc_packet(o->mtu))) { goto fail0; } DebugObject_Init(&o->d_obj); return 1; fail0: return 0; } void RouteBufferSource_Free (RouteBufferSource *o) { DebugObject_Free(&o->d_obj); // free current packet free(o->current_packet); } uint8_t * RouteBufferSource_Pointer (RouteBufferSource *o) { DebugObject_Access(&o->d_obj); return (uint8_t *)(o->current_packet + 1); } int RouteBufferSource_Route (RouteBufferSource *o, int len, RouteBuffer *b, int copy_offset, int copy_len) { ASSERT(len >= 0) ASSERT(len <= o->mtu) ASSERT(b->mtu == o->mtu) ASSERT(copy_offset >= 0) ASSERT(copy_offset <= o->mtu) ASSERT(copy_len >= 0) ASSERT(copy_len <= o->mtu - copy_offset) DebugObject_Access(&b->d_obj); DebugObject_Access(&o->d_obj); // check if there's space in the buffer if (LinkedList1_IsEmpty(&b->packets_free)) { return 0; } int was_empty = LinkedList1_IsEmpty(&b->packets_used); struct RouteBuffer_packet *p = o->current_packet; // set packet length p->len = len; // append packet to used packets list LinkedList1_Append(&b->packets_used, &p->node); // get a free packet struct RouteBuffer_packet *np = UPPER_OBJECT(LinkedList1_GetLast(&b->packets_free), struct RouteBuffer_packet, node); // remove it from free packets list LinkedList1_Remove(&b->packets_free, &np->node); // make it the current packet o->current_packet = np; // copy packet if (copy_len > 0) { memcpy((uint8_t *)(np + 1) + copy_offset, (uint8_t *)(p + 1) + copy_offset, copy_len); } // start sending if required if (was_empty) { send_used_packet(b); } return 1; }
533bba3853d06ecfe1367a7b51399c53a155269a
f728faa83726aec6eaea71f2c36f6456dda6f64b
/inc/ft_lem_in.h
c7e06fcf686ede6b4a22abd1ec44b2006ce9d4cc
[]
no_license
Yserhii/Lem-in
0f874b198a333f03f3856ca8933e7642a417396a
2c3daf1eb0563918eceef4a30175e451d8ab2ba7
refs/heads/master
2020-07-12T01:45:40.076925
2019-08-28T10:07:01
2019-08-28T10:07:01
204,687,576
2
0
null
null
null
null
UTF-8
C
false
false
1,984
h
ft_lem_in.h
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lem_in.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: yserhii <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/04/22 16:21:35 by yserhii #+# #+# */ /* Updated: 2019/04/22 16:21:38 by yserhii ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef FT_LEM_IN_H # define FT_LEM_IN_H # include <libft.h> # include <errno.h> typedef struct s_room { int x; int y; int lvl; int road; int ant; int count_ant; char *name; t_list *head; struct s_room *parent; struct s_room *back; } t_room; typedef struct s_lem { int road; int ants; int count; int bonus; int numroad; int flag_end; int start_end; char *allmapread; t_list *head; t_room *end; t_room *start; t_room **mass; } t_lem; void read_graf(int fd, char *line, t_lem *lem); void search_ways(t_lem *lem); void sorting_way_for_up(t_lem *lem); void steps_ants(t_lem *lem); void clear_node(t_list *list, t_lem *lem); void save_way(t_list *head, t_lem *lem, int c); void ft_ants(char *line, t_lem *lem); void make_add_end(t_lem *lem); void ft_check_copy(t_list *head, t_room *room, char *line, char **str); char *co(int i, t_lem *lem); void bonus(t_lem *lem); void ft_check_copy_link(t_list *head, t_room *room1, t_room *room2, char *line); #endif
23464ae1f23f545bf62c5d240306d0938a1b72a9
a4819b28499b9e7d8a12719ca239d7dacb534a83
/kernel/include/arch/i386/isr.h
493b959f296719c3a2cdf8e8d110db38acbd5015
[]
no_license
valkheim/myos
6e69f4c85ed56502efe1a7c0a9ddc29d4ef2310f
5fc64f8e357fc3a90bcdc60efb81235e9b1a2f27
refs/heads/master
2022-04-04T16:39:01.681050
2020-02-03T19:25:46
2020-02-03T19:25:46
207,095,065
0
0
null
null
null
null
UTF-8
C
false
false
2,247
h
isr.h
#ifndef _KERNEL_ISR_H #define _KERNEL_ISR_H #include <stdint.h> // High level interrupt service routines typedef struct { uint32_t ds; // Data segment selector uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; // Pushed by pusha. uint32_t int_no, err_code; // Interrupt number and error code (if applicable) uint32_t eip, cs, eflags, useresp, ss; // Pushed by the processor automatically. } registers_t; typedef void (*isr_t)(registers_t); #define ISR0_DIVISION_BY_ZERO (0) // 0x00 #define ISR1 (1) // 0x01 #define ISR2 (2) // 0x02 #define ISR3 (3) // 0x03 #define ISR4 (4) // 0x04 #define ISR5 (5) // 0x05 #define ISR6 (6) // 0x06 #define ISR7 (7) // 0x07 #define ISR8 (8) // 0x08 #define ISR9 (9) // 0x09 #define ISR10 (10) // 0x0A #define ISR11 (11) // 0x0B #define ISR12 (12) // 0x0C #define ISR13 (13) // 0x0D #define ISR14_PAGE_FAULT (14) // 0x0E // ISR number 15 is reserved #define ISR16 (16) // 0x10 #define ISR17 (17) // 0x11 #define ISR18 (18) // 0x12 #define ISR19 (19) // 0x13 #define ISR20 (20) // 0x14 // ISR numbers 21-29 are reserved #define ISR30 (30) // 0x1E // ISR number 31 is reserved // Triple fault occurs on double fault handler exception extern char const * const fault_messages[]; // ISR handlers extern void isr0 (); extern void isr1 (); extern void isr2 (); extern void isr3 (); extern void isr4 (); extern void isr5 (); extern void isr6 (); extern void isr7 (); extern void isr8 (); extern void isr9 (); extern void isr10(); extern void isr11(); extern void isr12(); extern void isr13(); extern void isr14(); extern void isr15(); extern void isr16(); extern void isr17(); extern void isr18(); extern void isr19(); extern void isr20(); extern void isr21(); extern void isr22(); extern void isr23(); extern void isr24(); extern void isr25(); extern void isr26(); extern void isr27(); extern void isr28(); extern void isr29(); extern void isr30(); extern void isr31(); #endif
4b16dc7bc154febd7fd8330f1ed0eb2f890592f5
d9bf1824098f43c6ff5b7a93daf378ccb8c90f69
/proyecto_terminado (errores).c
bf28d4ceb2fe9f8305518e97a38d27d80ad48c53
[]
no_license
CristobalAvila18/Proyecto
a936a2e388bfea5047f3122c2a0c4afe7976478d
99e53e684f5b4b7691940530d0543af5bad7d606
refs/heads/master
2020-03-25T15:17:00.322990
2018-08-07T13:18:37
2018-08-07T13:18:37
143,875,780
0
0
null
null
null
null
ISO-8859-10
C
false
false
15,509
c
proyecto_terminado (errores).c
#include <stdio.h> #include <stdlib.h> #include <time.h> int quien_parte (){ int x; x = (rand() %2)+1; return x; } int turno_Cpu (){ int x; x = (rand() %8)+1; return x; } int comprobar_empate(int filas, int columnas, int tablero[filas][columnas]){ int cont=0; for (int i=0; i<filas;i++){ for (int j=0;j<columnas;j++){ if (tablero[i][j]!=32){ cont++; } } } if (cont==64){ printf(".......:::ha habido un empate, no hay ganador :::....."); return cont; } } int comprobar_diagonal (int ficha, int filaValida, int filas, int columnas,int columnasusuario, int tablero[filas][columnas]){ int winner=0; if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida+1][columnasusuario+1]== ficha)&&(tablero [filaValida+2][columnasusuario+2]== ficha) && (tablero [filaValida+3][columnasusuario+3] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida-1][columnasusuario-1]== ficha)&&(tablero [filaValida-2][columnasusuario-2]== ficha) && (tablero [filaValida-3][columnasusuario-3] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida-1][columnasusuario-1]== ficha)&&(tablero [filaValida-2][columnasusuario-2]== ficha) && (tablero [filaValida+1][columnasusuario+1] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida-1][columnasusuario-1]== ficha)&&(tablero [filaValida+1][columnasusuario+1]== ficha) && (tablero [filaValida+2][columnasusuario+2] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida+1][columnasusuario-1]== ficha)&&(tablero [filaValida+2][columnasusuario-2]== ficha) && (tablero [filaValida+3][columnasusuario-3] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida-1][columnasusuario+1]== ficha)&&(tablero [filaValida-2][columnasusuario+2]== ficha) && (tablero [filaValida-3][columnasusuario+3] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida-1][columnasusuario+1]== ficha)&&(tablero [filaValida-2][columnasusuario+2]== ficha) && (tablero [filaValida+1][columnasusuario-1] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida-1][columnasusuario+1]== ficha)&&(tablero [filaValida+1][columnasusuario-1]== ficha) && (tablero [filaValida+2][columnasusuario-2] == ficha)){ printf("Has completado 4 en Rayas en la diagonal \n"); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } return winner; } int comprobar_vertical (int ficha, int filaValida, int filas, int columnas,int columnasusuario, int tablero[filas][columnas]){ int winner=0; if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida+1][columnasusuario]== ficha)&&(tablero [filaValida+2][columnasusuario]== ficha) && (tablero [filaValida+3][columnasusuario] == ficha)){ printf("Has completado 4 en Rayas en la columna %d \n", columnasusuario+1); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } return winner; } int comprobar_horizontal (int ficha, int filaValida, int filas, int columnas,int columnasusuario, int tablero[filas][columnas]){ int winner=0; if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida][columnasusuario+1]== ficha)&&(tablero [filaValida][columnasusuario+2]== ficha) && (tablero [filaValida][columnasusuario+3] == ficha)){ printf("Has completado 4 en Rayas en la fila %d \n", filaValida+1); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida][columnasusuario-1]== ficha)&&(tablero [filaValida][columnasusuario-2]== ficha) && (tablero [filaValida][columnasusuario-3] == ficha)){ printf("Has completado 4 en Rayas en la fila %d \n", filaValida+1); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida][columnasusuario-1]== ficha)&&(tablero [filaValida][columnasusuario-2]== ficha) && (tablero [filaValida][columnasusuario+1] == ficha)){ printf("Has completado 4 en Rayas en la fila %d \n", filaValida+1); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } if((tablero [filaValida][columnasusuario]== ficha) && (tablero [filaValida][columnasusuario-1]== ficha)&&(tablero [filaValida][columnasusuario+1]== ficha) && (tablero [filaValida][columnasusuario+2] == ficha)){ printf("Has completado 4 en Rayas en la fila %d \n", filaValida+1); printf("......:::FELICIDADES!! :::.... \n"); winner=1; } return winner; } void imprimir (int filas, int columnas, int tablero [filas][columnas]){ for (int i=0; i<filas; i++){ for (int j=0; j<columnas;j++){ printf("[%c] ", tablero[i][j]); } printf("\n"); } } void posicionar_ficha (int filas,int filaValida, int columnas, int columnausuario, int tablero [filas][columnas], int ficha){ tablero[filaValida][columnausuario]= ficha; } void crear_tablero(int filas, int columnas, int tablero[filas][columnas]){ for (int i=0; i<filas;i++){ for (int j=0;j<columnas;j++){ tablero[i][j] = 32; } } } int validar_fila (int filas, int columnas, int columnausuario, int tablero [filas][columnas]){ while(tablero [filas][columnausuario]!= 32){ filas--; if(tablero[0][columnausuario]!=32){ printf("la columna se encuentra llena, usted pierde turno, le toca al otro jugador\n"); printf("ingrese otra columna que no este llena para continuar\n"); printf("\n\n"); break; } } return filas; } int main (){ int filas=8; int columnas=8; int tablero[filas][columnas]; int opcionjuego,z, ganador=0, turno, columnausuario, continuar; int jug1_ficha = 88, jug2_ficha = 79; int filaValida; int verti,hori,diago; int jugar=1; int empate; srand(time(NULL)); while (jugar==1){ crear_tablero(filas, columnas, tablero); printf(".........:::Bienvenido al Juego 4 en Rayas ICB:::........... \n \n"); printf("::: Por favor indique la modalidad de juego que desea ::: \n \n"); printf("::: Opcion '1': Jugador 1 Vs Jugador 2 :::\n"); printf("::: Opcion '2': Jugador 1 Vs CPU :::\n\n"); printf(" :::Ingrese la Opcion, la cual sera la modalidad del juego ::: \n"); scanf("%d", &opcionjuego); while (opcionjuego!=1 && opcionjuego!=2){ printf("::: Opcion no valida, ingrese nuevamente :::\n"); scanf("%d", &opcionjuego); } system("clear"); if (opcionjuego==1){ printf("\n"); printf(" ...::modo de juego : Jugador 1 vs Jugador 2:::... \n\n"); printf("En el juego se puede ser 'El Jugador 1' o 'El Jugador 2'\n"); printf(" Usted es el Jugador 1 y su compaņero el Jugador 2 \n"); printf("Presione el numero cero para continuar \n :::::................\n"); scanf("%d", &continuar); while (continuar!=0){ system("clear"); printf("Por favor ingresa el numero '0' si deseas continuar\n"); scanf("%d", &continuar); } system("clear"); z= quien_parte(); printf("Quien partira el juego es el Jugador : %d\n\n", z); turno=z; imprimir(filas, columnas, tablero); while(ganador==0){ if(turno==1){ printf("Jugador %d, ingrese en que columna insertara su ficha \n",turno); scanf("%d", &columnausuario); columnausuario--; system("clear"); while((columnausuario>7) || (columnausuario<0)){ printf("Columna no valida, ingrese nuevamente \n"); scanf("%d",& columnausuario); columnausuario--; break; } filaValida = validar_fila(filas, columnas,columnausuario,tablero); posicionar_ficha(filas, filaValida, columnas , columnausuario, tablero, jug1_ficha); imprimir(filas, columnas, tablero); hori=comprobar_horizontal(jug1_ficha,filaValida,filas,columnas,columnausuario,tablero); verti= comprobar_vertical(jug1_ficha,filaValida,filas,columnas,columnausuario,tablero); diago=comprobar_diagonal(jug1_ficha,filaValida,filas,columnas,columnausuario,tablero); empate=comprobar_empate(filas,columnas,tablero); if(empate==64){ break; } if ((hori==1) || (verti==1)||(diago==1)){ printf("Ganador Jugador %d", turno); printf("....::: BIEN JUGADO :::....\n\n"); break; } else { turno=2; } } if(turno==2){ printf("Jugador %d, ingrese en que columna insertara su ficha \n",turno); scanf("%d", &columnausuario); columnausuario--; system("clear"); while((columnausuario>7) || (columnausuario<0)){ printf("Columna no valida, ingrese nuevamente \n"); scanf("%d",& columnausuario); columnausuario--; break; } filaValida = validar_fila(filas, columnas,columnausuario,tablero); posicionar_ficha(filas, filaValida, columnas, columnausuario, tablero, jug2_ficha); imprimir(filas, columnas, tablero); verti= comprobar_vertical(jug2_ficha,filaValida,filas,columnas,columnausuario,tablero); hori= comprobar_horizontal(jug2_ficha,filaValida,filas,columnas,columnausuario,tablero); diago=comprobar_diagonal(jug2_ficha,filaValida,filas,columnas,columnausuario,tablero); empate=comprobar_empate(filas,columnas,tablero); if(empate==64){ break; } if ((hori==1) || (verti==1)||(diago==1)){ printf("Ganador Jugador %d", turno); printf("....::: BIEN JUGADO :::....\n\n"); break; } else { turno=1; } } } printf("DESEAS JUGAR OTRA VEZ?? \n\n"); printf(" .....:::'1' = SI '2' = NO :::...."); scanf("%d", &jugar); } system("clear"); if (opcionjuego==2){ z=quien_parte(); turno=z; printf("......::::Bievenido a la modalidad de juego 1 vs CPU :::.......\n\n"); if(z==1){ printf("Parte el Jugador 1 tirando \n"); } else{ printf("Parte la CPU jugando \n"); } while(ganador==0){ if(turno==1){ printf("Jugador %d, ingrese en que columna insertara su ficha \n",turno); scanf("%d", &columnausuario); columnausuario--; system("clear"); while((columnausuario>7) || (columnausuario<0)){ printf("Columna no valida, ingrese nuevamente \n"); scanf("%d",& columnausuario); columnausuario--; break; } filaValida = validar_fila(filas, columnas,columnausuario,tablero); posicionar_ficha(filas, filaValida, columnas , columnausuario, tablero, jug1_ficha); imprimir(filas, columnas, tablero); hori=comprobar_horizontal(jug1_ficha,filaValida,filas,columnas,columnausuario,tablero); verti= comprobar_vertical(jug1_ficha,filaValida,filas,columnas,columnausuario,tablero); diago=comprobar_diagonal(jug1_ficha,filaValida,filas,columnas,columnausuario,tablero); empate=comprobar_empate(filas,columnas,tablero); if(empate==64){ break; } if ((hori==1) || (verti==1)||(diago==1)){ printf("Ganador Jugador %d", turno); printf("....::: BIEN JUGADO :::....\n\n"); break; } else{ turno=2; } } if(turno==2){ columnausuario= turno_Cpu(); columnausuario--; system("clear"); filaValida = validar_fila(filas, columnas,columnausuario,tablero); posicionar_ficha(filas, filaValida, columnas, columnausuario, tablero, jug2_ficha); imprimir(filas, columnas, tablero); verti=comprobar_vertical(jug2_ficha,filaValida,filas,columnas,columnausuario,tablero); hori=comprobar_horizontal(jug2_ficha,filaValida,filas,columnas,columnausuario,tablero); diago=comprobar_diagonal(jug2_ficha,filaValida,filas,columnas,columnausuario,tablero); empate=comprobar_empate(filas,columnas,tablero); if(empate==64){ break; } if ((hori==1) || (verti==1)||(diago==1)){ printf("HA GANADO LA CPU \n"); printf("....::: HAS PERDIDO, MAS SUERTE LA PROXIMA VEZ:::..... \n\n"); printf("....::: BIEN JUGADO :::....\n\n"); jugar=0; break; } else{ turno=1; } } } printf("DESEAS JUGAR OTRA VEZ?? \n\n"); printf(" .....:::'1' = SI '2' = NO :::...."); scanf("%d", &jugar); } system("clear"); } return 0; }
708f3c6cf05d71ed91bea02908a9fbf8589a9c89
1f5767c8a5fc72be6aa178b8250dc42c369e9068
/Lab5/Example 8.4.c
7bc3b472a9cf8d3bb750c1d1833af2a8c30e9841
[]
no_license
hellvn/Elementary_Programing_with_C
1ff56b31dad3c97740bb5f9c0a7619aac6dcec34
8c6ac1f9511f32ce3116a531933d334d8e73540c
refs/heads/main
2023-02-08T11:29:51.695991
2021-01-04T11:42:15
2021-01-04T11:42:15
326,664,475
0
0
null
null
null
null
UTF-8
C
false
false
380
c
Example 8.4.c
#include<stdio.h> #include<conio.h> void main() { float com = 0, sales_amt; char grade; printf("Enter the Sales Amount: "); scanf("%f", &sales_amt); printf("Enter the Grade: "); scanf("%c", &grade); if (sales_amt > 10000) if (grade == 'A') com = sales_amt * 0.1; else com = sales_amt * 0.08; else com = sales_amt * 0.05; printf("\n Commission = %f", com); }
ec06c710a9c43da8c33424d375aaeccafbcf3a0f
590e54d4793664259fb93a59ef5279f453af7cc0
/data/tests/shift.c
90a3c4b10d2d8a87b7240c56911d319b6a736d65
[ "MIT" ]
permissive
pablotron/pwasm
97416a3b0205c61378d5d7335dff3aeb6574396a
8b7e928e1dcb2f65b002bdc8940adea170b4cb64
refs/heads/master
2022-11-06T05:58:36.239200
2020-06-28T16:33:36
2020-06-28T16:33:36
258,066,073
7
0
null
null
null
null
UTF-8
C
false
false
185
c
shift.c
#include <stdint.h> uint32_t shift(const uint32_t a, const uint32_t b) { return a << b; } int main(int argc, char *argv[]) { (void) argc; (void) argv; return shift(22, 32); }
b0ad63a8dbb94324bbd46fe549fa09bf963c5a34
792e697ba0f9c11ef10b7de81edb1161a5580cfb
/tools/clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_lasta.c
e22f5f7808d1eb8aa8d31405a116bb1b3b562851
[ "Apache-2.0", "LLVM-exception", "NCSA" ]
permissive
opencor/llvmclang
9eb76cb6529b6a3aab2e6cd266ef9751b644f753
63b45a7928f2a8ff823db51648102ea4822b74a6
refs/heads/master
2023-08-26T04:52:56.472505
2022-11-02T04:35:46
2022-11-03T03:55:06
115,094,625
0
1
Apache-2.0
2021-08-12T22:29:21
2017-12-22T08:29:14
LLVM
UTF-8
C
false
false
10,435
c
acle_sve_lasta.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -o /dev/null %s #include <arm_sve.h> #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 #else #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4 #endif // CHECK-LABEL: @test_svlasta_s8( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call i8 @llvm.aarch64.sve.lasta.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]]) // CHECK-NEXT: ret i8 [[TMP0]] // // CPP-CHECK-LABEL: @_Z15test_svlasta_s8u10__SVBool_tu10__SVInt8_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call i8 @llvm.aarch64.sve.lasta.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // int8_t test_svlasta_s8(svbool_t pg, svint8_t op) { return SVE_ACLE_FUNC(svlasta,_s8,,)(pg, op); } // CHECK-LABEL: @test_svlasta_s16( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call i16 @llvm.aarch64.sve.lasta.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]]) // CHECK-NEXT: ret i16 [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_s16u10__SVBool_tu11__SVInt16_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call i16 @llvm.aarch64.sve.lasta.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // int16_t test_svlasta_s16(svbool_t pg, svint16_t op) { return SVE_ACLE_FUNC(svlasta,_s16,,)(pg, op); } // CHECK-LABEL: @test_svlasta_s32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.aarch64.sve.lasta.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]]) // CHECK-NEXT: ret i32 [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_s32u10__SVBool_tu11__SVInt32_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.aarch64.sve.lasta.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // int32_t test_svlasta_s32(svbool_t pg, svint32_t op) { return SVE_ACLE_FUNC(svlasta,_s32,,)(pg, op); } // CHECK-LABEL: @test_svlasta_s64( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call i64 @llvm.aarch64.sve.lasta.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]]) // CHECK-NEXT: ret i64 [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_s64u10__SVBool_tu11__SVInt64_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call i64 @llvm.aarch64.sve.lasta.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // int64_t test_svlasta_s64(svbool_t pg, svint64_t op) { return SVE_ACLE_FUNC(svlasta,_s64,,)(pg, op); } // CHECK-LABEL: @test_svlasta_u8( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call i8 @llvm.aarch64.sve.lasta.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]]) // CHECK-NEXT: ret i8 [[TMP0]] // // CPP-CHECK-LABEL: @_Z15test_svlasta_u8u10__SVBool_tu11__SVUint8_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call i8 @llvm.aarch64.sve.lasta.nxv16i8(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i8> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i8 [[TMP0]] // uint8_t test_svlasta_u8(svbool_t pg, svuint8_t op) { return SVE_ACLE_FUNC(svlasta,_u8,,)(pg, op); } // CHECK-LABEL: @test_svlasta_u16( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call i16 @llvm.aarch64.sve.lasta.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]]) // CHECK-NEXT: ret i16 [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_u16u10__SVBool_tu12__SVUint16_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call i16 @llvm.aarch64.sve.lasta.nxv8i16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x i16> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i16 [[TMP1]] // uint16_t test_svlasta_u16(svbool_t pg, svuint16_t op) { return SVE_ACLE_FUNC(svlasta,_u16,,)(pg, op); } // CHECK-LABEL: @test_svlasta_u32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.aarch64.sve.lasta.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]]) // CHECK-NEXT: ret i32 [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_u32u10__SVBool_tu12__SVUint32_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.aarch64.sve.lasta.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i32 [[TMP1]] // uint32_t test_svlasta_u32(svbool_t pg, svuint32_t op) { return SVE_ACLE_FUNC(svlasta,_u32,,)(pg, op); } // CHECK-LABEL: @test_svlasta_u64( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call i64 @llvm.aarch64.sve.lasta.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]]) // CHECK-NEXT: ret i64 [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_u64u10__SVBool_tu12__SVUint64_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call i64 @llvm.aarch64.sve.lasta.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[OP:%.*]]) // CPP-CHECK-NEXT: ret i64 [[TMP1]] // uint64_t test_svlasta_u64(svbool_t pg, svuint64_t op) { return SVE_ACLE_FUNC(svlasta,_u64,,)(pg, op); } // CHECK-LABEL: @test_svlasta_f16( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call half @llvm.aarch64.sve.lasta.nxv8f16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[OP:%.*]]) // CHECK-NEXT: ret half [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_f16u10__SVBool_tu13__SVFloat16_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call half @llvm.aarch64.sve.lasta.nxv8f16(<vscale x 8 x i1> [[TMP0]], <vscale x 8 x half> [[OP:%.*]]) // CPP-CHECK-NEXT: ret half [[TMP1]] // float16_t test_svlasta_f16(svbool_t pg, svfloat16_t op) { return SVE_ACLE_FUNC(svlasta,_f16,,)(pg, op); } // CHECK-LABEL: @test_svlasta_f32( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.aarch64.sve.lasta.nxv4f32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[OP:%.*]]) // CHECK-NEXT: ret float [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_f32u10__SVBool_tu13__SVFloat32_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.aarch64.sve.lasta.nxv4f32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x float> [[OP:%.*]]) // CPP-CHECK-NEXT: ret float [[TMP1]] // float32_t test_svlasta_f32(svbool_t pg, svfloat32_t op) { return SVE_ACLE_FUNC(svlasta,_f32,,)(pg, op); } // CHECK-LABEL: @test_svlasta_f64( // CHECK-NEXT: entry: // CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) // CHECK-NEXT: [[TMP1:%.*]] = call double @llvm.aarch64.sve.lasta.nxv2f64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[OP:%.*]]) // CHECK-NEXT: ret double [[TMP1]] // // CPP-CHECK-LABEL: @_Z16test_svlasta_f64u10__SVBool_tu13__SVFloat64_t( // CPP-CHECK-NEXT: entry: // CPP-CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) // CPP-CHECK-NEXT: [[TMP1:%.*]] = call double @llvm.aarch64.sve.lasta.nxv2f64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x double> [[OP:%.*]]) // CPP-CHECK-NEXT: ret double [[TMP1]] // float64_t test_svlasta_f64(svbool_t pg, svfloat64_t op) { return SVE_ACLE_FUNC(svlasta,_f64,,)(pg, op); }
346bdd4a19452a85ad5e7313ed1829459b1fc4d2
c85e4c21de5f88c9f144032c110ff5a11bbe5d5f
/USER/include/FlashOperate.h
9b31f433102d51d5e78c3a8b3b0ecc8f93ce8d83
[]
no_license
zhihong0105/LFL-XXX-XXX-P
e717d70756660590a39e4b484bfb788a9aa484ee
28e70aeb39948b7146994917b4a7eb3c825e4816
refs/heads/master
2020-04-08T07:01:50.186774
2018-11-29T09:20:12
2018-11-29T09:20:12
159,123,440
0
1
null
null
null
null
GB18030
C
false
false
2,464
h
FlashOperate.h
#ifndef __FLASH_OPERATE_H__ #define __FLASH_OPERATE_H__ #include "main.h" /* FLASH存储宏定义 */ #define FLASH_WRITE_FLAG 0X53 /* FLASH 已写标志 */ #define FLASH_START 0x0800FC00 /* FLASH 存储地址 */ #ifndef LED_MODULE_OPEN_TEST_EN #error "Plese define LED_MODULE_OPEN_TEST_EN!" #elif LED_MODULE_OPEN_TEST_EN == 1 #define LED_DATA_START_FLAG 0X5356 /* The flag of start */ #define LED_DATA_END_FLAG 0X1247 /* The flag of end */ #define LED_VOL_HIS_ADR 0X0800E800 /* LED灯盘输出电压保存地址 */ #define LED_VOL_HIS_COPY_ADR 0X0800E400 /* LED灯盘输出电压备份保存地址 */ #endif /* 电能存储 */ #if ENERGY_TEST_EN == 1 #define ENERGY_SAVE_PAGE_NUM 10 #define ENERGY_SAVE_END_ADR (0X0800E400-1) /* 结束地址,下接LED_VOL_HIS_COPY_ADR */ #define ENERGY_SAVE_START_ADR (ENERGY_SAVE_END_ADR - 1024 * ENERGY_SAVE_PAGE_NUM + 1) /* 起始地址 */ #define ENERGY_START_FLAG 0X1986 #define ENERGY_END_FLAG 0X1984 typedef struct{ unsigned long ulEnergy; unsigned short int uiEndFlag; unsigned short int uiStartFlag; }ScmEnergy; #define ENERGY_DATA_LONG 8//sizeof(ScmEnergy) 必须为8 #endif void ReadDataFromFlash(unsigned char *RamAdrStar, unsigned long ulFlashAdr, unsigned short int uiSum); void WriteDataToFlash(unsigned char *RamAdrStar, unsigned long ulFlashAdr, unsigned short int uiSum); unsigned char FlashWriteCheck(void); unsigned char ReadGroupNumber(void); unsigned char SetGroupNumber(unsigned char ucNewGroup); unsigned char SetGroupNumberAtStart(unsigned char ucNewGroup); #ifndef GRT_V15 #error "Please define GRT_V15!" #elif PROTOCOL == GRT_V15 unsigned char SaveRunTime(unsigned long uiRunTime, unsigned char ucRepairEn); void ReadRunTime(unsigned long *ulRunTime, unsigned char *ucRepairEn); #endif #ifndef LED_MODULE_OPEN_TEST_EN #error "Plese define LED_MODULE_OPEN_TEST_EN!" #elif LED_MODULE_OPEN_TEST_EN == 1 unsigned char SetLedVolHis(unsigned long ulFlashAdr, unsigned short int uiVol); ScmLedData ReadLedVolHis(unsigned long ulFlashAdr, unsigned char ucEn); #endif #if ENERGY_TEST_EN == 1 unsigned long CheckAllEnergyPage(void); void SaveEnergyData(unsigned long ulEnergyData); unsigned long ReadEnergyDataFromFlash(void); #endif #endif
8451fe263688c7d213fd4fe4c9033166eb3e69ce
5bf116afb6a80b248de904023d3c5809816db77f
/src/Timing.h
39ca8e1418fe7c9da3bd5a720dda030e9812be1b
[]
no_license
SJ-Innovation/TeensyVive
cc0279cfa5c4cce1648b76b53360015c445212ab
3744d841d6c54e59bf1112354e7cb599a6fcb8f1
refs/heads/master
2021-04-27T00:19:49.609039
2018-04-22T16:15:24
2018-04-22T16:15:24
123,794,948
1
0
null
null
null
null
UTF-8
C
false
false
1,101
h
Timing.h
// // Created by Sam Lane on 11/02/2018. // #ifndef TEENSYVIVE_TEENSY31_TIMING_H #define TEENSYVIVE_TEENSY31_TIMING_H #include "Arduino.h" #define BETTER_TIMER 3//0-Micros,1-IntervalTimer,2-EXPDirectFTM 3-PIT //TODO write phase locking timer for suriving sync loss #if BETTER_TIMER == 3 void PhaseLockTimeLock(u_int32_t LastHardwareRiseA, u_int32_t LastHardwareRiseB); #define TICKS_PER_MICROSECOND ((u_int32_t)((u_int32_t)F_BUS/(u_int32_t)1000000)) // TODO CHANGE F_BUS for OC if REQUIRED #define US_TO_TICKS(x) (((x)*TICKS_PER_MICROSECOND)) #define TICKS_TO_US(x) (((x)/TICKS_PER_MICROSECOND)) #define IN_RANGE(Low, Value, High) (((Value) >= (Low) && (Value) <= (High)) ? 1:0) #define CURRENT_TIME ((UINT32_MAX - PIT_CVAL0)) #define VIVE_STANDARD_TICKS_PER_US 48 #define TICKS_TO_VIVE_STANDARD(x) ((x)*VIVE_STANDARD_TICKS_PER_US/TICKS_PER_MICROSECOND) #else #define TICKS_PER_MICROSECOND GetTicksPerMicrosecond() #define CURRENT_TIME GetCurrentTimeTicks() u_int32_t GetTicksPerMicrosecond(); u_int32_t GetCurrentTimeTicks(); #endif void InitTimer(); #endif //TEENSYVIVE_TEENSY31_TIMING_H
34801a708b4495add82d552e4da0d65a338af822
fdeb4ea8ad87a6f92c5ebc4185c7842ab77f1ec7
/bro_ska.h
4b0afb127b31c8f0a8cb185d9a154ee56d106052
[ "MIT" ]
permissive
P1K/F2MAT
4a6a79b276f4616a9388905ae6d961cd1c37d555
fd4fa05ced1a005a98d3d62eade128efde4573c2
refs/heads/master
2020-12-03T01:49:05.283465
2017-07-05T12:29:27
2017-07-05T12:29:27
95,871,458
0
0
null
null
null
null
UTF-8
C
false
false
971
h
bro_ska.h
/* * Generic multiplication (+ add) routines for matrices smaller than 128x128 * For legacy systems that don't have SSE2 * * Pierre Karpman (CWI) * 2017-07 */ #include <stdint.h> #include <m4ri/m4ri.h> #ifndef __MUL_BRO_SKA_H #define __MUL_BRO_SKA_H /* * All the following do: * if (clear) res = V*A * if (!clear) res = res + V*A */ /* * assert(V->ncols <= 64) * assert(A->ncols <= 64) */ void mul_64_64_bro_ska(mzd_t *res, mzd_t *V, mzd_t *A, int clear); /* * assert(V->ncols > 64) * assert(V->ncols <= 128) * assert(A->ncols <= 64) */ void mul_128_64_bro_ska(mzd_t *res, mzd_t *V, mzd_t *A, int clear); /* * assert(V->ncols <= 64) * assert(A->ncols > 64) * assert(A->ncols <= 128) */ void mul_64_128_bro_ska(mzd_t *res, mzd_t *V, mzd_t *A, int clear); /* * assert(V->ncols > 64) * assert(V->ncols <= 128) * assert(A->ncols > 64) * assert(A->ncols <= 128) */ void mul_128_128_bro_ska(mzd_t *res, mzd_t *V, mzd_t *A, int clear); #endif
61ef23cd1523b903a47230ea3039950020a9033e
a2b703a6cedb4f2e34c0f10ddf783632548855e5
/include/research/order.h
a18b4f303a1e6413b60fe08b58bf6eccd88949ac
[]
no_license
flyingstupid/gblib
a284b2769bb5eabce6222c892cf716958cb3c6a2
6c00afae0ab36709e50823622aee1e99645fe78b
refs/heads/master
2021-04-27T05:34:28.518374
2018-04-20T15:51:28
2018-04-20T15:51:28
122,598,484
1
1
null
null
null
null
UTF-8
C
false
false
5,813
h
order.h
// // /include/research/order.h // GB mud // inherit COMMAND; //FUNCTION PROTOTYPES void equipment_list(); void place_order(object equipment); string get_file(string name); void does_accept(string response); void finalize_order(int accept); void inst_eq(); //GLOBAL VARIABLES int accept; object equipment; int main (string arg){ string fileName; if ( !arg ){ equipment_list(); return 0; } fileName = get_file(arg); write(fileName + "\n"); load_object(fileName); equipment = find_object(fileName); write(fileName + "\n"); if (equipment){ write(equipment->query_short() + "\n"); } if (!equipment) { write("object not found\n"); return 0; } if (!is_a("/obj/research/equipment.c", equipment)) { write("not equipment\n"); return 0; } write ("This equpiment costs " + equipment->get_cost() + ", you have " + this_player()->get_cash() + ".\n"); if(this_player()->get_cash()< equipment->get_cost()) { write("You can't afford that item!\n"); return 0; } tell_object (this_player(), "Your order has been placed, expect delivery shortly.\n"); call_out ("place_order", 5, equipment); return 1; } void equipment_list() { string equipString; equipString = "==============================[EQUIPMENT]==================================\n\n"; equipString += "Fabricating Machine - Permits the fabrication of laboratory equpiment such as test tubes\n"; equipString += "cost: $300,000 Certification required: Fabricate \n"; equipString += "Installation location: Main Laboratory \n\n"; equipString += "Slime extractor - Permits the extraction of antislime from ghost slime\n"; equipString += "cost: $400,000 Certification required: Extract \n"; equipString += "Installation location: Slime annex \n\n"; equipString += "Purifier - Permits the purification of luquid samples into serums\n"; equipString += "cost: $550,000 Certification required: Purify \n"; equipString += "Installation location: liquid Laboratory \n\n"; write (equipString); } void place_order(object equipment){ write ("A burly delivery man clamers into the room and looks around. He \n" "says to " + this_player()->query_name() + " Did you order a "+ equipment->query_short() + "?\n" "If so, just say the word to ACCEPT it and I'll install it right away!\n"); input_to("does_accept"); return; } void does_accept(string inpt){ if (inpt == "yes" || inpt == "Yes" || inpt == "y" || inpt == "Y" || inpt == "accept" || inpt == "Accept"){ accept = 1; } if (inpt == "no" || inpt == "No" || inpt == "n" || inpt == "N" || inpt == "reject" || inpt == "Reject"){ accept = 0; } finalize_order(accept); } void finalize_order(int accept){ if ( !accept ){ write ("The burly delivery man grumbles a few times, mutters some choice words\n" "under his breath and stomps out\n"); return; } if (equipment->query_short() == "fabricating machine" && is_a ("/areas/research/labroom.c", environment(this_player()))) { inst_eq(); return; } if (!environment(this_player())->query_exit(equipment->get_location())) { write ("The burly delivery man says hey, building codes only allow me to place\n" "this in a " + equipment->get_location() + " annex. Order again after you've had one built.\n"); return; } inst_eq(); return; } void inst_eq(){ string locationName; object location; if (equipment->query_short() == "fabricating machine") { location = environment(this_player()); } else { locationName = (environment(this_player())->query_exit(equipment->get_location())); load_object(locationName); location = find_object(locationName); } equipment->move(location); write ("The delivery man tips his cap in " +this_player()->query_short() + "'s direction and says\n" "All set there!, as he leaves\n"); } string get_file(string name) { mapping objMap; objMap = (["tube":"/obj/research/tube.c", "Tube":"/obj/research/tube.c", "test tube":"/obj/research/tube.c", "Test tube":"/obj/research/tube.c", "vial": "/obj/research/vial.c", "Vial": "/obj/research/vial.c", "bag": "/obj/research/bag.c", "sample bag": "/obj/research/bag.c", "Sample bag": "/obj/research/bag.c", "Bag": "/obj/research/bag.c", "Fabricator":"/obj/research/fabricator.c", "fabricator":"/obj/research/fabricator.c", "Fabricating machine":"/obj/research/fabricator.c", "fabricating machine":"/obj/research/fabricator.c", "machine":"/obj/research/fabricator.c", "Machine":"/obj/research/fabricator.c", "extractor":"/obj/research/extractor.c", "Extractor":"/obj/research/extractor.c", "purifier":"/obj/research/purifier.c", "Purifier":"/obj/research/purifier.c", ]); return objMap[name]; } string help() { return(HIW + " SYNTAX: " + NOR + "order [equipment name]\n\n" "This command allows the you to order lb equipment for delivery.\n" "Equpiment will be delivered and installed. Once installed, equipment\n" "can not be moved.\n" "For a list of available equipment just type order.\n"); }
265addedf88181a9cfe5fee05f20f882408a2138
6c1f3c640012da447a0de8da86a4788683648095
/test/run_MC.C
958d8c5522bdaefdddf7325b78af0c5c0e56d273
[]
no_license
ljs9125/SKFlatAnalyzer
3886c2a157777edbf78190be8f8ee4d46d0c4dda
d0e53c3fa85f3f6c20bbf18c3b34765336ea25bc
refs/heads/master
2021-06-24T18:58:08.496932
2020-02-13T05:02:43
2020-02-13T05:02:43
200,600,404
1
1
null
2021-01-21T06:06:18
2019-08-05T07:03:35
C
UTF-8
C
false
false
2,032
c
run_MC.C
R__LOAD_LIBRARY(libPhysics.so) R__LOAD_LIBRARY(libTree.so) R__LOAD_LIBRARY(libHist.so) R__LOAD_LIBRARY(libDataFormats.so) R__LOAD_LIBRARY(libAnalyzerTools.so) R__LOAD_LIBRARY(libGEScaleSyst.so) R__LOAD_LIBRARY(libAnalyzers.so) R__LOAD_LIBRARY(/cvmfs/cms.cern.ch/slc7_amd64_gcc700/external/lhapdf/6.2.1-gnimlf3/lib/libLHAPDF.so) void run_MC(){ //==== Anaylzer class name //==== change "ExampleRun" if you want to run another one ExampleRun m; m.SetTreeName("recoTree/SKFlat"); //==== Not really important m.MCSample = "DYJets"; m.IsDATA = false; //==== Xsec and weight information m.xsec = 6225.42; m.sumW = 123584524; //==== Data year m.DataYear = 2017; //==== If you want to activate usre flags, put them here as a vector<TString> m.Userflags = { }; //==== Activate it if you want to skip first "NSkip" events //m.NSkipEvent = 10; //==== Activate it if you want to print [SKFlatNtuple::Loop RUNNING] XX / YY (ZZ %) every "LogEvery" events //==== Default if 1000 //m.LogEvery = 1; //==== # of events you want to run //==== ex) if m.NSkipEvent = 2000 and m.MaxEvent = 1000, //==== it will skip first 2000 events and then run 1000 events m.MaxEvent = 1000; //==== Add file here m.AddFile("root://cms-xrdr.sdfarm.kr:1094///xrd/store/user/jskim/SKFlat/2017/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/SKFlat_Run2Legacy_v1/190101_204350/0000/SKFlatNtuple_2017_MC_1.root"); m.AddFile("root://cms-xrdr.sdfarm.kr:1094///xrd/store/user/jskim/SKFlat/2017/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/SKFlat_Run2Legacy_v1/190101_204350/0000/SKFlatNtuple_2017_MC_10.root"); m.AddFile("root://cms-xrdr.sdfarm.kr:1094///xrd/store/user/jskim/SKFlat/2017/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/SKFlat_Run2Legacy_v1/190101_204350/0000/SKFlatNtuple_2017_MC_100.root"); //==== Output path m.SetOutfilePath("hists.root"); m.Init(); m.initializeAnalyzer(); m.initializeAnalyzerTools(); m.SwitchToTempDir(); m.Loop(); m.WriteHist(); }
d90e50c2d417d88a0ebcb512f5e7a22686620a4b
901a5f84e9f0e7390475223ccfa070c43f43d6aa
/ESP8266-CODE/ESPortal/config.h
08549f82de39cfe7996baacf51ea8fbd2d375bca
[ "MIT" ]
permissive
mfirdaus07/github-ESPortal
466268729f2301b8f26e41d18fda6e3fe6ed61c2
bf4fb4070e5a98d13eb359bf1a4751eedf6987ff
refs/heads/master
2021-06-20T09:08:46.853008
2017-07-12T09:12:06
2017-07-12T09:12:06
null
0
0
null
null
null
null
UTF-8
C
false
false
1,320
h
config.h
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //User Configuration Happens Here! //Admin Settings for Flashing Firmware const char *update_username="admin"; const char *update_password="hacktheplanet"; //Name of Access Point const char *setSSID="Free Wifi"; //enter URLs HERE for target sites - example: String SITE1="www.exploit.agency"; //do not use www. //redirects user to www.SITE1.com/login when user visits www.SITE1.com String SITE1="fakesite1.com"; const char *SITE1_redirect="/login"; //redirects user to www.SITE2.com/sign-in when user visits www.SITE2.com String SITE2="fakesite2.com"; const char *SITE2_redirect="/sign-in"; //redirects user to www.SITE3.com/authenticate when user visits www.SITE3.com String SITE3="fakesite3.com"; const char *SITE3_redirect="/authenticate"; //all other requests for "anysite.com" go to www.anysite.com/user/login const char *SITEOTHER_redirect="/user/login"; //Portal Login Redirect Success Page www.accesspoint.com/welcome String WELCOMEDOMAIN="ouraccesspoint.com"; const char *PORTALLOGIN_redirect="/welcome"; String PORTALLOGIN="192.168.1.1"; //IP of ESP8266 has to go here for it to work //access ESPORTAL Logs at www.anysite.com/esportal //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
de71c8bf384c9a54705f1e3e2286634be88af895
4efaf77021effb49ee0124d93f527f4ae471cf5e
/gh_native/gostjava.c
d6086b8f44e6fe7534a0145886a034221846b779
[]
no_license
primetver/gosthash
699f6a075b875b495bee418fefe2123066d77c8d
3892496dd07603949029da88d2fb4c5794812699
refs/heads/master
2021-01-21T16:38:41.287760
2014-08-17T12:07:15
2014-08-17T12:07:15
null
0
0
null
null
null
null
UTF-8
C
false
false
3,553
c
gostjava.c
/* $Id: gostjava.c 30932 2011-01-14 08:04:26Z zinal $ */ #include <memory.h> #include <jni.h> #include "gosthash.h" /* * Class: ru_zinal_gosthash_GostHashNative * Method: doInit * Signature: ()J */ JNIEXPORT jlong JNICALL Java_ru_zinal_gosthash_GostHashNative_doInit (JNIEnv *env, jclass jc) { gost_hash_ctx* ctx; ctx = malloc(sizeof(gost_hash_ctx)); if ( ctx==NULL ) return 0L; init_gost_hash_ctx(ctx, &GostR3411_94_CryptoProParamSet); return (jlong)(size_t)ctx; } /* * Class: ru_zinal_gosthash_GostHashNative * Method: doDone * Signature: (J)V */ JNIEXPORT void JNICALL Java_ru_zinal_gosthash_GostHashNative_doDone (JNIEnv *env, jclass jc, jlong jctx) { gost_hash_ctx* ctx = (gost_hash_ctx*)(size_t)jctx; if ( ctx==NULL ) return; done_gost_hash_ctx(ctx); free(ctx); } /* * Class: ru_zinal_gosthash_GostHashNative * Method: doStartHash * Signature: (J)V */ JNIEXPORT void JNICALL Java_ru_zinal_gosthash_GostHashNative_doStartHash (JNIEnv *env, jclass jc, jlong jctx) { gost_hash_ctx* ctx = (gost_hash_ctx*)(size_t)jctx; if ( ctx==NULL ) return; start_hash(ctx); } /* * Class: ru_zinal_gosthash_GostHashNative * Method: doHashBlock * Signature: (J[BII)V */ JNIEXPORT void JNICALL Java_ru_zinal_gosthash_GostHashNative_doHashBlock (JNIEnv *env, jclass jc, jlong jctx, jbyteArray buf, jint pos, jint len) { jbyte* ptr; gost_hash_ctx* ctx = (gost_hash_ctx*)(size_t)jctx; if ( ctx==NULL ) return; ptr = (*env)->GetByteArrayElements(env, buf, NULL); hash_block(ctx, (unsigned char*)ptr, len); (*env)->ReleaseByteArrayElements(env, buf, ptr, 0); } /* * Class: ru_zinal_gosthash_GostHashNative * Method: doFinishHash * Signature: (J)[B */ JNIEXPORT jbyteArray JNICALL Java_ru_zinal_gosthash_GostHashNative_doFinishHash (JNIEnv * env, jclass jc, jlong jctx) { unsigned char buf[32]; jbyteArray retval; gost_hash_ctx* ctx = (gost_hash_ctx*)(size_t)jctx; if ( ctx==NULL ) return NULL; finish_hash(ctx, buf); retval = (*env)->NewByteArray(env, 32); if ( retval != NULL ) { jbyte* ptr = (*env)->GetByteArrayElements(env, retval, NULL); if ( ptr!=NULL ) { memcpy(ptr, buf, 32); (*env)->ReleaseByteArrayElements(env, retval, ptr, 0); } } return retval; } /* * Class: ru_zinal_gosthash_GostHashNative * Method: doCalcHash * Signature: (JLjava/lang/String;)[B */ JNIEXPORT jbyteArray JNICALL Java_ru_zinal_gosthash_GostHashNative_doCalcHash (JNIEnv *env, jclass jc, jlong jctx, jstring jfname) { unsigned char buf[256]; jbyteArray retval; const char* fname; FILE* f; int haveError; gost_hash_ctx* ctx = (gost_hash_ctx*)(size_t)jctx; if ( ctx==NULL ) return NULL; fname = (*env)->GetStringUTFChars(env, jfname, NULL); if ( fname==NULL ) return NULL; f = fopen(fname, "rb"); (*env)->ReleaseStringUTFChars(env, jfname, fname); if ( f==NULL ) return NULL; haveError = 0; start_hash(ctx); while (1) { size_t len = fread(buf, 1, sizeof(buf), f); if ( len==0 ) { if ( ferror(f) ) haveError = 1; break; } hash_block(ctx, buf, len); } finish_hash(ctx, buf); fclose(f); if ( haveError ) return NULL; retval = (*env)->NewByteArray(env, 32); if ( retval != NULL ) { jbyte* ptr = (*env)->GetByteArrayElements(env, retval, NULL); if ( ptr!=NULL ) { memcpy(ptr, buf, 32); (*env)->ReleaseByteArrayElements(env, retval, ptr, 0); } } return retval; } /* End Of File */
dd22919a636c96c6aa1773702e813df6acbfbce0
e518d79dd07485fe04b5ba758d75c7c633f239a2
/Serial_communication 2.c
6163dba92552c3628daaa6171f9dd311babd38a0
[]
no_license
satya980/PIC-practicecodes
aff2a6d339afa6fb0b0f6a0d857e670ff2675de7
4c2df8e1471d1fac7f283a85d76ab7c681cc39e9
refs/heads/master
2021-05-02T16:40:56.461980
2018-02-09T19:34:30
2018-02-09T19:34:30
120,682,081
0
0
null
null
null
null
UTF-8
C
false
false
258
c
Serial_communication 2.c
#include<p18f452.h> #pragma config WDT=OFF void main() { TRISDbits.TRISD4=0; T2CON=0x00; while(1) { TMR2=0; PR2=0xc8; T2CONbits.TMR2ON=1; while(PIR1bits.TMR2IF==0); PORTDbits.RD4=~PORTDbits.RD4; T2CONbits.TMR2ON=0; PIR1bits.TMR2IF=0; } }
6be40f400859503be01fb70ca84cfbf6a31f0dd8
44b98554e6ea51babba2f20f68d05bf9d5635cd9
/app/ipcam/gb28181/debug_memory.h
8eba53ab6d9897432bd5f02e1a540dfe7ec4171c
[]
no_license
pengdu/bbam
8550688d1aa6dda680fbe953439e595efc1b7107
afc307dc04fffe89a111a0f1b5ef6376f52e194c
refs/heads/master
2015-08-10T03:58:11.792991
2013-10-24T06:23:54
2013-10-24T06:23:54
16,098,118
5
8
null
null
null
null
UTF-8
C
false
false
862
h
debug_memory.h
#ifndef __GB28181_DEBUG_MEMORY_H__ #define __GB28181_DEBUG_MEMORY_H__ #include <stdlib.h> #ifndef NO_MEMORY_DEBUG #define NEW new (__FILE__, __LINE__) #define DELETE delete #define MALLOC debug_malloc #define REALLOC debug_realloc #define FREE debug_free void * operator new (size_t size); void * operator new (size_t size, const char * file, int line); void operator delete (void * ptr); void * operator new [] (size_t size); void * operator new [] (size_t size, const char * file, int line); void operator delete [] (void * ptr); void * debug_malloc(size_t size); void * debug_realloc(void * ptr, size_t size); void debug_free(void * ptr); #else // NO_MEMORY_DEBUG #define NEW new #define DELETE delete #define MALLOC malloc #define REALLOC realloc #define FREE free #endif // NO_MEMORY_DEBUG #endif // __GB28181_DEBUG_MEMORY_H__
04a109bf29f307a169203cb581af9884f909aeec
df718f9114e9472f7eb094c962f000b910c0af53
/std/include/std_memmgr/std_memmgr.h
3f33a76fcad5f2f97dcd29d11f2250cbef1309e9
[]
no_license
doinglu/cmm
65ac7d867b9e2d9e024077dd89d57fd87f8d987e
cdb5210db3c519676d4ffc8074e8661a8a5b51ba
refs/heads/master
2021-01-10T13:03:31.183195
2016-02-28T00:20:01
2016-02-28T00:20:01
46,947,558
3
4
null
null
null
null
UTF-8
C
false
false
7,684
h
std_memmgr.h
// std_memmgr.c: // Initial version 2002.2.24 by doing #ifndef _STD_MEM_MGR_H_ #define _STD_MEM_MGR_H_ #ifdef __cplusplus extern "C" { #endif #include "std_port/std_port.h" // Error code #define STD_NOT_INITIALIZED -10001 #define STD_ALREADY_INITIALIZED -10002 #define STD_MEMORY_BLOCK_ACTIVE -10003 #define STD_BAD_MEMORY_GROUP -10004 #define STD_NO_SUCH_MEMORY_GROUP -10005 #define STD_MEMORY_NOT_ENOUGH -10006 #define STD_FAILED_INIT_BA_POOL -10007 #define STD_MEM_ALLOC(size) std_allocate_memory(size, "STD", __FILE__, __LINE__) #define STD_MEM_ALLOCX(size, f, l) std_allocate_memory(size, "STD", f, l) #define STD_MEM_REALLOC(p, size) std_reallocate_memory(p, size, "STD", __FILE__, __LINE__) #define STD_MEM_FREE(ptr) std_free_memory(ptr, "STD", __FILE__, __LINE__) // Options for this manager #define STD_USE_BA_ALLOC 0x0001 typedef struct std_init_mgr_para { int options; size_t ba_reserve_size; // Valid when STD_USE_BA_ALLOC only } std_init_mgr_para_t; #ifdef _DEBUG /* Do stat for debug mode with block detail mode */ #define STD_BLOCK_DETAIL 1 #define STD_STAT_ALLOC (STD_BLOCK_DETAIL) #else /* Not stat */ #define STD_BLOCK_DETAIL 0 #define STD_STAT_ALLOC 0 #endif /* Don't use tiny allocation */ #ifdef WIN32 #define STD_USE_TINY_ALLOC 1 #else #define STD_USE_TINY_ALLOC 0 #endif #if STD_STAT_ALLOC /* Code node to allocate memory */ typedef struct Mem_Code_Node { const char *file; Uint32 line; } mem_code_node_t; /* Stat of operation */ typedef struct mem_code_node_stat { mem_code_node_t n; size_t counter; size_t size; } mem_code_node_stat_t; #endif /* Memory configuration information */ typedef struct std_memory_config { Uint32 block_size; Uint32 block_count; } std_memory_config_t; /* Special value in the head of memory header */ #define STD_MEMORY_BLOCK_SIGN 0x99998086 #define STD_MEMORY_BLOCK_TAIL 0xAF /* Flags of memory header */ #define STD_MEMORY_GROUP_BLOCK 0x0001 /* Block is a allocated in group */ #define STD_MEMORY_L2 0x0002 /* _l2 memory */ #define STD_MEMORY_ALLOCATED 0x0010 /* Block is not free now */ /* Alignment size */ #ifdef PLATFORM64 #define STD_MEMORY_ALIGNMENT_SIZE 8 #else #define STD_MEMORY_ALIGNMENT_SIZE 4 #endif /* Reserved bytes for each block * Must be n * STD_MEMORY_ALIGNMENT_SIZE */ #ifdef _DEBUG #define STD_BLOCK_RESERVED 16 #else #define STD_BLOCK_RESERVED 0 #endif /* For tiny block alignment */ #define STD_TINY_ALIGNMENT_SIZE sizeof(void *) /* Page pool */ /* The page pool is a memory pool to hold n same size pages */ #define STD_MEM_PAGE_POOL_SIZE (1024 * 1024) /* _size of per page in page pool */ #define STD_PER_MEM_PAGE_SIZE 4096 /* Page pool structure */ struct std_mem_page; typedef struct std_mem_page_pool { struct std_mem_page *free_page; Uint16 page_count; } std_mem_page_pool_t; /* Page strucuture */ /* The first field is reserved for page management, * don't use for allocator */ typedef struct std_mem_page { union { struct std_mem_page *next_free_page; struct std_mem_page_Pool *page_pool; } v; } std_mem_page_t; /* _size of values page (bytes) */ #define STD_TINY_BLOCK_PAGE_SIZE 4096 /* Count of page list (all memory pools) */ #define STD_TINY_BLOCK_PAGE_LIST_COUNT 256 /* Tiny page */ typedef struct std_tiny_page_header { Uint16 used; Uint16 count; Uint16 block_size; Uint16 unused; struct std_tiny_page_header *next_page; struct std_tiny_memory_header *free_list; } std_tiny_page_header_t; /* Tiny memory block in pool */ typedef struct std_tiny_memory_header { /* This field must be last field in the structure * To make sure the sizeof(Vm_Value_t) is alignment to machine register */ union { struct std_tiny_page_header *page; /* The owner page (when allocated) */ struct std_tiny_memory_header *next; /* The next free value (not allocated) */ } p; } std_tiny_memory_header_t; /* Memory block header */ /* For pre-allocated blocks, the header is act as single-direction * list. For those l2 blocks, the header would be double-direction * list. */ typedef struct std_memory_header { /* Header of memory */ #if STD_BLOCK_DETAIL Uint32 sign; Uint32 line; const char *file; const char *module; time_t allocate_time; struct std_memory_header *next_l2; #ifdef PLATFORM64 void *unused; /* To alignment 16 */ #endif #endif /* End of detail information */ Uint32 size; Uint8 serial; Uint8 tag; Uint16 flags; union { struct std_memory_header *next; struct std_lms *owner_lms; }; } std_memory_header_t; /* OS memory function */ #ifdef GSLIB_OVERRIDE_OS_MALLOC void* _override_gslib_os_malloc(size_t); void* _override_gslib_os_realloc(void *, size_t); void _override_gslib_os_free(void *); #define OS_MALLOC(n) _override_gslib_os_malloc((size_t) n) #define OS_REALLOC(p, n) _override_gslib_os_realloc(p, (size_t) n) #define OS_FREE(p) _override_gslib_os_free(p) #else #define OS_MALLOC(n) malloc((size_t) (n)) #define OS_REALLOC(p, n) realloc(p, (size_t) (n)); #define OS_FREE(p) free(p) #endif /* To get block header */ #define STD_GET_HDR(p) (((std_memory_header_t *) p) - 1) /* Parameter for pdb_memoryStat */ typedef struct std_mem_stat { UintR alloc_times; UintR alloc_size; UintR free_times; UintR free_size; UintR total_reserved_size; UintR total_used_size; UintR total_l2_size; UintR peak_reserved_size; UintR extend_size; } std_mem_stat_t; /* Parameter for pdb_stable_heapStat */ typedef struct std_stable_heap_stat { UintR stable_heap_allocated_size; UintR stable_heap_size; UintR stable_heap_free_list_times; UintR stable_heap_allocate_times; UintR stable_heap_allocateFailed; } std_stable_heap_stat_t; struct std_lms; /* Function provide to main module */ int std_init_mem_mgr(std_init_mgr_para_t* paras); int std_shutdown_mem_mgr(); /* Allocate page */ void *std_allocate_mem_page(); void std_free_mem_page(void *page); /* Get stat information */ int std_is_mem_mgr_installed(); int std_get_block_reserved(size_t *ptr_reserved_bytes); int std_get_tiny_block_page_listsCount(size_t *ptr_count); int std_get_tiny_block_page_list(std_tiny_page_header_t **pp_lists, Uint index); void *std_allocate_memory(size_t size, const char *moduleName, const char *file, int line); void *std_reallocate_memory(void *ptr, size_t size, const char *moduleName, const char *file, int line); void std_free_memory(void *ptr, const char *moduleName, const char *file, int line); #if STD_BLOCK_DETAIL struct std_memory_header *std_get_l2mem_blocks_list(); #endif #if STD_STAT_ALLOC /* To get stat of alloc */ int std_get_code_node_stat(mem_code_node_stat_t **pp_code_nodes, size_t *ptr_code_nodes_count); int std_reset_code_node_stat(size_t min_size, size_t max_size); #endif int std_memory_stat(int flag, std_mem_stat_t *ptr_mem_stat, char *msg, size_t size); /* Os memory allocation routines */ void *std_os_malloc(size_t size); void *std_os_realloc(void *p, size_t size); void std_os_free(void *p); #ifdef __cplusplus } #endif #endif
b8f4039a3b9070937541b99bb8cddd43082821f6
1390cb4f58bd09087184a64fe2838dec29600d8a
/7580.c
9e0d1c6c41807aa26174346977457835871442ac
[]
no_license
imasker/obfuscatorTestCases
bf21352be1dbd6c8bdd868b093af03f315d92a45
5f5561846ec09a040b42dc12842c9581e7be6b4d
refs/heads/master
2023-03-27T11:35:21.843689
2021-03-25T07:38:05
2021-03-25T07:38:05
351,342,479
0
0
null
null
null
null
UTF-8
C
false
false
163,377
c
7580.c
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.3.0 * Git version: 30dccd7 * Options: -o /home/x/obfuscator/data/programs/7580.c * Seed: 1513847754 */ #include "csmith.h" static long __undefined; /* --- Struct/Union Declarations --- */ union U0 { uint32_t f0; int32_t f1; const uint32_t f2; uint16_t f3; }; /* --- GLOBAL VARIABLES --- */ static volatile int32_t g_2 = 0xF98A59C1L;/* VOLATILE GLOBAL g_2 */ static volatile int32_t g_3 = 0x3EFC07E1L;/* VOLATILE GLOBAL g_3 */ static volatile int32_t g_4[10] = {0x59609C3FL,0xE31551DAL,0xCB8CE3E6L,0xCB8CE3E6L,0xE31551DAL,0x59609C3FL,0xE31551DAL,0xCB8CE3E6L,0xCB8CE3E6L,0xE31551DAL}; static volatile int32_t g_5 = 0x672CA3C0L;/* VOLATILE GLOBAL g_5 */ static int32_t g_6 = 0L; static volatile int32_t g_9 = 0xED3C15D0L;/* VOLATILE GLOBAL g_9 */ static volatile int32_t g_10 = 1L;/* VOLATILE GLOBAL g_10 */ static volatile int32_t g_11 = 0x012D2C87L;/* VOLATILE GLOBAL g_11 */ static volatile int32_t g_12 = 0x25D2D915L;/* VOLATILE GLOBAL g_12 */ static int32_t g_13 = (-1L); static int32_t g_16[5][5][8] = {{{0x44CF5927L,4L,(-4L),0L,4L,0xA81A82E7L,4L,0L},{0xE815F842L,4L,0xE815F842L,0x5CEFD06BL,0x44CF5927L,0xE815F842L,1L,1L},{1L,0x5CEFD06BL,0x6501874DL,0x44CF5927L,(-7L),(-7L),0x44CF5927L,0x6501874DL},{1L,1L,0xA81A82E7L,0L,0x44CF5927L,1L,1L,0x44CF5927L},{0xE815F842L,0x44CF5927L,0x5CEFD06BL,0xE815F842L,(-7L),(-4L),0xDA8ED40AL,0xE815F842L}},{{0xE815F842L,1L,0xDA18461EL,1L,1L,0xDA8ED40AL,(-7L),0xDA18461EL},{0x6501874DL,(-7L),0L,0xE815F842L,0xE815F842L,0L,(-7L),0x6501874DL},{0xA81A82E7L,0xE815F842L,0xDA18461EL,0xDA8ED40AL,0x5CEFD06BL,0xA81A82E7L,0xDA8ED40AL,1L},{0x5CEFD06BL,0xA81A82E7L,0xDA8ED40AL,1L,0xDA8ED40AL,0xA81A82E7L,0x5CEFD06BL,0xDA8ED40AL},{0x6501874DL,0xE815F842L,1L,0x6501874DL,(-7L),0L,0xE815F842L,0xE815F842L}},{{0xDA8ED40AL,(-7L),0xDA18461EL,0xDA18461EL,(-7L),0xDA8ED40AL,1L,1L},{0x6501874DL,1L,(-4L),0xE815F842L,0xDA8ED40AL,(-4L),(-7L),(-4L)},{0x5CEFD06BL,0xE815F842L,4L,0xE815F842L,0x5CEFD06BL,0x44CF5927L,0xE815F842L,1L},{0xA81A82E7L,0x5CEFD06BL,0xDA8ED40AL,0xDA18461EL,0xE815F842L,0xA81A82E7L,0xA81A82E7L,0xE815F842L},{0x6501874DL,0xDA8ED40AL,0xDA8ED40AL,0x6501874DL,1L,(-4L),0xE815F842L,0xDA8ED40AL}},{{0xE815F842L,(-7L),4L,1L,(-7L),1L,(-7L),1L},{(-4L),(-7L),(-4L),0xDA8ED40AL,0xE815F842L,(-4L),1L,0x6501874DL},{0x5CEFD06BL,0xDA8ED40AL,0xDA18461EL,0xE815F842L,0xA81A82E7L,0xA81A82E7L,0xE815F842L,0xDA18461EL},{0x5CEFD06BL,0x5CEFD06BL,1L,1L,0xE815F842L,0x44CF5927L,0x5CEFD06BL,0xE815F842L},{(-4L),0xE815F842L,0xDA8ED40AL,(-4L),(-7L),(-4L),0xDA8ED40AL,0xE815F842L}},{{0xE815F842L,1L,0xDA18461EL,1L,1L,0xDA8ED40AL,(-7L),0xDA18461EL},{0x6501874DL,(-7L),0L,0xE815F842L,0xE815F842L,0L,(-7L),0x6501874DL},{0xA81A82E7L,0xE815F842L,0xDA18461EL,0xDA8ED40AL,0x5CEFD06BL,0xA81A82E7L,0xDA8ED40AL,1L},{0x5CEFD06BL,0xA81A82E7L,0xDA8ED40AL,1L,0xDA8ED40AL,0xA81A82E7L,0x5CEFD06BL,0xDA8ED40AL},{0x6501874DL,0xE815F842L,1L,0x6501874DL,(-7L),0L,0xE815F842L,0xE815F842L}}}; static int64_t g_28[2][1][7] = {{{0xDF78B15B45BEAC3ELL,0xC167656540F213EDLL,0xDF78B15B45BEAC3ELL,0xDF78B15B45BEAC3ELL,0xC167656540F213EDLL,0xDF78B15B45BEAC3ELL,0xDF78B15B45BEAC3ELL}},{{0xC167656540F213EDLL,0xC167656540F213EDLL,0L,0xC167656540F213EDLL,0xC167656540F213EDLL,0L,0xC167656540F213EDLL}}}; static int32_t g_52 = 1L; static uint16_t g_81 = 7UL; static volatile union U0 *g_82 = (void*)0; static int32_t g_87 = 0x79698822L; static int32_t g_95 = 1L; static int16_t g_105 = 0xFFAEL; static int16_t g_106 = 0xD6BEL; static uint64_t g_108 = 0xE9EF314FBCE55470LL; static int32_t g_121 = 1L; static int32_t g_122 = 0xE5CF1A07L; static uint16_t g_123 = 1UL; static uint32_t g_136 = 0xC6D30B3EL; static union U0 g_140 = {4294967294UL}; static union U0 *g_139 = &g_140; static union U0 * const g_157 = &g_140; static uint8_t g_174 = 0x32L; static uint64_t g_178[5][6] = {{0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL},{0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL},{0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL},{0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL},{0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL,0xC4052702D28A0D4ALL}}; static uint32_t g_184 = 0xE05431A1L; static int64_t g_260 = 0x9FEBDC3610736476LL; static int8_t g_261 = (-2L); static int32_t g_263 = (-1L); static uint64_t g_264 = 0xB4554AD14B1F9F82LL; static int32_t *g_302 = &g_16[3][3][5]; static int32_t **g_301 = &g_302; static int32_t ***g_300 = &g_301; static int32_t ****g_299[6][1][7] = {{{(void*)0,&g_300,&g_300,&g_300,&g_300,(void*)0,&g_300}},{{&g_300,&g_300,&g_300,&g_300,&g_300,&g_300,&g_300}},{{&g_300,&g_300,&g_300,&g_300,&g_300,&g_300,(void*)0}},{{&g_300,&g_300,&g_300,&g_300,&g_300,&g_300,&g_300}},{{&g_300,&g_300,(void*)0,&g_300,&g_300,&g_300,&g_300}},{{&g_300,&g_300,&g_300,&g_300,&g_300,&g_300,&g_300}}}; static int32_t *****g_298[6][6] = {{&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2]},{&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2]},{&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2]},{&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2]},{&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2]},{&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2],&g_299[5][0][2]}}; static const int32_t g_313 = 0x39C44411L; static int64_t *g_363[9] = {&g_28[0][0][2],&g_28[1][0][4],&g_28[1][0][4],&g_28[0][0][2],&g_28[1][0][4],&g_28[1][0][4],&g_28[0][0][2],&g_28[1][0][4],&g_28[1][0][4]}; static int64_t **g_362[5] = {&g_363[7],&g_363[7],&g_363[7],&g_363[7],&g_363[7]}; static uint16_t *g_428 = &g_123; static uint32_t g_438 = 1UL; static int32_t *****g_512 = &g_299[5][0][2]; static int32_t **g_537 = &g_302; static int32_t ** const *g_536 = &g_537; static int32_t ** const **g_535 = &g_536; static int32_t ** const ***g_534 = &g_535; static volatile uint32_t g_590 = 0xBE23542FL;/* VOLATILE GLOBAL g_590 */ static const uint8_t *g_651[8] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; static const uint8_t * volatile *g_650 = &g_651[5]; static uint64_t *g_770[8] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; static uint64_t **g_769 = &g_770[1]; static int8_t g_876 = 0x21L; static int64_t ***g_883 = &g_362[2]; static uint16_t **g_919 = (void*)0; static uint16_t ***g_918 = &g_919; static uint32_t * volatile * volatile g_933 = (void*)0;/* VOLATILE GLOBAL g_933 */ static const uint16_t g_962 = 0xF9CDL; static const uint16_t g_963 = 0x1C77L; static const uint16_t g_964[7] = {0xBA88L,0x8872L,0x8872L,0xBA88L,0x8872L,0x8872L,0xBA88L}; static const uint16_t * const g_961[6][4] = {{(void*)0,&g_963,(void*)0,&g_963},{(void*)0,&g_963,(void*)0,&g_963},{(void*)0,&g_963,(void*)0,&g_963},{(void*)0,&g_963,(void*)0,&g_963},{(void*)0,&g_963,(void*)0,&g_963},{(void*)0,&g_963,(void*)0,&g_963}}; static const uint16_t * const *g_960 = &g_961[4][0]; static const uint16_t * const **g_959[4] = {&g_960,&g_960,&g_960,&g_960}; static volatile uint32_t g_973 = 0xC84E041FL;/* VOLATILE GLOBAL g_973 */ static uint8_t * const g_1085 = &g_174; static uint8_t * const *g_1084 = &g_1085; static uint8_t * const **g_1083 = &g_1084; static uint16_t g_1156 = 65535UL; static union U0 * volatile *g_1162 = &g_139; static union U0 * volatile ** volatile g_1163 = &g_1162;/* VOLATILE GLOBAL g_1163 */ static volatile uint64_t g_1270 = 1UL;/* VOLATILE GLOBAL g_1270 */ static int32_t *g_1322[7][6][3] = {{{&g_95,&g_121,&g_95},{&g_121,&g_121,&g_263},{&g_95,&g_121,&g_95},{&g_121,&g_121,&g_263},{&g_95,&g_121,&g_95},{&g_121,&g_121,&g_263}},{{&g_95,&g_121,&g_95},{&g_121,&g_121,&g_263},{&g_95,&g_121,&g_95},{&g_121,&g_121,&g_263},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121}},{{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121}},{{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121}},{{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121}},{{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121}},{{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121},{&g_121,&g_121,&g_95},{&g_121,&g_121,&g_121}}}; static uint8_t *g_1331 = &g_174; static uint8_t **g_1330 = &g_1331; static uint16_t ** const **g_1385[2] = {(void*)0,(void*)0}; static uint32_t *g_1398 = &g_184; static uint32_t **g_1397 = &g_1398; static uint32_t *** volatile g_1396 = &g_1397;/* VOLATILE GLOBAL g_1396 */ static volatile int32_t g_1445 = 0xF62CB1A0L;/* VOLATILE GLOBAL g_1445 */ static uint32_t g_1494 = 1UL; static int16_t g_1532[2] = {1L,1L}; static uint64_t * volatile g_1543[1][10][7] = {{{(void*)0,(void*)0,(void*)0,(void*)0,&g_264,(void*)0,(void*)0},{&g_264,&g_264,&g_178[1][4],&g_264,&g_178[1][4],&g_264,&g_264},{(void*)0,(void*)0,&g_108,(void*)0,(void*)0,(void*)0,(void*)0},{&g_178[0][2],&g_178[0][2],&g_178[0][2],&g_178[1][4],&g_178[1][4],&g_178[0][2],&g_178[0][2]},{(void*)0,&g_264,&g_108,&g_108,&g_264,(void*)0,&g_264},{&g_178[0][2],&g_178[1][4],&g_178[1][4],&g_178[0][2],&g_178[0][2],&g_178[0][2],&g_178[1][4]},{(void*)0,(void*)0,(void*)0,&g_108,(void*)0,(void*)0,(void*)0},{&g_264,&g_178[1][4],&g_264,&g_178[1][4],&g_264,&g_264,&g_178[1][4]},{(void*)0,&g_264,(void*)0,(void*)0,(void*)0,(void*)0,&g_264},{&g_178[1][4],&g_178[0][2],&g_264,&g_264,&g_178[0][2],&g_178[1][4],&g_178[0][2]}}}; static uint16_t ****g_1590 = &g_918; static uint16_t *****g_1589 = &g_1590; static uint32_t g_1598 = 0x3734C30AL; static int32_t * volatile g_1709[8] = {&g_52,&g_13,&g_52,&g_13,&g_52,&g_13,&g_52,&g_13}; static int32_t * volatile g_1710[9][2][9] = {{{&g_87,(void*)0,&g_52,&g_122,(void*)0,&g_6,&g_122,(void*)0,&g_52},{&g_122,&g_52,(void*)0,&g_6,(void*)0,&g_122,(void*)0,(void*)0,&g_13}},{{&g_52,(void*)0,&g_16[3][3][5],&g_52,&g_16[4][2][1],&g_16[3][3][5],&g_6,&g_16[3][3][5],&g_16[4][2][1]},{&g_52,(void*)0,(void*)0,&g_52,&g_6,&g_122,(void*)0,(void*)0,&g_122}},{{(void*)0,&g_87,(void*)0,&g_52,(void*)0,(void*)0,&g_87,(void*)0,&g_16[4][2][1]},{(void*)0,&g_6,&g_13,&g_87,&g_6,(void*)0,&g_52,&g_13,&g_13}},{{(void*)0,(void*)0,&g_16[4][2][1],(void*)0,&g_16[4][2][1],(void*)0,(void*)0,&g_87,(void*)0},{&g_52,&g_6,&g_122,(void*)0,(void*)0,&g_122,&g_52,&g_122,(void*)0}},{{&g_52,&g_87,&g_16[4][2][1],(void*)0,&g_13,&g_16[3][3][5],&g_87,&g_87,&g_16[3][3][5]},{(void*)0,(void*)0,&g_13,(void*)0,&g_122,&g_122,(void*)0,&g_13,(void*)0}},{{&g_87,(void*)0,(void*)0,(void*)0,&g_13,&g_87,&g_6,(void*)0,(void*)0},{(void*)0,&g_122,(void*)0,&g_87,(void*)0,&g_122,(void*)0,(void*)0,&g_13}},{{&g_52,(void*)0,&g_16[3][3][5],&g_52,&g_16[4][2][1],&g_16[3][3][5],&g_6,&g_16[3][3][5],&g_16[4][2][1]},{&g_52,(void*)0,(void*)0,&g_52,&g_6,&g_122,(void*)0,(void*)0,&g_122}},{{(void*)0,&g_87,(void*)0,&g_52,(void*)0,(void*)0,&g_87,(void*)0,&g_16[4][2][1]},{(void*)0,&g_6,&g_13,&g_87,&g_6,(void*)0,&g_52,&g_13,&g_13}},{{(void*)0,(void*)0,&g_16[4][2][1],(void*)0,&g_16[4][2][1],(void*)0,(void*)0,&g_87,(void*)0},{&g_52,&g_6,&g_122,(void*)0,(void*)0,&g_122,&g_52,&g_122,(void*)0}}}; static int32_t * volatile g_1711[5] = {&g_122,&g_122,&g_122,&g_122,&g_122}; static int32_t * volatile g_1813 = &g_16[3][3][5];/* VOLATILE GLOBAL g_1813 */ /* --- FORWARD DECLARATIONS --- */ static uint16_t func_1(void); static int32_t func_19(int64_t p_20, uint64_t p_21, int32_t p_22, const uint8_t p_23); static const uint32_t func_24(int16_t p_25, int32_t p_26, uint8_t p_27); static int32_t func_37(int32_t p_38, uint16_t p_39, const int16_t p_40); static int8_t func_43(int32_t p_44, const uint8_t p_45, uint64_t p_46, uint16_t p_47); static uint64_t func_48(int32_t p_49); static union U0 * func_53(uint8_t p_54); static int32_t * func_57(union U0 * p_58, int32_t p_59, int8_t p_60); static union U0 * func_61(int32_t * p_62, union U0 p_63, union U0 * p_64, int32_t * const p_65, int32_t * p_66); static int32_t * func_67(uint64_t p_68, int32_t * p_69, uint8_t p_70, uint32_t p_71); /* --- FUNCTIONS --- */ /* ------------------------------------------ */ /* * reads : g_6 g_13 g_16 g_28 g_4 g_2 g_52 g_82 g_108 g_123 g_87 g_105 g_139 g_140.f1 g_95 g_157 g_136 g_174 g_178 g_106 g_184 g_122 g_140.f0 g_264 g_261 g_81 g_260 g_140.f3 g_313 g_302 g_362 g_300 g_301 g_140.f2 g_263 g_428 g_536 g_537 g_535 g_590 g_121 g_3 g_10 g_769 g_438 g_534 g_9 g_963 g_1084 g_1085 g_363 g_883 g_1156 g_1162 g_1163 g_140 g_11 g_876 g_964 g_1270 g_650 g_651 g_1083 g_1331 g_1385 g_1330 g_1396 g_1445 g_12 g_1494 g_1532 g_1543 g_770 g_962 g_1589 g_1398 g_1590 g_5 g_918 g_919 g_1322 g_1598 g_1813 g_1397 * writes: g_6 g_13 g_16 g_52 g_81 g_82 g_108 g_87 g_123 g_136 g_122 g_140.f1 g_106 g_174 g_105 g_178 g_184 g_28 g_121 g_260 g_264 g_298 g_261 g_139 g_140.f0 g_263 g_302 g_428 g_438 g_95 g_590 g_140.f3 g_4 g_769 g_883 g_535 g_1083 g_362 g_1156 g_1162 g_301 g_1270 g_876 g_1322 g_1330 g_1385 g_1397 g_1532 g_1598 */ static uint16_t func_1(void) { /* block id: 0 */ int64_t l_35[6][8][3] = {{{0xFC4999369E1D6210LL,0xCE005AB1361131E3LL,0x256CD219FA4A603DLL},{0xFD1F91351DBD7CCFLL,(-1L),0x120B879B6842A457LL},{0xFC4999369E1D6210LL,0xEDA7DA9FC5C2DA50LL,0xCE005AB1361131E3LL},{0xA5B4D633C66883CELL,0xA0B2B0402AD9236FLL,3L},{0xEDA7DA9FC5C2DA50LL,0xFF9B037144DB2854LL,0xFF9B037144DB2854LL},{0L,0L,3L},{0x6E5F3778A82FB348LL,(-9L),0xCE005AB1361131E3LL},{(-1L),2L,0x120B879B6842A457LL}},{{0x256CD219FA4A603DLL,0xE1580EB60F9AA2AALL,0x256CD219FA4A603DLL},{0x120B879B6842A457LL,2L,(-1L)},{0xCE005AB1361131E3LL,(-9L),0x6E5F3778A82FB348LL},{3L,0L,0L},{0xFF9B037144DB2854LL,0x3F1863D476FC58ACLL,0xFF9B037144DB2854LL},{(-1L),(-1L),0xB293C34F97039802LL},{0xE1580EB60F9AA2AALL,0xFF9B037144DB2854LL,0x6E5F3778A82FB348LL},{0xFD1F91351DBD7CCFLL,0L,0L}},{{0x17999919139F4802LL,0xE1580EB60F9AA2AALL,0x6E5F3778A82FB348LL},{0L,0x28AB82AEC7F5175DLL,0xB293C34F97039802LL},{0x256CD219FA4A603DLL,0xEDA7DA9FC5C2DA50LL,0xFF9B037144DB2854LL},{0x02E9D3B05E2623EELL,1L,0x02E9D3B05E2623EELL},{0xFF9B037144DB2854LL,0xEDA7DA9FC5C2DA50LL,0x256CD219FA4A603DLL},{0xB293C34F97039802LL,0x28AB82AEC7F5175DLL,0L},{0x6E5F3778A82FB348LL,0xE1580EB60F9AA2AALL,0x17999919139F4802LL},{0L,0L,0xFD1F91351DBD7CCFLL}},{{0x6E5F3778A82FB348LL,0xFF9B037144DB2854LL,0xE1580EB60F9AA2AALL},{0xB293C34F97039802LL,(-1L),(-1L)},{0xFF9B037144DB2854LL,0x3F1863D476FC58ACLL,0x3F1863D476FC58ACLL},{0x02E9D3B05E2623EELL,0L,(-1L)},{0x256CD219FA4A603DLL,0xFC4999369E1D6210LL,0xE1580EB60F9AA2AALL},{0L,0xA0B2B0402AD9236FLL,0xFD1F91351DBD7CCFLL},{0x17999919139F4802LL,0L,0x17999919139F4802LL},{0xFD1F91351DBD7CCFLL,0xA0B2B0402AD9236FLL,0L}},{{0xE1580EB60F9AA2AALL,0xFC4999369E1D6210LL,0x256CD219FA4A603DLL},{(-1L),0L,0x02E9D3B05E2623EELL},{0x3F1863D476FC58ACLL,0x3F1863D476FC58ACLL,0xFF9B037144DB2854LL},{(-1L),(-1L),0xB293C34F97039802LL},{0xE1580EB60F9AA2AALL,0xFF9B037144DB2854LL,0x6E5F3778A82FB348LL},{0xFD1F91351DBD7CCFLL,0L,0L},{0x17999919139F4802LL,0xE1580EB60F9AA2AALL,0x6E5F3778A82FB348LL},{0L,0x28AB82AEC7F5175DLL,0xB293C34F97039802LL}},{{0x256CD219FA4A603DLL,0xEDA7DA9FC5C2DA50LL,0xFF9B037144DB2854LL},{0x02E9D3B05E2623EELL,1L,0x02E9D3B05E2623EELL},{0xFF9B037144DB2854LL,0xEDA7DA9FC5C2DA50LL,0x256CD219FA4A603DLL},{0xB293C34F97039802LL,0x28AB82AEC7F5175DLL,0L},{0x6E5F3778A82FB348LL,0xE1580EB60F9AA2AALL,0x17999919139F4802LL},{0L,0L,0xFD1F91351DBD7CCFLL},{0x6E5F3778A82FB348LL,0xFF9B037144DB2854LL,0xE1580EB60F9AA2AALL},{0xB293C34F97039802LL,(-1L),(-1L)}}}; uint64_t l_988[10][4][1] = {{{18446744073709551615UL},{0xE150DD60C9044AC8LL},{18446744073709551608UL},{0x1E5E6B10D163C6DALL}},{{7UL},{0x1E5E6B10D163C6DALL},{18446744073709551608UL},{0xE150DD60C9044AC8LL}},{{18446744073709551615UL},{0x8AEF8C28CE057251LL},{18446744073709551615UL},{0xE150DD60C9044AC8LL}},{{18446744073709551608UL},{0x1E5E6B10D163C6DALL},{7UL},{0x1E5E6B10D163C6DALL}},{{18446744073709551608UL},{0xE150DD60C9044AC8LL},{18446744073709551615UL},{0x8AEF8C28CE057251LL}},{{18446744073709551615UL},{0xE150DD60C9044AC8LL},{18446744073709551608UL},{0x1E5E6B10D163C6DALL}},{{7UL},{0x1E5E6B10D163C6DALL},{18446744073709551608UL},{0xE150DD60C9044AC8LL}},{{18446744073709551615UL},{0x8AEF8C28CE057251LL},{18446744073709551615UL},{0xE150DD60C9044AC8LL}},{{18446744073709551608UL},{0x1E5E6B10D163C6DALL},{7UL},{0x1E5E6B10D163C6DALL}},{{18446744073709551608UL},{0xE150DD60C9044AC8LL},{18446744073709551615UL},{0x8AEF8C28CE057251LL}}}; int32_t l_1567 = 0xDC829418L; uint8_t * const **l_1583 = &g_1084; int64_t l_1587 = 1L; uint16_t l_1594 = 65531UL; const uint64_t l_1619 = 0xA9D54D1EBA9783F2LL; union U0 *l_1627[9][1][2] = {{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}},{{(void*)0,(void*)0}}}; int32_t l_1681 = 0x77587165L; int32_t l_1682 = 0L; int64_t l_1699 = (-1L); int32_t *l_1747 = &g_87; int32_t l_1766 = 6L; int32_t l_1767 = (-5L); int32_t l_1770 = 0x53E92AE4L; int32_t l_1772 = (-4L); int32_t l_1774 = (-1L); int32_t l_1776[8]; uint64_t l_1812 = 1UL; int64_t l_1843 = 0xB3C0ABA57CE90633LL; uint16_t **** const *l_1854 = &g_1590; int i, j, k; for (i = 0; i < 8; i++) l_1776[i] = 6L; for (g_6 = (-27); (g_6 >= 17); g_6++) { /* block id: 3 */ uint8_t l_1576[3]; uint64_t l_1615 = 1UL; int64_t l_1616 = 0x1A76A234910E1450LL; int i; for (i = 0; i < 3; i++) l_1576[i] = 0xFEL; for (g_13 = 16; (g_13 <= (-25)); g_13--) { /* block id: 6 */ uint16_t l_36 = 7UL; int32_t l_1642[6][1] = {{1L},{0xE48ADFD2L},{1L},{0xE48ADFD2L},{1L},{0xE48ADFD2L}}; int64_t l_1643 = 8L; int i, j; for (g_16[3][3][5] = (-8); (g_16[3][3][5] > (-24)); g_16[3][3][5] = safe_sub_func_uint64_t_u_u(g_16[3][3][5], 1)) { /* block id: 9 */ int16_t l_987 = 1L; int32_t *l_1566[6][7][6] = {{{&g_16[2][1][6],&g_16[3][3][5],&g_6,&g_16[2][1][6],&g_16[0][4][2],&g_13},{&g_16[4][2][3],&g_16[3][3][5],&g_16[2][1][0],&g_16[3][3][5],&g_16[2][1][0],&g_16[3][3][5]},{&g_13,(void*)0,&g_16[1][0][0],&g_16[4][1][6],&g_16[2][1][0],&g_16[0][4][2]},{(void*)0,&g_16[3][3][5],&g_6,(void*)0,&g_13,&g_16[0][3][1]},{&g_13,&g_13,&g_6,(void*)0,&g_16[3][3][5],&g_13},{&g_16[0][4][2],&g_6,(void*)0,&g_6,&g_16[3][3][5],&g_16[3][3][5]},{&g_6,&g_13,&g_13,&g_6,&g_13,&g_16[3][3][5]}},{{&g_16[1][0][0],&g_13,&g_13,&g_13,&g_16[3][3][5],&g_6},{&g_6,&g_6,&g_16[0][3][1],&g_16[2][1][0],&g_16[3][3][5],&g_6},{&g_16[3][3][5],&g_13,&g_13,&g_16[3][3][5],&g_13,(void*)0},{(void*)0,&g_13,&g_16[3][3][5],&g_16[1][0][0],&g_16[3][3][5],&g_13},{&g_16[2][1][0],&g_6,&g_16[3][3][5],&g_16[0][4][2],&g_16[3][3][5],&g_13},{(void*)0,&g_13,&g_6,(void*)0,&g_13,&g_16[0][3][1]},{&g_13,&g_13,&g_6,(void*)0,&g_16[3][3][5],&g_13}},{{&g_16[0][4][2],&g_6,(void*)0,&g_6,&g_16[3][3][5],&g_16[3][3][5]},{&g_6,&g_13,&g_13,&g_6,&g_13,&g_16[3][3][5]},{&g_16[1][0][0],&g_13,&g_13,&g_13,&g_16[3][3][5],&g_6},{&g_6,&g_6,&g_16[0][3][1],&g_16[2][1][0],&g_16[3][3][5],&g_6},{&g_16[3][3][5],&g_13,&g_13,&g_16[3][3][5],&g_13,(void*)0},{(void*)0,&g_13,&g_16[3][3][5],&g_16[1][0][0],&g_16[3][3][5],&g_13},{&g_16[2][1][0],&g_6,&g_16[3][3][5],&g_16[0][4][2],&g_16[3][3][5],&g_13}},{{(void*)0,&g_13,&g_6,(void*)0,&g_13,&g_16[0][3][1]},{&g_13,&g_13,&g_6,(void*)0,&g_16[3][3][5],&g_13},{&g_16[0][4][2],&g_6,(void*)0,&g_6,&g_16[3][3][5],&g_16[3][3][5]},{&g_6,&g_13,&g_13,&g_6,&g_13,&g_16[3][3][5]},{&g_16[1][0][0],&g_13,&g_13,&g_13,&g_16[3][3][5],&g_6},{&g_6,&g_6,&g_16[0][3][1],&g_16[2][1][0],&g_16[3][3][5],&g_6},{&g_16[3][3][5],&g_13,&g_13,&g_16[3][3][5],&g_13,(void*)0}},{{(void*)0,&g_13,&g_16[3][3][5],&g_16[1][0][0],&g_16[3][3][5],&g_13},{&g_16[2][1][0],&g_6,&g_16[3][3][5],&g_16[0][4][2],&g_16[3][3][5],&g_13},{(void*)0,&g_13,&g_6,(void*)0,&g_13,&g_16[0][3][1]},{&g_13,&g_13,&g_6,(void*)0,&g_16[3][3][5],&g_13},{&g_16[0][4][2],&g_6,(void*)0,&g_6,&g_16[3][3][5],&g_16[3][3][5]},{&g_6,&g_13,&g_13,&g_6,&g_13,&g_16[3][3][5]},{&g_16[1][0][0],&g_13,&g_13,&g_13,&g_16[3][3][5],&g_6}},{{&g_6,&g_13,&g_6,&g_16[3][3][5],&g_13,(void*)0},{&g_13,&g_16[4][2][3],&g_16[3][3][5],&g_13,&g_16[2][1][6],&g_13},{&g_16[0][3][1],&g_16[4][2][3],&g_13,&g_16[3][3][5],&g_13,&g_16[4][2][3]},{&g_16[3][3][5],&g_13,&g_16[4][1][6],&g_13,&g_13,&g_16[2][1][6]},{&g_6,&g_16[4][2][3],&g_13,&g_6,&g_16[2][1][6],&g_6},{(void*)0,&g_16[4][2][3],(void*)0,&g_16[0][3][1],&g_13,&g_16[3][3][5]},{&g_13,&g_13,&g_13,&g_6,&g_13,&g_13}}}; uint16_t *****l_1591 = &g_1590; int64_t l_1621 = 1L; const uint64_t l_1641 = 0x3ECFECB8101FD314LL; int i, j, k; l_1567 &= func_19((func_24((g_28[0][0][2] && ((safe_add_func_uint32_t_u_u(((0L < ((safe_rshift_func_int8_t_s_s((safe_lshift_func_uint8_t_u_u(g_4[0], l_35[1][0][1])), 4)) , (l_36 < func_37((safe_lshift_func_int8_t_s_u(func_43(g_2, g_13, func_48(g_16[0][0][7]), g_13), 1)), g_16[3][3][5], l_35[1][2][2])))) < g_13), (-1L))) , g_16[1][3][7])), l_36, l_36) > l_35[1][0][1]), l_987, l_988[6][3][0], l_35[2][2][0]); for (g_106 = 3; (g_106 >= 0); g_106 -= 1) { /* block id: 877 */ int32_t l_1573 = 0xBB2CC33BL; int32_t l_1585 = (-2L); for (g_260 = 0; (g_260 <= 3); g_260 += 1) { /* block id: 880 */ uint8_t l_1580 = 0x85L; int8_t *l_1584 = &g_261; uint32_t *l_1597 = &g_1598; int32_t l_1599 = (-8L); int32_t l_1600 = 0x8626BA35L; int16_t l_1620 = 0xED43L; int i; l_1585 ^= (safe_add_func_uint16_t_u_u(((safe_sub_func_int8_t_s_s(((!(*g_1331)) , (((0x37F2D8B0L == l_1573) != (safe_lshift_func_uint8_t_u_s((l_1567 ^ l_1576[0]), (!((safe_mod_func_int32_t_s_s(l_36, l_1580)) < (safe_sub_func_uint8_t_u_u((((*l_1584) = ((void*)0 == l_1583)) ^ 0xE3L), l_1576[0]))))))) , g_962)), 0x06L)) ^ l_1573), 0x4B9FL)); l_1599 = (safe_unary_minus_func_uint32_t_u((l_1587 != ((((g_876 = l_1580) , (~(((l_1591 = g_1589) == (void*)0) , (safe_lshift_func_int16_t_s_u(1L, (l_1594 == l_35[1][0][1])))))) || ((safe_div_func_int64_t_s_s((((*l_1597) = ((*g_1398) &= (((void*)0 == &g_362[4]) == (-1L)))) , l_36), 5UL)) , (-6L))) || l_1580)))); if (l_1600) break; l_1620 |= ((l_1585 && (l_1600 != (((safe_div_func_uint32_t_u_u((safe_mod_func_uint64_t_u_u((((safe_add_func_int8_t_s_s(((safe_sub_func_uint8_t_u_u(((l_1576[1] , ((g_140.f3 , (l_1615 < (l_1616 != 18446744073709551608UL))) ^ g_9)) , (safe_rshift_func_uint16_t_u_u((((0x19104F502F350077LL != 0xCCDDE9F5A2107A16LL) , g_264) , l_36), l_1616))), 254UL)) & l_1619), 0x62L)) | 0UL) & g_28[1][0][1]), l_1599)), 0x9C95C809L)) >= 0L) != g_81))) == l_1573); } return l_1621; } l_1642[1][0] = (safe_mod_func_uint64_t_u_u(l_36, ((safe_div_func_uint32_t_u_u(((!(l_1627[2][0][0] != &g_140)) == (safe_lshift_func_int8_t_s_s(((safe_mod_func_int32_t_s_s((((((safe_lshift_func_uint16_t_u_u(0x52CBL, 8)) , (*g_157)) , (l_1576[0] , ((((void*)0 == (*g_1589)) < (safe_mod_func_uint64_t_u_u(((safe_sub_func_int8_t_s_s(((safe_lshift_func_uint8_t_u_u((!l_36), (*g_1331))) , g_28[1][0][6]), g_5)) ^ l_1567), l_1615))) == 0x6EA7AE519BBE1D56LL))) || 0x688014A5L) == l_988[6][2][0]), g_13)) < 0x27L), g_964[0]))), l_1587)) , l_1641))); return l_1643; } } for (g_95 = 0; (g_95 != (-11)); --g_95) { /* block id: 899 */ int32_t l_1653 = 6L; for (g_87 = 0; (g_87 <= 1); g_87 += 1) { /* block id: 902 */ uint64_t **l_1650 = &g_770[1]; int32_t l_1661[6]; int8_t *l_1662 = &g_876; int16_t *l_1663[5][6] = {{(void*)0,&g_1532[0],&g_1532[0],(void*)0,&g_105,&g_1532[g_87]},{&g_1532[g_87],(void*)0,(void*)0,(void*)0,&g_1532[g_87],&g_105},{(void*)0,&g_1532[g_87],&g_105,&g_105,&g_1532[g_87],(void*)0},{&g_1532[0],(void*)0,&g_105,&g_1532[g_87],&g_105,(void*)0},{&g_105,&g_1532[0],&g_105,(void*)0,(void*)0,&g_105}}; int i, j; for (i = 0; i < 6; i++) l_1661[i] = (-3L); } return l_1653; } } for (g_121 = 2; (g_121 >= 0); g_121 -= 1) { /* block id: 919 */ int32_t l_1672 = 0x8B568FBBL; uint32_t l_1676 = 4294967295UL; int32_t ***l_1679 = &g_537; uint64_t l_1741 = 9UL; uint64_t l_1742[7]; int32_t l_1763[8][2][2]; uint32_t l_1819 = 18446744073709551609UL; int32_t l_1848 = (-10L); const int32_t l_1853 = 0L; uint64_t l_1866 = 0x416F2C7BABF11251LL; int i, j, k; for (i = 0; i < 7; i++) l_1742[i] = 0x6C8CBAD6C82B0D01LL; for (i = 0; i < 8; i++) { for (j = 0; j < 2; j++) { for (k = 0; k < 2; k++) l_1763[i][j][k] = (-6L); } } for (g_184 = 0; (g_184 <= 2); g_184 += 1) { /* block id: 922 */ int32_t ***l_1677 = &g_301; (*g_537) = (void*)0; for (g_6 = 2; (g_6 >= 0); g_6 -= 1) { /* block id: 926 */ uint16_t **l_1675 = &g_428; int32_t ****l_1678[1][5] = {{&l_1677,&l_1677,&l_1677,&l_1677,&l_1677}}; int i, j, k; if ((safe_mul_func_uint16_t_u_u(((0x5EL | (((safe_div_func_uint8_t_u_u(l_35[(g_121 + 2)][(g_121 + 1)][g_184], (safe_sub_func_int64_t_s_s(((g_1532[0] = (g_16[4][3][6] && (safe_sub_func_int32_t_s_s((l_1672 || 0xE46C5EECAED3FDB7LL), (safe_sub_func_uint64_t_u_u((g_178[(g_121 + 2)][g_184] = ((*g_918) == l_1675)), ((l_1679 = (l_1676 , l_1677)) != (void*)0))))))) > 0xFF00L), l_35[1][0][1])))) <= g_28[0][0][2]) <= 1UL)) == l_1672), 1L))) { /* block id: 930 */ uint32_t l_1680 = 0x82FA02F0L; return l_1680; } else { /* block id: 932 */ return l_1681; } } } for (g_13 = 0; (g_13 <= 2); g_13 += 1) { /* block id: 939 */ uint64_t l_1683 = 1UL; int64_t ***l_1686 = &g_362[2]; uint8_t ***l_1704 = &g_1330; int32_t l_1739[1]; int16_t * const l_1790 = &g_106; union U0 l_1791 = {0UL}; uint64_t l_1802 = 1UL; int32_t l_1807 = 0x730D4F8CL; int32_t l_1811 = 0x70920535L; int i; for (i = 0; i < 1; i++) l_1739[i] = 1L; l_1683 &= l_1682; if ((l_35[0][4][2] && 0xA933L)) { /* block id: 941 */ int8_t l_1698 = 1L; uint8_t * const **l_1708[8][2][4] = {{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}},{{&g_1084,&g_1084,&g_1084,&g_1084},{&g_1084,&g_1084,&g_1084,&g_1084}}}; int32_t l_1731 = (-1L); int32_t **l_1734 = &g_302; uint8_t l_1743 = 6UL; uint32_t l_1744 = 18446744073709551609UL; int32_t l_1775[3][2][3] = {{{0x26D157E4L,0x56FEE8F4L,0x56FEE8F4L},{0xBBC0A604L,0x56FEE8F4L,0xE227CD42L}},{{3L,0x56FEE8F4L,0x714204ECL},{0x26D157E4L,0x56FEE8F4L,0x56FEE8F4L}},{{0xBBC0A604L,0x56FEE8F4L,0xE227CD42L},{3L,0x56FEE8F4L,0x714204ECL}}}; uint64_t l_1777 = 6UL; int16_t *l_1792 = &g_105; int i, j, k; for (g_260 = 2; (g_260 >= 0); g_260 -= 1) { /* block id: 944 */ int8_t *l_1700 = (void*)0; int8_t *l_1701 = &g_261; int8_t *l_1702 = &l_1698; int32_t l_1703 = 0xB409AF80L; uint64_t l_1713[10] = {0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL,0xA241A6758A299D87LL}; int32_t l_1735 = 8L; int32_t l_1762 = 0xDC2DB571L; int32_t l_1764 = 1L; int32_t l_1765 = 0L; int32_t l_1768 = 0L; int32_t l_1769 = 0x2FAE6395L; int32_t l_1771 = (-7L); uint8_t l_1780 = 0x2FL; int i, j, k; if ((0UL <= (l_1703 = (safe_rshift_func_uint8_t_u_s((((*l_1702) = ((*l_1701) = (((void*)0 != l_1686) != (safe_sub_func_int16_t_s_s((safe_div_func_int16_t_s_s((((((((void*)0 != (**g_1083)) , (((safe_mod_func_uint32_t_u_u(((((~(0x18L ^ ((l_35[(g_121 + 2)][g_260][g_260] < (safe_mul_func_int16_t_s_s(0xCA3AL, l_35[(g_121 + 2)][(g_13 + 3)][g_13]))) >= 0UL))) < 0UL) || l_1698) & (-9L)), l_1698)) > 1L) == l_1699)) > g_87) | l_1683) , (void*)0) != (void*)0), 65534UL)), 0xBF1AL))))) ^ l_1683), 7))))) { /* block id: 948 */ uint8_t ****l_1705 = (void*)0; uint8_t ****l_1706 = (void*)0; uint8_t ****l_1707 = &l_1704; int32_t *l_1712[3][2]; int i, j; for (i = 0; i < 3; i++) { for (j = 0; j < 2; j++) l_1712[i][j] = &g_16[3][3][5]; } l_1713[8] ^= (((*l_1707) = l_1704) == ((*g_157) , l_1708[3][1][1])); return l_1698; } else { /* block id: 952 */ uint64_t *l_1720 = &g_178[0][2]; uint64_t *l_1736[5][5] = {{&l_1713[8],&l_1713[4],&l_1713[8],&l_1713[4],&l_1713[8]},{&l_988[1][3][0],&l_1713[9],&l_1713[9],&l_988[1][3][0],&l_988[1][3][0]},{(void*)0,&l_1713[4],(void*)0,&l_1713[4],(void*)0},{&l_988[1][3][0],&l_988[1][3][0],&l_1713[9],&l_1713[9],&l_988[1][3][0]},{&l_1713[8],&l_1713[4],&l_1713[8],&l_1713[4],&l_1713[8]}}; int32_t l_1737 = (-8L); int16_t *l_1740 = &g_1532[1]; int32_t *l_1748 = &l_1731; int32_t *l_1749 = (void*)0; int32_t l_1750 = 0x75ABBF72L; int32_t l_1751 = 0x18522B67L; int32_t *l_1752 = &g_52; int32_t *l_1753 = &g_52; int32_t *l_1754 = &l_1731; int32_t *l_1755 = &g_16[0][1][1]; int32_t *l_1756 = (void*)0; int32_t l_1757 = 5L; int32_t *l_1758 = &l_1731; int32_t *l_1759 = &l_1567; int32_t *l_1760 = &l_1703; int32_t *l_1761[9] = {&l_1672,&l_1672,(void*)0,&l_1672,&l_1672,(void*)0,&l_1672,&l_1672,(void*)0}; int32_t l_1773 = 1L; int i, j, k; (*l_1734) = func_67(((safe_mul_func_int8_t_s_s(((*l_1702) = ((*l_1701) = g_13)), (((safe_mod_func_uint64_t_u_u((safe_unary_minus_func_uint32_t_u(((safe_unary_minus_func_uint32_t_u(g_28[0][0][2])) | ((*l_1720)++)))), (((safe_add_func_int32_t_s_s(((((4UL < (g_105 = ((*l_1740) = (safe_rshift_func_uint16_t_u_s((safe_lshift_func_uint16_t_u_u((safe_add_func_uint16_t_u_u((l_1737 = (l_1682 = ((l_1703 = l_1731) != (l_1567 |= (safe_mul_func_uint8_t_u_u((**g_1330), (g_876 = (l_1735 = (l_1734 != (void*)0))))))))), (l_1739[0] ^= ((!(l_1731 < l_1683)) != 5L)))), l_1683)), l_1713[3]))))) && g_123) ^ 1L) | 0xBA605199L), 4294967287UL)) != 0xB518ECE9BA1BBE96LL) , 9UL))) < l_1741) >= g_3))) , l_1742[0]), g_1322[(g_260 + 2)][(g_13 + 3)][g_260], l_1743, (*g_1398)); if ((***g_536)) continue; l_1747 = ((**l_1679) = func_67((***l_1679), g_1322[(g_121 + 4)][(g_13 + 2)][g_121], l_1744, (safe_rshift_func_uint16_t_u_s(l_1737, 7)))); --l_1777; } l_1780++; for (g_87 = 0; (g_87 < (-12)); g_87 = safe_sub_func_int16_t_s_s(g_87, 6)) { /* block id: 974 */ union U0 *l_1785 = (void*)0; uint64_t *l_1808[1][4]; int32_t l_1809 = 2L; int32_t *l_1810[9] = {&g_13,&l_1770,&g_13,&l_1770,&g_13,&l_1770,&g_13,&l_1770,&g_13}; int i, j; for (i = 0; i < 1; i++) { for (j = 0; j < 4; j++) l_1808[i][j] = (void*)0; } (*l_1747) = ((***l_1679) , ((l_1785 != ((*l_1747) , func_61((*g_301), (***g_1163), l_1627[1][0][1], &l_1739[0], (**l_1679)))) <= l_1703)); l_1811 &= (safe_sub_func_int32_t_s_s((g_1598 & (g_105 = (l_1768 , (safe_add_func_int8_t_s_s(((*l_1701) = (((l_1790 != (l_1791 , l_1792)) & (safe_rshift_func_int16_t_s_s((0x41197D49AB03AC5ELL & (safe_unary_minus_func_uint32_t_u((safe_lshift_func_int16_t_s_u((safe_mul_func_uint16_t_u_u(0x67BFL, ((*l_1790) = ((safe_lshift_func_uint16_t_u_s((l_1802 >= (l_1735 = (safe_div_func_int16_t_s_s((((((safe_lshift_func_uint8_t_u_u(l_1791.f2, (**l_1734))) >= 0L) != l_1739[0]) >= (*l_1747)) < (*g_1331)), l_1807)))), (*l_1747))) , g_590)))), 7))))), l_1809))) >= (**l_1734))), g_140.f2))))), l_1683)); } (***l_1679) &= 0xF8B687BEL; } return l_1791.f1; } else { /* block id: 985 */ return l_1812; } } (*g_1813) |= (*l_1747); for (g_438 = 0; (g_438 != 5); g_438 = safe_add_func_uint8_t_u_u(g_438, 5)) { /* block id: 992 */ int32_t l_1816 = (-3L); int32_t *l_1817 = &l_1672; int32_t *l_1818 = &l_1567; int16_t l_1830 = 0L; uint64_t *l_1849 = &l_988[4][0][0]; int32_t *l_1850 = &l_1763[6][0][0]; l_1819++; (*l_1850) ^= ((((safe_div_func_uint8_t_u_u((safe_sub_func_uint64_t_u_u(((*l_1849) = ((safe_mod_func_uint64_t_u_u((*l_1747), ((safe_mul_func_uint16_t_u_u((l_1830 & (safe_lshift_func_int8_t_s_u((+((*l_1747) , ((safe_lshift_func_int16_t_s_s(0L, 14)) & (safe_mod_func_int8_t_s_s((((safe_rshift_func_int8_t_s_u(((((+(((safe_rshift_func_uint8_t_u_u((((((l_1843 |= ((*g_428) = (1UL >= (*l_1747)))) , (*g_1396)) == &g_1398) == (safe_div_func_uint32_t_u_u((safe_div_func_uint32_t_u_u(g_16[4][0][5], 0x6D25DD37L)), (*l_1747)))) , (*l_1818)), (**g_1330))) & 0x9B73098EL) == (*l_1817))) | g_1598) < l_1848) == 0x36L), 2)) & 65535UL) ^ (*l_1747)), (*l_1818)))))), (*g_1085)))), (*l_1818))) | (*l_1747)))) && (*l_1817))), 0x436EB24801981F21LL)), 0x2EL)) < 0xE75CL) || 0xF117L) , (*l_1747)); (*l_1818) = ((((safe_add_func_uint8_t_u_u(0x8DL, (((l_1853 == 0x49A8L) , &g_1385[0]) == (l_1854 = l_1854)))) , (*l_1747)) , (safe_mul_func_int8_t_s_s(((safe_add_func_int32_t_s_s((*l_1818), (safe_rshift_func_uint16_t_u_s((safe_sub_func_int16_t_s_s((safe_unary_minus_func_uint8_t_u(((safe_sub_func_int64_t_s_s(7L, l_1866)) , (*l_1747)))), 0xF8A6L)), g_6)))) != 0xDEACL), (*l_1747)))) , (*l_1850)); } } return (*l_1747); } /* ------------------------------------------ */ /* * reads : g_438 g_534 g_264 g_9 g_16 g_106 g_260 g_178 g_136 g_963 g_184 g_1084 g_1085 g_174 g_428 g_123 g_28 g_536 g_537 g_363 g_105 g_10 g_535 g_302 g_883 g_362 g_1156 g_121 g_4 g_1162 g_1163 g_300 g_301 g_82 g_108 g_157 g_140 g_13 g_87 g_139 g_11 g_140.f1 g_122 g_95 g_140.f0 g_52 g_876 g_81 g_964 g_1270 g_650 g_651 g_1083 g_6 g_1331 g_1385 g_1330 g_1396 g_1445 g_313 g_12 g_1494 g_590 g_1532 g_1543 g_769 g_770 g_261 * writes: g_105 g_883 g_438 g_535 g_136 g_139 g_261 g_106 g_174 g_1083 g_184 g_362 g_302 g_260 g_178 g_28 g_1156 g_1162 g_82 g_108 g_87 g_123 g_122 g_140.f1 g_121 g_264 g_52 g_301 g_1270 g_876 g_1322 g_1330 g_81 g_263 g_1385 g_1397 g_95 g_1532 */ static int32_t func_19(int64_t p_20, uint64_t p_21, int32_t p_22, const uint8_t p_23) { /* block id: 545 */ union U0 l_989[5][9][5] = {{{{0x77ED866CL},{4294967295UL},{4294967286UL},{4294967288UL},{6UL}},{{0x8146E507L},{0x070117A4L},{0x8BB3D74EL},{4294967294UL},{0x1D262C3CL}},{{4294967295UL},{0x422A77CDL},{4294967286UL},{6UL},{4294967295UL}},{{7UL},{2UL},{0UL},{4294967295UL},{4294967293UL}},{{0x49F51FA9L},{4294967295UL},{0x89FEA1C4L},{0UL},{0UL}},{{0x2CF5EADEL},{1UL},{0x4670B3E1L},{0xD9CC205CL},{0x02859FACL}},{{4294967295UL},{4294967294UL},{0x38EB6128L},{4294967295UL},{0x6E9A2641L}},{{0x89FEA1C4L},{0xF71A4271L},{0x42FF2398L},{1UL},{0x5A5FCB51L}},{{4294967295UL},{0x8BB3D74EL},{0UL},{0x0C014DC2L},{0UL}}},{{{6UL},{0x1D262C3CL},{4294967295UL},{2UL},{0x6ABB995EL}},{{0xD9CC205CL},{1UL},{4294967295UL},{0x070117A4L},{4294967287UL}},{{0xF71A4271L},{4294967287UL},{4294967295UL},{1UL},{4294967295UL}},{{0x0E1D38C4L},{4294967287UL},{4294967294UL},{0x7D696B3AL},{0x77ED866CL}},{{0x96F786A7L},{1UL},{4294967287UL},{4294967294UL},{0x0C014DC2L}},{{4294967295UL},{0x1D262C3CL},{0xA4249B89L},{4294967295UL},{4294967287UL}},{{0x7D509D38L},{0x8BB3D74EL},{1UL},{0x89FEA1C4L},{0UL}},{{0UL},{0xF71A4271L},{0x8146E507L},{4294967295UL},{0x38EB6128L}},{{0x0323CF7DL},{4294967294UL},{8UL},{0xF71A4271L},{0x070117A4L}}},{{{1UL},{1UL},{4294967295UL},{0x77ED866CL},{0x8364F4F3L}},{{4294967295UL},{4294967295UL},{0x0323CF7DL},{0x0323CF7DL},{4294967295UL}},{{0x1D262C3CL},{2UL},{4294967295UL},{0x2CF5EADEL},{0xC6058AFAL}},{{0xD660BF69L},{0x422A77CDL},{4294967287UL},{1UL},{1UL}},{{1UL},{0x070117A4L},{0x146B9453L},{0x1C35B9F3L},{4294967295UL}},{{0xD660BF69L},{4294967295UL},{4294967289UL},{0x67391370L},{4294967286UL}},{{0x1D262C3CL},{4294967287UL},{4294967288UL},{0x4670B3E1L},{8UL}},{{4294967295UL},{0UL},{4294967295UL},{0UL},{3UL}},{{1UL},{0x48A443DBL},{4294967295UL},{0x50991AF9L},{0xBB9CC44DL}}},{{{0x0323CF7DL},{0UL},{0UL},{0xC6058AFAL},{0UL}},{{0UL},{4294967295UL},{0xF71A4271L},{0xD660BF69L},{0UL}},{{0x7D509D38L},{0x77CC9A07L},{4294967286UL},{0UL},{4294967295UL}},{{4294967295UL},{0xBB9CC44DL},{4294967295UL},{7UL},{0xC0AE72CDL}},{{0x96F786A7L},{4294967295UL},{0x5A5FCB51L},{0x8146E507L},{0xD660BF69L}},{{0x0E1D38C4L},{4294967295UL},{4294967294UL},{1UL},{0xD660BF69L}},{{0xF71A4271L},{9UL},{0x1D262C3CL},{4294967293UL},{0xC0AE72CDL}},{{0xFE2E8AD6L},{4294967286UL},{4294967295UL},{0UL},{4294967295UL}},{{4294967295UL},{1UL},{0UL},{0xD9CC205CL},{1UL}}},{{{4294967295UL},{4294967295UL},{0x2CF5EADEL},{4294967294UL},{0x48A443DBL}},{{1UL},{4294967286UL},{4294967287UL},{4294967295UL},{4294967295UL}},{{0xBB9CC44DL},{0x67391370L},{0UL},{1UL},{4294967288UL}},{{4294967295UL},{0UL},{0x875A050CL},{0xD660BF69L},{0UL}},{{0xCE4447F5L},{2UL},{2UL},{0xCE4447F5L},{4294967295UL}},{{0x6E9A2641L},{0x0323CF7DL},{0x42FF2398L},{0x875A050CL},{0x77ED866CL}},{{0x77ED866CL},{0x02859FACL},{4294967288UL},{0x6ABB995EL},{4294967293UL}},{{0x8BB3D74EL},{4294967294UL},{0x1D262C3CL},{0x875A050CL},{4294967286UL}},{{1UL},{0x070117A4L},{0x8EED7664L},{0xCE4447F5L},{0x38EB6128L}}}}; uint64_t l_992 = 0x4CC7BF8FD72D3F3ELL; uint8_t l_994 = 1UL; int32_t **l_1005 = &g_302; int16_t *l_1006 = (void*)0; int16_t *l_1007 = &g_105; uint32_t *l_1061 = (void*)0; uint32_t ** const l_1060 = &l_1061; const uint16_t l_1139 = 1UL; int32_t l_1172 = 0x73D1B991L; int32_t l_1173[1][10] = {{0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L,0x577DCE81L}}; uint8_t l_1177 = 0x0DL; int32_t *l_1205 = &g_52; const uint64_t l_1249[9] = {1UL,1UL,1UL,1UL,1UL,1UL,1UL,1UL,1UL}; int64_t l_1268 = 0xD3199A9F2B9F8FDBLL; int32_t l_1337 = 0xAB3B5CD2L; const uint8_t **l_1490 = &g_651[5]; uint64_t l_1550 = 18446744073709551614UL; int i, j, k; if ((l_989[2][2][0] , (safe_mod_func_int64_t_s_s(l_992, ((!l_994) || ((safe_mod_func_int16_t_s_s(((*l_1007) = (safe_sub_func_int32_t_s_s((-1L), ((safe_mod_func_int64_t_s_s((safe_div_func_uint8_t_u_u(0x29L, (safe_div_func_int64_t_s_s((0xD9D07A70L && (((l_989[2][2][0].f1 && ((void*)0 == l_1005)) || l_989[2][2][0].f2) > l_989[2][2][0].f3)), p_23)))), 0x9530A8C26946D889LL)) || p_20)))), p_23)) < p_23)))))) { /* block id: 547 */ int64_t ***l_1008 = &g_362[2]; int64_t *l_1011[6][6][7] = {{{&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]},{&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]}},{{&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]},{&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]}},{{&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]},{&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_260,&g_260,&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260}},{{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260},{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260}},{{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260},{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260}},{{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260},{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_260}}}; uint32_t *l_1013[6][3] = {{&g_438,&g_438,&g_136},{&l_989[2][2][0].f0,&l_989[2][2][0].f0,&l_989[2][2][0].f0},{&g_438,&g_136,&g_136},{&g_438,&l_989[2][2][0].f0,&g_438},{&g_438,&g_438,&g_136},{&l_989[2][2][0].f0,&l_989[2][2][0].f0,&l_989[2][2][0].f0}}; int32_t l_1014 = 3L; union U0 l_1019 = {0UL}; int32_t ** const **l_1022[2]; int32_t l_1027 = 0xA8003DA8L; uint32_t l_1090 = 0xB9D77789L; int64_t **l_1104 = &g_363[7]; uint32_t l_1105 = 0x3F5FBFF5L; uint16_t ****l_1251 = &g_918; uint8_t l_1267 = 0x6BL; int32_t l_1269 = 0xD05BB4BBL; int i, j, k; for (i = 0; i < 2; i++) l_1022[i] = &g_536; lbl_1161: g_883 = (l_1008 = l_1008); if (((safe_div_func_int32_t_s_s((((p_20 |= 0x09E4DF4401D2D232LL) && ((!(p_23 , (++g_438))) <= (((safe_rshift_func_uint8_t_u_s(p_23, 6)) , ((l_1019 , p_23) >= (safe_rshift_func_int16_t_s_s((((*g_534) = l_1022[1]) == (void*)0), 2)))) || (p_21 , (((safe_sub_func_int8_t_s_s(((safe_rshift_func_int8_t_s_s(g_264, 7)) , l_1027), p_20)) , 0x2C73L) , 0x963DL))))) ^ p_23), g_9)) >= p_23)) { /* block id: 553 */ uint16_t l_1034[10][2] = {{0x3B13L,65535UL},{0x4302L,0x4302L},{65535UL,0x4302L},{0x4302L,65535UL},{0x3B13L,7UL},{65535UL,0x3B13L},{7UL,65535UL},{7UL,0x3B13L},{65535UL,7UL},{0x3B13L,65535UL}}; int32_t l_1038[7] = {8L,8L,8L,8L,8L,8L,8L}; int i, j; for (l_992 = (-19); (l_992 >= 23); ++l_992) { /* block id: 556 */ int64_t l_1053 = 0x8F100C35620DCAADLL; int32_t l_1054 = 0x365BA2F4L; for (l_1019.f3 = 14; (l_1019.f3 == 11); --l_1019.f3) { /* block id: 559 */ int8_t l_1055 = 6L; for (g_136 = 11; (g_136 <= 30); g_136 = safe_add_func_int32_t_s_s(g_136, 4)) { /* block id: 562 */ union U0 **l_1037 = &g_139; ++l_1034[5][0]; (*l_1037) = &l_989[2][2][4]; l_1038[1] = p_21; } for (g_261 = 0; (g_261 > (-27)); g_261 = safe_sub_func_int16_t_s_s(g_261, 5)) { /* block id: 569 */ if (p_23) break; p_22 = (safe_mul_func_uint8_t_u_u((((((safe_add_func_uint64_t_u_u((l_1053 = ((p_23 | p_21) | (((*l_1007) = 0x85E7L) ^ (g_106 ^= (safe_mul_func_int8_t_s_s((safe_mul_func_uint16_t_u_u((safe_div_func_uint16_t_u_u(0xCB3FL, 0x20A9L)), g_16[0][4][6])), (p_21 > (safe_div_func_int64_t_s_s(p_22, (p_20 = p_23)))))))))), l_1054)) == p_23) , g_260) , p_23) , l_1055), 0x4FL)); } for (g_174 = 0; (g_174 <= 4); g_174 += 1) { /* block id: 579 */ return p_22; } } p_22 = ((safe_mod_func_int16_t_s_s((safe_lshift_func_int8_t_s_s(((void*)0 != l_1060), 4)), (safe_lshift_func_int16_t_s_s(p_20, 12)))) >= (g_136 ^= g_178[1][0])); } } else { /* block id: 586 */ int64_t l_1077 = (-3L); uint8_t * const l_1080[10][2][5] = {{{&l_994,(void*)0,&l_994,&l_994,&l_994},{&l_994,&l_994,(void*)0,&g_174,&l_994}},{{&g_174,&l_994,&g_174,&l_994,(void*)0},{(void*)0,&l_994,&g_174,&l_994,(void*)0}},{{(void*)0,&l_994,(void*)0,&g_174,&l_994},{&g_174,(void*)0,&g_174,(void*)0,&g_174}},{{&g_174,(void*)0,&l_994,&l_994,&l_994},{&l_994,(void*)0,&l_994,&g_174,(void*)0}},{{&l_994,&g_174,&g_174,&g_174,(void*)0},{(void*)0,&g_174,(void*)0,&l_994,&g_174}},{{&l_994,&l_994,(void*)0,(void*)0,&g_174},{&l_994,&l_994,&g_174,&g_174,&l_994}},{{(void*)0,&l_994,&l_994,&l_994,&g_174},{(void*)0,&g_174,&l_994,(void*)0,&l_994}},{{&l_994,(void*)0,&g_174,&g_174,(void*)0},{(void*)0,&g_174,(void*)0,(void*)0,&l_994}},{{(void*)0,&g_174,&g_174,&g_174,&g_174},{&l_994,&l_994,&g_174,&g_174,(void*)0}},{{&l_994,(void*)0,&l_994,&g_174,&g_174},{(void*)0,&l_994,(void*)0,&g_174,(void*)0}}}; uint8_t * const *l_1079 = &l_1080[2][0][1]; uint8_t * const **l_1078 = &l_1079; const union U0 l_1106 = {4294967288UL}; int32_t l_1111 = 0x647AD728L; int32_t l_1116 = 0xE9B0E148L; int32_t l_1176 = (-1L); int32_t l_1260[2]; int i, j, k; for (i = 0; i < 2; i++) l_1260[i] = 0L; for (g_438 = 0; (g_438 > 48); g_438 = safe_add_func_uint16_t_u_u(g_438, 1)) { /* block id: 589 */ int16_t l_1068 = 7L; uint32_t * const l_1076 = &g_184; uint8_t * const **l_1082 = (void*)0; int32_t l_1110 = (-9L); if (p_23) { /* block id: 590 */ uint32_t l_1069 = 0xF2210148L; uint8_t * const ***l_1081[9][8] = {{&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,(void*)0},{&l_1078,&l_1078,&l_1078,(void*)0,&l_1078,&l_1078,(void*)0,&l_1078},{(void*)0,(void*)0,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078},{&l_1078,&l_1078,&l_1078,(void*)0,&l_1078,&l_1078,&l_1078,&l_1078},{&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,(void*)0,(void*)0,&l_1078},{(void*)0,&l_1078,&l_1078,(void*)0,&l_1078,&l_1078,&l_1078,(void*)0},{&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078},{&l_1078,&l_1078,(void*)0,&l_1078,&l_1078,&l_1078,&l_1078,&l_1078},{(void*)0,&l_1078,&l_1078,&l_1078,&l_1078,(void*)0,&l_1078,&l_1078}}; uint32_t l_1107 = 18446744073709551610UL; int32_t l_1115 = 1L; int i, j; l_1077 = ((safe_div_func_int16_t_s_s(l_1068, ((4294967295UL <= p_23) && (g_963 , l_1069)))) , ((&l_1019 != &l_989[2][2][3]) || ((safe_mul_func_int16_t_s_s(0x1FA4L, (safe_mod_func_int16_t_s_s((safe_mod_func_uint64_t_u_u((l_1076 != (void*)0), p_21)), g_178[0][0])))) | 0x489FC0C0L))); g_1083 = (l_1082 = l_1078); if (((safe_mod_func_uint16_t_u_u(p_22, (safe_mod_func_int64_t_s_s(l_1090, ((safe_mod_func_int32_t_s_s((safe_add_func_uint16_t_u_u(((((safe_rshift_func_int16_t_s_s(((((*l_1076) ^= l_1069) , l_1069) ^ (0xB1D9070C755832C4LL & (p_20 = ((l_1105 = ((**g_1084) , (((l_1069 | ((((*l_1008) = ((safe_lshift_func_uint16_t_u_s((safe_mul_func_int8_t_s_s((safe_mul_func_int8_t_s_s((-3L), (safe_unary_minus_func_uint64_t_u((p_23 || 0UL))))), 0x89L)), 5)) , l_1104)) == (void*)0) <= 255UL)) || (*g_428)) && 0x5528496DL))) > 0x34B42D3FL)))), 5)) , l_1106) , g_28[0][0][1]) ^ p_22), 2UL)), p_21)) && l_1107))))) == g_123)) { /* block id: 598 */ return p_23; } else { /* block id: 600 */ int16_t *l_1114 = (void*)0; l_1111 ^= (l_1106.f2 <= (l_1110 &= (safe_lshift_func_uint16_t_u_u(((0xD026L >= p_20) || g_16[3][3][5]), 14)))); l_1116 &= (3UL ^ (l_1115 &= ((*l_1007) = ((safe_rshift_func_int16_t_s_s(p_23, 11)) < l_1111)))); (**g_536) = &l_1111; if (p_23) continue; } for (g_260 = 0; (g_260 < 17); ++g_260) { /* block id: 611 */ int64_t ****l_1122 = &l_1008; uint64_t *l_1123 = &g_178[0][2]; uint16_t *l_1128[10][10][2] = {{{&l_989[2][2][0].f3,&g_140.f3},{(void*)0,&l_989[2][2][0].f3},{&l_989[2][2][0].f3,&l_989[2][2][0].f3},{&g_140.f3,&g_140.f3},{&g_81,&l_989[2][2][0].f3},{&g_140.f3,&l_989[2][2][0].f3},{&g_81,&l_1019.f3},{&g_81,(void*)0},{&l_1019.f3,(void*)0},{&g_123,&g_123}},{{&l_989[2][2][0].f3,(void*)0},{&g_140.f3,&g_140.f3},{&l_1019.f3,&g_123},{&g_140.f3,&l_989[2][2][0].f3},{&l_989[2][2][0].f3,&l_989[2][2][0].f3},{&g_140.f3,&g_81},{&g_140.f3,&g_140.f3},{&l_1019.f3,(void*)0},{&g_123,(void*)0},{&g_140.f3,&l_989[2][2][0].f3}},{{(void*)0,&l_989[2][2][0].f3},{&g_81,&g_81},{&l_989[2][2][0].f3,&l_989[2][2][0].f3},{&g_123,&l_989[2][2][0].f3},{&g_140.f3,&g_123},{&g_140.f3,&l_1019.f3},{&l_989[2][2][0].f3,(void*)0},{&l_1019.f3,&g_140.f3},{&g_140.f3,&g_81},{&l_1019.f3,&g_140.f3}},{{&g_123,&l_989[2][2][0].f3},{&g_140.f3,&l_1019.f3},{(void*)0,(void*)0},{&g_140.f3,(void*)0},{(void*)0,&l_1019.f3},{&g_140.f3,&l_989[2][2][0].f3},{&g_123,&g_140.f3},{&l_1019.f3,&g_81},{&g_140.f3,&g_140.f3},{&l_1019.f3,(void*)0}},{{&l_989[2][2][0].f3,&l_1019.f3},{&g_140.f3,&g_123},{&g_140.f3,&l_989[2][2][0].f3},{&g_123,&l_989[2][2][0].f3},{&l_989[2][2][0].f3,&g_81},{&g_81,&l_989[2][2][0].f3},{(void*)0,&l_989[2][2][0].f3},{&g_140.f3,(void*)0},{&g_123,(void*)0},{&l_1019.f3,&g_140.f3}},{{&g_140.f3,&g_81},{&g_140.f3,&l_989[2][2][0].f3},{&g_140.f3,(void*)0},{&l_989[2][2][0].f3,&g_123},{&l_989[2][2][0].f3,&l_989[2][2][0].f3},{&g_123,&g_140.f3},{&g_140.f3,&l_1019.f3},{&l_989[2][2][0].f3,(void*)0},{&l_989[2][2][0].f3,&g_81},{&g_140.f3,&g_140.f3}},{{&g_123,&g_140.f3},{&g_81,&l_1019.f3},{&g_140.f3,&g_140.f3},{&g_140.f3,(void*)0},{&g_123,&g_81},{(void*)0,&g_140.f3},{&g_123,&l_989[2][2][0].f3},{&g_81,(void*)0},{&l_1019.f3,&g_140.f3},{&g_81,&g_140.f3}},{{&l_989[2][2][0].f3,&g_140.f3},{&l_989[2][2][0].f3,&l_1019.f3},{(void*)0,&g_123},{&g_123,&l_989[2][2][0].f3},{&g_123,&g_123},{&g_81,&g_81},{&g_140.f3,&g_81},{(void*)0,&g_81},{&g_81,(void*)0},{&l_1019.f3,&g_123}},{{&l_1019.f3,(void*)0},{&g_81,&g_81},{(void*)0,&g_81},{&g_140.f3,&g_81},{&g_81,&g_123},{&g_123,&l_989[2][2][0].f3},{&g_123,&g_123},{(void*)0,&l_1019.f3},{&l_989[2][2][0].f3,&g_140.f3},{&l_989[2][2][0].f3,&g_140.f3}},{{&g_81,&g_140.f3},{&l_1019.f3,(void*)0},{&g_81,&l_989[2][2][0].f3},{&g_123,&g_140.f3},{(void*)0,&g_81},{&g_123,(void*)0},{&g_140.f3,&g_140.f3},{&g_140.f3,&l_1019.f3},{&g_81,&g_140.f3},{&g_123,&g_140.f3}}}; int i, j, k; (****g_535) |= (~((p_20 = p_20) >= ((((*l_1123) = (safe_lshift_func_uint16_t_u_u((&g_362[2] == ((*l_1122) = &g_362[3])), p_21))) < ((**l_1104) = p_21)) == (0x3959811AL == (l_1115 |= ((((safe_mod_func_uint8_t_u_u(((safe_lshift_func_int16_t_s_s(((*l_1007) ^= 0L), 0)) & ((void*)0 == l_1128[7][3][1])), g_10)) && 0x1C1AL) < p_22) , 0xF34BDEE4L)))))); } } else { /* block id: 620 */ uint64_t l_1151 = 0x0C01B4D91BB3D828LL; const int64_t *l_1153 = &g_28[0][0][2]; const int64_t **l_1152 = &l_1153; int16_t *l_1157 = &l_1068; if (((safe_add_func_uint32_t_u_u((safe_rshift_func_uint16_t_u_u(((((((safe_mul_func_int8_t_s_s((safe_sub_func_uint32_t_u_u((((safe_sub_func_int32_t_s_s(l_1139, p_22)) ^ ((safe_mul_func_int8_t_s_s((-6L), (safe_mod_func_int32_t_s_s(((safe_lshift_func_uint16_t_u_s((safe_mul_func_int8_t_s_s(0x13L, (~(safe_rshift_func_int16_t_s_u(((0x12L ^ ((l_1151 , (*g_883)) != l_1152)) != ((*l_1157) &= (safe_mod_func_int16_t_s_s((g_1156 ^= ((*l_1007) = (g_106 != 248UL))), p_22)))), 15))))), 1)) >= g_121), l_1110)))) != p_21)) || p_22), p_23)), p_21)) == g_4[5]) > 0x7050B58EL) || p_20) || p_22) >= 2L), l_1110)), l_1151)) <= l_1116)) { /* block id: 624 */ (***g_535) = &p_22; } else { /* block id: 626 */ uint64_t l_1158 = 3UL; l_1158--; return p_20; } } for (g_184 = 0; (g_184 <= 3); g_184 += 1) { /* block id: 633 */ uint32_t l_1164[10][1]; int i, j; for (i = 0; i < 10; i++) { for (j = 0; j < 1; j++) l_1164[i][j] = 0x535C7369L; } if (g_174) goto lbl_1161; (*g_1163) = g_1162; l_1164[3][0]--; } for (g_261 = 0; (g_261 != (-15)); --g_261) { /* block id: 640 */ (*****g_534) &= (((p_20 , (*g_300)) == (void*)0) > (&l_1079 != (void*)0)); } } for (p_22 = 0; (p_22 >= (-18)); p_22 = safe_sub_func_int16_t_s_s(p_22, 9)) { /* block id: 646 */ int32_t l_1171 = 0xA6D7A020L; int32_t l_1174 = 5L; int32_t l_1175[2]; int32_t *l_1252 = &g_52; uint16_t l_1264 = 0x18B0L; int i; for (i = 0; i < 2; i++) l_1175[i] = (-1L); if (((p_20 < p_21) && (((l_1019 , (p_21 == l_1106.f1)) , 65528UL) , (-9L)))) { /* block id: 647 */ int32_t l_1201[6]; int32_t l_1202 = 0x50667B53L; union U0 *l_1204 = (void*)0; const uint16_t *l_1220 = &l_989[2][2][0].f3; int i; for (i = 0; i < 6; i++) l_1201[i] = (-4L); l_1177++; for (l_1116 = 2; (l_1116 <= 18); l_1116 = safe_add_func_int8_t_s_s(l_1116, 1)) { /* block id: 651 */ union U0 *l_1197 = (void*)0; uint64_t *l_1200[10] = {&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1],&g_178[1][1]}; union U0 **l_1203 = &g_139; int32_t l_1206 = 0x9DB94D84L; int32_t l_1207 = 7L; uint32_t *l_1238[4] = {&g_184,&g_184,&g_184,&g_184}; int i; if (p_23) break; l_1207 ^= (safe_sub_func_uint64_t_u_u(18446744073709551615UL, (l_1206 = ((safe_lshift_func_int8_t_s_s((g_261 = (~(safe_lshift_func_int8_t_s_s(((safe_lshift_func_uint16_t_u_u(p_20, (safe_lshift_func_int16_t_s_s((((safe_div_func_uint8_t_u_u(((p_20 | (p_21 && (((p_20 && (((((l_1205 = func_57(l_1197, ((l_1201[0] = (p_21 = (p_21 , ((++(*g_1085)) & 0x19L)))) ^ (l_1202 = (((*l_1203) = func_61(func_67(l_1202, &l_1202, l_1202, l_1175[0]), (*g_157), &l_989[1][0][4], &l_1176, &l_1176)) == l_1204))), g_11)) == (void*)0) & l_1206) | 4294967291UL) < l_1171)) || p_21) == l_1206))) != g_52), (-10L))) , p_21) , 0x70CFL), 3)))) ^ p_20), g_876)))), p_20)) <= p_20)))); (*l_1205) ^= (safe_div_func_uint8_t_u_u(((safe_lshift_func_uint8_t_u_s(1UL, g_81)) >= (safe_div_func_uint64_t_u_u(((((*g_157) , (p_21 & (safe_lshift_func_uint8_t_u_u(p_23, p_20)))) , ((g_105 = (-9L)) & (&l_1139 == ((safe_sub_func_uint8_t_u_u(0xF2L, p_22)) , l_1220)))) > p_21), 3L))), 0x4EL)); (*l_1205) &= (l_1201[3] <= (0xE5L < (((~p_23) < (l_1175[1] & (((((((((*l_1007) = (p_23 && (safe_rshift_func_uint8_t_u_u((safe_sub_func_int8_t_s_s((safe_unary_minus_func_int16_t_s((safe_sub_func_int8_t_s_s((((safe_mod_func_int32_t_s_s(p_21, (g_438 ^= ((safe_sub_func_int16_t_s_s((((g_184 = (safe_mul_func_int16_t_s_s(p_20, ((safe_add_func_int16_t_s_s(g_16[4][0][7], (+18446744073709551606UL))) >= (-7L))))) , p_22) & p_20), 65535UL)) && p_22)))) , (void*)0) != (void*)0), p_20)))), p_20)), 0)))) != g_28[0][0][3]) > 0x37474265L) , (void*)0) == (*g_1163)) <= 0x1B01BB6AL) || g_964[2]) , p_20))) < l_1106.f3))); } } else { /* block id: 669 */ uint16_t *l_1250 = &g_1156; int32_t l_1259 = 0x0D5929A0L; int32_t l_1261 = 2L; int32_t l_1262 = 0xD7498310L; int32_t l_1263[2]; int i; for (i = 0; i < 2; i++) l_1263[i] = 0L; if ((safe_lshift_func_uint16_t_u_u((g_13 , (l_1176 = (0x8D85FDD3L >= (((((*l_1250) = (p_22 , (safe_add_func_uint8_t_u_u((safe_mul_func_int16_t_s_s(p_22, (((((p_23 <= ((((((*g_428) = (safe_add_func_uint8_t_u_u(((l_1106.f1 , ((**l_1104) = (p_23 > (((g_122 <= 1L) , l_1175[1]) <= (*g_428))))) > p_22), 0x63L))) || 0x5183L) <= p_21) >= 0xB64FL) >= 0xF5L)) <= 0x253FL) & l_1249[6]) < 0xA905563EF4794542LL) != 0x45B2ECD615FDA12CLL))), 0L)))) >= p_22) < p_21) & (-7L))))), 6))) { /* block id: 674 */ (*l_1205) = ((void*)0 == l_1251); return l_1175[0]; } else { /* block id: 677 */ uint32_t l_1253 = 0xA641F04CL; int32_t ***l_1256[7][10][2] = {{{&g_537,&g_537},{(void*)0,&g_301},{&g_537,&g_537},{&g_301,&g_537},{&l_1005,(void*)0},{&g_537,&l_1005},{&g_301,&g_301},{&g_301,(void*)0},{&g_537,&g_301},{(void*)0,&l_1005}},{{&g_301,&g_301},{&l_1005,&g_301},{&g_301,&g_537},{(void*)0,&g_537},{&l_1005,(void*)0},{&l_1005,&l_1005},{&g_537,&g_537},{&g_301,&g_537},{&l_1005,(void*)0},{&g_537,&l_1005}},{{&g_301,&g_537},{&g_301,&l_1005},{&g_537,(void*)0},{&l_1005,&g_537},{&g_301,&g_537},{&g_537,&l_1005},{&l_1005,(void*)0},{&l_1005,&g_537},{(void*)0,&g_537},{&g_301,&g_301}},{{&l_1005,&g_301},{&g_301,&l_1005},{(void*)0,&g_301},{&g_537,(void*)0},{&g_301,&g_301},{&g_301,&l_1005},{&g_537,(void*)0},{&l_1005,&g_537},{&g_301,&g_537},{&g_301,&g_301}},{{&g_301,&g_537},{&l_1005,&l_1005},{(void*)0,(void*)0},{&g_537,&g_301},{&g_537,&g_301},{&g_301,(void*)0},{&g_301,&g_537},{&l_1005,&g_537},{(void*)0,&g_537},{&l_1005,&g_537}},{{&g_301,(void*)0},{&g_301,&g_301},{&g_537,&g_301},{&g_537,(void*)0},{(void*)0,&l_1005},{&l_1005,&g_537},{&g_301,&g_301},{&g_301,&g_537},{&g_301,&g_537},{&l_1005,(void*)0}},{{&g_537,&l_1005},{&g_301,&g_301},{&g_301,(void*)0},{&g_537,&g_301},{(void*)0,&l_1005},{&g_301,&g_301},{&l_1005,&g_301},{&g_301,&g_537},{(void*)0,&g_537},{&l_1005,(void*)0}}}; int32_t ***l_1257[5] = {&g_301,&g_301,&g_301,&g_301,&g_301}; int32_t ***l_1258 = &g_301; int i, j, k; l_1252 = (void*)0; l_1253--; (*l_1258) = (***g_534); ++l_1264; } (*l_1205) ^= l_1267; } if (l_1106.f2) goto lbl_1161; } g_1270--; } } else { /* block id: 689 */ uint8_t l_1275 = 248UL; uint16_t * const ***l_1279 = (void*)0; int64_t *l_1280[8] = {&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]}; int32_t l_1283 = (-1L); int32_t l_1284 = 1L; int32_t l_1286 = (-7L); int32_t l_1287 = 0x23CF9876L; int32_t l_1288[1][7] = {{0xD715F003L,0xD715F003L,0xD715F003L,0xD715F003L,0xD715F003L,0xD715F003L,0xD715F003L}}; uint64_t l_1289[3][2][9] = {{{0x304D5BED3B4751FDLL,0xE5AF273164B90866LL,7UL,18446744073709551614UL,7UL,0xE5AF273164B90866LL,0x304D5BED3B4751FDLL,0xE5AF273164B90866LL,7UL},{2UL,0x271BB43B3D3C2E4ALL,18446744073709551607UL,18446744073709551607UL,0x271BB43B3D3C2E4ALL,0x271BB43B3D3C2E4ALL,18446744073709551607UL,18446744073709551607UL,0x271BB43B3D3C2E4ALL}},{{0xE8490299BCCE60D0LL,0xE5AF273164B90866LL,0UL,18446744073709551614UL,0UL,0xE5AF273164B90866LL,0xE8490299BCCE60D0LL,0xE5AF273164B90866LL,0UL},{2UL,18446744073709551607UL,18446744073709551607UL,2UL,0x271BB43B3D3C2E4ALL,18446744073709551607UL,18446744073709551607UL,0x271BB43B3D3C2E4ALL,0x271BB43B3D3C2E4ALL}},{{7UL,0xD5B4C1A003EB5E1BLL,0xB9C2091D2B09C3BELL,0xE5AF273164B90866LL,0xB9C2091D2B09C3BELL,0xD5B4C1A003EB5E1BLL,7UL,0xD5B4C1A003EB5E1BLL,0xB9C2091D2B09C3BELL},{0x271BB43B3D3C2E4ALL,0xF95FF86248C184BCLL,0xB75FF52E7497181FLL,18446744073709551607UL,0xF95FF86248C184BCLL,0xF95FF86248C184BCLL,18446744073709551607UL,0xB75FF52E7497181FLL,0xF95FF86248C184BCLL}}}; int64_t l_1293[4][3] = {{0x40260DC1116AFA21LL,0x06BC9589C7C17EC3LL,0x40260DC1116AFA21LL},{8L,8L,8L},{0x40260DC1116AFA21LL,0x06BC9589C7C17EC3LL,0x40260DC1116AFA21LL},{8L,8L,8L}}; uint32_t *l_1304 = &g_184; int32_t *l_1306[10][7][3] = {{{(void*)0,&g_52,&l_1283},{&l_1288[0][6],&l_1286,&l_1287},{&g_13,&g_16[3][3][5],&l_1286},{(void*)0,&l_1172,&l_1283},{(void*)0,&g_16[3][3][5],&g_6},{&l_1173[0][9],&g_87,&l_1288[0][4]},{&g_52,&l_1173[0][4],&g_13}},{{&g_52,(void*)0,(void*)0},{&l_1173[0][9],(void*)0,(void*)0},{(void*)0,&g_52,&g_16[3][3][5]},{(void*)0,&l_1172,&l_1173[0][4]},{&g_13,&g_16[4][0][4],&g_16[3][3][5]},{&l_1288[0][6],(void*)0,(void*)0},{(void*)0,&l_1284,&g_52}},{{&g_52,&g_122,&g_16[4][0][4]},{(void*)0,&g_6,&g_87},{&l_1173[0][8],&l_1284,&l_1287},{&g_16[3][3][5],&g_6,&l_1173[0][8]},{&g_16[3][3][5],&g_122,&l_1173[0][9]},{&g_52,&l_1284,(void*)0},{(void*)0,(void*)0,&l_1173[0][4]}},{{&g_16[3][3][5],&g_16[4][0][4],&g_52},{(void*)0,&l_1172,&l_1288[0][6]},{&g_87,&g_52,&g_16[3][3][5]},{&g_122,(void*)0,&g_13},{(void*)0,(void*)0,&l_1283},{&g_16[3][3][5],&l_1173[0][4],&l_1283},{&l_1284,&g_87,&g_13}},{{&l_1287,&g_16[3][3][5],&g_16[3][3][5]},{&g_16[3][3][5],&l_1172,&l_1288[0][6]},{&g_16[3][3][5],&g_16[3][3][5],&g_52},{&g_87,&l_1286,&l_1173[0][4]},{(void*)0,&g_52,(void*)0},{(void*)0,(void*)0,&l_1173[0][9]},{&l_1173[0][4],&g_87,&l_1173[0][8]}},{{&g_122,&g_16[3][3][5],&l_1287},{&g_13,(void*)0,&g_87},{&g_122,&l_1287,&g_16[4][0][4]},{&l_1173[0][4],&l_1283,&g_52},{(void*)0,(void*)0,(void*)0},{(void*)0,&l_1283,&g_16[3][3][5]},{&g_87,(void*)0,&l_1173[0][4]}},{{&g_16[3][3][5],&g_16[3][3][5],&g_16[3][3][5]},{&g_16[3][3][5],&l_1287,(void*)0},{&l_1287,&g_16[3][3][5],(void*)0},{&l_1284,&l_1173[0][4],&g_13},{&g_16[3][3][5],&l_1173[0][4],&l_1288[0][4]},{(void*)0,&g_16[3][3][5],&g_6},{&g_122,&l_1287,&l_1283}},{{&g_87,&g_16[3][3][5],&l_1286},{(void*)0,(void*)0,&l_1287},{&g_16[3][3][5],&l_1283,&l_1283},{(void*)0,(void*)0,(void*)0},{&g_52,&l_1283,&g_16[3][3][5]},{&l_1287,&l_1287,&l_1283},{(void*)0,&g_6,&l_1288[0][4]}},{{&g_122,&l_1287,&l_1283},{&g_52,(void*)0,&g_16[3][3][5]},{&g_122,&l_1173[0][9],&g_16[3][3][5]},{&g_52,(void*)0,&g_16[3][3][5]},{&g_13,&g_87,(void*)0},{&g_16[3][3][5],&g_122,(void*)0},{&g_16[3][3][5],(void*)0,&l_1284}},{{&g_13,(void*)0,&l_1173[0][4]},{&l_1284,&g_16[3][3][5],&l_1286},{&g_16[3][3][5],&g_13,&l_1172},{&g_16[3][3][5],&l_1172,&g_13},{&l_1284,&g_16[3][3][5],&l_1172},{&g_13,&g_122,&l_1283},{&g_16[3][3][5],&g_16[0][4][2],&g_87}}}; uint8_t l_1384 = 1UL; uint32_t l_1392[9]; int32_t ** const *** const l_1409 = &g_535; union U0 ***l_1448 = (void*)0; int8_t *l_1478 = &g_876; uint8_t l_1529[8]; int i, j, k; for (i = 0; i < 9; i++) l_1392[i] = 0xB00184FFL; for (i = 0; i < 8; i++) l_1529[i] = 0xFCL; if (((((safe_add_func_int32_t_s_s(l_1275, (safe_rshift_func_int8_t_s_s(g_16[3][3][5], 5)))) , &p_23) == (*g_650)) == (l_1275 >= ((6UL < (~(p_20 ^= ((void*)0 == l_1279)))) < ((((safe_sub_func_int64_t_s_s(p_22, l_1283)) , (-4L)) != (***g_1083)) | l_1275))))) { /* block id: 691 */ int32_t *l_1285[3]; uint32_t **l_1292 = (void*)0; uint16_t ****l_1300 = &g_918; int32_t *l_1323 = &g_263; int i; for (i = 0; i < 3; i++) l_1285[i] = &l_1173[0][4]; --l_1289[1][0][2]; (*l_1205) = (&l_1061 != l_1292); l_1293[1][1] = (l_1286 ^= (*l_1205)); for (g_136 = 4; (g_136 == 19); g_136 = safe_add_func_uint32_t_u_u(g_136, 5)) { /* block id: 698 */ int32_t l_1296 = 0x1D9A6C38L; int32_t l_1310[2]; int i; for (i = 0; i < 2; i++) l_1310[i] = 0L; l_1296 = p_22; for (g_184 = 0; (g_184 < 43); ++g_184) { /* block id: 702 */ uint16_t *l_1299 = &g_81; uint64_t l_1311 = 0x5ADE6958E2F14A8ALL; if (((l_1300 = ((&l_1139 == l_1299) , &g_918)) != (void*)0)) { /* block id: 704 */ int64_t **l_1302 = (void*)0; int64_t ***l_1301 = &l_1302; uint64_t *l_1303 = &l_992; int32_t *l_1305 = &l_1296; int8_t *l_1309 = &g_876; (*l_1301) = ((*g_883) = (*g_883)); (*g_537) = &l_1288[0][0]; l_1306[4][0][1] = func_67(((*l_1303) |= p_21), l_1285[0], (l_1304 != (((*l_1305) = g_9) , (void*)0)), (**l_1005)); (*l_1205) &= ((&p_22 != ((*g_537) = (*g_537))) <= ((*l_1309) &= (0x8BL == (safe_mod_func_int16_t_s_s(p_23, (0UL || ((1L != ((void*)0 != &l_1205)) & (p_21 > p_20)))))))); } else { /* block id: 714 */ --l_1311; } } for (g_123 = 0; (g_123 <= 4); g_123 += 1) { /* block id: 720 */ int64_t *l_1326 = &g_28[0][0][2]; int32_t l_1329 = (-1L); uint8_t **l_1332 = &g_1331; int i, j; if (g_178[g_123][(g_123 + 1)]) { /* block id: 721 */ int32_t l_1314 = 0x6E1283A8L; int64_t *l_1327[1][10] = {{(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}}; uint32_t *l_1328[2][8][3] = {{{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0},{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0},{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0},{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0}},{{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0},{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0},{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0},{(void*)0,&l_989[2][2][0].f0,(void*)0},{(void*)0,&g_438,(void*)0}}}; uint16_t *l_1333[8][1][3]; int32_t l_1334 = 0L; int i, j, k; for (i = 0; i < 8; i++) { for (j = 0; j < 1; j++) { for (k = 0; k < 3; k++) l_1333[i][j][k] = (void*)0; } } (*l_1005) = &p_22; if (l_1314) continue; (**g_536) = func_67(p_21, func_67((safe_lshift_func_int8_t_s_u((((safe_div_func_uint16_t_u_u(((g_81 = ((g_178[g_123][(g_123 + 1)]++) , (~(((l_1329 ^= ((*l_1205) = (l_1314 = (((g_1322[1][2][0] = &l_1296) != l_1323) != (p_20 , (safe_rshift_func_uint8_t_u_u(((*g_1085) ^= p_20), (l_1326 != (p_20 , l_1327[0][1]))))))))) && ((g_1330 = (void*)0) == l_1332)) <= p_20)))) == l_1334), 0xFB65L)) ^ 4294967293UL) , 0x0EL), 7)), (**g_536), l_1334, g_260), p_20, p_20); } else { /* block id: 733 */ uint64_t *l_1336 = &g_264; int i, j; (**g_300) = func_67(((*l_1336) |= (g_178[g_123][(g_123 + 1)] |= (+l_1296))), l_1285[0], (*g_1085), (p_20 || (((((*l_1323) = l_1329) , (l_1337 & p_22)) & (safe_add_func_int16_t_s_s((((safe_add_func_uint64_t_u_u((safe_mod_func_uint8_t_u_u((safe_mod_func_uint64_t_u_u((*l_1205), (safe_rshift_func_uint8_t_u_s((0x03L && g_6), 0)))), p_22)), 0x32AD7430C9DBD8C3LL)) , 0x56L) == p_23), 1UL))) ^ 0xA387L))); } } for (g_174 = (-4); (g_174 != 8); ++g_174) { /* block id: 742 */ for (g_184 = 0; (g_184 <= 0); g_184 += 1) { /* block id: 745 */ int i, j; p_22 = g_178[(g_184 + 2)][(g_184 + 5)]; } } } } else { /* block id: 750 */ int32_t l_1362 = 0L; int16_t *l_1371 = &g_106; int32_t l_1372 = 0x027570D8L; int32_t l_1434[9][10][2] = {{{6L,0x7155B153L},{0x2CA21F82L,0x1D527CACL},{1L,1L},{0xD6B191D9L,(-4L)},{1L,0x1D527CACL},{(-1L),1L},{6L,(-1L)},{0x7155B153L,9L},{0x7155B153L,(-1L)},{6L,1L}},{{(-1L),0x1D527CACL},{1L,(-4L)},{0xD6B191D9L,1L},{1L,0x1D527CACL},{0x2CA21F82L,0x7155B153L},{6L,0x2CA21F82L},{0xD658BF90L,9L},{1L,0x5FF7ACD6L},{6L,0xD658BF90L},{0x5FF7ACD6L,0x1D527CACL}},{{(-4L),1L},{0xD6B191D9L,1L},{(-4L),0x1D527CACL},{0x5FF7ACD6L,0xD658BF90L},{6L,0x5FF7ACD6L},{1L,9L},{0xD658BF90L,0x2CA21F82L},{6L,0x7155B153L},{0x2CA21F82L,0x1D527CACL},{1L,1L}},{{0xD6B191D9L,(-4L)},{1L,0x1D527CACL},{(-1L),1L},{6L,(-1L)},{0x7155B153L,9L},{0x7155B153L,(-1L)},{6L,1L},{(-1L),0x1D527CACL},{1L,(-4L)},{0xD6B191D9L,1L}},{{1L,0x1D527CACL},{0x2CA21F82L,0x7155B153L},{8L,0xC0530848L},{0xFD0A8BA3L,1L},{1L,9L},{8L,0xFD0A8BA3L},{9L,0x6E5D7F1CL},{6L,0xD6B191D9L},{0x42980A05L,0xD6B191D9L},{6L,0x6E5D7F1CL}},{{9L,0xFD0A8BA3L},{8L,9L},{1L,1L},{0xFD0A8BA3L,0xC0530848L},{8L,3L},{0xC0530848L,0x6E5D7F1CL},{6L,6L},{0x42980A05L,6L},{0xD6B191D9L,0x6E5D7F1CL},{0x1D527CACL,1L}},{{8L,0x1D527CACL},{3L,1L},{3L,0x1D527CACL},{8L,1L},{0x1D527CACL,0x6E5D7F1CL},{0xD6B191D9L,6L},{0x42980A05L,6L},{6L,0x6E5D7F1CL},{0xC0530848L,3L},{8L,0xC0530848L}},{{0xFD0A8BA3L,1L},{1L,9L},{8L,0xFD0A8BA3L},{9L,0x6E5D7F1CL},{6L,0xD6B191D9L},{0x42980A05L,0xD6B191D9L},{6L,0x6E5D7F1CL},{9L,0xFD0A8BA3L},{8L,9L},{1L,1L}},{{0xFD0A8BA3L,0xC0530848L},{8L,3L},{0xC0530848L,0x6E5D7F1CL},{6L,6L},{0x42980A05L,6L},{0xD6B191D9L,0x6E5D7F1CL},{0x1D527CACL,1L},{8L,0x1D527CACL},{3L,1L},{3L,0x1D527CACL}}}; int16_t l_1443[10][9] = {{0xB6AFL,(-9L),8L,0x7F73L,0x3AE0L,0x0B0FL,0x3AE0L,0x7F73L,8L},{0xDCCDL,0xDCCDL,9L,0xE659L,0xB6AFL,(-9L),8L,0x7F73L,0x3AE0L},{(-10L),8L,0x0B0FL,0xDCCDL,0x78D8L,0x78D8L,0xDCCDL,0x0B0FL,8L},{0x78D8L,8L,9L,(-1L),0xA030L,0xE659L,0xDCCDL,8L,0L},{0x7F73L,(-10L),8L,8L,0xC94BL,8L,8L,(-10L),0x7F73L},{0xA030L,8L,(-9L),0xC94BL,0xDCCDL,8L,0x3AE0L,9L,(-10L)},{8L,8L,0xE659L,0x0B0FL,0x0B0FL,0xE659L,8L,8L,(-1L)},{0xA030L,0xDCCDL,0x3AE0L,0xB6AFL,0x0B0FL,0x78D8L,0L,0xC94BL,0xC94BL},{0x7F73L,(-9L),0xDCCDL,8L,0xDCCDL,(-9L),0x7F73L,0x78D8L,(-1L)},{0x78D8L,9L,0x7F73L,8L,0xC94BL,0x0B0FL,(-10L),0xDCCDL,(-10L)}}; int i, j, k; if ((safe_mod_func_uint64_t_u_u((safe_rshift_func_int8_t_s_u((~(((safe_mul_func_uint8_t_u_u(((safe_rshift_func_uint16_t_u_u((!(0xFF20L == ((*l_1371) = (safe_sub_func_uint64_t_u_u(((((*l_1007) = p_23) | l_1362) && (&p_20 == &p_20)), (&g_184 == ((safe_div_func_int64_t_s_s((safe_rshift_func_int16_t_s_s(((p_20 & (safe_add_func_uint8_t_u_u((safe_sub_func_int64_t_s_s(0L, 0xE76B826381547EA9LL)), (*g_1331)))) != 3UL), p_20)), p_21)) , (*l_1060)))))))), 10)) & p_20), l_1362)) < 0x66BEL) , 5UL)), 0)), (*l_1205)))) { /* block id: 753 */ const uint32_t *l_1383[2][5][10] = {{{(void*)0,&g_184,(void*)0,&g_184,(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184},{(void*)0,&g_184,&g_184,&g_184,(void*)0,&g_184,(void*)0,&g_184,&g_184,&g_184},{(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184,(void*)0,&g_184,&g_184,&g_184},{&g_184,&g_184,&g_184,&g_184,(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184},{(void*)0,&g_184,&g_184,&g_184,(void*)0,&g_184,(void*)0,&g_184,&g_184,&g_184}},{{(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184,(void*)0,&g_184,&g_184,&g_184},{&g_184,&g_184,&g_184,&g_184,(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184},{(void*)0,&g_184,&g_184,&g_184,(void*)0,&g_184,(void*)0,&g_184,&g_184,&g_184},{(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184,(void*)0,&g_184,&g_184,&g_184},{&g_184,&g_184,&g_184,&g_184,(void*)0,&g_184,&g_184,&g_184,&g_184,&g_184}}}; const uint32_t **l_1382 = &l_1383[0][3][1]; int32_t l_1390 = 8L; int i, j, k; for (g_87 = 0; (g_87 <= 8); g_87 += 1) { /* block id: 756 */ uint32_t **l_1381[2][5]; uint16_t ** const ***l_1386 = &g_1385[0]; uint16_t *** const *l_1387 = (void*)0; int32_t l_1388 = 0x38D7BCDEL; int i, j; for (i = 0; i < 2; i++) { for (j = 0; j < 5; j++) l_1381[i][j] = &l_1304; } l_1372 ^= l_1362; p_22 = ((((p_21 = ((*g_1331) > ((safe_add_func_uint8_t_u_u((p_23 | (safe_div_func_uint64_t_u_u((safe_mul_func_int16_t_s_s(((*l_1007) = p_20), ((safe_mod_func_int8_t_s_s(((((((((l_1381[0][1] != l_1382) != (l_1384 || p_21)) == (((*l_1386) = g_1385[0]) != l_1387)) , (void*)0) == (void*)0) > g_28[0][0][6]) && 1UL) , l_1388), p_21)) , p_22))), (-1L)))), (**g_1330))) , (**g_1084)))) , &g_184) != l_1304) & p_20); for (l_1362 = 0; (l_1362 <= 0); l_1362 += 1) { /* block id: 764 */ int8_t l_1389 = 0xB8L; int32_t l_1391 = 0L; uint32_t **l_1395 = &l_1061; l_1392[6]++; (*g_1396) = l_1395; } for (g_260 = 7; (g_260 >= 0); g_260 -= 1) { /* block id: 770 */ uint32_t l_1399[7][1][2]; int i, j, k; for (i = 0; i < 7; i++) { for (j = 0; j < 1; j++) { for (k = 0; k < 2; k++) l_1399[i][j][k] = 0x25557BC1L; } } --l_1399[4][0][0]; (****g_534) = &p_22; return p_22; } } p_22 ^= p_21; } else { /* block id: 777 */ int16_t l_1436 = 0x6D07L; uint32_t *l_1438 = &g_438; int8_t *l_1444 = &g_876; int32_t *l_1446 = (void*)0; int32_t *l_1447 = &l_989[2][2][0].f1; int32_t l_1453 = 2L; int32_t l_1455[6][3] = {{0xCFF8EDB2L,0x0D275111L,0xCFF8EDB2L},{0L,5L,(-7L)},{0L,0L,5L},{0xCFF8EDB2L,5L,5L},{5L,0x0D275111L,(-7L)},{0xCFF8EDB2L,0x0D275111L,0xCFF8EDB2L}}; int i, j; for (g_106 = 1; (g_106 >= 26); ++g_106) { /* block id: 780 */ uint32_t *l_1405 = &l_1392[6]; int64_t l_1408 = (-1L); int32_t l_1435 = 0x6F31EA0BL; l_1435 = ((+(((*l_1405)--) && ((l_1408 & (((*g_428) = (((((void*)0 == l_1409) != ((((((safe_mod_func_int64_t_s_s(((((safe_div_func_int64_t_s_s(l_1362, (((*l_1205) & (safe_mul_func_int16_t_s_s((safe_div_func_int32_t_s_s((l_1372 = (p_22 = p_21)), (g_438 &= (safe_sub_func_uint16_t_u_u(((((safe_mul_func_uint16_t_u_u(((safe_mul_func_uint8_t_u_u((safe_mul_func_int8_t_s_s(l_1408, ((safe_div_func_uint32_t_u_u(((l_1434[0][6][0] &= (safe_rshift_func_uint16_t_u_u((safe_add_func_uint32_t_u_u((((l_1408 == (safe_sub_func_uint32_t_u_u(l_1362, g_964[2]))) | p_20) <= 0xD3L), (*l_1205))), 5))) != 0x9ED9475E811DF475LL), l_1408)) , l_1408))), l_1408)) , p_23), (-4L))) && p_20) || p_20) < (*l_1205)), 0xB49DL))))), p_21))) & 1UL))) < 6L) , (**g_1084)) > p_21), (*l_1205))) <= l_1362) , &l_1362) == (void*)0) & 2UL) >= l_1408)) | 4294967286UL) && (-10L))) & g_184)) > p_20))) | 1UL); } l_1173[0][4] |= ((((*l_1447) = (((*l_1205) = l_1436) ^ (((((!(-3L)) , (((l_1434[8][4][1] , ((*l_1438) = 4294967291UL)) != (p_22 ^= p_20)) , l_1372)) < ((((safe_mod_func_uint32_t_u_u(1UL, ((safe_lshift_func_uint16_t_u_s(p_20, 15)) , (((g_261 = ((*l_1444) = l_1443[2][3])) == p_23) && g_1445)))) , l_1436) , p_23) < 0x2134A79AAD5A62E2LL)) , g_1270) < p_20))) , (void*)0) == l_1448); for (g_95 = 0; (g_95 <= 17); g_95 = safe_add_func_int64_t_s_s(g_95, 1)) { /* block id: 798 */ uint16_t l_1457 = 0x61E5L; for (g_81 = 0; (g_81 >= 3); g_81 = safe_add_func_uint64_t_u_u(g_81, 9)) { /* block id: 801 */ int32_t l_1454 = 0L; int32_t l_1456 = 0xF4C1C903L; l_1457--; } if (p_22) { /* block id: 804 */ (****g_534) = &l_1434[2][4][0]; (****l_1409) = &l_1453; } else { /* block id: 807 */ l_1434[0][6][0] = l_1434[0][6][0]; } if (p_20) continue; (*g_537) = &l_1434[8][6][0]; } } } if ((65532UL ^ (safe_lshift_func_uint8_t_u_u((safe_rshift_func_int8_t_s_u((((safe_rshift_func_int16_t_s_s(((safe_sub_func_int32_t_s_s(p_22, (*l_1205))) <= (*l_1205)), 6)) , (p_20 >= (safe_lshift_func_uint8_t_u_s(p_21, ((((((safe_add_func_uint64_t_u_u((safe_add_func_int16_t_s_s((((p_22 && ((g_313 > ((*l_1478) = (safe_mod_func_int32_t_s_s(((((safe_div_func_int8_t_s_s((*l_1205), (*l_1205))) , p_20) || p_20) && (*l_1205)), (-4L))))) == g_52)) > p_23) > 0xCB06L), (*l_1205))), (*l_1205))) | 0x7A9C9CB2L) < g_12) && p_21) , 8UL) & p_21))))) != p_22), 1)), 1)))) { /* block id: 816 */ int32_t *l_1479 = (void*)0; int32_t l_1480 = 0xBC3E1D19L; union U0 l_1502 = {5UL}; (***g_535) = l_1479; if (l_1480) { /* block id: 818 */ union U0 l_1483 = {0x7ACAD3A3L}; const uint8_t **l_1489 = &g_651[0]; const uint8_t ***l_1488 = &l_1489; uint16_t *****l_1493 = (void*)0; uint64_t *l_1495[7][10] = {{&l_1289[1][0][2],&g_178[2][2],&l_992,&g_178[2][2],&l_1289[1][0][2],(void*)0,&g_178[2][2],&l_1289[1][0][2],&g_178[0][2],&l_1289[1][0][2]},{&l_1289[1][0][2],&g_264,(void*)0,&g_178[2][2],&g_108,&g_108,&g_178[2][2],(void*)0,&g_264,&l_1289[1][0][2]},{&g_108,&g_178[2][2],(void*)0,&g_264,&l_1289[1][0][2],&g_108,&g_264,&l_1289[1][0][2],&g_264,&g_108},{&l_1289[1][0][2],&g_178[2][2],&l_992,&g_178[2][2],&l_1289[1][0][2],(void*)0,&g_178[2][2],&l_1289[1][0][2],&g_178[0][2],&l_1289[1][0][2]},{&l_1289[1][0][2],&g_264,(void*)0,&g_178[2][2],&g_108,&g_108,&g_178[2][2],(void*)0,&g_264,&l_1289[1][0][2]},{&g_108,&g_178[2][2],(void*)0,&g_264,&l_1289[1][0][2],&g_108,&g_264,&l_1289[1][0][2],&g_264,&g_108},{&l_1289[1][0][2],&g_178[2][2],&l_992,&g_178[2][2],&l_1289[1][0][2],(void*)0,&g_178[2][2],&l_1289[1][0][2],&g_178[0][2],&l_1289[1][0][2]}}; int32_t l_1496 = 0x86F64943L; int32_t l_1497 = 0xAB97C75AL; int32_t l_1498 = (-1L); int16_t *l_1503 = &g_105; uint64_t l_1530 = 0x50AFCBE3BD7EC320LL; int i, j; p_22 = ((safe_div_func_uint32_t_u_u(((0x06L || p_21) || ((l_1483 , (***g_1083)) | ((l_1483.f1 | (safe_mod_func_int64_t_s_s((l_1496 ^= (((p_21 = ((((*l_1205) & ((((safe_rshift_func_int8_t_s_s((((*l_1488) = &g_651[0]) == l_1490), (safe_rshift_func_int8_t_s_s(((l_1493 == l_1493) != p_22), 4)))) == p_22) , p_22) > g_1494)) > l_1483.f0) , 0x725762A09AB6E940LL)) & 0xFF338B0C2BD492BCLL) >= 0x92L)), p_20))) < l_1483.f2))), g_10)) < g_87); if (((*l_1205) ^= p_22)) { /* block id: 824 */ uint32_t l_1499 = 1UL; l_1499++; (*l_1205) &= p_20; if ((p_20 == p_23)) { /* block id: 827 */ int8_t l_1513 = 0x2AL; p_22 = 0xCBAD6CDAL; p_22 = p_20; (*l_1205) = (l_1502 , (l_1503 != (((((*g_428) = (l_1513 = ((!0x5F3AB4E7L) & (((((p_22 &= (p_23 <= (-8L))) || (safe_mod_func_int8_t_s_s(((safe_add_func_int32_t_s_s(((*l_1205) > l_1499), (safe_lshift_func_uint16_t_u_u(1UL, 6)))) >= 0xE059C3643BCA4D7CLL), g_264))) ^ 0UL) & 0x8442162EL) <= l_1483.f3)))) , &g_1084) == &g_1330) , (void*)0))); } else { /* block id: 834 */ uint32_t l_1514 = 0UL; l_1514++; } } else { /* block id: 837 */ uint64_t l_1528[8][8][2] = {{{0x1714EC8AC73A9E3CLL,1UL},{0x1C3ACE81F8C3BF02LL,18446744073709551614UL},{18446744073709551613UL,0x6E262C2DA79A75A1LL},{0x7B9B2B85CE0DCE2DLL,0x500E8C7FB413C24FLL},{0x7B9B2B85CE0DCE2DLL,0x57A45AAC087130AELL},{0xC46C5B06C4A29BCCLL,0UL},{18446744073709551613UL,3UL},{0x03B241041E1983F8LL,0xBE67457EBF488AA0LL}},{{18446744073709551612UL,18446744073709551610UL},{18446744073709551614UL,1UL},{0xE9BE9CD17D357C4ALL,0UL},{1UL,1UL},{0x1E795F942CC912BALL,0xC46C5B06C4A29BCCLL},{0xBE67457EBF488AA0LL,0xA4E8D92EC0A40E0FLL},{0UL,0x922AF43B932E7646LL},{0xBC97ECC338FA8672LL,0UL}},{{18446744073709551610UL,0xE9BE9CD17D357C4ALL},{18446744073709551610UL,0UL},{0xBC97ECC338FA8672LL,0x922AF43B932E7646LL},{0UL,0xA4E8D92EC0A40E0FLL},{0xBE67457EBF488AA0LL,0xC46C5B06C4A29BCCLL},{0x1E795F942CC912BALL,1UL},{1UL,0UL},{0xE9BE9CD17D357C4ALL,1UL}},{{18446744073709551614UL,18446744073709551610UL},{18446744073709551612UL,0xBE67457EBF488AA0LL},{0x03B241041E1983F8LL,3UL},{18446744073709551613UL,0UL},{0xC46C5B06C4A29BCCLL,0x57A45AAC087130AELL},{0x7B9B2B85CE0DCE2DLL,0x500E8C7FB413C24FLL},{1UL,0x03B241041E1983F8LL},{18446744073709551615UL,0x7B9B2B85CE0DCE2DLL}},{{0x5A7817122C77E803LL,0xBC97ECC338FA8672LL},{1UL,18446744073709551612UL},{0xCE2D039EF235915ALL,0xEB62E33D26AACE1CLL},{0x922AF43B932E7646LL,0xEB62E33D26AACE1CLL},{0xCE2D039EF235915ALL,18446744073709551612UL},{1UL,0xBC97ECC338FA8672LL},{0x5A7817122C77E803LL,0x7B9B2B85CE0DCE2DLL},{18446744073709551615UL,0x03B241041E1983F8LL}},{{1UL,0x500E8C7FB413C24FLL},{0x7B9B2B85CE0DCE2DLL,0x57A45AAC087130AELL},{0xC46C5B06C4A29BCCLL,0UL},{18446744073709551613UL,3UL},{0x03B241041E1983F8LL,0xBE67457EBF488AA0LL},{18446744073709551612UL,18446744073709551610UL},{18446744073709551614UL,1UL},{0xE9BE9CD17D357C4ALL,0UL}},{{1UL,1UL},{0x1E795F942CC912BALL,0xC46C5B06C4A29BCCLL},{0xBE67457EBF488AA0LL,0xA4E8D92EC0A40E0FLL},{0UL,0x922AF43B932E7646LL},{0xBC97ECC338FA8672LL,0UL},{18446744073709551610UL,0xE9BE9CD17D357C4ALL},{18446744073709551610UL,0UL},{0xBC97ECC338FA8672LL,0x922AF43B932E7646LL}},{{0UL,0xA4E8D92EC0A40E0FLL},{0xBE67457EBF488AA0LL,0xC46C5B06C4A29BCCLL},{0x1E795F942CC912BALL,1UL},{1UL,0UL},{0xE9BE9CD17D357C4ALL,1UL},{18446744073709551614UL,18446744073709551610UL},{18446744073709551612UL,0xBE67457EBF488AA0LL},{0x03B241041E1983F8LL,3UL}}}; int16_t *l_1531 = &g_1532[1]; const uint32_t l_1540 = 0xB49A8978L; int i, j, k; (*l_1205) = (safe_add_func_uint16_t_u_u(65526UL, g_590)); (*g_301) = (((((safe_unary_minus_func_int32_t_s(l_1497)) && (safe_mul_func_uint16_t_u_u(5UL, ((*l_1531) = ((((safe_add_func_int64_t_s_s((((((*l_1503) = ((void*)0 != &g_883)) < (l_1530 |= (safe_sub_func_int16_t_s_s((safe_div_func_uint32_t_u_u(0xFDEBC99FL, l_1528[1][0][1])), (((p_20 , ((((g_106 &= p_21) & l_1528[3][6][1]) > l_1529[3]) | 18446744073709551615UL)) >= g_95) | 0x266DL))))) <= p_20) ^ p_22), p_23)) , g_6) >= l_1498) && p_22))))) , p_21) == l_1528[1][0][1]) , (****l_1409)); for (g_174 = 0; (g_174 == 30); g_174 = safe_add_func_int64_t_s_s(g_174, 6)) { /* block id: 846 */ int16_t l_1535 = 0x0012L; if (l_1535) break; (*l_1205) &= (l_1496 | ((g_1532[1] |= (l_1502 , (safe_mul_func_int8_t_s_s(p_21, (p_21 , (l_1528[7][6][1] < 0x7FL)))))) != (safe_sub_func_int16_t_s_s(l_1540, (0UL != (safe_lshift_func_uint16_t_u_u((g_1543[0][8][2] == (*g_769)), 3))))))); p_22 |= (safe_mul_func_int8_t_s_s((safe_sub_func_int64_t_s_s(p_21, (p_23 < ((safe_div_func_uint64_t_u_u(l_1550, 0xF26DF0112339AAD9LL)) , ((safe_lshift_func_int8_t_s_u(((safe_add_func_uint32_t_u_u((safe_lshift_func_int16_t_s_s((safe_lshift_func_uint16_t_u_s((safe_mul_func_uint16_t_u_u(65535UL, ((((*l_1007) = (safe_sub_func_int32_t_s_s(p_20, (((((p_23 , 0xBCBAED59L) > l_1528[1][0][1]) && p_23) , (*g_1085)) == 253UL)))) && g_1494) <= 0x7D797DD6L))), (*l_1205))), 15)), p_20)) != p_21), l_1528[1][0][1])) || l_1535))))), p_21)); return p_23; } } } else { /* block id: 855 */ p_22 &= 0xE63410F5L; } } else { /* block id: 858 */ for (g_260 = 0; (g_260 <= 7); g_260 += 1) { /* block id: 861 */ uint32_t l_1563 = 0UL; --l_1563; for (l_992 = 0; (l_992 <= 4); l_992 += 1) { /* block id: 865 */ (*g_301) = &p_22; } } p_22 &= (-1L); } (*l_1005) = &p_22; } return p_20; } /* ------------------------------------------ */ /* * reads : g_108 g_123 g_28 g_4 g_178 g_428 g_261 g_95 g_184 g_260 g_174 g_3 g_6 g_10 g_105 g_769 g_590 g_16 g_535 g_536 g_537 g_121 g_301 g_300 g_302 * writes: g_108 g_95 g_4 g_264 g_123 g_28 g_136 g_140.f0 g_174 g_105 g_769 g_302 g_261 g_263 g_106 g_438 g_81 */ static const uint32_t func_24(int16_t p_25, int32_t p_26, uint8_t p_27) { /* block id: 336 */ int32_t l_636 = 1L; int32_t l_675 = (-1L); int32_t *l_691 = &l_675; int32_t ***l_698 = (void*)0; int32_t l_802[9] = {4L,4L,4L,4L,4L,4L,4L,4L,4L}; int32_t l_804 = 0L; union U0 l_830 = {0xC0581CD6L}; const uint16_t *l_958 = &l_830.f3; const uint16_t * const *l_957 = &l_958; const uint16_t * const **l_956 = &l_957; int32_t l_977[1][10][5] = {{{0x83829ACEL,0x83829ACEL,0x4F077EA9L,0x83829ACEL,0x83829ACEL},{2L,0xEF258721L,2L,2L,0xEF258721L},{0x83829ACEL,0L,0L,0x83829ACEL,0L},{0xEF258721L,0xEF258721L,(-1L),0xEF258721L,0xEF258721L},{0L,0x83829ACEL,0L,0L,0x83829ACEL},{0xEF258721L,2L,2L,0xEF258721L,2L},{0x83829ACEL,0x83829ACEL,0x4F077EA9L,0x83829ACEL,0x83829ACEL},{2L,0xEF258721L,2L,2L,0xEF258721L},{0x83829ACEL,0L,0L,0x83829ACEL,0L},{0xEF258721L,0xEF258721L,(-1L),0xEF258721L,0xEF258721L}}}; int64_t ** const l_978 = &g_363[1]; int32_t *l_981 = &g_52; uint32_t l_983 = 4294967288UL; const uint32_t l_986 = 0UL; int i, j, k; for (g_108 = 0; (g_108 <= 0); g_108 += 1) { /* block id: 339 */ int32_t *l_621 = (void*)0; int32_t l_676 = (-9L); int32_t ***l_722[9][1][4] = {{{&g_301,&g_301,&g_301,&g_301}},{{&g_537,&g_301,&g_537,&g_537}},{{&g_537,&g_301,&g_537,&g_301}},{{&g_301,&g_537,&g_301,&g_301}},{{&g_301,&g_301,&g_537,&g_301}},{{&g_537,&g_537,&g_537,&g_301}},{{&g_537,&g_301,&g_301,&g_537}},{{&g_301,&g_301,&g_301,&g_301}},{{&g_301,&g_537,&g_301,&g_301}}}; const int8_t *l_760 = &g_261; uint64_t * const l_778 = (void*)0; uint32_t l_781[7][3] = {{0x4A01D4B6L,9UL,0x4A01D4B6L},{0x4A01D4B6L,9UL,0x4A01D4B6L},{0x4A01D4B6L,9UL,0x4A01D4B6L},{0x4A01D4B6L,9UL,0x4A01D4B6L},{0x4A01D4B6L,9UL,0x4A01D4B6L},{0x4A01D4B6L,9UL,0x4A01D4B6L},{0x4A01D4B6L,9UL,0x4A01D4B6L}}; int32_t ****l_785[5] = {&l_698,&l_698,&l_698,&l_698,&l_698}; int64_t *l_831[5][5][8] = {{{(void*)0,&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],(void*)0,&g_260,&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_260,&g_260,(void*)0,(void*)0,&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],(void*)0,(void*)0,&g_28[1][0][0],&g_260},{(void*)0,&g_260,&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2]},{&g_260,&g_260,&g_28[0][0][4],&g_28[0][0][3],&g_28[0][0][2],(void*)0,&g_260,&g_260}},{{&g_260,&g_28[0][0][2],&g_28[1][0][3],&g_28[0][0][6],(void*)0,(void*)0,&g_260,&g_260},{&g_28[0][0][5],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_260},{&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2]},{&g_28[1][0][1],(void*)0,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],(void*)0,&g_28[0][0][2]},{(void*)0,(void*)0,(void*)0,&g_28[0][0][2],&g_260,&g_28[0][0][3],&g_260,&g_28[0][0][2]}},{{&g_28[1][0][6],&g_28[0][0][4],&g_260,&g_28[1][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260},{(void*)0,&g_260,&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[1][0][1]},{&g_28[0][0][2],&g_28[1][0][2],&g_260,(void*)0,&g_260,&g_28[1][0][2],&g_28[0][0][2],&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_28[1][0][2],(void*)0,&g_28[0][0][5],(void*)0,(void*)0,&g_28[0][0][2]},{&g_28[0][0][2],&g_28[0][0][3],(void*)0,(void*)0,&g_28[0][0][5],&g_260,&g_28[0][0][2],(void*)0}},{{&g_260,&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_260,&g_28[1][0][0],&g_28[0][0][2],&g_28[0][0][2]},{&g_28[0][0][2],&g_260,&g_260,&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_260},{(void*)0,&g_28[0][0][2],&g_260,(void*)0,&g_260,&g_260,(void*)0,(void*)0},{&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[0][0][5],&g_260},{&g_28[0][0][5],(void*)0,&g_260,&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_260,&g_28[1][0][2]}},{{&g_28[0][0][4],&g_28[0][0][2],(void*)0,&g_28[0][0][2],&g_260,&g_260,&g_28[0][0][2],(void*)0},{&g_260,&g_28[1][0][0],(void*)0,&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[0][0][3],&g_28[0][0][2]},{&g_260,&g_28[0][0][2],&g_28[0][0][2],&g_28[0][0][2],(void*)0,(void*)0,&g_28[0][0][2],&g_28[0][0][2]},{&g_28[0][0][2],&g_28[0][0][2],(void*)0,&g_260,&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[1][0][0]},{&g_260,&g_260,(void*)0,&g_260,&g_28[0][0][2],&g_260,&g_28[0][0][2],&g_28[1][0][0]}}}; int16_t *l_832 = (void*)0; int16_t *l_833 = &g_105; uint64_t l_843[5][7][1] = {{{8UL},{0UL},{0xF340AC3F34C5E023LL},{18446744073709551615UL},{0UL},{18446744073709551608UL},{0x7A30552932332F69LL}},{{7UL},{0x7A30552932332F69LL},{18446744073709551608UL},{0UL},{18446744073709551615UL},{0xF340AC3F34C5E023LL},{0UL}},{{8UL},{0UL},{0xF340AC3F34C5E023LL},{18446744073709551615UL},{0UL},{18446744073709551608UL},{0x7A30552932332F69LL}},{{7UL},{0x7A30552932332F69LL},{18446744073709551608UL},{0UL},{18446744073709551615UL},{0xF340AC3F34C5E023LL},{0UL}},{{8UL},{0UL},{0xF340AC3F34C5E023LL},{18446744073709551615UL},{0UL},{18446744073709551608UL},{0x7A30552932332F69LL}}}; int8_t l_982 = (-1L); int i, j, k; l_621 = &p_26; if (p_25) { /* block id: 341 */ return g_123; } else { /* block id: 343 */ uint8_t l_622 = 0x08L; int32_t **l_628 = (void*)0; int32_t l_664 = (-1L); int64_t l_725 = 1L; int32_t l_794 = (-6L); int32_t l_796[10][4] = {{1L,0xD5DE27D3L,1L,1L},{0xB5BA94AEL,0xD5DE27D3L,1L,0xD5DE27D3L},{0xB5BA94AEL,1L,1L,0xD5DE27D3L},{1L,0xD5DE27D3L,1L,1L},{0xB5BA94AEL,0xD5DE27D3L,1L,0xD5DE27D3L},{0xB5BA94AEL,1L,1L,0xD5DE27D3L},{1L,0xD5DE27D3L,1L,1L},{0xB5BA94AEL,0xD5DE27D3L,1L,0xD5DE27D3L},{0xB5BA94AEL,1L,1L,0xD5DE27D3L},{1L,0xD5DE27D3L,1L,1L}}; uint16_t l_798 = 65532UL; uint32_t l_819 = 0xECF0BBE4L; int i, j; for (p_25 = 1; (p_25 <= 9); p_25 += 1) { /* block id: 346 */ int32_t *l_625 = &g_87; int16_t *l_626 = &g_105; int32_t **l_631 = &l_621; int i; for (g_95 = 8; (g_95 >= 2); g_95 -= 1) { /* block id: 349 */ int i, j, k; g_4[g_108] &= g_28[g_108][g_108][g_108]; if (g_28[(g_108 + 1)][g_108][(g_108 + 1)]) continue; if (p_26) { /* block id: 352 */ return g_28[0][0][2]; } else { /* block id: 354 */ l_622--; } } l_625 = l_621; } (*l_621) = l_622; for (g_264 = 0; (g_264 <= 7); g_264 += 1) { /* block id: 392 */ int32_t *l_682 = &l_676; int32_t l_683[7][2][9] = {{{0L,(-4L),(-5L),2L,2L,(-5L),(-4L),0L,(-8L)},{0xA7B005FFL,0xBD5A3079L,0x5935B32DL,2L,2L,0xFFA45CE4L,(-1L),1L,1L}},{{0xF38B9A0FL,0x65E126F5L,0xBD5A3079L,0L,0xBD5A3079L,0x65E126F5L,0xF38B9A0FL,0xFFA45CE4L,(-8L)},{0xFFA45CE4L,0x5E18E46DL,0xF38B9A0FL,0L,1L,2L,1L,0xBD5A3079L,1L}},{{1L,0xA7B005FFL,2L,2L,0xA7B005FFL,1L,(-8L),0xFFA45CE4L,0xF38B9A0FL},{0xBD5A3079L,0x5935B32DL,2L,2L,0xFFA45CE4L,(-1L),1L,1L,(-1L)}},{{2L,0xBD5A3079L,0L,0xBD5A3079L,0x65E126F5L,0xF38B9A0FL,0xFFA45CE4L,(-8L),1L},{(-1L),0xBD5A3079L,0xF38B9A0FL,1L,9L,(-4L),1L,(-4L),9L}},{{0xFFA45CE4L,9L,9L,0xFFA45CE4L,0x5E18E46DL,0xF38B9A0FL,0L,1L,2L},{0xFFA45CE4L,0x5935B32DL,0xA7B005FFL,0xF38B9A0FL,2L,0x5E18E46DL,0x5E18E46DL,2L,0xF38B9A0FL}},{{(-1L),(-4L),(-1L),0xA7B005FFL,0x5E18E46DL,1L,1L,2L,0xF38B9A0FL},{0x65E126F5L,(-1L),2L,0L,9L,2L,9L,0L,2L}},{{0xF38B9A0FL,0xF38B9A0FL,(-4L),0xA7B005FFL,0x65E126F5L,(-1L),2L,0L,9L},{1L,1L,2L,0xF38B9A0FL,(-5L),(-5L),0xF38B9A0FL,2L,1L}}}; int64_t *l_705 = &g_28[0][0][2]; union U0 l_735 = {4294967295UL}; uint64_t **l_771 = &g_770[2]; int16_t l_784 = 0x889FL; int32_t ****l_789 = &g_300; int i, j, k; l_683[6][0][2] = ((*l_682) = (p_26 &= (safe_sub_func_int32_t_s_s(g_178[(g_108 + 2)][(g_108 + 5)], 0x1D7803B8L)))); if (((~(safe_rshift_func_int16_t_s_u((safe_mul_func_int8_t_s_s(((safe_add_func_uint16_t_u_u(((*g_428) = ((l_691 = &l_683[6][0][2]) != &p_26)), ((safe_add_func_int32_t_s_s(((safe_rshift_func_uint16_t_u_s(l_636, ((safe_lshift_func_uint8_t_u_u((((l_698 = (void*)0) != ((0x108DCF6D8896F7DFLL > l_675) , &l_628)) <= ((*l_705) |= (safe_div_func_uint64_t_u_u((safe_rshift_func_int16_t_s_u((safe_mul_func_int8_t_s_s((g_261 , 0xABL), (*l_682))), 0)), (*l_621))))), (*l_682))) | g_108))) <= (*l_682)), (*l_682))) , (*l_621)))) > (*l_621)), p_25)), 1))) < 0x903DL)) { /* block id: 400 */ uint32_t *l_723 = &g_136; uint32_t *l_724 = &g_140.f0; uint8_t *l_726 = &g_174; int32_t l_727 = (-1L); int16_t *l_728 = &g_105; uint32_t *l_744 = &g_184; int32_t ****l_788 = (void*)0; int8_t *l_790 = &g_261; if (((safe_rshift_func_uint8_t_u_s((((*l_728) = ((((safe_rshift_func_uint16_t_u_s((l_664 , (((((((*l_682) < (safe_rshift_func_uint8_t_u_s(((safe_div_func_uint64_t_u_u((((((((6UL <= (safe_div_func_int16_t_s_s((((safe_div_func_uint16_t_u_u((+((((p_26 & (~p_27)) || g_95) >= ((1UL | (l_722[6][0][0] == (((((*l_726) = ((((*l_724) = (((*l_723) = 0xAC48E277L) & (*l_682))) >= l_725) || p_26)) && 0x01L) , g_184) , &l_628))) , 0x969F5800L)) == p_26)), (*g_428))) || 0x28L) | (*l_691)), l_727))) , (void*)0) == &p_27) & (*l_691)) != (*g_428)) | p_25) < (*l_682)), 0xBABD1B696A39B61BLL)) || p_27), p_27))) != p_27) || 0UL) > 0x6CL) != (*l_691)) | g_260)), 14)) < p_26) <= g_184) ^ (*g_428))) , p_27), 0)) , p_27)) { /* block id: 405 */ int8_t l_757 = 0xEAL; (*l_691) &= (safe_mul_func_uint8_t_u_u((safe_rshift_func_uint8_t_u_u((((*l_728) = (safe_rshift_func_uint8_t_u_u((l_735 , ((*l_726)--)), 5))) | (((*l_682) = (safe_mod_func_uint16_t_u_u((safe_mod_func_int8_t_s_s((safe_rshift_func_int8_t_s_u((((l_744 = l_682) == &g_184) ^ 7L), (safe_add_func_uint32_t_u_u(((safe_sub_func_int64_t_s_s(p_26, (*l_621))) , (safe_lshift_func_int16_t_s_u((safe_mod_func_int8_t_s_s((safe_add_func_uint32_t_u_u(((safe_add_func_uint32_t_u_u((l_757 <= ((safe_mod_func_uint16_t_u_u((l_760 != (void*)0), (*g_428))) > 1UL)), g_260)) == l_727), p_27)), g_3)), 12))), l_727)))), l_757)), p_25))) != p_25)), p_26)), g_6)); if ((*l_682)) continue; return g_10; } else { /* block id: 413 */ int32_t l_772[9][5][5] = {{{(-3L),0x6016C4A8L,1L,6L,0x57508B45L},{1L,4L,(-8L),0x1D99989DL,0x5107044FL},{0x0768F8F4L,0x94F97144L,(-1L),0x12211EA6L,0x97D801A5L},{0x0768F8F4L,0L,0xDED05FE4L,0x57508B45L,0x12211EA6L},{1L,0x0FE093E5L,(-2L),0L,6L}},{{(-3L),(-2L),0xED786EC9L,0L,0x94F97144L},{0x57508B45L,(-3L),0x929E588EL,0x0768F8F4L,0x0768F8F4L},{0x94F97144L,6L,0x94F97144L,0x97D801A5L,0x5107044FL},{(-1L),(-8L),(-5L),0L,(-1L)},{6L,0x5107044FL,(-6L),(-3L),(-1L)}},{{0L,0x8C12EAF3L,(-5L),(-1L),0x0FE093E5L},{0L,(-2L),0x94F97144L,0x12211EA6L,(-2L)},{(-1L),0xC5897484L,0x929E588EL,(-1L),0x2820B87AL},{(-2L),0x8C12EAF3L,0xED786EC9L,(-1L),1L},{4L,0x79944CEDL,(-2L),0x12E354C1L,0xB7FFD233L}},{{0x3AB8899FL,0x6396F980L,0xDED05FE4L,0L,0L},{5L,6L,(-1L),5L,0L},{0L,0L,(-8L),0x3AB8899FL,0xB7FFD233L},{0x12E354C1L,0x3AB8899FL,1L,4L,1L},{(-1L),0x0FE093E5L,0x92011D15L,(-2L),0x2820B87AL}},{{(-1L),1L,(-2L),(-1L),(-2L)},{0x12211EA6L,0x12211EA6L,0x6F87B618L,0L,0x0FE093E5L},{(-1L),4L,0x92011D15L,0L,(-1L)},{(-3L),0xAF3E2504L,0x79944CEDL,6L,(-1L)},{(-1L),(-8L),0x5107044FL,0x92011D15L,(-2L)}},{{1L,0x736888AAL,0x916F2A56L,6L,(-5L)},{(-5L),0x887081F7L,0xC9A9850AL,0L,6L},{(-1L),0xBD3C0DD4L,0x57508B45L,0x97D801A5L,0x7DF3534AL},{0xC9A9850AL,(-1L),(-2L),0x887081F7L,0x736888AAL},{0L,0xC9A9850AL,0x887081F7L,(-5L),1L}},{{0x736888AAL,0x7DF3534AL,0x2820B87AL,(-5L),(-2L)},{0x9861BD57L,0x79944CEDL,0L,0x887081F7L,0L},{0x7DF3534AL,0x6F87B618L,(-1L),0x97D801A5L,0L},{0xB7FFD233L,(-2L),0x6396F980L,0L,0xBD3C0DD4L},{0x22BEC073L,0xAF3E2504L,6L,6L,0xAF3E2504L}},{{0x04E4EF02L,(-6L),0x887081F7L,0x92011D15L,(-1L)},{(-1L),(-2L),0L,0x7DF3534AL,1L},{0L,(-2L),(-7L),0x246A3C99L,5L},{(-1L),1L,0xC9A9850AL,0x94F97144L,0x887081F7L},{0x04E4EF02L,0x7DF3534AL,(-3L),0x04E4EF02L,(-1L)}},{{0x22BEC073L,0x97D801A5L,1L,(-7L),5L},{0xB7FFD233L,(-7L),0x6F87B618L,(-8L),0x929E588EL},{0x7DF3534AL,0xBD3C0DD4L,0x3AB8899FL,(-1L),0L},{0x9861BD57L,(-1L),(-6L),0L,0xAF3E2504L},{0x736888AAL,6L,(-6L),0x94F97144L,(-2L)}}}; uint64_t * const l_777[6][8][1] = {{{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108},{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108}},{{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108},{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108}},{{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108},{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108}},{{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108},{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108}},{{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108},{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108}},{{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108},{(void*)0},{&g_178[0][2]},{(void*)0},{&g_108}}}; int32_t l_779 = 0xE87F0027L; int32_t l_780 = 0xCD375281L; int i, j, k; (***g_535) = (((safe_rshift_func_uint16_t_u_s(((((*l_682) = ((*l_728) |= p_27)) < (((safe_sub_func_uint16_t_u_u((*g_428), (((safe_mod_func_uint16_t_u_u(((safe_mod_func_int32_t_s_s(((g_769 = g_769) != (p_27 , l_771)), l_772[7][0][4])) , ((safe_add_func_int8_t_s_s(g_590, ((*l_726)++))) , p_25)), (((l_777[5][2][0] != l_778) ^ 0xB0ACL) ^ p_25))) , p_27) < (-1L)))) >= 0x50021FA4D966C7F7LL) , 0x59ADL)) && p_26), g_16[3][3][5])) > p_26) , (void*)0); l_781[5][1]--; if (p_26) break; } (*l_691) ^= ((1L != l_727) < ((*l_790) ^= ((((l_784 && ((l_785[0] != (((safe_mod_func_uint32_t_u_u(1UL, 4294967295UL)) >= ((void*)0 != l_788)) , l_789)) == 0x2B59L)) || p_27) != 1L) && g_121))); } else { /* block id: 424 */ uint32_t l_791[10][9] = {{0x2CA38783L,3UL,1UL,4294967295UL,0UL,0xB40B08E2L,0xB40B08E2L,0UL,4294967295UL},{0x7C07376CL,4294967295UL,0x7C07376CL,0UL,4294967295UL,4294967295UL,4294967295UL,0UL,0x7C07376CL},{4294967295UL,0x2CA38783L,9UL,3UL,0UL,0UL,3UL,9UL,0x2CA38783L},{0xD8F4D7EDL,0UL,4294967295UL,0UL,0xD8F4D7EDL,0UL,4294967295UL,0UL,0xD8F4D7EDL},{0UL,1UL,9UL,4294967295UL,4294967295UL,9UL,1UL,0UL,1UL},{4294967295UL,0UL,0x7C07376CL,0x630F5FC1L,0x7C07376CL,0UL,4294967295UL,0x630F5FC1L,4294967295UL},{0UL,0x2CA38783L,1UL,1UL,0x2CA38783L,0UL,9UL,0xB40B08E2L,1UL},{0xD8F4D7EDL,4294967295UL,4294967295UL,4294967295UL,0xD8F4D7EDL,0x630F5FC1L,4294967295UL,0x630F5FC1L,0xD8F4D7EDL},{4294967295UL,3UL,3UL,4294967295UL,1UL,0xB40B08E2L,9UL,0UL,0x2CA38783L},{0x7C07376CL,0x630F5FC1L,0x7C07376CL,0UL,4294967295UL,0x630F5FC1L,4294967295UL,0UL,0x7C07376CL}}; int32_t l_795 = 1L; int32_t l_797 = 0xE07B412CL; uint8_t l_806 = 0xA9L; int32_t l_811 = 0x36328F3BL; int32_t l_814 = 0xFD47348FL; int32_t l_815[8][2][6] = {{{0xCA5EAE08L,0xCA5EAE08L,0L,6L,1L,0xA68F84D1L},{(-6L),(-7L),0xDBC7D6C2L,9L,0x424F582EL,0L}},{{0x0E3A843DL,(-6L),0xDBC7D6C2L,8L,0xCA5EAE08L,0xA68F84D1L},{0xEAA92371L,8L,0L,0xFDD06585L,(-7L),(-1L)}},{{0xFDD06585L,(-7L),(-1L),1L,(-6L),(-1L)},{0x0E3A843DL,(-6L),0L,0L,8L,0xA68F84D1L}},{{8L,0x2838A5B4L,0xDBC7D6C2L,6L,(-7L),0L},{(-6L),1L,0xDBC7D6C2L,1L,(-6L),0xA68F84D1L}},{{0xF38486E2L,(-6L),0L,0xEAA92371L,0x2838A5B4L,(-1L)},{0xEAA92371L,0x2838A5B4L,(-1L),(-6L),1L,(-1L)}},{{(-6L),0x0E3A843DL,0L,9L,(-6L),0xA68F84D1L},{1L,0x424F582EL,0xDBC7D6C2L,0L,0x2838A5B4L,0L}},{{0xCA5EAE08L,8L,0xDBC7D6C2L,(-6L),0x0E3A843DL,0xA68F84D1L},{0xFDD06585L,1L,0L,0xF38486E2L,0x424F582EL,(-1L)}},{{0xF38486E2L,0x424F582EL,(-1L),8L,8L,(-1L)},{0xCA5EAE08L,0xCA5EAE08L,0L,6L,1L,0xA68F84D1L}}}; int i, j, k; p_26 = (*l_691); l_791[5][1]++; if (l_791[5][1]) { /* block id: 427 */ int8_t l_801[3]; int32_t l_803 = (-1L); int32_t l_805 = 0xF506FD0FL; int i; for (i = 0; i < 3; i++) l_801[i] = 0x1DL; l_798--; ++l_806; } else { /* block id: 430 */ int32_t l_809 = 0x0AB519EDL; int32_t l_810 = 0x768B77D5L; int32_t l_812[6] = {(-1L),(-1L),(-1L),(-1L),(-1L),(-1L)}; int32_t l_813 = 0x7D97A486L; int32_t l_816 = 0L; int32_t l_817 = 0x9DFEFBBDL; int32_t l_818[7]; int i; for (i = 0; i < 7; i++) l_818[i] = 1L; ++l_819; p_26 = p_26; (*g_301) = &l_818[5]; (***g_300) = (safe_unary_minus_func_uint32_t_u((****l_789))); } for (l_676 = 0; (l_676 <= 0); l_676 += 1) { /* block id: 438 */ int i, j, k; return g_28[g_108][l_676][(l_676 + 4)]; } } for (g_263 = 3; (g_263 >= 0); g_263 -= 1) { /* block id: 444 */ if (p_27) break; for (g_106 = 6; (g_106 >= 0); g_106 -= 1) { /* block id: 448 */ return p_25; } } for (g_438 = 0; (g_438 <= 0); g_438 += 1) { /* block id: 454 */ const int32_t l_823 = 0xDA23EA4DL; (*l_682) &= (l_823 & g_16[3][3][0]); for (g_81 = 1; (g_81 <= 4); g_81 += 1) { /* block id: 458 */ if (p_27) break; if (p_27) break; return p_25; } (*l_691) &= p_26; } } } } return l_986; } /* ------------------------------------------ */ /* * reads : g_428 g_123 g_140.f3 g_121 g_261 g_136 * writes: g_140.f3 g_261 */ static int32_t func_37(int32_t p_38, uint16_t p_39, const int16_t p_40) { /* block id: 327 */ uint64_t *l_599 = (void*)0; uint64_t *l_601[7] = {(void*)0,(void*)0,&g_264,(void*)0,(void*)0,&g_264,(void*)0}; uint64_t **l_600 = &l_601[3]; uint16_t l_604 = 0UL; uint16_t *l_609 = &g_140.f3; uint8_t *l_612[5] = {&g_174,&g_174,&g_174,&g_174,&g_174}; uint8_t **l_613 = &l_612[4]; uint8_t *l_615 = &g_174; uint8_t **l_614 = &l_615; uint8_t *l_616[6][3][5] = {{{&g_174,&g_174,&g_174,&g_174,(void*)0},{&g_174,&g_174,(void*)0,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174}},{{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174}},{{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,(void*)0,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,(void*)0}},{{(void*)0,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174}},{{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,(void*)0,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174}},{{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174},{&g_174,&g_174,&g_174,&g_174,&g_174}}}; int8_t *l_619[2]; int32_t l_620 = 1L; int i, j, k; for (i = 0; i < 2; i++) l_619[i] = (void*)0; l_620 ^= (((safe_mul_func_uint8_t_u_u((((safe_lshift_func_uint16_t_u_s((*g_428), (safe_sub_func_uint64_t_u_u((l_599 != ((*l_600) = l_599)), 0xC136A5297B95F03FLL)))) ^ (0x1DL || ((l_604 && (safe_mod_func_uint16_t_u_u((safe_div_func_uint16_t_u_u(((g_261 |= (((((++(*l_609)) != (((*l_614) = ((*l_613) = l_612[4])) == (l_616[4][2][2] = &g_174))) && (((safe_div_func_uint8_t_u_u(p_38, g_121)) && l_604) < 0x69BCL)) , g_121) & l_604)) , 0x39C2L), g_123)), 0xE101L))) & 0L))) , g_136), p_40)) != p_39) ^ l_604); return p_40; } /* ------------------------------------------ */ /* * reads : g_590 g_4 * writes: g_590 */ static int8_t func_43(int32_t p_44, const uint8_t p_45, uint64_t p_46, uint16_t p_47) { /* block id: 324 */ int32_t *l_589[7] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0}; int i; ++g_590; return g_4[0]; } /* ------------------------------------------ */ /* * reads : g_13 g_28 g_82 g_108 g_123 g_87 g_16 g_105 g_139 g_140.f1 g_95 g_157 g_136 g_174 g_178 g_106 g_184 g_122 g_140.f0 g_264 g_6 g_261 g_81 g_140.f3 g_313 g_52 g_302 g_362 g_300 g_301 g_140.f2 g_428 g_536 g_537 g_535 g_260 g_263 * writes: g_52 g_81 g_82 g_108 g_87 g_123 g_136 g_122 g_140.f1 g_106 g_174 g_105 g_178 g_184 g_28 g_121 g_260 g_264 g_298 g_261 g_139 g_140.f0 g_263 g_302 g_428 g_438 g_95 */ static uint64_t func_48(int32_t p_49) { /* block id: 10 */ uint64_t *l_398 = &g_178[4][0]; int32_t l_410 = 0xABEB17A4L; uint16_t l_421 = 0x8A1CL; int8_t l_423 = 0L; uint64_t l_450 = 18446744073709551610UL; uint16_t l_460 = 1UL; int32_t l_471 = (-10L); int32_t l_477 = 0x40708387L; int32_t l_480 = 0xDD107B1BL; int32_t l_483[9] = {(-10L),(-10L),(-10L),(-10L),(-10L),(-10L),(-10L),(-10L),(-10L)}; int32_t l_508 = (-7L); uint32_t *l_511 = &g_184; int32_t *l_517 = &l_483[1]; int64_t **l_530[4][5][4] = {{{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],(void*)0,&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],(void*)0,(void*)0},{&g_363[8],&g_363[8],(void*)0,&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]}},{{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{(void*)0,&g_363[8],&g_363[8],(void*)0},{(void*)0,&g_363[7],&g_363[7],&g_363[7]}},{{&g_363[7],(void*)0,&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],(void*)0,&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],(void*)0,(void*)0},{&g_363[8],&g_363[8],(void*)0,&g_363[7]}},{{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{&g_363[7],&g_363[7],&g_363[7],&g_363[7]},{(void*)0,&g_363[8],&g_363[8],(void*)0}}}; int i, j, k; lbl_439: for (p_49 = 0; (p_49 > 27); p_49 = safe_add_func_uint64_t_u_u(p_49, 1)) { /* block id: 13 */ return p_49; } for (p_49 = 0; (p_49 <= 0); p_49 += 1) { /* block id: 18 */ int32_t l_399 = 0x2F3CA0FBL; const int32_t *l_420 = &l_410; const int32_t **l_419 = &l_420; int64_t **l_425 = &g_363[4]; int8_t l_469[2][9] = {{1L,1L,1L,1L,1L,1L,1L,1L,1L},{0x9FL,0x46L,0x9FL,0x46L,0x9FL,0x46L,0x9FL,0x46L,0x9FL}}; int32_t l_476 = 1L; int32_t l_478 = 0x5EA4B4BCL; int32_t l_482[7][3] = {{3L,3L,3L},{0x2DC17841L,0L,0x2DC17841L},{3L,3L,3L},{0x2DC17841L,0L,0x2DC17841L},{3L,3L,3L},{0x2DC17841L,0L,0x2DC17841L},{3L,3L,3L}}; uint16_t l_526 = 0UL; int32_t ** const ***l_538 = &g_535; const uint32_t l_553[10] = {0x16AF594BL,0x16AF594BL,3UL,0x16AF594BL,0x16AF594BL,3UL,0x16AF594BL,0x16AF594BL,3UL,0x16AF594BL}; int8_t l_585 = 0xEFL; uint32_t l_586 = 0x2CC811C1L; int i, j; for (g_52 = 0; (g_52 <= 0); g_52 += 1) { /* block id: 21 */ union U0 **l_393 = &g_139; int32_t l_411 = 0xC3A90245L; int32_t *****l_442 = &g_299[2][0][4]; uint32_t *l_447 = &g_184; int32_t l_481[8] = {0x352732D6L,0x76B1B15BL,0x76B1B15BL,0x352732D6L,0x76B1B15BL,0x76B1B15BL,0x352732D6L,0x76B1B15BL}; int64_t l_484 = 0x9711037760870154LL; int8_t l_509 = 1L; int32_t **l_529 = &l_517; int64_t **l_531[1][5][1] = {{{&g_363[4]},{(void*)0},{&g_363[4]},{(void*)0},{&g_363[4]}}}; int i, j, k; (*l_393) = func_53(p_49); for (g_140.f0 = 0; (g_140.f0 <= 0); g_140.f0 += 1) { /* block id: 203 */ int32_t **l_418 = &g_302; int8_t * const l_436 = &l_423; uint32_t l_452 = 1UL; union U0 **l_457 = &g_139; int32_t *l_468[8][3][7] = {{{&g_16[2][4][7],&l_399,&l_410,&l_399,&g_16[2][4][7],&g_6,&g_6},{(void*)0,&g_13,&l_411,(void*)0,&g_16[2][4][7],&g_6,&g_16[2][4][7]},{(void*)0,&g_13,&g_13,(void*)0,&l_399,(void*)0,(void*)0}},{{(void*)0,(void*)0,&l_399,(void*)0,&g_13,&g_13,(void*)0},{&g_16[2][4][7],&g_6,&g_16[2][4][7],(void*)0,&l_411,&g_13,(void*)0},{&g_6,&g_6,&g_16[2][4][7],&l_399,&l_410,&l_399,&g_16[2][4][7]}},{{&l_411,&l_411,&l_399,&l_410,(void*)0,&g_13,&g_6},{&l_410,&l_411,&g_13,&g_13,&g_13,&g_13,&l_411},{&g_13,&g_6,&l_411,&g_16[2][4][7],(void*)0,(void*)0,&l_410}},{{&g_13,&g_6,&l_410,&l_411,&l_410,&g_6,&g_13},{&l_410,(void*)0,(void*)0,&g_16[2][4][7],&l_411,&g_6,&g_13},{&l_411,&g_13,&g_13,&g_13,&g_13,&l_411,&l_410}},{{&g_6,&g_13,(void*)0,&l_410,&l_399,&l_411,&l_411},{&g_16[2][4][7],&l_399,&l_410,&l_399,&g_16[2][4][7],&g_6,&g_6},{(void*)0,&g_13,&l_411,(void*)0,&g_16[2][4][7],&g_6,&g_16[2][4][7]}},{{(void*)0,&g_13,&g_13,(void*)0,&l_399,(void*)0,(void*)0},{(void*)0,(void*)0,&l_399,(void*)0,&g_13,&g_13,(void*)0},{&g_16[2][4][7],&g_6,&g_16[2][4][7],(void*)0,&l_411,&g_13,(void*)0}},{{&g_6,&g_6,&g_16[2][4][7],&l_399,&l_410,&l_399,&g_16[2][4][7]},{&l_411,&l_411,&l_399,&l_410,(void*)0,&g_13,&g_6},{&l_410,&l_411,&g_13,&g_13,&g_13,&g_13,&l_411}},{{&g_13,&g_6,&l_411,&g_16[2][4][7],(void*)0,(void*)0,&l_410},{&g_13,&g_6,&l_410,&l_399,(void*)0,&l_410,(void*)0},{(void*)0,&g_6,&l_410,&g_13,&l_399,(void*)0,(void*)0}}}; int i, j, k; for (g_263 = 0; (g_263 >= 0); g_263 -= 1) { /* block id: 206 */ int64_t **l_424[8] = {&g_363[7],&g_363[7],&g_363[7],&g_363[7],&g_363[7],&g_363[7],&g_363[7],&g_363[7]}; uint16_t *l_427 = &g_140.f3; uint16_t **l_426[5][10] = {{&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427},{&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427},{&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427},{&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427},{&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427,&l_427}}; uint32_t *l_433 = &g_136; uint32_t *l_437 = &g_438; int i, j, k; for (g_136 = 0; (g_136 <= 4); g_136 += 1) { /* block id: 209 */ int i, j, k; if (g_28[(g_140.f0 + 1)][p_49][(g_136 + 1)]) break; if (g_28[g_52][p_49][(g_140.f0 + 3)]) continue; } if ((safe_sub_func_uint64_t_u_u((safe_div_func_uint16_t_u_u(((void*)0 == l_398), g_28[p_49][g_52][(g_52 + 6)])), (((l_399 ^ p_49) || ((safe_sub_func_uint32_t_u_u(4294967295UL, (safe_mod_func_int16_t_s_s(p_49, (safe_sub_func_uint32_t_u_u(0xE6DA1440L, (safe_mod_func_int32_t_s_s(((safe_rshift_func_uint8_t_u_s(1UL, l_410)) | l_411), p_49)))))))) < g_140.f2)) | p_49)))) { /* block id: 213 */ uint64_t l_414 = 0UL; int32_t *l_415 = &l_399; (*l_415) = (safe_add_func_int64_t_s_s(g_28[p_49][g_52][(g_52 + 6)], l_414)); } else { /* block id: 215 */ int32_t *l_422 = &g_87; (**g_300) = func_67(((((0xCDC0618FL == (g_178[0][2] ^ (safe_div_func_int64_t_s_s((l_418 == (l_411 , l_419)), (g_122 , ((l_421 > (((g_28[1][0][3] || 0L) , 0x026B42F2L) || (*g_302))) & p_49)))))) > p_49) , g_178[0][2]) , g_16[1][1][0]), l_422, (*l_422), l_423); (*l_422) = (***g_300); } if ((**g_301)) continue; (*l_418) = func_67(((((void*)0 == &l_421) , l_424[1]) != l_425), (((g_428 = &g_123) == ((safe_sub_func_int8_t_s_s((((++(*l_433)) == p_49) < (4294967295UL < ((*l_437) = (((((p_49 && 0x081EF1B7L) , (void*)0) == l_436) < p_49) != p_49)))), (-1L))) , &g_123)) , (void*)0), g_87, l_411); } if (g_6) goto lbl_439; for (g_95 = 0; (g_95 <= 0); g_95 += 1) { /* block id: 228 */ const uint32_t l_443[1][4] = {{1UL,1UL,1UL,1UL}}; int32_t *l_444 = &g_122; int32_t *l_451[8][5] = {{&l_411,&g_6,(void*)0,&g_6,&l_411},{(void*)0,&l_410,&l_411,&l_410,(void*)0},{&l_411,&g_6,(void*)0,&g_6,&l_411},{(void*)0,&l_410,&l_411,&l_410,(void*)0},{&l_411,&g_6,(void*)0,&g_6,&l_411},{(void*)0,&l_410,&l_411,&l_410,(void*)0},{&l_411,&g_6,(void*)0,&g_6,&l_411},{(void*)0,&l_410,&l_411,&l_410,(void*)0}}; int i, j; (*l_444) = (((0x30E3BC6FL != p_49) && ((void*)0 != l_442)) < l_443[0][0]); l_411 ^= (0x97L > (((((((*l_436) = g_261) >= p_49) & g_178[0][2]) || ((((p_49 , &g_184) != (l_447 = l_444)) , ((safe_rshift_func_int8_t_s_u((*l_444), (**l_419))) & (-1L))) <= l_450)) == 0L) <= (***g_300))); if (l_411) goto lbl_439; if (l_452) continue; } l_469[1][2] ^= (((safe_lshift_func_uint8_t_u_s(((((safe_rshift_func_int16_t_s_s((((void*)0 == l_457) == ((safe_rshift_func_uint16_t_u_s((l_460 < ((+(safe_mod_func_uint64_t_u_u((safe_mod_func_int8_t_s_s(((*l_436) &= (p_49 ^ (0xA30156790AF5F022LL ^ (safe_sub_func_uint8_t_u_u((0UL <= 0xB17DB8553A23FCF3LL), ((void*)0 != l_393)))))), 248UL)), 0x7AB69D3E77C2C50FLL))) | g_105)), g_28[0][0][2])) <= (*g_428))), 13)) & p_49) & g_140.f1) | p_49), p_49)) , p_49) & g_106); } for (g_106 = 0; (g_106 >= 0); g_106 -= 1) { /* block id: 241 */ int16_t l_470 = 0xF4DCL; int32_t *l_472 = &l_410; int32_t *l_473 = &g_87; int32_t *l_474 = &g_122; int32_t *l_475[1][9][3] = {{{&g_52,&g_52,(void*)0},{&g_52,&l_410,&l_399},{&g_87,(void*)0,&g_87},{&l_399,&l_410,&g_52},{(void*)0,&g_52,&g_52},{(void*)0,(void*)0,&g_87},{&g_52,&g_52,&l_399},{(void*)0,&l_399,(void*)0},{(void*)0,&l_399,(void*)0}}}; int32_t l_479 = 0x5EF6F1B7L; uint64_t l_485 = 18446744073709551613UL; int32_t *****l_505[1][2][10]; int i, j, k; for (i = 0; i < 1; i++) { for (j = 0; j < 2; j++) { for (k = 0; k < 10; k++) l_505[i][j][k] = &g_299[4][0][2]; } } l_485--; } } for (l_423 = 0; (l_423 >= 0); l_423 -= 1) { /* block id: 271 */ int64_t l_540[10][9] = {{(-1L),0x77AF0C4F7C43971DLL,0x5FDD5F2B67EA167FLL,(-1L),0xD9C059927C91175ELL,(-1L),(-1L),0x0AE53D707F3B901BLL,0x942F11EDE35C37A8LL},{0x27690E8A0397DAE6LL,(-5L),(-1L),(-4L),1L,(-1L),(-10L),0x55649E9B1A487A80LL,(-1L)},{(-1L),0xA732F252E4C1815ALL,5L,7L,(-1L),(-6L),(-1L),0x0AE53D707F3B901BLL,(-1L)},{(-1L),(-1L),(-6L),(-6L),(-1L),(-1L),7L,0xD9C059927C91175ELL,0x437F2287CE3451DFLL},{0x27690E8A0397DAE6LL,0x55649E9B1A487A80LL,5L,0x437F2287CE3451DFLL,(-1L),(-1L),0x437F2287CE3451DFLL,0x32D4584BE1740B0ALL,(-4L)},{(-1L),1L,(-1L),(-10L),(-1L),(-4L),0x2BB6377883D85B4FLL,(-4L),0xEBBB2DFAD0E4502BLL},{(-8L),(-1L),(-1L),0x83599B5B4CD2C9C5LL,(-6L),(-1L),8L,5L,0L},{8L,0x942F11EDE35C37A8LL,(-8L),0x83599B5B4CD2C9C5LL,0x27690E8A0397DAE6LL,0x83599B5B4CD2C9C5LL,(-8L),0x942F11EDE35C37A8LL,8L},{0x2BB6377883D85B4FLL,0xD589B54109888F31LL,0L,(-8L),5L,(-1L),0x9C1443CD7AC20564LL,0x942F11EDE35C37A8LL,0x0B31DAE6E7C3A433LL},{0L,0x437F2287CE3451DFLL,0x9C1443CD7AC20564LL,0L,(-1L),0xEBBB2DFAD0E4502BLL,2L,5L,0L}}; int32_t l_548[10] = {1L,(-10L),1L,0xF17830FDL,0xF17830FDL,1L,(-10L),1L,0xF17830FDL,0xF17830FDL}; uint64_t l_554 = 5UL; int i, j; if ((***g_536)) break; (*l_517) = (l_478 ^= (p_49 == ((g_136 = 0xE8E443D4L) & 0L))); for (l_478 = 0; (l_478 <= 0); l_478 += 1) { /* block id: 278 */ int32_t l_549[7][10][3] = {{{0L,0x12DA0509L,5L},{0xA946319EL,0x32F1F0F3L,1L},{0xF73F3EF8L,1L,0x81D39A72L},{0xABED2BF5L,0xA946319EL,0L},{0x573DA728L,0x12DA0509L,0x5F78CEB4L},{(-8L),0L,0L},{0x50082E0DL,(-1L),0x81D39A72L},{1L,(-8L),1L},{0x5F78CEB4L,0x74298835L,5L},{(-8L),1L,0x5531E6EFL}},{{0x8A08634DL,0x74298835L,0x8A08634DL},{0xABED2BF5L,(-8L),0x32F1F0F3L},{(-2L),(-1L),0x573DA728L},{0xA946319EL,0L,0x5531E6EFL},{0x0999ABF3L,0x12DA0509L,0L},{0xA946319EL,0xA946319EL,1L},{(-2L),1L,(-1L)},{0xABED2BF5L,0x32F1F0F3L,0L},{0x8A08634DL,0x12DA0509L,0x50082E0DL},{(-8L),0xABED2BF5L,0L}},{{0x5F78CEB4L,(-1L),(-1L)},{1L,0xD88601F0L,1L},{0x50082E0DL,0x74298835L,0L},{(-8L),1L,0x5531E6EFL},{0x573DA728L,0x74298835L,0x573DA728L},{0xABED2BF5L,0xD88601F0L,0x32F1F0F3L},{0xF73F3EF8L,(-1L),0x8A08634DL},{0xA946319EL,0xABED2BF5L,0x5531E6EFL},{0L,0x12DA0509L,5L},{0xA946319EL,0x32F1F0F3L,1L}},{{0xF73F3EF8L,1L,0x81D39A72L},{0xABED2BF5L,0xA946319EL,0L},{0x573DA728L,0x12DA0509L,0x5F78CEB4L},{(-8L),0L,0L},{0x50082E0DL,(-1L),0x81D39A72L},{1L,(-8L),1L},{0x5F78CEB4L,0x74298835L,5L},{(-8L),1L,0x5531E6EFL},{0x8A08634DL,0x74298835L,0x8A08634DL},{0xABED2BF5L,(-8L),0x32F1F0F3L}},{{(-2L),(-1L),0x573DA728L},{0xA946319EL,0L,0x5531E6EFL},{0x0999ABF3L,0x12DA0509L,0L},{0xA946319EL,0xA946319EL,1L},{(-2L),1L,(-1L)},{0xABED2BF5L,0x32F1F0F3L,0L},{0x8A08634DL,0x12DA0509L,0x50082E0DL},{0xABED2BF5L,1L,1L},{(-4L),1L,5L},{1L,0L,0x32F1F0F3L}},{{0L,1L,0x50082E0DL},{0xABED2BF5L,1L,1L},{0L,1L,0L},{1L,0L,(-1L)},{0x8A08634DL,1L,0x0999ABF3L},{5L,1L,1L},{(-1L),(-1L),0x5F78CEB4L},{5L,(-1L),0x32F1F0F3L},{0x8A08634DL,0xA26EFB58L,0L},{1L,5L,1L}},{{0L,(-1L),(-4L)},{0xABED2BF5L,1L,1L},{0L,1L,0L},{1L,0xABED2BF5L,0x32F1F0F3L},{(-4L),1L,0x5F78CEB4L},{0xABED2BF5L,0x5531E6EFL,1L},{0x0999ABF3L,1L,0x0999ABF3L},{1L,0xABED2BF5L,(-1L)},{0x573DA728L,1L,0L},{5L,1L,1L}}}; int i, j, k; for (g_95 = 0; (g_95 <= 0); g_95 += 1) { /* block id: 281 */ uint32_t l_550 = 0x1745E314L; for (g_264 = 0; (g_264 <= 0); g_264 += 1) { /* block id: 284 */ int32_t *l_541 = &g_87; int32_t *l_542 = (void*)0; int32_t *l_543 = &l_410; int32_t *l_544 = &l_399; int32_t *l_545 = &g_52; int32_t *l_546 = &l_482[6][0]; int32_t *l_547[9][6][4] = {{{(void*)0,&g_87,&l_399,&l_399},{(void*)0,&l_482[1][0],&l_482[1][0],(void*)0},{&l_478,&l_399,&l_477,&l_482[1][0]},{&l_399,&g_87,&l_482[5][0],&l_483[5]},{(void*)0,&l_478,&l_482[1][0],&l_483[5]},{&l_483[5],&g_87,&l_483[5],&l_482[1][0]}},{{(void*)0,&l_399,&l_478,(void*)0},{(void*)0,&l_482[1][0],&l_477,&l_399},{&l_482[1][0],&g_87,&l_477,&l_477},{(void*)0,(void*)0,&l_478,&l_483[5]},{(void*)0,(void*)0,&l_483[5],&l_399},{&l_483[5],&l_399,&l_482[1][0],&l_483[5]}},{{(void*)0,&l_399,&l_482[5][0],&l_399},{&l_399,(void*)0,&l_477,&l_483[5]},{&l_478,(void*)0,&l_482[1][0],&l_477},{(void*)0,&g_87,&l_399,&l_399},{(void*)0,&l_482[1][0],&l_482[1][0],(void*)0},{&l_478,&l_399,&l_477,&l_482[1][0]}},{{&l_399,&g_87,&l_482[5][0],&l_483[5]},{(void*)0,&l_478,&l_482[1][0],&l_483[5]},{&l_483[5],&g_87,&l_483[5],&l_482[1][0]},{(void*)0,&l_399,&l_478,(void*)0},{(void*)0,&l_482[1][0],&l_477,&l_399},{&l_482[1][0],&g_87,&l_477,&l_477}},{{(void*)0,(void*)0,&l_478,&l_483[5]},{(void*)0,(void*)0,&l_483[5],&l_399},{&l_483[5],&l_399,&l_482[1][0],&l_483[5]},{(void*)0,&l_399,&l_482[5][0],&l_399},{&l_399,(void*)0,&l_477,&l_483[5]},{&l_478,(void*)0,&l_482[1][0],&l_477}},{{(void*)0,&g_87,&l_483[5],&l_483[5]},{&l_477,&l_399,&l_399,&l_477},{&l_478,&l_483[5],&g_52,&l_399},{&l_483[5],&l_478,&g_87,(void*)0},{&l_482[1][0],&l_478,&l_399,(void*)0},{&l_482[5][0],&l_478,&l_482[5][0],&l_399}},{{&l_477,&l_483[5],(void*)0,&l_477},{&l_482[1][0],&l_399,&g_52,&l_483[5]},{&l_399,&l_478,&g_52,&g_52},{&l_482[1][0],&l_482[1][0],(void*)0,(void*)0},{&l_477,&l_476,&l_482[5][0],&l_483[5]},{&l_482[5][0],&l_483[5],&l_399,&l_482[5][0]}},{{&l_482[1][0],&l_483[5],&g_87,&l_483[5]},{&l_483[5],&l_476,&g_52,(void*)0},{&l_478,&l_482[1][0],&l_399,&g_52},{&l_477,&l_478,&l_483[5],&l_483[5]},{&l_477,&l_399,&l_399,&l_477},{&l_478,&l_483[5],&g_52,&l_399}},{{&l_483[5],&l_478,&g_87,(void*)0},{&l_482[1][0],&l_478,&l_399,(void*)0},{&l_482[5][0],&l_478,&l_482[5][0],&l_399},{&l_477,&l_483[5],(void*)0,&l_477},{&l_482[1][0],&l_399,&g_52,&l_483[5]},{&l_399,&l_478,&g_52,&g_52}}}; int i, j, k; l_550--; } } if (l_553[1]) continue; for (g_264 = 0; (g_264 <= 0); g_264 += 1) { /* block id: 291 */ int i, j; if (l_554) break; return l_549[5][6][2]; } } for (g_108 = 0; (g_108 <= 0); g_108 += 1) { /* block id: 298 */ int64_t l_580 = 0x740A3E5DEABCC89ELL; int32_t l_581 = 1L; int32_t *l_582 = &l_548[1]; int32_t *l_583 = (void*)0; int32_t *l_584[10][6][4] = {{{&g_16[3][3][5],&l_548[7],&l_482[6][1],(void*)0},{&l_399,&l_410,&l_548[1],(void*)0},{(void*)0,&l_482[6][1],&l_482[4][1],&l_483[5]},{&l_483[3],(void*)0,&l_410,&g_6},{&l_482[4][1],(void*)0,&g_13,&l_476},{&g_6,&g_16[3][3][5],&l_476,&l_478}},{{(void*)0,&g_16[3][3][5],(void*)0,(void*)0},{&g_6,&g_6,(void*)0,(void*)0},{&g_6,&l_482[4][1],&l_548[1],&l_548[1]},{&l_482[6][1],(void*)0,&g_16[3][3][5],(void*)0},{&l_483[3],&l_482[5][2],&l_548[1],&l_476},{&l_478,&l_483[5],&g_87,&l_482[5][0]}},{{&l_410,&l_548[1],(void*)0,&g_6},{&g_6,(void*)0,&g_6,&l_399},{&l_482[5][0],(void*)0,&l_482[5][0],&l_476},{&g_6,&l_483[3],(void*)0,&l_482[5][0]},{&l_478,&g_16[3][3][5],&g_87,&l_482[6][1]},{&l_399,&l_482[3][1],&l_482[4][1],&l_410}},{{&l_548[1],(void*)0,&l_476,(void*)0},{(void*)0,(void*)0,&l_476,&g_122},{&g_16[3][3][5],&l_483[3],(void*)0,&l_476},{&l_548[1],&l_482[3][0],&g_122,&l_482[4][1]},{&l_548[1],&g_13,(void*)0,&l_399},{&g_16[3][3][5],&l_482[4][1],&l_476,(void*)0}},{{(void*)0,&l_480,(void*)0,(void*)0},{&l_476,&g_6,(void*)0,&l_548[1]},{&l_478,&l_483[3],&g_52,&g_122},{(void*)0,&l_548[2],(void*)0,&g_16[4][0][3]},{&l_548[1],&l_399,(void*)0,&l_478},{&g_13,&l_483[5],(void*)0,(void*)0}},{{&g_87,&g_87,&g_13,&l_483[5]},{&g_6,&l_548[1],&g_13,&l_483[5]},{&l_476,&l_410,&l_483[5],(void*)0},{&l_482[3][1],(void*)0,&g_16[2][1][3],&g_87},{&l_548[1],&l_483[5],&l_482[3][0],&g_87},{(void*)0,&l_410,&g_13,&g_6}},{{&l_410,(void*)0,(void*)0,&g_6},{(void*)0,&g_16[3][3][5],&g_87,&l_476},{&l_548[1],&l_483[5],(void*)0,&g_87},{(void*)0,&g_16[3][3][5],&l_477,&l_410},{(void*)0,(void*)0,(void*)0,&l_482[5][0]},{&l_482[5][0],(void*)0,&g_16[4][0][3],&g_13}},{{&g_6,&g_122,&l_548[1],(void*)0},{&l_482[4][1],&g_87,&g_16[3][3][5],&g_87},{&g_122,(void*)0,&l_477,(void*)0},{&g_87,&l_399,&l_399,&g_16[2][1][3]},{(void*)0,&l_548[1],&l_476,&g_87},{&g_6,&g_122,&g_122,&g_6}},{{&l_476,&l_548[1],(void*)0,&l_478},{&l_483[5],&l_483[3],&l_477,(void*)0},{(void*)0,(void*)0,(void*)0,(void*)0},{&l_548[1],&l_483[3],&l_548[1],&l_478},{(void*)0,&l_548[1],&g_122,&g_6},{&g_87,&g_122,&g_6,&g_87}},{{&g_6,&l_548[1],&l_482[3][0],&g_16[2][1][3]},{&g_6,&l_399,&l_483[5],(void*)0},{&l_548[1],(void*)0,&l_478,&g_87},{&l_476,&g_87,&g_16[3][3][5],(void*)0},{(void*)0,&g_122,&g_6,&g_13},{&g_13,(void*)0,(void*)0,&l_482[5][0]}}}; int i, j, k; for (l_508 = 0; (l_508 <= 0); l_508 += 1) { /* block id: 301 */ uint32_t *l_555 = &g_184; uint64_t * const l_560 = (void*)0; int32_t l_573 = 0x2A4D26B6L; if (((l_555 = (void*)0) == (void*)0)) { /* block id: 303 */ uint64_t *l_557 = &l_450; uint64_t **l_558 = (void*)0; uint64_t **l_559 = &l_557; int32_t l_565 = (-10L); uint8_t *l_568 = &g_174; (**g_536) = &l_548[1]; l_565 = ((0xF2088829L >= ((**g_537) = (~((-4L) & (g_87 , ((p_49 > (3L <= (((*l_559) = l_557) == l_560))) && (safe_div_func_uint16_t_u_u((((*l_568) = ((safe_div_func_int64_t_s_s(l_565, (safe_add_func_uint32_t_u_u(1UL, l_548[7])))) ^ 0xD076L)) & l_565), (*g_428))))))))) < p_49); return p_49; } else { /* block id: 310 */ int16_t *l_574[7][5] = {{&g_106,&g_106,&g_106,&g_105,&g_106},{&g_106,&g_106,&g_106,&g_105,&g_106},{&g_106,&g_106,&g_106,&g_105,&g_106},{&g_106,&g_106,&g_106,&g_105,&g_106},{&g_106,&g_106,&g_106,&g_105,&g_106},{&g_106,&g_106,&g_106,&g_105,&g_106},{&g_106,&g_106,&g_106,&g_105,&g_106}}; int32_t l_579 = (-1L); int i, j, k; (*l_517) = (safe_add_func_uint64_t_u_u(((g_105 = (safe_mod_func_int8_t_s_s(p_49, l_573))) || g_140.f1), p_49)); if ((**g_301)) continue; (*l_517) = (safe_mod_func_uint32_t_u_u((safe_sub_func_uint32_t_u_u(p_49, (((g_28[l_508][l_423][(g_108 + 4)] = (((**g_536) != (****l_538)) >= g_264)) | 18446744073709551615UL) > (p_49 , p_49)))), (l_579 = p_49))); } } ++l_586; } } } return g_106; } /* ------------------------------------------ */ /* * reads : g_13 g_28 g_82 g_108 g_123 g_87 g_16 g_105 g_139 g_140.f1 g_95 g_157 g_136 g_174 g_178 g_106 g_184 g_122 g_140.f0 g_264 g_6 g_261 g_81 g_260 g_140.f3 g_313 g_52 g_302 g_362 g_300 g_301 * writes: g_81 g_82 g_108 g_87 g_123 g_136 g_122 g_140.f1 g_106 g_174 g_105 g_178 g_184 g_28 g_121 g_260 g_264 g_298 g_261 g_139 */ static union U0 * func_53(uint8_t p_54) { /* block id: 22 */ int32_t *l_74 = &g_6; union U0 *l_114 = (void*)0; int16_t *l_273 = &g_106; int32_t l_274 = 1L; uint16_t l_275 = 0UL; int32_t ***l_282 = (void*)0; int64_t l_291[10] = {1L,1L,1L,1L,1L,1L,1L,1L,1L,1L}; const int64_t *l_365 = &g_28[0][0][2]; const int64_t **l_364 = &l_365; int32_t l_388 = 0xC6116B30L; int32_t *l_389[8][9][3] = {{{&g_122,&g_13,&g_87},{&l_388,&g_13,&g_13},{&l_388,(void*)0,&g_16[3][3][5]},{&g_16[4][0][1],&l_274,&l_388},{&l_388,&l_388,&g_6},{(void*)0,&g_122,&g_16[2][1][0]},{(void*)0,&g_16[0][3][0],&g_16[0][3][0]},{&g_16[2][1][0],&g_13,&g_52},{(void*)0,&g_13,&g_87}},{{(void*)0,&g_16[2][1][0],&l_388},{&g_13,&g_87,&g_87},{(void*)0,&g_16[2][1][0],(void*)0},{&g_16[0][3][0],&g_13,&g_87},{&g_16[4][0][1],&g_13,(void*)0},{&g_16[2][3][2],&g_16[0][3][0],&g_6},{(void*)0,&g_122,&g_13},{&g_13,&l_388,&l_274},{&g_13,&l_274,&g_52}},{{&g_52,(void*)0,&g_52},{(void*)0,&g_13,&g_16[3][3][5]},{&g_13,&l_388,&g_16[0][3][0]},{(void*)0,(void*)0,(void*)0},{&l_274,&g_13,&g_16[3][3][5]},{(void*)0,&g_16[3][3][5],&l_388},{&g_13,&l_274,&g_6},{(void*)0,(void*)0,(void*)0},{&g_52,&g_52,&l_388}},{{&g_13,&g_13,&g_16[3][3][5]},{&g_13,&g_13,&l_388},{(void*)0,&g_13,&l_388},{&g_16[2][3][2],&g_16[2][3][2],&l_274},{&g_16[4][0][1],&g_52,(void*)0},{&g_16[0][3][0],(void*)0,&g_6},{(void*)0,(void*)0,(void*)0},{&g_13,&g_16[0][3][0],&g_6},{(void*)0,(void*)0,(void*)0}},{{(void*)0,&g_52,&l_274},{&g_16[2][1][0],&g_16[3][3][5],&l_388},{(void*)0,&g_16[3][3][5],&l_388},{(void*)0,&g_16[2][1][0],&g_16[3][3][5]},{&l_388,&g_13,&l_388},{&g_16[4][0][1],(void*)0,(void*)0},{&l_388,&g_13,&g_6},{&l_388,(void*)0,&l_388},{&g_16[2][3][2],&l_388,&g_16[3][3][5]}},{{&g_122,(void*)0,(void*)0},{&g_52,&l_388,&g_16[0][3][0]},{(void*)0,(void*)0,&g_16[3][3][5]},{(void*)0,&g_13,&g_52},{(void*)0,(void*)0,&g_52},{&g_87,&g_13,&l_274},{(void*)0,&g_16[2][1][0],&g_13},{&g_52,&g_16[3][3][5],&g_6},{(void*)0,&g_16[3][3][5],(void*)0}},{{&l_388,&g_52,&g_87},{&g_122,(void*)0,(void*)0},{&g_13,&g_16[0][3][0],&g_87},{&g_52,(void*)0,&l_388},{&g_13,(void*)0,&g_87},{&g_122,&g_52,&g_52},{&l_388,&g_16[2][3][2],&g_16[0][3][0]},{(void*)0,&g_13,&g_16[2][1][0]},{&g_52,&g_13,&g_6}},{{(void*)0,&g_13,&l_388},{&g_87,&g_52,(void*)0},{(void*)0,(void*)0,(void*)0},{&g_6,&l_388,&g_87},{&l_388,&g_16[0][1][2],&l_274},{&g_87,&l_388,(void*)0},{(void*)0,&l_388,&l_274},{&l_274,&l_274,&g_87},{&g_52,(void*)0,(void*)0}}}; uint64_t l_390 = 18446744073709551611UL; int i, j, k; for (p_54 = 0; (p_54 < 45); p_54 = safe_add_func_int64_t_s_s(p_54, 1)) { /* block id: 25 */ int32_t *l_73 = &g_6; int32_t **l_72 = &l_73; int16_t l_75 = 0x4C77L; uint16_t *l_80 = &g_81; union U0 l_113[3] = {{0x38E40FFFL},{0x38E40FFFL},{0x38E40FFFL}}; union U0 **l_115[4][7][8] = {{{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114},{(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,(void*)0},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114}},{{&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,(void*)0},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114}},{{&l_114,&l_114,(void*)0,(void*)0,&l_114,&l_114,&l_114,(void*)0},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,(void*)0},{&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114},{(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,(void*)0,(void*)0,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114}},{{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,(void*)0,&l_114},{&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,(void*)0,&l_114,&l_114},{(void*)0,&l_114,&l_114,(void*)0,&l_114,&l_114,&l_114,&l_114},{&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114,&l_114}}}; int32_t ****l_297 = (void*)0; int32_t *****l_296 = &l_297; int i, j, k; (*l_72) = func_57(func_61(func_67(g_13, ((*l_72) = &g_6), g_28[0][0][2], ((l_75 ^= (&g_16[0][2][3] != l_74)) | (safe_lshift_func_uint16_t_u_u(((*l_80) = (safe_lshift_func_uint8_t_u_s(p_54, 6))), 0)))), l_113[0], (l_114 = l_114), &g_52, &g_16[4][2][0]), g_140.f1, g_95); if (((((*l_74) , l_273) != &g_105) | (g_261 | ((*l_80) |= 0x0827L)))) { /* block id: 115 */ l_275++; for (g_136 = 0; (g_136 <= 3); g_136 += 1) { /* block id: 119 */ union U0 *l_278 = &g_140; for (g_260 = 0; (g_260 <= 0); g_260 += 1) { /* block id: 122 */ for (g_184 = 0; (g_184 <= 4); g_184 += 1) { /* block id: 125 */ int i, j; g_122 &= g_178[g_184][(g_136 + 2)]; } (**l_72) = 0x0127E57FL; } (**l_72) = 0x5BEE3EABL; for (g_184 = 1; (g_184 <= 4); g_184 += 1) { /* block id: 133 */ return l_278; } return &g_140; } if ((*l_73)) continue; } else { /* block id: 139 */ int32_t *** const l_281 = &l_72; int32_t l_315 = (-1L); int32_t l_316 = 1L; union U0 * const *l_329 = &g_157; for (g_87 = 27; (g_87 >= 26); g_87 = safe_sub_func_int32_t_s_s(g_87, 7)) { /* block id: 142 */ int32_t ****l_287[4]; int8_t *l_314[2][3] = {{&g_261,&g_261,&g_261},{(void*)0,(void*)0,(void*)0}}; int i, j; for (i = 0; i < 4; i++) l_287[i] = &l_282; l_282 = l_281; g_122 ^= 0L; for (g_123 = 0; (g_123 <= 3); g_123 += 1) { /* block id: 147 */ const uint64_t *l_288 = &g_108; g_122 = (safe_add_func_uint8_t_u_u(((((safe_rshift_func_int16_t_s_s((&g_108 != ((((&l_282 != l_287[3]) , l_73) != (void*)0) , l_288)), 8)) >= (((((safe_lshift_func_int16_t_s_u((g_16[1][4][0] | (l_274 &= ((0xD5L > 255UL) , (-2L)))), p_54)) > g_140.f3) | 0x09L) && l_291[2]) , g_28[0][0][6])) || g_178[0][2]) < (*l_74)), g_13)); } l_316 = ((p_54 | (g_108 || ((-5L) != (***l_281)))) == (safe_div_func_int8_t_s_s((l_315 = (((g_298[5][0] = l_296) != &g_299[5][0][2]) || (safe_unary_minus_func_int64_t_s((safe_rshift_func_int16_t_s_u(((safe_div_func_int16_t_s_s((safe_div_func_uint64_t_u_u(18446744073709551609UL, (((safe_unary_minus_func_uint8_t_u((safe_lshift_func_uint8_t_u_u(p_54, 6)))) , ((***l_282) != 65534UL)) | g_313))), p_54)) || (***l_282)), 9)))))), p_54))); } for (l_275 = 21; (l_275 >= 36); l_275++) { /* block id: 157 */ union U0 ***l_321 = &l_115[2][3][4]; int8_t *l_324 = &g_261; uint64_t *l_330 = &g_108; uint8_t *l_331 = &g_174; const int32_t l_339[3] = {0L,0L,0L}; int32_t l_366 = 0x66062001L; int i; if (((safe_add_func_uint8_t_u_u((((p_54 & (((*l_321) = &g_139) != &g_82)) == (safe_mul_func_int8_t_s_s(g_123, ((*l_331) = ((((*l_324) = g_87) > (((*l_330) ^= (((g_184 >= (safe_add_func_int32_t_s_s(p_54, (safe_lshift_func_uint8_t_u_u(g_28[0][0][1], (g_52 , 8UL)))))) , l_329) == (void*)0)) , (***l_281))) ^ g_13))))) , 1UL), p_54)) , (*g_302))) { /* block id: 162 */ int32_t ****l_336 = (void*)0; int32_t l_381 = 0x411BC2BFL; union U0 *l_387 = &l_113[0]; if (((((safe_sub_func_uint32_t_u_u(1UL, ((*l_73) = (*g_302)))) <= ((*l_74) <= 1L)) >= (l_336 == (void*)0)) > (((*l_80) = g_105) , (p_54 != 0x9AD6L)))) { /* block id: 165 */ const int8_t l_360 = 0x03L; int64_t *l_361 = &l_291[2]; l_366 = (safe_sub_func_uint8_t_u_u(l_339[2], (((*l_273) = ((((safe_unary_minus_func_uint8_t_u(p_54)) | (l_339[2] | (((g_140.f1 = (safe_mul_func_uint8_t_u_u((safe_lshift_func_uint16_t_u_u(65535UL, 10)), ((safe_div_func_int32_t_s_s((safe_lshift_func_uint8_t_u_u((((safe_add_func_int64_t_s_s(((*l_361) = (safe_sub_func_int8_t_s_s((p_54 | ((safe_lshift_func_uint8_t_u_s((***l_281), 5)) ^ (safe_div_func_uint32_t_u_u((+p_54), p_54)))), (safe_sub_func_int8_t_s_s(0x11L, l_360))))), g_140.f0)) < (*l_73)) | l_339[1]), g_52)), p_54)) < p_54)))) , g_362[2]) != l_364))) != p_54) & 0x2A0BCDF9D4AEB7A9LL)) , 0xF9L))); (***l_281) = (((safe_mul_func_int8_t_s_s((0x2C1CEFCD2D91674ELL & (((p_54 ^ 0x8735A37D3A5E5F65LL) <= (safe_lshift_func_uint16_t_u_u((safe_add_func_int64_t_s_s((safe_mod_func_uint32_t_u_u(((((safe_add_func_int32_t_s_s((safe_mul_func_int16_t_s_s(((*l_273) = g_6), ((void*)0 == l_80))), (0xE6L ^ ((*l_324) = (((safe_div_func_uint8_t_u_u(((*l_331) |= (l_366 = (g_108 & (-10L)))), g_108)) ^ p_54) == l_381))))) , 0x6EL) != 5UL) || g_81), 0xF7E38AD0L)), 18446744073709551615UL)), 0))) < (***g_300))), l_381)) < g_140.f3) , (**l_72)); } else { /* block id: 175 */ (***l_281) = p_54; } for (g_121 = 24; (g_121 != (-9)); --g_121) { /* block id: 180 */ int32_t *l_384 = &l_315; (*l_384) ^= (((*l_331) = (((void*)0 == &l_114) , g_140.f0)) | (*l_73)); if ((**l_72)) continue; } for (g_264 = 19; (g_264 >= 52); ++g_264) { /* block id: 187 */ (**l_281) = (**l_281); g_139 = l_387; } } else { /* block id: 191 */ return &g_140; } } } return l_114; } ++l_390; return l_114; } /* ------------------------------------------ */ /* * reads : g_140.f1 g_157 g_136 g_16 g_13 g_108 g_174 g_28 g_178 g_106 g_184 g_122 g_95 g_123 g_140.f0 g_264 * writes: g_140.f1 g_106 g_122 g_174 g_105 g_178 g_184 g_28 g_121 g_87 g_108 g_136 g_260 g_264 */ static int32_t * func_57(union U0 * p_58, int32_t p_59, int8_t p_60) { /* block id: 52 */ uint64_t l_169 = 18446744073709551608UL; int32_t l_171[8][4] = {{0xDE4CBC4FL,(-1L),3L,(-1L)},{1L,0x955F3680L,(-2L),0xDE4CBC4FL},{0x2ECF321DL,1L,(-1L),0x18B624CAL},{(-2L),1L,(-1L),(-1L)},{(-2L),(-2L),(-1L),0x628C699EL},{0x2ECF321DL,(-1L),(-2L),1L},{1L,0x94B4B0C7L,3L,(-2L)},{0xDE4CBC4FL,0x94B4B0C7L,0xDE4CBC4FL,1L}}; int32_t l_262 = 0x706BF2B0L; union U0 **l_267 = &g_139; int i, j; for (g_140.f1 = 0; (g_140.f1 >= 0); g_140.f1 -= 1) { /* block id: 55 */ int32_t *l_154 = &g_16[3][3][5]; int32_t **l_153 = &l_154; int32_t ***l_152 = &l_153; int32_t **** const l_151 = &l_152; int32_t *** const *l_156 = (void*)0; int32_t *** const **l_155 = &l_156; const uint32_t l_167 = 0UL; int16_t *l_168[3]; int32_t *l_170[7][1][7] = {{{&g_6,(void*)0,&g_13,(void*)0,&g_52,&g_16[2][2][3],&g_13}},{{&g_13,(void*)0,&g_6,(void*)0,&g_16[2][3][0],&g_13,(void*)0}},{{&g_6,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,&g_6}},{{&g_13,(void*)0,(void*)0,&g_52,(void*)0,&g_6,&g_52}},{{&g_52,(void*)0,&g_87,(void*)0,(void*)0,&g_13,(void*)0}},{{&g_6,(void*)0,(void*)0,&g_13,(void*)0,&g_13,(void*)0}},{{(void*)0,(void*)0,(void*)0,&g_13,&g_16[3][3][5],&g_13,&g_16[2][3][0]}}}; int16_t l_172 = 0x7C1AL; int32_t l_173 = 1L; int32_t l_177 = 0x2F2D7027L; int32_t l_226[7][6] = {{0x7D682C87L,0x84625BB9L,0x7D682C87L,0xE296A022L,0x7D682C87L,0x84625BB9L},{0x92F58A89L,0x84625BB9L,0x1CB4C1B8L,0x84625BB9L,0x92F58A89L,0x84625BB9L},{0x7D682C87L,0xE296A022L,0x7D682C87L,0x84625BB9L,0x7D682C87L,0xE296A022L},{0x92F58A89L,0xE296A022L,0x1CB4C1B8L,0xE296A022L,0x92F58A89L,0xE296A022L},{0x7D682C87L,0x84625BB9L,0x7D682C87L,0xE296A022L,0x7D682C87L,0x84625BB9L},{0x92F58A89L,0x84625BB9L,0x1CB4C1B8L,0x84625BB9L,0x92F58A89L,0x84625BB9L},{0x7D682C87L,0xE296A022L,0x7D682C87L,0x84625BB9L,0x7D682C87L,0xE296A022L}}; int i, j, k; for (i = 0; i < 3; i++) l_168[i] = (void*)0; g_122 = ((((safe_mod_func_int64_t_s_s((safe_mul_func_int8_t_s_s(((((safe_unary_minus_func_int16_t_s(p_60)) != p_60) > (!(safe_mod_func_int32_t_s_s(((safe_add_func_int32_t_s_s((-1L), (l_151 != ((*l_155) = &l_152)))) < (g_106 = ((((void*)0 != g_157) | ((safe_div_func_int64_t_s_s(((~(safe_mod_func_int16_t_s_s((safe_add_func_int16_t_s_s(0x51E3L, (safe_mod_func_int32_t_s_s((p_60 >= l_167), g_136)))), p_59))) ^ p_59), p_59)) , (**l_153))) , 0x7E2CL))), g_13)))) | p_60), g_140.f1)), l_169)) < g_108) && 0x99A2L) | 0x4B27L); p_59 |= 6L; --g_174; for (l_169 = 0; (l_169 <= 0); l_169 += 1) { /* block id: 63 */ int16_t l_181 = (-6L); int32_t l_246[9]; uint16_t l_270 = 2UL; int i; for (i = 0; i < 9; i++) l_246[i] = 1L; g_122 = p_60; for (g_105 = 0; (g_105 >= 0); g_105 -= 1) { /* block id: 67 */ int32_t l_182 = 0x2FECA5C7L; int32_t l_248 = (-1L); union U0 **l_269 = &g_139; int i, j, k; if (g_28[l_169][l_169][g_140.f1]) { /* block id: 68 */ int64_t l_194 = 0x35959F263723E231LL; if (p_59) break; --g_178[0][2]; if (g_106) { /* block id: 71 */ uint32_t *l_183 = &g_184; int32_t ** const *l_193[8] = {&l_153,(void*)0,&l_153,&l_153,(void*)0,&l_153,&l_153,(void*)0}; int32_t ** const **l_192 = &l_193[1]; int32_t ** const ***l_191 = &l_192; int i; g_122 = ((((*l_183)--) , p_59) < (safe_rshift_func_int8_t_s_s(((((0xD0A975BA9DFC485CLL || (0xC982L && g_178[2][0])) <= ((-1L) ^ ((void*)0 != &l_181))) || (safe_lshift_func_int8_t_s_s(p_60, (((p_60 , &l_156) != l_191) , 0x09L)))) <= 0x10L), l_194))); g_122 |= 0x356279D2L; } else { /* block id: 75 */ int64_t *l_201 = &g_28[l_169][l_169][g_140.f1]; int32_t *l_202 = &g_87; g_122 |= (((p_59 ^ (safe_sub_func_int8_t_s_s((-2L), ((((l_171[6][2] = ((safe_div_func_int16_t_s_s((((g_16[0][3][1] ^ p_59) || (0UL | (g_108 ^ p_60))) > (safe_sub_func_int64_t_s_s((-7L), ((*l_201) |= (4294967287UL == p_59))))), g_13)) == p_60)) , 0xBB9CL) < 0xC53CL) , 0x08L)))) <= 4294967295UL) || 1UL); l_202 = &l_171[6][0]; if (g_122) break; } } else { /* block id: 82 */ int64_t *l_213 = &g_28[0][0][3]; int64_t **l_212 = &l_213; uint64_t *l_227 = &g_108; int32_t l_234 = 5L; const int32_t **l_235 = (void*)0; for (g_121 = 24; (g_121 == (-27)); --g_121) { /* block id: 85 */ uint8_t l_205 = 1UL; g_87 = p_60; l_205--; (****l_155) = &l_171[0][3]; } if (((safe_div_func_int64_t_s_s((safe_div_func_int8_t_s_s((((p_59 , 0x43A824C4L) , (void*)0) != ((*l_212) = &g_28[l_169][l_169][g_140.f1])), 0x48L)), ((*l_227) ^= (safe_sub_func_uint64_t_u_u((safe_rshift_func_int16_t_s_s((-3L), 11)), (safe_sub_func_uint8_t_u_u((p_59 < ((safe_rshift_func_uint8_t_u_u(l_171[5][0], 3)) || ((safe_div_func_int16_t_s_s((((((((safe_div_func_int64_t_s_s((l_181 , p_59), l_171[0][3])) == g_16[3][3][5]) < g_106) > 1L) > 0x2BE244C0L) , g_28[l_169][l_169][g_140.f1]) , p_59), l_226[2][4])) & 0x1540L))), g_95))))))) ^ l_181)) { /* block id: 92 */ uint32_t *l_231 = &g_136; uint8_t *l_245[1][10] = {{&g_174,(void*)0,(void*)0,&g_174,&g_174,&g_174,(void*)0,(void*)0,&g_174,&g_174}}; int32_t l_247[2][1]; int64_t *l_259 = &g_260; int i, j; for (i = 0; i < 2; i++) { for (j = 0; j < 1; j++) l_247[i][j] = 0xB302BC30L; } l_234 ^= ((safe_add_func_uint64_t_u_u(1UL, (+p_60))) || ((*l_231)++)); if (g_123) break; l_182 |= (g_28[0][0][2] <= ((*l_259) = ((p_60 > 0x55AC83A6L) | ((((l_235 != (void*)0) , ((*l_231) |= (safe_mul_func_uint8_t_u_u((!(safe_rshift_func_uint8_t_u_s(((+(g_140.f0 >= (((~(safe_sub_func_uint16_t_u_u(((--g_174) , (0xC1D7FB45L != l_234)), (safe_div_func_uint64_t_u_u((safe_unary_minus_func_int64_t_s((safe_rshift_func_int8_t_s_u((~(safe_mod_func_uint64_t_u_u(((g_123 > 0x87L) & 0x017EL), 1UL))), 6)))), p_59))))) ^ l_246[0]) | g_28[0][0][6]))) , l_247[1][0]), 0))), (*l_154))))) && g_136) <= l_247[1][0])))); ++g_264; } else { /* block id: 101 */ union U0 ***l_268 = &l_267; g_87 = (((*l_268) = l_267) == (((void*)0 != l_269) , l_269)); if (p_59) continue; l_270++; (***l_156) = &g_13; } } } } } return &g_87; } /* ------------------------------------------ */ /* * reads : g_123 g_13 g_87 g_16 g_105 g_139 g_6 g_52 * writes: g_123 g_136 g_108 g_122 */ static union U0 * func_61(int32_t * p_62, union U0 p_63, union U0 * p_64, int32_t * const p_65, int32_t * p_66) { /* block id: 41 */ int32_t *l_118 = &g_87; int32_t **l_117 = &l_118; int32_t ***l_116 = &l_117; int32_t ****l_119 = &l_116; int32_t *l_120[10] = {&g_16[3][3][5],&g_16[0][4][4],&g_16[3][3][5],&g_16[0][4][4],&g_16[3][3][5],&g_16[0][4][4],&g_16[3][3][5],&g_16[0][4][4],&g_16[3][3][5],&g_16[0][4][4]}; int i; (*l_119) = l_116; g_123++; for (p_63.f1 = 0; (p_63.f1 <= 16); p_63.f1 = safe_add_func_uint16_t_u_u(p_63.f1, 1)) { /* block id: 46 */ uint32_t *l_135[4]; int32_t l_137 = 0xAC8DB39BL; uint64_t *l_138 = &g_108; int i; for (i = 0; i < 4; i++) l_135[i] = &g_136; g_122 = ((safe_lshift_func_uint16_t_u_s((((safe_add_func_uint16_t_u_u(g_13, (**l_117))) >= (+p_63.f2)) , g_16[3][3][5]), 8)) > (safe_div_func_uint64_t_u_u((p_63.f0 <= ((*l_138) = ((g_136 = ((*p_66) > g_105)) , l_137))), p_63.f1))); } return g_139; } /* ------------------------------------------ */ /* * reads : g_82 g_108 g_28 * writes: g_82 g_108 g_87 */ static int32_t * func_67(uint64_t p_68, int32_t * p_69, uint8_t p_70, uint32_t p_71) { /* block id: 29 */ volatile union U0 **l_83 = &g_82; int32_t *l_84 = (void*)0; int32_t *l_85 = (void*)0; int32_t *l_86 = &g_87; int32_t *l_88 = &g_87; int32_t l_89 = 0xFDA5E0CFL; int32_t l_90 = (-1L); int32_t *l_91 = &g_87; int32_t *l_92 = &g_87; int32_t *l_93 = &l_90; int32_t l_94[6][2][8] = {{{0xD830BE99L,(-4L),0x690C290AL,(-4L),0xD830BE99L,(-1L),0xD830BE99L,(-4L)},{(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L),(-9L),(-4L)}},{{0xD830BE99L,(-3L),(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L)},{0xD830BE99L,(-4L),0x690C290AL,(-4L),0xD830BE99L,(-1L),0xD830BE99L,(-4L)}},{{(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L),(-9L),(-4L)},{0xD830BE99L,(-3L),(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L)}},{{0xD830BE99L,(-4L),0x690C290AL,(-4L),0xD830BE99L,(-1L),0xD830BE99L,(-4L)},{(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L),(-9L),(-4L)}},{{0xD830BE99L,(-3L),(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L)},{0xD830BE99L,(-4L),0x690C290AL,(-4L),0xD830BE99L,(-1L),0xD830BE99L,(-4L)}},{{(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L),(-9L),(-4L)},{0xD830BE99L,(-3L),(-9L),(-4L),(-9L),(-3L),0xD830BE99L,(-3L)}}}; int32_t *l_96 = &l_90; int32_t *l_97 = &l_90; int32_t *l_98 = &l_94[2][0][0]; int32_t *l_99 = &l_94[0][0][3]; int32_t *l_100 = (void*)0; int32_t *l_101 = (void*)0; int32_t *l_102 = (void*)0; int32_t *l_103 = &g_87; int32_t *l_104[4] = {(void*)0,(void*)0,(void*)0,(void*)0}; int8_t l_107 = 1L; int i, j, k; (*l_83) = g_82; --g_108; if (((safe_mod_func_uint16_t_u_u(0x0664L, 0xEE18L)) , (g_87 = g_28[1][0][3]))) { /* block id: 33 */ (*l_92) = ((*l_93) = (-1L)); } else { /* block id: 36 */ return &g_52; } return &g_6; } /* ---------------------------------------- */ int main (int argc, char* argv[]) { int i, j, k; 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_3, "g_3", print_hash_value); for (i = 0; i < 10; i++) { transparent_crc(g_4[i], "g_4[i]", print_hash_value); if (print_hash_value) printf("index = [%d]\n", i); } transparent_crc(g_5, "g_5", print_hash_value); transparent_crc(g_6, "g_6", print_hash_value); transparent_crc(g_9, "g_9", print_hash_value); transparent_crc(g_10, "g_10", print_hash_value); transparent_crc(g_11, "g_11", print_hash_value); transparent_crc(g_12, "g_12", print_hash_value); transparent_crc(g_13, "g_13", print_hash_value); for (i = 0; i < 5; i++) { for (j = 0; j < 5; j++) { for (k = 0; k < 8; k++) { transparent_crc(g_16[i][j][k], "g_16[i][j][k]", print_hash_value); if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); } } } for (i = 0; i < 2; i++) { for (j = 0; j < 1; j++) { for (k = 0; k < 7; k++) { transparent_crc(g_28[i][j][k], "g_28[i][j][k]", print_hash_value); if (print_hash_value) printf("index = [%d][%d][%d]\n", i, j, k); } } } transparent_crc(g_52, "g_52", print_hash_value); transparent_crc(g_81, "g_81", print_hash_value); transparent_crc(g_87, "g_87", print_hash_value); transparent_crc(g_95, "g_95", print_hash_value); transparent_crc(g_105, "g_105", print_hash_value); transparent_crc(g_106, "g_106", print_hash_value); transparent_crc(g_108, "g_108", print_hash_value); transparent_crc(g_121, "g_121", print_hash_value); transparent_crc(g_122, "g_122", print_hash_value); transparent_crc(g_123, "g_123", print_hash_value); transparent_crc(g_136, "g_136", print_hash_value); transparent_crc(g_140.f3, "g_140.f3", print_hash_value); transparent_crc(g_174, "g_174", print_hash_value); for (i = 0; i < 5; i++) { for (j = 0; j < 6; j++) { transparent_crc(g_178[i][j], "g_178[i][j]", print_hash_value); if (print_hash_value) printf("index = [%d][%d]\n", i, j); } } transparent_crc(g_184, "g_184", print_hash_value); transparent_crc(g_260, "g_260", print_hash_value); transparent_crc(g_261, "g_261", print_hash_value); transparent_crc(g_263, "g_263", print_hash_value); transparent_crc(g_264, "g_264", print_hash_value); transparent_crc(g_313, "g_313", print_hash_value); transparent_crc(g_438, "g_438", print_hash_value); transparent_crc(g_590, "g_590", print_hash_value); transparent_crc(g_876, "g_876", print_hash_value); transparent_crc(g_962, "g_962", print_hash_value); transparent_crc(g_963, "g_963", print_hash_value); for (i = 0; i < 7; i++) { transparent_crc(g_964[i], "g_964[i]", print_hash_value); if (print_hash_value) printf("index = [%d]\n", i); } transparent_crc(g_973, "g_973", print_hash_value); transparent_crc(g_1156, "g_1156", print_hash_value); transparent_crc(g_1270, "g_1270", print_hash_value); transparent_crc(g_1445, "g_1445", print_hash_value); transparent_crc(g_1494, "g_1494", print_hash_value); for (i = 0; i < 2; i++) { transparent_crc(g_1532[i], "g_1532[i]", print_hash_value); if (print_hash_value) printf("index = [%d]\n", i); } transparent_crc(g_1598, "g_1598", print_hash_value); platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); return 0; } /************************ statistics ************************* XXX max struct depth: 0 breakdown: depth: 0, occurrence: 486 XXX total union variables: 10 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: 47 breakdown: depth: 1, occurrence: 345 depth: 2, occurrence: 92 depth: 3, occurrence: 1 depth: 4, occurrence: 4 depth: 5, occurrence: 7 depth: 6, occurrence: 3 depth: 7, occurrence: 3 depth: 9, occurrence: 1 depth: 10, occurrence: 2 depth: 11, occurrence: 1 depth: 12, occurrence: 3 depth: 13, occurrence: 1 depth: 14, occurrence: 2 depth: 15, occurrence: 3 depth: 16, occurrence: 3 depth: 17, occurrence: 2 depth: 18, occurrence: 2 depth: 19, occurrence: 4 depth: 20, occurrence: 3 depth: 21, occurrence: 3 depth: 22, occurrence: 2 depth: 23, occurrence: 5 depth: 25, occurrence: 7 depth: 26, occurrence: 5 depth: 27, occurrence: 2 depth: 28, occurrence: 1 depth: 29, occurrence: 2 depth: 30, occurrence: 4 depth: 32, occurrence: 1 depth: 35, occurrence: 1 depth: 38, occurrence: 1 depth: 45, occurrence: 1 depth: 46, occurrence: 1 depth: 47, occurrence: 1 XXX total number of pointers: 384 XXX times a variable address is taken: 1241 XXX times a pointer is dereferenced on RHS: 157 breakdown: depth: 1, occurrence: 114 depth: 2, occurrence: 21 depth: 3, occurrence: 18 depth: 4, occurrence: 4 XXX times a pointer is dereferenced on LHS: 211 breakdown: depth: 1, occurrence: 177 depth: 2, occurrence: 18 depth: 3, occurrence: 9 depth: 4, occurrence: 6 depth: 5, occurrence: 1 XXX times a pointer is compared with null: 37 XXX times a pointer is compared with address of another variable: 10 XXX times a pointer is compared with another pointer: 8 XXX times a pointer is qualified to be dereferenced: 7548 XXX max dereference level: 5 breakdown: level: 0, occurrence: 0 level: 1, occurrence: 1068 level: 2, occurrence: 300 level: 3, occurrence: 243 level: 4, occurrence: 112 level: 5, occurrence: 116 XXX number of pointers point to pointers: 153 XXX number of pointers point to scalars: 216 XXX number of pointers point to structs: 0 XXX percent of pointers has null in alias set: 29.7 XXX average alias set size: 1.61 XXX times a non-volatile is read: 1457 XXX times a non-volatile is write: 792 XXX times a volatile is read: 32 XXX times read thru a pointer: 2 XXX times a volatile is write: 6 XXX times written thru a pointer: 0 XXX times a volatile is available for access: 883 XXX percentage of non-volatile access: 98.3 XXX forward jumps: 0 XXX backward jumps: 4 XXX stmts: 350 XXX max block depth: 5 breakdown: depth: 0, occurrence: 27 depth: 1, occurrence: 26 depth: 2, occurrence: 41 depth: 3, occurrence: 55 depth: 4, occurrence: 82 depth: 5, occurrence: 119 XXX percentage a fresh-made variable is used: 15.5 XXX percentage an existing variable is used: 84.5 ********************* end of statistics **********************/
242d1a3f67f9e8029b91d55180f914538bf4c90d
a49ae1a0693b4a9e388236d2176950a28a36ed43
/Algo/print.c
c2813f6b81a1857716b89179cce1d8a44aeb1eb7
[]
no_license
SRKHALED/Data-structures-Algorithms
c789913d129b9292d503dd1012e677619bc22bf2
de661175841811891714843f336d95b33682ba25
refs/heads/master
2021-02-14T20:21:32.153540
2020-03-04T07:10:45
2020-03-04T07:10:45
244,831,805
0
0
null
null
null
null
UTF-8
C
false
false
175
c
print.c
#include<stdio.h> int main() { printf("#include<stdio.h>\nint main()\n{\n\tprintf(\"This code is perfectly aligned.\\n\");\n\tprintf(\"Thank you.\");\n\treturn 0;\n}"); }
635360cf7cccc6da99b5f5465a9fab43d7501477
3a5bfcd7b6050c45ff6540d4ef341888cfc9b76e
/ezflash/bsp_cfg.h
6b5609d6a23e5aeaec86d40f9d29ac9c6e95cb2a
[]
no_license
Bryan82731/GPIO_FW
7320f48b8ca03c9c981cef86e887abb27fe08065
cdfaa00d72ed6c266d80d8318bb3aa92884a4762
refs/heads/master
2021-09-08T09:17:44.146669
2018-03-09T18:34:43
2018-03-09T18:34:43
124,478,298
0
0
null
null
null
null
UTF-8
C
false
false
2,465
h
bsp_cfg.h
/* * Realtek Semiconductor Corp. * * Board Support Package header file * * Viller Hsiao (villerhsiao@realtek.com.tw) * Jan. 02, 2008 */ #ifndef _BSP_CFG_H_ #define _BSP_CFG_H_ /* ******************************************************************************* * Address mapping of BSP registers ******************************************************************************* */ #define WRSIZE 64 #define NUMLOOP 2048 #define DMEMSIZE 131072 //WRSIZE * NUMLOOP = 128 Kbytes #define BSP_DCACHE_LINE_SIZE 4 /* IMEM & DMEM Configuration */ #define DMEM_BASE 0x00100000 #define DMEM_TOP (DMEM_BASE+0x0001FFFF) #define DMEM_ON 0x00000400 #define DMEM_V_BASE 0x80100000 #define DMEM_V_TOP 0x80120000 #define TLSdescStartAddr 0x80100100 #define TLS_BASE_ADDR 0xB6000000 #define TLS_DESC 0x00 #define TLS_POLL 0x04 #define TLS_IMR 0x05 #define TLS_STATUS 0x06 //#define BSP_TIMER_FREQ 31250000 #define BSP_TIMER_FREQ 61500000 #define IMEM_BASE 0x00000000 #define IMEM_TOP 0x0003FFFF #define REFILL_BASE 0x00400000 #define REFILL_TOP 0x0043FFFF #define DUMMY_BASE 0xFF600000 #define DUMMY_TOP 0x0063FFFF /* Flash Controller */ #define FLASH_BASE_ADDR 0xB4000000 #define FLASH_CTRLR0 0x00 #define FLASH_NDF 0x04 #define FLASH_SSIENR 0x08 #define FLASH_RXFTLR 0x1C #define FLASH_SR 0x28 #define FLASH_IMR 0x2C #define FLASH_ISR 0x30 #define FLASH_DR 0x60 #define FLASH_INT_TXEIS 0x01 #define FLASH_INT_TXOIS 0x02 #define FLASH_INT_RXUIS 0x04 #define FLASH_INT_RXOIS 0x08 #define FLASH_INT_RXFIS 0x10 #define FLASH_INT_MSTIS 0x20 #define FLASH_READ_COM 0x03 #define FLASH_FAST_READ_COM 0x0B #define FLASH_SE_COM 0x20 #define FLASH_BE_COM 0xD8 #define FLASH_CE_COM 0xC7 #define FLASH_WREN_COM 0x06 #define FLASH_WRDI_COM 0x04 #define FLASH_RDSR_COM 0x05 #define FLASH_WRSR_COM 0x01 #define FLASH_RDID_COM 0x9F #define FLASH_REMS_COM 0x90 #define FLASH_RES_COM 0xAB #define FLASH_PP_COM 0x02 #define FLASH_DP_COM 0xB9 #define FLASH_SE_PROTECT 0x36 #define FLASH_SE_UNPROTECT 0x39 #define SECTOR FLASH_SEC_ERA_COM #define BLOCK FLASH_BLK_ERA_COM #endif
174479de66ab9ce8768eedc1ef3ec1964158bc7a
aec180fae02daddcd603fa0ca9a167917e035f0e
/EXPERT.H
8fceb1cb65f34cba31495cd015149959538c9c96
[]
no_license
digitalbricklayer/expert-cl
4bb36aececac9630122e3f169df1f8c2de494490
2069efb28c3949b3397da792525b89a0949396ff
refs/heads/master
2021-01-10T19:16:55.374689
2013-04-08T14:36:25
2013-04-08T14:36:25
null
0
0
null
null
null
null
UTF-8
C
false
false
5,634
h
EXPERT.H
/* global definitions for expert system shell */ #include <stdio.h> #include <string.h> #define TRUE 1 #define FALSE 0 #define RULE_NUM 85 /* max number of rules in the rule base */ #define ID_LENGTH 50 /* identifier length */ #define VAL_LENGTH 50 /* value length */ #define MAX_COND 3 /* maximum number of conditions per rule */ #define MAX_CONS 1 /* maximum number of conclusions per rule */ #define SIZE_OF_DB 40 /* size of data base */ #define MAXLINE 80 #define MAX 20 #define FAIL -1 #define NULLED -1 #define MAX_VALUES 5 #define MAX_QUESTIONS 50 #define STACK_SIZE 15 #define NOT_QUITE -1 #define NO 0 #define YES 1 #define LINE 80 #define EMPTY 0 /* Error message definitions */ #define FILE_NOT_FOUND 0 #define NO_FILE_SPECIFIED_ON_C_L 1 #define TOO_MANY_RULES 2 #define TOO_MANY_CONDITIONS 3 #define TOO_MANY_CONSEQUENCES 4 #define NO_SPACE_ON_D_B 5 #define NO_SPACE_ON_Q_B 6 #define NO_MORE_STACK_SPACE 7 #define BAD_TOKEN 8 #define VALUE_TOO_BIG 9 #define IDENTIFIER_TOO_BIG 10 struct value { char value[VAL_LENGTH]; }; struct id { char id[ID_LENGTH]; struct value value_list[MAX_VALUES]; char text[LINE]; int q_base_flag; }; struct stck { char id[ID_LENGTH]; char val[VAL_LENGTH]; }; struct db_item { int question_flag; struct stck single; }; struct sgle { char id[ID_LENGTH]; char val[VAL_LENGTH]; int condition_flag; }; struct rule { int cond_num; int fire_flag; struct sgle cond[MAX_COND]; struct sgle cons[MAX_CONS]; int try_flag; int live_flag; }; /************************* global prototypes ****************************/ /************************************************************************/ void garbage_collect(void); void reset_agenda_and_database(void); int its_empty(char string[]); char *get_id_from_agenda(void); char *get_value_form_agenda(void); void push(char id[], char val[]); void pop(void); int agenda_is_empty(void); void reset_agenda(void); void get_and_check_goal(void); int set_db_question_flag(int num, int flag); int get_db_question_flag(int num); int set_db_id(int num, char id[]); char *get_db_id(int num); int set_db_val(int num, char val[]); char *get_db_val(int num); void reset_database(void); void fire(int i); void handle_error(int error_num); void forward(void); int find_db_num(void); void do_explanation(void); /* top level function for WHY */ void parse_file(char filename[]); int set_qb_id(int question_num, char id[]); char *get_qb_id(int question_num); int set_qb_text(int question_num, char text[]); char *get_qb_text(int question_num); int set_qb_q_base_flag(int question_num, int flag); int get_qb_q_base_flag(int question_flag); int set_qb_value(int question_num, int value_num, char value[]); char *get_qb_value(int question_num, int value_num); int set_temp_value(int value_num, char value[]); char *get_temp_value(int value_num); void do_question_forward(int choice); void do_question_backward(int choice); void put_questions_into_q_base(void); int id_on_q_base(char identifier[]); int its_a_question(char identifier[]); void add_id_to_q_base(char identifier[]); void get_all_values(void); void load_values(char identifier[]); void put_into_temp(char value[]); void copy_temp_struct(char identifier[]); int find_subscript_of_id_slot(char identifier[]); void copy_temp(int subscript); void reset_temp(void); void get_question_text(char filename[]); char *strip_postfix(char filename[]); char *get_next_word(FILE *fp); void load_text(FILE *fp); int find_sub(char id[]); char *get_next_line(FILE *fp); void strip_carriage_return(char line[]); int set_rb_cond_num(int rule_num, int num); int get_rb_cond_num(int rule_num); int set_rb_fire_flag(int rule_num, int flag); int get_rb_fire_flag(int rule_num); int set_rb_cond_id(int rule_num, int cond_num, char id[]); char *get_rb_cond_id(int rule_num, int cond_num); int set_rb_cond_val(int rule_num, int cond_num, char val[]); char *get_rb_cond_val(int rule_num, int cond_num); int set_rb_cons_id(int rule_num, int cons_num, char id[]); char *get_rb_cons_id(int rule_num, int cons_num); int set_rb_cons_val(int rule_num, int cons_num, char val[]); char *get_rb_cons_val(int rule_num, int cons_num); int set_rb_condition_flag(int rule_num, int cond_num, int flag); int get_rb_condition_flag(int rule_num, int cond_num); int set_rb_try_flag(int rule_num, int flag); int get_rb_try_flag(int rule_num); int set_rb_live_flag(int rule_num, int flag); int get_rb_live_flag(int rule_num); void do_reset_menu(void); void main_menu(void); void do_quest_menu(void); void print_rules(void); void show_rule_without_status(int num); char *get_value(char string[]); void examine_d_base(void); void print_results(void); void print_cons(int i); int value_exists(char id[], char value[]); void set_dead_rule(int rule); void mark_rule_as_dead(int rule, char id[], char value[]); int db_holds_goal(char id[], char value[]); int find_rule(char id[], char value[]); int prove_rule(int rule); void put_cond_on_agenda(int rule); int get_rule(char id[], char value[]); int try_to_disprove_rule(int rule); int value_exist(char id[], char value[]); void mark_rule_as_dead(int rule, char id[], char value[]); int db_holds_goal(char id[], char value[]); int find_rule(char id[], char value[]); int prove_rule(int rule); void put_cond_on_agenda(int rule); void backward(void); void set_live_rule(int rule, int flag); void reset_live_rule(void); void reset_db_item(int i); char *get_value_from_agenda(void); void destroy_previous_value(char string[]); void load_db(int flag, char string1[], char string2[]);
b7d41bacf7d6686e8d282e7fb284af8484f43a91
8c6cc37eb814c9430bd46c46be84ab16862010c1
/src/drvMch.h
f432d337b5ca9beb2e4c712344299b8103223212
[]
no_license
icshwi/ipmiComm
2494790533e27dfbc30f9242856b8029b66743fe
d586f6663c4b9d671c84bc9d7d2928e2363a3376
refs/heads/master
2022-12-16T14:57:33.401297
2020-09-28T19:02:44
2020-09-28T19:02:44
108,833,705
0
2
null
2019-11-29T12:27:00
2017-10-30T10:10:54
C
UTF-8
C
false
false
13,022
h
drvMch.h
#ifndef DRV_MCH_H #define DRV_MCH_H #include <epicsThread.h> #include <devMch.h> #include <ipmiDef.h> #define MAX_FRU 255 // 0xFF reserved, according to IPMI 2.0 spec #define MAX_MGMT 32 // management controller device, arbitrary limit, may need adjusting #define MAX_FRU_MGMT MAX_FRU + MAX_MGMT #define MAX_MCH 255 #define MAX_SENS_INST 32 /* Max instances of one sensor type on one FRU or Management Controller entity */ extern const void *mchCbRegistryId; extern uint32_t mchStat[MAX_MCH]; /* Sensor scan period [seconds] */ extern volatile uint8_t mchSensorScanPeriod; extern epicsMutexId mchStatMtx[MAX_MCH]; /* Used for sensor scanning; one list per MCH */ IOSCANPVT drvSensorScan[MAX_MCH]; /* Vadatech typically sends 2 replies; NAT sends 1 */ #define RPLY_TIMEOUT_SENDMSG_RPLY 0.50 #define RPLY_TIMEOUT_DEFAULT 0.25 /* Mask of MCH status * INIT uses 2 lowest bits: * must AND stat with MCH_MASK_INIT and * then test for value, for example: * if ( (mchStat & MCH_MASK_INIT) == MCH_MASK_INIT_DONE ) * Similarly for DBG */ #define MCH_MASK_INIT (0x3) #define MCH_MASK_INIT_NOT_DONE 0 #define MCH_MASK_INIT_IN_PROGRESS 1 #define MCH_MASK_INIT_DONE 2 #define MCH_MASK_INIT_FAILED 3 #define MCH_MASK_ONLN (1<<2) /* 1 = MCH responds to pings */ #define MCH_MASK_CNFG_CHK (1<<3) /* 1 = time to check config up-to-date */ #define MCH_MASK_DBG (0x30) #define MCH_INIT_DONE(x) ((x & MCH_MASK_INIT) == MCH_MASK_INIT_DONE) #define MCH_INIT_NOT_DONE(x) ((x & MCH_MASK_INIT) == MCH_MASK_INIT_NOT_DONE) #define MCH_ONLN(x) ((x & MCH_MASK_ONLN) >> 2) #define MCH_CNFG_CHK(x) ((x & MCH_MASK_CNFG_CHK) >> 3) #define MCH_DBG(x) ((x & MCH_MASK_DBG) >> 4) #define MCH_DBG_SET(x) (x<<4) /* Select debug bits in mask */ #define MCH_DBG_OFF 0 #define MCH_DBG_LOW 1 #define MCH_DBG_MED 2 #define MCH_DBG_HIGH 3 #ifdef __cplusplus extern "C" { #endif typedef struct MchCbRec_ MchCbRec; typedef struct EntAssocRec_ { SdrEntAssocRec sdr; } EntAssocRec, *EntAssoc; typedef struct DevEntAssocRec_ { SdrDevEntAssocRec sdr; uint8_t ownerAddr; /* Slave address of owner */ uint8_t ownerChan; /* Channel of owner */ } DevEntAssocRec, *DevEntAssoc; /* Data structure to uniquely identify an entity */ typedef struct EntityRec_ { uint8_t entityId; uint8_t entityInst; /* Following only used for device-relative entities */ uint8_t addr; /* For device-relative, this is set to the owner's address if the container address is not defined in the entity assoc record */ uint8_t chan; /* For device-relative, this is set to the owner's chan if the container chan is not defined in the entity assoc record */ } EntityRec, *Entity; /* Handle for each Management Controller Device * Management controllers that also provide FRU data will * additionally have an associated FRU data structure */ typedef struct MgmtRec_ { uint8_t instance; /* Instance of management controller set in drvMch.c - needed? */ SdrMgmtRec sdr; SdrRepRec sdrRep; EntityRec *entity; /* Array of associated entities that should be considered subsets of this management controller */ int entityAlloc; /* Flag indicating entity array memory has been allocated and can be freed during configuration update*/ int entityCount; /* Count of entities contained by this management controller */ } MgmtRec, *Mgmt; /* Handle for each FRU and Management Controller that provides FRU data */ typedef struct FruRec_ { uint8_t id; /* FRU ID: for MicroTCA matches FRU index and defined by MicroTCA spec; * for ATCA set to chosen values to identify associated hardware*/ uint8_t type; /* FRU type */ uint8_t instance; /* Instance of this FRU type, set in drvMch.c - still in use? */ uint8_t size[2]; /* FRU Inventory Area size, LS byte stored first */ uint8_t access; /* Access FRU data by words or bytes */ uint8_t readOffset[2]; uint16_t read; /* Read number */ FruChassisRec chassis; FruBoardRec board; FruProdRec prod; SdrFruRec sdr; char parm[10]; /* Describes FRU type, used to load EPICS records */ uint8_t pwrDyn; /* 1 if FRU supports dynamic reconfiguration of power, otherwise 0 */ uint8_t pwrDly; /* Delay to stable power */ /* Next section used only by cooling unit FRUs */ uint8_t fanMin; /* Fan minimum level */ uint8_t fanMax; /* Fan maximum level */ uint8_t fanNom; /* Fan nominal level */ uint8_t fanProp; /* [7] 1 if fan try supports automatic fan speed adjustment */ int mgmtIndex; /* If associated with management controller, index into Mgmt array; else -1 */ EntityRec *entity; /* Array of associated entities that should be considered subsets of this FRU */ int entityAlloc; /* Flag indicating entity array memory has been allocated and can be freed during configuration update*/ int entityCount; /* Count of entities contained by this FRU */ /* Next section used only for PICMG systems */ uint8_t siteNumber; /* Maps to physical location, slot number */ uint8_t siteType; /* Maps to physical location, slot number */ } FruRec, *Fru; /* Handle for each SDR */ typedef struct SensorRec_ { SdrFullRec sdr; /* Full Sensor SDR */ uint8_t val; /* Most recent sensor reading */ int fruId; /* FRU ID for associated FRU ( -1 if no associated FRU ) */ int fruIndex; /* Index into FRU array for associated FRU ( -1 if no associated FRU ) */ int mgmtIndex; /* Index into Mgmt array for associated Management Controller ( -1 if no associated MGMT ) */ uint8_t instance; /* Instance of this sensor type on this entity (usually a FRU) */ int unavail; /* 1 if sensor reading returns 'Requested Sensor, data, or record not present' */ char parm[10]; /* Describes signal type, used by device support */ size_t readMsgLength;/* Get Sensor Reading message response length */ int cnfg; /* 0 if needs record fields need to be updated */ uint8_t tmask; /* Mask of which thresholds are readable */ uint8_t tlnc; /* Threshold lower non-critical */ uint8_t tlc; /* Threshold lower critical */ uint8_t tlnr; /* Threshold lower non-recoverable */ uint8_t tunc; /* Threshold upper non-critical */ uint8_t tuc; /* Threshold upper critical */ uint8_t tunr; /* Threshold upper non-recoverable */ } SensorRec, *Sensor; /* Struct for MCH session information */ typedef struct MchSessRec_ { char name[MAX_NAME_LENGTH]; /* MCH port name used by asyn */ int instance; /* MCH instance number; assigned at init */ epicsThreadId pingThreadId; /* Thread ID for task that periodically pings MCH */ double timeout; /* Asyn read timeout */ int session; /* Enable session with MCH */ int err; /* Count of sequential message errors */ int type; /* MCH vendor, Vadatech, NAT, etc. - need to clean this up, perhaps merge with vendor and/or add 'features' */ } MchSessRec, *MchSess; /* Struct for MCH system information */ typedef struct MchSysRec_ { char name[MAX_NAME_LENGTH]; /* MCH port name used by asyn */ SdrRepRec sdrRep; uint32_t sdrCount; uint8_t fruCount; /* FRU device count */ size_t fruCountMax; /* Max number of supported FRUs. Architecture-dependent. Implemented to reduce memory usage */ size_t mgmtCountMax; /* Max number of supported MGMTs. Architecture-dependent. Implemented to reduce memory usage */ size_t sensCountMax; /* Max number of supported sensors. Architecture-dependent. Implemented to reduce memory usage */ FruRec *fru; /* Array of FRUs (size of MAX_FRU) */ int fruLkup[MAX_FRU_MGMT];/* Element values of fruLkup are indices into data arrays for FRUs (and Management Controllers that provide FRU data) * Indices of fruLkup are 'ids' of FRU/MGMT, which may be chosen arbitrarily for each platform * in order to provide consistent IDs in device support addresses * 0-MAX_FRU used for FRUs, higher indices used for Management Controllers; * value of -1 if not used */ int sensLkup[MAX_FRU_MGMT][MAX_SENSOR_TYPE][MAX_SENS_INST]; /* Index into sens struct array, used by devsup, -1 if not used */ /* First index is FRU index (not FRU ID) */ uint32_t sensCount; /* Sensor count, data type must be larger than MAX_FRU_MGMT*MAX_SENSOR_TYPE*MAX_SENS_INST */ SensorRec *sens; /* Array of sensors (size of sensCount) */ int sensAlloc; /* Flag indicating sensor array memory has been allocated and can be freed during configuration update*/ uint8_t mgmtCount; /* Management controller device count */ MgmtRec *mgmt; /* Array of management controller devices (size of mgmtCount) */ MchCbRec *mchcb; /* Callbacks for architecture-specific functionality */ EntAssocRec entAssoc[10]; int entAssocCount; DevEntAssocRec devEntAssoc[10]; int devEntAssocCount; } MchSysRec, *MchSys; /* Struct for MCH system information */ typedef struct MchDataRec_ { IpmiSess ipmiSess; /* IPMI session information; defined in ipmiDef.h */ MchSess mchSess; /* Additional MCH session info */ MchSys mchSys; /* MCH system info */ } MchDataRec, *MchData; /*extern MchSys mchSysData[MAX_MCH];*/ int mchCnfgChk(MchData mchData); void mchStatSet(int inst, uint32_t clear, uint32_t set); int mchNewSession(MchSess mchSess, IpmiSess ipmiSess); int mchGetSensorReadingStat(MchData mchData, uint8_t *response, Sensor sens); int mchGetFruIdFromIndex(MchData mchData, int index); #define IPMI_RPLY_CLOSE_SESSION_LENGTH_VT 22 /* IPMI device types */ #define MCH_TYPE_MAX 10 /* Number possible MCH types; increase as needed */ #define MCH_TYPE_UNKNOWN 0 #define MCH_TYPE_VT 1 #define MCH_TYPE_NAT 2 #define MCH_TYPE_SUPERMICRO 3 #define MCH_TYPE_PENTAIR 4 #define MCH_TYPE_ARTESYN 5 #define MCH_TYPE_ADVANTECH 6 #define MCH_IS_VT(x) (x == MCH_TYPE_VT) #define MCH_IS_NAT(x) (x == MCH_TYPE_NAT) #define MCH_IS_SUPERMICRO(x) (x == MCH_TYPE_SUPERMICRO) #define MCH_IS_ADVANTECH(x) (x == MCH_TYPE_ADVANTECH) #define MCH_IS_MICROTCA(x) ((x==MCH_TYPE_NAT)||(x==MCH_TYPE_VT)) #define MCH_IS_ATCA(x) ((x==MCH_TYPE_PENTAIR) || (x==MCH_TYPE_ARTESYN)) #define MCH_IS_PICMG(x) (MCH_IS_MICROTCA(x) || MCH_IS_ATCA(x)) /* Dell not yet supported #define MCH_TYPE_DELL #define MCH_IS_DELL(x) (x == MCH_TYPE_DELL) #define MCH_MANUF_ID_DELL 0x02A2 #define MCH_PROD_ID_DELL 0x0100 */ #define MCH_DESC_MAX_LENGTH 40 extern char mchDescString[MCH_TYPE_MAX][MCH_DESC_MAX_LENGTH]; /* Defined in drvMch.c */ /* Manufacturer ID */ #define MCH_MANUF_ID_VT 0x5D32 #define MCH_MANUF_ID_NAT 0x6C78 #define MCH_MANUF_ID_SUPERMICRO 0x2A7C /* Supermicro PC */ #define MCH_MANUF_ID_PENTAIR 0x400A /* Formerly Pigeon Point; ATCA system */ #define MCH_MANUF_ID_ARTESYN 0x65CD /* Formerly Emerson; ATCA system */ #define MCH_MANUF_ID_ADVANTECH 0x2839 /* Advantech PC */ /* Vadatech */ #define VT_ENTITY_ID_MCH 0xC2 #define VT_ENTITY_ID_AMC 0xC1 #define VT_ENTITY_ID_CU 0x1E #define VT_ENTITY_ID_PM 0x0A #define VT_ENTITY_ID_RTM 0xC0 /* asked Vivek to verify */ extern const void *mchCbRegistryId; struct MchCbRec_ { void (*assign_sys_sizes) (MchData mchData); void (*assign_site_info) (MchData mchData); void (*assign_fru_lkup) (MchData mchData); int (*fru_data_suppl) (MchData mchData, int index); void (*sensor_get_fru) (MchData mchData, Sensor sens); int (*get_chassis_status) (MchData mchData, uint8_t *data); /* Following are PICMG only */ int (*set_fru_act) (MchData mchData, uint8_t *data, uint8_t fruIndex, uint8_t parm); int (*get_fan_prop) (MchData mchData, uint8_t *data, uint8_t fruIndex); int (*get_fan_level) (MchData mchData, uint8_t *data, uint8_t fruIndex, uint8_t *level); int (*set_fan_level) (MchData mchData, uint8_t *data, uint8_t fruIndex, uint8_t level); int (*get_power_level) (MchData mchData, uint8_t *data, uint8_t fruIndex, uint8_t parm); } *MchCb; #ifdef __cplusplus }; #endif #endif
46cd55d83f86c530ae9717d7467da86ae6551ad6
27ca196c9f0769b36a7e70c2d93ab9d138f6ddb0
/src/framing/src/fskframesync.c
ecfe48fdb87841614aaaad93a87d789c80ed9e03
[ "MIT" ]
permissive
vbursucianu/liquid-dsp
db5d24223b36920a3aca18a524e8d167c702cd7a
f11733208e3d0da928a0dc2111cdb2b0c4817cef
refs/heads/master
2020-12-27T06:36:28.894365
2019-12-07T19:04:27
2019-12-07T19:04:27
237,797,765
2
0
MIT
2020-02-02T16:11:12
2020-02-02T16:11:12
null
UTF-8
C
false
false
26,221
c
fskframesync.c
/* * Copyright (c) 2007 - 2019 Joseph Gaeddert * * 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. */ // // fskframesync.c // #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <complex.h> #include <assert.h> #include "liquid.internal.h" #define DEBUG_FSKFRAMESYNC 1 #define DEBUG_FSKFRAMESYNC_PRINT 0 #define DEBUG_FSKFRAMESYNC_FILENAME "fskframesync_debug.m" #define DEBUG_FSKFRAMESYNC_BUFFER_LEN (2000) // execute stages void fskframesync_execute_detectframe(fskframesync _q, float complex _x); void fskframesync_execute_rxheader( fskframesync _q, float complex _x); void fskframesync_execute_rxpayload( fskframesync _q, float complex _x); // decode header void fskframesync_decode_header(fskframesync _q); // fskframesync object structure struct fskframesync_s { unsigned int m; // demodulator bits/symbol unsigned int k; // demodulator samples/symbol float bandwidth; // demodulator bandwidth unsigned int M; // demodulator constellation size, M=2^m fskdem dem_header; // demodulator object for the header (BFSK) fskdem dem; // demodulator object (M-FSK) float complex * buf; // demodulator transmit buffer [size: k x 1] framesync_callback callback; // user-defined callback function void * userdata; // user-defined data structure framesyncstats_s framestats; // frame statistic object // synchronizer objects, states firpfb_crcf pfb; // timing recovery unsigned int npfb; // timing recovery (number of filters in bank) unsigned int pfb_index; // timing recovery (filter bank index) nco_crcf nco; // coarse carrier frequency recovery firfilt_rrrf detector; // frame correlator detector windowcf buf_rx; // pre-demod buffered samples, size: k windowf buf_LLR2; // detector signal level float rxy[3]; // detector output for timing recovery // header #if 0 unsigned int header_dec_len; // header decoded message length crc_scheme header_crc; // header validity check fec_scheme header_fec0; // header inner code fec_scheme header_fec1; // header outer code packetizer header_decoder; // header encoder unsigned int header_enc_len; // header encoded message length unsigned char * header_dec; // header uncoded [size: header_dec_len x 1] unsigned char * header_enc; // header encoded [size: header_enc_len x 1] unsigned int header_sym_len; // header symbols length #else unsigned int header_dec_len; // header length (decoded bytes) unsigned int header_sym_len; // header length (number of modulated symbols) unsigned char * header_dec; // header uncoded [size: header_dec_len x 1] unsigned char * header_sym; // header: unmodulated symbols qpacketmodem header_decoder; // #endif // payload #if 0 unsigned int payload_dec_len; // payload decoded message length crc_scheme payload_crc; // payload validity check fec_scheme payload_fec0; // payload inner code fec_scheme payload_fec1; // payload outer code packetizer payload_decoder; // payload encoder unsigned int payload_enc_len; // payload encoded message length unsigned char * payload_enc; // paylaod encoded [size: payload_enc_len x 1] unsigned int payload_sym_len; // payload symbols length #else unsigned int payload_dec_len; // payload decoded message length crc_scheme payload_crc; // payload validity check fec_scheme payload_fec0; // payload inner code fec_scheme payload_fec1; // payload outer code unsigned int payload_sym_len; // payload symbols length unsigned char * payload_sym; // unsigned char * payload_dec; // payload decoded [size: payload_dec_len x 1] qpacketmodem payload_decoder; // #endif // framing state enum { STATE_DETECTFRAME=0,// preamble STATE_RXHEADER, // header STATE_RXPAYLOAD, // payload (frame) } state; int frame_assembled; // frame assembled flag int frame_detected; // frame detected flag unsigned int sample_counter; // output sample counter unsigned int symbol_counter; // output symbol counter unsigned int timer; // sample timer // debugging structures #if DEBUG_FSKFRAMESYNC int debug_enabled; // debugging enabled? int debug_objects_created; // debugging objects created? windowcf debug_x; // received samples buffer #endif }; // create GMSK frame synchronizer // _callback : callback function // _userdata : user data pointer passed to callback function fskframesync fskframesync_create(framesync_callback _callback, void * _userdata) { fskframesync q = (fskframesync) malloc(sizeof(struct fskframesync_s)); // set static values q->callback = _callback; q->userdata = _userdata; q->m = 4; q->M = 1 << q->m; q->k = 2 << q->m; q->bandwidth = 0.25f; // create demodulators q->dem_header = fskdem_create( 1, q->k, q->bandwidth); q->dem = fskdem_create(q->m, q->k, q->bandwidth); q->buf = (float complex*) malloc( q->k * sizeof(float complex) ); // create polyphase filterbank for timing recovery q->npfb = 64; q->pfb = firpfb_crcf_create_kaiser(q->npfb, 5, 0.45f, 40.0f); // create oscillator for frequency recovery q->nco = nco_crcf_create(LIQUID_VCO); // create buffer for demodulator input q->buf_rx = windowcf_create(q->k); // create preamble frame detector from preamble symbols (over-sampled by 2) msequence preamble_ms = msequence_create(6, 0x6d, 1); unsigned int preamble_sym_len = 63; // 64; float * preamble = (float*) malloc( 2*preamble_sym_len*sizeof(float) ); unsigned int i; for (i=0; i<preamble_sym_len; i++) { float v = msequence_advance(preamble_ms) ? 1.0f : -1.0f; // reverse direction for filter preamble[2*preamble_sym_len - (2*i+0) - 1] = v; preamble[2*preamble_sym_len - (2*i+1) - 1] = v; } q->detector = firfilt_rrrf_create(preamble, 2*preamble_sym_len); free(preamble); msequence_destroy(preamble_ms); // create buffer for detection q->buf_LLR2 = windowf_create(2*preamble_sym_len); // header objects/arrays #if 0 q->header_dec_len = 10; q->header_crc = LIQUID_CRC_32; q->header_fec0 = LIQUID_FEC_NONE; q->header_fec1 = LIQUID_FEC_GOLAY2412; q->header_decoder = packetizer_create(q->header_dec_len, q->header_crc, q->header_fec0, q->header_fec1); q->header_enc_len = packetizer_get_dec_msg_len(q->header_decoder); q->header_dec = (unsigned char*)malloc(q->header_dec_len*sizeof(unsigned char)); q->header_enc = (unsigned char*)malloc(q->header_enc_len*sizeof(unsigned char)); q->header_sym_len = q->header_enc_len * 8 / q->m; #else q->header_dec_len = 10; q->header_dec = (unsigned char*)malloc(q->header_dec_len*sizeof(unsigned char)); q->header_decoder = qpacketmodem_create(); qpacketmodem_configure(q->header_decoder, q->header_dec_len, LIQUID_CRC_32, LIQUID_FEC_NONE, LIQUID_FEC_GOLAY2412, LIQUID_MODEM_BPSK); q->header_sym_len = qpacketmodem_get_frame_len(q->header_decoder); q->header_sym = (unsigned char*)malloc(q->header_sym_len*sizeof(unsigned char)); #endif // payload objects/arrays #if 0 q->payload_dec_len = 10; q->payload_crc = LIQUID_CRC_32; q->payload_fec0 = LIQUID_FEC_NONE; q->payload_fec1 = LIQUID_FEC_GOLAY2412; q->payload_decoder = packetizer_create(q->payload_dec_len, q->payload_crc, q->payload_fec0, q->payload_fec1); q->payload_enc_len = packetizer_get_dec_msg_len(q->payload_decoder); q->payload_enc = (unsigned char*)malloc(q->payload_enc_len*sizeof(unsigned char)); q->payload_sym_len = 0; // TODO: set this appropriately #else q->payload_dec_len = 200; q->payload_crc = LIQUID_CRC_32; q->payload_fec0 = LIQUID_FEC_NONE; q->payload_fec1 = LIQUID_FEC_HAMMING128; q->payload_decoder = qpacketmodem_create(); qpacketmodem_configure(q->payload_decoder, q->payload_dec_len, q->payload_crc, q->payload_fec0, q->payload_fec1, LIQUID_MODEM_QAM16); // TODO: set bits/sym appropriately q->payload_sym_len = qpacketmodem_get_frame_len(q->payload_decoder); q->payload_sym = (unsigned char*)malloc(q->payload_sym_len*sizeof(unsigned char)); q->payload_dec = (unsigned char*)malloc(q->payload_dec_len*sizeof(unsigned char)); #endif #if DEBUG_FSKFRAMESYNC // debugging structures q->debug_enabled = 0; q->debug_objects_created = 0; q->debug_x = NULL; #endif // reset synchronizer fskframesync_reset(q); // return synchronizer object return q; } // destroy frame synchronizer object, freeing all internal memory void fskframesync_destroy(fskframesync _q) { #if DEBUG_FSKFRAMESYNC // destroy debugging objects if (_q->debug_objects_created) { windowcf_destroy(_q->debug_x); } #endif // destroy modulators fskdem_destroy(_q->dem_header); fskdem_destroy(_q->dem); free(_q->buf); // reset symbol timing recovery state firpfb_crcf_destroy(_q->pfb); // reset carrier recovery objects nco_crcf_destroy(_q->nco); // clear pre-demod buffer windowcf_destroy(_q->buf_rx); // reset internal objects firfilt_rrrf_destroy(_q->detector); windowf_destroy(_q->buf_LLR2); // destroy/free header objects/arrays #if 0 free(_q->header_dec); free(_q->header_enc); packetizer_destroy(_q->header_decoder); #else free(_q->header_dec); free(_q->header_sym); qpacketmodem_destroy(_q->header_decoder); #endif // destroy/free payload objects/arrays #if 0 free(_q->payload_enc); packetizer_destroy(_q->payload_decoder); #else free(_q->payload_sym); free(_q->payload_dec); qpacketmodem_destroy(_q->payload_decoder); #endif // free main object memory free(_q); } // print frame synchronizer object internals void fskframesync_print(fskframesync _q) { printf("fskframesync:\n"); printf(" physical properties\n"); printf(" bits/symbol : %u\n", _q->m); printf(" samples/symbol : %u\n", _q->k); printf(" bandwidth : %-8.3f\n", _q->bandwidth); printf(" framing properties\n"); printf(" preamble : %-4u symbols\n", 0); //_q->preamble_sym_len); printf(" header : %-4u symbols, %-4u bytes\n", _q->header_sym_len, _q->header_dec_len); printf(" payload : %-4u symbols, %-4u bytes\n", _q->payload_sym_len, _q->payload_dec_len); printf(" packet properties\n"); printf(" crc : %s\n", crc_scheme_str[_q->payload_crc ][1]); printf(" fec (inner) : %s\n", fec_scheme_str[_q->payload_fec0][1]); printf(" fec (outer) : %s\n", fec_scheme_str[_q->payload_fec1][1]); printf(" total samples : %-4u samples\n", 0); } // reset frame synchronizer object void fskframesync_reset(fskframesync _q) { // reset symbol timing recovery state firpfb_crcf_reset(_q->pfb); // reset carrier recovery objects nco_crcf_reset(_q->nco); // clear pre-demod buffer windowcf_reset(_q->buf_rx); // reset internal objects firfilt_rrrf_reset(_q->detector); // reset state and counters _q->state = STATE_DETECTFRAME; _q->frame_detected = 0; _q->sample_counter = 0; _q->symbol_counter = 0; _q->timer = _q->k - 1; _q->pfb_index = 0; } // execute frame synchronizer // _q : frame synchronizer object // _x : input sample void fskframesync_execute(fskframesync _q, float complex _x) { // push through synchronizer #if DEBUG_FSKFRAMESYNC if (_q->debug_enabled) windowcf_push(_q->debug_x, _x); #endif switch (_q->state) { case STATE_DETECTFRAME: // look for p/n sequence fskframesync_execute_detectframe(_q, _x); break; case STATE_RXHEADER: // receive header fskframesync_execute_rxheader(_q, _x); break; case STATE_RXPAYLOAD: // receive payload fskframesync_execute_rxpayload(_q, _x); break; } } // execute frame synchronizer on a block of samples // _q : frame synchronizer object // _x : input sample array [size: _n x 1] // _n : number of input samples void fskframesync_execute_block(fskframesync _q, float complex * _x, unsigned int _n) { unsigned int i; for (i=0; i<_n; i++) fskframesync_execute(_q, _x[i]); } // // internal methods // void fskframesync_execute_detectframe(fskframesync _q, float complex _x) { #if 0 // push sample through timing recovery and compute output float complex y; firpfb_crcf_push(_q->pfb, _x); firpfb_crcf_execute(_q->pfb, 0, &y); // push sample into pre-demod p/n sequence buffer windowcf_push(_q->buf_rx, y); #else windowcf_push(_q->buf_rx, _x); #endif // decrement timer and determine if symbol output is ready _q->timer--; if (_q->timer) return; // reset timer _q->timer = _q->k; // run demodulator and retrieve FFT result, computing LLR sample output float complex * r; windowcf_read(_q->buf_rx, &r); fskdem_demodulate(_q->dem_header, r); int fft_bin_range = 2; float v0 = fskdem_get_symbol_energy(_q->dem_header, 0, fft_bin_range); // energy for '0' symbol float v1 = fskdem_get_symbol_energy(_q->dem_header, 1, fft_bin_range); // energy for '1' symbol // compute LLR value float LLR = logf( (v1+1e-9f)/(v0+1e-9f) ); // push result into detector float v; firfilt_rrrf_push( _q->detector, LLR); firfilt_rrrf_execute(_q->detector, &v); // scale by signal level windowf_push(_q->buf_LLR2, LLR*LLR); float * rf; windowf_read(_q->buf_LLR2, &rf); float g = 0.0f; unsigned int i; unsigned int n = 126; // sum squares for (i=0; i<n; i++) g += rf[i]; float rxy = v / ((float)n * (1e-6f + sqrtf(g/(float)n))); //printf("LLR(end+1) = %12.4e; v(end+1) = %12.4e; g(end+1) = %12.4e;\n", LLR, rxy, g); // shift correlator values _q->rxy[0] = _q->rxy[1]; _q->rxy[1] = _q->rxy[2]; _q->rxy[2] = rxy; // check state; we are waiting for correlator to peak here if (!_q->frame_detected) { // frame not yet detected; check cross-correlator output // NOTE: because this is a ratio of energies in frequency, we don't need // to take the absolute value here; only positive values should work if (rxy > 0.5f) { printf("### fskframe detected! ###\n"); _q->frame_detected = 1; } } else { // frame has already been detected; wait for signal to peak if (_q->rxy[1] > _q->rxy[2]) { printf("signal peaked! %12.8f %12.8f %12.8f\n", _q->rxy[0], _q->rxy[1], _q->rxy[2]); // compute estimate, apply bias compensation float gamma = (_q->rxy[2] - _q->rxy[0]) / _q->rxy[1]; float p2 = 9.54907046918287e-01f; float p1 = 8.87465224972323e-02; float xf = fabsf(gamma); float tau_hat = copysignf(p2*xf*xf + p1*xf, gamma); int num_samples = round(tau_hat * _q->k); printf("timing offset estimate : %12.8f -> %12.8f (%d samples)\n", gamma, tau_hat, num_samples); // TODO: set timer and filterbank index accordingly _q->timer = 2*_q->k; // update state... _q->state = STATE_RXHEADER; } else { printf("signal not yet peaked...\n"); } } } void fskframesync_execute_rxheader(fskframesync _q, float complex _x) { #if 0 // push sample through timing recovery and compute output float complex y; firpfb_crcf_push(_q->pfb, _x); firpfb_crcf_execute(_q->pfb, 0, &y); // push sample into pre-demod p/n sequence buffer windowcf_push(_q->buf_rx, y); #else windowcf_push(_q->buf_rx, _x); #endif // decrement timer and determine if symbol output is ready _q->timer--; if (_q->timer) return; // reset timer _q->timer = _q->k; // run demodulator float complex * r; windowcf_read(_q->buf_rx, &r); unsigned char sym = fskdem_demodulate(_q->dem_header, r); // add symbol to header buffer _q->header_sym[_q->symbol_counter++] = sym; // decode header if appropriate if (_q->symbol_counter == _q->header_sym_len) { // decode header int header_valid = qpacketmodem_decode_syms(_q->header_decoder, _q->header_sym, _q->header_dec); #if 1 printf("rx header symbols (%u):\n", _q->header_sym_len); unsigned int i; for (i=0; i<_q->header_sym_len; i++) printf("%1x", _q->header_sym[i]); printf("\n"); printf("rx header decoded (%u):\n", _q->header_dec_len); for (i=0; i<_q->header_dec_len; i++) printf(" %.2x", _q->header_dec[i]); printf("\n"); printf("header: %s\n", header_valid ? "valid" : "INVALID"); #endif if (header_valid) { // continue on to decoding payload _q->symbol_counter = 0; _q->state = STATE_RXPAYLOAD; return; } // update statistics //_q->framedatastats.num_frames_detected++; // header invalid: invoke callback if (_q->callback != NULL) { // set framestats internals _q->framestats.evm = 0.0f; //20*log10f(sqrtf(_q->framestats.evm / 600)); _q->framestats.rssi = 0.0f; //20*log10f(_q->gamma_hat); _q->framestats.cfo = 0.0f; //nco_crcf_get_frequency(_q->mixer); _q->framestats.framesyms = NULL; _q->framestats.num_framesyms = 0; _q->framestats.mod_scheme = LIQUID_MODEM_UNKNOWN; _q->framestats.mod_bps = 0; _q->framestats.check = LIQUID_CRC_UNKNOWN; _q->framestats.fec0 = LIQUID_FEC_UNKNOWN; _q->framestats.fec1 = LIQUID_FEC_UNKNOWN; // invoke callback method _q->callback(_q->header_dec, 0, // header valid NULL, // payload 0, // payload length 0, // payload valid, _q->framestats, _q->userdata); } // reset frame synchronizer fskframesync_reset(_q); } } void fskframesync_execute_rxpayload(fskframesync _q, float complex _x) { #if 0 // push sample through timing recovery and compute output float complex y; firpfb_crcf_push(_q->pfb, _x); firpfb_crcf_execute(_q->pfb, 0, &y); // push sample into pre-demod p/n sequence buffer windowcf_push(_q->buf_rx, y); #else windowcf_push(_q->buf_rx, _x); #endif // decrement timer and determine if symbol output is ready _q->timer--; if (_q->timer) return; // reset timer _q->timer = _q->k; // run demodulator float complex * r; windowcf_read(_q->buf_rx, &r); unsigned char sym = fskdem_demodulate(_q->dem, r); // add symbol to payload buffer _q->payload_sym[_q->symbol_counter++] = sym; // decode payload if appropriate if (_q->symbol_counter == _q->payload_sym_len) { #if 1 printf("rx payload symbols (%u)\n", _q->payload_sym_len); unsigned int i; for (i=0; i<_q->payload_sym_len; i++) printf("%1x%s", _q->payload_sym[i], ((i+1)%64)==0 ? "\n" : ""); printf("\n"); #endif // decode payload int payload_valid = qpacketmodem_decode_syms(_q->payload_decoder, _q->payload_sym, _q->payload_dec); printf("payload: %s\n", payload_valid ? "valid" : "INVALID"); // invoke callback if (_q->callback != NULL) { // set framestats internals _q->framestats.evm = 0.0f; //20*log10f(sqrtf(_q->framestats.evm / 600)); _q->framestats.rssi = 0.0f; //20*log10f(_q->gamma_hat); _q->framestats.cfo = 0.0f; //nco_crcf_get_frequency(_q->mixer); _q->framestats.framesyms = NULL; _q->framestats.num_framesyms = 0; _q->framestats.mod_scheme = LIQUID_MODEM_UNKNOWN; _q->framestats.mod_bps = 0; _q->framestats.check = _q->payload_crc; _q->framestats.fec0 = _q->payload_fec0; _q->framestats.fec1 = _q->payload_fec1; // invoke callback method _q->callback(_q->header_dec, // decoded header 1, // header valid _q->payload_dec, // payload _q->payload_dec_len, // payload length payload_valid, // payload valid, _q->framestats, _q->userdata); } // reset frame synchronizer fskframesync_reset(_q); return; } } // decode header and re-configure payload decoder void fskframesync_decode_header(fskframesync _q) { } void fskframesync_debug_enable(fskframesync _q) { // create debugging objects if necessary #if DEBUG_FSKFRAMESYNC if (!_q->debug_objects_created) { _q->debug_x = windowcf_create(DEBUG_FSKFRAMESYNC_BUFFER_LEN); } // set debugging flags _q->debug_enabled = 1; _q->debug_objects_created = 1; #else fprintf(stderr,"fskframesync_debug_enable(): compile-time debugging disabled\n"); #endif } void fskframesync_debug_disable(fskframesync _q) { #if DEBUG_FSKFRAMESYNC _q->debug_enabled = 0; #else fprintf(stderr,"fskframesync_debug_disable(): compile-time debugging disabled\n"); #endif } void fskframesync_debug_export(fskframesync _q, const char * _filename) { #if DEBUG_FSKFRAMESYNC if (!_q->debug_objects_created) { fprintf(stderr,"error: fskframe_debug_print(), debugging objects don't exist; enable debugging first\n"); return; } FILE* fid = fopen(_filename,"w"); if (!fid) { fprintf(stderr, "error: fskframesync_debug_print(), could not open '%s' for writing\n", _filename); return; } fprintf(fid,"%% %s: auto-generated file", _filename); fprintf(fid,"\n\n"); fprintf(fid,"clear all;\n"); fprintf(fid,"close all;\n\n"); fprintf(fid,"num_samples = %u;\n", DEBUG_FSKFRAMESYNC_BUFFER_LEN); fprintf(fid,"t = 0:(num_samples-1);\n"); unsigned int i; float complex * rc; // write x fprintf(fid,"x = zeros(1,num_samples);\n"); windowcf_read(_q->debug_x, &rc); for (i=0; i<DEBUG_FSKFRAMESYNC_BUFFER_LEN; i++) fprintf(fid,"x(%4u) = %12.4e + j*%12.4e;\n", i+1, crealf(rc[i]), cimagf(rc[i])); fprintf(fid,"\n\n"); fprintf(fid,"figure;\n"); fprintf(fid,"plot(1:length(x),real(x), 1:length(x),imag(x));\n"); fprintf(fid,"ylabel('received signal, x');\n"); fprintf(fid,"\n\n"); fclose(fid); printf("fskframesync/debug: results written to '%s'\n", _filename); #else fprintf(stderr,"fskframesync_debug_print(): compile-time debugging disabled\n"); #endif }