decompiled_code:
void *__fastcall RVC_decoder__texture_U__IQ_action_scheduler(__int64 a1)
{
int v1; // eax
__int64 v3; // rdx

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_8;
}
while ( v1 != 1 );
while ( (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 152LL)) > 0x3E
&& (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) > 0x3E )
{
action1__ac(a1);
*(_DWORD *)(a1 + 72) = 0;
LABEL_8:
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL))
|| !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v3 + 48))
|| !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
break;
}
action0__get_qp(a1);
*(_DWORD *)(a1 + 72) = 1;
}
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func18(__int64 a1)
{
int v1; // eax
__int64 v3; // rdx

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_8;
}
while ( v1 != 1 );
while ( (unsigned int)func17(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 152LL)) > 0x3E
&& (unsigned int)func16(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) > 0x3E )
{
func13(a1);
*(_DWORD *)(a1 + 72) = 0;
LABEL_8:
if ( !(unsigned int)func17(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL))
|| !(unsigned int)func17(*(_DWORD *)(v3 + 48))
|| !(unsigned int)func16(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
break;
}
action0__get_qp(a1);
*(_DWORD *)(a1 + 72) = 1;
}
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_U__IQ_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_U__IQ *thisActor=(ActorInstance_RVC_decoder__texture_U__IQ*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action0__get_qp(thisActor);
            thisActor->_fsmState = 1;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 63)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 63)) {
            action1__ac(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_U__IQ_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_U__IQ *thisActor = (ActorInstance_RVC_decoder__texture_U__IQ*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action0__get_qp(thisActor);
            thisActor->_fsmState = 1;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 63)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 63)) {
            action1__ac(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

user_defined_types: struct ActionDescription { char *name; int *consumption; int *production; }

user_defined_types: struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; }


repo: Caltoopia/caltoopia-calvin

decompiled_code:
void __fastcall ActorInstance_RVC_decoder__texture_V__idct2d__shift_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

canonical_decompiled_code:
void __fastcall func6(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__texture_V__idct2d__shift_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__texture_V__idct2d__shift *thisActor=(ActorInstance_RVC_decoder__texture_V__idct2d__shift*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__texture_V__idct2d__shift_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__texture_V__idct2d__shift *thisActor = (ActorInstance_RVC_decoder__texture_V__idct2d__shift*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

variable_types: struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } *

variable_types: struct ActorInstance_RVC_decoder__texture_V__idct2d__shift { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; } *

return_type: void

user_defined_types: struct AbstractActorInstance { struct dllist_link_tag listEntry; struct ActorClass *actorClass; char *instanceName; int numInputPorts; struct InputPort *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); }

user_defined_types: struct ActorInstance_RVC_decoder__texture_V__idct2d__shift { struct AbstractActorInstance base; int _fsmState; }

user_defined_types: struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); }

user_defined_types: struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort *producer; struct LocalInputPort localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; }

user_defined_types: struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn *functions; }

user_defined_types: struct OutputPort { struct LocalOutputPort localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t consumers; }

user_defined_types: struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t mutex; }

user_defined_types: union pthread_mutex_t { struct __pthread_mutex_s __data; char __size[40]; long __align; }

user_defined_types: struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list __list; }


decompiled_code:
void *__fastcall RVC_decoder__texture_V__idct2d__shift_action_scheduler(__int64 a1)
{
unsigned int v1; // eax

v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 0x3F )
{
if ( (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 0x3F )
return &exitcode_block_Any;
action0(a1);
v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func13(__int64 a1)
{
unsigned int v1; // eax

v1 = func12(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 0x3F )
{
if ( (unsigned int)func11(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 0x3F )
return &exitcode_block_Any;
func10(a1);
v1 = func12(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_V__idct2d__shift_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_V__idct2d__shift *thisActor=(ActorInstance_RVC_decoder__texture_V__idct2d__shift*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 64)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 64)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_V__idct2d__shift_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_V__idct2d__shift *thisActor = (ActorInstance_RVC_decoder__texture_V__idct2d__shift*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 64)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 64)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

variable_types:
result
int *

variable_types:
context
void *

return_type: int *

user_defined_types: struct dllist_link_tag { struct dllist_link_tag *suc; }

user_defined_types: struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; }

user_defined_types: struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); }

user_defined_types: struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; }


rshift

decompiled_code:
__int64 __fastcall rshift(int a1, char a2)
{
return (unsigned int)(a1 >> a2);
}

canonical_decompiled_code:
__int64 __fastcall func6(int a1, char a2)
{
return (unsigned int)(a1 >> a2);
}

original_code: static inline int32_t rshift(int32_t x, int32_t n) { return x >> n; }

canonical_original_code: static inline int rshift(int x, int n) { return x >> n; }

variable_types: x int

variable_types: n int

return_type: int


decompiled_code:
void __fastcall ActorInstance_RVC_decoder__texture_U__idct2d__row_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

