{"name": "vringh_getdesc_user", "code": "__int64 __fastcall vringh_getdesc_user ( __int64 @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ , __int64 @@a4@@ , unsigned __int16 * @@a5@@ ) { __int64 @@result@@ ; int v9 ; unsigned int v10 ; * @@a5@@ = * ( _DWORD * ) ( @@a1@@ + Number ) ; v9 = _vringh_get_head ( @@a1@@ , ( __int64 ( __fastcall * ) ( __int64 , __int16 * , __int64 ) ) getu16_user , ( _WORD * ) ( @@a1@@ + Number ) ) ; if ( v9 < Number ) return ( unsigned int ) v9 ; if ( * ( _DWORD * ) ( @@a1@@ + Number ) == v9 ) return Number L ; * @@a5@@ = v9 ; v10 = _vringh_iov ( @@a1@@ , * @@a5@@ , @@a2@@ , @@a3@@ , ( unsigned __int8 ( __fastcall * ) ( __int64 , __int64 , __int64 * , __int64 , __int64 ) ) range_check , @@a4@@ , Number , ( __int64 ( __fastcall * ) ( __int64 , __int64 , __int64 ) ) copydesc_user ) ; if ( v10 ) @@result@@ = v10 ; else @@result@@ = Number L ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "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": "__int64", "s": 8}, "location": "r64"}, {"n": "a5", "t": {"T": 3, "t": "unsigned __int16"}, "location": "r72"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]}
{"name": "range_check", "code": "__int64 __fastcall range_check ( __int64 @@a1@@ , unsigned __int64 @@a2@@ , __int64 * @@a3@@ , unsigned __int64 * @@a4@@ , unsigned __int8 ( __fastcall * @@a5@@ ) ( __int64 , unsigned __int64 , unsigned __int64 * ) , __int64 @@a6@@ ) { if ( ( @@a2@@ < * @@a4@@ || @@a2@@ > @@a4@@ [ Number ] ) && @@a5@@ ( @@a1@@ , @@a2@@ , @@a4@@ ) != Number ) return Number L ; if ( @@a2@@ < * @@a4@@ || @@a2@@ > @@a4@@ [ Number ] ) _assert_fail ( String , String , Number , String ) ; if ( * @@a3@@ + @@a2@@ ) { if ( @@a2@@ > * @@a3@@ + @@a2@@ ) { vringh_bad ( String , * @@a3@@ , @@a2@@ , ( __int64 ) @@a4@@ , ( __int64 ) @@a5@@ , @@a6@@ ) ; return Number L ; } if ( * @@a3@@ + @@a2@@ - Number <= @@a4@@ [ Number ] ) return Number L ; } else if ( @@a4@@ [ Number ] == Number ) { return Number L ; } * @@a3@@ = @@a4@@ [ Number ] - @@a2@@ + Number ; return Number L ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "__int64"}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "unsigned __int64"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "r64"}, {"n": "a5", "t": {"T": 9, "n": "unsigned __int8 (__fastcall *)(__int64, unsigned __int64, unsigned __int64 *)"}, "location": "r72"}, {"n": "a6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}]} {"name": "getu16_user", "code": "__int64 __fastcall getu16_user ( _BYTE * @@a1@@ , _WORD * @@a2@@ , unsigned __int16 * @@a3@@ ) { _chk_user_ptr ( ( unsigned __int64 ) @@a3@@ , Number L ) ; * @@a2@@ = vringh16_to_cpu ( @@a1@@ , * @@a3@@ ) ; return Number L ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "unsigned __int16"}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_WORD"}, "location": "r64"}]} {"name": "copydesc_user", "code": "__int64 __fastcall copydesc_user ( _BYTE * @@a1@@ , _BYTE * @@a2@@ , __int64 @@a3@@ ) { __int64 @@result@@ ; if ( ( unsigned int ) copy_from_user ( @@a1@@ , @@a2@@ , @@a3@@ ) ) @@result@@ = Number L ; else @@result@@ = Number L ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_BYTE"}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]}