{"name": "ehci_find_device", "code": "__int64 __fastcall ehci_find_device ( __int64 @@a1@@ , unsigned __int8 @@a2@@ ) { int @@i@@ ; __int64 @@v4@@ ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { if ( ( * ( _DWORD * ) ( @@a1@@ + Number * ( @@i@@ + Number L ) + Number ) & Number ) != Number ) { @@v4@@ = usb_find_device ( Number L * @@i@@ + Number + @@a1@@ , @@a2@@ ) ; if ( @@v4@@ ) return @@v4@@ ; } } return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s28"}]}
{"name": "ehci_process_itd", "code": "__int64 __fastcall ehci_process_itd ( __int64 @@a1@@ , _DWORD * @@a2@@ , unsigned int @@a3@@ ) { int @@v4@@ ; unsigned int @@i@@ ; unsigned int @@v7@@ ; int @@v8@@ ; int @@v9@@ ; unsigned int @@v10@@ ; int @@v11@@ ; int @@v12@@ ; unsigned int @@v13@@ ; int @@v14@@ ; unsigned int @@v15@@ ; unsigned int @@v16@@ ; unsigned int @@v17@@ ; __int64 @@v18@@ ; __int64 @@v19@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; @@v8@@ = @@a2@@ [ Number ] & Number ; @@v9@@ = @@a2@@ [ Number ] & Number ; @@v10@@ = ( @@a2@@ [ Number ] >> Number ) & Number ; @@v11@@ = @@a2@@ [ Number ] & Number ; @@v12@@ = @@a2@@ [ Number ] & Number ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { if ( ( int ) @@a2@@ [ @@i@@ + Number ] < Number ) { @@v13@@ = ( @@a2@@ [ @@i@@ + Number ] >> Number ) & Number ; @@v14@@ = @@a2@@ [ @@i@@ + Number ] & Number ; @@v15@@ = @@a2@@ [ @@v13@@ + Number ] & Number ; @@v16@@ = @@a2@@ [ @@v13@@ + Number ] & Number ; @@v7@@ = HIWORD ( @@a2@@ [ @@i@@ + Number ] ) & Number ; if ( @@v7@@ > @@v12@@ * @@v11@@ ) @@v7@@ = @@v12@@ * @@v11@@ ; if ( @@v7@@ > Number ) return Number ; qemu_sglist_init ( @@a1@@ + Number , * ( _QWORD * ) ( @@a1@@ + Number ) , Number L , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; if ( @@v14@@ + @@v7@@ <= Number ) { qemu_sglist_add ( @@a1@@ + Number , @@v15@@ + @@v14@@ , @@v7@@ ) ; } else { qemu_sglist_add ( @@a1@@ + Number , @@v15@@ + @@v14@@ , ( unsigned int ) ( Number - @@v14@@ ) ) ; qemu_sglist_add ( @@a1@@ + Number , @@v16@@ , @@v14@@ + @@v7@@ - Number ) ; } if ( @@v8@@ ) @@v4@@ = Number ; else @@v4@@ = Number ; @@v17@@ = @@v4@@ ; @@v18@@ = ehci_find_device ( @@a1@@ , @@v9@@ ) ; @@v19@@ = usb_ep_get ( @@v18@@ , @@v17@@ , @@v10@@ ) ; if ( @@v19@@ && * ( _BYTE * ) ( @@v19@@ + Number ) == Number ) { usb_packet_setup ( @@a1@@ + Number , @@v17@@ , @@v19@@ , Number L , @@a3@@ , Number L , ( @@a2@@ [ @@i@@ + Number ] & Number ) != Number ) ; usb_packet_map ( @@a1@@ + Number , @@a1@@ + Number ) ; usb_handle_packet ( @@v18@@ , @@a1@@ + Number ) ; usb_packet_unmap ( @@a1@@ + Number , @@a1@@ + Number ) ; } else { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; } qemu_sglist_destroy ( @@a1@@ + Number ) ; switch ( * ( _DWORD * ) ( @@a1@@ + Number ) ) { case Number : case Number : goto LABEL_19 ; case Number : @@a2@@ [ @@i@@ + Number ] |= Number ; ehci_raise_irq ( @@a1@@ , Number ) ; break ; case Number : * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; break ; case Number : break ; default : fprintf ( stderr , String , * ( unsigned int * ) ( @@a1@@ + Number ) ) ; LABEL_19 : if ( @@v8@@ ) { @@a2@@ [ @@i@@ + Number ] |= Number ; ehci_raise_irq ( @@a1@@ , Number ) ; } break ; } if ( @@v8@@ ) @@a2@@ [ @@i@@ + Number ] = ( * ( _DWORD * ) ( @@a1@@ + Number ) << Number ) & Number | @@a2@@ [ @@i@@ + Number ] & Number ; else @@a2@@ [ @@i@@ + Number ] = ( ( @@v7@@ - * ( _DWORD * ) ( @@a1@@ + Number ) ) << Number ) & Number | @@a2@@ [ @@i@@ + Number ] & Number ; if ( ( @@a2@@ [ @@i@@ + Number ] & Number ) != Number ) ehci_raise_irq ( @@a1@@ , Number ) ; @@a2@@ [ @@i@@ + Number ] &= Number ; } } return Number L ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_DWORD"}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}, {"n": "v19", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v18", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v17", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s36"}, {"n": "v16", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s48"}, {"n": "v15", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s52"}, {"n": "v14", "t": {"T": 1, "n": "int", "s": 4}, "location": "s56"}, {"n": "v13", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s60"}, {"n": "v12", "t": {"T": 1, "n": "int", "s": 4}, "location": "s64"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s68"}, {"n": "v10", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s72"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s76"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s80"}, {"n": "v7", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s84"}, {"n": "i", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s88"}]} {"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"}]}