canonical_decompiled_code:
void __fastcall func7(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__texture_U__idct2d__row_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__texture_U__idct2d__row *thisActor=(ActorInstance_RVC_decoder__texture_U__idct2d__row*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__texture_U__idct2d__row_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__texture_U__idct2d__row *thisActor = (ActorInstance_RVC_decoder__texture_U__idct2d__row*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

variable_types: struct ActorInstance_RVC_decoder__texture_U__idct2d__row { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; } *

user_defined_types: struct ActorInstance_RVC_decoder__texture_U__idct2d__row { struct AbstractActorInstance base; int _fsmState; }


decompiled_code:
void *__fastcall RVC_decoder__texture_U__idct2d__row_action_scheduler(__int64 a1)
{
unsigned int v1; // eax

v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 7 )
{
if ( (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 7 )
return &exitcode_block_Any;
action0(a1);
v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func19(__int64 a1)
{
unsigned int v1; // eax

v1 = func18(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 7 )
{
if ( (unsigned int)func17(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 7 )
return &exitcode_block_Any;
func16(a1);
v1 = func18(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_U__idct2d__row_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_U__idct2d__row *thisActor=(ActorInstance_RVC_decoder__texture_U__idct2d__row*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 8)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 8)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_U__idct2d__row_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_U__idct2d__row *thisActor = (ActorInstance_RVC_decoder__texture_U__idct2d__row*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 8)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 8)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}


decompiled_code:
void __fastcall ActorInstance_RVC_decoder__texture_U__idct2d__clip_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__texture_U__idct2d__clip_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__texture_U__idct2d__clip *thisActor=(ActorInstance_RVC_decoder__texture_U__idct2d__clip*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__texture_U__idct2d__clip_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__texture_U__idct2d__clip *thisActor = (ActorInstance_RVC_decoder__texture_U__idct2d__clip*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

variable_types: struct ActorInstance_RVC_decoder__texture_U__idct2d__clip { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; int sflag; } *

user_defined_types: struct ActorInstance_RVC_decoder__texture_U__idct2d__clip { struct AbstractActorInstance base; int _fsmState; int sflag; }


decompiled_code:
__int64 __fastcall pinRead_bool_t(__int64 a1)
{
int v1; // eax
unsigned int *v2; // rcx
unsigned int v3; // er8
_DWORD *v4; // rdx

v1 = *(_DWORD *)(a1 + 24);
v2 = *(unsigned int **)(a1 + 16);
if ( !v1 )
__assert_fail("p->available > 0", "../../actors-fifo.h", 0x6Bu, "pinRead_bool_t");
v3 = *v2;
v4 = v2 + 1;
if ( *(_QWORD *)(a1 + 8) <= (unsigned __int64)(v2 + 1) )
v4 = *(_DWORD **)a1;
*(_QWORD *)(a1 + 16) = v4;
*(_DWORD *)(a1 + 24) = v1 - 1;
return v3;
}

canonical_decompiled_code:
__int64 __fastcall func7(__int64 a1)
{
int v1; // eax
unsigned int *v2; // rcx
unsigned int v3; // er8
_DWORD *v4; // rdx

v1 = *(_DWORD *)(a1 + 24);
v2 = *(unsigned int **)(a1 + 16);
if ( !v1 )
__assert_fail("p->available > 0", "../../actors-fifo.h", 0x6Bu, "pinRead_bool_t");
v3 = *v2;
v4 = v2 + 1;
if ( *(_QWORD *)(a1 + 8) <= (unsigned __int64)(v2 + 1) )
v4 = *(_DWORD **)a1;
*(_QWORD *)(a1 + 16) = v4;
*(_DWORD *)(a1 + 24) = v1 - 1;
return v3;
}

original_code:
static inline bool_t pinRead_bool_t(LocalInputPort *p)
{
  const bool_t *readPtr=(const bool_t *) p->readPtr;
  bool_t result;
  ((void) sizeof ((p->available > 0) ? 1 : 0), __extension__ ({ if (p->available > 0) ; else __assert_fail ("p->available > 0", "../../actors-fifo.h", 107, __extension__ __PRETTY_FUNCTION__); }));
  result = (bool_t) *readPtr++;
  if (readPtr >= (const bool_t*) p->bufferEnd)
    readPtr = (const bool_t*)p->bufferStart;
  p->readPtr=readPtr;
  p->available--;
  return result;
}

canonical_original_code:
static inline int pinRead_bool_t(struct LocalInputPort *p)
{
  int *readPtr = (const bool_t *) p->readPtr;
  int result;
  ((void) sizeof ((p->available > 0) ? 1 : 0), __extension__ ({ if (p->available > 0) ; else __assert_fail ("p->available > 0", "../../actors-fifo.h", 107, __extension__ __PRETTY_FUNCTION__); }));
  result = (bool_t) *readPtr++;
  if (readPtr >= (int *) p->bufferEnd)
    readPtr = (int *)p->bufferStart;
  p->readPtr=readPtr;
  p->available--;
  return result;
}

variable_types: struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } *

variable_types:
readPtr
int *

variable_types: result int


decompiled_code:
void *__fastcall RVC_decoder__texture_U__idct2d__clip_action_scheduler(__int64 a1)
{
int v1; // eax

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_8;
}
while ( v1 != 1 );
while ( (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL)) > 0x3F
&& (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) > 0x3F )
{
action1(a1);
*(_DWORD *)(a1 + 72) = 0;
LABEL_8:
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 152LL)) )
break;
action0__read_signed(a1);
*(_DWORD *)(a1 + 72) = 1;
}
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func14(__int64 a1)
{
int v1; // eax

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_8;
}
while ( v1 != 1 );
while ( (unsigned int)func13(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL)) > 0x3F
&& (unsigned int)func12(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) > 0x3F )
{
func11(a1);
*(_DWORD *)(a1 + 72) = 0;
LABEL_8:
if ( !(unsigned int)func13(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 152LL)) )
break;
func8(a1);
*(_DWORD *)(a1 + 72) = 1;
}
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_U__idct2d__clip_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_U__idct2d__clip *thisActor=(ActorInstance_RVC_decoder__texture_U__idct2d__clip*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_bool_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1)) {
          action0__read_signed(thisActor);
          thisActor->_fsmState = 1;
          continue;
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 64)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 64)) {
            action1__clip(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_U__idct2d__clip_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_U__idct2d__clip *thisActor = (ActorInstance_RVC_decoder__texture_U__idct2d__clip*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_bool_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1)) {
          action0__read_signed(thisActor);
          thisActor->_fsmState = 1;
          continue;
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 64)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 64)) {
            action1__clip(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

user_defined_types: struct ActionDescription { char *name; int *consumption; int *production; }


bitor

decompiled_code:
__int64 __fastcall bitor(unsigned int a1, int a2)
{
return a2 | a1;
}

canonical_decompiled_code:
__int64 __fastcall func6(unsigned int a1, int a2)
{
return a2 | a1;
}

original_code: static inline int32_t bitor(int32_t x, int32_t y) { return x | y; }

canonical_original_code: static inline int bitor(int x, int y) { return x | y; }

variable_types: y int


decompiled_code:
__int64 __fastcall pinRead_int32_t(__int64 a1)
{
int v1; // eax
unsigned int *v2; // rcx
unsigned int v3; // er8
_DWORD *v4; // rdx

v1 = *(_DWORD *)(a1 + 24);
v2 = *(unsigned int **)(a1 + 16);
if ( !v1 )
__assert_fail("p->available > 0", "../../actors-fifo.h", 0x6Bu, "pinRead_int32_t");
v3 = *v2;
v4 = v2 + 1;
if ( *(_QWORD *)(a1 + 8) <= (unsigned __int64)(v2 + 1) )
v4 = *(_DWORD **)a1;
*(_QWORD *)(a1 + 16) = v4;
*(_DWORD *)(a1 + 24) = v1 - 1;
return v3;
}

canonical_decompiled_code:
__int64 __fastcall func9(__int64 a1)
{
int v1; // eax
unsigned int *v2; // rcx
unsigned int v3; // er8
_DWORD *v4; // rdx

v1 = *(_DWORD *)(a1 + 24);
v2 = *(unsigned int **)(a1 + 16);
if ( !v1 )
__assert_fail("p->available > 0", "../../actors-fifo.h", 0x6Bu, "pinRead_int32_t");
v3 = *v2;
v4 = v2 + 1;
if ( *(_QWORD *)(a1 + 8) <= (unsigned __int64)(v2 + 1) )
v4 = *(_DWORD **)a1;
*(_QWORD *)(a1 + 16) = v4;
*(_DWORD *)(a1 + 24) = v1 - 1;
return v3;
}

original_code:
static inline int32_t pinRead_int32_t(LocalInputPort *p)
{
  const int32_t *readPtr=(const int32_t *) p->readPtr;
  int32_t result;
  ((void) sizeof ((p->available > 0) ? 1 : 0), __extension__ ({ if (p->available > 0) ; else __assert_fail ("p->available > 0", "../../actors-fifo.h", 107, __extension__ __PRETTY_FUNCTION__); }));
  result = (int32_t) *readPtr++;
  if (readPtr >= (const int32_t*) p->bufferEnd)
    readPtr = (const int32_t*)p->bufferStart;
  p->readPtr=readPtr;
  p->available--;
  return result;
}

canonical_original_code:
static inline int pinRead_int32_t(struct LocalInputPort *p)
{
  int *readPtr = (const int32_t *) p->readPtr;
  int result;
  ((void) sizeof ((p->available > 0) ? 1 : 0), __extension__ ({ if (p->available > 0) ; else __assert_fail ("p->available > 0", "../../actors-fifo.h", 107, __extension__ __PRETTY_FUNCTION__); }));
  result = (int) *readPtr++;
  if (readPtr >= (int *) p->bufferEnd)
    readPtr = (int *)p->bufferStart;
  p->readPtr=readPtr;
  p->available--;
  return result;
}


decompiled_code:
_BOOL8 __fastcall RVC_decoder__texture_Y__IAP__DOLLAR__d9077(__int64 a1, __int64 a2)
{
return (unsigned int)pinPeek_int32_t_constprop_0(*(_QWORD *)(a2 + 40) + 232LL) == -2;
}

canonical_decompiled_code:
_BOOL8 __fastcall func20(__int64 a1, __int64 a2)
{
return (unsigned int)func14(*(_QWORD *)(a2 + 40) + 232LL) == -2;
}

original_code:
bool_t RVC_decoder__texture_Y__IAP__DOLLAR__d9077(art_action_context_t *context, ActorInstance_RVC_decoder__texture_Y__IAP *thisActor) {
  int32_t s;
  {
    bool_t ret;
    s = pinPeek_int32_t(&(thisActor->base.inputPort[2].localInputPort), 0);
    ret = (s == -2);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__texture_Y__IAP__DOLLAR__d9077(void *context, struct ActorInstance_RVC_decoder__texture_Y__IAP *thisActor) {
  int s;
  {
    int ret;
    s = pinPeek_int32_t(&(thisActor->base.inputPort[2].localInputPort), 0);
    ret = (s == -2);
    return ret;
  }
}

variable_types: struct ActorInstance_RVC_decoder__texture_Y__IAP { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; int s_prev_quant; int acpred_flag; int s_quant; int ptr; int comp; int pred_ptr; int count; int top; int *buf; } *

variable_types: s int

variable_types: ret int

user_defined_types: struct ActorInstance_RVC_decoder__texture_Y__IAP { struct AbstractActorInstance base; int _fsmState; int s_prev_quant; int acpred_flag; int s_quant; int ptr; int comp; int pred_ptr; int count; int top; int *buf; }


decompiled_code:
__int64 __fastcall RVC_decoder__texture_Y__IAP__DOLLAR__d9089(__int64 a1, __int64 a2)
{
return (unsigned int)pinPeek_int32_t_constprop_0(*(_QWORD *)(a2 + 40) + 232LL) >> 31;
}

canonical_decompiled_code:
__int64 __fastcall func21(__int64 a1, __int64 a2)
{
return (unsigned int)func14(*(_QWORD *)(a2 + 40) + 232LL) >> 31;
}

original_code:
bool_t RVC_decoder__texture_Y__IAP__DOLLAR__d9089(art_action_context_t *context, ActorInstance_RVC_decoder__texture_Y__IAP *thisActor) {
  int32_t s;
  {
    bool_t ret;
    s = pinPeek_int32_t(&(thisActor->base.inputPort[2].localInputPort), 0);
    ret = (s < 0);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__texture_Y__IAP__DOLLAR__d9089(void *context, struct ActorInstance_RVC_decoder__texture_Y__IAP *thisActor) {
  int s;
  {
    int ret;
    s = pinPeek_int32_t(&(thisActor->base.inputPort[2].localInputPort), 0);
    ret = (s < 0);
    return ret;
  }
}

user_defined_types: struct AbstractActorInstance { struct dllist_link_tag listEntry; struct ActorClass *actorClass; char *instanceName; int numInputPorts; struct InputPort *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); }

user_defined_types: struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; }


decompiled_code:
_BOOL8 __fastcall RVC_decoder__texture_Y__IAP__DOLLAR__d9120(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 100) == 64;
}

original_code:
bool_t RVC_decoder__texture_Y__IAP__DOLLAR__d9120(art_action_context_t *context, ActorInstance_RVC_decoder__texture_Y__IAP *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->count == 64);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__texture_Y__IAP__DOLLAR__d9120(void *context, struct ActorInstance_RVC_decoder__texture_Y__IAP *thisActor) {
  {
    int ret;
    ret = (thisActor->count == 64);
    return ret;
  }
}

user_defined_types: struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); }


decompiled_code:
void *__fastcall RVC_decoder__texture_Y__IAP_action_scheduler(__int64 a1)
{
int v1; // eax
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rdx

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_9;
}
while ( v1 != 1 );
LABEL_4:
while ( !(unsigned int)RVC_decoder__texture_Y__IAP__DOLLAR__d9120(0LL, a1) )
{
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
return &exitcode_block_Any;
}
action4__copy(a1);
*(_DWORD *)(a1 + 72) = 1;
}
action3__advance(a1);
*(_DWORD *)(a1 + 72) = 0;
LABEL_9:
while ( (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL)) )
{
if ( !(unsigned int)RVC_decoder__texture_Y__IAP__DOLLAR__d9077(0LL, a1) )
{
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL)) )
return &exitcode_block_Any;
if ( (unsigned int)RVC_decoder__texture_Y__IAP__DOLLAR__d9089(0LL, a1) )
{
action1__skip(a1);
*(_DWORD *)(a1 + 72) = 1;
goto LABEL_4;
}
if ( (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL))
&& (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v3 + 152))
&& (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v4 + 360))
&& (unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v5 + 464)) )
{
action2__start(a1);
*(_DWORD *)(a1 + 72) = 1;
goto LABEL_4;
}
return &exitcode_block_Any;
}
action0__newvop(a1);
*(_DWORD *)(a1 + 72) = 0;
}
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func23(__int64 a1)
{
int v1; // eax
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rdx

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_9;
}
while ( v1 != 1 );
LABEL_4:
while ( !(unsigned int)func22(0LL, a1) )
{
if ( !(unsigned int)func19(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)func18(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
return &exitcode_block_Any;
}
action4__copy(a1);
*(_DWORD *)(a1 + 72) = 1;
}
func7(a1);
*(_DWORD *)(a1 + 72) = 0;
LABEL_9:
while ( (unsigned int)func19(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL)) )
{
if ( !(unsigned int)func20(0LL, a1) )
{
if ( !(unsigned int)func19(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL)) )
return &exitcode_block_Any;
if ( (unsigned int)func21(0LL, a1) )
{
func11(a1);
*(_DWORD *)(a1 + 72) = 1;
goto LABEL_4;
}
if ( (unsigned int)func19(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 256LL))
&& (unsigned int)func19(*(_DWORD *)(v3 + 152))
&& (unsigned int)func19(*(_DWORD *)(v4 + 360))
&& (unsigned int)func19(*(_DWORD *)(v5 + 464)) )
{
func12(a1);
*(_DWORD *)(a1 + 72) = 1;
goto LABEL_4;
}
return &exitcode_block_Any;
}
func10(a1);
*(_DWORD *)(a1 + 72) = 0;
}
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_Y__IAP_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_Y__IAP *thisActor=(ActorInstance_RVC_decoder__texture_Y__IAP*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__texture_Y__IAP__DOLLAR__d9077(context, thisActor)) {
            action0__newvop(thisActor);
            thisActor->_fsmState = 0;
            continue;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__texture_Y__IAP__DOLLAR__d9089(context, thisActor)) {
            action1__skip(thisActor);
            thisActor->_fsmState = 1;
            continue;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[3].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[4].localInputPort)) >= 1)) {
          action2__start(thisActor);
          thisActor->_fsmState = 1;
          continue;
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if (RVC_decoder__texture_Y__IAP__DOLLAR__d9120(context, thisActor)) {
          action3__advance(thisActor);
          thisActor->_fsmState = 0;
          continue;
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action4__copy(thisActor);
            thisActor->_fsmState = 1;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_Y__IAP_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_Y__IAP *thisActor = (ActorInstance_RVC_decoder__texture_Y__IAP*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__texture_Y__IAP__DOLLAR__d9077(context, thisActor)) {
            action0__newvop(thisActor);
            thisActor->_fsmState = 0;
            continue;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__texture_Y__IAP__DOLLAR__d9089(context, thisActor)) {
            action1__skip(thisActor);
            thisActor->_fsmState = 1;
            continue;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[3].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[4].localInputPort)) >= 1)) {
          action2__start(thisActor);
          thisActor->_fsmState = 1;
          continue;
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if (RVC_decoder__texture_Y__IAP__DOLLAR__d9120(context, thisActor)) {
          action3__advance(thisActor);
          thisActor->_fsmState = 0;
          continue;
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action4__copy(thisActor);
            thisActor->_fsmState = 1;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

user_defined_types: struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort *producer; struct LocalInputPort localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; }


canonical_decompiled_code:
__int64 __fastcall func8(__int64 a1)
{
int v1; // eax
unsigned int *v2; // rcx
unsigned int v3; // er8
_DWORD *v4; // rdx

v1 = *(_DWORD *)(a1 + 24);
v2 = *(unsigned int **)(a1 + 16);
if ( !v1 )
__assert_fail("p->available > 0", "../../actors-fifo.h", 0x6Bu, "pinRead_bool_t");
v3 = *v2;
v4 = v2 + 1;
if ( *(_QWORD *)(a1 + 8) <= (unsigned __int64)(v2 + 1) )
v4 = *(_DWORD **)a1;
*(_QWORD *)(a1 + 16) = v4;
*(_DWORD *)(a1 + 24) = v1 - 1;
return v3;
}


decompiled_code:
_BOOL8 __fastcall RVC_decoder__parser__blkexp__DOLLAR__d2549(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 84) == 64;
}

