/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1992 by Xerox Corporation. All rights reserved. */ /* time: March 10, 1992 11:59:10 am PST */ /* C2C version: October 16, 1990 (native) */ /* ref-counting: off */ /* file: AISIOImpl, module: AISIOImpl */ /* switches: bcfhklnouw */ #include #include static char versionStamp[] = "@(#)mob_version [3014783417,3483348990] AISIOImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); typedef struct {word f0, f1, f2;} W3; typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {W8 f; W8 r;} W16; typedef struct {W16 f; W16 r;} W32; typedef struct {W32 f; W32 r;} W64; typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7; typedef struct {W64 f; W7 r;} W71; typedef struct {word f0, f1;} W2; typedef struct {word f0, f1, f2, f3;} W4; typedef W4 *W4Pt; typedef struct {word f0, f1, f2, f3, f4;} W5; typedef W5 *W5Pt; typedef W2 *W2Pt; typedef W3 *W3Pt; typedef W8 *W8Pt; typedef W7 *W7Pt; #define SOURCE(p, l) /* source p, l */ #define IOP2(op, x, y) ( (word) ((x) op (y)) ) #define SGNCK(i) ((int) (word) (i) < 0 ? XR_RaiseArithmeticFault(): i ) #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR_RaiseBoundsFault()) : (idx) ) #define MIN(cast, x, y) ( ( cast x) < ( cast y) ? (x) : (y) ) #define MAX(cast, x, y) ( ( cast x) > ( cast y) ? (x) : (y) ) static void NoName_Q2316(); static void AISIOImpl_P0(); static word IOrd_P60(); static word COrd_P120(); static word Card_P180(); static void Assert_P240(); static void ReadBytes_P360(); static word ReadInfo_P420(); static word p_P1200(); static word Read_P480(); static void WriteBytes_P540(); static void Write_P600(); static void WritePartHeader_P1356(); static word NewSampleMap_P660(); static word ReadSample_P720(); static void WriteSample_P780(); static void ReadLine_P840(); static void WriteLine_P900(); static struct {unsigned f; char r[16];} string1 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"}; static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"}; static struct {unsigned f; char r[48];} string3 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\363\223\326\161\300\017\164\046\072\104\350\005\004\162\145\163\164\214\216\257\300\363\223\326\161\300\017\164\046\072\104\350\261\000\000\000"}; static struct {unsigned f; char r[4];} string4 = {131074, "\004\003\000"}; static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\150\223\370\056\300\265\120\000\347\100\164\000\000"}; static struct {unsigned f; char r[4];} string6 = {196611, "\004@~"}; static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\071\045\144\167\300\145\377\112\006\100\310\000\000"}; static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\071\045\144\167\300\145\377\112\006\100\274\000\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\071\045\144\167\300\145\377\112\006\100\230\000\000"}; static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\071\045\144\167\300\145\377\112\006\100\260\000\000"}; static struct {unsigned f; char r[16];} string11 = {786448, "raster first\000\000\000"}; static struct {unsigned f; char r[8];} string12 = {262152, "stop\000\000\000"}; static struct {unsigned f; char r[8];} string13 = {393224, "raster\000"}; static struct {unsigned f; char r[16];} string14 = {917520, "byteSizeCoding\000"}; static struct {unsigned f; char r[8];} string15 = {327688, "scans\000\000"}; static struct {unsigned f; char r[20];} string16 = {1114132, "scanLinesPerBlock\000\000"}; static struct {unsigned f; char r[12];} string17 = {720908, "part length"}; static struct {unsigned f; char r[24];} string18 = {1507352, "Unknown AIS coding type"}; static struct {unsigned f; char r[16];} string19 = {851984, "rasterSection\000\000"}; static struct {unsigned f; char r[12];} string20 = {589836, "placement\000\000"}; static struct {unsigned f; char r[8];} string21 = {327688, "place\000\000"}; static struct {unsigned f; char r[8];} string22 = {393224, "header\000"}; static struct {unsigned f; char r[20];} string23 = {1048596, "bad AIS password\000\000\000"}; static struct {unsigned f; char r[8];} string24 = {458760, "comment"}; static struct {unsigned f; char r[4];} string25 = {65540, ")\000\000"}; static struct {unsigned f; char r[16];} string26 = {917520, "Bug in FromAIS\000"}; static struct {unsigned f; char r[44];} string27 = {2621484, "AIS file has unimplemented scanDirection\000\000\000"}; static struct {unsigned f; char r[32];} string28 = {1835040, "AIS file has no raster part.\000\000\000"}; static struct {unsigned f; char r[20];} string29 = {1048596, "no pixels in map\000\000\000"}; static struct {unsigned f; char r[40];} string30 = {2359336, "AIS file structure is inconsistent (\000\000\000"}; static struct {unsigned f; char r[16];} string31 = {851984, "\257\300\263\261\361\271\300\317\237\257\376\100\164\000\000"}; static struct {unsigned f; char r[12];} string32 = {589833, "\006\001\100\120\010\000\004\024\001\000\000"}; static struct {unsigned f; char r[16];} string33 = {851984, "\257\300\213\226\301\143\300\072\355\320\373\100\150\000\000"}; static struct {unsigned f; char r[16];} string34 = {851984, "\257\300\015\277\004\146\300\034\367\146\045\100\164\000\000"}; static struct {unsigned f; char r[16];} string35 = {851984, "\257\300\141\260\110\353\300\162\250\066\353\100\150\000\000"}; static struct {unsigned f; char r[16];} string36 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"}; static struct {unsigned f; char r[16];} string37 = {851984, "\257\300\150\223\370\056\300\265\120\000\347\100\150\000\000"}; static struct { word f0[41]; word f41; word f42; word f43; word f44; word f45; word f46; word f47; word f48; word f49; word f50; word f51; word f52; word f53; word f54; word f55; word f56; word f57; word f58; word f59; word f60; word f61; word f62; word f63; word f64; word f65; word f66; word f67; word f68; word f69; word f70; word f71; word f72[13]; } globalframe = { {0}, (word) WriteLine_P900, 0, (word) ReadLine_P840, 0, (word) WriteSample_P780, 0, (word) ReadSample_P720, 0, (word) NewSampleMap_P660, 0, (word) Write_P600, 0, (word) WriteBytes_P540, 0, (word) Read_P480, 0, (word) ReadInfo_P420, 0, (word) ReadBytes_P360, 0, (word) Assert_P240, 0, (word) Card_P180, 0, (word) COrd_P120, 0, (word) IOrd_P60, 0, (word) AISIOImpl_P0, 0, 2147483647, {0} }; static void NoName_Q2316() { register ptr gf_c0191 = (ptr) &globalframe; word var_c26624; (* (( (ptr) gf_c0191)+6) ) = (word) XR_GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf_c0191)+8) ) = (word) XR_GetTypeIndex((word) &string3, 0, (word) &string4); (* (( (ptr) gf_c0191)+9) ) = (word) XR_GetTypeIndex((word) &string5, 0, (word) &string6); (* (( (ptr) gf_c0191)+16) ) = (word) XR_GetTypeIndexS((word) (&string7)); (* (( (ptr) gf_c0191)+17) ) = (word) XR_GetTypeIndexS((word) (&string8)); (* (( (ptr) gf_c0191)+18) ) = (word) XR_GetTypeIndexS((word) (&string9)); (* (( (ptr) gf_c0191)+19) ) = (word) XR_GetTypeIndexS((word) (&string10)); (* (ptr) (( (bPt) gf_c0191)+80) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string11); (* (ptr) (( (bPt) gf_c0191)+84) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string12); (* (ptr) (( (bPt) gf_c0191)+88) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string13); (* (ptr) (( (bPt) gf_c0191)+92) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string14); (* (ptr) (( (bPt) gf_c0191)+96) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string15); (* (ptr) (( (bPt) gf_c0191)+100) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string16); (* (ptr) (( (bPt) gf_c0191)+104) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string17); (* (ptr) (( (bPt) gf_c0191)+108) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string18); (* (ptr) (( (bPt) gf_c0191)+112) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string19); (* (ptr) (( (bPt) gf_c0191)+116) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string20); (* (ptr) (( (bPt) gf_c0191)+120) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string21); (* (ptr) (( (bPt) gf_c0191)+124) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string22); (* (ptr) (( (bPt) gf_c0191)+128) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string23); (* (ptr) (( (bPt) gf_c0191)+132) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string24); (* (ptr) (( (bPt) gf_c0191)+136) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string25); (* (ptr) (( (bPt) gf_c0191)+140) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string26); (* (ptr) (( (bPt) gf_c0191)+144) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string27); (* (ptr) (( (bPt) gf_c0191)+148) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string28); (* (ptr) (( (bPt) gf_c0191)+152) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string29); (* (ptr) (( (bPt) gf_c0191)+156) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0191)+6) ), (word) &string30); (void) XR_DeclareGlobalFrame((word) "AISIOImpl", &globalframe, (word) XR_GetTypeIndex((word) &string31, 0, (word) &string32) , (word) (( (bPt) gf_c0191)+276)/* var_c24160 */ ); var_c26624 = (word) XR_ImportInterface((word) "ImagerSample", (word) XR_GetTypeIndexS((word) (&string33)), 60); (* (( (ptr) gf_c0191)+83)/* var_c25504 */ ) = var_c26624; (void) XR_ImportProcS(var_c26624, 2370311); (void) XR_ImportProcS(var_c26624, 2107398); (void) XR_ImportProcS(var_c26624, 1320708); (void) XR_ImportProcS(var_c26624, 67905026); (void) XR_ImportProcS(var_c26624, 2370822); (void) XR_ImportProcS(var_c26624, 68685571); var_c26624 = (word) XR_ImportInterface((word) "IO", (word) XR_GetTypeIndexS((word) (&string34)), 103); (* (( (ptr) gf_c0191)+81)/* var_c24512 */ ) = var_c26624; (void) XR_ImportProcS(var_c26624, 1053698); (void) XR_ImportProcS(var_c26624, 530434); (void) XR_ImportProcS(var_c26624, 530946); (void) XR_ImportProcS(var_c26624, 67377409); (void) XR_ImportProcS(var_c26624, 68160002); var_c26624 = (word) XR_ImportInterface((word) "PFS", (word) XR_GetTypeIndexS((word) (&string35)), 40); (* (( (ptr) gf_c0191)+82)/* var_c24608 */ ) = var_c26624; (void) XR_ImportProcS(var_c26624, 67371265); (void) XR_ImportProcS(var_c26624, 71312136); var_c26624 = (word) XR_ImportInterface((word) "Rope", (word) XR_GetTypeIndexS((word) (&string36)), 43); (* (( (ptr) gf_c0191)+80)/* var_c24448 */ ) = var_c26624; (void) XR_ImportProcS(var_c26624, 67902211); (void) XR_ImportProcS(var_c26624, 68419845); var_c26624 = (word) XR_ExportInterface((word) "AISIO", (word) XR_GetTypeIndexS((word) (&string37)), 9); (* (( (ptr) gf_c0191)+84)/* var_c26656 */ ) = var_c26624; (void) XR_ExportVar(var_c26624, 0, (word) (( (bPt) gf_c0191)+160)/* var_c23680 */ ); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+228)/* var_c23968 */ , 67371265); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+220)/* var_c23936 */ , 67633666); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+204)/* var_c23872 */ , 1311493); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+196)/* var_c23840 */ , 67896323); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+188)/* var_c23808 */ , 67896579); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+180)/* var_c23776 */ , 1050116); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+172)/* var_c23744 */ , 788227); (void) XR_ExportProcS(var_c26624, (word) (( (bPt) gf_c0191)+164)/* var_c23712 */ , 788483); } static void AISIOImpl_P0(formal_c029, formal_c028) word formal_c029; word formal_c028; { register ptr gf_c26688 = (ptr) &globalframe; /* AISIOImpl: */ SOURCE(70, 11818) /* moved to installation proc */ SOURCE(827, 30) (* (( (ptr) gf_c26688)+4)/* defaultLinesPerBlock_v3140 */ ) = 16; } static word IOrd_P60(h_v3728) word h_v3728; { word var_c3772; /* IOrd: */ SOURCE(902, 81) SOURCE(955, 28) { word var_c24320; { word temp_v10584; temp_v10584 = ( (((unsigned)h_v3728 << 16) >> 16) ); var_c24320 = (int) ( short )( (((unsigned)temp_v10584 << 16) >> 16) ); }; return(var_c24320); }; } static word COrd_P120(h_v3832) word h_v3832; { word var_c3876; /* COrd: */ SOURCE(986, 84) SOURCE(1041, 29) return(h_v3832); } static word Card_P180(h_v3936) word h_v3936; { word var_c3980; /* Card: */ SOURCE(1073, 84) SOURCE(1128, 29) return(h_v3936); } static void Assert_P240(title_v4040, assertion_v4068) word title_v4040; word assertion_v4068; { register ptr gf_c26720 = (ptr) &globalframe; /* Assert: */ SOURCE(1160, 137) SOURCE(1208, 89) if ((0 == assertion_v4068)) { SOURCE(1230, 67) { word var_c24416; { word pd38; pd38 = (* (( (ptr) (* (( (ptr) gf_c26720)+80)/* var_c24448 */ ))+5) ); var_c24416 = (word) ( *( (fPt) ((* (ptr) pd38 ))))((* (( (ptr) gf_c26720)+39) ), title_v4040, (* (( (ptr) gf_c26720)+34) ), 0, 0, pd38); }; { word var_c041; var_c041 = var_c24416; (void) XR_RaiseError((word) (( (bPt) gf_c26720)+160)/* var_c23680 */ , (word) &var_c041); }; }; }; } static void ReadBytes_P360(stream_v4232, base_v4260, bytes_v4288) word stream_v4232; word base_v4260; word bytes_v4288; { register ptr gf_c26752 = (ptr) &globalframe; word actualBytes_v5664; /* ReadBytes: */ SOURCE(1425, 226) SOURCE(1511, 82) { W3 var_c24480; var_c24480.f0 = base_v4260; var_c24480.f1 = 0; var_c24480.f2 = bytes_v4288; { word pd39; pd39 = (* (( (ptr) (* (( (ptr) gf_c26752)+81)/* var_c24512 */ ))+14) ); actualBytes_v5664 = (word) ( *( (fPt) ((* (ptr) pd39 ))))(stream_v4232, var_c24480, pd39); }; }; SOURCE(1595, 56) if (( (int)actualBytes_v5664 != (int)bytes_v4288)) { SOURCE(1623, 28) { word var_c047; var_c047 = stream_v4232; (void) XR_RaiseError((* (( (ptr) (* (( (ptr) gf_c26752)+81)/* var_c24512 */ ))+4) ), (word) &var_c047); }; }; } static word ReadInfo_P420(name_v4360) word name_v4360; { W71 var_c26784; register ptr gf_c26816 = (ptr) &globalframe; word info_v4404; /* declaration of var_c24544 skipped */ word in_v5708; word header_v5736; word partHeader_v5764; W3 raster_v5792; W2 uca_v5820; W2 placement_v5848; W8 photometry_v5876; /* declaration of comment_v5904 skipped */ /* ReadInfo: */ SOURCE(1675, 4436) { word tmpAddr40; tmpAddr40 = (word) (( (ptr) &var_c26784)+4)/* var_c24544 */ ; (* (ptr) tmpAddr40 ) = ( ((word) (fPt) p_P1200) ); (* (( (ptr) tmpAddr40) + 1) ) = 1; }; SOURCE(1675, 4436) info_v4404 = 0; SOURCE(1735, 60) { word var_c24576; { word pd41; pd41 = (* (( (ptr) (* (( (ptr) gf_c26816)+82)/* var_c24608 */ ))+5) ); var_c24576 = (word) ( *( (fPt) ((* (ptr) pd41 ))))(name_v4360, pd41); }; { W2 var_c24640; var_c24640.f0 = 4096; var_c24640.f1 = 2; { word pd42; pd42 = (* (( (ptr) (* (( (ptr) gf_c26816)+82)/* var_c24608 */ ))+39) ); in_v5708 = (word) ( *( (fPt) ((* (ptr) pd42 ))))(var_c24576, 0, (* (W4Pt) (( (ptr) gf_c26816)+71)/* var_c24224 */ ), 0, 0, (* (W5Pt) ( ( (ptr) gf_c26816)+75)/* var_c24288 */ ) , 1, var_c24640, pd42); }; }; }; SOURCE(2540, 39) XR_FillWords(&photometry_v5876, 8, 0); photometry_v5876.f5 = (word) -1; photometry_v5876.f6 = (word) -1; SOURCE(2845, 25) info_v4404 = XR_NewObject(28, (* (( (ptr) gf_c26816)+9) )); SOURCE(2880, 62) SOURCE(2881, 61) (void) ReadBytes_P360(in_v5708, (word) &header_v5736, 4); SOURCE(2945, 81) if (((* (hPt) &header_v5736 ) != 33962)) { SOURCE(3001, 25) { word var_c061; var_c061 = (* (( (ptr) gf_c26816)+32) ); (void) XR_RaiseError((word) (( (bPt) gf_c26816)+160)/* var_c23680 */ , (word) &var_c061); }; }; SOURCE(3028, 105) { word var_c24736; if (((word) COrd_P120(( (((unsigned)header_v5736 << 16) >> 16) )) > 0)) { var_c24736 = (((word) COrd_P120(( (((unsigned)header_v5736 << 16) >> 16) )) & 01777) == 0); } else { var_c24736 = 0; }; (void) Assert_P240((* (( (ptr) gf_c26816)+31) ), var_c24736); }; SOURCE(3135, 59) { word var_c24768; { word var_c24800; word aisWords_v23600; aisWords_v23600 = (word) COrd_P120(( (((unsigned)header_v5736 << 16) >> 16) )); SOURCE(1367, 52) var_c24800 = IOP2( * , (int)2, (int)aisWords_v23600); var_c24768 = var_c24800; }; (* (ptr) info_v4404 ) = var_c24768; }; SOURCE(3196, 2892) { register word firstPart_v6844; firstPart_v6844 = 1; lab_L100005: ; { word startIndex_v6888; word stopIndex_v6916; SOURCE(3233, 44) { word pd43; pd43 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); startIndex_v6888 = (word) ( *( (fPt) ((* (ptr) pd43 ))))(in_v5708, pd43); }; stopIndex_v6916 = startIndex_v6888; SOURCE(3287, 61) SOURCE(3288, 60) (void) ReadBytes_P360(in_v5708, (word) &partHeader_v5764, 2); SOURCE(3351, 87) { word var_c24832; word aisWords_v23552; aisWords_v23552 = (((((unsigned)partHeader_v5764 << 6) >> 30) << 8) + (* (( (bPt) &partHeader_v5764)+1) )); SOURCE(1367, 52) var_c24832 = IOP2( * , (int)2, (int)aisWords_v23552); stopIndex_v6916 = (startIndex_v6888 + var_c24832); }; SOURCE(3440, 55) (void) Assert_P240((* (( (ptr) gf_c26816)+28) ), ( (int)stopIndex_v6916 <= (int)(* (ptr) info_v4404 ))); SOURCE(3497, 2502) { word var_c24864; var_c24864 = ((unsigned)partHeader_v5764 >> 26); switch (var_c24864) { case 0: SOURCE(3536, 78) { word tc44; if (((((unsigned)partHeader_v5764 << 6) >> 30) == 0)) { tc44 = (word) ((* (( (bPt) &partHeader_v5764)+1) ) == 0); } else { tc44 = (word) 0; }; (void) Assert_P240((* (( (ptr) gf_c26816)+26) ), tc44); }; SOURCE(3616, 4) goto lab_L100003; case 1: SOURCE(3686, 33) (void) Assert_P240((* (( (ptr) gf_c26816)+20) ), firstPart_v6844); SOURCE(3758, 57) SOURCE(3759, 56) (void) ReadBytes_P360(in_v5708, (word) &raster_v5792, 10); SOURCE(3818, 44) { word var_c24896; { word pd45; pd45 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); var_c24896 = ( (int)(word) ( *( (fPt) ((* (ptr) pd45 ))))(in_v5708, pd45) <= (int)stopIndex_v6916); }; (void) Assert_P240((* (( (ptr) gf_c26816)+21) ), var_c24896); }; SOURCE(3864, 113) { word var_c24928; { word tc46; if (((word) COrd_P120((* (hPt) &raster_v5792 )) > 0)) { tc46 = (word) ((word) COrd_P120((* (( (hPt) &raster_v5792)+1) )) > 0); } else { tc46 = (word) 0; }; if (tc46) { var_c24928 = ((word) COrd_P120((* (( (hPt) &raster_v5792)+3) )) > 0); } else { var_c24928 = 0; }; }; (void) Assert_P240((* (( (ptr) gf_c26816)+22) ), var_c24928); }; SOURCE(3979, 737) { word var_c24960; var_c24960 = (* (( (bPt) &raster_v5792)+9) ); if ((var_c24960 == 1)) { SOURCE(4018, 652) { word byteSizeCoding_v6960; SOURCE(4020, 47) { /*1*/ word pd47; /*1*/ pd47 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); /*1*/ byteSizeCoding_v6960 = (stopIndex_v6916 - (word) ( *( (fPt) ((* (ptr) pd47 ))))(in_v5708, pd47)); /*1*/ }; SOURCE(4069, 75) (void) Assert_P240((* (( (ptr) gf_c26816)+23) ), ( (int)byteSizeCoding_v6960 <= (int)8)); SOURCE(4154, 36) SOURCE(4155, 35) (void) ReadBytes_P360(in_v5708, (word) &uca_v5820, byteSizeCoding_v6960); SOURCE(4193, 64) if (((word) COrd_P120((* (hPt) &uca_v5820 )) == 0)) { SOURCE(4231, 26) /*1*/ (* (( (bPt) &uca_v5820)+1) ) = 1; /*1*/ }; SOURCE(4269, 185) { /*1*/ word var_c24992; /*1*/ { /*1*/ word var_c25024; /*1*/ word aisWords_v23504; /*1*/ word var_c0206; /*1*/ aisWords_v23504 = (word) COrd_P120((* (( (hPt) &uca_v5820)+1) )); SOURCE(1367, 52) /*1*/ var_c25024 = IOP2( * , (int)2, (int)aisWords_v23504); /*1*/ var_c0206 = IOP2( * , (int)8, (int)var_c25024); /*1*/ var_c24992 = ( (int)IOP2( * , (int)IOP2( * , (int)(word) COrd_P120((* (hPt) &uca_v5820 )), (int)(word) COrd_P120((* ( /*1*/ ( (hPt) &raster_v5792)+3) ))), (int)(word) COrd_P120((* (( (hPt) &raster_v5792)+1) ))) <= (int)var_c0206); /*1*/ }; /*1*/ (void) Assert_P240((* (( (ptr) gf_c26816)+24) ), var_c24992); /*1*/ }; SOURCE(4456, 174) if (( (int)byteSizeCoding_v6960 < (int)8)) { SOURCE(4515, 72) /*1*/ (void) Assert_P240((* (( (ptr) gf_c26816)+25) ), ((* (( (hPt) &uca_v5820)+2) ) == 65535)); SOURCE(4589, 41) /*1*/ (* (( (hPt) &uca_v5820)+3) ) = 65535; /*1*/ }; SOURCE(4635, 33) { /*1*/ word var_c25056; /*1*/ var_c25056 = XR_NewObject(8, (* (( (ptr) gf_c26816)+19) )); /*1*/ (* (W2Pt) var_c25056 ) = uca_v5820; /*1*/ (* (( (ptr) info_v4404)+2) ) = var_c25056; /*1*/ }; }; } else { SOURCE(4684, 32) { word var_c080; var_c080 = (* (( (ptr) gf_c26816)+27) ); (void) XR_RaiseError((word) (( (bPt) gf_c26816)+160)/* var_c23680 */ , (word) &var_c080); }; }; }; SOURCE(4718, 40) { word var_c25088; var_c25088 = XR_NewObject(12, (* (( (ptr) gf_c26816)+18) )); (* (W3Pt) var_c25088 ) = raster_v5792; (* (( (ptr) info_v4404)+1) ) = var_c25088; }; break; case 2: SOURCE(4786, 63) SOURCE(4787, 62) (void) ReadBytes_P360(in_v5708, (word) &placement_v5848, 8); SOURCE(4852, 48) { word var_c25120; { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); var_c25120 = ( (int)(word) ( *( (fPt) ((* (ptr) pd48 ))))(in_v5708, pd48) == (int)stopIndex_v6916); }; (void) Assert_P240((* (( (ptr) gf_c26816)+29) ), var_c25120); }; SOURCE(4902, 226) { word tc49; word tc50; word tc51; if (( (int)(word) IOrd_P60((* (hPt) &placement_v5848 )) == (int) (word) -1)) { tc51 = (word) ( (int)(word) IOrd_P60((* (( (hPt) &placement_v5848)+1) )) == (int) (word) -1); } else { tc51 = (word) 0; }; if (tc51) { tc50 = (word) ( (int)(word) IOrd_P60((* (( (hPt) &placement_v5848)+2) )) == (int) (word) -1); } else { tc50 = (word) 0; }; if (tc50) { tc49 = (word) ( (int)(word) IOrd_P60((* (( (hPt) &placement_v5848)+3) )) == (int) (word) -1); } else { tc49 = (word) 0; }; if (tc49) { } else { SOURCE(5053, 75) { word var_c25152; if (( (int)(word) IOrd_P60((* (( (hPt) &placement_v5848)+2) )) > (int)0)) { /*1*/ var_c25152 = ( (int)(word) IOrd_P60((* (( (hPt) &placement_v5848)+3) )) > (int)0); /*1*/ } else { /*1*/ var_c25152 = 0; /*1*/ }; (void) Assert_P240((* (( (ptr) gf_c26816)+30) ), var_c25152); }; }; }; SOURCE(5130, 49) { word var_c25184; var_c25184 = XR_NewObject(8, (* (( (ptr) gf_c26816)+17) )); (* (W2Pt) var_c25184 ) = placement_v5848; (* (( (ptr) info_v4404)+3) ) = var_c25184; }; break; case 3: SOURCE(5208, 65) SOURCE(5209, 64) (void) ReadBytes_P360(in_v5708, (word) &photometry_v5876, 30); SOURCE(5276, 44) { word var_c25216; { word pd52; pd52 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); var_c25216 = ( (int)(word) ( *( (fPt) ((* (ptr) pd52 ))))(in_v5708, pd52) <= (int)stopIndex_v6916); }; (void) Assert_P240((* (( (ptr) gf_c26816)+21) ), var_c25216); }; SOURCE(5322, 26) { word pd53; pd53 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd53 ))))(in_v5708, stopIndex_v6916, pd53); }; SOURCE(5378, 52) { word var_c25248; var_c25248 = XR_NewObject(32, (* (( (ptr) gf_c26816)+16) )); (* (W8Pt) var_c25248 ) = photometry_v5876; (* (( (ptr) info_v4404)+4) ) = var_c25248; }; break; case 4: SOURCE(5446, 513) { word byteSizeComment_v7004; word length_v7032 = 0; SOURCE(5448, 48) { word pd54; pd54 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); byteSizeComment_v7004 = (stopIndex_v6916 - (word) ( *( (fPt) ((* (ptr) pd54 ))))(in_v5708, pd54)); }; SOURCE(5553, 76) (void) Assert_P240((* (( (ptr) gf_c26816)+33) ), ( ( (int)byteSizeComment_v7004 >= (int)1) ? ( (int)byteSizeComment_v7004 <= (int)256) : 0 ) ) ; SOURCE(5639, 41) SOURCE(5640, 40) (void) ReadBytes_P360(in_v5708, (word) (( (bPt) &var_c26784)+24)/* comment_v5904 */ , byteSizeComment_v7004); SOURCE(5683, 26) length_v7032 = (* (( (bPt) &var_c26784)+24) ); SOURCE(5711, 51) (void) Assert_P240((* (( (ptr) gf_c26816)+33) ), ( (int)byteSizeComment_v7004 >= (int)SGNCK((length_v7032 + 1)))); SOURCE(5764, 192) { /* declaration of i_v7076 skipped */ word rope_v7132; SOURCE(5798, 10) (* (( (ptr) &var_c26784)+70)/* i_v7076 */ ) = 0; SOURCE(5865, 45) { word pd55; pd55 = (* (( (ptr) (* (( (ptr) gf_c26816)+80)/* var_c24448 */ ))+31) ); rope_v7132 = (word) ( *( (fPt) ((* (ptr) pd55 ))))(length_v7032, (word) (( (bPt) &var_c26784)+16)/* var_c24544 */ , 2147483647, pd55) ; }; SOURCE(5913, 41) { word var_c25280; var_c25280 = XR_NewObject(8, (* (( (ptr) gf_c26816)+8) )); (* (ptr) var_c25280 ) = rope_v7132; (* (( (ptr) var_c25280)+1) ) = (* (( (ptr) info_v4404)+5) ); (* (( (ptr) info_v4404)+5) ) = var_c25280; }; }; }; break; default: SOURCE(5973, 26) { word pd56; pd56 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd56 ))))(in_v5708, stopIndex_v6916, pd56); }; break; }; }; SOURCE(6029, 59) { word pd57; pd57 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+29) ); if (( (int)(word) ( *( (fPt) ((* (ptr) pd57 ))))(in_v5708, pd57) != (int)stopIndex_v6916)) { SOURCE(6065, 23) { word var_c092; var_c092 = (* (( (ptr) gf_c26816)+35) ); (void) XR_RaiseError((word) (( (bPt) gf_c26816)+160)/* var_c23680 */ , (word) &var_c092); }; }; }; }; firstPart_v6844 = 0; goto lab_L100005; lab_L100003: ; }; SOURCE(6099, 12) { word pd58; pd58 = (* (( (ptr) (* (( (ptr) gf_c26816)+81)/* var_c24512 */ ))+28) ); (void) ( *( (fPt) ((* (ptr) pd58 ))))(in_v5708, 0, pd58); }; SOURCE(1675, 4436) return(info_v4404); } static word p_P1200(formal_c26848) word formal_c26848; { word var_c7208; formal_c26848 = (formal_c26848 - 16); /* p: */ SOURCE(5810, 17) SOURCE(5836, 26) { word var_c0208; { word var_c0207; { word idx59; (* (( (ptr) formal_c26848)+70) ) = ((* (( (ptr) formal_c26848)+70) ) + 1); var_c0207 = (var_c0207 & 4294967040) | ((word) (* ((( (bPt) formal_c26848)+24)+( idx59 = (* (( (ptr) formal_c26848)+70) ), BCK(idx59, 256) )) )); }; var_c0208 = (var_c0207 & 0377); }; return(var_c0208); }; } static word Read_P480(name_v4464, info_v4492) word name_v4464; word info_v4492; { register ptr gf_c26880 = (ptr) &globalframe; word map_v4536; word i_v7236; word in_v7264; /* Read: */ SOURCE(6117, 1609) SOURCE(6117, 1609) map_v4536 = 0; SOURCE(6201, 24) i_v7236 = (word) ReadInfo_P420(name_v4464); SOURCE(6227, 60) { word var_c25312; { word pd60; pd60 = (* (( (ptr) (* (( (ptr) gf_c26880)+82)/* var_c24608 */ ))+5) ); var_c25312 = (word) ( *( (fPt) ((* (ptr) pd60 ))))(name_v4464, pd60); }; { W2 var_c25344; var_c25344.f0 = 4096; var_c25344.f1 = 2; { word pd61; pd61 = (* (( (ptr) (* (( (ptr) gf_c26880)+82)/* var_c24608 */ ))+39) ); in_v7264 = (word) ( *( (fPt) ((* (ptr) pd61 ))))(var_c25312, 0, (* (W4Pt) (( (ptr) gf_c26880)+71)/* var_c24224 */ ), 0, 0, (* (W5Pt) ( ( (ptr) gf_c26880)+75)/* var_c24288 */ ) , 1, var_c25344, pd61); }; }; }; SOURCE(6289, 29) if ((info_v4492 != 0)) { SOURCE(6308, 10) (* (W7Pt) info_v4492 ) = (* (W7Pt) i_v7236 ); }; SOURCE(6320, 1392) if ( ( ((* (( (ptr) i_v7236)+1) ) != 0) ? ((* (( (ptr) i_v7236)+2) ) != 0) : 0 ) ) { SOURCE(6359, 1309) { word samplesPerPixel_v7308; W2 size_v7336; word bytesPerLine_v7364; word bytesPadding_v7392; word linesPerBlock_v7420; word bytesPerBlock_v7448; word buf_v7476; word base_v7504; SOURCE(6361, 53) samplesPerPixel_v7308 = (word) COrd_P120((* (( (hPt) (* (( (ptr) i_v7236)+1) ))+3) )); SOURCE(6416, 78) size_v7336.f0 = (word) COrd_P120((* (hPt) (* (( (ptr) i_v7236)+1) ) )); size_v7336.f1 = (word) COrd_P120((* (( (hPt) (* (( (ptr) i_v7236)+1) ))+1) )); SOURCE(6496, 66) { word aisWords_v23456; aisWords_v23456 = (word) COrd_P120((* (( (hPt) (* (( (ptr) i_v7236)+2) ))+1) )); SOURCE(1367, 52) bytesPerLine_v7364 = IOP2( * , (int)2, (int)aisWords_v23456); }; SOURCE(6564, 124) if (((* (( (hPt) (* (( (ptr) i_v7236)+2) ))+2) ) == 65535)) { bytesPadding_v7392 = 0; } else { { word var_c25440; word aisWords_v23408; aisWords_v23408 = (word) COrd_P120((* (( (hPt) (* (( (ptr) i_v7236)+2) ))+3) )); SOURCE(1367, 52) var_c25440 = IOP2( * , (int)2, (int)aisWords_v23408); bytesPadding_v7392 = var_c25440; }; }; SOURCE(6690, 141) { word tc62; word x63; word x64; if (((* (( (hPt) (* (( (ptr) i_v7236)+2) ))+2) ) == 65535)) { tc62 = (word) (x63 = (* (( (ptr) gf_c26880)+4)/* defaultLinesPerBlock_v3140 */ ), x64 = size_v7336.f0, MIN((int)(word), x63, x64)); } else { tc62 = (word) COrd_P120((* (( (hPt) (* (( (ptr) i_v7236)+2) ))+2) )); }; linesPerBlock_v7420 = tc62; }; SOURCE(6833, 60) bytesPerBlock_v7448 = (IOP2( * , (int)bytesPerLine_v7364, (int)linesPerBlock_v7420) + bytesPadding_v7392); SOURCE(6895, 218) { W4 var_c25472; var_c25472.f0 = 0; var_c25472.f1 = 0; var_c25472.f2 = linesPerBlock_v7420; var_c25472.f3 = IOP2( * , (int)samplesPerPixel_v7308, (int)size_v7336.f1); { word pd65; pd65 = (* (( (ptr) (* (( (ptr) gf_c26880)+83)/* var_c25504 */ ))+19) ); buf_v7476 = (word) ( *( (fPt) ((* (ptr) pd65 ))))(var_c25472, 8, IOP2( * , (int)8, (int)bytesPerLine_v7364), pd65); }; }; SOURCE(7115, 59) base_v7504 = (* (( (ptr) buf_v7476)+8) ); SOURCE(7176, 187) { word var_c25536; { word idx66; var_c25536 = ( idx66 = (word) COrd_P120((* (hPt) (* (( (ptr) i_v7236)+2) ) )), BCK(idx66, 33) ); }; { W4 var_c25568; var_c25568.f0 = 0; var_c25568.f1 = 0; var_c25568.f2 = size_v7336.f0; var_c25568.f3 = IOP2( * , (int)samplesPerPixel_v7308, (int)size_v7336.f1); { word pd67; pd67 = (* (( (ptr) (* (( (ptr) gf_c26880)+83)/* var_c25504 */ ))+19) ); map_v4536 = (word) ( *( (fPt) ((* (ptr) pd67 ))))(var_c25568, var_c25536, IOP2( * , (int)8, (int)bytesPerLine_v7364), pd67) ; }; }; }; SOURCE(7365, 118) { word var_c25600; var_c25600 = (word) COrd_P120((* (( (hPt) (* (( (ptr) i_v7236)+1) ))+2) )); switch (var_c25600) { case 0: case 3: case 8: break; default: SOURCE(7434, 49) { word var_c0116; var_c0116 = (* (( (ptr) gf_c26880)+36) ); (void) XR_RaiseError((word) (( (bPt) gf_c26880)+160)/* var_c23680 */ , (word) &var_c0116); }; break; }; }; SOURCE(7485, 31) { word pd68; pd68 = (* (( (ptr) (* (( (ptr) gf_c26880)+81)/* var_c24512 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd68 ))))(in_v7264, (* (ptr) i_v7236 ), pd68); }; SOURCE(7518, 139) { register word s_v7560 = 0; register word noName_c25632; { word idx69; noName_c25632 = ( idx69 = (word) size_v7336.f0, SGNCK(idx69) ); }; if ((s_v7560 >= noName_c25632)) { goto lab_L100010; }; lab_L100013: ; SOURCE(7555, 34) SOURCE(7556, 33) (void) ReadBytes_P360(in_v7264, base_v7504, bytesPerLine_v7364); SOURCE(7592, 65) { W2 var_c25664; W2 var_c25696; W2 var_c25728; var_c25664.f0 = s_v7560; var_c25664.f1 = 0; var_c25696.f0 = 0; var_c25696.f1 = 0; var_c25728.f0 = 1; var_c25728.f1 = size_v7336.f1; { word pd70; pd70 = (* (( (ptr) (* (( (ptr) gf_c26880)+83)/* var_c25504 */ ))+49) ); (void) ( *( (fPt) ((* (ptr) pd70 ))))(map_v4536, buf_v7476, var_c25664, var_c25696, var_c25728, 0, pd70); }; }; s_v7560 = (s_v7560 + 1); if ((s_v7560 < noName_c25632)) { goto lab_L100013; }; lab_L100010: ; }; }; } else { SOURCE(7675, 37) { word var_c0122; var_c0122 = (* (( (ptr) gf_c26880)+37) ); (void) XR_RaiseError((word) (( (bPt) gf_c26880)+160)/* var_c23680 */ , (word) &var_c0122); }; }; SOURCE(7714, 12) { word pd71; pd71 = (* (( (ptr) (* (( (ptr) gf_c26880)+81)/* var_c24512 */ ))+28) ); (void) ( *( (fPt) ((* (ptr) pd71 ))))(in_v7264, 0, pd71); }; SOURCE(6117, 1609) return(map_v4536); } static void WriteBytes_P540(out_v4596, base_v4624, bytes_v4652) word out_v4596; word base_v4624; word bytes_v4652; { register ptr gf_c26912 = (ptr) &globalframe; /* WriteBytes: */ SOURCE(7731, 147) SOURCE(7818, 60) { W3 var_c25760; var_c25760.f0 = base_v4624; var_c25760.f1 = 0; var_c25760.f2 = bytes_v4652; { word pd72; pd72 = (* (( (ptr) (* (( (ptr) gf_c26912)+81)/* var_c24512 */ ))+24) ); (void) ( *( (fPt) ((* (ptr) pd72 ))))(out_v4596, var_c25760, pd72); }; }; } static void Write_P600(name_v4724, map_v4752, placement_v4780, photometry_v4808, comments_v4836) word name_v4724; word map_v4752; word placement_v4780; word photometry_v4808; word comments_v4836; { W7 var_c26944; register ptr gf_c26976 = (ptr) &globalframe; /* declaration of var_c25792 skipped */ word wordsHeader_v7632 = 2048; /* declaration of out_v7660 skipped */ word header_v7688; W3 raster_v7716; W2 uca_v7744; W4 box_v7772; W2 size_v7800; word bpp_v7828; word aisWordsPerLine_v7856; word buf_v7884; word base_v7912; /* Write: */ SOURCE(7884, 3096) { word tmpAddr73; tmpAddr73 = (word) (( (ptr) &var_c26944)+4)/* var_c25792 */ ; (* (ptr) tmpAddr73 ) = ( ((word) (fPt) WritePartHeader_P1356) ); (* (( (ptr) tmpAddr73) + 1) ) = 1; }; SOURCE(8536, 62) { word var_c25824; { word pd74; pd74 = (* (( (ptr) (* (( (ptr) gf_c26976)+82)/* var_c24608 */ ))+5) ); var_c25824 = (word) ( *( (fPt) ((* (ptr) pd74 ))))(name_v4724, pd74); }; { W2 var_c25856; var_c25856.f0 = 4096; var_c25856.f1 = 2; { word pd75; pd75 = (* (( (ptr) (* (( (ptr) gf_c26976)+82)/* var_c24608 */ ))+39) ); var_c26944.f6/* out_v7660 */ = (word) ( *( (fPt) ((* (ptr) pd75 ))))(var_c25824, 1, (* (W4Pt) (( (ptr) gf_c26976)+71)/* var_c24224 */ ), 0, 0, (* (W5Pt) ( ( (ptr) gf_c26976)+75)/* var_c24288 */ ) , 1, var_c25856, pd75); }; }; }; SOURCE(9040, 48) box_v7772 = (* (W4Pt) map_v4752 ); SOURCE(9090, 50) { W4 b_v21908; b_v21908 = (* (W4Pt) map_v4752 ); size_v7800.f0 = (b_v21908.f2 - b_v21908.f0); size_v7800.f1 = (b_v21908.f3 - b_v21908.f1); }; SOURCE(9142, 76) { word x76; bpp_v7828 = (x76 = (* (( (ptr) map_v4752)+5) ), MAX( (unsigned) , 1, x76)); }; SOURCE(9220, 41) aisWordsPerLine_v7856 = IOP2( / , (int)(IOP2( * , (int)size_v7800.f1, (int)bpp_v7828) + 15), (int)16); SOURCE(9263, 73) { W4 var_c25952; var_c25952.f0 = 0; var_c25952.f1 = 0; var_c25952.f2 = 1; var_c25952.f3 = size_v7800.f1; { word pd77; pd77 = (* (( (ptr) (* (( (ptr) gf_c26976)+83)/* var_c25504 */ ))+19) ); buf_v7884 = (word) ( *( (fPt) ((* (ptr) pd77 ))))(var_c25952, bpp_v7828, 0, pd77); }; }; SOURCE(9338, 59) base_v7912 = (* (( (ptr) buf_v7884)+8) ); SOURCE(9399, 57) { word x78; word x79; if (( (int)(x78 = size_v7800.f1, x79 = size_v7800.f0, MIN((int)(word), x78, x79)) == (int)0)) { SOURCE(9431, 25) { word var_c0148; var_c0148 = (* (( (ptr) gf_c26976)+38) ); (void) XR_RaiseError((word) (( (bPt) gf_c26976)+160)/* var_c23680 */ , (word) &var_c0148); }; }; }; SOURCE(9458, 59) header_v7688 = (( (((unsigned)(word) Card_P180(BCK(wordsHeader_v7632, 65536)) << 16) >> 16) ) + 2225733632); SOURCE(9519, 84) { word var_c26016; word var_c26048; word var_c26080; word var_c26112; { word idx80; var_c26016 = (word) Card_P180(( idx80 = (word) size_v7800.f0, BCK(idx80, 65536) )); }; { word idx81; var_c26048 = (word) Card_P180(( idx81 = (word) size_v7800.f1, BCK(idx81, 65536) )); }; var_c26080 = (word) Card_P180(3); var_c26112 = (word) Card_P180(1); raster_v7716.f0 = ((var_c26016 << 16) + ( (((unsigned)var_c26048 << 16) >> 16) )); raster_v7716.f1 = ((var_c26080 << 16) + ( (((unsigned)var_c26112 << 16) >> 16) )); raster_v7716.f2 = 131071; }; SOURCE(9605, 80) { word var_c26144; word var_c26176; var_c26144 = (word) Card_P180(bpp_v7828); var_c26176 = (word) Card_P180(BCK(aisWordsPerLine_v7856, 65536)); uca_v7744.f0 = ((var_c26144 << 16) + ( (((unsigned)var_c26176 << 16) >> 16) )); uca_v7744.f1 = (word) -1; }; SOURCE(9695, 64) SOURCE(9696, 63) (void) WriteBytes_P540(var_c26944.f6/* out_v7660 */ , (word) &header_v7688, 4); SOURCE(9762, 89) (void) WritePartHeader_P1356(1, 18, (word) (( (bPt) &var_c26944)+16)/* var_c25792 */ ); SOURCE(9861, 59) SOURCE(9862, 58) (void) WriteBytes_P540(var_c26944.f6/* out_v7660 */ , (word) &raster_v7716, 10); SOURCE(9931, 55) SOURCE(9932, 54) (void) WriteBytes_P540(var_c26944.f6/* out_v7660 */ , (word) &uca_v7744, 8); SOURCE(9989, 339) if ((placement_v4780 != 0)) { SOURCE(10013, 318) { W2 part_v8440; SOURCE(10174, 19) part_v8440 = (* (W2Pt) placement_v4780 ); SOURCE(10195, 63) (void) WritePartHeader_P1356(2, 8, (word) (( (bPt) &var_c26944)+16)/* var_c25792 */ ); SOURCE(10268, 60) SOURCE(10269, 59) (void) WriteBytes_P540(var_c26944.f6/* out_v7660 */ , (word) &part_v8440, 8); }; }; SOURCE(10334, 345) if ((photometry_v4808 != 0)) { SOURCE(10359, 323) { W8 part_v8612; SOURCE(10361, 33) XR_FillWords(&part_v8612, 8, 0); part_v8612.f5 = (word) -1; part_v8612.f6 = (word) -1; SOURCE(10521, 20) part_v8612 = (* (W8Pt) photometry_v4808 ); SOURCE(10543, 65) (void) WritePartHeader_P1356(3, 30, (word) (( (bPt) &var_c26944)+16)/* var_c25792 */ ); SOURCE(10618, 61) SOURCE(10619, 60) (void) WriteBytes_P540(var_c26944.f6/* out_v7660 */ , (word) &part_v8612, 30); }; }; SOURCE(10685, 23) if ((comments_v4836 != 0)) { }; SOURCE(10719, 23) (void) WritePartHeader_P1356(0, 0, (word) (( (bPt) &var_c26944)+16)/* var_c25792 */ ); SOURCE(10758, 31) { word pd82; pd82 = (* (( (ptr) (* (( (ptr) gf_c26976)+81)/* var_c24512 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd82 ))))(var_c26944.f6/* out_v7660 */ , IOP2( * , (int)2, (int)wordsHeader_v7632), pd82); }; SOURCE(10791, 164) { register word s_v8784; register word noName_c26240; { word idx83; s_v8784 = ( idx83 = (word) box_v7772.f0, SGNCK(idx83) ); }; { word idx84; noName_c26240 = ( idx84 = (word) box_v7772.f2, SGNCK(idx84) ); }; if ((s_v8784 >= noName_c26240)) { goto lab_L100015; }; lab_L100018: ; SOURCE(10831, 73) { W2 var_c26272; W2 var_c26304; W2 var_c26336; var_c26272.f0 = 0; var_c26272.f1 = 0; var_c26304.f0 = s_v8784; var_c26304.f1 = box_v7772.f1; var_c26336.f0 = 1; var_c26336.f1 = size_v7800.f1; { word pd85; pd85 = (* (( (ptr) (* (( (ptr) gf_c26976)+83)/* var_c25504 */ ))+49) ); (void) ( *( (fPt) ((* (ptr) pd85 ))))(buf_v7884, map_v4752, var_c26272, var_c26304, var_c26336, 0, pd85); }; }; SOURCE(10914, 41) SOURCE(10915, 40) (void) WriteBytes_P540(var_c26944.f6/* out_v7660 */ , base_v7912, IOP2( * , (int)aisWordsPerLine_v7856, (int)2)); s_v8784 = (s_v8784 + 1); if ((s_v8784 < noName_c26240)) { goto lab_L100018; }; lab_L100015: ; }; SOURCE(10967, 13) { word pd86; pd86 = (* (( (ptr) (* (( (ptr) gf_c26976)+81)/* var_c24512 */ ))+28) ); (void) ( *( (fPt) ((* (ptr) pd86 ))))(var_c26944.f6/* out_v7660 */ , 0, pd86); }; } static void WritePartHeader_P1356(type_v7988, nBytesInPart_v8016, formal_c27008) word type_v7988; word nBytesInPart_v8016; word formal_c27008; { word nWordsTotal_v8828; word part_v8856; formal_c27008 = (formal_c27008 - 16); /* WritePartHeader: */ SOURCE(8038, 467) SOURCE(8114, 68) nWordsTotal_v8828 = IOP2( / , (int)(nBytesInPart_v8016 + 2), (int)2); SOURCE(8327, 53) { word idx87; word idx88; (* (hPt) &part_v8856 ) = (((((type_v7988 & 077) << 2) + ( idx87 = (word) IOP2( / , (int)nWordsTotal_v8828, (int)256), BCK(idx87, 4) )) << 8) + ( idx88 = (word) IOP2( % , (int)nWordsTotal_v8828, (int)256), BCK(idx88, 256) )); }; SOURCE(8382, 56) if ((type_v7988 == 0)) { SOURCE(8401, 37) (* (( (bPt) &part_v8856)+1) ) = 0; part_v8856 = (part_v8856 & 4244635647) | (((0)) << 24); }; SOURCE(8448, 57) SOURCE(8449, 56) (void) WriteBytes_P540((* (( (ptr) formal_c27008)+6) ), (word) &part_v8856, 2); } static word NewSampleMap_P660(scanCount_v4980, scanLength_v5008, bitsPerPixel_v5036) word scanCount_v4980; word scanLength_v5008; word bitsPerPixel_v5036; { register ptr gf_c27040 = (ptr) &globalframe; word map_v5100; /* NewSampleMap: */ SOURCE(10985, 253) SOURCE(10985, 253) map_v5100 = 0; SOURCE(11110, 128) { W4 var_c26400; var_c26400.f0 = 0; var_c26400.f1 = 0; var_c26400.f2 = SGNCK(scanCount_v4980); var_c26400.f3 = SGNCK(scanLength_v5008); { word pd89; pd89 = (* (( (ptr) (* (( (ptr) gf_c27040)+83)/* var_c25504 */ ))+19) ); map_v5100 = (word) ( *( (fPt) ((* (ptr) pd89 ))))(var_c26400, bitsPerPixel_v5036, 0, pd89); }; }; SOURCE(10985, 253) return(map_v5100); } static word ReadSample_P720(map_v5160, line_v5188, pixel_v5216) word map_v5160; word line_v5188; word pixel_v5216; { register ptr gf_c27072 = (ptr) &globalframe; word value_v5260; /* ReadSample: */ SOURCE(11244, 156) SOURCE(11338, 62) { W2 var_c26432; var_c26432.f0 = SGNCK(line_v5188); var_c26432.f1 = SGNCK(pixel_v5216); { word pd90; pd90 = (* (( (ptr) (* (( (ptr) gf_c27072)+83)/* var_c25504 */ ))+42) ); value_v5260 = (word) ( *( (fPt) ((* (ptr) pd90 ))))(map_v5160, var_c26432, pd90); }; }; SOURCE(11244, 156) return(value_v5260); } static void WriteSample_P780(map_v5320, value_v5348, line_v5376, pixel_v5404) word map_v5320; word value_v5348; word line_v5376; word pixel_v5404; { register ptr gf_c27104 = (ptr) &globalframe; /* WriteSample: */ SOURCE(11405, 154) SOURCE(11491, 68) { W2 var_c26464; var_c26464.f0 = SGNCK(line_v5376); var_c26464.f1 = SGNCK(pixel_v5404); { word pd91; pd91 = (* (( (ptr) (* (( (ptr) gf_c27104)+83)/* var_c25504 */ ))+43) ); (void) ( *( (fPt) ((* (ptr) pd91 ))))(map_v5320, var_c26464, value_v5348, 0, pd91); }; }; } static void ReadLine_P840(map_v5464, buffer_v5492, line_v5520) word map_v5464; word buffer_v5492; word line_v5520; { register ptr gf_c27136 = (ptr) &globalframe; /* ReadLine: */ SOURCE(11565, 158) SOURCE(11646, 77) { W2 var_c26496; W2 var_c26528; var_c26496.f0 = SGNCK(line_v5520); var_c26496.f1 = 0; var_c26528.f0 = 0; var_c26528.f1 = 1; { word pd92; pd92 = (* (( (ptr) (* (( (ptr) gf_c27136)+83)/* var_c25504 */ ))+44) ); (void) ( *( (fPt) ((* (ptr) pd92 ))))(map_v5464, var_c26496, var_c26528, buffer_v5492, 0, 2147483647, pd92); }; }; } static void WriteLine_P900(map_v5580, buffer_v5608, line_v5636) word map_v5580; word buffer_v5608; word line_v5636; { register ptr gf_c27168 = (ptr) &globalframe; /* WriteLine: */ SOURCE(11729, 159) SOURCE(11811, 77) { W2 var_c26560; W2 var_c26592; var_c26560.f0 = SGNCK(line_v5636); var_c26560.f1 = 0; var_c26592.f0 = 0; var_c26592.f1 = 1; { word pd93; pd93 = (* (( (ptr) (* (( (ptr) gf_c27168)+83)/* var_c25504 */ ))+47) ); (void) ( *( (fPt) ((* (ptr) pd93 ))))(map_v5580, var_c26560, var_c26592, buffer_v5608, 0, 2147483647 , 0, pd93); }; }; } /* file: AISIOImpl, module: AISIOImpl, compiled at: March 10, 1992 11:59:09 am PST */ extern void XR_install_AISIOImpl() { NoName_Q2316(); } extern void XR_run_AISIOImpl() { XR_Start(&globalframe); }