{"name": "motion_search", "code": "__int64 __fastcall motion_search ( __int64 @@a1@@ , int @@a2@@ ) { int v2 ; __int64 result ; __int64 @@v4@@ ; __int64 @@v5@@ ; __int64 @@v6@@ ; int @@v7@@ ; int @@v8@@ ; int @@v9@@ ; int @@v10@@ ; int @@v11@@ ; int @@v12@@ ; __int64 @@v13@@ ; __int64 @@v14@@ ; int @@k@@ ; int @@j@@ ; int @@i@@ ; int @@v18@@ ; int @@v19@@ ; @@v6@@ = Number L ; @@v12@@ = * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ * * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ ; if ( @@a2@@ == Number ) { @@v14@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v13@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; } else { @@v14@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v13@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; } for ( @@i@@ = Number ; ; @@i@@ += @@a2@@ ) { result = * ( unsigned int * ) ( @@a1@@ + Number ) ; if ( @@i@@ >= ( int ) result ) break ; for ( @@j@@ = Number ; @@j@@ < * ( _DWORD * ) ( @@a1@@ + Number ) ; @@j@@ += @@a2@@ ) { @@v19@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , Number L , @@a2@@ ) ; @@v6@@ = Number L ; if ( @@a2@@ == Number ) { @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , * ( _QWORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * ( * ( _DWORD * ) ( @@a1@@ + Number ) / Number * ( @@i@@ / Number ) + @@j@@ / Number ) ) , Number ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = * ( _QWORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * ( * ( _DWORD * ) ( @@a1@@ + Number ) / Number * ( @@i@@ / Number ) + @@j@@ / Number ) ) ; } } @@v10@@ = @@i@@ / @@a2@@ * * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ + @@j@@ / @@a2@@ ; if ( @@v10@@ < @@v12@@ && @@v10@@ >= Number ) { @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , * ( _QWORD * ) ( Number L * @@v10@@ + @@v14@@ ) , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = * ( _QWORD * ) ( Number L * @@v10@@ + @@v14@@ ) ; } } if ( ++ @@v10@@ < @@v12@@ && @@v10@@ >= Number ) { @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , * ( _QWORD * ) ( Number L * @@v10@@ + @@v14@@ ) , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = * ( _QWORD * ) ( Number L * @@v10@@ + @@v14@@ ) ; } } @@v10@@ = ( @@i@@ / @@a2@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ + @@j@@ / @@a2@@ ; if ( @@v10@@ < @@v12@@ && @@v10@@ >= Number ) { @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , * ( _QWORD * ) ( Number L * @@v10@@ + @@v14@@ ) , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = * ( _QWORD * ) ( Number L * @@v10@@ + @@v14@@ ) ; } } @@v7@@ = @@i@@ / @@a2@@ * * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ + @@j@@ / @@a2@@ - Number ; @@v8@@ = @@v7@@ - * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ + Number ; @@v9@@ = @@v8@@ + Number ; if ( @@i@@ ) { for ( @@k@@ = Number ; @@k@@ <= Number ; ++ @@k@@ ) { v2 = mid_pred ( * ( _DWORD * ) ( @@v13@@ + Number L * @@v7@@ + Number L * @@k@@ ) , * ( _DWORD * ) ( @@v13@@ + Number L * @@v8@@ + Number L * @@k@@ ) , * ( _DWORD * ) ( @@v13@@ + Number L * @@v9@@ + Number L * @@k@@ ) ) ; * ( ( _DWORD * ) & @@v5@@ + @@k@@ ) = v2 ; } @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , @@v5@@ , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = @@v5@@ ; } for ( @@k@@ = Number ; @@k@@ <= Number ; ++ @@k@@ ) { @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , * ( _QWORD * ) ( Number L * * ( & @@v7@@ + @@k@@ ) + @@v13@@ ) , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = * ( _QWORD * ) ( Number L * * ( & @@v7@@ + @@k@@ ) + @@v13@@ ) ; } } } else if ( @@j@@ ) { @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , * ( _QWORD * ) ( Number L * @@v7@@ + @@v13@@ ) , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = * ( _QWORD * ) ( Number L * @@v7@@ + @@v13@@ ) ; } } @@v5@@ = @@v6@@ ; @@v18@@ = Number ; while ( @@v18@@ != @@v19@@ ) { @@v18@@ = @@v19@@ ; for ( @@k@@ = Number ; @@k@@ <= Number ; ++ @@k@@ ) { LODWORD ( @@v4@@ ) = @@v5@@ + offsets_6224 [ Number * @@k@@ ] ; HIDWORD ( @@v4@@ ) = HIDWORD ( @@v5@@ ) + dword_4024 [ Number * @@k@@ ] ; @@v11@@ = eval_motion_dist ( @@a1@@ , @@j@@ , @@i@@ , @@v4@@ , @@a2@@ ) ; if ( @@v11@@ < @@v19@@ ) { @@v19@@ = @@v11@@ ; @@v6@@ = @@v4@@ ; } } @@v5@@ = @@v6@@ ; } @@v10@@ = @@i@@ / @@a2@@ * * ( _DWORD * ) ( @@a1@@ + Number ) / @@a2@@ + @@j@@ / @@a2@@ ; * ( _QWORD * ) ( @@v13@@ + Number L * @@v10@@ ) = @@v6@@ ; } } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v19", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "v18", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "j", "t": {"T": 1, "n": "int", "s": 4}, "location": "s24"}, {"n": "k", "t": {"T": 1, "n": "int", "s": 4}, "location": "s28"}, {"n": "v14", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "v12", "t": {"T": 1, "n": "int", "s": 4}, "location": "s52"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s56"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s64"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s68"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s72"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s80"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s96"}]}
{"name": "mid_pred", "code": "__int64 __fastcall mid_pred ( signed int @@a1@@ , int @@a2@@ , int @@a3@@ ) { unsigned int v5 ; signed int @@v6@@ ; unsigned int @@v8@@ ; @@v8@@ = @@a2@@ ; v5 = @@v8@@ ; @@v6@@ = @@a1@@ ; if ( @@a1@@ > @@a2@@ ) v5 = @@a1@@ ; if ( @@a1@@ > @@a2@@ ) @@v6@@ = @@a2@@ ; if ( @@v6@@ < @@a3@@ ) @@v6@@ = @@a3@@ ; if ( ( int ) v5 > @@v6@@ ) v5 = @@v6@@ ; return v5 ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "signed int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v6", "t": {"T": 1, "n": "signed int", "s": 4}, "location": "r8"}, {"n": "v8", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4"}]} {"name": "eval_motion_dist", "code": "__int64 __fastcall eval_motion_dist ( __int64 @@a1@@ , int @@a2@@ , int @@a3@@ , __int64 @@a4@@ , int @@a5@@ ) { __int64 @@result@@ ; unsigned int @@v6@@ ; if ( ( int ) @@a4@@ < Number || ( int ) @@a4@@ > Number ) return Number ; if ( SHIDWORD ( @@a4@@ ) < Number || SHIDWORD ( @@a4@@ ) > Number ) return Number ; @@v6@@ = @@a3@@ + HIDWORD ( @@a4@@ ) ; if ( * ( _DWORD * ) ( @@a1@@ + Number ) - @@a5@@ >= ( unsigned int ) ( @@a2@@ + @@a4@@ ) && * ( _DWORD * ) ( @@a1@@ + Number ) - @@a5@@ >= @@v6@@ ) @@result@@ = block_sse ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) ( @@a1@@ + Number ) , @@a2@@ , @@a3@@ , @@a2@@ + ( int ) @@a4@@ , @@v6@@ , * ( _QWORD * ) ( @@a1@@ + Number ) + Number L , * ( _QWORD * ) ( @@a1@@ + Number ) + Number L , @@a5@@ ) ; else @@result@@ = Number ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v6", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s8"}]} {"name": "roq_encode_video", "code": "__int64 __fastcall roq_encode_video ( __int64 @@a1@@ ) { __int64 v1 ; double v2 ; __int64 @@v3@@ ; double v4 ; unsigned __int64 v5 ; __int64 result ; __int64 @@v7@@ ; __int64 @@v8@@ ; __int64 @@v9@@ ; _QWORD * @@s@@ ; int @@i@@ ; @@s@@ = * ( _QWORD * * ) ( @@a1@@ + Number ) ; memset ( @@s@@ , Number , Number ) ; create_cel_evals ( @@a1@@ , @@s@@ ) ; generate_new_codebooks ( @@a1@@ , ( __int64 ) @@s@@ ) ; if ( * ( _DWORD * ) ( @@a1@@ + Number ) ) { motion_search ( @@a1@@ , Number ) ; motion_search ( @@a1@@ , Number ) ; } while ( Number ) { for ( @@i@@ = Number ; @@i@@ < * ( _DWORD * ) ( @@a1@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) / Number ; ++ @@i@@ ) gather_data_for_cel ( Number L * @@i@@ + * @@s@@ , @@a1@@ , ( __int64 ) @@s@@ ) ; if ( * ( ( int * ) @@s@@ + Number ) <= Number ) break ; v1 = * ( _QWORD * ) ( @@a1@@ + Number ) ; if ( v1 < Number ) { @@v3@@ = * ( _QWORD * ) ( @@a1@@ + Number ) & Number L | ( ( unsigned __int64 ) v1 >> Number ) ; v2 = ( double ) ( int ) @@v3@@ + ( double ) ( int ) @@v3@@ ; } else { v2 = ( double ) ( int ) v1 ; } v4 = v2 * Number ; if ( v4 >= Number ) v5 = ( unsigned int ) ( int ) ( v4 - Number ) ^ Number ; else v5 = ( unsigned int ) ( int ) v4 ; * ( _QWORD * ) ( @@a1@@ + Number ) = v5 ; } remap_codebooks ( @@a1@@ , ( __int64 ) @@s@@ ) ; write_codebooks ( @@a1@@ , ( __int64 ) @@s@@ ) ; reconstruct_and_encode_image ( @@a1@@ , ( __int64 ) @@s@@ , * ( unsigned int * ) ( @@a1@@ + Number ) , * ( unsigned int * ) ( @@a1@@ + Number ) , * ( _DWORD * ) ( @@a1@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) / Number ) ; * ( _QWORD * ) ( * ( _QWORD * ) @@a1@@ + Number L ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v9@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = @@v9@@ ; @@v8@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = @@v8@@ ; @@v7@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = @@v7@@ ; av_free ( * @@s@@ ) ; av_free ( @@s@@ [ Number ] ) ; result = @@a1@@ ; ++ * ( _DWORD * ) ( @@a1@@ + Number ) ; return result ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "s", "t": {"T": 3, "t": "_QWORD"}, "location": "s24"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}]}