original_code:
bool_t RVC_decoder__parser__blkexp__DOLLAR__d2549(art_action_context_t *context, ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->count == 64);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__parser__blkexp__DOLLAR__d2549(void *context, struct ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    int ret;
    ret = (thisActor->count == 64);
    return ret;
  }
}

variable_types: struct ActorInstance_RVC_decoder__parser__blkexp { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; int last; int next_value; int count; int run; } *

user_defined_types: struct ActorInstance_RVC_decoder__parser__blkexp { struct AbstractActorInstance base; int _fsmState; int last; int next_value; int count; int run; }

user_defined_types: struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn *functions; }


decompiled_code:
_BOOL8 __fastcall RVC_decoder__parser__blkexp__DOLLAR__d2557(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 88) == 0;
}

canonical_decompiled_code:
_BOOL8 __fastcall func14(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 88) == 0;
}

original_code:
bool_t RVC_decoder__parser__blkexp__DOLLAR__d2557(art_action_context_t *context, ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->run == 0);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__parser__blkexp__DOLLAR__d2557(void *context, struct ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    int ret;
    ret = (thisActor->run == 0);
    return ret;
  }
}

user_defined_types: struct OutputPort { struct LocalOutputPort localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t consumers; }

user_defined_types: struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t mutex; }


