{"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": "bmdma_active_if", "code": "__int64 __fastcall bmdma_active_if ( __int64 @@a1@@ ) { if ( * ( _BYTE * ) ( @@a1@@ + Number ) == Number ) _assert_fail ( String , String , Number , String ) ; return * ( _QWORD * ) ( @@a1@@ + Number ) + Number L + Number L * * ( unsigned __int8 * ) ( @@a1@@ + Number ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]} {"name": "ide_set_irq", "code": "__int64 __fastcall ide_set_irq ( __int64 @@a1@@ ) { __int64 @@result@@ ; __int64 @@v2@@ ; @@v2@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@result@@ = * ( _BYTE * ) ( @@a1@@ + Number ) & Number ; if ( ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) == Number ) { if ( @@v2@@ ) * ( _BYTE * ) ( @@v2@@ + Number ) |= Number ; @@result@@ = qemu_irq_raise ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "ide_dma_submit_check", "code": "__int64 __fastcall ide_dma_submit_check ( __int64 @@a1@@ , __int64 ( __fastcall * @@a2@@ ) ( __int64 , __int64 ) , __int64 @@a3@@ ) { __int64 @@result@@ ; @@result@@ = * ( _QWORD * ) ( @@a3@@ + Number ) ; if ( ! @@result@@ ) @@result@@ = @@a2@@ ( @@a3@@ , Number ) ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 9, "n": "__int64 (__fastcall *)(__int64, __int64)"}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]} {"name": "ide_get_sector", "code": "unsigned __int64 __fastcall ide_get_sector ( __int64 @@a1@@ ) { if ( ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) == Number ) return ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) + * ( _DWORD * ) ( @@a1@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) * * ( unsigned __int16 * ) ( @@a1@@ + Number ) + * ( unsigned __int8 * ) ( @@a1@@ + Number ) - Number ; if ( * ( _BYTE * ) ( @@a1@@ + Number ) ) return ( ( unsigned __int64 ) * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | ( ( unsigned __int64 ) * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | ( ( unsigned __int64 ) * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | ( ( unsigned __int64 ) * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | ( ( unsigned __int64 ) * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | * ( unsigned __int8 * ) ( @@a1@@ + Number ) ; return ( * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | ( * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) | ( * ( unsigned __int8 * ) ( @@a1@@ + Number ) << Number ) & Number | ( unsigned int ) * ( unsigned __int8 * ) ( @@a1@@ + Number ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]} {"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": "dma_buf_prepare", "code": "_BOOL8 __fastcall dma_buf_prepare ( _DWORD * @@a1@@ ) { unsigned int @@v2@@ ; unsigned int @@v3@@ ; int @@v4@@ ; __int64 @@v5@@ ; unsigned int @@v6@@ ; @@v5@@ = bmdma_active_if ( ( __int64 ) @@a1@@ ) ; qemu_sglist_init ( @@v5@@ + Number , ( unsigned int ) ( ( * ( _DWORD * ) ( @@v5@@ + Number ) >> Number ) + Number ) ) ; * ( _DWORD * ) ( @@v5@@ + Number ) = Number ; while ( Number ) { if ( @@a1@@ [ Number ] ) goto LABEL_9 ; if ( @@a1@@ [ Number ] || ( unsigned int ) ( @@a1@@ [ Number ] - @@a1@@ [ Number ] ) > Number ) return * ( _DWORD * ) ( @@v5@@ + Number ) != Number ; cpu_physical_memory_read ( ( unsigned int ) @@a1@@ [ Number ] , ( __int64 ) & @@v2@@ , Number ) ; @@a1@@ [ Number ] += Number ; @@v2@@ = le32_to_cpu ( @@v2@@ ) ; @@v3@@ = le32_to_cpu ( @@v3@@ ) ; @@v6@@ = @@v3@@ & Number ; if ( ( @@v3@@ & Number ) == Number ) @@v6@@ = Number ; @@a1@@ [ Number ] = @@v6@@ ; @@a1@@ [ Number ] = @@v2@@ ; @@a1@@ [ Number ] = @@v3@@ & Number ; LABEL_9 : @@v4@@ = @@a1@@ [ Number ] ; if ( @@v4@@ > Number ) { qemu_sglist_add ( @@v5@@ + Number , ( unsigned int ) @@a1@@ [ Number ] , @@v4@@ ) ; @@a1@@ [ Number ] += @@v4@@ ; @@a1@@ [ Number ] -= @@v4@@ ; * ( _DWORD * ) ( @@v5@@ + Number ) += @@v4@@ ; } } }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s24"}, {"n": "v2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "v6", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4"}]} {"name": "dma_buf_commit", "code": "__int64 __fastcall dma_buf_commit ( __int64 @@a1@@ ) { return qemu_sglist_destroy ( @@a1@@ + Number ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]} {"name": "ide_handle_rw_error", "code": "__int64 __fastcall ide_handle_rw_error ( __int64 * @@a1@@ , int @@a2@@ , char @@a3@@ ) { int @@v5@@ ; @@v5@@ = drive_get_on_error ( @@a1@@ [ Number ] , @@a3@@ & Number ) ; if ( @@v5@@ == Number ) return Number L ; if ( @@a2@@ == Number && @@v5@@ == Number || @@v5@@ == Number ) { * ( _BYTE * ) ( * ( _QWORD * ) ( * @@a1@@ + Number ) + Number L ) = * ( ( _BYTE * ) @@a1@@ + Number ) ; * ( _BYTE * ) ( * ( _QWORD * ) ( * @@a1@@ + Number ) + Number L ) |= @@a3@@ ; vm_stop ( Number L ) ; } else if ( ( @@a3@@ & Number ) != Number ) { dma_buf_commit ( ( __int64 ) @@a1@@ ) ; ide_dma_error ( ( __int64 ) @@a1@@ ) ; } else { ide_rw_error ( @@a1@@ ) ; } return Number L ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "char", "s": 1}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "__int64"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s8"}]} {"name": "ide_sector_write_dma", "code": "__int64 __fastcall ide_sector_write_dma ( __int64 @@a1@@ ) { * ( _BYTE * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; return ide_dma_start ( @@a1@@ , ide_write_dma_cb ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]} {"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"}]}