{"name": "ehci_state_execute", "code": "__int64 __fastcall ehci_state_execute ( _DWORD * * @@a1@@ ) { unsigned int @@v2@@ ; _QWORD * @@v3@@ ; @@v3@@ = @@a1@@ [ Number ] ; if ( ! @@v3@@ ) _assert_fail ( String , String , Number , String ) ; if ( * ( ( _DWORD * ) @@v3@@ + Number ) != * ( ( _DWORD * ) @@a1@@ + Number ) ) _assert_fail ( String , String , Number , String ) ; if ( ( unsigned int ) ehci_qh_do_overlay ( ( __int64 ) @@a1@@ ) ) return Number ; if ( * ( ( _DWORD * ) @@a1@@ + Number ) || * ( ( _DWORD * ) @@a1@@ + Number ) ) { if ( * ( ( _DWORD * ) @@a1@@ + Number ) ) ehci_set_usbsts ( ( __int64 ) * @@a1@@ , Number ) ; @@v2@@ = ehci_execute ( @@v3@@ , ( __int64 ) String ) ; if ( @@v2@@ != Number ) { if ( * ( ( _DWORD * ) @@v3@@ + Number ) == Number ) { ehci_flush_qh ( ( __int64 ) @@a1@@ ) ; trace_usb_ehci_packet_action ( * @@v3@@ , @@v3@@ , String ) ; * ( ( _DWORD * ) @@v3@@ + Number ) = Number ; ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; if ( * ( ( _DWORD * ) @@a1@@ + Number ) ) @@v2@@ = ehci_fill_queue ( ( __int64 ) @@v3@@ ) ; else @@v2@@ = Number ; } else { ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; @@v2@@ = Number ; } } } else { ehci_set_state ( * @@a1@@ , * ( ( _DWORD * ) @@a1@@ + Number ) , Number ) ; @@v2@@ = Number ; } return @@v2@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD *"}, "location": "r56"}, {"n": "v3", "t": {"T": 3, "t": "_QWORD"}, "location": "s16"}, {"n": "v2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s20"}]}
{"name": "ehci_set_usbsts", "code": "unsigned __int64 __fastcall ehci_set_usbsts ( __int64 @@a1@@ , int @@a2@@ ) { unsigned __int64 @@v3@@ ; @@v3@@ = __readfsqword ( Number ) ; if ( ( @@a2@@ & * ( _DWORD * ) ( @@a1@@ + Number ) ) != @@a2@@ ) { ehci_trace_usbsts ( @@a2@@ , Number ) ; * ( _DWORD * ) ( @@a1@@ + Number ) |= @@a2@@ ; } return __readfsqword ( Number ) ^ @@v3@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "ehci_set_state", "code": "unsigned __int64 __fastcall ehci_set_state ( _DWORD * @@a1@@ , int @@a2@@ , unsigned int @@a3@@ ) { const char * v3 ; const char * v4 ; unsigned __int64 @@v7@@ ; @@v7@@ = __readfsqword ( Number ) ; if ( @@a2@@ ) { v3 = state2str ( @@a3@@ ) ; trace_usb_ehci_state ( String , v3 ) ; @@a1@@ [ Number ] = @@a3@@ ; if ( @@a1@@ [ Number ] == Number ) { ehci_clear_usbsts ( ( __int64 ) @@a1@@ , Number ) ; ehci_update_halt ( @@a1@@ ) ; } else { ehci_set_usbsts ( ( __int64 ) @@a1@@ , Number ) ; } } else { v4 = state2str ( @@a3@@ ) ; trace_usb_ehci_state ( String , v4 ) ; @@a1@@ [ Number ] = @@a3@@ ; if ( @@a1@@ [ Number ] == Number ) { ehci_clear_usbsts ( ( __int64 ) @@a1@@ , Number ) ; ehci_update_halt ( @@a1@@ ) ; } else { ehci_set_usbsts ( ( __int64 ) @@a1@@ , Number ) ; } } return __readfsqword ( Number ) ^ @@v7@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "ehci_flush_qh", "code": "unsigned __int64 __fastcall ehci_flush_qh ( __int64 @@a1@@ ) { unsigned __int64 @@v2@@ ; @@v2@@ = __readfsqword ( Number ) ; put_dwords ( * ( _QWORD * ) @@a1@@ , ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) + Number , ( unsigned int * ) ( @@a1@@ + Number ) , Number ) ; return __readfsqword ( Number ) ^ @@v2@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v2", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "ehci_qh_do_overlay", "code": "__int64 __fastcall ehci_qh_do_overlay ( __int64 @@a1@@ ) { int @@v1@@ ; int @@i@@ ; unsigned int @@v4@@ ; int @@v5@@ ; _DWORD * @@v6@@ ; @@v6@@ = * ( _DWORD * * ) ( @@a1@@ + Number ) ; if ( ! @@v6@@ ) _assert_fail ( String , String , Number , String ) ; if ( @@v6@@ [ Number ] != * ( _DWORD * ) ( @@a1@@ + Number ) ) _assert_fail ( String , String , Number , String ) ; @@v4@@ = * ( _DWORD * ) ( @@a1@@ + Number ) & Number ; @@v5@@ = * ( _DWORD * ) ( @@a1@@ + Number ) & Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v6@@ [ Number ] ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v6@@ [ Number ] ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v6@@ [ Number ] ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v6@@ [ Number ] ; if ( ( ( * ( _DWORD * ) ( @@a1@@ + Number ) >> Number ) & Number ) == Number ) { * ( _DWORD * ) ( @@a1@@ + Number ) &= Number ; * ( _DWORD * ) ( @@a1@@ + Number ) |= @@v5@@ ; } * ( _DWORD * ) ( @@a1@@ + Number ) = ( Number * ( * ( _DWORD * ) ( @@a1@@ + Number ) >> Number ) ) & Number | * ( _DWORD * ) ( @@a1@@ + Number ) & Number ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) * ( _DWORD * ) ( @@a1@@ + Number * ( @@i@@ + Number L ) + Number ) = @@v6@@ [ @@i@@ + Number ] ; if ( ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) == Number ) { * ( _DWORD * ) ( @@a1@@ + Number ) &= Number ; * ( _DWORD * ) ( @@a1@@ + Number ) |= @@v4@@ ; } @@v1@@ = * ( _DWORD * ) ( @@a1@@ + Number ) ; LOBYTE ( @@v1@@ ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v1@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) &= Number ; ehci_flush_qh ( @@a1@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}, {"n": "v6", "t": {"T": 3, "t": "_DWORD"}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s32"}, {"n": "v4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s36"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s40"}]} {"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_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"}]} {"name": "ehci_advance_state", "code": "unsigned __int64 __fastcall ehci_advance_state ( _DWORD * @@a1@@ , int @@a2@@ ) { int @@v3@@ ; __int64 @@v4@@ ; unsigned __int64 @@v5@@ ; @@v5@@ = __readfsqword ( Number ) ; @@v4@@ = Number L ; do { switch ( ( unsigned int ) ehci_get_state ( ( __int64 ) @@a1@@ , @@a2@@ ) ) { case Number : if ( ! @@v4@@ ) _assert_fail ( String , String , Number , String ) ; if ( @@a2@@ ) @@a1@@ [ Number ] = Number ; @@v3@@ = ehci_state_executing ( ( _DWORD * * ) @@v4@@ ) ; break ; case Number : @@v3@@ = ehci_state_waitlisthead ( @@a1@@ , @@a2@@ ) ; break ; case Number : @@v3@@ = ehci_state_fetchentry ( @@a1@@ , @@a2@@ ) ; break ; case Number : @@v4@@ = ehci_state_fetchqh ( @@a1@@ , @@a2@@ ) ; if ( @@v4@@ ) { if ( @@a2@@ != * ( _DWORD * ) ( @@v4@@ + Number ) ) _assert_fail ( String , String , Number , String ) ; @@v3@@ = Number ; } else { @@v3@@ = Number ; } break ; case Number : @@v3@@ = ehci_state_fetchitd ( @@a1@@ , @@a2@@ ) ; break ; case Number : @@v3@@ = ehci_state_fetchsitd ( @@a1@@ , @@a2@@ ) ; break ; case Number : if ( ! @@v4@@ ) _assert_fail ( String , String , Number , String ) ; @@v3@@ = ehci_state_advqueue ( @@v4@@ ) ; break ; case Number : if ( ! @@v4@@ ) _assert_fail ( String , String , Number , String ) ; @@v3@@ = ehci_state_fetchqtd ( ( _DWORD * * ) @@v4@@ ) ; break ; case Number : if ( ! @@v4@@ ) _assert_fail ( String , String , Number , String ) ; @@v3@@ = ehci_state_execute ( ( _DWORD * * ) @@v4@@ ) ; if ( @@a2@@ ) @@a1@@ [ Number ] = Number ; break ; case Number : if ( ! @@v4@@ ) _assert_fail ( String , String , Number , String ) ; @@v3@@ = ehci_state_writeback ( ( _DWORD * * ) @@v4@@ ) ; if ( ! @@a2@@ ) @@a1@@ [ Number ] = Number ; break ; case Number : if ( ! @@v4@@ ) _assert_fail ( String , String , Number , String ) ; @@v3@@ = ehci_state_horizqh ( ( _DWORD * * ) @@v4@@ ) ; break ; default : fwrite ( String , Number , Number , stderr ) ; @@v3@@ = Number ; g_assertion_message_expr ( Number L , String , Number L , String , Number L ) ; break ; } if ( @@v3@@ < Number ) { fwrite ( String , Number , Number , stderr ) ; ehci_reset ( ( __int64 ) @@a1@@ ) ; @@v3@@ = Number ; } } while ( @@v3@@ ) ; return __readfsqword ( Number ) ^ @@v5@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v3", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v5", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}