decompiled_code:
_BOOL8 __fastcall RVC_decoder__parser__blkexp__DOLLAR__d2569(__int64 a1, __int64 a2)
{
_BOOL8 result; // rax

result = 1LL;
if ( *(int *)(a2 + 88) <= 0 )
result = *(_DWORD *)(a2 + 76) != 0;
return result;
}

canonical_decompiled_code:
_BOOL8 __fastcall func15(__int64 a1, __int64 a2)
{
_BOOL8 result; // rax

result = 1LL;
if ( *(int *)(a2 + 88) <= 0 )
result = *(_DWORD *)(a2 + 76) != 0;
return result;
}

original_code:
bool_t RVC_decoder__parser__blkexp__DOLLAR__d2569(art_action_context_t *context, ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    bool_t ret;
    ret = ((thisActor->run > 0) || thisActor->last);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__parser__blkexp__DOLLAR__d2569(void *context, struct ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    int ret;
    ret = ((thisActor->run > 0) || thisActor->last);
    return ret;
  }
}

user_defined_types: union pthread_mutex_t { struct __pthread_mutex_s __data; char __size[40]; long __align; }

user_defined_types: struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list __list; }


decompiled_code:
_BOOL8 __fastcall RVC_decoder__parser__blkexp__DOLLAR__d2594(__int64 a1, __int64 a2)
{
return (unsigned int)pinPeek_int32_t_constprop_0(*(_QWORD *)(a2 + 40) + 24LL) == 0;
}

canonical_decompiled_code:
_BOOL8 __fastcall func16(__int64 a1, __int64 a2)
{
return (unsigned int)func10(*(_QWORD *)(a2 + 40) + 24LL) == 0;
}

original_code:
bool_t RVC_decoder__parser__blkexp__DOLLAR__d2594(art_action_context_t *context, ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  int32_t r;
  {
    bool_t ret;
    r = pinPeek_int32_t(&(thisActor->base.inputPort[0].localInputPort), 0);
    ret = (r == 0);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__parser__blkexp__DOLLAR__d2594(void *context, struct ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  int r;
  {
    int ret;
    r = pinPeek_int32_t(&(thisActor->base.inputPort[0].localInputPort), 0);
    ret = (r == 0);
    return ret;
  }
}

variable_types: r int

user_defined_types: struct dllist_link_tag { struct dllist_link_tag *suc; }

user_defined_types: struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; }


decompiled_code:
// attributes: thunk
_BOOL8 __fastcall RVC_decoder__parser__blkexp__DOLLAR__d2619(__int64 a1, __int64 a2)
{
return RVC_decoder__parser__blkexp__DOLLAR__d2600_localalias(a1, a2);
}

canonical_decompiled_code:
_BOOL8 __fastcall func18(__int64 a1, __int64 a2)
{
return func17(a1, a2);
}

original_code:
bool_t RVC_decoder__parser__blkexp__DOLLAR__d2619(art_action_context_t *context, ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->count != 64);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__parser__blkexp__DOLLAR__d2619(void *context, struct ActorInstance_RVC_decoder__parser__blkexp *thisActor) {
  {
    int ret;
    ret = (thisActor->count != 64);
    return ret;
  }
}

user_defined_types: struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); }

