{"name": "ehci_trace_guest_bug", "code": "unsigned __int64 __fastcall ehci_trace_guest_bug ( __int64 @@a1@@ , const char * @@a2@@ ) { unsigned __int64 @@v3@@ ; @@v3@@ = __readfsqword ( Number ) ; trace_usb_ehci_guest_bug ( @@a2@@ ) ; fprintf ( stderr , String , @@a2@@ ) ; return __readfsqword ( Number ) ^ @@v3@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const char"}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "ehci_free_queue", "code": "unsigned __int64 __fastcall ehci_free_queue ( __int64 @@a1@@ , const char * @@a2@@ ) { __int64 @@v2@@ ; int @@v4@@ ; __int64 @@v5@@ ; unsigned __int64 @@v6@@ ; @@v6@@ = __readfsqword ( Number ) ; if ( * ( _DWORD * ) ( @@a1@@ + Number ) ) @@v2@@ = * ( _QWORD * ) @@a1@@ + Number L ; else @@v2@@ = * ( _QWORD * ) @@a1@@ + Number L ; @@v5@@ = @@v2@@ ; trace_usb_ehci_queue_action ( @@a1@@ , String ) ; @@v4@@ = ehci_cancel_queue ( @@a1@@ ) ; if ( @@a2@@ && @@v4@@ > Number ) ehci_trace_guest_bug ( * ( _QWORD * ) @@a1@@ , @@a2@@ ) ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) * ( _QWORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; else * ( _QWORD * ) ( @@v5@@ + Number ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; * * ( _QWORD * * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; g_free ( @@a1@@ ) ; return __readfsqword ( Number ) ^ @@v6@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const char"}, "location": "r64"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v6", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "ehci_execute", "code": "__int64 __fastcall ehci_execute ( _QWORD * @@a1@@ , __int64 @@a2@@ ) { bool @@v3@@ ; __int64 @@v4@@ ; if ( * ( ( _DWORD * ) @@a1@@ + Number ) && * ( ( _DWORD * ) @@a1@@ + Number ) != Number ) _assert_fail ( String , String , Number , String ) ; if ( ( @@a1@@ [ Number ] & Number ) == Number ) { fwrite ( String , Number , Number , stderr ) ; return Number ; } if ( ( HIWORD ( * ( ( _DWORD * ) @@a1@@ + Number ) ) & Number ) > Number ) { ehci_trace_guest_bug ( * ( _QWORD * ) * @@a1@@ , String ) ; return Number ; } if ( ! ehci_verify_pid ( * @@a1@@ , ( __int64 ) ( @@a1@@ + Number ) ) ) ehci_queue_stopped ( * @@a1@@ ) ; * ( ( _DWORD * ) @@a1@@ + Number ) = ehci_get_pid ( ( __int64 ) ( @@a1@@ + Number ) ) ; * ( _DWORD * ) ( * @@a1@@ + Number L ) = * ( ( _DWORD * ) @@a1@@ + Number ) ; @@v4@@ = usb_ep_get ( * ( _QWORD * ) ( * @@a1@@ + Number L ) , * ( ( unsigned int * ) @@a1@@ + Number ) , ( * ( _DWORD * ) ( * @@a1@@ + Number L ) >> Number ) & Number ) ; if ( ! * ( ( _DWORD * ) @@a1@@ + Number ) ) { if ( ( unsigned int ) ehci_init_transfer ( @@a1@@ ) ) return Number ; @@v3@@ = * ( ( _DWORD * ) @@a1@@ + Number ) == Number && ( * ( ( _DWORD * ) @@a1@@ + Number ) & Number ) == Number ; usb_packet_setup ( @@a1@@ + Number , * ( ( unsigned int * ) @@a1@@ + Number ) , @@v4@@ , Number L , * ( ( unsigned int * ) @@a1@@ + Number ) , @@v3@@ , ( @@a1@@ [ Number ] & Number ) != Number ) ; usb_packet_map ( @@a1@@ + Number , @@a1@@ + Number ) ; * ( ( _DWORD * ) @@a1@@ + Number ) = Number ; } trace_usb_ehci_packet_action ( * @@a1@@ , @@a1@@ , @@a2@@ ) ; usb_handle_packet ( * ( _QWORD * ) ( * @@a1@@ + Number L ) , @@a1@@ + Number ) ; if ( * ( ( int * ) @@a1@@ + Number ) <= Number ) return Number L ; fwrite ( String , Number , Number , stderr ) ; return Number ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "bool", "s": 1}, "location": "r8"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}]} {"name": "ehci_state_fetchqh", "code": "__int64 __fastcall ehci_state_fetchqh ( _DWORD * @@a1@@ , int @@a2@@ ) { __int64 v2 ; __int64 v3 ; __int64 v4 ; int @@v6@@ ; __int64 @@v7@@ ; __int64 @@v8@@ [ Number ] ; @@v8@@ [ Number ] = __readfsqword ( Number ) ; @@v6@@ = ehci_get_fetch_addr ( ( __int64 ) @@a1@@ , @@a2@@ ) ; @@v7@@ = ehci_find_queue_by_qh ( ( __int64 ) @@a1@@ , @@v6@@ , @@a2@@ ) ; if ( ! @@v7@@ ) @@v7@@ = ehci_alloc_queue ( ( __int64 ) @@a1@@ , @@v6@@ , @@a2@@ ) ; if ( ++ * ( _DWORD * ) ( @@v7@@ + Number ) <= Number ) { if ( ( int ) get_dwords ( ( __int64 ) @@a1@@ , * ( _DWORD * ) ( @@v7@@ + Number ) & Number , ( unsigned int * ) @@v8@@ , Number ) >= Number ) { ehci_trace_qh ( @@v7@@ , * ( _DWORD * ) ( @@v7@@ + Number ) & Number , ( unsigned int * ) @@v8@@ ) ; if ( ! ehci_verify_qh ( @@v7@@ , @@v8@@ ) && ( int ) ehci_reset_queue ( @@v7@@ ) > Number ) ehci_trace_guest_bug ( ( __int64 ) @@a1@@ , String ) ; v2 = @@v8@@ [ Number ] ; * ( _QWORD * ) ( @@v7@@ + Number ) = @@v8@@ [ Number ] ; * ( _QWORD * ) ( @@v7@@ + Number ) = v2 ; v3 = @@v8@@ [ Number ] ; * ( _QWORD * ) ( @@v7@@ + Number ) = @@v8@@ [ Number ] ; * ( _QWORD * ) ( @@v7@@ + Number ) = v3 ; v4 = @@v8@@ [ Number ] ; * ( _QWORD * ) ( @@v7@@ + Number ) = @@v8@@ [ Number ] ; * ( _QWORD * ) ( @@v7@@ + Number ) = v4 ; * ( _DWORD * ) ( @@v7@@ + Number ) = * ( _DWORD * ) ( @@v7@@ + Number ) >> Number ; if ( ! * ( _DWORD * ) ( @@v7@@ + Number ) ) * ( _DWORD * ) ( @@v7@@ + Number ) = Number ; if ( ! * ( _QWORD * ) ( @@v7@@ + Number ) ) * ( _QWORD * ) ( @@v7@@ + Number ) = ehci_find_device ( * ( _QWORD * ) @@v7@@ , * ( _BYTE * ) ( @@v7@@ + Number ) & Number ) ; if ( @@a2@@ && ( * ( _DWORD * ) ( @@v7@@ + Number ) & Number ) != Number ) { if ( ( @@a1@@ [ Number ] & Number ) == Number ) { ehci_set_state ( @@a1@@ , @@a2@@ , Number ) ; return Number L ; } ehci_clear_usbsts ( ( __int64 ) @@a1@@ , Number ) ; } if ( ( * ( _DWORD * ) ( @@v7@@ + Number ) & Number ) != Number ) { ehci_set_state ( @@a1@@ , @@a2@@ , Number ) ; } else if ( ( * ( _DWORD * ) ( @@v7@@ + Number ) & Number ) == Number || ( * ( _DWORD * ) ( @@v7@@ + Number ) & Number ) != Number ) { ehci_set_state ( @@a1@@ , @@a2@@ , Number ) ; } else { * ( _DWORD * ) ( @@v7@@ + Number ) = * ( _DWORD * ) ( @@v7@@ + Number ) ; ehci_set_state ( @@a1@@ , @@a2@@ , Number ) ; } } else { @@v7@@ = Number L ; } } else { ehci_set_state ( @@a1@@ , @@a2@@ , Number ) ; @@v7@@ = Number L ; } return @@v7@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v8", "t": {"T": 2, "n": 10, "s": 8, "t": "__int64"}, "location": "s80"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s92"}]} {"name": "ehci_state_fetchqtd", "code": "__int64 __fastcall ehci_state_fetchqtd ( _DWORD * * @@a1@@ ) { __int64 v2 ; __int64 v3 ; unsigned int @@v4@@ ; __int64 v5 ; __int64 v6 ; unsigned int @@v7@@ ; _DWORD * v8 ; _QWORD * v9 ; __int64 @@v10@@ ; __int64 @@v11@@ ; __int64 @@v12@@ ; __int64 @@v13@@ ; unsigned __int64 @@v14@@ ; @@v14@@ = __readfsqword ( Number ) ; @@v7@@ = Number ; if ( ( int ) get_dwords ( ( __int64 ) * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) & Number , ( unsigned int * ) & @@v10@@ , Number ) < Number ) return Number L ; ehci_trace_qtd ( ( __int64 ) @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) & Number , ( unsigned int * ) & @@v10@@ ) ; v8 = @@a1@@ [ Number ] ; if ( v8 ) { if ( ! ehci_verify_qtd ( v8 , & @@v10@@ ) ) { ehci_cancel_queue ( ( __int64 ) @@a1@@ ) ; if ( ( @@v11@@ & Number ) != Number ) ehci_trace_guest_bug ( ( __int64 ) * @@a1@@ , String ) ; v8 = Number L ; } else { v2 = @@v11@@ ; * ( ( _QWORD * ) v8 + Number ) = @@v10@@ ; * ( ( _QWORD * ) v8 + Number ) = v2 ; v3 = @@v13@@ ; * ( ( _QWORD * ) v8 + Number ) = @@v12@@ ; * ( ( _QWORD * ) v8 + Number ) = v3 ; ehci_qh_do_overlay ( ( __int64 ) @@a1@@ ) ; } } if ( ( @@v11@@ & Number ) != Number ) { if ( v8 ) { @@v4@@ = v8 [ Number ] ; if ( @@v4@@ == Number ) { ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; } else if ( @@v4@@ <= Number ) { if ( @@v4@@ <= Number ) { ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; } else { @@v7@@ = ehci_fill_queue ( * * ( ( _QWORD * * ) @@a1@@ [ Number ] + Number ) ) ; ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; } } } else { v9 = ehci_alloc_packet ( ( __int64 ) @@a1@@ ) ; * ( ( _DWORD * ) v9 + Number ) = * ( ( _DWORD * ) @@a1@@ + Number ) ; v5 = @@v11@@ ; v9 [ Number ] = @@v10@@ ; v9 [ Number ] = v5 ; v6 = @@v13@@ ; v9 [ Number ] = @@v12@@ ; v9 [ Number ] = v6 ; ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; } } else { ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; } return @@v7@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD *"}, "location": "r56"}, {"n": "v4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r8"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v11", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v10", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "v7", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s60"}, {"n": "v14", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "ehci_fill_queue", "code": "__int64 __fastcall ehci_fill_queue ( __int64 @@a1@@ ) { __int64 v1 ; __int64 v2 ; __int64 v4 ; __int64 v5 ; __int64 i ; _QWORD * v7 ; int @@v8@@ ; __int64 @@v9@@ ; __int64 * @@v10@@ ; __int64 @@v11@@ ; __int64 @@v12@@ ; __int64 @@v13@@ ; __int64 @@v14@@ ; unsigned __int64 @@v15@@ ; @@v15@@ = __readfsqword ( Number ) ; @@v9@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v10@@ = * ( __int64 * * ) @@a1@@ ; v1 = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v11@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v12@@ = v1 ; v2 = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v13@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v14@@ = v2 ; while ( ( @@v11@@ & Number ) == Number ) { @@v8@@ = @@v11@@ ; for ( i = @@v10@@ [ Number ] ; i ; i = * ( _QWORD * ) ( i + Number ) ) { if ( ( _DWORD ) @@v11@@ == * ( _DWORD * ) ( i + Number ) ) goto LABEL_17 ; } if ( ( int ) get_dwords ( * @@v10@@ , ( unsigned int ) @@v11@@ & Number , ( unsigned int * ) & @@v11@@ , Number ) < Number ) return Number ; ehci_trace_qtd ( ( __int64 ) @@v10@@ , @@v8@@ & Number , ( unsigned int * ) & @@v11@@ ) ; if ( ( @@v12@@ & Number ) == Number ) break ; if ( ! ehci_verify_pid ( ( __int64 ) @@v10@@ , ( __int64 ) & @@v11@@ ) ) { ehci_trace_guest_bug ( * @@v10@@ , String ) ; break ; } v7 = ehci_alloc_packet ( ( __int64 ) @@v10@@ ) ; * ( ( _DWORD * ) v7 + Number ) = @@v8@@ ; v4 = @@v12@@ ; v7 [ Number ] = @@v11@@ ; v7 [ Number ] = v4 ; v5 = @@v14@@ ; v7 [ Number ] = @@v13@@ ; v7 [ Number ] = v5 ; if ( ( unsigned int ) ehci_execute ( v7 , ( __int64 ) String ) == Number ) return Number ; if ( * ( ( _DWORD * ) v7 + Number ) != Number ) _assert_fail ( String , String , Number , String ) ; * ( ( _DWORD * ) v7 + Number ) = Number ; } LABEL_17 : usb_device_flush_ep_queue ( * ( _QWORD * ) ( @@v9@@ + Number ) , @@v9@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v14", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v11", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "v10", "t": {"T": 3, "t": "__int64"}, "location": "s56"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s64"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s68"}, {"n": "v15", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}