text: /*
   * Copyright (c) [2020-2021] Huawei Technologies Co.,Ltd.All rights reserved.
   *
   * OpenArkCompiler is licensed under Mulan PSL v2.
   * You can use this software according to the terms and conditions of the Mulan PSL v2.
   * You may obtain a copy of Mulan PSL v2 at:
   *
   *     http://license.coscl.org.cn/MulanPSL2
   *
   * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
   * FIT FOR A PARTICULAR PURPOSE.
   * See the Mulan PSL v2 for more details.
   */
  #include <stdio.h>
  #include <stdlib_c_enhanced.h>
  
  __attribute__((byte_count_index(1)))
  void* malloc(size_t);
  
  __attribute__((returns_count(10)))
  int* func(int *arg) {
    int *q;
    if (*arg) {
      int *p __attribute__((count(5))) = malloc(sizeof(int) * 5);
      q = p;
    } else {
      int *p __attribute__((count(10))) = malloc(sizeof(int) * 10);
      q = p;
    }
    return q;
  }
  
  
  int main() {
    return 0;
  }
  