user_defined_types: struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; }


decompiled_code:
void *__fastcall RVC_decoder__parser__blkexp_action_scheduler(__int64 a1)
{
__int64 v2; // rdx
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rdx

while ( *(_DWORD *)(a1 + 72) )
;
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( (unsigned int)RVC_decoder__parser__blkexp__DOLLAR__d2549(0LL, a1) )
{
action0__done(a1);
*(_DWORD *)(a1 + 72) = 0;
}
if ( !(unsigned int)RVC_decoder__parser__blkexp__DOLLAR__d2557(0LL, a1) )
break;
if ( !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
return &exitcode_block_Any;
action1__write__value(a1);
*(_DWORD *)(a1 + 72) = 0;
}
if ( !(unsigned int)RVC_decoder__parser__blkexp__DOLLAR__d2569(0LL, a1) )
break;
if ( !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
return &exitcode_block_Any;
action2__write__zero(a1);
*(_DWORD *)(a1 + 72) = 0;
}
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v2 + 152)) )
{
return &exitcode_block_Any;
}
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v3 + 256)) )
goto LABEL_14;
if ( (unsigned int)RVC_decoder__parser__blkexp__DOLLAR__d2594(0LL, a1)
&& (unsigned int)RVC_decoder__parser__blkexp__DOLLAR__d2600_localalias(0LL, a1) )
{
if ( !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
return &exitcode_block_Any;
action3__read__immediate(a1);
*(_DWORD *)(a1 + 72) = 0;
}
else
{
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v5 + 152)) )
{
return &exitcode_block_Any;
}
LABEL_14:
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(v4 + 256))
|| !(unsigned int)RVC_decoder__parser__blkexp__DOLLAR__d2619(0LL, a1)
|| !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
return &exitcode_block_Any;
}
action4__read__save(a1);
*(_DWORD *)(a1 + 72) = 0;
}
}
}

