{"name": "bam_cat", "code": "__int64 __fastcall bam_cat ( int @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ , const char * @@a4@@ ) { __int64 v4 ; unsigned int v5 ; __int64 result ; __int64 v7 ; unsigned int v8 ; int @@v11@@ ; char @@ptr@@ [ Number ] ; int @@v13@@ ; int @@v14@@ ; char @@v15@@ ; char @@v16@@ ; int @@v17@@ ; FILE * @@s@@ ; __int64 @@v19@@ ; __int64 @@v20@@ ; void * @@src@@ ; __int64 @@v22@@ ; int @@v23@@ ; int @@v24@@ ; int @@i@@ ; @@v11@@ = @@a1@@ ; @@v23@@ = Number ; if ( ! strcmp ( @@a4@@ , String ) ) { v5 = fileno ( stdout ) ; v4 = bgzf_dopen ( v5 , String ) ; } else { v4 = bgzf_open ( @@a4@@ , String ) ; } @@v22@@ = v4 ; if ( v4 ) { if ( @@a3@@ ) bam_header_write ( @@v22@@ , @@a3@@ ) ; @@src@@ = malloc ( Number ) ; for ( @@i@@ = Number ; @@i@@ < @@v11@@ ; ++ @@i@@ ) { if ( ! strcmp ( * ( const char * * ) ( Number L * @@i@@ + @@a2@@ ) , String ) ) { v8 = fileno ( stdin ) ; v7 = bgzf_dopen ( v8 , String ) ; } else { v7 = bgzf_open ( * ( _QWORD * ) ( Number L * @@i@@ + @@a2@@ ) , String ) ; } @@v20@@ = v7 ; if ( ! v7 ) { fprintf ( stderr , String , String , * ( const char * * ) ( Number L * @@i@@ + @@a2@@ ) ) ; return Number ; } if ( ( * ( _BYTE * ) ( @@v20@@ + Number ) & Number ) != Number ) return Number ; @@v19@@ = bam_header_read ( @@v20@@ ) ; if ( ! @@a3@@ && ! @@i@@ ) bam_header_write ( @@v22@@ , @@v19@@ ) ; if ( * ( _DWORD * ) ( @@v20@@ + Number ) < * ( _DWORD * ) ( @@v20@@ + Number ) ) { bgzf_write ( @@v22@@ , * ( int * ) ( @@v20@@ + Number ) + * ( _QWORD * ) ( @@v20@@ + Number ) , * ( _DWORD * ) ( @@v20@@ + Number ) - * ( _DWORD * ) ( @@v20@@ + Number ) ) ; bgzf_flush ( @@v22@@ ) ; } @@v24@@ = Number ; @@s@@ = * ( FILE * * ) ( @@v22@@ + Number ) ; while ( Number ) { @@v17@@ = knet_read ( * ( _QWORD * ) ( @@v20@@ + Number ) , @@src@@ , Number ) ; if ( @@v17@@ <= Number ) break ; if ( @@v17@@ >= @@v23@@ ) { if ( @@v24@@ ) fwrite ( @@ptr@@ , Number , @@v23@@ , @@s@@ ) ; @@v17@@ -= @@v23@@ ; memcpy ( @@ptr@@ , ( char * ) @@src@@ + @@v17@@ , @@v23@@ ) ; fwrite ( @@src@@ , Number , @@v17@@ , @@s@@ ) ; } else { @@v13@@ = @@v23@@ - @@v17@@ ; if ( ! @@v24@@ ) { fprintf ( stderr , String , String , * ( const char * * ) ( Number L * @@i@@ + @@a2@@ ) ) ; return Number ; } fwrite ( @@ptr@@ , Number , @@v17@@ , @@s@@ ) ; memcpy ( @@ptr@@ , & @@ptr@@ [ @@v17@@ ] , @@v13@@ ) ; memcpy ( & @@ptr@@ [ @@v13@@ ] , @@src@@ , @@v17@@ ) ; } @@v24@@ = Number ; } @@v16@@ = @@ptr@@ [ Number ] ; @@v15@@ = @@ptr@@ [ Number ] ; @@v14@@ = * ( _DWORD * ) & @@ptr@@ [ @@v23@@ - Number ] ; if ( @@ptr@@ [ Number ] != Number || @@v15@@ != Number || @@v14@@ ) { fprintf ( stderr , String , String , * ( const char * * ) ( Number L * @@i@@ + @@a2@@ ) ) ; fwrite ( String , Number , Number , stderr ) ; fwrite ( @@ptr@@ , Number , @@v23@@ , @@s@@ ) ; } bam_header_destroy ( @@v19@@ ) ; bgzf_close ( @@v20@@ ) ; } free ( @@src@@ ) ; bgzf_close ( @@v22@@ ) ; result = Number L ; } else { fprintf ( stderr , String , String , @@a4@@ ) ; result = Number L ; } return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "const char"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "ptr", "t": {"T": 2, "n": 40, "s": 1, "t": "char"}, "location": "s112"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s116"}, {"n": "v23", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "v22", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "src", "t": {"T": 3, "t": "void"}, "location": "s32"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}, {"n": "v20", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v19", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "s", "t": {"T": 3, "t": "FILE"}, "location": "s56"}, {"n": "v17", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v16", "t": {"T": 1, "n": "char", "s": 1}, "location": "s61"}, {"n": "v15", "t": {"T": 1, "n": "char", "s": 1}, "location": "s62"}, {"n": "v14", "t": {"T": 1, "n": "int", "s": 4}, "location": "s68"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s72"}, {"n": "v24", "t": {"T": 1, "n": "int", "s": 4}, "location": "s8"}]}
{"name": "main_cat", "code": "__int64 __fastcall main_cat ( int @@a1@@ , __int64 @@a2@@ ) { __int64 result ; const char * v3 ; __int64 @@v4@@ ; unsigned int @@v5@@ ; int @@v6@@ ; char * @@ptr@@ ; __int64 @@v8@@ ; @@v8@@ = Number L ; @@ptr@@ = Number L ; while ( Number ) { @@v6@@ = getopt ( @@a1@@ , ( char * const * ) @@a2@@ , String ) ; if ( @@v6@@ < Number ) break ; if ( @@v6@@ == Number ) { @@v4@@ = sam_open ( optarg ) ; if ( ! @@v4@@ ) { fprintf ( stderr , String , String , * ( const char * * ) ( @@a2@@ + Number ) ) ; return Number L ; } @@v8@@ = sam_header_read ( @@v4@@ ) ; sam_close ( @@v4@@ ) ; } else if ( @@v6@@ == Number ) { @@ptr@@ = strdup ( optarg ) ; } } if ( @@a1@@ - optind > Number ) { if ( @@ptr@@ ) v3 = @@ptr@@ ; else v3 = String ; @@v5@@ = bam_cat ( @@a1@@ - optind , Number L * optind + @@a2@@ , @@v8@@ , v3 ) ; free ( @@ptr@@ ) ; result = @@v5@@ ; } else { fwrite ( String , Number , Number , stderr ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "ptr", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v5", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s24"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}