{"name": "ehci_periodic_enabled", "code": "_BOOL8 __fastcall ehci_periodic_enabled ( __int64 @@a1@@ ) { return ehci_enabled ( @@a1@@ ) && ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) != Number ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]}
{"name": "ehci_enabled", "code": "bool __fastcall ehci_enabled ( __int64 @@a1@@ ) { return ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) != Number ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]} {"name": "ehci_opreg_write", "code": "unsigned __int64 __fastcall ehci_opreg_write ( __int64 @@a1@@ , unsigned __int64 @@a2@@ , unsigned int @@a3@@ ) { const char * v4 ; unsigned int @@v5@@ ; const char * v6 ; __int64 @@v8@@ ; int @@i@@ ; unsigned int @@v10@@ ; unsigned int * @@v11@@ ; unsigned __int64 @@v12@@ ; LODWORD ( @@v8@@ ) = @@a3@@ ; @@v12@@ = __readfsqword ( Number ) ; @@v11@@ = ( unsigned int * ) ( @@a1@@ + Number + Number * ( @@a2@@ >> Number ) ) ; @@v10@@ = * @@v11@@ ; v4 = addr2str ( @@a2@@ ) ; trace_usb_ehci_opreg_write ( ( unsigned int ) @@a2@@ + * ( unsigned __int16 * ) ( @@a1@@ + Number ) , v4 , @@a3@@ ) ; if ( @@a2@@ > Number ) { if ( @@a2@@ == Number ) { @@v8@@ &= Number ; if ( @@v8@@ ) { for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) handle_port_owner_write ( @@a1@@ , @@i@@ , Number ) ; } } } else { switch ( @@a2@@ ) { case Number : if ( ( @@v8@@ & Number ) != Number ) { ehci_reset ( @@a1@@ ) ; LODWORD ( @@v8@@ ) = * ( _DWORD * ) ( @@a1@@ + Number ) ; } else { if ( ( @@v8@@ & Number ) != Number && ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) == Number ) { fprintf ( stderr , String , @@v8@@ & Number ) ; LODWORD ( @@v8@@ ) = @@v8@@ & Number ; } if ( ( @@v8@@ & Number ) != Number ) { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; qemu_bh_schedule ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; trace_usb_ehci_doorbell_ring ( ) ; } if ( ( ( ( unsigned __int8 ) @@v8@@ ^ ( unsigned __int8 ) * ( _DWORD * ) ( @@a1@@ + Number ) ) & Number ) != Number ) { if ( * ( _DWORD * ) ( @@a1@@ + Number ) == Number ) * ( _QWORD * ) ( @@a1@@ + Number ) = qemu_clock_get_ns ( Number L ) ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v8@@ ; ehci_update_halt ( ( _DWORD * ) @@a1@@ ) ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; qemu_bh_schedule ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; } } break ; case Number : ehci_clear_usbsts ( @@a1@@ , @@v8@@ & Number ) ; LODWORD ( @@v8@@ ) = * ( _DWORD * ) ( @@a1@@ + Number ) ; ehci_update_irq ( @@a1@@ ) ; break ; case Number : LODWORD ( @@v8@@ ) = @@v8@@ & Number ; if ( ehci_enabled ( @@a1@@ ) && ( @@v8@@ & Number ) != Number ) qemu_bh_schedule ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; break ; case Number : LODWORD ( @@v8@@ ) = @@v8@@ & Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@v8@@ ; break ; case Number : if ( ehci_periodic_enabled ( @@a1@@ ) ) fwrite ( String , Number , Number , stderr ) ; break ; case Number : if ( ehci_async_enabled ( @@a1@@ ) ) fwrite ( String , Number , Number , stderr ) ; break ; default : break ; } } * @@v11@@ = @@v8@@ ; @@v5@@ = * @@v11@@ ; v6 = addr2str ( @@a2@@ ) ; trace_usb_ehci_opreg_change ( * ( unsigned __int16 * ) ( @@a1@@ + Number ) + ( unsigned int ) @@a2@@ , v6 , @@v5@@ , @@v10@@ ) ; return __readfsqword ( Number ) ^ @@v12@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "v5", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r32"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "r64"}, {"n": "v12", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s24"}, {"n": "v11", "t": {"T": 3, "t": "unsigned int"}, "location": "s32"}, {"n": "v10", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s44"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s48"}, {"n": "v8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s72"}]} {"name": "ehci_advance_periodic_state", "code": "unsigned __int64 __fastcall ehci_advance_periodic_state ( _DWORD * @@a1@@ ) { int @@v1@@ ; int @@v3@@ ; int @@v4@@ ; unsigned int @@v5@@ ; unsigned __int64 @@v6@@ ; @@v6@@ = __readfsqword ( Number ) ; @@v4@@ = Number ; @@v1@@ = ehci_get_state ( ( __int64 ) @@a1@@ , Number ) ; if ( @@v1@@ == Number ) { if ( ( @@a1@@ [ Number ] & Number ) != Number || ! ehci_periodic_enabled ( ( __int64 ) @@a1@@ ) ) return __readfsqword ( Number ) ^ @@v6@@ ; ehci_set_state ( @@a1@@ , @@v4@@ , Number ) ; } else if ( @@v1@@ != Number ) { fprintf ( stderr , String , ( unsigned int ) @@a1@@ [ Number ] ) ; g_assertion_message_expr ( Number L , String , Number L , String , Number L ) ; return __readfsqword ( Number ) ^ @@v6@@ ; } if ( ( @@a1@@ [ Number ] & Number ) != Number || ehci_periodic_enabled ( ( __int64 ) @@a1@@ ) ) { @@v5@@ = @@a1@@ [ Number ] & Number ; if ( @@v5@@ ) { @@v5@@ |= ( @@a1@@ [ Number ] >> Number ) & Number ; if ( ( int ) get_dwords ( ( __int64 ) @@a1@@ , @@v5@@ , ( unsigned int * ) & @@v3@@ , Number ) >= Number ) { ehci_set_fetch_addr ( ( __int64 ) @@a1@@ , @@v4@@ , @@v3@@ ) ; ehci_set_state ( @@a1@@ , @@v4@@ , Number ) ; ehci_advance_state ( @@a1@@ , @@v4@@ ) ; ehci_queues_rip_unused ( ( __int64 ) @@a1@@ , @@v4@@ ) ; } } } else { ehci_queues_rip_all ( ( __int64 ) @@a1@@ , @@v4@@ ) ; ehci_set_state ( @@a1@@ , @@v4@@ , Number ) ; } return __readfsqword ( Number ) ^ @@v6@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}, {"n": "v5", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v3", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v6", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "ehci_frame_timer", "code": "unsigned __int64 __fastcall ehci_frame_timer ( __int64 @@a1@@ ) { int @@v2@@ ; int @@v3@@ ; int @@i@@ ; int @@v5@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; unsigned __int64 @@v8@@ ; @@v8@@ = __readfsqword ( Number ) ; @@v2@@ = Number ; @@v7@@ = qemu_clock_get_ns ( Number L ) ; @@v3@@ = ( @@v7@@ - * ( _QWORD * ) ( @@a1@@ + Number ) ) / Number ; if ( ! ehci_periodic_enabled ( @@a1@@ ) && * ( _DWORD * ) ( @@a1@@ + Number ) == Number ) { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; ehci_update_frindex ( ( _DWORD * ) @@a1@@ , @@v3@@ ) ; * ( _QWORD * ) ( @@a1@@ + Number ) += Number * @@v3@@ ; } else { @@v2@@ = Number ; if ( Number * * ( _DWORD * ) ( @@a1@@ + Number ) < ( unsigned int ) @@v3@@ ) { @@v5@@ = @@v3@@ - Number * * ( _DWORD * ) ( @@a1@@ + Number ) ; ehci_update_frindex ( ( _DWORD * ) @@a1@@ , @@v5@@ ) ; * ( _QWORD * ) ( @@a1@@ + Number ) += Number * @@v5@@ ; @@v3@@ -= @@v5@@ ; } for ( @@i@@ = Number ; @@i@@ < @@v3@@ ; ++ @@i@@ ) { if ( @@i@@ > Number ) { ehci_commit_irq ( ( _DWORD * ) @@a1@@ ) ; if ( ( ( unsigned __int8 ) * ( _DWORD * ) ( @@a1@@ + Number ) & ( unsigned __int8 ) * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) != Number ) break ; } if ( * ( _DWORD * ) ( @@a1@@ + Number ) ) -- * ( _DWORD * ) ( @@a1@@ + Number ) ; ehci_update_frindex ( ( _DWORD * ) @@a1@@ , Number ) ; if ( ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) == Number ) ehci_advance_periodic_state ( ( _DWORD * ) @@a1@@ ) ; * ( _QWORD * ) ( @@a1@@ + Number ) += Number L ; } } if ( * ( _DWORD * ) ( @@a1@@ + Number ) ) { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; } else if ( * ( _DWORD * ) ( @@a1@@ + Number ) < * ( _DWORD * ) ( @@a1@@ + Number ) >> Number ) { ++ * ( _DWORD * ) ( @@a1@@ + Number ) ; } if ( ehci_async_enabled ( @@a1@@ ) || * ( _DWORD * ) ( @@a1@@ + Number ) != Number ) { ++ @@v2@@ ; ehci_advance_async_state ( ( _DWORD * ) @@a1@@ ) ; } ehci_commit_irq ( ( _DWORD * ) @@a1@@ ) ; if ( * ( _DWORD * ) ( @@a1@@ + Number ) ) { ++ @@v2@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; } if ( ehci_enabled ( @@a1@@ ) && ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) != Number ) ++ @@v2@@ ; if ( @@v2@@ ) { if ( * ( _BYTE * ) ( @@a1@@ + Number ) && ( * ( _DWORD * ) ( @@a1@@ + Number ) & Number ) != Number ) { @@v6@@ = get_ticks_per_sec ( ) / Number + @@v7@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = Number ; } else { @@v6@@ = ( unsigned int ) ( * ( _DWORD * ) ( @@a1@@ + Number ) + Number ) * get_ticks_per_sec ( ) / Number + @@v7@@ ; } timer_mod ( * ( _QWORD * ) ( @@a1@@ + Number ) , @@v6@@ ) ; } return __readfsqword ( Number ) ^ @@v8@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s44"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s48"}, {"n": "v3", "t": {"T": 1, "n": "int", "s": 4}, "location": "s52"}, {"n": "v2", "t": {"T": 1, "n": "int", "s": 4}, "location": "s56"}, {"n": "v8", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}