canonical_decompiled_code:
void *__fastcall func19(__int64 a1)
{
__int64 v2; // rdx
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rdx

while ( *(_DWORD *)(a1 + 72) )
;
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
while ( (unsigned int)func13(0LL, a1) )
{
func6(a1);
*(_DWORD *)(a1 + 72) = 0;
}
if ( !(unsigned int)func14(0LL, a1) )
break;
if ( !(unsigned int)func11(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
return &exitcode_block_Any;
action1__write__value(a1);
*(_DWORD *)(a1 + 72) = 0;
}
if ( !(unsigned int)func15(0LL, a1) )
break;
if ( !(unsigned int)func11(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
return &exitcode_block_Any;
action2__write__zero(a1);
*(_DWORD *)(a1 + 72) = 0;
}
if ( !(unsigned int)func12(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)func12(*(_DWORD *)(v2 + 152)) )
{
return &exitcode_block_Any;
}
if ( !(unsigned int)func12(*(_DWORD *)(v3 + 256)) )
goto LABEL_14;
if ( (unsigned int)func16(0LL, a1)
&& (unsigned int)func17(0LL, a1) )
{
if ( !(unsigned int)func11(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
return &exitcode_block_Any;
action3__read__immediate(a1);
*(_DWORD *)(a1 + 72) = 0;
}
else
{
if ( !(unsigned int)func12(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)func12(*(_DWORD *)(v5 + 152)) )
{
return &exitcode_block_Any;
}
LABEL_14:
if ( !(unsigned int)func12(*(_DWORD *)(v4 + 256))
|| !(unsigned int)func18(0LL, a1)
|| !(unsigned int)func11(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
return &exitcode_block_Any;
}
action4__read__save(a1);
*(_DWORD *)(a1 + 72) = 0;
}
}
}

original_code:
static const int *RVC_decoder__parser__blkexp_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__parser__blkexp *thisActor=(ActorInstance_RVC_decoder__parser__blkexp*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if (RVC_decoder__parser__blkexp__DOLLAR__d2549(context, thisActor)) {
          action0__done(thisActor);
          thisActor->_fsmState = 0;
          continue;
        }
        if (RVC_decoder__parser__blkexp__DOLLAR__d2557(context, thisActor)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action1__write__value(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        if (RVC_decoder__parser__blkexp__DOLLAR__d2569(context, thisActor)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action2__write__zero(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1) && (pinAvailIn_bool_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__parser__blkexp__DOLLAR__d2594(context, thisActor) && RVC_decoder__parser__blkexp__DOLLAR__d2600(context, thisActor)) {
            if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
              action3__read__immediate(thisActor);
              thisActor->_fsmState = 0;
              continue;
            } else {
              result = exitcode_block_Any;
              goto out;
            }
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1) && (pinAvailIn_bool_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__parser__blkexp__DOLLAR__d2619(context, thisActor)) {
            if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
              action4__read__save(thisActor);
              thisActor->_fsmState = 0;
              continue;
            } else {
              result = exitcode_block_Any;
              goto out;
            }
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__parser__blkexp_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__parser__blkexp *thisActor = (ActorInstance_RVC_decoder__parser__blkexp*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if (RVC_decoder__parser__blkexp__DOLLAR__d2549(context, thisActor)) {
          action0__done(thisActor);
          thisActor->_fsmState = 0;
          continue;
        }
        if (RVC_decoder__parser__blkexp__DOLLAR__d2557(context, thisActor)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action1__write__value(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        if (RVC_decoder__parser__blkexp__DOLLAR__d2569(context, thisActor)) {
          if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
            action2__write__zero(thisActor);
            thisActor->_fsmState = 0;
            continue;
          } else {
            result = exitcode_block_Any;
            goto out;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1) && (pinAvailIn_bool_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__parser__blkexp__DOLLAR__d2594(context, thisActor) && RVC_decoder__parser__blkexp__DOLLAR__d2600(context, thisActor)) {
            if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
              action3__read__immediate(thisActor);
              thisActor->_fsmState = 0;
              continue;
            } else {
              result = exitcode_block_Any;
              goto out;
            }
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1) && (pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1) && (pinAvailIn_bool_t(&(thisActor->base.inputPort[2].localInputPort)) >= 1)) {
          if (RVC_decoder__parser__blkexp__DOLLAR__d2619(context, thisActor)) {
            if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
              action4__read__save(thisActor);
              thisActor->_fsmState = 0;
              continue;
            } else {
              result = exitcode_block_Any;
              goto out;
            }
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

variable_types: struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } *


rshift

decompiled_code:
__int64 __fastcall rshift(int a1, char a2)
{
return (unsigned int)(a1 >> a2);
}

original_code: static inline int32_t rshift(int32_t x, int32_t n) { return x >> n; }

canonical_original_code: static inline int rshift(int x, int n) { return x >> n; }


decompiled_code:
__int64 __fastcall RVC_decoder__motion_Y__interpolationcompensate(__int64 a1, unsigned int a2, int a3, int a4, int a5)
{
__int64 result; // rax
int v6; // esi
int v7; // er9
int v8; // eax

result = a2;
v6 = *(_DWORD *)(a1 + 84);
if ( v6 )
{
v7 = *(_DWORD *)(a1 + 128);
if ( v6 == 1 )
{
result = rshift((int)result + a4 + 1 - v7, 1);
}
else
{
v8 = a3 + result;
if ( v6 == 2 )
result = rshift(v8 + 1 - v7, 1);
else
result = rshift(a5 + a4 + v8 + 2 - v7, 2);
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func7(__int64 a1, unsigned int a2, int a3, int a4, int a5)
{
__int64 result; // rax
int v6; // esi
int v7; // er9
int v8; // eax

result = a2;
v6 = *(_DWORD *)(a1 + 84);
if ( v6 )
{
v7 = *(_DWORD *)(a1 + 128);
if ( v6 == 1 )
{
result = func6((int)result + a4 + 1 - v7, 1);
}
else
{
v8 = a3 + result;
if ( v6 == 2 )
result = func6(v8 + 1 - v7, 1);
else
result = func6(a5 + a4 + v8 + 2 - v7, 2);
}
}
return result;
}

original_code:
static inline int32_t RVC_decoder__motion_Y__interpolationcompensate(ActorInstance_RVC_decoder__motion_Y__interpolation* thisActor, int32_t p00, int32_t p10, int32_t p01, int32_t p11){
  return (((thisActor->flags == 0)) ? (p00):((((thisActor->flags == 1)) ? (rshift((((p00 + p01) + 1) - thisActor->round), 1)):((((thisActor->flags == 2)) ? (rshift((((p00 + p10) + 1) - thisActor->round), 1)):(rshift((((((p00 + p10) + p01) + p11) + 2) - thisActor->round), 2)))))));
}

canonical_original_code:
static inline int RVC_decoder__motion_Y__interpolationcompensate(struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor, int p00, int p10, int p01, int p11){
  return (((thisActor->flags == 0)) ? (p00):((((thisActor->flags == 1)) ? (rshift((((p00 + p01) + 1) - thisActor->round), 1)):((((thisActor->flags == 2)) ? (rshift((((p00 + p10) + 1) - thisActor->round), 1)):(rshift((((((p00 + p10) + p01) + p11) + 2) - thisActor->round), 2)))))));
}

variable_types: struct ActorInstance_RVC_decoder__motion_Y__interpolation { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; int x; int d5; int flags; int d9; int d1; int d0; int d4; int d6; int d7; int d3; int d2; int y; int d8; int round; } *

user_defined_types: struct ActorInstance_RVC_decoder__motion_Y__interpolation { struct AbstractActorInstance base; int _fsmState; int x; int d5; int flags; int d9; int d1; int d0; int d4; int d6; int d7; int d3; int d2; int y; int d8; int round; }


decompiled_code:
void __fastcall ActorInstance_RVC_decoder__motion_Y__interpolation_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

canonical_decompiled_code:
void __fastcall func8(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__motion_Y__interpolation_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor=(ActorInstance_RVC_decoder__motion_Y__interpolation*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__motion_Y__interpolation_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor = (ActorInstance_RVC_decoder__motion_Y__interpolation*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

user_defined_types: struct ActionDescription { char *name; int *consumption; int *production; }


decompiled_code:
_BOOL8 __fastcall RVC_decoder__motion_Y__interpolation__DOLLAR__d1756(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 120) == 9;
}

original_code:
bool_t RVC_decoder__motion_Y__interpolation__DOLLAR__d1756(art_action_context_t *context, ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->y == 9);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__motion_Y__interpolation__DOLLAR__d1756(void *context, struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    int ret;
    ret = (thisActor->y == 9);
    return ret;
  }
}


decompiled_code:
_BOOL8 __fastcall RVC_decoder__motion_Y__interpolation__DOLLAR__d1763(__int64 a1, __int64 a2)
{
_BOOL8 result; // rax

result = 1LL;
if ( *(_DWORD *)(a2 + 76) )
result = *(_DWORD *)(a2 + 120) == 0;
return result;
}

canonical_decompiled_code:
_BOOL8 __fastcall func16(__int64 a1, __int64 a2)
{
_BOOL8 result; // rax

result = 1LL;
if ( *(_DWORD *)(a2 + 76) )
result = *(_DWORD *)(a2 + 120) == 0;
return result;
}

original_code:
bool_t RVC_decoder__motion_Y__interpolation__DOLLAR__d1763(art_action_context_t *context, ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    bool_t ret;
    ret = ((thisActor->x == 0) || (thisActor->y == 0));
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__motion_Y__interpolation__DOLLAR__d1763(void *context, struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    int ret;
    ret = ((thisActor->x == 0) || (thisActor->y == 0));
    return ret;
  }
}


decompiled_code:
_BOOL8 __fastcall RVC_decoder__motion_Y__interpolation__DOLLAR__d1796(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 76) != 0;
}

canonical_decompiled_code:
_BOOL8 __fastcall func17(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 76) != 0;
}

original_code:
bool_t RVC_decoder__motion_Y__interpolation__DOLLAR__d1796(art_action_context_t *context, ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->x != 0);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__motion_Y__interpolation__DOLLAR__d1796(void *context, struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    int ret;
    ret = (thisActor->x != 0);
    return ret;
  }
}


decompiled_code:
_BOOL8 __fastcall RVC_decoder__motion_Y__interpolation__DOLLAR__d1800(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 120) != 0;
}

original_code:
bool_t RVC_decoder__motion_Y__interpolation__DOLLAR__d1800(art_action_context_t *context, ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->y != 0);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__motion_Y__interpolation__DOLLAR__d1800(void *context, struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    int ret;
    ret = (thisActor->y != 0);
    return ret;
  }
}


decompiled_code:
_BOOL8 __fastcall RVC_decoder__motion_Y__interpolation__DOLLAR__d1804(__int64 a1, __int64 a2)
{
return *(_DWORD *)(a2 + 120) != 9;
}

original_code:
bool_t RVC_decoder__motion_Y__interpolation__DOLLAR__d1804(art_action_context_t *context, ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    bool_t ret;
    ret = (thisActor->y != 9);
    return ret;
  }
}

canonical_original_code:
int RVC_decoder__motion_Y__interpolation__DOLLAR__d1804(void *context, struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor) {
  {
    int ret;
    ret = (thisActor->y != 9);
    return ret;
  }
}


decompiled_code:
void *__fastcall RVC_decoder__motion_Y__interpolation_action_scheduler(__int64 a1)
{
int v1; // eax

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_8;
}
while ( v1 != 1 );
while ( 1 )
{
while ( !(unsigned int)RVC_decoder__motion_Y__interpolation__DOLLAR__d1756(0LL, a1) )
{
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL)) )
return &exitcode_block_Any;
if ( (unsigned int)RVC_decoder__motion_Y__interpolation__DOLLAR__d1763(0LL, a1) )
{
action2__row_col_0(a1);
*(_DWORD *)(a1 + 72) = 1;
}
else
{
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)RVC_decoder__motion_Y__interpolation__DOLLAR__d1796(0LL, a1)
|| !(unsigned int)RVC_decoder__motion_Y__interpolation__DOLLAR__d1800(0LL, a1)
|| !(unsigned int)RVC_decoder__motion_Y__interpolation__DOLLAR__d1804(0LL, a1)
|| !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
return &exitcode_block_Any;
}
action3__other(a1);
*(_DWORD *)(a1 + 72) = 1;
}
}
*(_DWORD *)(a1 + 72) = 0;
LABEL_8:
if ( !(unsigned int)pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 152LL)) )
break;
action0__start(a1);
*(_DWORD *)(a1 + 72) = 1;
}
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func20(__int64 a1)
{
int v1; // eax

v1 = *(_DWORD *)(a1 + 72);
do
{
if ( !v1 )
goto LABEL_8;
}
while ( v1 != 1 );
while ( 1 )
{
while ( !(unsigned int)func15(0LL, a1) )
{
if ( !(unsigned int)func14(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL)) )
return &exitcode_block_Any;
if ( (unsigned int)func16(0LL, a1) )
{
func10(a1);
*(_DWORD *)(a1 + 72) = 1;
}
else
{
if ( !(unsigned int)func14(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL))
|| !(unsigned int)func17(0LL, a1)
|| !(unsigned int)func18(0LL, a1)
|| !(unsigned int)func19(0LL, a1)
|| !(unsigned int)func13(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) )
{
return &exitcode_block_Any;
}
action3__other(a1);
*(_DWORD *)(a1 + 72) = 1;
}
}
*(_DWORD *)(a1 + 72) = 0;
LABEL_8:
if ( !(unsigned int)func14(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 152LL)) )
break;
func12(a1);
*(_DWORD *)(a1 + 72) = 1;
}
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__motion_Y__interpolation_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor=(ActorInstance_RVC_decoder__motion_Y__interpolation*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1)) {
          action0__start(thisActor);
          thisActor->_fsmState = 1;
          continue;
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if (RVC_decoder__motion_Y__interpolation__DOLLAR__d1756(context, thisActor)) {
          action1__done(thisActor);
          thisActor->_fsmState = 0;
          continue;
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if (RVC_decoder__motion_Y__interpolation__DOLLAR__d1763(context, thisActor)) {
            action2__row_col_0(thisActor);
            thisActor->_fsmState = 1;
            continue;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if (RVC_decoder__motion_Y__interpolation__DOLLAR__d1796(context, thisActor) && RVC_decoder__motion_Y__interpolation__DOLLAR__d1800(context, thisActor) && RVC_decoder__motion_Y__interpolation__DOLLAR__d1804(context, thisActor)) {
            if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
              action3__other(thisActor);
              thisActor->_fsmState = 1;
              continue;
            } else {
              result = exitcode_block_Any;
              goto out;
            }
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__motion_Y__interpolation_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__motion_Y__interpolation *thisActor = (ActorInstance_RVC_decoder__motion_Y__interpolation*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    switch(thisActor->_fsmState) {
      case 0:
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[1].localInputPort)) >= 1)) {
          action0__start(thisActor);
          thisActor->_fsmState = 1;
          continue;
        }
        result = exitcode_block_Any;
        goto out;
        break;
      case 1:
        if (RVC_decoder__motion_Y__interpolation__DOLLAR__d1756(context, thisActor)) {
          action1__done(thisActor);
          thisActor->_fsmState = 0;
          continue;
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if (RVC_decoder__motion_Y__interpolation__DOLLAR__d1763(context, thisActor)) {
            action2__row_col_0(thisActor);
            thisActor->_fsmState = 1;
            continue;
          }
        }
        if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 1)) {
          if (RVC_decoder__motion_Y__interpolation__DOLLAR__d1796(context, thisActor) && RVC_decoder__motion_Y__interpolation__DOLLAR__d1800(context, thisActor) && RVC_decoder__motion_Y__interpolation__DOLLAR__d1804(context, thisActor)) {
            if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1)) {
              action3__other(thisActor);
              thisActor->_fsmState = 1;
              continue;
            } else {
              result = exitcode_block_Any;
              goto out;
            }
          }
        }
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

