{"name": "ide_dma_restart", "code": "__int64 __fastcall ide_dma_restart ( _DWORD * @@a1@@ , int @@a2@@ ) { __int64 @@v3@@ ; @@v3@@ = * ( _QWORD * ) ( * ( _QWORD * ) @@a1@@ + Number L ) ; ide_set_sector ( ( __int64 ) @@a1@@ , * ( _QWORD * ) ( @@v3@@ + Number ) ) ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = * ( _DWORD * ) ( @@v3@@ + Number ) ; * ( _DWORD * ) ( @@v3@@ + Number ) = * ( _DWORD * ) ( @@v3@@ + Number ) ; if ( @@a2@@ ) * ( _QWORD * ) ( @@v3@@ + Number ) = ide_read_dma_cb ; else * ( _QWORD * ) ( @@v3@@ + Number ) = ide_write_dma_cb ; return ide_dma_start ( ( __int64 ) @@a1@@ , * ( _QWORD * ) ( @@v3@@ + Number ) ) ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}
{"name": "ide_set_sector", "code": "__int64 __fastcall ide_set_sector ( __int64 @@a1@@ , signed __int64 @@a2@@ ) { __int64 @@result@@ ; unsigned int @@v3@@ ; if ( ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) != Number ) { if ( * ( _BYTE * ) ( @@a1@@ + Number ) ) { * ( _WORD * ) ( @@a1@@ + Number ) = @@a2@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = BYTE2 ( @@a2@@ ) ; * ( _WORD * ) ( @@a1@@ + Number ) = ( unsigned __int64 ) @@a2@@ >> Number ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = BYTE5 ( @@a2@@ ) ; } else { * ( _BYTE * ) ( @@a1@@ + Number ) = * ( _BYTE * ) ( @@a1@@ + Number ) & Number | BYTE3 ( @@a2@@ ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = BYTE2 ( @@a2@@ ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = BYTE1 ( @@a2@@ ) ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = @@a2@@ ; } } else { @@v3@@ = @@a2@@ % ( * ( _DWORD * ) ( @@a1@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) ) ; * ( _WORD * ) ( @@a1@@ + Number ) = @@a2@@ / ( * ( _DWORD * ) ( @@a1@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = ( @@v3@@ / * ( _DWORD * ) ( @@a1@@ + Number ) ) & Number | * ( _BYTE * ) ( @@a1@@ + Number ) & Number ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = @@v3@@ % * ( _DWORD * ) ( @@a1@@ + Number ) + Number ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "signed __int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s8"}]} {"name": "ide_read_dma_cb", "code": "__int64 __fastcall ide_read_dma_cb ( __int64 @@a1@@ , int @@a2@@ ) { __int64 @@result@@ ; int v3 ; int v4 ; __int64 @@v5@@ ; signed __int64 @@v6@@ ; @@v5@@ = bmdma_active_if ( @@a1@@ ) ; if ( @@a2@@ >= Number || ( @@result@@ = ide_handle_rw_error ( ( __int64 * ) @@v5@@ , - @@a2@@ , Number ) , ! ( _DWORD ) @@result@@ ) ) { v3 = * ( int * ) ( @@v5@@ + Number ) >> Number ; @@v6@@ = ide_get_sector ( @@v5@@ ) ; if ( v3 > Number ) { dma_buf_commit ( @@v5@@ ) ; @@v6@@ += v3 ; ide_set_sector ( @@v5@@ , @@v6@@ ) ; * ( _DWORD * ) ( @@v5@@ + Number ) -= v3 ; } if ( ! * ( _DWORD * ) ( @@v5@@ + Number ) ) { * ( _BYTE * ) ( @@v5@@ + Number ) = Number ; ide_set_irq ( * ( _QWORD * ) @@v5@@ ) ; LABEL_7 : * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; * ( _BYTE * ) ( @@a1@@ + Number ) |= Number ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; * ( _BYTE * ) ( @@a1@@ + Number ) = Number ; @@result@@ = @@a1@@ ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; return @@result@@ ; } v4 = * ( _DWORD * ) ( @@v5@@ + Number ) ; * ( _DWORD * ) ( @@v5@@ + Number ) = Number ; * ( _DWORD * ) ( @@v5@@ + Number ) = v4 << Number ; if ( ! dma_buf_prepare ( ( _DWORD * ) @@a1@@ ) ) goto LABEL_7 ; * ( _QWORD * ) ( @@a1@@ + Number ) = dma_bdrv_read ( * ( _QWORD * ) ( @@v5@@ + Number ) , @@v5@@ + Number , @@v6@@ , ide_read_dma_cb , @@a1@@ ) ; @@result@@ = ide_dma_submit_check ( @@v5@@ , ( __int64 ( __fastcall * ) ( __int64 , __int64 ) ) ide_read_dma_cb , @@a1@@ ) ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v6", "t": {"T": 1, "n": "signed __int64", "s": 8}, "location": "s8"}]} {"name": "ide_dma_restart_bh", "code": "__int64 __fastcall ide_dma_restart_bh ( __int64 @@a1@@ ) { __int64 v1 ; __int64 result ; __int64 v3 ; _BOOL4 @@v4@@ ; qemu_bh_delete ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; @@v4@@ = ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) != Number ; if ( ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) != Number ) { * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; v1 = bmdma_active_if ( @@a1@@ ) ; result = ide_dma_restart ( v1 , @@v4@@ ) ; } else { result = * ( _BYTE * ) ( @@a1@@ + Number ) & Number ; if ( ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) != Number ) { * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; v3 = bmdma_active_if ( @@a1@@ ) ; if ( @@v4@@ ) result = ide_sector_read ( v3 ) ; else result = ide_sector_write ( v3 ) ; } } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v4", "t": {"T": 1, "n": "_BOOL4", "s": 4}, "location": "s12"}]} {"name": "ide_dma_restart_cb", "code": "__int64 __fastcall ide_dma_restart_cb ( __int64 @@a1@@ , int @@a2@@ ) { __int64 @@result@@ ; @@result@@ = @@a1@@ ; if ( @@a2@@ ) { @@result@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; if ( ! @@result@@ ) { * ( _QWORD * ) ( @@a1@@ + Number ) = qemu_bh_new ( ide_dma_restart_bh , @@a1@@ ) ; @@result@@ = qemu_bh_schedule ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; } } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]} {"name": "ide_write_dma_cb", "code": "__int64 __fastcall ide_write_dma_cb ( __int64 @@a1@@ , int @@a2@@ ) { __int64 @@result@@ ; int @@v3@@ ; __int64 @@v4@@ ; signed __int64 @@v5@@ ; @@v4@@ = bmdma_active_if ( @@a1@@ ) ; if ( @@a2@@ >= Number || ( @@result@@ = ide_handle_rw_error ( ( __int64 * ) @@v4@@ , - @@a2@@ , Number ) , ! ( _DWORD ) @@result@@ ) ) { @@v3@@ = * ( int * ) ( @@v4@@ + Number ) >> Number ; @@v5@@ = ide_get_sector ( @@v4@@ ) ; if ( @@v3@@ > Number ) { dma_buf_commit ( @@v4@@ ) ; @@v5@@ += @@v3@@ ; ide_set_sector ( @@v4@@ , @@v5@@ ) ; * ( _DWORD * ) ( @@v4@@ + Number ) -= @@v3@@ ; } if ( ! * ( _DWORD * ) ( @@v4@@ + Number ) ) { * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; ide_set_irq ( * ( _QWORD * ) @@v4@@ ) ; LABEL_7 : * ( _BYTE * ) ( @@a1@@ + Number ) &= Number ; * ( _BYTE * ) ( @@a1@@ + Number ) |= Number ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; * ( _BYTE * ) ( @@a1@@ + Number ) = Number ; @@result@@ = @@a1@@ ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; return @@result@@ ; } * ( _DWORD * ) ( @@v4@@ + Number ) = * ( _DWORD * ) ( @@v4@@ + Number ) << Number ; if ( ! dma_buf_prepare ( ( _DWORD * ) @@a1@@ ) ) goto LABEL_7 ; * ( _QWORD * ) ( @@a1@@ + Number ) = dma_bdrv_write ( * ( _QWORD * ) ( @@v4@@ + Number ) , @@v4@@ + Number , @@v5@@ , ide_write_dma_cb , @@a1@@ ) ; @@result@@ = ide_dma_submit_check ( @@v4@@ , ( __int64 ( __fastcall * ) ( __int64 , __int64 ) ) ide_write_dma_cb , @@a1@@ ) ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v3", "t": {"T": 1, "n": "int", "s": 4}, "location": "s28"}, {"n": "v5", "t": {"T": 1, "n": "signed __int64", "s": 8}, "location": "s8"}]} {"name": "ide_dma_start", "code": "__int64 __fastcall ide_dma_start ( __int64 @@a1@@ , __int64 @@a2@@ ) { __int64 @@result@@ ; __int64 @@v3@@ ; @@result@@ = * ( _QWORD * ) ( * ( _QWORD * ) @@a1@@ + Number L ) ; @@v3@@ = @@result@@ ; if ( @@result@@ ) { * ( _BYTE * ) ( @@result@@ + Number ) = * ( _BYTE * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@result@@ + Number ) = @@a2@@ ; * ( _DWORD * ) ( @@result@@ + Number ) = Number ; * ( _DWORD * ) ( @@result@@ + Number ) = Number ; * ( _DWORD * ) ( @@result@@ + Number ) = Number ; * ( _QWORD * ) ( @@result@@ + Number ) = ide_get_sector ( @@a1@@ ) ; * ( _DWORD * ) ( @@v3@@ + Number ) = * ( _DWORD * ) ( @@a1@@ + Number ) ; @@result@@ = * ( _BYTE * ) ( @@v3@@ + Number ) & Number ; if ( ( * ( _BYTE * ) ( @@v3@@ + Number ) & Number ) != Number ) @@result@@ = ( * ( __int64 ( __fastcall * * ) ( __int64 , _QWORD ) ) ( @@v3@@ + Number ) ) ( @@v3@@ , Number L ) ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}