variable_types:
result
int *


decompiled_code:
void __fastcall ActorInstance_RVC_decoder__texture_V__idct2d__column_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

canonical_decompiled_code:
void __fastcall func7(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__texture_V__idct2d__column_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__texture_V__idct2d__column *thisActor=(ActorInstance_RVC_decoder__texture_V__idct2d__column*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__texture_V__idct2d__column_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__texture_V__idct2d__column *thisActor = (ActorInstance_RVC_decoder__texture_V__idct2d__column*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

variable_types: struct ActorInstance_RVC_decoder__texture_V__idct2d__column { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; } *

user_defined_types: struct ActorInstance_RVC_decoder__texture_V__idct2d__column { struct AbstractActorInstance base; int _fsmState; }


decompiled_code:
void *__fastcall RVC_decoder__texture_V__idct2d__column_action_scheduler(__int64 a1)
{
unsigned int v1; // eax

v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 7 )
{
if ( (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 7 )
return &exitcode_block_Any;
action0(a1);
v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func19(__int64 a1)
{
unsigned int v1; // eax

v1 = func18(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 7 )
{
if ( (unsigned int)func17(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 7 )
return &exitcode_block_Any;
func16(a1);
v1 = func18(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_V__idct2d__column_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_V__idct2d__column *thisActor=(ActorInstance_RVC_decoder__texture_V__idct2d__column*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 8)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 8)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_V__idct2d__column_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_V__idct2d__column *thisActor = (ActorInstance_RVC_decoder__texture_V__idct2d__column*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 8)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 8)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

variable_types:
context
void *

user_defined_types: struct AbstractActorInstance { struct dllist_link_tag listEntry; struct ActorClass *actorClass; char *instanceName; int numInputPorts; struct InputPort *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); }


decompiled_code:
void __fastcall ActorInstance_RVC_decoder__texture_V__DCsplit_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

canonical_decompiled_code:
void __fastcall func6(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__texture_V__DCsplit_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__texture_V__DCsplit *thisActor=(ActorInstance_RVC_decoder__texture_V__DCsplit*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__texture_V__DCsplit_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__texture_V__DCsplit *thisActor = (ActorInstance_RVC_decoder__texture_V__DCsplit*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

variable_types: struct ActorInstance_RVC_decoder__texture_V__DCsplit { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; } *

user_defined_types: struct ActorInstance_RVC_decoder__texture_V__DCsplit { struct AbstractActorInstance base; int _fsmState; }


decompiled_code:
void *__fastcall RVC_decoder__texture_V__DCsplit_action_scheduler(__int64 a1)
{
unsigned int i; // eax
__int64 v2; // rdx

for ( i = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
;
i = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL)) )
{
while ( i <= 0x3F )
{
if ( !*(_DWORD *)(a1 + 72) )
return &exitcode_block_Any;
}
if ( !(unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL))
|| (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(v2 + 160)) <= 0x3E )
{
break;
}
action0(a1);
}
return &exitcode_block_Any;
}

canonical_decompiled_code:
void *__fastcall func12(__int64 a1)
{
unsigned int i; // eax
__int64 v2; // rdx

for ( i = func11(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
;
i = func11(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL)) )
{
while ( i <= 0x3F )
{
if ( !*(_DWORD *)(a1 + 72) )
return &exitcode_block_Any;
}
if ( !(unsigned int)func10(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL))
|| (unsigned int)func10(*(_DWORD *)(v2 + 160)) <= 0x3E )
{
break;
}
func9(a1);
}
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_V__DCsplit_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_V__DCsplit *thisActor=(ActorInstance_RVC_decoder__texture_V__DCsplit*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 64)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1) && (pinAvailOut_int32_t(&(thisActor->base.outputPort[1].localOutputPort)) >= 63)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_V__DCsplit_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_V__DCsplit *thisActor = (ActorInstance_RVC_decoder__texture_V__DCsplit*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 64)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 1) && (pinAvailOut_int32_t(&(thisActor->base.outputPort[1].localOutputPort)) >= 63)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

user_defined_types: struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); }

user_defined_types: struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; }


decompiled_code:
void __fastcall ActorInstance_RVC_decoder__texture_Y__idct2d__row_constructor(__int64 a1)
{
*(_DWORD *)(a1 + 72) = 0;
}

original_code:
static void ActorInstance_RVC_decoder__texture_Y__idct2d__row_constructor(AbstractActorInstance *pBase) {
  ActorInstance_RVC_decoder__texture_Y__idct2d__row *thisActor=(ActorInstance_RVC_decoder__texture_Y__idct2d__row*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

canonical_original_code:
static void ActorInstance_RVC_decoder__texture_Y__idct2d__row_constructor(struct AbstractActorInstance *pBase) {
  struct ActorInstance_RVC_decoder__texture_Y__idct2d__row *thisActor = (ActorInstance_RVC_decoder__texture_Y__idct2d__row*) pBase;
  thisActor->_fsmState = 0;
  {
  }
}

variable_types: struct ActorInstance_RVC_decoder__texture_Y__idct2d__row { struct AbstractActorInstance { struct dllist_link_tag { struct dllist_link_tag *suc; } listEntry; struct ActorClass { unsigned int majorVersion; unsigned int minorVersion; char *name; int sizeActorInstance; int numInputPorts; struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn { char *(*serialize)(void *, char *); char *(*deserialize)(void **, char *); long (*size)(void *); int (*free)(void *, int); } *functions; } *inputPortDescriptions; int numOutputPorts; struct PortDescription *outputPortDescriptions; int numActions; struct ActionDescription { char *name; int *consumption; int *production; } *actionDescriptions; int *(*action_scheduler)(struct AbstractActorInstance *); void (*constructor)(struct AbstractActorInstance *); void (*destructor)(struct AbstractActorInstance *); void (*set_param)(struct AbstractActorInstance *, char *, char *); } *actorClass; char *instanceName; int numInputPorts; struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort { struct LocalOutputPort { void *bufferStart; void *bufferEnd; void *writePtr; unsigned int spaceLeft; } localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t { struct dllist_link_tag head_element; union pthread_mutex_t { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __list; } __data; char __size[40]; long __align; } mutex; } consumers; } *producer; struct LocalInputPort { void *bufferStart; void *bufferEnd; void *readPtr; unsigned int available; } localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; } *inputPort; int numOutputPorts; struct OutputPort *outputPort; int *(*action_scheduler)(struct AbstractActorInstance *); } base; int _fsmState; } *

user_defined_types: struct ActorInstance_RVC_decoder__texture_Y__idct2d__row { struct AbstractActorInstance base; int _fsmState; }

user_defined_types: struct InputPort { struct dllist_link_tag asConsumer; struct OutputPort *producer; struct LocalInputPort localInputPort; unsigned int tokensConsumed; unsigned int drainedAt; unsigned int capacity; struct tokenFn functions; }


decompiled_code:
void *__fastcall RVC_decoder__texture_Y__idct2d__row_action_scheduler(__int64 a1)
{
unsigned int v1; // eax

v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
do
{
while ( v1 > 7 )
{
if ( (unsigned int)pinAvailOut_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 56) + 24LL)) <= 7 )
return &exitcode_block_Any;
action0(a1);
v1 = pinAvailIn_int32_t_isra_0(*(_DWORD *)(*(_QWORD *)(a1 + 40) + 48LL));
}
}
while ( *(_DWORD *)(a1 + 72) );
return &exitcode_block_Any;
}

original_code:
static const int *RVC_decoder__texture_Y__idct2d__row_action_scheduler(AbstractActorInstance *pBase) {
  const int *result = exit_code_yield;
  ActorInstance_RVC_decoder__texture_Y__idct2d__row *thisActor=(ActorInstance_RVC_decoder__texture_Y__idct2d__row*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 8)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 8)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

canonical_original_code:
static int *RVC_decoder__texture_Y__idct2d__row_action_scheduler(struct AbstractActorInstance *pBase) {
  int *result = exit_code_yield;
  struct ActorInstance_RVC_decoder__texture_Y__idct2d__row *thisActor = (ActorInstance_RVC_decoder__texture_Y__idct2d__row*) pBase;
  void *context = ((void *)0); context = context;
  while(1) {
    if ((pinAvailIn_int32_t(&(thisActor->base.inputPort[0].localInputPort)) >= 8)) {
      if ((pinAvailOut_int32_t(&(thisActor->base.outputPort[0].localOutputPort)) >= 8)) {
        action0(thisActor);
        continue;
      } else {
        result = exitcode_block_Any;
        goto out;
      }
    }
    switch(thisActor->_fsmState) {
      case 0:
        result = exitcode_block_Any;
        goto out;
        break;
    }
  }
  out:

  return result;
}

user_defined_types: struct PortDescription { int dummy; char *name; int tokenSize; struct tokenFn *functions; }

user_defined_types: struct OutputPort { struct LocalOutputPort localOutputPort; unsigned int capacity; unsigned int tokensProduced; unsigned int fullAt; struct tokenFn functions; struct dllist_head_t consumers; }